Home Plan & Pricing Templates
Custom Completion List

Custom Completion List #

Introduction #

When writing LaTeX documents in TeXPage, entering \ triggers a completion list. TeXPage comes with built-in data for commonly used completion lists. If the built-in completion lists are not sufficient, you can customize them using the LaTeX Snippets feature.

How to #

When adding a LaTeX snippet, you need to enter a title and LaTeX code. If the title starts with \ and consists entirely of English characters, it will automatically be added to the auto-completion list. For example:

  • \begin{myenv}...
  • \mycommand{}
  • \mytable

After entering the title, fill in the corresponding LaTeX code. When editing a document, if the LaTeX snippet title contains what you’re typing, it will automatically appear in the completion list. Selecting the title will insert the corresponding LaTeX code into the document.

Setting Cursor Positions #

After selecting from the completion list, you can control where the cursor jumps when the corresponding code is inserted into the document.

\begin{table}[${1}]
  \caption{${2:Caption}}
  \label{tab:my_label}
  \begin{tabular}{c|c}
     &  \\
     & 
  \end{tabular}
\end{table}

${1} indicates the first cursor position. For the second cursor position, use ${2}, and so on. Pressing the Tab key will automatically jump to the next cursor position.

${2:Caption} means that “Caption” will be the default text at the second cursor position.