# arXiv to LaTeX

Open an arXiv source archive as an editable LaTeX project instead of reverse-engineering the PDF.

When a paper's source is available, start there. arXiv to LaTeX downloads the submitted source bundle, identifies its main document, and keeps the supporting files together. That usually preserves far more structure than converting the PDF.

## Use it when

- you want to study how an arXiv paper was built;
- you are an author recovering or continuing your own submission;
- the source license and your intended use permit reuse.

Use [PDF to LaTeX](/docs/tools/pdf-to-latex/) only when a source archive is unavailable. The arXiv tool cannot open a paper whose submission does not include source files.

## Open a paper by ID

1. Open **arXiv to LaTeX**, or run `/arxiv-to-latex`.
2. Enter an identifier such as `1706.03762`. A full arXiv URL also works when it contains a recognizable ID.
3. Start the download and wait while Oleafly unpacks the source.
4. Review the detected main file and bundle contents.
5. Save the ZIP or create a LaTeX project.

Looking up an ID contacts arXiv and needs a network connection. If you already have a `.gz`, `.tgz`, or `.tar.gz` source archive, switch to file input and open it without a network request.

## Before you compile

An arXiv source bundle reflects the author's submission environment. It may depend on custom classes, local style files, fonts, generated data, or shell commands.

Review the archive before running it, then compile with bundled Tectonic first. If Oleafly identifies a compatibility issue, follow the specific recovery action rather than changing engines at random. [LaTeX engines and packages](/docs/latex-engines/) explains system TeX and its trust boundary.

:::caution[Source is executable input]
TeX projects can run external programs when compiled with a system toolchain. Only allow shell commands for source you trust and have inspected.
:::

The converter keeps the original files and reports which file it selected as the entry point. It does not promise that every historical submission will compile unchanged on a current TeX distribution.
