Research

Compiler, graph, and AI systems for reliable papers.

LatexDo research turns a LaTeX project into checked evidence: compiler output becomes diagnostics, bibliography structure becomes a graph, and AI tools act only with that context.

01 Project source

.tex, .bib, comments, and active selection.

02 Compiler evidence

Local latexmk output, SyncTeX, log parsing, ranked diagnostics.

03 Citation graph

Used, unused, missing, duplicate, stale, and related references.

04 Grounded AI

Assistant tools inspect, edit, cite, compile, and verify inside the project.

Research tracks

The work is organized around the writing loop.

Each track connects to the same project state, so research features are not isolated demos. They feed the editor, the PDF preview, and the actions available to the assistant.

01

Compiler

Local TeX output becomes editor-grade diagnostics.

LatexDo runs the user's own TeX toolchain, isolates every build, and converts noisy logs into actionable errors, warnings, and source highlights.

Read compiler brief

Pipeline

  • Find latexmk from standard TeX locations, including /Library/TeX/texbin on macOS.
  • Support pdflatex, xelatex, and lualatex through engine-specific latexmk flags.
  • Run with -synctex=1, -file-line-error, -interaction=nonstopmode, and -halt-on-error.
  • Return one compile result with PDF path, duration, raw output, diagnostics, and failure reason.

Diagnostics

  • Parse file-line errors, LaTeX warnings, package warnings, class warnings, and overfull or underfull boxes.
  • Detect low-information failures like emergency stops and surface the real earlier compiler problem.
  • Enrich diagnostics with source context, confidence, highlight text, suggested fixes, and cascade ranking.
  • Sanitize stale latexmk failure output so old failed runs do not confuse the user.

Runtime controls

Compile jobs are cancellable and have a timeout. On cancellation or timeout the app terminates the process group, waits briefly, then force-kills if needed. Shared cloud projects are materialized into a bounded scratch folder before local compile, with file count and size limits.

02

Knowledge Graph

A deterministic map of the bibliography.

The graph connects BibTeX entries to citation usage, then links papers by authors, venues, years, and title similarity so the editor can explain what is central, missing, or isolated.

Read graph brief

Model

  • Each graph node is one bibliography entry with key, title, authors, venue, year, type, cited status, and degree.
  • Edges are typed as shared author, same venue, same year, or similar topic from title-token Jaccard overlap.
  • Weights are configurable, then pruned to the strongest edges per node so large libraries stay readable.
  • Stats include node count, edge count, cited count, and connected component count.

Tools

  • parseBibFile reads BibTeX through bibtex-parse with size and entry limits.
  • extractCitationUsages scans \cite-style commands in project TeX files.
  • analyzeCitationLibrary reports used, unused, missing, duplicate, stale, and low-quality references.
  • The graph view adds search, cited-only filtering, relation toggles, weight sliders, pan, zoom, drag, and citation insertion.

Result

The author can see which references are central, which cited papers are isolated, which uncited papers are related, and where the bibliography has quality problems. The same graph data feeds citation recommendations for selected prose.

03

AI

AI that uses project tools before it edits.

The assistant can inspect files, read the active document, propose edits, insert citations, run checks, compile, and use the graph before recommending changes.

Read AI brief

Tool Layer

  • list_files, read_file, and get_active_document inspect project context.
  • edit_selection, insert_at_cursor, and write_file make controlled editor changes.
  • compile verifies edits and returns compiler diagnostics plus the log tail.
  • run_checks, insert_citation, and recommend_citations connect AI to LatexDo's checkers and citation graph.

Models

  • Cloud mode supports Anthropic Messages and OpenAI-compatible chat completions with native tool calls.
  • Ollama runs through Electron main-process IPC and uses Ollama's native tool-calling endpoint.
  • Local GGUF models run through node-llama-cpp with a JSON fallback tool protocol.
  • The setup catalog includes Qwen2.5 Coder, Qwen3, Llama, Phi, SmolLM, and an inline-completion tier.

Guardrails

AI access is controlled by settings for chat history, current editor, project files, bibliography, and researcher profile. Mutating actions can require approval, the agent has a max-step budget, requests can be aborted, and the prompt tells the model to inspect files before editing and compile after risky changes.

Product direction

Research only ships when it makes paper work clearer.

01

Evidence first. LatexDo reads project files, logs, citations, and selections before making claims.

02

Editor connected. Research outputs become interface controls, diagnostics, graph views, and assistant tools.

03

Verification loop. Risky changes can be checked with compile output and citation analysis before the author trusts them.