This commit is contained in:
Zelong Kuang
2025-12-14 09:04:11 +11:00
parent 2321eb603b
commit 753ea5ea48
185 changed files with 1608 additions and 18 deletions

View File

@@ -0,0 +1 @@
latex-mode

View File

@@ -0,0 +1,19 @@
# key: <header
# name: Basic Org Header
# --
#+title: ${1:$$(capitalize yas-text)}
#+author: ${2:`user-full-name`}
#+date: ${3:`(format-time-string "%Y:%m:%d")`}
#+options: h:${4:3} num:${5:t||nil} toc:${6:t||nil}
${7:#+property: header-args:matlab :session *MATLAB* :results output :exports both :eval never-export :noweb yes}
${8:#+property: header-args:julia :session *Julia* :async yes :exports results}
# #+setupfile: https://fniessen.github.io/org-html-themes/setup/theme-readtheorg.setup
# #+html_HEAD: <link rel="stylesheet" type="text/css" href="https://gongzhitaao.org/orgcss/org.css"/>
#+latex_CLASS: ${9:article}
#+latex_CLASS_OPTIONS: ${10:[10pt]}
#+latex_HEADER: ${11:\input{${12:`(if (boundp 'my-preamble-file) my-preamble-file "")`}}}
${13:#+bibliography: ${14:`(car reftex-default-bibliography)`}}
#+exclude_TAGS: noexport ignore
#+startup: ${15:latexpreview} ${16:hideblocks}
$0

View File

@@ -0,0 +1,6 @@
# -*- mode: snippet -*-
# name: hash-plus
# key: 3=
# condition: (and (= (- (point) (line-beginning-position)) 2) 'auto)
# --
#+$0

View File

@@ -0,0 +1,6 @@
# -*- mode: snippet -*-
# name: latex_header_extra
# key: lhe
# condition: (save-excursion (backward-word) (bolp))
# --
#+latex_header_extra: $0

View File

@@ -0,0 +1,10 @@
# -*- mode: snippet -*-
# name: reveal-html-columns
# key: <rco
# --
#+REVEAL_HTML: <div class="column" style="width:${1:50}%;">
$0
#+REVEAL_HTML: </div>
#+REVEAL_HTML: <div class="column" style="width:${1:$(- 100 (string-to-number yas-text))}%;">
#+REVEAL_HTML: </div>

View File

@@ -0,0 +1,7 @@
# -*- mode: snippet -*-
# name: reveal-html-div
# key: <div
# --
#+REVEAL_HTML: <div class="${1:row}" style="$2">
$0
#+REVEAL_HTML: </div>

View File

@@ -0,0 +1,6 @@
# key: <spa
# name: reveal-html-span
# --
#+REVEAL_HTML: <span class="${1:fragment}" style="${2:font-size:50%}">
$0
#+REVEAL_HTML: </span>

View File

@@ -0,0 +1,7 @@
# -*- mode: snippet -*-
# name: source block
# key: <src
# --
#+begin_src ${1:$$(yas-auto-next (yas-completing-read "Language: " (mapcar 'car org-babel-load-languages))) }
$0
#+end_src

View File

@@ -0,0 +1,6 @@
# key: <jp
# name: src-jupyter-python
# --
#+BEGIN_SRC jupyter-python
$0
#+END_SRC

View File

@@ -0,0 +1,19 @@
# key: <video
# name: video template
# --
#+begin_export html
<video preload="metadata" style="center" width="${2:700}" ${3:autoplay }${4:controls}${5: loop}>
<source src=`(let* ((s (read-file-name "Video file: "))
(s-short (substring s (string-match "/img" s))))
(concat "\""
s-short
"\" type=\""
(substring (shell-command-to-string
(concat "mimetype -b 2>/dev/null "
(shell-quote-argument s))) 0 -1)
"\">\n<a href="
s-short
"\">"
))`${6:[VIDEO]}</a></video>
#+end_export
$0