BIBLIOGRAPHY

Timothy. (2020) 2024. “Tecosaur/Latex-Auto-Activating-Snippets.” https://github.com/tecosaur/LaTeX-auto-activating-snippets.

엄청 편리한 방법이다.

tecosaur/LaTeX-auto-activating-snippets

(Timothy [2020] 2024)

  • 수식 테스트

뭔가 구리다. 이거 기본으로 가서 해보라 고전역학 수식 쳐넣는 방법 좀 연구해줘

Mirror of https://git.tecosaur.net/tec/LaTeX-auto-activating-snippets

A chunky set of LaTeX snippets for the auto-activating-snippets engine.

Sample Configuration

(use-package laas
  :hook (LaTeX-mode . laas-mode)
  :config ; do whatever here
  (aas-set-snippets 'laas-mode
                    ;; set condition!
                    :cond #'texmathp ; expand only while in math
                    "supp" "\\supp"
                    "On" "O(n)"
                    "O1" "O(1)"
                    "Olog" "O(\\log n)"
                    "Olon" "O(n \\log n)"
                    ;; bind to functions!
                    "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"))))

Credits

cdlatex and this very nice blog post.

Snippets

Note: The rendering on GitHub is a little wonkey. It should be understandable enough, but in any case you can also view this file from emacs:

(browse-url-emacs "https://raw.githubusercontent.com/tecosaur/LaTeX-auto-activating-snippets/master/README.org")

Basic set

(aas--format-doc-to-org 'laas-basic-snippets)
Basic snippets. Expand only inside maths.
(aas--format-snippet-array laas-basic-snippets)
!=
!>\mapsto
**
+-±
-+\mp
->
...
<<
<=
<>
=<\impliedby
==&=
=>\implies
>=
>>
AA
EE
cb^3
iff\iff
inn
notin¬∈
sr^2
xx×
❘->\mapsto
❘=\models
❘❘\mid
∽=
∽∽
arccosarccos
arccot\arccot
arccot\arccot
arccsc\arccsc
arcsec\arcsec
arcsinarcsin
arctanarctan
coscos
cotcot
csccsc
expexp
lnln
loglog
perp
sinsin
star*
gcdgcd
minmin
maxmax
eqv
CC\CC
FF\FF
HH\HH
NN\NN
PP\PP
QQ\QQ
RR\RR
ZZ\ZZ
;aα
;A
;;A
;bβ
;;;ccos
;;;Carccos
;dδ
;;d
;DΔ
;;D
;eε
;;eε
;;;eexp
;E
;;;Eln
;fφ
;;fϕ
;FΦ
;gγ
;;;glg
;GΓ
;;;G10?
;hη
;;h
;i
;;iı
;Iι
;;I\Im
;;jȷ
;kκ
;lλ
;;l
;;;llog
;LΛ
;mμ
;nν
;;;nln
;N
;;;Nexp
;oω
;OΩ
;;O
;pπ
;;pϖ
;PΠ
;qθ
;;qϑ
;QΘ
;rρ
;;r\varrho
;;R\Re
;sσ
;;sς
;;;ssin
;SΣ
;;;Sarcsin
;tτ
;;;ttan
;;;Tarctan
;uυ
;UΥ
;v
;VΦ
;wξ
;WΞ
;xχ
;yψ
;YΨ
;zζ
;0
;8
;!¬
;^
;&
;∽
;;∽
;_
;+
;-
;;+
;;-\longleftrightarrow
;*×
;/¬
;❘\mapsto
;;❘\longmapsto
;\
;=
;;=\Longleftrightarrow
;(
;)
;[
;;[\Longleftarrow
;]
;;]\Longrightarrow
;{
;}
;<
;;<\longleftarrow
;;;<min
;>
;;>\longrightarrow
;;;>max
;'
;.

Annoying Subscripts

(aas--format-doc-to-org 'laas-subscript-snippets)
Automatic subscripts! Expand In math and after a single letter.
(aas--format-snippet-array laas-subscript-snippets)
iiX_i, or XYi if a subscript was typed already
ip1_{i+1}
jjX_j, or XYj if a subscript was typed already
jp1_{j+1}
nnX_n, or XYn if a subscript was typed already
np1_{n+1}
kkX_k, or XYk if a subscript was typed already
kp1_{k+1}
0X_0, or XY0 if a subscript was typed already
1X_1, or XY1 if a subscript was typed already
2X_2, or XY2 if a subscript was typed already
3X_3, or XY3 if a subscript was typed already
4X_4, or XY4 if a subscript was typed already
5X_5, or XY5 if a subscript was typed already
6X_6, or XY6 if a subscript was typed already
7X_7, or XY7 if a subscript was typed already
8X_8, or XY8 if a subscript was typed already
9X_9, or XY9 if a subscript was typed already

The infamous fraction

(aas--format-doc-to-org 'laas-frac-snippet)
Frac snippet.
Expand to a template frac after //, or wrap the object before point if it isn~t /.
 
ab/ => \frac{ab}{}
// => \frac{}{}
(aas--format-snippet-array laas-frac-snippet)
/See the docs of `laas-frac-snippet’

Simpler Accents

(aas--format-doc-to-org 'laas-accent-snippets)
A simpler way to apply accents. Expand If LaTeX symbol immidiately before point.
(aas--format-snippet-array laas-accent-snippets)
'rWrap in \mathrm{} or \textrm{}
'iWrap in \mathit{} or \textit{}
'bWrap in \mathbf{} or \textbf{}
'eWrap in \mathemph{} or \textemph{}
'yWrap in \mathtt{} or \texttt{}
'fWrap in \mathsf{} or \textsf{}
'lWrap in \textsl
'.Wrap in \dot{}
':Wrap in \ddot{}
'∽Wrap in ~
'NWrap in \widetilde{}
'^Wrap in \hat{}
'HWrap in \widehat{}
'-Wrap in \bar{}
'TWrap in \overline{}
'_Wrap in \underline{}
'{Wrap in \overbrace{}
'}Wrap in \underbrace{}
'>Wrap in \vec{}
'/Wrap in \grave{}
'"Wrap in ´
'vWrap in ✓
'uWrap in \breve{}
'mWrap in \mbox{}
'cWrap in \mathcal{}
'0Wrap in {\textstyle }
'1Wrap in {\displaystyle }
'2Wrap in {\scriptstyle }
'3Wrap in {\scriptscriptstyle }
'qWrap in \sqrt{}
..␣Wrap in \dot{}
,.Wrap in \vec{}
.,Wrap in \vec{}
∽␣Wrap in ~
hatWrap in \hat{}
barWrap in \overline{}

테스트

[2024-11-06 Wed 21:58]

입니다. 대박.