• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

tecosaur/LaTeX-auto-activating-snippets: An Emacs Package

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

tecosaur/LaTeX-auto-activating-snippets

开源软件地址(OpenSource Url):

https://github.com/tecosaur/LaTeX-auto-activating-snippets

开源编程语言(OpenSource Language):

Emacs Lisp 100.0%

开源软件介绍(OpenSource Introduction):

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

Basic snippets. Expand only inside maths.
!=
!>\mapsto
**
+-±
-+\mp
->
...
<<\ll
<=\leq
<>\diamond
=<\impliedby
==&=
=>\implies
>=\geq
>>\gg
AA
EE
cb^3
iff\iff
inn
notin¬\in
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\aleph
;bβ
;;;ccos
;;;Carccos
;dδ
;;d
;DΔ
;;D
;eε
;;eε
;;;eexp
;E
;;;Eln
;fφ
;;f\varphi
;FΦ
;gγ
;;;glg
;GΓ
;;;G10?
;hη
;;h\hbar
;i
;;i\imath
;Iι
;;I\Im
;;j\jmath
;kκ
;lλ
;;l\ell
;;;llog
;LΛ
;mμ
;nν
;;;nln
;N
;;;Nexp
;oω
;OΩ
;;O\mho
;pπ
;;p\varpi
;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
;\\setminus
;=
;;=\Longleftrightarrow
;(\langle
;)\rangle
;[
;;[\Longleftarrow
;]
;;]\Longrightarrow
;{
;}
;<
;;<\longleftarrow
;;;<min
;>
;;>\longrightarrow
;;;>max
~;’~
;.

Annoying Subscripts

Automatic subscripts! Expand In math and after a single letter.
iiX_i, or XYi if a subscript was typed already
ip1i+1
jjX_j, or XYj if a subscript was typed already
jp1j+1
nnX_n, or XYn if a subscript was typed already
np1n+1
kkX_k, or XYk if a subscript was typed already
kp1k+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

Frac snippet.
Expand to a template frac after //, or wrap the object before point if it isn~t /.

:

ab/ => \frac{ab}{}
// => \frac{}{}
/See the docs of `laas-frac-snippet’

Simpler Accents

A simpler way to apply accents. Expand If LaTeX symbol immidiately before point.
~’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 ˜
~’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 ´
~’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 ˜
hatWrap in \hat{}
barWrap in \overline{}



鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
wuseal/Kotlin-Reflect-Tools-For-JVM: Kotlin reflect tools for JVM发布时间:2022-07-07
下一篇:
next-step/kotlin-racingcar发布时间:2022-07-07
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap