How to autocomplete Latex environment?

I am sorry if this has been asked before but I cannot find anything related. I tried reading through the docs but the documentation for hooks are very lacking.

I work with Latex and I would to autocomplete environment. I’d like Kakoune to do the following, when I type,

\begin{itemize

and press }, kakoune should execute the flowing <esc>Xypllwcend<esc>O that does the following

  • <esc> go to normal mode
  • X select the entire line, y copy it and p put it below.
  • ll to move to the first letter of begin on the pasted line.
  • ‘w’ to select begin, c to replace and get to edit mode, and put end
  • <esc> to go to normal mode and enter edit mode on the above line.

This has become routine and I do it continuously everyday. Can this be automated for adding any environment not just itemize? If so, please tell me how? Thank you.

hook global InsertChar '\}' %{
  try %{
    evaluate-commands -draft %{
      # match your criteria
    }
    # if passing, execute your commands
  }
}

You can add static_words for completion:

set-option global static_words itemize1 itemize2

I use kakoune snippets for this usecase.
The latex snippet which triggers on \begin would solve your problem.
Have a look at kakoune snippets collection

It seems that development of snippet plugin stopped. Are there an active fork or any plans on making one?

I’m not sure that development has stopped. It is true that there has not been any activity for a while, but there are not a lot of open pull requests or something.
I think occivink just does not have the time to work on it.

For myself, the plugin is still working fine, so I also do not feel the need to work on it.

Can you give the entire thing that I can paste in my kakrc? I don’t known kak’s script. Thanks.

hook global InsertChar '\}' %{
  try %{
    execute-keys -draft "<esc>x<a-k>\\begin\{\w+\}<ret>"
    execute-keys "<esc>Xypllwcend<esc>O"
  }
}

Thank you. This worked. What does <esc>x<a-k> do? Also, how to limit this to only tex files?

It selects the line and keeps the selection if it matches the regex \\begin\{\w+\}. If not, it drops this selection. If it is the only selection, it throws an error and the next command in this try block is not executed.

This page might be helpful:
https://delapouite.github.io/kakoune-explain/#<esc>x<a-k>\\begin\{\w%2B\}<ret>

hook global WinSetOption filetype=latex %{
  hook buffer InsertChar '\}' %{
    try %{
      execute-keys -draft "<esc>x<a-k>\\begin\{\w+\}<ret>"
      execute-keys "<esc>Xypllwcend<esc>O"
    }
  }
}

For the snippets, I updated my implementation. They rely on the filesystem and trigger in a matching pair, similarly to typed expansions.

There is currently support for Crystal, HTML, JavaScript, Kakoune, Markdown and sh.

I think I mentioned in one issue that I’m not particularly happy with the complexity of the plugin, and I haven’t integrated it nicely in my workflow so it is indeed stalled. I’m currently thinking back to a simpler state (see the trimmed branch) but I also understand that people rely on features. If somebody wants to keep a fork of the current state, go ahead.

Relying on an option to store the snippets make implementation harder I think, for escaping, to update the triggers on option change, handle aliases, to have both the current filetype and global snippets or compose with multiple user contributed snippets. Using the filesystem abstracts the complexity of the data structure, we just have to check if the snippet file exists in one of the directory locations; if we want auto-generate, alias or reuse certain snippets for other languages, it is just a file or a symbolic link.

Can I ask why not to support existing and widespread, understood by most editors and tools like LSP, snippet placeholder syntax?

I do not know about the full syntax. I’m not opposed to support it.

1 Like

Here’s the grammar for snippets as defined in Language Server Protocol. It is compatible with TextMate snippets, and mostly compatible with Vim UltiSnips, Emacs Yasnippet, fully supported by VSCode, has partial support by Atom, Kate, Gedit: https://github.com/microsoft/language-server-protocol/blob/master/snippetSyntax.md#grammar

It looks complicated.

because it is versatile. Placeholder design is simple, but not easy.

Hi SegFault, these snippets are provided by MacTex which also has a unix version. There is quite a few so have a look and transform the ones you regularly use on that daily basis.

The collaboration between occivink and andreyorst has worked for me when using/creating snippets.

Summary

%!TEX encoding = UTF-8 Unicode
\dxcx:=(\Xi)
\xcx:=\Xi
\dxx:=(\xi)
\xx:=\xi
\dxcu:=(\Upsilon)
\xcu:=\Upsilon
\dxu:=(\upsilon)
\xu:=\upsilon
\dxvth:=(\vartheta)
\xvth:=\vartheta
\dxcth:=(\Theta)
\xcth:=\Theta
\dxth:=(\theta)
\xth:=\theta
\dxt:=(\tau)
\xt:=\tau
\dxvr:=(\varrho)
\xvr:=\varrho
\dxr:=(\rho)
\xr:=\rho
\mnorm:=\mathnormal{#INS#•#INS#}
\mathnormal{#INS#•#INS#}
\mit:=\mathit{#INS#•#INS#}
\mathit{#INS#•#INS#}
\mtt:=\mathtt{#INS#•#INS#}
\mathtt{#INS#•#INS#}
\msf:=\mathsf{#INS#•#INS#}
\mathsf{#INS#•#INS#}
\mcal:=\mathcal{#INS#•#INS#}
\mathcal{#INS#•#INS#}
\mrm:=\mathrm{#INS#•#INS#}
\mathrm{#INS#•#INS#}
\mbf:=\mathbf{#INS#•#INS#}
\mathbf{#INS#•#INS#}
\rule[#INS#•‹lift›#INS#]{•‹width›}{•‹height›}
\rule{#INS#•‹width›#INS#}{•‹height›}
\pbox{#INS#•‹width›#INS#}{•‹contents›}
\pboxooo:=\parbox[#INS#•‹position(c,t,b)›#INS#][•‹height›][•‹inner-position›]{•‹width›}{•‹contents›}
\pboxoo:=\parbox[#INS#•‹position(c,t,b)›#INS#][•‹height›]{•‹width›}{•‹contents›}
\pboxo:=\parbox[#INS#•‹position(c,t,b)›#INS#]{•‹width›}{•‹contents›}
\parbox[#INS#•‹position(c,t,b)›#INS#][•‹height›][•‹inner-position›]{•‹width›}{•‹contents›}
\parbox[#INS#•‹position(c,t,b)›#INS#][•‹height›]{•‹width›}{•‹contents›}
\parbox[#INS#•‹position(c,t,b)›#INS#]{•‹height›}{•‹contents›}
\pbox:=\parbox{#INS#•‹width›#INS#}{•‹contents›}
\parbox{#INS#•‹width›#INS#}{•‹contents›}
\rboxoo:=\raisebox{#INS#•#INS#}[•][•]{•}
\rboxo:=\raisebox{#INS#•#INS#}[•]{•}
\rbox:=\raisebox{#INS#•#INS#}{•}
\raisebox{#INS#•#INS#}[•][•]{•}
\raisebox{#INS#•#INS#}[•]{•}
\raisebox{#INS#•#INS#}{•}
\fboxsep{#INS#•#INS#}
\fboxrule{#INS#•#INS#}
\fboxoo:=\framebox[#INS#•#INS#][•]{•}
\framebox[#INS#•#INS#][•]{•}
\fboxo:=\framebox[#INS#•#INS#]{•}
\framebox[#INS#•#INS#]{•}
\fbox{#INS#•#INS#}
\mboxoo:=\makebox[#INS#•‹width›#INS#][•‹l,r,c(default)›]{•}
\makebox[#INS#•‹width›#INS#][•‹l,r,c(default)›]{•}
\mboxo:=\makebox[#INS#•‹width›#INS#]{•}
\makebox[#INS#•‹width›#INS#]{•}
\mbox{#INS#•#INS#}
\setlength{#INS#•#INS#}{•}
\adc:=\addtocounter{#INS#•#INS#}{•}
\addtocounter{#INS#•#INS#}{•}
\adl:=\addtolength{#INS#•#INS#}{•}
\addtolength{#INS#•#INS#}{•}
\texs:=\TeX\
\TeX\
\tex:=\TeX
\TeX
\latexes:=\LaTeXe\
\LaTeXe\
\latexe:=\LaTeXe
\LaTeXe
\latexs:=\LaTeX\
\LaTeX\
\latex:=\LaTeX
\LaTeX
{verse}#RET##INS#•#INS##RET#\end{verse}•
{verbatim}#RET##INS#•#INS##RET#\end{verbatim}•
{varwidth}{#INS#•#INS#}#RET#•#RET#\end{varwidth}•
{trivlist}#RET##INS#•#INS##RET#\end{trivlist}•
{titlepage}#RET##INS#•#INS##RET#\end{titlepage}•
{theorem}#RET##INS#•#INS##RET#\end{theorem}•
{theindex}#RET##INS#•#INS##RET#\end{theindex}•
{thebibliography}#RET##INS#•#INS##RET#\end{thebibliography}•
{tabbing}#RET##INS#•#INS##RET#\end{tabbing}•
{table*}[#INS#•#INS#]#RET#•#RET#\end{table*}•
{table*}#RET##INS#•#INS##RET#\end{table*}•
{table}[#INS#•#INS#]#RET#•#RET#\end{table}•
{table}#RET##INS#•#INS##RET#\end{table}•
{tabularx}{#INS#•#INS#}{•}#RET#•#RET#\end{tabularx}•
{tabular*}{#INS#•#INS#}{•}#RET#•#RET#\end{tabular*}•
{tabular}{#INS#•#INS#}#RET#•#RET#\end{tabular}•
{subequations}#RET##INS#•#INS##RET#\end{subequations}•
{split}#RET##INS#•#INS##RET#\end{split}•
{quote}#RET##INS#•#INS##RET#\end{quote}•
{quotation}#RET##INS#•#INS##RET#\end{quotation}•
{pmatrix}#RET##INS#•#INS##RET#\end{pmatrix}•
{picture}#RET##INS#•#INS##RET#\end{picture}•
{multline*}#RET##INS#•#INS##RET#\end{multline*}•
{multline}#RET##INS#•#INS##RET#\end{multline}•
{minipage}[#INS#•‹t,b,c(default)›#INS#]{•‹width›}#RET#•#RET#\end{minipage}•
{minipage}{#INS#•‹width›#INS#}#RET#•#RET#\end{minipage}•
{list}{#INS#•#INS#}{•}#RET#\item#RET#•#RET#\end{list}•
{letter}{#INS#•#INS#}#RET#•#RET#\end{letter}•
{itemize}[#INS#•#INS#]#RET#\item#RET#•#RET#\end{itemize}•
{itemize}#RET#\item#RET##INS#•#INS##RET#\end{itemize}•
{gathered}[#INS#•#INS#]#RET#•#RET#\end{gathered}•
{gathered}#RET##INS#•#INS##RET#\end{gathered}•
{gather*}#RET##INS#•#INS##RET#\end{gather*}•
{gather}#RET##INS#•#INS##RET#\end{gather}•
{frame}[#INS#•#INS#]#RET#\frametitle{•}#RET#•#RET#\end{frame}•
{frame}#RET#\frametitle{#INS#•#INS#}#RET#•#RET#\end{frame}•
{flushright}#RET##INS#•#INS##RET#\end{flushright}•
{flushleft}#RET##INS#•#INS##RET#\end{flushleft}•
{flalign*}#RET##INS#•#INS##RET#\end{flalign*}•
{flalign}#RET##INS#•#INS##RET#\end{flalign}•
{figure}[#INS#•#INS#]#RET#•#RET#\end{figure}•
{figure}#RET##INS#•#INS##RET#\end{figure}•
{eqnarray*}#RET##INS#•#INS##RET#\end{eqnarray*}•
{eqnarray}#RET##INS#•#INS##RET#\end{eqnarray}•
{equation}#RET##INS#•#INS##RET#\end{equation}•
{enumerate}[#INS#•‹1, i, I, a, A, {} escape›#INS#]#RET#\item#RET#•#RET#\end{enumerate}•
{enumerate}#RET#\item#RET##INS#•#INS##RET#\end{enumerate}•
{description}#RET#\item[#INS#•#INS#]#RET#•#RET#\end{description}•
{center}#RET##INS#•#INS##RET#\end{center}•
{cases}#RET##INS#•#INS##RET#\end{cases}•
{compactitem}[#INS#•#INS#]#RET#\item#RET#•#RET#\end{compactitem}•
{compactitem}#RET#\item#RET##INS#•#INS##RET#\end{compactitem}•
{compactenum}[#INS#•#INS#]#RET#\item#RET#•#RET#\end{compactenum}•
{compactenum}#RET#\item#RET##INS#•#INS##RET#\end{compactenum}•
{wrapfigure}[#INS#•‹# of narrow lines›#INS#]{•‹placement: r,R,l,L,i,I,o,O›}[•‹overhang›]{•‹width›}#RET#•#RET#\end{wrapfigure}•
{wrapfigure}{#INS#•‹placement: r,R,l,L,i,I,o,O›#INS#}[•‹overhang›]{•‹width›}#RET#•#RET#\end{wrapfigure}•
{wrapfigure}[#INS#•‹# of narrow lines›#INS#]{•‹placement: r,R,l,L,i,I,o,O›}{•‹width›}#RET#•#RET#\end{wrapfigure}•
{wrapfigure}{#INS#•‹placement: r,R,l,L,i,I,o,O›#INS#}{•‹width›}#RET#•#RET#\end{wrapfigure}•
{bmatrix}#RET##INS#•#INS##RET#\end{bmatrix}•
{appendix}#RET##INS#•#INS##RET#\end{appendix}•
{alignedat}{#INS#•#INS#}#RET#•#RET#\end{alignedat}•
{aligned}[#INS#•#INS#]#RET#•#RET#\end{aligned}•
{aligned}#RET##INS#•#INS##RET#\end{aligned}•
{alignat*}{#INS#•#INS#}#RET#•#RET#\end{alignat*}•
{alignat}{#INS#•#INS#}#RET#•#RET#\end{alignat}•
{align*}#RET##INS#•#INS##RET#\end{align*}•
{align}#RET##INS#•#INS##RET#\end{align}•
{abstract}#RET##INS#•#INS##RET#\end{abstract}•
{array}#RET##INS#•#INS##RET#\end{array}•
\dxz:=(\zeta)
\xz:=\zeta
\vspace*{#INS#•#INS#}#RET#
\vspace{#INS#•#INS#}#RET#
\vskip
\vdots
\verb"#INS#•#INS#"
\verb|#INS#•#INS#|
\url{#INS#•#INS#}
\usepackage[#INS#•#INS#]{•}#RET#
\usepackage{#INS#•#INS#}#RET#
\upshape
\ttfamily
\tilde:=\textasciitilde
\title{#INS#•#INS#}#RET#
\thanks{#INS#•#INS#}#RET#
\thispagestyle{#INS#•#INS#}
\tpgs:=\thispagestyle{#INS#•#INS#}
\tableofcontents#RET#
\toc:=\tableofcontents#RET#
\toprule#RET#
\headwidth
\textwidth
\up:=\textup{#INS#•#INS#}
\textup{#INS#•#INS#}
\textit{#INS#•#INS#}
\textsl{#INS#•#INS#}
\textsc{#INS#•#INS#}
\textsf{#INS#•#INS#}
\tw:=\textwidth
\tt:=\texttt{#INS#•#INS#}
\texttt{#INS#•#INS#}
\textbf{#INS#•#INS#}
\text{#INS#•#INS#}
\dxvs:=(\varsigma)
\xvs:=\varsigma
\dxcs:=(\Sigma)
\xcs:=\Sigma
\dxs:=(\sigma)
\xs:=\sigma
\scriptsize
\ssk:=\smallskip#RET#
\smallskip#RET#
\sqrto:=\sqrt[#INS#•#INS#]{•}
\sqrt:=\sqrt{#INS#•#INS#}
\sparo:=\subparagraph[#INS#•#INS#]{•}
\subparagraph[#INS#•#INS#]{•}
\spars:=\subparagraph*{#INS#•#INS#}
\subparagraph*{#INS#•#INS#}
\spar:=\subparagraph{#INS#•#INS#}
\subparagraph{#INS#•#INS#}
\ssseco:=\subsubsection[#INS#•#INS#][•]#RET#
\subsubsection[#INS#•#INS#][•]#RET#
\sssecs:=\subsubsection*{#INS#•#INS#}#RET#
\subsubsection*{#INS#•#INS#}#RET#
\sssec:=\subsubsection{#INS#•#INS#}#RET#
\subsubsection{#INS#•#INS#}#RET#
\sseco:=\subsection[#INS#•#INS#]{•}#RET#
\subsection[#INS#•#INS#]{•}#RET#
\ssecs:=\subsection*{#INS#•#INS#}#RET#
\subsection*{#INS#•#INS#}#RET#
\ssec:=\subsection{#INS#•#INS#}#RET#
\subsection{#INS#•#INS#}#RET#
\section[#INS#•#INS#]{•}#RET#
\section*{#INS#•#INS#}#RET#
\section{#INS#•#INS#}#RET#
\slshape
\sl:=\textsl{#INS#•#INS#}
\sffamily
\sf:=\textsf{#INS#•#INS#}
\scshape
\sc:=\textsc{#INS#•#INS#}
\rmfamily
\rm:=\textrm{#INS#•#INS#}
\renewcommand{#INS#•#INS#}[•][•]{•}#RET#
\renewcommand{#INS#•#INS#}[•]{•}#RET#
\renewcommand{#INS#•#INS#}{•}#RET#
\ref{#INS#•#INS#}
\pagebreak#RET#
\par
\pagestyle{#INS#•#INS#}#RET#
\paragraph[#INS#•#INS#]{•}#RET#
\paragraph*{#INS#•#INS#}#RET#
\paragraph{#INS#•#INS#}#RET#
\pageref{#INS#•#INS#}
\dxcps:=(\Psi)
\xcps:=\Psi
\dxps:=(\psi)
\xps:=\psi
\dxvph:=(\varphi)
\xvph:=\varphi
\dxcph:=(\Phi)
\xcph:=\Phi
\dxph:=(\phi)
\xph:=\phi
\dxvp:=(\varpi)
\xvp:=\varpi
\dxcp:=(\Pi)
\xcp:=\Pi
\dxp:=(\pi)
\xp:=\pi
\dxco:=(\Omega)
\xco:=\Omega
\dxo:=(\omega)
\xo:=\omega
\normalsize
\nocite{#INS#•#INS#}
\noindent
\newtheorem{#INS#•#INS#}[•]{•}#RET#
\newtheorem{#INS#•#INS#}{•}[•]#RET#
\newtheorem{#INS#•#INS#}{•}#RET#
\newline#RET#
\newcolumntype{#INS#•#INS#}{•}
\newenvironment{#INS#•#INS#}[•][•]{•}{•}#RET#
\newenvironment{#INS#•#INS#}{•}{•}#RET#
\newlength{#INS#•#INS#}#RET#
\npg:=\newpage#RET#
\newpage#RET#
\newcommand{#INS#•#INS#}[•][•]{•}#RET#
\newcommand{#INS#•#INS#}[•]{•}#RET#
\newcommand{#INS#•#INS#}{•}#RET#
\ncol:= &
\multicolumn{#INS#•‹# of cols›#INS#}{•‹col spec›}{•‹contents›}
\midrule#RET#
\msk:=\medskip
\medskip#RET#
\mdseries
\mpar:=\marginpar{#INS#•#INS#}
\marginpar{#INS#•#INS#}
\listoftables#RET#
\listoffigures#RET#
\listt:=\listoftables#RET#
\listf:=\listoffigures#RET#
\lettrine[#INS#•‹see the lettrine manual for options›#INS#]{•‹drop letter›}{•‹rest of paragraph›}
\lettrine{#INS#•‹letter›#INS#}{•‹rest of paragraph›}
\ldots
\Large
\large
\lbl:=\label{#INS#•#INS#}
\label{#INS#•#INS#}
\intertext{#INS#•#INS#}
\itshape
\it:=\textit{#INS#•#INS#}
\input
\indent
\includegraphics[#INS#•#INS#]{•}#RET#
\includegraphics{#INS#•#INS#}#RET#
\include{#INS#•#INS#}#RET#
\item[#INS#•#INS#]#RET#•
\item#RET##INS#•#INS#
\hspace*{#INS#•#INS#}
\hspace{#INS#•#INS#}
\href{#INS#•‹URL›#INS#}{•‹words in doc›}
\hskip
\hline#RET#
\dxn:=(\nu)
\xn:=\nu
\dxm:=(\mu)
\xm:=\mu
\dxcl:=(\Lambda)
\xcl:=\Lambda
\dxl:=(\lambda)
\xl:=\lambda
\dxio:=(\iota)
\xio:=\iota
\dxcg:=(\Gamma)
\xcg:=\Gamma
\dxg:=(\gamma)
\xg:=\gamma
\geometry{#INS#•#INS#}
\frac{#INS#•#INS#}{•}
\footnotesize
\footnote{#INS#•#INS#}
\eqref{#INS#•#INS#}
\end{#INS#•#INS#}#RET#
\dxet:=(\eta)
\xet:=\eta
\dxve:=(\varepsilon)
\xve:=\varepsilon
\dxeps:=(\epsilon)
\xeps:=\epsilon
\emph{#INS#•#INS#}
\dotso
\dotsi
\dotsm
\dotsb
\dotsc
\dots
\documentclass[#INS#•#INS#]{•}#RET#
\documentclass{#INS#•#INS#}#RET#
\dxcd:=(\Delta)
\xcd:=\Delta
\dxd:=(\delta)
\xd:=\delta
\ddddot{#INS#•#INS#}
\dddot{#INS#•#INS#}
\ddot{#INS#•#INS#}
\ddots
\dd:=( #INS# )•
\date{#INS#•#INS#}#RET#
\cmidrule#INS#•#INS#{•}
\cmidrule(#INS#•#INS#){•}
\cline{#INS#•#INS#}
\cdots
\caption{#INS#•#INS#}#RET#
\citet{#INS#•#INS#}
\citep{#INS#•#INS#}
\cite{#INS#•#INS#}
\chapter{#INS#•#INS#}
\centering
\dxch:=(\chi)
\xch:=\chi
\boxed{#INS#•#INS#}
\bottomrule#RET#
\bsk:=\bigskip
\bigskip#RET#
\bibitem[#INS#•#INS#]{•}#RET#•
\bibitem{#INS#•#INS#}#RET#•
\bwrapoo:=\begin{wrapfigure}[#INS#•‹# of narrow lines›#INS#]{•‹placement: r,R,l,L,i,I,o,O›}[•‹overhang›]{•‹width›}#RET#•#RET#\end{wrapfigure}•
\bwrapo2:=\begin{wrapfigure}{#INS#•‹placement: r,R,l,L,i,I,o,O›#INS#}[•‹overhang›]{•‹width›}#RET#•#RET#\end{wrapfigure}•
\bwrapo:=\begin{wrapfigure}[#INS#•‹# of narrow lines›#INS#]{•‹placement: r,R,l,L,i,I,o,O›}{•‹width›}#RET#•#RET#\end{wrapfigure}•
\bwrap:=\begin{wrapfigure}{#INS#•‹placement: r,R,l,L,i,I,o,O›#INS#}{•‹width›}#RET#•#RET#\end{wrapfigure}•
\bvers:=\begin{verse}#RET##INS#•#INS##RET#\end{verse}•
\bverb:=\begin{verbatim}#RET##INS#•#INS##RET#\end{verbatim}•
\bvarw:=\begin{varwidth}{#INS#•#INS#}#RET#•#RET#\end{varwidth}•
\btrivl:=\begin{trivlist}#RET##INS#•#INS##RET#\end{trivlist}•
\btitpg:=\begin{titlepage}#RET##INS#•#INS##RET#\end{titlepage}•
\btheo:=\begin{theorem}#RET##INS#•#INS##RET#\end{theorem}•
\bindex:=\begin{theindex}#RET##INS#•#INS##RET#\end{theindex}•
\bbib:=\begin{thebibliography}{#INS#•#INS#}#RET#\bibitem{•}#RET#•#RET#\end{thebibliography}•
\btabb:=\begin{tabbing}#RET##INS#•#INS##RET#\end{tabbing}•
\btblso:=\begin{table*}[#INS#•#INS#]#RET#•#RET#\end{table*}•
\btbls:=\begin{table*}#RET##INS#•#INS##RET#\end{table*}•
\btblo:=\begin{table}[#INS#•#INS#]#RET#•#RET#\end{table}•
\btbl:=\begin{table}#RET##INS#•#INS##RET#\end{table}•
\btablso:=\begin{table*}[#INS#•#INS#]#RET#•#RET#\end{table*}•
\btabls:=\begin{table*}#RET##INS#•#INS##RET#\end{table*}•
\btablo:=\begin{table}[#INS#•#INS#]#RET#•#RET#\end{table}•
\btabl:=\begin{table}#RET##INS#•#INS##RET#\end{table}•
\btabx:=\begin{tabularx}{#INS#•#INS#}{•}#RET#•#RET#\end{tabularx}•
\btabs:=\begin{tabular*}{#INS#•#INS#}{•}#RET#•#RET#\end{tabular*}•
\btab:=\begin{tabular}{#INS#•#INS#}#RET#•#RET#\end{tabular}•
\bsubeq:=\begin{subequations}#RET##INS#•#INS##RET#\end{subequations}•
\bsplit:=\begin{split}#RET##INS#•#INS##RET#\end{split}•
\bquo:=\begin{quote}#RET##INS#•#INS##RET#\end{quote}•
\bquot:=\begin{quotation}#RET##INS#•#INS##RET#\end{quotation}•
\bpmat:=\begin{pmatrix}#RET##INS#•#INS##RET#\end{pmatrix}•
\bpict:=\begin{picture}#RET##INS#•#INS##RET#\end{picture}•
\bmults:=\begin{multline*}#RET##INS#•#INS##RET#\end{multline*}•
\bmult:=\begin{multline}#RET##INS#•#INS##RET#\end{multline}•
\bminpo:=\begin{minipage}[#INS#•‹t,b,c(default)›#INS#]{•‹width›}#RET#•#RET#\end{minipage}•
\bminp:=\begin{minipage}{#INS#•‹width›#INS#}#RET#•#RET#\end{minipage}•
\blist:=\begin{list}{#INS#•#INS#}{•}#RET#\item#RET#•#RET#\end{list}•
\blett:=\begin{letter}{#INS#•#INS#}#RET#•#RET#\end{letter}•
\bibstyle:=\bibliographystyle{#INS#•#INS#}
\bibliography{#INS#•#INS#}
\biteo:=\begin{itemize}[#INS#•#INS#]#RET#\item#RET#•#RET#\end{itemize}•
\bite:=\begin{itemize}#RET#\item#RET##INS#•#INS##RET#\end{itemize}•
\bgathedo:=\begin{gathered}[#INS#•#INS#]#RET#•#RET#\end{gathered}•
\bgathed:=\begin{gathered}#RET##INS#•#INS##RET#\end{gathered}•
\bgaths:=\begin{gather*}#RET##INS#•#INS##RET#\end{gather*}•
\bgath:=\begin{gather}#RET##INS#•#INS##RET#\end{gather}•
\bframeo:=\begin{frame}[#INS#•#INS#]#RET#\frametitle{•}#RET#•#RET#\end{frame}•
\bframe:=\begin{frame}#RET#\frametitle{#INS#•#INS#}#RET#•#RET#\end{frame}•
\bflr:=\begin{flushright}#RET##INS#•#INS##RET#\end{flushright}•
\bfll:=\begin{flushleft}#RET##INS#•#INS##RET#\end{flushleft}•
\bflaligs:=\begin{flalign*}#RET##INS#•#INS##RET#\end{flalign*}•
\bflalig:=\begin{flalign}#RET##INS#•#INS##RET#\end{flalign}•
\bfigo:=\begin{figure}[#INS#•#INS#]#RET#•#RET#\end{figure}•
\bfig:=\begin{figure}#RET##INS#•#INS##RET#\end{figure}•
\beqns:=\begin{eqnarray*}#RET##INS#•#INS##RET#\end{eqnarray*}•
\beqn:=\begin{eqnarray}#RET##INS#•#INS##RET#\end{eqnarray}•
\bequs:=\begin{equation*}#RET##INS#•#INS##RET#\end{equation*}•
\bequ:=\begin{equation}#RET##INS#•#INS##RET#\end{equation}•
\benuo:=\begin{enumerate}[#INS#•‹1, i, I, a, A, {} to escape›#INS#]#RET#\item#RET#•#RET#\end{enumerate}•
\benu:=\begin{enumerate}#RET#\item#RET##INS#•#INS##RET#\end{enumerate}•
\bdes:=\begin{description}#RET#\item[#INS#•#INS#]#RET#•#RET#\end{description}•
\bcitemo:=\begin{compactitem}[#INS#•#INS#]#RET#\item#RET#•#RET#\end{compactitem}•
\bcitem:=\begin{compactitem}#RET#\item#RET##INS#•#INS##RET#\end{compactitem}•
\bcenumo:=\begin{compactenum}[#INS#•#INS#]#RET#\item#RET#•#RET#\end{compactenum}•
\bcenum:=\begin{compactenum}#RET#\item#RET##INS#•#INS##RET#\end{compactenum}•
\bcent:=\begin{center}#RET##INS#•#INS##RET#\end{center}•
\bcase:=\begin{cases}#RET##INS#•#INS##RET#\end{cases}•
\bbmat:=\begin{bmatrix}#RET##INS#•#INS##RET#\end{bmatrix}•
\bapp:=\begin{appendix}#RET##INS#•#INS##RET#\end{appendix}•
\baliedato:=\begin{alignedat}[#INS#•#INS#]#RET#•#RET#\end{alignedat}•
\baliedat:=\begin{alignedat}#RET##INS#•#INS##RET#\end{alignedat}•
\balied:=\begin{aligned}{#INS#•#INS#}#RET#•#RET#\end{aligned}•
\baliats:=\begin{alignat*}{#INS#•#INS#}#RET#•#RET#\end{alignat*}•
\baliat:=\begin{alignat}{#INS#•#INS#}#RET#•#RET#\end{alignat}•
\balis:=\begin{align*}#RET##INS#•#INS##RET#\end{align*}•
\bali:=\begin{align}#RET##INS#•#INS##RET#\end{align}•
\babs:=\begin{abstract}#RET##INS#•#INS##RET#\end{abstract}•
\bfseries
\bf:=\textbf{#INS#•#INS#}
\dxb:=(\beta)
\xb:=\beta
\author{#INS#•#INS#}#RET#
\dxa:=(\alpha)
\xa:=\alpha
\begin{
xcx:=\Xi
xx:=\xi
xcu:=\Upsilon
xu:=\upsilon
xvth:=\vartheta
xcth:=\Theta
xth:=\theta
xt:=\tau
xvr:=\varrho
xr:=\rho
xz:=\zeta
xvs:=\varsigma
xcs:=\Sigma
xs:=\sigma
xcps:=\Psi
xps:=\psi
xvph:=\varphi
xcph:=\Phi
xph:=\phi
xvp:=\varpi
xcp:=\Pi
xp:=\pi
xco:=\Omega
xo:=\omega
xn:=\nu
xm:=\mu
xcl:=\Lambda
xl:=\lambda
xio:=\iota
xcg:=\Gamma
xg:=\gamma
xet:=\eta
xve:=\varepsilon
xe:=\epsilon
xcd:=\Delta
xd:=\delta
xch:=\chi
xb:=\beta
xa:=\alpha
verb2:=\verb"#INS#•#INS#"
verb:=\verb|#INS#•#INS#|
usepo:=\usepackage[#INS#•#INS#]{•}#RET#
usep:=\usepackage{#INS#•#INS#}#RET#
url:=\url{#INS#•#INS#}
upd:=\upshape
up:=\textup{#INS#•#INS#}
thispagestyle:=\thispagestyle{#INS#•#INS#}
tpgs:=\thispagestyle{#INS#•#INS#}
tableofcontents:=\tableofcontents#RET#
toc:=\tableofcontents#RET#
topr:=\toprule#RET#
tilde:=\textasciitilde
texs:=\TeX\
tex:=\TeX
tw:=\textwidth
ttd:=\ttfamily
tt:=\texttt{#INS#•#INS#}
sqrto:=\sqrt[#INS#•#INS#]{•}
sqrt:=\sqrt{#INS#•#INS#}
sld:=\slshape
sl:=\textsl{#INS#•#INS#}
scd:=\scshape
sc:=\textsc{#INS#•#INS#}
sfd:=\sffamily
sf:=\textsf{#INS#•#INS#}
stcount:=\stepcounter{#INS#•#INS#}#RET#
setl:=\setlength{#INS#•#INS#}{•}
sparo:=\subparagraph[#INS#•#INS#]{•}
spars:=\subparagraph*{#INS#•#INS#}
spar:=\subparagraph{#INS#•#INS#}
ssseco:=\subsubsection[#INS#•#INS#]{•}#RET#
sssecs:=\subsubsection*{#INS#•#INS#}#RET#
sssec:=\subsubsection{#INS#•#INS#}#RET#
sseco:=\subsection[#INS#•#INS#]{•}#RET#
ssecs:=\subsection*{#INS#•#INS#}#RET#
ssec:=\subsection{#INS#•#INS#}#RET#
seco:=\section[#INS#•#INS#]{•}#RET#
secs:=\section*{#INS#•#INS#}#RET#
sec:=\section{#INS#•#INS#}#RET#
rboxoo:=\raisebox{#INS#•#INS#}[•][•]{•}
rboxo:=\raisebox{#INS#•#INS#}[•]{•}
rbox:=\raisebox{#INS#•#INS#}{•}
rmc:=\rmfamily
rncmoo:=\renewcommand{#INS#•#INS#}[•][•]{•}#RET#
rnewcoo:=\renewcommand{#INS#•#INS#}[•][•]{•}#RET#
rncmo:=\renewcommand{#INS#•#INS#}[•]{•}#RET#
rnewco:=\renewcommand{#INS#•#INS#}[•]{•}#RET#
rnewc:=\renewcommand{#INS#•#INS#}{•}#RET#
rncm:=\renewcommand{#INS#•#INS#}{•}#RET#
renewcomoo:=\renewcommand{#INS#•#INS#}[•][•]{•}#RET#
renewcomo:=\renewcommand{#INS#•#INS#}[•]{•}#RET#
renewcom:=\renewcommand{#INS#•#INS#}{•}#RET#
ref:=\ref{#INS#•#INS#}
pbox:=\pbox{#INS#•‹width›#INS#}{•‹contents›}
pboxooo:=\parbox[#INS#•‹position(c,t,b)›#INS#][•‹height›][•‹inner-position›]{•‹width›}{•‹contents›}
pboxoo:=\parbox[#INS#•‹position(c,t,b)›#INS#][•‹height›]{•‹width›}{•‹contents›}
pboxo:=\parbox[#INS#•‹position(c,t,b)›#INS#]{•‹width›}{•‹contents›}
pbox:=\parbox{#INS#•‹width›#INS#}{•‹contents›}
parboxooo:=\parbox[#INS#•‹position(c,t,b)›#INS#][•‹height›][•‹inner-position›]{•‹width›}{•‹contents›}
parboxoo:=\parbox[#INS#•‹position(c,t,b)›#INS#][•‹height›]{•‹width›}{•‹contents›}
parboxo:=\parbox[#INS#•‹position(c,t,b)›#INS#]{•‹width›}{•‹contents›}
parbox:=\parbox{#INS#•‹width›#INS#}{•‹contents›}
pgs:=\pagestyle{#INS#•#INS#}#RET#
paro:=\paragraph[#INS#•#INS#]{•}#RET#
pars:=\paragraph*{#INS#•#INS#}#RET#
par:=\paragraph{#INS#•#INS#}#RET#
pgref:=\pageref{#INS#•#INS#}
newenvoo:=\newenvironment{#INS#•#INS#}[•][•]{•}{•}#RET#
nenvoo:=\newenvironment{#INS#•#INS#}[•][•]{•}{•}#RET#
newenvo:=\newenvironment{#INS#•#INS#}[•]{•}{•}#RET#
nenvo:=\newenvironment{#INS#•#INS#}[•]{•}{•}#RET#
newenv:=\newenvironment{#INS#•#INS#}{•}{•}#RET#
nenv:=\newenvironment{#INS#•#INS#}{•}{•}#RET#
newlen:=\newlength{#INS#•#INS#}#RET#
nlen:=\newlength{#INS#•#INS#}#RET#
newlin:=\newline#RET#
nline:=\newline#RET#
npg:=\newpage#RET#
newpg:=\newpage#RET#
newct:=\newcolumntype{#INS#•#INS#}{•}
nct:=\newcolumntype{#INS#•#INS#}{•}
newcoo:=\newcommand{#INS#•#INS#}[•][•]{•}#RET#
ncmoo:=\newcommand{#INS#•#INS#}[•][•]{•}#RET#
newco:=\newcommand{#INS#•#INS#}[•]{•}#RET#
ncmo:=\newcommand{#INS#•#INS#}[•]{•}#RET#
newc:=\newcommand{#INS#•#INS#}{•}#RET#
ncm:=\newcommand{#INS#•#INS#}{•}#RET#
ncol:= &
multic:=\multicolumn{#INS#•‹# of cols›#INS#}{•‹col spec›}{•‹contents›}
mpar:=\marginpar{#INS#•#INS#}
mboxoo:=\makebox[#INS#•‹width›#INS#][•‹l,r,c(default)›]{•}
makebox:=\makebox[#INS#•‹width›#INS#][•‹l,r,c(default)›]{•}
mboxo:=\makebox[#INS#•‹width›#INS#]{•}
makebox:=\makebox[#INS#•‹width›#INS#]{•}
mbox:=\mbox{#INS#•#INS#}
mdd:=\mdseries
mnorm:=\mathnormal{#INS#•#INS#}
midr:=\midrule#RET#
mit:=\mathit{#INS#•#INS#}
mtt:=\mathtt{#INS#•#INS#}
msf:=\mathsf{#INS#•#INS#}
mcal:=\mathcal{#INS#•#INS#}
mrm:=\mathrm{#INS#•#INS#}
mbf:=\mathbf{#INS#•#INS#}
ruleo:=\rule[#INS#•‹lift›#INS#]{•‹width›}{•‹height›}
rule:=\rule{#INS#•‹width›#INS#}{•‹height›}
listt:=\listoftables#RET#
listf:=\listoffigures#RET#
lettrineo:=\lettrine[#INS#•‹see the lettrine manual for options›#INS#]{•‹drop letter›}{•‹rest of paragraph›}
lettrine:=\lettrine{#INS#•‹letter›#INS#}{•‹rest of paragraph›}
lbl:=\label{#INS#•#INS#}
latexes:=\LaTeXe\
latexe:=\LaTeXe
latexs:=\LaTeX\
latex:=\LaTeX
itd:=\itshape
it:=\textit{#INS#•#INS#}
incgo:=\includegraphics[#INS#•#INS#]{•}#RET#
incg:=\includegraphics{#INS#•#INS#}#RET#
ito:=\item[#INS#•#INS#]#RET#•
item:=\item#RET##INS#•#INS#
href:=\href{#INS#•‹URL›#INS#}{•‹words in doc›}
hw2tw:=\setlength{\headwidth}{\textwidth}#RET#
hw:=\headwidth
geometry:=\geometry{#INS#•#INS#}
fboxoo:=\framebox[#INS#•#INS#][•]{•}
fboxo:=\framebox[#INS#•#INS#]{•}
fbox:=\fbox{#INS#•#INS#}
frac:=\frac{#INS#•#INS#}{•}
foot:=\footnote{#INS#•#INS#}
emd:=\em
em:=\emph{#INS#•#INS#}
dxcx:=(\Xi)
dxx:=(\xi)
dxcu:=(\Upsilon)
dxu:=(\upsilon)
dxvth:=(\vartheta)
dxcth:=(\Theta)
dxth:=(\theta)
dxt:=(\tau)
dxvr:=(\varrho)
dxr:=(\rho)
dxz:=(\zeta)
dxvs:=(\varsigma)
dxs:=(\sigma)
dxcps:=(\Psi)
dxps:=(\psi)
dxvph:=(\varphi)
dxcph:=(\Phi)
dxph:=(\phi)
dxvp:=(\varpi)
dxcp:=(\Pi)
dxp:=(\pi)
dxco:=(\Omega)
dxo:=(\omega)
dxn:=(\nu)
dxm:=(\mu)
dxm:=(\mu)
dxcl:=(\Lambda)
dxl:=(\lambda)
dxio:=(\iota)
dxcg:=(\Gamma)
dxg:=(\gamma)
dxet:=(\eta)
dxve:=(\varepsilon)
dxeps:=(\epsilon)
dxcd:=(\Delta)
dxd:=(\delta)
dxch:=(\chi)
dxb:=(\beta)
dxa:=(\alpha)
dd:=( #INS# )•
cmidro:=\cmidrule#INS#•#INS#{•}
cmidr:=\cmidrule(#INS#•#INS#){•}
chap:=\chapter{#INS#•#INS#}#RET#
center:=\centering
bibitemo:=\bibitem[#INS#•#INS#]{•}#RET#•
bibitem:=\bibitem{#INS#•#INS#}#RET#
bwrapoo:=\begin{wrapfigure}[#INS#•‹# of narrow lines›#INS#]{•‹placement: r,R,l,L,i,I,o,O›}[•‹overhang›]{•‹width›}#RET#•#RET#\end{wrapfigure}•
bwrapo2:=\begin{wrapfigure}{#INS#•‹placement: r,R,l,L,i,I,o,O›#INS#}[•‹overhang›]{•‹width›}#RET#•#RET#\end{wrapfigure}•
bwrapo:=\begin{wrapfigure}[#INS#•‹# of narrow lines›#INS#]{•‹placement: r,R,l,L,i,I,o,O›}{•‹width›}#RET#•#RET#\end{wrapfigure}•
bwrap:=\begin{wrapfigure}{#INS#•‹placement: r,R,l,L,i,I,o,O›#INS#}{•‹width›}#RET#•#RET#\end{wrapfigure}•
bvers:=\begin{verse}#RET##INS#•#INS##RET#\end{verse}•
bverb:=\begin{verbatim}#RET##INS#•#INS##RET#\end{verbatim}•
bvarw:=\begin{varwidth}{#INS#•#INS#}#RET#•#RET#\end{varwidth}•
btrivl:=\begin{trivlist}#RET##INS#•#INS##RET#\end{trivlist}•
btitpg:=\begin{titlepage}#RET##INS#•#INS##RET#\end{titlepage}•
btheo:=\begin{theorem}#RET##INS#•#INS##RET#\end{theorem}•
bindex:=\begin{theindex}#RET##INS#•#INS##RET#\end{theindex}•
bbib:=\begin{thebibliography}{#INS#•#INS#}#RET#\bibitem{•}#RET#•#RET#\end{thebibliography}•
btabb:=\begin{tabbing}#RET##INS#•#INS##RET#\end{tabbing}•
btblso:=\begin{table*}[#INS#•#INS#]#RET#•#RET#\end{table*}•
btbls:=\begin{table*}#RET##INS#•#INS##RET#\end{table*}•
btblo:=\begin{table}[#INS#•#INS#]#RET#•#RET#\end{table}•
btbl:=\begin{table}#RET##INS#•#INS##RET#\end{table}•
btablso:=\begin{table*}[#INS#•#INS#]#RET#•#RET#\end{table*}•
btabls:=\begin{table*}#RET##INS#•#INS##RET#\end{table*}•
btablo:=\begin{table}[#INS#•#INS#]#RET#•#RET#\end{table}•
btabl:=\begin{table}#RET##INS#•#INS##RET#\end{table}•
btabx:=\begin{tabularx}{#INS#•#INS#}{•}#RET#•#RET#\end{tabularx}•
btabs:=\begin{tabular*}{#INS#•#INS#}{•}#RET#•#RET#\end{tabular*}•
btab:=\begin{tabular}{#INS#•#INS#}#RET#•#RET#\end{tabular}•
bsubeq:=\begin{subequations}#RET##INS#•#INS##RET#\end{subequations}•
bsplit:=\begin{split}#RET##INS#•#INS##RET#\end{split}•
bquo:=\begin{quote}#RET##INS#•#INS##RET#\end{quote}•
bquot:=\begin{quotation}#RET##INS#•#INS##RET#\end{quotation}•
bpmat:=\begin{pmatrix}#RET##INS#•#INS##RET#\end{pmatrix}•
bpict:=\begin{picture}#RET##INS#•#INS##RET#\end{picture}•
botr:=\bottomrule#RET#
bmults:=\begin{multline*}#RET##INS#•#INS##RET#\end{multline*}•
bmult:=\begin{multline}#RET##INS#•#INS##RET#\end{multline}•
bminpo:=\begin{minipage}[#INS#•‹t,b,c(default)›#INS#]{•‹width›}#RET#•#RET#\end{minipage}•
bminp:=\begin{minipage}{#INS#•‹width›#INS#}#RET#•#RET#\end{minipage}•
blist:=\begin{list}{#INS#•#INS#}{•}#RET#\item#RET#•#RET#\end{list}•
blett:=\begin{letter}{#INS#•#INS#}#RET#•#RET#\end{letter}•
bibstyle:=\bibliographystyle{#INS#•#INS#}
biblio:=\bibliography{#INS#•#INS#}
biteo:=\begin{itemize}[#INS#•#INS#]#RET#\item#RET#•#RET#\end{itemize}•
bite:=\begin{itemize}#RET#\item#RET##INS#•#INS##RET#\end{itemize}•
bgathedo:=\begin{gathered}[#INS#•#INS#]#RET#•#RET#\end{gathered}•
bgathed:=\begin{gathered}#RET##INS#•#INS##RET#\end{gathered}•
bgaths:=\begin{gather*}#RET##INS#•#INS##RET#\end{gather*}•
bgath:=\begin{gather}#RET##INS#•#INS##RET#\end{gather}•
bflr:=\begin{flushright}#RET##INS#•#INS##RET#\end{flushright}•
bfll:=\begin{flushleft}#RET##INS#•#INS##RET#\end{flushleft}•
bflaligs:=\begin{flalign*}#RET##INS#•#INS##RET#\end{flalign*}•
bflalig:=\begin{flalign}#RET##INS#•#INS##RET#\end{flalign}•
bframeo:=\begin{frame}[#INS#•#INS#]#RET#\frametitle{•}#RET#•#RET#\end{frame}•
bframe:=\begin{frame}#RET#\frametitle{#INS#•#INS#}#RET#•#RET#\end{frame}•
bfigo:=\begin{figure}[#INS#•#INS#]#RET#•#RET#\end{figure}•
bfig:=\begin{figure}#RET##INS#•#INS##RET#\end{figure}•
bfd:=\bfseries
bf:=\textbf{#INS#•#INS#}
beqns:=\begin{eqnarray*}#RET##INS#•#INS##RET#\end{eqnarray*}•
beqn:=\begin{eqnarray}#RET##INS#•#INS##RET#\end{eqnarray}•
bequs:=\begin{equation*}#RET##INS#•#INS##RET#\end{equation*}•
bequ:=\begin{equation}#RET##INS#•#INS##RET#\end{equation}•
benuo:=\begin{enumerate}[#INS#•‹1, i, I, a, A, {} to escape›#INS#]#RET#\item#RET#•#RET#\end{enumerate}•
benu:=\begin{enumerate}#RET#\item#RET##INS#•#INS##RET#\end{enumerate}•
bdes:=\begin{description}#RET#\item[#INS#•#INS#]#RET#•#RET#\end{description}•
bcitemo:=\begin{compactitem}[#INS#•#INS#]#RET#\item#RET#•#RET#\end{compactitem}•
bcitem:=\begin{compactitem}#RET#\item#RET##INS#•#INS##RET#\end{compactitem}•
bcenumo:=\begin{compactenum}[#INS#•#INS#]#RET#\item#RET#•#RET#\end{compactenum}•
bcenum:=\begin{compactenum}#RET#\item#RET##INS#•#INS##RET#\end{compactenum}•
bcent:=\begin{center}#RET##INS#•#INS##RET#\end{center}•
bcase:=\begin{cases}#RET##INS#•#INS##RET#\end{cases}•
bbmat:=\begin{bmatrix}#RET##INS#•#INS##RET#\end{bmatrix}•
bapp:=\begin{appendix}#RET##INS#•#INS##RET#\end{appendix}•
baliedato:=\begin{alignedat}[#INS#•#INS#]#RET#•#RET#\end{alignedat}•
baliedat:=\begin{alignedat}#RET##INS#•#INS##RET#\end{alignedat}•
balied:=\begin{aligned}{#INS#•#INS#}#RET#•#RET#\end{aligned}•
baliats:=\begin{alignat*}{#INS#•#INS#}#RET#•#RET#\end{alignat*}•
baliat:=\begin{alignat}{#INS#•#INS#}#RET#•#RET#\end{alignat}•
balis:=\begin{align*}#RET##INS#•#INS##RET#\end{align*}•
bali:=\begin{align}#RET##INS#•#INS##RET#\end{align}•
babs:=\begin{abstract}#RET##INS#•#INS##RET#\end{abstract}•
barr:=\begin{array}#RET##INS#•#INS##RET#\end{array}•
adcount:=\addtocounter{#INS#•#INS#}{•}#RET#
adlen:=\addtolength{#INS#•#INS#}{•}#RET#
—:=\textemdash\
—:=\textemdash
–:=\textendash\
–:=\textendash
%!TEX encoding = UTF-8 Unicode