Scriptora AI Docs
Editor

Writing LaTeX

LaTeX syntax highlighting, autocomplete, snippets, and spellcheck in the editor.

The Scriptora AI editor is built on CodeMirror 6 with a full LaTeX language mode. It behaves like a professional IDE for academic writing.

Syntax highlighting

The editor understands LaTeX structure:

  • Commands (\textbf, \frac, \begin) are highlighted in blue
  • Environments (equation, figure, table) are highlighted distinctly
  • Comments (lines starting with %) are greyed out
  • Math inside $...$ and \[...\] is highlighted as math mode

Autocomplete

Press Ctrl+Space to trigger autocomplete. The editor suggests:

  • 300+ built-in LaTeX commands\textbf, \begin{table}, \includegraphics, ...
  • Your citation keys — type \cite{ and see all keys from your .bib files
  • Your labels — type \ref{ and see all \label{} values in your document
  • Environment names — after \begin{, autocomplete lists all standard environments

Auto-closing environments

Type \begin{equation} and press Enter — the editor automatically inserts a matching \end{equation} and places the cursor inside. This works for all environments.

Bracket matching

The editor highlights matching pairs of { }, [ ], and ( ). This is especially helpful in nested math expressions like:

\frac{\sum_{i=1}^{N} x_i}{N}

Spellcheck

The editor uses your browser's built-in spellcheck. Misspelled English words are underlined in red. Right-click a word to see suggestions or add it to your browser dictionary.

LaTeX commands are excluded from spellcheck — only the text content between commands is checked.

Code folding

Click the arrow in the gutter next to any \section, \begin{}, or block to fold it. Useful for navigating long documents — collapse sections you're not working on.

Find and replace

ShortcutAction
Ctrl/Cmd+FFind
Ctrl/Cmd+HFind and replace

Supports regex patterns. Use the arrows to jump between matches.

Common LaTeX patterns

Quick reference for frequently used commands:

What you wantLaTeXResult
Bold text\textbf{bold}bold
Italic text\textit{italic}italic
Inline math$E = mc^2$E = mc^2
Display math\[ E = mc^2 \]Centered equation
Numbered equation\begin{equation}...\end{equation}Eq. (1)
Bullet list\begin{itemize}\item...\end{itemize}Bulleted list
Numbered list\begin{enumerate}\item...\end{enumerate}Numbered list
Citation\cite{key}[1] or (Author, Year)
Cross-reference\ref{fig:chart}Figure 1
Footnote\footnote{text}Superscript number

You don't need to memorize LaTeX commands. Ask the AI: "Format this as a numbered equation" or "Make this a bulleted list" and it will write the LaTeX for you.

On this page