mirror of
https://github.com/js0ny/dotfiles.git
synced 2025-12-21 08:43:00 +00:00
feat(emacs): LLM, LaTeX
This commit is contained in:
parent
9b19b8b834
commit
cb81828291
8 changed files with 161 additions and 47 deletions
|
|
@ -16,16 +16,34 @@
|
|||
;; set condition!
|
||||
:cond #'texmathp ; expand only while in math
|
||||
"nabl" "\\nabla"
|
||||
"lg" "\\lg"
|
||||
"hat" "\\hat"
|
||||
;; "iint" "\\iint"
|
||||
;; "int" "\\int"
|
||||
"cdot" "\\cdot"
|
||||
"dif" "\\mathrm{d}"
|
||||
"pm" "\\pm"
|
||||
"mp" "\\mp"
|
||||
"sq" "\\sqrt"
|
||||
;; bind to functions!
|
||||
"mk" (lambda () (interactive)
|
||||
(yas-expand-snippet "\\( $1 \\)$0"))
|
||||
"ppart" (lambda () (interactive)
|
||||
(yas-expand-snippet "\\frac{\\partial $2}{\\partial $1} $0"))
|
||||
;; bind to functions!
|
||||
"rm" (lambda () (interactive)
|
||||
(yas-expand-snippet "\\mathrm{$1} $0"))
|
||||
"sb" (lambda () (interactive)
|
||||
(yas-expand-snippet "_{$1} $0"))
|
||||
"Sum" (lambda () (interactive)
|
||||
(yas-expand-snippet "\\sum_{$1}^{$2} $0"))
|
||||
"Span" (lambda () (interactive)
|
||||
(yas-expand-snippet "\\Span($1)$0"))
|
||||
;; add accent snippets
|
||||
:cond #'laas-object-on-left-condition
|
||||
"qq" (lambda () (interactive) (laas-wrap-previous-object "sqrt")))
|
||||
"qq" (lambda () (interactive) (laas-wrap-previous-object "sqrt"))
|
||||
:cond #'(lambda () (and (not (texmathp))
|
||||
(looking-back "^" nil)))
|
||||
"dm" '(yas "\\[\n$1\n\\]$0"))
|
||||
)
|
||||
|
||||
(provide 'init-latex)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue