tecosaur / LaTeX-auto-activating-snippets

Mirror of https://git.tecosaur.net/tec/LaTeX-auto-activating-snippets
GNU General Public License v3.0
100 stars 24 forks source link
emacs emacs-package mirror

+title: LaTeX Auto Activating Snippets

+author: tecosaur, ymarco

+html:

+html:

A chunky set of LaTeX snippets for the [[https://github.com/ymarco/auto-activating-snippets][auto-activating-snippets engine]].

+RESULTS:

: Basic snippets. Expand only inside maths.

+begin_src emacs-lisp :exports results

(aas--format-snippet-array laas-basic-snippets)

+end_src

+RESULTS:

| ~!=~ | \neq | | ~!>~ | \mapsto | | ~*~ | \cdot | | ~+-~ | \pm | | ~-+~ | \mp | | ~->~ | \to | | ~...~ | \dots | | ~<<~ | \ll | | ~<=~ | \leq | | ~<>~ | \diamond | | ~=<~ | \impliedby | | ~==~ | &= | | ~=>~ | \implies | | ~>=~ | \geq | | ~>>~ | \gg | | ~AA~ | \forall | | ~EE~ | \exists | | ~cb~ | ^3 | | ~iff~ | \iff | | ~inn~ | \in | | ~notin~ | \not\in | | ~sr~ | ^2 | | ~xx~ | \times | | ~❘->~ | \mapsto | | ~❘=~ | \models | | ~❘❘~ | \mid | | ~∽=~ | \approx | | ~∽∽~ | \sim | | ~arccos~ | \arccos | | ~arccot~ | \arccot | | ~arccot~ | \arccot | | ~arccsc~ | \arccsc | | ~arcsec~ | \arcsec | | ~arcsin~ | \arcsin | | ~arctan~ | \arctan | | ~cos~ | \cos | | ~cot~ | \cot | | ~csc~ | \csc | | ~exp~ | \exp | | ~ln~ | \ln | | ~log~ | \log | | ~perp~ | \perp | | ~sin~ | \sin | | ~star~ | \star | | ~gcd~ | \gcd | | ~min~ | \min | | ~max~ | \max | | ~eqv~ | \equiv | | ~CC~ | \CC | | ~FF~ | \FF | | ~HH~ | \HH | | ~NN~ | \NN | | ~PP~ | \PP | | ~QQ~ | \QQ | | ~RR~ | \RR | | ~ZZ~ | \ZZ | | ~;a~ | \alpha | | ~;A~ | \forall | | ~;;A~ | \aleph | | ~;b~ | \beta | | ~;;;c~ | \cos | | ~;;;C~ | \arccos | | ~;d~ | \delta | | ~;;d~ | \partial | | ~;D~ | \Delta | | ~;;D~ | \nabla | | ~;e~ | \epsilon | | ~;;e~ | \varepsilon | | ~;;;e~ | \exp | | ~;E~ | \exists | | ~;;;E~ | \ln | | ~;f~ | \phi | | ~;;f~ | \varphi | | ~;F~ | \Phi | | ~;g~ | \gamma | | ~;;;g~ | \lg | | ~;G~ | \Gamma | | ~;;;G~ | 10^{?} | | ~;h~ | \eta | | ~;;h~ | \hbar | | ~;i~ | \in | | ~;;i~ | \imath | | ~;I~ | \iota | | ~;;I~ | \Im | | ~;;j~ | \jmath | | ~;k~ | \kappa | | ~;l~ | \lambda | | ~;;l~ | \ell | | ~;;;l~ | \log | | ~;L~ | \Lambda | | ~;m~ | \mu | | ~;n~ | \nu | | ~;;;n~ | \ln | | ~;N~ | \nabla | | ~;;;N~ | \exp | | ~;o~ | \omega | | ~;O~ | \Omega | | ~;;O~ | \mho | | ~;p~ | \pi | | ~;;p~ | \varpi | | ~;P~ | \Pi | | ~;q~ | \theta | | ~;;q~ | \vartheta | | ~;Q~ | \Theta | | ~;r~ | \rho | | ~;;r~ | \varrho | | ~;;R~ | \Re | | ~;s~ | \sigma | | ~;;s~ | \varsigma | | ~;;;s~ | \sin | | ~;S~ | \Sigma | | ~;;;S~ | \arcsin | | ~;t~ | \tau | | ~;;;t~ | \tan | | ~;;;T~ | \arctan | | ~;u~ | \upsilon | | ~;U~ | \Upsilon | | ~;v~ | \vee | | ~;V~ | \Phi | | ~;w~ | \xi | | ~;W~ | \Xi | | ~;x~ | \chi | | ~;y~ | \psi | | ~;Y~ | \Psi | | ~;z~ | \zeta | | ~;0~ | \emptyset | | ~;8~ | \infty | | ~;!~ | \neg | | ~;^~ | \uparrow | | ~;&~ | \wedge | | ~;∽~ | \approx | | ~;;∽~ | \simeq | | ~;_~ | \downarrow | | ~;+~ | \cup | | ~;-~ | \leftrightarrow | | ~;;+~ | \oplus | | ~;;-~ | \longleftrightarrow | | ~;~ | \times | | ~;/~ | \not | | ~;❘~ | \mapsto | | ~;;❘~ | \longmapsto | | ~;\~ | \setminus | | ~;=~ | \Leftrightarrow | | ~;;=~ | \Longleftrightarrow | | ~;(~ | \langle | | ~;)~ | \rangle | | ~;[~ | \Leftarrow | | ~;;[~ | \Longleftarrow | | ~;]~ | \Rightarrow | | ~;;]~ | \Longrightarrow | | ~;{~ | \subset | | ~;}~ | \supset | | ~;<~ | \leftarrow | | ~;;<~ | \longleftarrow | | ~;;;<~ | \min | | ~;>~ | \rightarrow | | ~;;>~ | \longrightarrow | | ~;;;>~ | \max | | ~;'~ | \prime | | ~;.~ | \cdot |

** Annoying Subscripts

+begin_src emacs-lisp :exports results

(aas--format-doc-to-org 'laas-subscript-snippets)

+end_src

+RESULTS:

: Automatic subscripts! Expand In math and after a single letter.

+begin_src emacs-lisp :exports results

(aas--format-snippet-array laas-subscript-snippets)

+end_src

+RESULTS:

| ~ii~ | Xi, or X{Yi} if a subscript was typed already | | ~ip1~ | _{i+1} | | ~jj~ | Xj, or X{Yj} if a subscript was typed already | | ~jp1~ | _{j+1} | | ~nn~ | Xn, or X{Yn} if a subscript was typed already | | ~np1~ | _{n+1} | | ~kk~ | Xk, or X{Yk} if a subscript was typed already | | ~kp1~ | _{k+1} | | ~0~ | X0, or X{Y0} if a subscript was typed already | | ~1~ | X1, or X{Y1} if a subscript was typed already | | ~2~ | X2, or X{Y2} if a subscript was typed already | | ~3~ | X3, or X{Y3} if a subscript was typed already | | ~4~ | X4, or X{Y4} if a subscript was typed already | | ~5~ | X5, or X{Y5} if a subscript was typed already | | ~6~ | X6, or X{Y6} if a subscript was typed already | | ~7~ | X7, or X{Y7} if a subscript was typed already | | ~8~ | X8, or X{Y8} if a subscript was typed already | | ~9~ | X9, or X{Y9} if a subscript was typed already |

** The infamous fraction

+begin_src emacs-lisp :exports results

(aas--format-doc-to-org 'laas-frac-snippet)

+end_src

+RESULTS:

: Frac snippet. : Expand to a template frac after //, or wrap the object before point if it isn~t /. : : ab/ => \frac{ab}{} : // => \frac{}{}

+begin_src emacs-lisp :exports results

(aas--format-snippet-array laas-frac-snippet)

+end_src

+RESULTS:

| ~/~ | See the docs of `laas-frac-snippet' |

** Simpler Accents

+begin_src emacs-lisp :exports results

(aas--format-doc-to-org 'laas-accent-snippets)

+end_src

+RESULTS:

: A simpler way to apply accents. Expand If LaTeX symbol immidiately before point.

+begin_src emacs-lisp :exports results

(aas--format-snippet-array laas-accent-snippets)

+end_src

+RESULTS:

| ~'r~ | Wrap in \mathrm{} or \textrm{} | | ~'i~ | Wrap in \mathit{} or \textit{} | | ~'b~ | Wrap in \mathbf{} or \textbf{} | | ~'e~ | Wrap in \mathemph{} or \textemph{} | | ~'y~ | Wrap in \mathtt{} or \texttt{} | | ~'f~ | Wrap in \mathsf{} or \textsf{} | | ~'l~ | Wrap in \textsl | | ~'.~ | Wrap in \dot{} | | ~':~ | Wrap in \ddot{} | | ~'∽~ | Wrap in \tilde{} | | ~'N~ | Wrap in \widetilde{} | | ~'^~ | Wrap in \hat{} | | ~'H~ | Wrap in \widehat{} | | ~'-~ | Wrap in \bar{} | | ~'T~ | Wrap in \overline{} | | ~'_~ | Wrap in \underline{} | | ~'{~ | Wrap in \overbrace{} | | ~'}~ | Wrap in \underbrace{} | | ~'>~ | Wrap in \vec{} | | ~'/~ | Wrap in \grave{} | | ~'"~ | Wrap in \acute{} | | ~'v~ | Wrap in \check{} | | ~'u~ | Wrap in \breve{} | | ~'m~ | Wrap in \mbox{} | | ~'c~ | Wrap in \mathcal{} | | ~'0~ | Wrap in {\textstyle } | | ~'1~ | Wrap in {\displaystyle } | | ~'2~ | Wrap in {\scriptstyle } | | ~'3~ | Wrap in {\scriptscriptstyle } | | ~'q~ | Wrap in \sqrt{} | | ~..␣~ | Wrap in \dot{} | | ~,.~ | Wrap in \vec{} | | ~.,~ | Wrap in \vec{} | | ~∽␣~ | Wrap in \tilde{} | | ~hat~ | Wrap in \hat{} | | ~bar~ | Wrap in \overline{} |