summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJustin Gassner <justin.gassner@mailbox.org>2023-09-15 20:18:24 +0200
committerJustin Gassner <justin.gassner@mailbox.org>2023-09-15 20:18:24 +0200
commite1238f63de756e285c4f01ad87fee381d083116a (patch)
tree50c4478782bd07e322df6fc4eb707de21597b258
downloadmy-quicktex-keywords-e1238f63de756e285c4f01ad87fee381d083116a.tar.zst
Initial commit
-rw-r--r--.stylua.toml3
-rw-r--r--lua/my-quicktex-keywords/init.lua105
-rw-r--r--plugin/my-quicktex-keywords.vim1
-rw-r--r--src/tex/amsfonts4
-rw-r--r--src/tex/amsmath227
-rw-r--r--src/tex/amssymb4
-rw-r--r--src/tex/amsthm2
-rw-r--r--src/tex/cleveref4
-rw-r--r--src/tex/latex2e524
-rw-r--r--src/tex/mathtools182
-rw-r--r--src/tex/misc89
-rw-r--r--src/tex/ngerman3
-rw-r--r--src/tex/plaintex3
-rw-r--r--src/tex/siunitx16
-rw-r--r--src/tex/tikzcd5
15 files changed, 1172 insertions, 0 deletions
diff --git a/.stylua.toml b/.stylua.toml
new file mode 100644
index 0000000..4a89f57
--- /dev/null
+++ b/.stylua.toml
@@ -0,0 +1,3 @@
+indent_type = "Spaces"
+indent_width = 2
+quote_style = "AutoPreferSingle"
diff --git a/lua/my-quicktex-keywords/init.lua b/lua/my-quicktex-keywords/init.lua
new file mode 100644
index 0000000..c2bdb69
--- /dev/null
+++ b/lua/my-quicktex-keywords/init.lua
@@ -0,0 +1,105 @@
+-- cspell:words quicktex nvim
+
+local mode = { normal = 0, math = 1, both = 2 }
+
+local quicktex_tex = {}
+local quicktex_math = {}
+
+local function read_item(line)
+ if string.match(line, '^#') then
+ return
+ end
+
+ local item_mode = mode.normal
+ local item_keyword
+ local item_expansion
+
+ if string.match(line, '^MATH ') then
+ item_mode = mode.math
+ line = string.sub(line, 6)
+ elseif string.match(line, '^BOTH ') then
+ item_mode = mode.both
+ line = string.sub(line, 6)
+ end
+
+ local capture = string.match(line, '^ENV (%a+)$')
+ if capture then
+ item_keyword = capture
+ item_expansion = '\\begin{' .. capture .. '}\n<+++>\n\\end{' .. capture .. '}'
+ return item_mode, item_keyword, item_expansion
+ end
+ local cap1, cap2 = string.match(line, '^ENV (%a+) (%g+)$')
+ if cap1 then
+ item_keyword = cap1
+ item_expansion = '\\begin{' .. cap2 .. '}\n<+++>\n\\end{' .. cap2 .. '}'
+ return item_mode, item_keyword, item_expansion
+ end
+ local cap1, cap2 = string.match(line, '^ENV2 (%a+) (%g+)$')
+ if cap1 then
+ item_keyword = cap1
+ item_expansion = '\\begin{' .. cap2 .. '}{}{}\n<+++>\n\\end{' .. cap2 .. '}'
+ return item_mode, item_keyword, item_expansion
+ end
+ local cap1, cap2 = string.match(line, '^ENV3 (%a+) (%g+)$')
+ if cap1 then
+ item_keyword = cap1
+ item_expansion = '\\begin{' .. cap2 .. '}[<++>]\n<+++>\n\\end{' .. cap2 .. '}'
+ return item_mode, item_keyword, item_expansion
+ end
+
+ local capture = string.match(line, '^(%a+)$')
+ if capture then
+ item_keyword = capture
+ item_expansion = '\\' .. capture .. ' '
+ return item_mode, item_keyword, item_expansion
+ end
+
+ local cap1, cap2 = string.match(line, '^(%a+) (%a+)$')
+ if cap1 then
+ item_keyword = cap1
+ item_expansion = '\\' .. cap2 .. ' '
+ return item_mode, item_keyword, item_expansion
+ end
+
+ local cap1, cap2 = string.match(line, '^(%g+) (.+)')
+ if cap1 then
+ item_keyword = cap1
+ item_expansion = cap2
+ return item_mode, item_keyword, item_expansion
+ end
+end
+
+local function parse(path)
+ io.input(path)
+ for line in io.lines() do
+ local m, keyword, expansion = read_item(line)
+ if m == mode.normal then
+ quicktex_tex[keyword] = expansion
+ end
+ if m == mode.math then
+ quicktex_math[keyword] = expansion
+ end
+ if m == mode.both then
+ quicktex_tex[keyword] = expansion
+ quicktex_math[keyword] = expansion
+ end
+ end
+end
+
+local function generate_quicktex_dictionaries()
+ local files = vim.api.nvim_get_runtime_file('*src/tex/*', true)
+ for _, file in pairs(files) do
+ parse(file)
+ end
+ vim.g.quicktex_tex = quicktex_tex
+ vim.g.quicktex_math = quicktex_math
+end
+
+vim.api.nvim_create_user_command('GenerateQuicktexDictionaries', function()
+ generate_quicktex_dictionaries()
+ print('Something should happen here...')
+end, { bang = true, desc = 'generate QuickTex dictionaries' })
+
+return {
+ generate_quicktex_dictionaries = generate_quicktex_dictionaries,
+}
diff --git a/plugin/my-quicktex-keywords.vim b/plugin/my-quicktex-keywords.vim
new file mode 100644
index 0000000..6de90a4
--- /dev/null
+++ b/plugin/my-quicktex-keywords.vim
@@ -0,0 +1 @@
+lua require("my-quicktex-keywords").generate_quicktex_dictionaries()
diff --git a/src/tex/amsfonts b/src/tex/amsfonts
new file mode 100644
index 0000000..87e5127
--- /dev/null
+++ b/src/tex/amsfonts
@@ -0,0 +1,4 @@
+# QuickTeX keywords for amsfonts
+
+MATH mathbb \mathbb{<+++>} <++>
+MATH mathfrak \mathfrak{<+++>} <++>
diff --git a/src/tex/amsmath b/src/tex/amsmath
new file mode 100644
index 0000000..e8ddb56
--- /dev/null
+++ b/src/tex/amsmath
@@ -0,0 +1,227 @@
+# QuickTeX keywords for amsmath
+
+# 1 Introduction
+# none
+
+# 2 Options for the amsmath package
+# none
+
+# 3 Displayed equations
+
+# 3.1 Introduction
+MATH tag \tag{<+++>}
+MATH notag
+
+# 3.2 Single equations
+#ENV equation
+
+# 3.3 Split equations without alignment
+ENV multline
+MATH shoveleft \shoveleft{<+++>}
+MATH shoveright \shoveright{<+++>}
+multlinegap
+
+# 3.4 Split equations with alignment
+MATH ENV split
+
+# 3.5 Equation groups without alignment
+ENV gather
+
+# 3.6 Equation groups with mutual alignment
+ENV align
+ENV alignat
+ENV flalign
+
+# 3.7 Alignment building blocks
+MATH ENV gathered
+MATH ENV aligned
+MATH ENV alignedat
+MATH ENV cases
+
+# 3.8 Adjusting tag placement
+MATH raisetag \raisetag{<+++>}
+
+# 3.9 Vertical spacting and page breaks in multiline displays
+MATH displaybreak
+allowdisplaybreaks
+
+# 3.10 Interrupting a display
+MATH itext \intertext{<+++>}
+
+# 3.11 Equation numbering
+
+# 3.11.1 Numbering hierarchy
+numberwithin \numberwithin{<+++>}{<++>}
+
+# 3.11.2 Cross references to equation numbers
+eqref <BS>~\eqref{<+++>} <++>
+
+# 3.11.3 Subordinate numbering sequences
+ENV subequations
+
+# 3.11.4 Numbering style
+# none
+
+# 4 Miscellaneous mathematical feature
+
+# 4.1 Matrices
+MATH ENV matrix
+MATH ENV pmatrix
+MATH ENV bmatrix
+MATH ENV Bmatrix
+MATH ENV vmatrix
+MATH ENV Vmatrix
+MATH ENV smallmatrix
+MATH hdotsfor \hdotsfor{<+++>}
+
+# 4.2 Math spacing commands
+MATH mspace \mspace{<+++>mu}
+
+# 4.3 Dots
+MATH dotsc
+MATH dotsb
+MATH dotsm
+MATH dotsi
+MATH dotso
+MATH ds \dots
+
+# 4.4 Nonbreaking dashes
+nobreakdash
+
+# 4.5 Accents in math
+MATH dddot <ESC>Bi\dddot{<ESC>Ea} <+++>
+MATH ddddot <ESC>Bi\ddddot{<ESC>Ea} <+++>
+
+# 4.6 Roots
+MATH leftroot \leftroot{<+++>}
+MATH uproot \uproot{<+++>}
+
+# 4.7 Boxed formulas
+MATH boxed \boxed{<+++>}
+
+# 4.8 Over and under arrows
+MATH overleftarrow
+MATH overrightarrow
+MATH overleftrightarrow
+MATH underleftarrow
+MATH underrightarrow
+MATH underleftrightarrow
+
+# 4.9 Extensible arrows
+MATH xleftarrow \xleftarrow{<+++>}
+MATH xrightarrow \xrightarrow{<+++>}
+
+# 4.10 Affixing symbols to other symbols
+MATH overset \overset{<+++>}{<++>}
+MATH underset \underset{<+++>}{<++>}
+MATH overunderset \overunderset{<+++>}{<++>}{<++>}
+
+# 4.11 Fractions and related constructions
+
+# 4.11.1 The \frac, \dfrac, and \tfrac commands
+MATH dfr \dfrac{<+++>}{<++>} <++>
+MATH tfr \tfrac{<+++>}{<++>} <++>
+
+# 4.11.2 The \binom, \dbinom, and \tbinom commands
+MATH bi \binom{<+++>}{<++>} <++>
+MATH dbi \dbinom{<+++>}{<++>} <++>
+MATH tbi \tbinom{<+++>}{<++>} <++>
+
+# 4.11.3 The \genfrac command
+MATH genfrac \genfrac{<+++>}{<++>}{<++>}{<++>}{<++>}{<++>}
+
+# 4.12 Continued fractions
+MATH cfr \cfrac{<+++>}{<++>}
+
+# 4.13 Smash options
+MATH smash \smash{<+++>}
+
+# 4.14 Delimiters
+
+# 4.14.1 Delimiter sizes
+MATH bigl \bigl
+MATH bigr \bigr
+MATH Bigl \Bigl
+MATH Bigr \Bigr
+MATH biggl \biggl
+MATH biggr \biggr
+MATH Biggl \Biggl
+MATH Biggr \Biggr
+
+# 4.14.2 Vertical bar notations
+MATH lvert
+MATH rvert
+MATH lVert
+MATH rVert
+
+# 5 Operator names
+
+# 5.1 Defining new operator names
+dmo \DeclareMathOperator{\<+++>}{<++>}
+MATH injlim
+MATH projlim
+MATH varinjlim
+MATH varprojlim
+MATH varliminf
+MATH varlimsup
+MATH operatorname \operatorname{<+++>} <++>
+
+# 5.2 \mod and its relatives
+MATH mod
+MATH pod
+
+# 6 The \text commend
+MATH text \text{<+++>} <++>
+
+# 7 Integrals and sums
+
+# 7.1 Multiline subscripts and superscripts
+MATH substack \substack{<+++>} <++>
+MATH subarray \begin{subarray}{l}<CR><+++><CR>\end{subarray}
+
+# 7.2 The \sideset command
+MATH sideset \sideset{<+++>} <++>
+
+# 7.3 Placement of superscripts and limits
+MATH limits
+MATH nolimits
+MATH displaylimits
+
+# 7.4 Multiple integral signs
+MATH iint
+MATH iiint
+MATH iiiint
+MATH idotsint
+
+# 8 Commutative diagrams
+# none
+
+# 9 Using math fonts
+
+# 9.1 Introduction
+# none
+
+# 9.2 Recommended use of math font commands
+# none
+
+# 9.3 Bold math symbols
+# none
+
+# 9.4 Italic Greek letters
+MATH varGamma
+MATH varDelta
+MATH varTheta
+MATH varLambda
+MATH varXi
+MATH varPi
+MATH varSigma
+MATH varUpsilon
+MATH varPhi
+MATH varPsi
+MATH varOmega
+
+# 10 Error messages and output problems
+# none
+
+# 11 Additional information
+# none
diff --git a/src/tex/amssymb b/src/tex/amssymb
new file mode 100644
index 0000000..ed86c2c
--- /dev/null
+++ b/src/tex/amssymb
@@ -0,0 +1,4 @@
+# QuickTeX keywords for amssymb
+
+MATH vtr \vartriangleright
+MATH vtl \vartriangleleft
diff --git a/src/tex/amsthm b/src/tex/amsthm
new file mode 100644
index 0000000..8a4c2ff
--- /dev/null
+++ b/src/tex/amsthm
@@ -0,0 +1,2 @@
+# QuickTeX keywords for amsthm
+
diff --git a/src/tex/cleveref b/src/tex/cleveref
new file mode 100644
index 0000000..483bc86
--- /dev/null
+++ b/src/tex/cleveref
@@ -0,0 +1,4 @@
+# cleveref keywords
+
+cref \cref{<+++>} <++>
+Cref \Cref{<+++>} <++>
diff --git a/src/tex/latex2e b/src/tex/latex2e
new file mode 100644
index 0000000..89c487c
--- /dev/null
+++ b/src/tex/latex2e
@@ -0,0 +1,524 @@
+# QuickTeX keywords for LaTeX2e
+# This follows the reference manual in appendix C of Lamports book.
+
+# C.2 The Structure of the Document
+ENV document
+
+# C.3 Sentences and Paragraphs
+
+# C.3.1 Making Sentences
+frenchspacing
+nonfrenchspacing
+latex \LaTeX\
+tex \TeX\
+today
+emph \emph{<+++>} <++>
+BOTH mbox \mbox{<+++>} <++>
+
+# C.3.2 Making Paragraphs
+noindent
+indent
+#par
+#textwidth
+linewidth
+parindent
+baselineskip
+baselinestretch
+parskip
+
+# C.3.3 Footnotes
+fn <BS>\footnote{<+++>} <++>
+footnotemark
+footnotetext \footnotetext{<+++>} <++>
+footnotesep
+footnoterule
+
+# C.3.4 Accents and Special Symbols
+#dag
+#ddag
+#S
+#P
+BOTH copyright
+BOTH pounds
+
+# C.4 Sectioning and Table of Contents
+
+# C.4.1 Sectioning Commands
+part \part{<+++>}<CR><CR><++>
+chap \chapter{<+++>}<CR><CR><++>
+sec \section{<+++>}<CR><CR><++>
+ssec \subsection{<+++>}<CR><CR><++>
+sssec \subsubsection{<+++>}<CR><CR><++>
+para \paragraph{<+++>}<CR><++>
+spara \subparagraph{<+++>}<CR><++>
+
+# C.4.2 The Appendix
+appendix \appendix<CR><CR>
+
+# C.4.3 Table of Contents
+toc \tableofcontents
+listoffigures
+listoftables
+addcontentsline \addcontentsline{toc}{<+++>}{<++>}
+addtocontents \addtocontents{toc}{<+++>}
+
+# C.4.4 Style Parameters
+secnumdepth
+tocdepth
+
+# C.5 Classes, Packages, and Page Styles
+
+# C.5.1 Document Class
+dc \documentclass[<++>]{<+++>}
+bibindent
+columnsep
+columnseprule
+mathindent
+
+# C.5.2 Packages
+usep \usepackage[<++>]{<+++>}
+
+# C.5.3 Page Styles
+ps \pagestyle{<+++>}
+tps \thispagestyle{<+++>}
+markright \markright{<+++>}
+markboth \markboth{<+++>}{<+++>}
+pagenumbering \pagenumbering{<+++>}
+twocolumn
+onecolumn
+topmargin
+headheight
+headsep
+oddsidemargin
+evensidemargin
+textheight
+textwidth
+marginparsep
+marginparwidth
+footskip
+pageheight
+pagewidth
+
+# C.5.4 The Title Page and Abstract
+mt maketitle
+title \title{<+++>}
+author \author{<+++>}
+date \date{<+++>}
+thanks \thanks{<+++>}
+ENV abstract
+ENV titlepage
+
+# C.6 Displayed Paragraphs
+
+# C.6.1 Quotations and Verse
+ENV quote
+ENV quotation
+ENV verse
+
+# C.6.2 List-Making Environments
+itemize \begin{itemize}<CR>\item <+++><CR>\end{itemize}
+enum \begin{enumerate}<CR>\item <+++><CR>\end{enumerate}
+desc \begin{description}<CR>\item <+++><CR>\end{description}
+item
+
+# C.6.3 The list and trivlist Environments
+# TODO
+
+# C.6.4 Verbatim
+ENV verbatim
+verb \verb{<+++>} <++>
+ENV alltt
+
+# C.7 Mathematical Formulas
+
+# C.7.1 Math Mode Environments
+BOTH m $<+++>$ <++>
+#ENV math
+ensuremath \ensuremath{<+++>} <++>
+ENV displaymath
+ENV eq equation
+ENV M equation*
+ENV eqnarray
+jot
+#mathindent
+abovedisplayskip
+belowdisplayskip
+abovedisplayshortskip
+belowdisplayshortskip
+
+# C.7.2 Common Structures
+MATH _ <BS>_{<+++>} <++>
+MATH ^ <BS>^{<+++>} <++>
+MATH fr \frac{<+++>}{<++>} <++>
+MATH rt \sqrt{<+++>} <++>
+MATH ld ldots
+MATH cdots
+MATH vd vdots
+MATH dd ddots
+
+# C.7.3 Mathematical Symbols
+
+# Lowercase Greek Letters
+MATH al alpha
+MATH be beta
+MATH ga gamma
+MATH de delta
+MATH eps epsilon
+#varepsilon
+MATH ze zeta
+MATH eta
+MATH th theta
+#vartheta
+MATH io iota
+MATH ka kappa
+MATH la lambda
+MATH mu
+MATH nu
+MATH xi
+MATH pi
+#varpi
+MATH rho
+#varrho
+MATH si sigma
+#varsigma
+MATH tau
+MATH up upsilon
+MATH phi
+#varphi
+MATH chi
+MATH psi
+MATH om omega
+
+# Uppercase Greek Letters
+MATH Ga Gamma
+MATH De Delta
+MATH Th Theta
+MATH La Lambda
+MATH Xi
+MATH Pi
+MATH Si Sigma
+MATH Up Upsilon
+MATH Phi
+MATH Psi
+MATH Om Omega
+
+# Binary Operation Symbols
+MATH pm
+MATH mp
+MATH ti times
+MATH div
+MATH ast
+MATH star
+MATH ci circ
+MATH bu bullet
+MATH cd cdot
+MATH cap
+MATH cup
+MATH uplus
+MATH sqcap
+MATH sqcup
+MATH ve vee
+MATH we wedge
+MATH sm setminus
+MATH wr
+MATH diamond
+MATH bigtriangleup
+MATH bigtriangledown
+MATH triangleleft
+MATH triangleright
+#lhd
+#rhd
+#unlhd
+#unrhd
+MATH op oplus
+MATH ominus
+MATH ot otimes
+MATH oslash
+MATH odot
+MATH bigcirc
+MATH dag dagger
+MATH ddagger
+MATH amalg
+
+# Relation Symbols
+MATH le
+MATH ge
+MATH prec
+MATH succ
+MATH preceq
+MATH succeq
+MATH ll
+MATH gg
+MATH sb subset
+MATH sp supset
+MATH sbe subseteq
+MATH spe supseteq
+#sqsubset
+#sqsupset
+MATH sqsubseteq
+MATH sqsupseteq
+MATH in
+MATH ni
+MATH vdash
+MATH dashv
+MATH ev equiv
+MATH sim
+MATH simeq
+MATH asymp
+MATH ap approx
+MATH cong
+MATH ne
+MATH doteq
+MATH nin notin
+MATH models
+MATH pp perp
+MATH mid
+#ll parallel
+MATH bowtie
+#Join
+MATH smile
+MATH frown
+MATH propto
+
+# Arrow Symbols
+MATH leftarrow
+MATH longleftarrow
+MATH Leftarrow
+MATH Longleftarrow
+MATH rightarrow
+MATH lra longrightarrow
+MATH Rightarrow
+MATH Longrightarrow
+MATH leftrightarrow
+MATH longleftrightarrow
+MATH Leftrightarrow
+MATH Longleftrightarrow
+MATH mt mapsto
+MATH lmt longmapsto
+MATH hookleftarrow
+MATH hookrightarrow
+MATH leftharpoonup
+MATH leftharpoondown
+MATH rightharpoonup
+MATH rightharpoondown
+MATH rightleftharpoons
+#leadsto
+MATH uparrow
+MATH Uparrow
+MATH downarrow
+MATH Downarrow
+MATH updownarrow
+MATH Updownarrow
+MATH nearrow
+MATH searrow
+MATH swarrow
+MATH nwarrow
+
+# Miscellaneous Symbols
+MATH aleph
+MATH hbar
+MATH imath
+MATH jmath
+MATH ell
+MATH wp
+MATH Re
+MATH Im
+#mho
+MATH prime
+MATH es emptyset
+MATH na nabla
+MATH surd
+MATH top
+MATH bot
+#|
+MATH angle
+MATH fa forall
+MATH ex exists
+MATH neg
+MATH flat
+MATH natural
+MATH sharp
+MATH backslash
+MATH pa partial
+MATH ii infty
+#Box
+#Diamond
+MATH triangle
+MATH clubsuit
+MATH diamondsuit
+MATH heartsuit
+MATH spadesuit
+
+# Variable-sized Symbols
+MATH sum
+MATH prod
+MATH coprod
+MATH int
+MATH oint
+MATH bigcap
+MATH bigcup
+MATH bigsqcup
+MATH bigvee
+MATH bigwedge
+MATH bigodot
+MATH bigotimes
+MATH bigoplus
+MATH biguplus
+
+# Log-like Functions
+MATH arccos
+MATH arcsin
+MATH arctan
+MATH arg
+MATH cos
+MATH cosh
+MATH cot
+MATH coth
+MATH csc
+MATH deg
+MATH det
+MATH dim
+MATH exp
+MATH gcd
+MATH hom
+MATH inf
+MATH ker
+MATH lg
+MATH lim
+MATH liminf
+MATH limsup
+MATH ln
+MATH log
+MATH max
+MATH min
+MATH Pr
+MATH sec
+MATH sin
+MATH sinh
+MATH sup
+MATH tan
+MATH tanh
+
+# C.7.4 Arrays
+
+# C.7.5 Delimiters
+
+# C.7.6 Putting One Thing Above Another
+MATH ol \overline{<+++>} <++>
+MATH ul \underline{<+++>} <++>
+
+# accents
+#
+MATH hat <ESC>Bi\hat{<ESC>Ea} <+++>
+MATH check <ESC>Bi\check{<ESC>Ea} <+++>
+MATH breve <ESC>Bi\breve{<ESC>Ea} <+++>
+MATH acute <ESC>Bi\acute{<ESC>Ea} <+++>
+MATH grave <ESC>Bi\grave{<ESC>Ea} <+++>
+MATH tilde <ESC>Bi\tilde{<ESC>Ea} <+++>
+MATH bar <ESC>Bi\bar{<ESC>Ea} <+++>
+MATH vec <ESC>Bi\vec{<ESC>Ea} <+++>
+MATH dot <ESC>Bi\dot{<ESC>Ea} <+++>
+MATH ddot <ESC>Bi\ddot{<ESC>Ea} <+++>
+MATH widehat <ESC>Bi\widehat{<ESC>Ea} <+++>
+MATH widetilde <ESC>Bi\widetilde{<ESC>Ea} <+++>
+#imath
+#jmath
+MATH sr \stackrel{<+++>}{<++>} <++>
+
+# C.7.7 Spacing
+
+# C.7.8 Changing Style
+
+# Type style
+MATH mathrm \mathrm{<+++>} <++>
+MATH mathit \mathit{<+++>} <++>
+MATH mathbf \mathbf{<+++>} <++>
+MATH mathsf \mathsf{<+++>} <++>
+MATH mathtt \mathtt{<+++>} <++>
+MATH mathcal \mathcal{<+++>} <++>
+MATH boldmath
+MATH unboldmath
+
+# Math style
+MATH displaystyle
+MATH textstyle
+MATH scriptstyle
+MATH scriptscriptstyle
+
+# C.8 Definitions, Numbering, and Programming
+
+# C.8.1 Defining Commands
+
+# C.8.2 Defining Environments
+
+# C.8.3 Theorem-like Environments
+
+# C.8.4 Numbering
+
+# C.8.5 The ifthen Package
+
+# C.9 Figures and Other Floating Bodies
+
+# C.9.1 Figures and Tables
+fig \begin{figure}[ht]<CR>\centering<CR>\includegraphics{<+++>}<CR>\caption{<++>}<CR>\label{figure:<++>}<CR>\end{figure}<CR>
+tab \begin{table}[ht]<CR>\centering<CR>\includegraphics{<+++>}<CR>\caption{<++>}<CR>\label{table:<++>}<CR>\end{table}<CR>
+caption \caption{<+++>}
+suppressfloats
+# TODO style parameters
+
+# C.9.2 Marginal Notes
+
+# C.10 Lining It Up in Columns
+
+# C.10.1 The tabbing Environment
+ENV tabbing
+
+# C.10.2 The array and tabluar Environments
+
+# C.11 Moving Information Around
+
+# C.11.1 Files
+
+# C.11.2 Cross-References
+BOTH label \label{<+++>}
+ref <BS>~\ref{<+++>} <++>
+pageref <BS>~\pageref{<+++>} <++>
+
+# C.11.3 Bibliography and Citation
+
+bib \bibliography{<+++>}
+#thebibliography
+#bibitem
+cite <BS>~\cite{<+++>} <++>
+nocite \nocite{<+++>}
+
+# C.11.4 Splitting the Input
+input \input{<+++>}
+include \include{<+++>}
+includeonly \includeonly{<+++>}
+ENV filecontents
+listfiles
+
+# C.11.5 Index and Glossary
+ENV theindex
+printindex
+makeindex
+makeglossary
+ind \index{<+++>}
+glo \glossary{<+++>}
+
+# C.11.6 Terminal Input and Output
+typeout \typeout{<+++>}
+typein \typein{<+++>}
+
+# C.12 Line and Page Breaking
+
+# C.12.1 Line Breaking
+
+# C.12.2 Page Breaking
+
+# C.13 Length, Spaces, and Boxes
+
+# C.14 Picture and Color
+
+# C.15 Font Selection
diff --git a/src/tex/mathtools b/src/tex/mathtools
new file mode 100644
index 0000000..ceb3d69
--- /dev/null
+++ b/src/tex/mathtools
@@ -0,0 +1,182 @@
+# QuickTeX keywords for mathtools
+
+# 1 Introduction
+# none
+
+# 2 Package loading
+# none
+
+# 3 Tools for mathematical typesetting
+mathtoolsset \mathtoolsset{<+++>}
+
+# 3.1 Fine-tuning mathematical layout
+
+# 3.1.1 A complement to \smash, \llap, and \rlap
+MATH mathllap \mathllap{<+++>} <++>
+MATH mathclap \mathrlap{<+++>} <++>
+MATH mathrlap \mathclap{<+++>} <++>
+clap \clap{<+++>} <++>
+MATH mathmbox \mathmbox{<+++>} <++>
+MATH mathmakebox \mathmakebox{<+++>} <++>
+
+# 3.1.2 Forcing a cramped style
+MATH cramped \cramped{<+++>} <++>
+MATH crampedllap \crampedllap{<+++>} <++>
+MATH crampedclap \crampedclap{<+++>} <++>
+MATH crampedrlap \crampedrlap{<+++>} <++>
+MATH crampedsubarray \begin{crampedsubarray}{l}<CR><+++><CR>\end{crampedsubarray}
+MATH crampedsubstack \crampedsubstack{<+++>} <++>
+
+# 3.1.3 Smashing an operator
+MATH smashoperator \smashoperator{<+++>} <++>
+
+# 3.1.4 Adjusting limits of operators
+MATH adjustlimits
+
+# 3.1.5 Swapping space above AMS display math environments
+MATH sads \SwapAboveDisplaySkip
+
+# 3.2 Controlling tags
+
+# 3.2.1 The appearance of tags
+MATH newtagform \newtagform{<+++>}[<++>]{<++>}{<++>}
+MATH renewtagform \renewtagform{<+++>}[<++>]{<++>}{<++>}
+MATH usetagform \usetagform{<+++>}
+
+# 3.2.2 Showing only referenced tags
+refeq <BS>~\refeq{<+++>} <++>
+noeqref \noeqref{<+++>}
+
+# 3.3 Extensible symbols
+
+# 3.3.1 Arrow-like symbols
+MATH xleftrightarrow \xleftrightarrow{<+++>}
+MATH xRightarrow \xRightarrow{<+++>}
+MATH xLeftarrow \xLeftarrow{<+++>}
+MATH xLeftrightarrow \xLeftrightarrow{<+++>}
+MATH xhookleftarrow \xhookleftarrow{<+++>}
+MATH xhookrightarrow \xhookrightarrow{<+++>}
+MATH xmapsto \xmapsto{<+++>}
+MATH xrightharpoondown \xrightharpoondown{<+++>}
+MATH xrightharpoonup \xrightharpoonup{<+++>}
+MATH xleftharpoondown \xleftharpoondown{<+++>}
+MATH xleftharpoonup \xleftharpoonup{<+++>}
+MATH xrightleftharpoons \xrightleftharpoons{<+++>}
+MATH xleftrightharpoons \xleftrightharpoons{<+++>}
+MATH xlongrightarrow \xlongrightarrow{<+++>}
+MATH xlongleftarrow \xlongleftarrow{<+++>}
+
+# 3.3.2 Braces and brackets
+MATH underbracket \underbracket{<+++>}_{<++>} <++>
+MATH overbracket \overbracket{<+++>}^{<++>} <++>
+MATH underbrace \underbrace{<+++>}_{<++>} <++>
+MATH overbrace \overbrace{<+++>}^{<++>} <++>
+MATH LaTeXunderbrace \LaTeXunderbrace{<+++>}_{<++>} <++>
+MATH LaTeXoverbrace \LaTeXoverbrace{<+++>}^{<++>} <++>
+
+# 3.4 New mathematical building blocks
+
+# 3.4.1 Matrices
+MATH ENV psmallmatrix
+MATH ENV bsmallmatrix
+MATH ENV Bsmallmatrix
+MATH ENV vsmallmatrix
+MATH ENV Vsmallmatrix
+
+# 3.4.2 The multlined environment
+MATH ENV multlined
+
+# 3.4.3 More cases-like environments
+MATH ENV dcases
+MATH ENV rcases
+MATH ENV drcases
+
+# 3.4.4 Emulating indented lines in alignments
+MATH MoveEqLeft
+
+# 3.4.5 Boxing a single line in an alignment
+MATH Aboxed \Aboxed{<+++>} <++>
+
+# 3.4.6 Adding arrows between lines in an alignment
+MATH ArrowBetweenLines
+
+# 3.4.7 Centered \vdots
+MATH vdotswithin \vdotswithin{<+++>} <++>
+MATH shortvdotswithin \shortvdotswithin{<+++>} <++>
+MATH MTFlushSpaceAbove
+MATH MTFlushSpaceBelow
+
+# 3.5 Intertext and short intertext
+MATH sitext \shortintertext{<+++>}
+
+# 3.6 Paired delimiters
+dpd \DeclarePairedDelimiter{<+++>}{<++>}{<++>}
+dpdx \DeclarePairedDelimiterX{<+++>}[<++>]{<++>}{<++>}{<++>}
+MATH delimsize
+dpdxpp \DeclarePairedDelimiterXPP{<+++>}[<++>]{<++>}{<++>}{<++>}{<++>}{<++>}
+
+# 3.6.1 Expert use
+# TODO
+
+# 3.7 Special symbols
+
+# 3.7.1 Left and right parentheses
+MATH lparen
+MATH rparen
+
+# 3.7.2 Vertically centered colon
+MATH vcentcolon
+MATH ordinarycolon
+
+# 3.7.3 Some extra symbols involving vertically centered colon
+MATH dblcolon
+MATH coloneq
+MATH Coloneq
+MATH eqcolon
+MATH Eqcolon
+MATH colonapprox
+MATH Colonapprox
+MATH approxcolon
+MATH Approxcolon
+MATH colonsim
+MATH Colonsim
+MATH simcolon
+MATH Simcolon
+MATH colondash
+MATH Colondash
+MATH dashcolon
+MATH Dashcolon
+
+# 3.7.4 A few additional symbols
+MATH nuparrow
+MATH ndownarrow
+MATH bigtimes
+
+# 4 A tribute to Michael J. Downes
+
+# 4.1 Mathematics within italic text
+# none
+
+# 4.2 Left sub/superscripts
+MATH prescript \prescript{<+++>}{<++>}{<++>} <++>
+
+# 4.3 Declaring math sizes
+# none
+
+# 4.4 Spreading equations
+MATH spreadlines \begin{spreadlines}{<+++>pt}<CR><++><CR>\end{spreadlines}
+
+# 4.5 Gathered environments
+MATH ENV lgathered
+MATH ENV rgathered
+newgathered \newgathered{<+++>}{<++>}{<++>}{<++>}
+renewgathered \renewgathered{<+++>}{<++>}{<++>}{<++>}
+
+# 4.6 Split fractions
+MATH splitfrac \splitfrac{<+++>}{<++>} <++>
+MATH splitdfrac \splitdfrac{<+++>}{<++>} <++>
+
+# 5 New additions
+
+# 5.1 Variable math strut
+MATH xmathstrut \xmathstrut{<+++>} <++>
diff --git a/src/tex/misc b/src/tex/misc
new file mode 100644
index 0000000..afc72d0
--- /dev/null
+++ b/src/tex/misc
@@ -0,0 +1,89 @@
+# QuickTeX keywords
+
+BOTH cmd <ESC>bi\<ESC>ea{<+++>}
+BOTH env <ESC>Bvedi\begin{<ESC>pa}<CR><+++><CR>\end{<ESC>pa}
+
+MATH to \to <+++>
+MATH qu \quad <+++>
+MATH qq \qquad <+++>
+
+MATH inv <BS>^{-1} <+++>
+MATH sq <BS>^2 <+++>
+MATH st <BS>^* <+++>
+MATH adj <BS>^\dagger <+++>
+MATH tp <BS>^\top <+++>
+
+MATH one <BS>_1 <+++>
+MATH two <BS>_2 <+++>
+
+MATH pair (<+++>,<++>) <++>
+
+# type m in math mode without expansion into $ $
+MATH mm m
+
+MATH rec \frac{1}{<+++>} <++>
+MATH of <BS>(<+++>) <++>
+MATH mo <+++> : <++> \to <++>
+MATH der \frac{d<+++>}{d<++>} <++>
+MATH par \frac{\partial <+++>}{\partial <++>} <++>
+MATH abb <+++> : <++> \longrightarrow <++>, \qquad <++> \longmapsto <++>
+
+MATH cal <BS><ESC>i\mathcal{<ESC>ea}
+
+MATH im img
+MATH id
+
+MATH NN \NN <+++>
+MATH ZZ \ZZ <+++>
+MATH QQ \QQ <+++>
+MATH RR \RR <+++>
+MATH CC \CC <+++>
+MATH HH \HH <+++>
+MATH FF \FF <+++>
+MATH KK \KK <+++>
+MATH TT \TT <+++>
+
+ENV2 def definition
+ENV2 lem lemma
+ENV2 cor corollary
+ENV2 thm theorem
+ENV prf myproof
+ENV2 exm example
+ENV2 obs observation
+ENV2 rem remark
+ENV2 prp proposition
+ENV2 pri principle
+ENV2 exe exercise
+
+MATH parens \parens{<+++>} <++>
+MATH bracks \bracks{<+++>} <++>
+MATH braces \braces{<+++>} <++>
+MATH angles \angles{<+++>} <++>
+MATH floor \floor{<+++>} <++>
+MATH ceil \ceil{<+++>} <++>
+MATH abs \abs{<+++>} <++>
+MATH norm \norm{<+++>} <++>
+
+MATH set \set{<+++>} <++>
+MATH Set \Set{<+++>} <++>
+MATH gi given
+
+MATH ip \innerp{<+++>}{<++>} <++>
+MATH hilb \hilb{<+++>} <++>
+
+MATH bra \bra{<+++>} <++>
+MATH ket \ket{<+++>} <++>
+MATH braket \braket{<+++>}{<++>}{<++>} <++>
+
+dh d.\,h.\ <+++>
+ie i.\,e.\ <+++>
+ia i.\,A.\ <+++>
+gdw g.\,d.\,w.\ <+++>
+obda o.\,B.\,d.\,A. <+++>
+wlog w.\,l.\,o.\,g.\ <+++>
+
+link \link{<+++>} <++>
+
+bf \textbf{<+++>} <++>
+
+defn \defn{<+++>} <++>
diff --git a/src/tex/ngerman b/src/tex/ngerman
new file mode 100644
index 0000000..cedbf09
--- /dev/null
+++ b/src/tex/ngerman
@@ -0,0 +1,3 @@
+# QuickTeX keywords for the ngerman package
+
+az "`<+++>"' <++>
diff --git a/src/tex/plaintex b/src/tex/plaintex
new file mode 100644
index 0000000..5f6842f
--- /dev/null
+++ b/src/tex/plaintex
@@ -0,0 +1,3 @@
+# QuickTeX keywords for plain TeX
+
+BOTH quad
diff --git a/src/tex/siunitx b/src/tex/siunitx
new file mode 100644
index 0000000..bf1e7e2
--- /dev/null
+++ b/src/tex/siunitx
@@ -0,0 +1,16 @@
+# QuickTeX keywords for siunitx
+
+BOTH SI \SI{<+++>}{<++>} <++>
+BOTH num \num{<+++>} <++>
+BOTH ang \ang{<+++>} <++>
+
+MATH nano \nano
+MATH micro \micro
+MATH milli \milli
+MATH kilo \kilo
+MATH mega \mega
+MATH giga \giga
+MATH tera \tera
+
+MATH meter \meter
+MATH hertz \hertz
diff --git a/src/tex/tikzcd b/src/tex/tikzcd
new file mode 100644
index 0000000..719df06
--- /dev/null
+++ b/src/tex/tikzcd
@@ -0,0 +1,5 @@
+# QuickTeX keywords for tikz-cd
+
+MATH ENV tcd tikzcd
+
+MATH ar \ar[<+++>,"<++>"] <++>