Skip to main content

LaTeX

Write and compile LaTeX with the source and the PDF side by side, and ask the agent to draft sections, fix compile errors or check citations. This page covers views, compiling, TeX Live, trusted builds and export.

A thesis chapter open in Nebula Writer in Edit view. The review bar shows Review agent edit for one change, with the Before and After text of the updated sentence, and Discard edit and Keep edit.

Choose a view#

Use the buttons above the document. The View menu has the same choices, named Editor Only, Split View and Preview Only.

ViewUse it to
EditGive the source the full width
SplitEdit beside the compiled PDF
PreviewRead the PDF and check the layout

Compile#

  1. Choose Compile now, the play button in the preview toolbar. Its icon shows a check when the compile succeeds and a warning sign when it fails.
  2. To compile as you type, open the More toolbar actions menu (...) next to it and turn on Auto Compile.
  3. Double-click a spot in the PDF to jump to the matching line in the source.

Nebula Writer finds the main file of a multi-file project. If a folder holds more than one LaTeX project or main file, choose one under LaTeX Projects or Entry Point in the same menu.

When a compile fails, cards above the log explain the first problems. They can offer Fix with AI (sends the log to the agent), Retry compile, or a TeX Live install. The full compile log is below the cards.

Tectonic and TeX Live#

Nebula Writer includes Tectonic, which downloads the packages a document uses as it needs them. When a project needs packages or tools that Tectonic doesn't provide, such as PythonTeX, install the managed TeX Live. Go to Settings → Files, find TeX Live under LaTeX Engine, and choose:

  • Recommended for common packages, with more installed automatically as needed.
  • Full for the largest package set. It needs about 10 GB of disk space and takes much longer to install.

Update and Uninstall appear in the same place once TeX Live is installed. A compile error card can also start the install.

Trusted executable build#

Some projects run programs during the build, for example the minted and PythonTeX packages, SVG conversion, or a latexmkrc file. These need your permission.

Warning: Turn on Trusted executable build only for a project you trust. It lets the project run shell commands and build files that can reach your files, applications and network.

To turn it on, open the ... menu in the preview toolbar, choose Trusted executable build, and confirm with Trust project. If a compile fails because the project needs it, the error card offers Enable trusted shell escape. Leave it off for downloaded or unfamiliar projects.

Ask the agent#

Ask for a diagnosis before a fix:

Prompt
Explain the first LaTeX error and the smallest safe fix. Don't edit the source yet.

Then:

Prompt
Apply only that fix in @paper.tex. Keep all labels, citation keys and structure, then compile and tell me whether the error is gone.

The agent can compile the project and look at the rendered pages to check its work. For citations, ask it to use only keys that already exist in your .bib file, and check authors, titles, years and DOIs against the sources yourself.

Review the agent's changes#

The agent writes each edit to the file as it works and keeps a restore point. Keep edit keeps it and Discard edit puts the previous version back. Because LaTeX is a text format, the review bar can also offer Accept and Reject for single changes. See Review and undo.

Export the PDF#

After a successful compile, choose Export PDF in the ... menu to save the compiled PDF, or use File → Export to PDF... (Cmd/Ctrl+Shift+E). The agent can also export a LaTeX file to a PDF in your project.

Before you submit, check fonts, figures, cross-references, the bibliography and the page count. Keep the .tex and .bib files as the editable source.