PaperPilot Docs

LaTeX Editing

Master the LaTeX editing features in PaperPilot

PaperPilot's editor provides a rich LaTeX editing experience with intelligent features that understand your document structure.

Syntax Highlighting

The editor uses semantic highlighting to make your LaTeX code readable:

\documentclass{article}
\usepackage{graphicx}
\usepackage{amsmath}

\title{My Research Paper}
\author{Jane Doe}
\date{\today}

\begin{document}

\maketitle

\section{Introduction}

This is an example of LaTeX syntax highlighting in action.
Mathematical expressions like $E = mc^2$ are highlighted differently.

\begin{equation}
    \int_{0}^{\infty} e^{-x^2} dx = \frac{\sqrt{\pi}}{2}
\end{equation}

% This is a comment - grayed out for easy identification

\end{document}

Color Scheme

ElementHighlight
CommandsBlue/purple
EnvironmentsBold
Math modeGreen tint
CommentsGray/italic
StringsOrange
ArgumentsYellow

Autocomplete

Intelligent suggestions as you type:

Command Autocomplete

Start typing a command and suggestions appear:

\sec...

\section{}
\subsection{}
\subsubsection{}

Press Tab to accept the highlighted suggestion, or keep typing to filter.

Environment Autocomplete

Type \begin{ to see available environments:

\begin{eq...

equation
equation*
eqnarray

When you select an environment, the closing \end{} is inserted automatically.

Custom Definitions

The editor learns your document:

  • Custom commands - \newcommand definitions appear in suggestions
  • Labels - \label{} names are suggested for \ref{} and \cite{}
  • Bibliography keys - BibTeX keys from your .bib files

Snippets

Speed up common patterns with built-in snippets:

Type figure and press Tab:

\begin{figure}[htbp]
    \centering
    \includegraphics[width=0.8\textwidth]{|cursor|}
    \caption{Enter caption}
    \label{fig:label}
\end{figure}

Type table and press Tab:

\begin{table}[htbp]
    \centering
    \begin{tabular}{|c|c|c|}
        \hline
        A & B & C \\
        \hline
        |cursor| \\
        \hline
    \end{tabular}
    \caption{Enter caption}
    \label{tab:label}
\end{table}

Type align and press Tab:

\begin{align}
    |cursor|
\end{align}

Or frac for fractions:

\frac{numerator}{denominator}

Type itemize and press Tab:

\begin{itemize}
    \item |cursor|
\end{itemize}

Bracket Matching

The editor highlights matching delimiters:

  • Braces { } - Command arguments
  • Brackets [ ] - Optional arguments
  • Parentheses ( ) - Grouping
  • Environment markers - \begin{} and \end{} pairs

Click on any bracket to highlight its match. Mismatched brackets are shown with a red indicator.

Code Folding

Collapse sections to focus on what matters:

Foldable Regions

  • Sections - Collapse entire sections and subsections
  • Environments - Fold figure, table, equation blocks
  • Preamble - Collapse everything before \begin{document}
  • Custom - Use %region and %endregion comments
%region Preamble
\documentclass{article}
\usepackage{...}
% ... many packages ...
%endregion

\begin{document}

Fold Controls

ActionMethod
Fold sectionClick the arrow in the gutter
Fold allCtrl+K Ctrl+0
Unfold allCtrl+K Ctrl+J
Fold level NCtrl+K Ctrl+N (N = 1-9)

Find and Replace

Powerful search with regex support:

Open Find

Press Ctrl+F to open the find bar.

Enable Options

Customize your search with filters:

  • Aa - Case sensitive
  • W - Whole word only
  • (.*) - Regular expression mode

Replace

Press Ctrl+H to add a replace field. Use $1, $2, etc., for regex capture groups.

Regex Examples

PatternMatches
\\section\{.*\}All section headings
\$[^$]+\$Inline math
\\cite\{(\w+)\}Citations (captures key)

Multi-Cursor Editing

Edit multiple locations simultaneously:

ActionShortcut
Add cursor above/belowCtrl+Alt+↑/↓
Add cursor at clickAlt+Click
Select next occurrenceCtrl+D
Select all occurrencesCtrl+Shift+L

Multi-cursor is perfect for renaming labels, updating similar commands, or adding formatting to multiple lines.

Error Indicators

The editor shows LaTeX issues inline:

  • Red underline - Syntax errors
  • Yellow underline - Warnings (undefined references, etc.)
  • Info icons - Suggestions for improvement

Hover over any indicator to see the full message.

On this page