LaTeX compilation environment
TeXRA's agents operate on mathematical derivations, formal arguments, and the LaTeX manuscripts that document them. Because this work takes place in LaTeX source, core capabilities—including compiling previews, typesetting standalone TikZ figures, and generating latexdiff visualizations—rely on a local LaTeX distribution.
Required LaTeX distribution
You need a working LaTeX distribution installed, such as:
- Windows: MiKTeX or TeX Live
- macOS: MacTeX (includes TeX Live)
- Linux: TeX Live (often available through the package manager)
A working LaTeX installation is required for features like compiling diffs and TikZ previews.
Make sure the latexmk command is available (preferred by TeXRA) or at least pdflatex. Both must be reachable from your system's command line. texra doctor verifies the whole toolchain in one pass, on any platform:
- 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 Dashboard's 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 setting:
To keep your project directory clean, configure LaTeX Workshop to place its build output files (such as .aux, .log, .pdf) in a separate subdirectory. TeXRA is aware of this common practice.
The Dashboard's LaTeX tab applies this for you. Its recommended settings list includes LaTeX Output Directory (latex-workshop.latex.outDir, set to %DIR%/build/) and Explorer Auto-Reveal Exclude (so the build/ folder stays out of the Explorer), each with an Apply button, plus Apply All to set both at once.
If you prefer to set it by hand, LaTeX Workshop is a separate VS Code extension, so the setting lives in VS Code's own settings:
- Open VS Code Settings ( icon or
Ctrl+,). - Search for
Latex-workshop: Latex: Out Dir. - Set the value to
%DIR%/build/.
This directs build files to a build/ subdirectory in your project, keeping your main source directory uncluttered. TeXRA primarily works with the source .tex files, but a clean setup helps the overall workflow, especially when using LaTeX Workshop for compilation and previewing.
Alternative: online compilers (e.g., Overleaf)
Setting up and maintaining a local LaTeX distribution can be difficult because of complex dependencies or system configurations. If local compilation keeps failing when you preview latexdiff outputs or TikZ figures, an online LaTeX editor and compiler such as Overleaf is an alternative. Upload the .tex files generated by TeXRA (such as diff files or standalone TikZ files) to Overleaf to compile and view them there.