Skip to content

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 doesTool behind the scenes
Code formattinglatexindent or tex-fmt
Version comparisonlatexdiff
Document statisticstexcount
Figure extractionBuilt-in
TikZ compilationBuilt-in
Bibliography resolutionBuilt-in
Symbolic mathwolfram

All are configured from Dashboard → Tools () or Dashboard → LaTeX (), where each tool shows its status.

ToolsDashboard
LaTeX
latexindentlatexindent · tex-fmt
Available
latexdifflatexdiff
Available
texcountnot on PATH
Not Found Install
Figure Extractionbuilt-in
Available
TikZlatexmk · GraphicsMagick
Available
Bibliographybuilt-in
Available
Computation
Wolframwolframscript
Available

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:

texra doctor
$texra doctor
  • 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.
… plus Node.js, workspace dirs, auth, model access, and config checks

Formatting tools

TeXRA uses formatters to keep LaTeX code consistent and readable.

Supported formatters:

  • latexindent: the default formatter; highly configurable
  • tex-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-vc to 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:

  1. For context: toggle Attach TeX Count in the Tool Configuration dropdown. Read the agent execution settings.
  2. As a tool: tool-use agents can invoke texcount directly to analyze files on demand.

Modes:

  • separate (default): count each file independently
  • include: follow \input{} / \include{} directives from the main file
  • sum: 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 pipelineDashboard → Tools
latexmkor pdflatex — compiles each tikzpicture
Available
GraphicsMagickor ImageMagick — PDF → image conversion
Available
GhostscriptPDF processing
Not Found Install guide

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:

  1. Finds \bibliography{} and \addbibresource{} directives
  2. Loads the referenced .bib files
  3. 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:

draft.tex — texra-sample
% sample project
\begin{abstract}
We present an efficient method for the estimation
of spectral gaps in random regular graphs.
\end{abstract}
\section{Preliminaries}
Let $G$ be a $d$-regular graph.

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