Webfold
Menu

Format · LaTeX, BibTeX, arXiv, MathML

LaTeX, BibTeX, arXiv source archives and MathML, read as structure.

Webfold's command line and MCP server cannot read LaTeX, BibTeX or arXiv source archives today: those readers are in superdocuments and in the revision Webfold pins, but no command routes them, and in superdocuments LaTeX converts to Markdown 6.0 times faster than Pandoc 3.1.3 at the median (3.97 ms against 23.97 ms over 16 hand-made files).

superdocuments has readers for LaTeX source, BibTeX files, arXiv e-print archives (a paper's source tarball) and MathML, returning sections, math kept as TeX, figures with image bytes, and bibliography entries. The webfold CLI and MCP server do not call these readers; webfold arxiv get reads the arXiv HTML version of a paper, and the PDF when there is no HTML.

Last updated , the newest measurement or check on record for this page.

In superdocuments and Webfold's pin; not on the Webfold command line

Status

  • The LaTeX, BibTeX, arXiv source and MathML readers were merged into superdocuments on 2026-11-07, and the superdocuments revision Webfold pins (68c216f) contains them. They are not reachable from the Webfold command line or MCP server. The Pandoc-layout rewrite of the LaTeX reader and the citation processor were merged into superdocuments on 2026-11-13, after that revision. This guide describes the readers at the pinned revision. In superdocuments main, convert_bytes for .tex writes the document title as YAML metadata and citations as [@key], and render_markdown is unchanged. Webfold's arXiv tool uses its own HTML route.

See it work

How do I try it from wherever I work?

1webfold arxiv search "attention is all you need" --n 5
2webfold arxiv get 1706.03762 --chunk-chars 4000
3webfold pdf paper.pdf --chunk 4096

Input

What input does Scientific sources reading accept?

LaTeX source (.tex)

latex::parse reads a document or fragment from a string. It is a bounded reader, not a TeX engine, and it loads no packages. \documentclass and \usepackage are dropped with no warning. Commands that a package would add are unknown: they keep their arguments and produce a warning. Macros defined in the file with \newcommand, \renewcommand, \providecommand, \def, \DeclareMathOperator, \newenvironment or \newtheorem are expanded in running text, within limits on the number of expansions, their total size and nesting depth.

Multi-file projects (\input, \include, \subfile)

These are read only through a FileProvider. Without one, the name is recorded in Document::inputs and a warning is added. arxiv_source supplies a provider that reads from the archive only. It tries the name relative to the main file's folder, then as written, and adds .tex when the name has no .tex ending.

arXiv e-print (the bytes served at /e-print/<id>)

read_eprint takes the bytes of the archive. It accepts a gzip-compressed tar, a plain tar, or a gzip-compressed single TeX file, which is named main.tex. The module does no network or file-system access. It chooses the main file, parses it, inlines \input files from the archive, builds a bibliography and resolves each figure's images to archive bytes.

BibTeX and BibLaTeX (.bib)

bibtex::parse reads a string into entries, @string, @preamble and @comment blocks, with warnings. Helpers read names, pages, years, months, DOIs, URLs and arXiv ids from field values. resolved_value follows crossref up to eight levels, and a cycle stops the search.

MathML (<math> elements)

mathml::to_tex takes a string containing a <math> element. If it holds a TeX annotation, that TeX is returned unchanged. Otherwise the presentation markup is converted: identifiers, numbers, operators, fractions, roots, scripts, tables and fences.

PDF with no source (text and embedded images)

pdf::extract_markdown returns the text as Markdown. superdocuments::pdf::images::extract_images lists each embedded image XObject per page with its bytes: JPEG and JPX unchanged, Flate images as PNG, other decodable images as raw samples. An image's position in the text appears as a marker, ![](img_<object number>.png).

Output

What comes out?

A structured LaTeX document

latex::Document holds the title and authors (one entry per \and), date, abstract, a block list (Section at levels 1 to 5, Paragraph, List, Table, Math, Verbatim, Figure, Theorem, Quote), labels with their numbers, thebibliography items, names from \bibliography and \addbibresource, unresolved \input names, and warnings.

Markdown, text and HTML

render_markdown writes headings as # repeated to the section level, inline math as $...$ and display math as $$ blocks. A numbered display row gets \tag{n}. Citations are text such as (Vaswani et al., 2017), not links. A figure becomes a bold 'Figure N:' caption and one line per image, ![](path), with the path as written in the source. render_text and render_html give the same content in their formats.

Figures with image bytes (read_eprint)

Source.figures has one FigureAssets per top-level figure environment, including figure* and subfigures, in source order. Each has its label, number and caption text, and one ImageAsset per \includegraphics. The asset gives the declared path and, when found, the archive path, the bytes and a format: Png, Jpeg, Pdf, Eps or Other, detected from the first bytes. A missing image is recorded as None and a warning is added.

Bibliography from an e-print

The bibliography comes from the archive's .bib files. If there are none, it comes from thebibliography items in the main file, and if there are none of those, from .bbl files. Items from thebibliography become misc entries with their label, raw source and plain text.

BibTeX and CSL-JSON output

bibtex::write produces BibTeX text: @string, @preamble and @comment blocks first, then the entries with their fields. Field values are written from the expanded text, so macro names are not kept. csl_json returns a CSL-JSON array with crossref inheritance applied.

MathML as TeX, with a flag

to_tex returns a Converted value: the TeX string, from_annotation (true when the TeX came from the annotation), and warnings. An unsupported MathML element produces a warning and its content is kept.

How it works

What does the code do, step by step?

  1. 1

    Lex

    The lexer reads control words, control symbols, text, groups and math delimiters. Comments are removed, and \verb takes any delimiter (superdocuments/src/latex/lexer.rs).

  2. 2

    Parse with a stack of sources

    The main document is at the bottom of a stack. Macro expansions and \input files are pushed on top and read in place. Math, verbatim bodies and file paths are read as raw text (superdocuments/src/latex/parser.rs:99).

  3. 3

    Number and label as it goes

    The reader counts sections, figures, tables, equations and theorems, and records each \label with its number (push_label, superdocuments/src/latex/parser.rs:224). References are resolved by the renderer after the whole document is read, so a forward reference works (docs/ARCHITECTURE.md, lines 111-116).

  4. 4

    Choose and read the main file of an e-print

    select_main prefers a .tex with both \documentclass and \begin{document}, then one with only \begin{document}, then one with only \documentclass, then the largest .tex. read_eprint_with then parses it, decoding a non-UTF-8 file as Latin-1 with a warning (superdocuments/src/arxiv_source/mod.rs:123-165).

  5. 5

    Resolve figure images inside the archive

    For each \includegraphics the candidates are tried in order: .pdf, .png, .jpg, .jpeg, .eps, then the path as written. A path that already ends in one of those extensions gets only itself (image_candidates, superdocuments/src/latex/parser.rs:2070). A path with another ending, such as .svg, gets the extension list first, then itself.

  6. 6

    Render, and report problems

    The renderers write Markdown, text or HTML from the same Document (superdocuments/src/latex/render.rs). Archive errors stop the read with no partial result. Parser problems are kept in Document.warnings, up to 10,000 entries (latex::Options.max_warnings).

Measured

What did we measure, and how?

LaTeX and BibTeX readers against Pandoc 3.1.3

Run of 2026-11-06

How fast does each tool turn LaTeX into Markdown and BibTeX into structured references, and do they agree on document structure?

Corpus. 16 LaTeX files and 5 BibTeX files, all hand-made, in tests/fixtures/latex and tests/fixtures/bibtex of the superdocuments repository (Apache-2.0). They are not real papers.

ToolVersionRole
superdocuments command linethe checked-out revision, built with cargo build --locked --example latex_benchSubject.
Pandoc3.1.3 (-f latex -t markdown, -f latex -t json, -f bibtex -t csljson)Comparison.
MetricHow it is computed
TimeMedian wall time of 20 runs of each command line, process start included, one after another on one core (taskset when available). The in-process row is the median parse-and-render time without process start.
Structure agreementCounts of headings, lists, tables, figures, citations, links, images and math in each tool's output (our counts, Pandoc's JSON) are compared per file; every difference is written out and explained by hand.
MeasurementsuperdocumentsPandoc 3.1.3
LaTeX to Markdown, median over 16 files3.97 ms23.97 ms (6.0 times)
LaTeX to Markdown, per-file speed-up, median and range7.1 times5.3 to 13.4 times
LaTeX parse and render, in process, median0.064 msnot applicable
LaTeX structure differences0 on 14 of 16 files2 on figures.tex, both from one figure* environment that Pandoc drops
BibTeX files converted5 of 52 of 5 (a parenthesis-delimited entry, a missing comma, and an out-of-memory on a crossref cycle)
BibTeX, the two files Pandoc converted4.02 and 3.27 ms23.99 and 53.15 ms
1git clone https://github.com/webfold-ai/superdocuments
2cd superdocuments
3cargo build --locked --example latex_bench
4python3 benches/latex-vs-pandoc/run_benchmark.py --runs 20 --out /tmp/latex-bench

Reproduce: superdocuments/benches/latex-vs-pandoc/run_benchmark.py (needs pandoc 3.1.3 on PATH). Figures read from superdocuments/benches/latex-vs-pandoc/results.json, run-stdout.txt, disagreements.txt and explanations.txt.

Limits of this measurement

  • Hand-made fixtures, 16 LaTeX and 5 BibTeX files. This is not a TeX engine: packages are not loaded, and Pandoc covers many more packages and macros than this reader.
  • Only two BibTeX files could be timed on both sides. The explanation for the figures.tex difference is ours, written after reading the source; the run does not say which tool is right by an independent check.
  • The host's hardware is not recorded in the result file. Command-line timings include process start, which is most of the time for a small file.
  • The LaTeX and BibTeX readers are in superdocuments and in the revision Webfold pins, but the Webfold command line does not route them. This run was taken on 6 November, before the Pandoc-layout rewrite of the LaTeX reader, and the speed was not measured again.

LaTeX and BibTeX benchmark →

Embedded image listing against poppler pdfimages

Run of not recorded (the results files carry no date)

Does pdf::extract_images list the same images as poppler's pdfimages, with the same page, size, colour space, bits and encoding, and the same decoded pixels?

Corpus. Two PDFs in tests/fixtures/pdf-images/ of the superdocuments repository (Apache-2.0): images-mixed.pdf (6 images across 4 pages) and inherited-predictor.pdf (1 image). 7 images in all.

ToolVersionRole
superdocuments pdf::extract_imagesthe example pdf_image_list, built from the checked-out revisionSubject.
pdfimagesPoppler; the version is not recorded in the results files (24.02.0 is the version used for the other PDF benchmark)Reference: -list, -j and -png.
MetricHow it is computed
AgreementPer image: page, width and height, colour space, bits per component and encoding category match pdfimages -list; JPEG bytes equal pdfimages -j output; decoded PNG pixels equal pdfimages -png output (both decoded with Pillow). A disagreement is any image where one check fails, or a different image count.
FixturePage and objectSize and colour spaceOurs / poppler encodingResult
images-mixed.pdfpage 1, object 316x8 DeviceRGB, 8 bitpng / imageok
images-mixed.pdfpage 1, object 48x4 DeviceGray, 8 bitpng / imageok
images-mixed.pdfpage 1, object 532x24 DeviceRGB, 8 bitjpeg / jpegok
images-mixed.pdfpage 2, object 64x2 Indexed, 2 bitraw / imageok
images-mixed.pdfpage 3, object 716x16 DeviceGray, 8 bitjpeg / jpegok
images-mixed.pdfpage 4, object 316x8 DeviceRGB, 8 bitpng / imageok
inherited-predictor.pdfpage 1, object 35x6 DeviceRGB, 8 bitpng / imageok
Total7 images0 disagreements
1git clone https://github.com/webfold-ai/superdocuments
2cd superdocuments
3python3 benches/pdf-images/compare_pdfimages.py tests/fixtures/pdf-images/images-mixed.pdf
4python3 benches/pdf-images/compare_pdfimages.py tests/fixtures/pdf-images/inherited-predictor.pdf

Reproduce: superdocuments/benches/pdf-images/compare_pdfimages.py (needs poppler-utils, Pillow and a Rust toolchain). Figures read from superdocuments/benches/pdf-images/results-images-mixed.txt and results-inherited-predictor.txt.

Limits of this measurement

  • Seven small images in two PDFs, tiny (at most 32 by 24 pixels) and made for the test. It shows the listing agrees with poppler on these files; it says nothing about large or unusual real-world PDFs.
  • Agreement with pdfimages is not a correctness proof: both could be wrong the same way, and an image that pdfimages does not list is not checked.
  • The results files are undated and record no tool versions; the run was not repeated for this page. There is no timing: this is a correctness check only.
  • Our PNG output uses stored (uncompressed) deflate blocks, so the files are larger than they need to be.

Evidence

How do we know each claim?

Each row says how we know. Read from the code means the behaviour is in the implementation at the path shown. Covered by a test names a test in the repository; this page does not claim it was run for this release. Measured points to a benchmark with its protocol and limits.

ClaimHow we knowWhereDetail
read_eprint takes bytes and runs unpack, main-file selection, parsing, bibliography and figure resolution, with no I/ORead from the codesuperdocuments/src/arxiv_source/mod.rs:123read_eprint_with unpacks the data, selects the main file, parses it with an archive-backed FileProvider, collects bibliography and figures, and returns warnings. A grep of src/arxiv_source for std::net, reqwest and std::fs finds only a test helper that reads a fixture.
The archive unpacker accepts gzip tar, plain tar or a single gzip TeX file, and refuses unsafe paths and linksRead from the codesuperdocuments/src/arxiv_source/archive.rs:81unpack() returns the tar's regular files, or main.tex for a single gzip file, or NotAnArchive. read_tar refuses hard and symbolic links (:239). validate_path refuses absolute paths, .., backslashes and empty names (:297-317).
\input and \include resolve through a FileProvider, with the archive lookup relative to the main fileRead from the codesuperdocuments/src/latex/parser.rs:1087include() asks the provider for the name, then the name with .tex. Without a provider it records the name in inputs and warns. arxiv_source/mod.rs find_entry tries base plus name, then name as written.
Macros expand in text; \usepackage is dropped silently; unknown commands warn and keep their argumentsRead from the codesuperdocuments/src/latex/parser.rs:715newcommand, renewcommand, providecommand, DeclareMathOperator are handled at :715-723. The unknown-command warning is at :850. drop_spec (:2084) drops usepackage, documentclass and others without a warning.
Math is written as $...$ and $$ blocks, figures as captions and ![](declared), citations as textRead from the codesuperdocuments/src/latex/render.rs:185inline_math and display_math (:185-222) write $ and $$ with \tag for numbered rows. image (:244) writes ![](p.declared), the path as written. cite (:323) writes (label) text from thebibliography or a supplied Bibliography, else the key.
BibTeX write emits expanded field values; undefined macros warn; duplicate keys keep both entriesRead from the codesuperdocuments/src/bibtex/write.rs:18write() prints each field as its raw (expanded) value. parse.rs:303 warns on an undefined macro, parse.rs:207 on a duplicate key, and parse.rs:263 keeps the first of repeated fields.
MathML returns an annotation's TeX when one exists, and keeps unknown element content with a warningRead from the codesuperdocuments/src/mathml.rs:85to_tex calls tex_annotation (:163), which accepts an annotation under semantics whose encoding contains 'tex'. Unknown elements produce 'unsupported MathML element' (:718) and keep their children.
PDF images are listed with bytes; the text output marks each image as an object-numbered markerRead from the codesuperdocuments/src/pdf/images.rs:54extract_images returns page, object number, size, colour space, filters and encoding, with JPEG and JPX unchanged and Flate as stored-deflate PNG. The text path writes ![](img_{obj}.png) at superdocuments/src/pdf/parser/parse.rs:971, using the object number, not a sequence index.
webfold arxiv get reads arXiv HTML first and the PDF on a 404; it does not fetch the e-printRead from the codewebfold/src/arxiv/mod.rs:264retrieve() gets /html/<id>. On a 404 it gets /pdf/<id> and calls document::convert_bytes("pdf") (:280). The src/arxiv tree has no e-print or tar code.
The webfold PDF fallback has no pdf arm in convert_bytes, so it returns an unsupported-extension errorRead from the codesuperdocuments/src/document.rs:849superdocuments convert_bytes has no pdf case, so the error is 'unsupported document extension: pdf'. The webfold wrapper (src/document.rs:126) adds only xls and csv before delegating.
webfold uses superdocuments for document, pdf, epub and graph only; not latex, bibtex, arxiv_source or mathmlRead from the codewebfold/src/cli/document.rs:260The superdocuments paths used in webfold are document::convert_bytes and convert_path, pdf::extract_markdown and related pdf functions, epub::read and extract_text, and graph. A grep of webfold src for latex::, bibtex::, arxiv_source:: and mathml:: finds no use outside its own arxiv code.
Named test: an archive gives its main file, document, bibliography and figuresCovered by a testsuperdocuments/src/arxiv_source/tests.rs:36paper_archive_gives_main_file_document_bibliography_and_figures checks the \input inlining, bibliography keys, figure label and format, and EPS detection. Not run.
Measured: pandoc 3.1.3 agrees on 16 LaTeX fixtures except figure*; pandoc fails on three of five BibTeX filesMeasuredsuperdocuments/benches/latex-vs-pandoc/results.json20 runs per timing. figures.tex differs on figures_top_level (ours 4, pandoc 5) and figures_with_caption (ours 6, pandoc 5). pandoc fails on basic.bib (unexpected '('), malformed.bib and crossref-biblatex.bib (out of memory on a crossref cycle). The file has no date; disagreements.txt and the comparison matrix date from 2026-11-06. Hand-made fixtures.
Measured: LaTeX fidelity to Pandoc's reading rose from 0.857 to 0.968 over 118 documents; 179 of 179 BibTeX entries match Pandoc's CSL-JSONMeasuredsuperdocuments, benches/pandoc-compat (merged to main after the revision Webfold pins): README.md, results/sd-before.json, results/sd-after.json, results/sd-after-bib.jsonPandoc 3.1.3 reads each file; the score is the mean of structure, features and words in superdocuments' Markdown as Pandoc reads it back. Before is superdocuments main from before the Pandoc-compatibility work, built clean and scored on the same corpus. 10 of 118 documents are identical; the six hand-written ones average 0.779, mostly because superdocuments appends a reference list from the .bib and Pandoc does not. Pseudocode in algorithmic environments is kept as source, where Pandoc keeps only the math. Generated documents come from seeded scripts, so this is not a sample of real papers. Formatted citations were compared with pandoc --citeproc on 125 documents with 6 styles (7,454 of 7,458 citations and 4,362 of 4,362 entries identical; the processor was developed on this set) and on 4 other styles (5,079 of 5,080 and 2,214 of 2,952 after fixes; 4,929 and 1,923 on the first run).
Measured: PDF image listing agrees with poppler pdfimages on 7 test imagesMeasuredsuperdocuments/benches/pdf-images/results-images-mixed.txt6 images in images-mixed.pdf and 1 in inherited-predictor.pdf, with 0 disagreements against pdfimages (results-inherited-predictor.txt). The files carry no date.
The hosted arXiv retrieval reads LaTeX source and its .bib bibliography when there is no HTML versionCovered by a testwebfold-saas-api/src/arxiv_fetch.rs (tests module); live check 2026-11-07Nine unit tests pass in a scratch crate built against the real superdocuments and arxiv-search crates. Live, with HTML forced off: 1706.03762v1 (38k characters), hep-th/9901001 (12k) and 2401.04088v1 (38k, with 47 bibliography entries from its .bib). The change is merged into the hosted API's main branch. That crate did not build in the sandbox, so its main.rs wiring was not compiled there, and the hosted service was not checked.

What are the limits?

Know the limits

  • Not a TeX engine, and packages are not loaded. natbib, cleveref, siunitx, algorithmic, hyperref and custom .sty files are not read. Their commands come out as unknown-command warnings with their arguments kept as text. The local comparison notes say pandoc covers many more packages and macros (benches/latex-vs-pandoc/explanations.txt).
  • Math is kept as TeX, not rendered, and not checked. The reader computes equation numbers from the environment and does not run TeX (superdocuments/src/latex/mod.rs, lines 1-20). A PDF gives no TeX at all: equations come out as the glyphs the page draws, and no module in src/pdf refers to LaTeX, MathML or tex_text.
  • Figures are partial. A PDF's embedded images appear only as ![](img_<object>.png) markers with no captions linked: graph.rs defines Figure and Caption region kinds, but no builder assigns them. A tikzpicture is kept as its source and not drawn (superdocuments/src/latex/render.rs:511). Markdown writes the declared path, not the resolved file, so a path given without an extension does not match the file on disk (superdocuments/src/latex/render.rs:244).
  • Citations are text. A \cite key resolves first to a thebibliography item, then to a supplied Bibliography, and is shown as text such as (Author, Year). With neither, the key itself is shown. Nothing is a hyperlink (superdocuments/src/latex/render.rs:323-368; superdocuments/src/latex/mod.rs:378).
  • A BibTeX round trip changes the source. write() emits expanded field values, so @string names and # joins are not kept, and layout changes. Duplicate keys are both kept with a warning, and a repeated field keeps its first value (superdocuments/src/bibtex/write.rs:18; superdocuments/src/bibtex/parse.rs:207, :263).
  • Webfold does not expose these readers on the command line. The CLI and MCP server do not route .tex, .bib, .mml or e-print files (webfold/src/cli/document.rs:128-138 lists the extensions they accept), although the superdocuments revision Webfold pins (68c216f, webfold/Cargo.toml) contains the modules src/latex, src/bibtex, src/arxiv_source and src/mathml.rs. The Rust function webfold::document::convert_bytes passes those extensions through to superdocuments.
  • Webfold's main branch fixes the PDF fallback of webfold arxiv get (it called convert_bytes with pdf, which has no handler, so a paper with no HTML rendition failed), honours the requested version (v2 used to fetch the latest) and has webfold arxiv bibtex, the paper's own citation from its metadata. It does not use the LaTeX source route: the superdocuments revision it pins has the LaTeX and e-print readers, but webfold arxiv does not call them. The hosted /v1/arxiv/retrieve endpoint is written to try HTML, then LaTeX source with its .bib bibliography, then PDF, and that change is merged in the hosted API's main branch.
  • arXiv HTML formula cleanup changes TeX. finish() restores formulas and then runs clean_latex_artifacts over the whole text, which turns \\ into \ and collapses double spaces inside formulas as well as prose (webfold/src/arxiv/html.rs:30-32 and :149-152). Read from code and not run; the unit test covers prose residue only.

Compared

How does it compare with other tools?

Compared withWhat the evidence saysSource
pandocPandoc reads and writes LaTeX and BibTeX/BibLaTeX, and offers --citeproc. In the local comparison on 16 LaTeX and 5 BibTeX fixtures, the structure counts matched except for figure*, which pandoc drops. Pandoc failed on three of five BibTeX files. These are hand-made fixtures, not real papers. A larger comparison (superdocuments main, after the revision Webfold pins) scored 118 LaTeX files against Pandoc 3.1.3's reading: mean fidelity 0.857 before, 0.968 after, 10 documents identical; the six hand-written LaTeX files average 0.779. It also compares 179 BibTeX entries (0 identical before, 179 after) and formatted citations with pandoc --citeproc.Pandoc manual; superdocuments/benches/latex-vs-pandoc/results.json and disagreements.txt
pandoc (coverage)Pandoc's manual gives no construct-by-construct table of what its LaTeX reader covers, and Pandoc has no PDF input. The local notes say Pandoc covers more packages and macros than this reader.Pandoc manual; superdocuments/benches/latex-vs-pandoc/explanations.txt
markerMarker's README lists equations and inline math among its formatted items: equations are recognised by a vision model, and inline math is converted to LaTeX in its balanced mode. Its JSON block types include Figure and Caption. The README documents no BibTeX output.marker README
DoclingDocling's formula enrichment (do_formula_enrichment, LaTeX conversion) is off by default, and its README lists metadata and reference extraction under 'Coming soon'.Docling pipeline options; Docling README
MinerUMinerU's README lists LaTeX as one of its rendering targets and formulas among its content types. The exact form of its formula output was not verified.MinerU README
Poppler (pdfimages)pdfimages lists and extracts embedded image streams, with no caption or formula output. On the two local PDF fixtures the image list agreed with pdfimages on all 7 images.pdfimages source; superdocuments/benches/pdf-images/results-images-mixed.txt

Where should I read next?

FAQ

Frequently asked questions

Can webfold read a LaTeX file today?

Not through the CLI or MCP server. webfold convert does not route .tex or .bib, so the file is read as text and passed through the HTML converter (webfold/src/cli/document.rs:130-150). The LaTeX reader is in the superdocuments crate, and webfold does not call it.

Do I get figure images from an arXiv paper?

Through the superdocuments API, yes, if you have the e-print archive: read_eprint returns each figure's image bytes and format. webfold arxiv get does not fetch the e-print. It returns image links as !alt from the HTML version.

How are equations represented?

As TeX. The LaTeX reader and the arXiv HTML path keep math as $...$ or $$...$$. MathML is converted to TeX from its annotation when present, and from its presentation markup otherwise. A PDF gives glyphs with no TeX.

What can I do with a PDF that has no source?

Extract the text, list the embedded images with their bytes (pdf::images::extract_images), and read the image markers in the text. There are no captions linked to figures, no equations as TeX, and no citation links.

How does the arXiv reader choose the main file?

It prefers a .tex with both \documentclass and \begin{document}, then one with only \begin{document}, then one with only \documentclass, and finally the largest .tex (superdocuments/src/arxiv_source/mod.rs, select_main).

Read Scientific sources with Webfold.

Run the command-line tool today, and join the waitlist for the hosted API.