A script turns Gemini Deep Research reports into LaTeX PDFs

A converts reports into cleaner LaTeX PDFs. It pulls out the report text, LaTeX content, , and final s. It then opens Overleaf, pastes the report there, and compiles it into a PDF.

The hard part is Gemini’s inline , which can be inconsistent. Testing suggests uses a separate LLM for , apart from the that do the research. That citation system appears to compare report text with viewed sources by .

As a result, citation cards under a paragraph can repeat, and their order may not match what a reader expects. The script’s smart citation mode checks each paragraph’s citation cards and superscript citation numbers, then tries to match them more reliably.

Key points

  • The converts reports into LaTeX PDFs.
  • It extracts report text, LaTeX, , and s.
  • It opens Overleaf, pastes the content, and compiles the PDF.
  • Gemini’s inline can be duplicated or ordered in confusing ways.
  • The smart citation mode tries to match citation cards with superscript citation numbers.
Read original