Compile and preview
How Polemic compiles your project and keeps the PDF in sync with the source.
Compiling
Cmd/Ctrl + S saves and compiles, with latexmk from your own
TeX distribution.
- Output goes to
build/inside the project. - One compile runs at a time. Saving during a compile queues one follow-up run.
- A compile that runs longer than 10 minutes is stopped, including any child processes.
- Your own
~/.latexmkrcand the system-wide latexmk config still apply. Alatexmkrcinside the project does not; see Security.
Engines
Pick pdfLaTeX, XeLaTeX or LuaLaTeX per project in Document settings. Automatic follows a
% !TEX program comment, else uses XeLaTeX when the document loads fontspec or
unicode-math, else pdfLaTeX.
The PDF preview
The preview shows the compiled PDF next to the editor and updates after every compile. If a compile fails, the last good PDF stays visible with an "out of date" banner, so you keep your place while you fix the error.
SyncTeX
- Cmd/Ctrl + click in the editor jumps to that spot in the PDF.
- Cmd/Ctrl + click in the PDF jumps to the source line.
This also works from files you pull in with \input.
Issues and quick fixes
Errors and warnings from the log appear in the Issues tab; the raw output is in the Compile Log tab. For common errors, Fix this applies a fix in one click, for example:
- a misspelled command (
\textbff→\textbf); _or^outside math mode;- a missing package for an environment;
- a mismatched
\end{...}; - a wrong include path, label or citation key.
For anything the rules cannot fix, the optional AI quickfix can propose a change.