LaTeX tools
TeXRA's agents spend most of their effort on the theory; the LaTeX around it should not cost you attention. TeXRA does not send text to a model and hope for the best. It uses established LaTeX tools so formatting, diffing, figure extraction, and citation lookup are handled by the right software, not by a language model guessing at syntax.
Overview
| What it does | Tool behind the scenes |
|---|---|
| Code formatting | latexindent or tex-fmt |
| Version comparison | latexdiff |
| Document statistics | texcount |
| Figure extraction | Built-in |
| TikZ compilation | Built-in |
| Bibliography resolution | Built-in |
| Symbolic math | wolfram |
All are configured from Dashboard → Tools () or Dashboard → LaTeX (), where each tool shows its status.
Dashboard → Tools: ready tools show a green check (Ready); missing tools show a Needs setup badge with Install in Terminal / Install actions. On Dashboard → LaTeX → Dependencies, missing binaries show a Not found tag.
The same status is one command away in any terminal. texra doctor probes the same toolchain:
- PASSLaTeX latexmk:LaTeX build orchestration
- PASSLaTeX latexdiff:LaTeX diff generation
- WARNLaTeX latexindent:latexindent was not found on PATH.Install latexindent or a TeX distribution that provides it.
Formatting tools
TeXRA uses formatters to keep LaTeX code consistent and readable.
Supported formatters:
latexindent: the default formatter; highly configurabletex-fmt: a faster alternative with simpler configuration
Formatting does not run on its own after agent execution. The selected formatter runs when you invoke it, and after Download arXiv Source unpacks a project. In the VS Code extension, run it from the Command Palette (Ctrl+Shift+P) → TeXRA: Indent Current TeX (or Indent All LaTeX Files for the whole workspace).
Configuration: Formatter selection and installation live on the LaTeX tab () of the TeXRA Dashboard. Read the LaTeX configuration settings for the full set.
Version comparison with latexdiff
latexdiff shows changes between two versions of a document, producing a PDF with additions and deletions marked. TeXRA can generate diffs automatically after an agent runs.
Usage:
- After an agent modifies your document, a diff PDF shows what changed.
- Use
latexdiff-vcto compare the current file against a git commit: pick the commit from the Commit dropdown.
Read the LaTeX Diff guide for the full workflow.
Document statistics with texcount
texcount reports word counts, heading counts, and math element counts so the model can reason about document scale and structure.
Enabling texcount:
- For context: toggle Attach TeX Count in the Tool Configuration dropdown. Read the agent execution settings.
- As a tool: tool-use agents can invoke
texcountdirectly to analyze files on demand.
Modes:
separate(default): count each file independentlyinclude: follow\input{}/\include{}directives from the main filesum: aggregate totals across multiple top-level files
Requirement
texcount must be on your PATH. It ships with most TeX distributions. Check Dashboard → LaTeX () → Dependencies: the TeXcount row shows a Not found tag when it is missing (texcount is not listed on the Tools tab). Install it with your TeX package manager.
Figure extraction
TeXRA extracts figures from your LaTeX so vision-capable models can see them.
Standard figures
The extract_figures tool finds \includegraphics references and returns the images as attachments.
Auto-extraction: toggle Auto Extract → Figures in the main UI to include figures in every prompt automatically. Read the figures guide.
TikZ figures
The extract_tikz_figures tool discovers tikzpicture environments, compiles them to standalone PDFs, and returns the rendered output. It compiles with pdflatex and rasterises with Ghostscript plus GraphicsMagick or ImageMagick. The Tools tab does not list these; Dashboard → LaTeX → Dependencies shows a TeX Distribution row (pdflatex/latexmk) and an Image Processing row (Ghostscript + GraphicsMagick/ImageMagick) with an install guide, and texra doctor reports them too:
TikZ extraction needs the compiler and both rasterising binaries present. Here Ghostscript is Not found; the Install guide link points at the setup steps for the missing dependency.
Read the TikZ figures guide for workflows and the installation guide for dependency setup.
Bibliography extraction
The extract_bib_entries tool resolves citation context for your LaTeX document:
- Finds
\bibliography{}and\addbibresource{}directives - Loads the referenced
.bibfiles - Returns BibTeX entries for every cited key
Useful whenever an agent needs exact citation records to edit, format, or validate references.
Symbolic math with Wolfram
The wolfram tool executes Wolfram Language code through wolframscript, so agents can verify calculations or perform symbolic algebra. It is not LaTeX-specific, but it is useful for validating mathematical content in papers and derivations.
The Wolfram card sits under Dashboard → Tools → Computation (). Requires a local Wolfram Engine install.
Configuring tool usage
Control how TeXRA uses these tools from the UI:
- Tool Config dropdown (): toggle the Attach TeX Count () per-run helper. Read the agent execution settings.
- Auto Extract dropdown (): toggle automatic extraction of Figures or TikZ Figures. Read the figures guide.
- Dashboard → Tools (): enable or disable whole tool groups, view install guides, and run installers.
Both per-run dropdowns live in the file-group headers, next to your input and media files:
The Tool Config menu ( on the Input header) toggles Attach TeX Count; the Auto Extract menu ( on the Media header) toggles Figures, TikZ Figures, and Compile Input PDF. Active helpers tint their buttons.
For detailed tool settings (formatter paths, TikZ processing options, etc.), read the configuration guide.
Next steps
- TikZ figures: advanced TikZ workflows
- LaTeX Diff: version comparison in detail
- Research tools: arXiv, Crossref, Zotero, and web search
- Agent integrations: one-click setup for the Codex and Claude Code agents