LaTeX compilation environment
Compiling previews, rendering standalone TikZ figures, and building latexdiff PDFs require a local LaTeX distribution.
Required LaTeX distribution
Install a TeX distribution for your platform:
- Windows: MiKTeX or TeX Live
- macOS: TeX Live (
brew install texlive) or MacTeX - Linux: TeX Live (
texlive-fullvia your package manager)
Make sure latexmk (preferred) or pdflatex is on your PATH. Run texra doctor to verify the toolchain in one pass:
- PASSLaTeX latexmk:LaTeX build orchestration
- PASSLaTeX pdflatex:PDFLaTeX compiler
- PASSLaTeX bibtex:BibTeX bibliography processing
- PASSLaTeX latexdiff:LaTeX diff generation
The doctor's LaTeX rows confirm each binary is on PATH. The same check works for extension and CLI users alike.
Read the installation guide for details on installing LaTeX and other dependencies such as Perl (required for latexdiff).
Integration with LaTeX Workshop
TeXRA works alongside the LaTeX Workshop extension, which provides compilation, previewing, and IntelliSense. If the extension isn't detected and your workspace contains LaTeX files, TeXRA prompts you to install it. On a workspace without LaTeX files there is no prompt; you can still install it from the Settings LaTeX tab.
Workflow interaction:
TeXRA uses LaTeX Workshop when available. For example, after generating a comparison file with its latexdiff features (read the LaTeX diff guide), TeXRA attempts to trigger LaTeX Workshop's build and view commands automatically, so you can compile and see the visualized changes in the resulting PDF.
Recommended output directory (%DIR%/build/):
To keep auxiliary build files (.aux, .log, .pdf) out of your source directory, open Settings → LaTeX → Recommended VS Code settings and click Apply all. This sets LaTeX Output Directory (latex-workshop.latex.outDir) to %DIR%/build/ and adds build/ to Explorer Auto-Reveal Exclude. You can also set Latex-workshop: Latex: Out Dir to %DIR%/build/ directly in VS Code Settings (Ctrl+, / Cmd+,).
Alternative: online compilers (e.g., Overleaf)
If you do not want a local TeX distribution, you can upload the .tex files generated by TeXRA (such as _diff.tex files or standalone TikZ files) to Overleaf or sync via Git (see Working with Overleaf).