# LaTeX to PDF Compiler API: Papers, Resumes, Slides & Theses (`jumblemog/latex-to-pdf`) Actor

Compile LaTeX to PDF: papers, theses, resumes, beamer slides and whole projects downloaded from Overleaf or GitHub. BibTeX, TikZ, pgfplots and Unicode fonts work out of the box, and errors come back with file, line and context so people and AI agents can fix them.

- **URL**: https://apify.com/jumblemog/latex-to-pdf.md
- **Developed by:** [Jumble Mog](https://apify.com/jumblemog) (community)
- **Categories:** Developer tools, AI, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per event

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## LaTeX to PDF Compiler API: Papers, Resumes, Slides & Theses

**Compile LaTeX to PDF without installing anything.** Send a LaTeX document, a link to a whole project (a ZIP downloaded from Overleaf, a GitHub repository or folder, or a single `.tex` file) or upload it, and get back a **PDF** with a download link. BibTeX bibliographies, cross-references and the table of contents are resolved automatically, packages load on demand, and when something is wrong you get the **errors with file, line and the exact source** where TeX stopped, so a person or an AI agent can fix them and try again. Many documents per run, pay per PDF, and documents that don't compile are free.

![A LaTeX paper with an equation, a table, a TikZ figure and a citation, the PDF this Actor made from it, and the JSON results for a compiled document and for one with a mistake](https://api.apify.com/v2/key-value-stores/Km5b4PG3kYHdZSb1E/records/latex-to-pdf-example.png?signature=IUUOLQjjiFztuKVWHlfo)

### What it does

- **Complete LaTeX**: articles, reports, books, theses, letters, `beamer` slides and resumes (`moderncv`, Jake's resume), with the packages people actually use: amsmath, TikZ and pgfplots, booktabs, siunitx, listings, algorithms, hyperref, cleveref, tcolorbox, natbib and biblatex (BibTeX backend), and thousands more from TeX Live, loaded the first time a document asks for them.
- **Journal and conference templates ready**: IEEE (`IEEEtran`), ACM (`acmart`), Elsevier (`elsarticle`), Springer LNCS (`llncs`), APS (`revtex4-2`), AMS (`amsart`), KOMA-Script and `memoir` are already in the Actor with their citation styles, so they compile without waiting for downloads.
- **Whole projects**: `\input` and `\include` files in subfolders, images, `.bib` files and custom `.cls` and `.sty` files. The main file is found automatically (`main.tex`, else the file with `\documentclass`), or you name it.
- **Links that just work**: ZIP files (Overleaf's *Download > Source*), GitHub repository and folder links (downloaded as a ZIP), raw `.tex` links, GitHub file pages, Google Drive and Dropbox share links, and files uploaded in the input form.
- **Errors you can act on**: each error comes back as `{"file", "line", "message", "context"}`, for example `main.tex:8: Undefined control sequence. (at: \undefinedmacro{x})`, plus the full log file. Warnings tell you about undefined references and citations, lines too wide for the page and characters missing from the font.
- **Unicode and fonts**: the engine is XeTeX, so UTF-8 text, accents and other scripts work directly, and `fontspec` can use TeX Gyre, Latin Modern, Liberation and DejaVu fonts by name.
- **pdfLaTeX templates too**: common pdfTeX-only commands (`\pdfgentounicode`, `glyphtounicode`, `\pdfminorversion`, `\pdfinfo` and others) are handled, so templates written for pdfLaTeX compile without edits.
- **Batch compiling**: send a list of documents, each with its own name, main file and extra files.
- **The PDF straight from the API**: the first PDF is also the run's `OUTPUT`, so the run-sync endpoint answers with the PDF itself, or with the errors as JSON.
- **Safe with untrusted LaTeX**: shell escape is off, the engine runs as an unprivileged user in a throwaway folder with a time limit, and it can't read the Actor's environment or other runs' files.

### Who it's for

- **AI agents and LLM apps** that write LaTeX (resumes, cover letters, papers, math worksheets, invoices, slides) and need a PDF to send. The error report lets an agent fix its own LaTeX in a loop.
- **Automation builders** in n8n, Make or Zapier who fill LaTeX templates with data: certificates, reports, letters, quotes.
- **Researchers and students** who want a quick PDF from a project or a GitHub repository without installing TeX Live.
- **Developers** who need LaTeX rendering in an app without running TeX on their own servers.

### How to use it

1. Paste a LaTeX document into **LaTeX document**, add links in **Links to LaTeX projects**, or upload a project ZIP.
2. If your project has extra files (images, a `.bib` file), add them in **Extra files**, or include them in the ZIP.
3. Click **Start**. Each document appears in the **Output** tab with its PDF link, or with its errors.

You can also run it through the [Apify API](https://docs.apify.com/api/v2), on a schedule, or from Make, n8n, Zapier and other integrations.

### Input

| Field | What it does |
| --- | --- |
| `latex` | One complete LaTeX document. |
| `projectUrls` | Links to projects: ZIP files, GitHub repository or folder links, `.tex` files, Google Drive or Dropbox share links. |
| `uploads` | Project ZIPs or `.tex` files uploaded in the input form. |
| `files` | Extra files for the documents: objects with a `name` (relative path such as `images/logo.png`) and a `url`, or the `content` of a text file. |
| `mainFile` | The main `.tex` file inside projects. Empty (default): found automatically. |
| `documents` | More documents: a list of LaTeX strings, or objects with `latex` or `url` and optional `name`, `mainFile` and `files`. |
| `compileTimeoutSecs` | Time limit per document, 10 to 900 seconds (default 120). |
| `maxDocuments` | Stop after this many documents (default 100). |

Example with a batch:

```json
{
  "documents": [
    {"name": "resume", "url": "https://github.com/jakegut/resume"},
    {"name": "thesis", "url": "https://example.com/my-thesis.zip", "mainFile": "thesis.tex"},
    {"name": "letter", "latex": "\\documentclass{letter}\n\\begin{document}\n\\begin{letter}{Ms. Smith}\n\\opening{Dear Ms. Smith,}\nThank you.\n\\closing{Best regards,}\n\\end{letter}\n\\end{document}",
     "files": [{"name": "signature.png", "url": "https://example.com/signature.png"}]}
  ]
}
```

### Output

Each document becomes one dataset item, and the PDF and log are saved in the run's key-value store:

```json
{
  "index": 1,
  "name": "resume",
  "status": "ok",
  "error": null,
  "errors": [],
  "warnings": [],
  "pdfUrl": "https://api.apify.com/v2/key-value-stores/<store>/records/001-resume.pdf?signature=...",
  "logUrl": "https://api.apify.com/v2/key-value-stores/<store>/records/001-resume.log?signature=...",
  "pages": 1,
  "sizeBytes": 33062,
  "mainFile": "resume.tex",
  "sourceUrl": "https://github.com/jakegut/resume",
  "processingSeconds": 1.4
}
```

When a document has a mistake, the item says where, and isn't billed:

```json
{
  "index": 2,
  "status": "failed",
  "error": "main.tex:8: Undefined control sequence. (at: \\undefinedmacro{x})",
  "errors": [{"file": "main.tex", "line": 8, "message": "Undefined control sequence.", "context": "\\undefinedmacro{x}"}],
  "warnings": ["LaTeX Warning: Reference `sec:results' on page 1 undefined on input line 4."],
  "pdfUrl": null,
  "logUrl": "https://api.apify.com/v2/key-value-stores/<store>/records/002-main.log?signature=..."
}
```

A missing package or file says so too, for example `LaTeX Error: File 'foo.sty' not found.` Download your files within your plan's data retention period, or copy them to your own storage, because run storage expires.

### Pricing

You pay per **document compiled to PDF**, at the price shown on this page. Documents that don't compile are never charged. If you set a maximum cost per run, the Actor stops when the next document wouldn't fit.

### Speed

Measured on Apify with the default 4 GB of memory (one CPU core, which is all a TeX engine uses): the example paper above (math, a table, a TikZ figure and a BibTeX bibliography) compiled in 2.2 seconds, Jake's resume straight from GitHub in 1.4 seconds including the download, an IEEE conference paper in 1.0 second, beamer slides in 2.3 seconds, a moderncv resume in 3.8 seconds and an ACM `acmart` paper, the heaviest common template, in 12 seconds. A document with a mistake fails in under half a second. Starting a run adds a few seconds, so send many documents in one run when you can.

### Tips and limits

- The engine is XeTeX (through [Tectonic](https://tectonic-typesetting.github.io)), which compiles nearly all pdfLaTeX documents as well. Shell escape is off, so packages that run outside programs (`minted`, `\write18`, `gnuplottex`) aren't supported; use `listings` instead of `minted`.
- Bibliographies run through BibTeX: `\bibliography{...}` with natbib or a `\bibliographystyle`, and biblatex with `backend=bibtex`. Biber isn't available, so set `backend=bibtex` in biblatex's options.
- A single document can carry its own bibliography: put the BibTeX entries in a `filecontents*` environment named `refs.bib` before `\begin{document}`, as the example input does.
- Paths are relative to the main file's folder, as on Overleaf.
- TeX packages come from a pinned TeX Live 2022 snapshot. The common packages, fonts, citation styles and templates are already in the Actor; others are downloaded the first time a document uses them, which adds a few seconds.
- System fonts for `fontspec`: TeX Gyre (Pagella, Termes, Heros, Bonum, Schola, Adventor, Cursor and their math fonts), Latin Modern, Liberation and DejaVu. Fonts in your project folder can be loaded by file name, for example `\setmainfont{MyFont.otf}`.
- Projects can have up to 3,000 files and 300 MB unpacked, and each download up to 100 MB.

### For AI agents and developers

This Actor works with the [Apify MCP server](https://mcp.apify.com), so AI agents can call it as a tool: pass the document in `latex` (or a project link in `projectUrls`) and read `pdfUrl` from the dataset item. If `status` is `failed`, the `errors` list says what to fix, with the file, line and source text: fix it and call again. For a direct API call that waits for the result:

```bash
curl -X POST "https://api.apify.com/v2/acts/jumblemog~latex-to-pdf/run-sync-get-dataset-items?token=YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"latex": "\\documentclass{article}\n\\begin{document}\nHello, $e^{i\\pi} + 1 = 0$.\n\\end{document}"}'
```

To get the PDF itself as the response, call `run-sync` instead. It returns the run's `OUTPUT`, which is the first PDF (or the first document's errors as JSON):

```bash
curl -X POST "https://api.apify.com/v2/acts/jumblemog~latex-to-pdf/run-sync?token=YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"projectUrls": ["https://github.com/jakegut/resume"]}' \
  -o resume.pdf
```

### Credits

- [Tectonic](https://tectonic-typesetting.github.io) (MIT), built on XeTeX and the TeX Live distribution, whose packages keep their own free licenses. Fonts: TeX Gyre (GUST Font License), Latin Modern, Liberation (OFL) and DejaVu. This Actor isn't affiliated with these projects or with Overleaf.

# Actor input Schema

## `latex` (type: `string`):

A complete LaTeX document, from \documentclass to \end{document}. Packages are loaded automatically, and BibTeX runs when the document has a bibliography (a .bib file can be included with filecontents, or added under Extra files).

## `projectUrls` (type: `array`):

ZIP files of whole projects (for example downloaded from Overleaf with Menu > Download > Source), GitHub repository or folder links, links to single .tex files, or Google Drive and Dropbox share links. The main file is found automatically, or set it in Main file.

## `uploads` (type: `array`):

Upload a project ZIP or a .tex file from your computer, or pick files you already stored in an Apify key-value store.

## `files` (type: `array`):

Files the documents need, such as images, .bib bibliographies or custom .cls and .sty files. Each entry has a "name" (a relative path like "images/logo.png") and either a "url" or, for text files, the "content".

## `mainFile` (type: `string`):

The main .tex file inside projects, such as thesis.tex or src/main.tex. Empty: main.tex, else the file with \documentclass nearest the top of the project.

## `documents` (type: `array`):

A list of documents to compile in the same run. Each entry is a LaTeX string, or an object with "latex" or "url" and optional "name", "mainFile" and "files".

## `compileTimeoutSecs` (type: `integer`):

Stop compiling a document after this many seconds. Most documents take a few seconds; long theses with many figures can take a minute.

## `maxDocuments` (type: `integer`):

Stop after this many documents, so the cost of a run stays predictable.

## Actor input object example

```json
{
  "latex": "\\documentclass[11pt]{article}\n\\usepackage[margin=2.5cm]{geometry}\n\\usepackage{amsmath,amssymb}\n\\usepackage{booktabs}\n\\usepackage{tikz}\n\\usepackage[colorlinks, allcolors=blue!60!black]{hyperref}\n\\begin{filecontents*}{refs.bib}\n@article{knuth1984,\n  author  = {Donald E. Knuth},\n  title   = {Literate Programming},\n  journal = {The Computer Journal},\n  year    = {1984},\n  volume  = {27},\n  pages   = {97--111}\n}\n\\end{filecontents*}\n\n\\title{Compiling \\LaTeX{} in the Cloud}\n\\author{An AI Agent}\n\\date{October 2026}\n\n\\begin{document}\n\\maketitle\n\n\\begin{abstract}\nThis short paper has equations, a table, a TikZ figure and a citation, all compiled to PDF by one API call.\n\\end{abstract}\n\n\\section{Results}\nThe quadratic formula gives the roots of $ax^2 + bx + c = 0$:\n\\begin{equation}\n  x = \\frac{-b \\pm \\sqrt{b^2 - 4ac}}{2a}.\n  \\label{eq:quadratic}\n\\end{equation}\nEquation~\\eqref{eq:quadratic} has two real roots when $b^2 > 4ac$, as Table~\\ref{tab:cases} shows.\n\n\\begin{table}[h]\n  \\centering\n  \\begin{tabular}{lcc}\n    \\toprule\n    Case      & Discriminant     & Real roots \\\\\n    \\midrule\n    Two roots & $b^2 - 4ac > 0$  & 2 \\\\\n    One root  & $b^2 - 4ac = 0$  & 1 \\\\\n    None      & $b^2 - 4ac < 0$  & 0 \\\\\n    \\bottomrule\n  \\end{tabular}\n  \\caption{Roots of a quadratic equation.}\n  \\label{tab:cases}\n\\end{table}\n\n\\begin{figure}[h]\n  \\centering\n  \\begin{tikzpicture}[scale=0.8]\n    \\draw[->] (-3,0) -- (3,0) node[right] {$x$};\n    \\draw[->] (0,-1.5) -- (0,4) node[above] {$y$};\n    \\draw[thick, blue, domain=-2.2:2.2, samples=50] plot (\\x, {\\x*\\x - 1});\n    \\fill[red] (-1,0) circle (2pt) (1,0) circle (2pt);\n  \\end{tikzpicture}\n  \\caption{$y = x^2 - 1$ crosses the $x$-axis twice.}\n\\end{figure}\n\nLiterate programming~\\cite{knuth1984} inspired documents that mix code and prose.\n\n\\bibliographystyle{plain}\n\\bibliography{refs}\n\\end{document}\n",
  "files": [],
  "compileTimeoutSecs": 120,
  "maxDocuments": 100
}
```

# Actor output Schema

## `results` (type: `string`):

One item per document: PDF link, page count, warnings, or the errors.

## `files` (type: `string`):

The PDFs and logs saved in the run's key-value store.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "latex": `\documentclass[11pt]{article}
\usepackage[margin=2.5cm]{geometry}
\usepackage{amsmath,amssymb}
\usepackage{booktabs}
\usepackage{tikz}
\usepackage[colorlinks, allcolors=blue!60!black]{hyperref}
\begin{filecontents*}{refs.bib}
@article{knuth1984,
  author  = {Donald E. Knuth},
  title   = {Literate Programming},
  journal = {The Computer Journal},
  year    = {1984},
  volume  = {27},
  pages   = {97--111}
}
\end{filecontents*}

\title{Compiling \LaTeX{} in the Cloud}
\author{An AI Agent}
\date{October 2026}

\begin{document}
\maketitle

\begin{abstract}
This short paper has equations, a table, a TikZ figure and a citation, all compiled to PDF by one API call.
\end{abstract}

\section{Results}
The quadratic formula gives the roots of $ax^2 + bx + c = 0$:
\begin{equation}
  x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}.
  \label{eq:quadratic}
\end{equation}
Equation~\eqref{eq:quadratic} has two real roots when $b^2 > 4ac$, as Table~\ref{tab:cases} shows.

\begin{table}[h]
  \centering
  \begin{tabular}{lcc}
    \toprule
    Case      & Discriminant     & Real roots \\
    \midrule
    Two roots & $b^2 - 4ac > 0$  & 2 \\
    One root  & $b^2 - 4ac = 0$  & 1 \\
    None      & $b^2 - 4ac < 0$  & 0 \\
    \bottomrule
  \end{tabular}
  \caption{Roots of a quadratic equation.}
  \label{tab:cases}
\end{table}

\begin{figure}[h]
  \centering
  \begin{tikzpicture}[scale=0.8]
    \draw[->] (-3,0) -- (3,0) node[right] {$x$};
    \draw[->] (0,-1.5) -- (0,4) node[above] {$y$};
    \draw[thick, blue, domain=-2.2:2.2, samples=50] plot (\x, {\x*\x - 1});
    \fill[red] (-1,0) circle (2pt) (1,0) circle (2pt);
  \end{tikzpicture}
  \caption{$y = x^2 - 1$ crosses the $x$-axis twice.}
\end{figure}

Literate programming~\cite{knuth1984} inspired documents that mix code and prose.

\bibliographystyle{plain}
\bibliography{refs}
\end{document}`,
    "files": []
};

// Run the Actor and wait for it to finish
const run = await client.actor("jumblemog/latex-to-pdf").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "latex": """\\documentclass[11pt]{article}
\\usepackage[margin=2.5cm]{geometry}
\\usepackage{amsmath,amssymb}
\\usepackage{booktabs}
\\usepackage{tikz}
\\usepackage[colorlinks, allcolors=blue!60!black]{hyperref}
\\begin{filecontents*}{refs.bib}
@article{knuth1984,
  author  = {Donald E. Knuth},
  title   = {Literate Programming},
  journal = {The Computer Journal},
  year    = {1984},
  volume  = {27},
  pages   = {97--111}
}
\\end{filecontents*}

\\title{Compiling \\LaTeX{} in the Cloud}
\\author{An AI Agent}
\\date{October 2026}

\\begin{document}
\\maketitle

\\begin{abstract}
This short paper has equations, a table, a TikZ figure and a citation, all compiled to PDF by one API call.
\\end{abstract}

\\section{Results}
The quadratic formula gives the roots of $ax^2 + bx + c = 0$:
\\begin{equation}
  x = \\frac{-b \\pm \\sqrt{b^2 - 4ac}}{2a}.
  \\label{eq:quadratic}
\\end{equation}
Equation~\\eqref{eq:quadratic} has two real roots when $b^2 > 4ac$, as Table~\\ref{tab:cases} shows.

\\begin{table}[h]
  \\centering
  \\begin{tabular}{lcc}
    \\toprule
    Case      & Discriminant     & Real roots \\\\
    \\midrule
    Two roots & $b^2 - 4ac > 0$  & 2 \\\\
    One root  & $b^2 - 4ac = 0$  & 1 \\\\
    None      & $b^2 - 4ac < 0$  & 0 \\\\
    \\bottomrule
  \\end{tabular}
  \\caption{Roots of a quadratic equation.}
  \\label{tab:cases}
\\end{table}

\\begin{figure}[h]
  \\centering
  \\begin{tikzpicture}[scale=0.8]
    \\draw[->] (-3,0) -- (3,0) node[right] {$x$};
    \\draw[->] (0,-1.5) -- (0,4) node[above] {$y$};
    \\draw[thick, blue, domain=-2.2:2.2, samples=50] plot (\\x, {\\x*\\x - 1});
    \\fill[red] (-1,0) circle (2pt) (1,0) circle (2pt);
  \\end{tikzpicture}
  \\caption{$y = x^2 - 1$ crosses the $x$-axis twice.}
\\end{figure}

Literate programming~\\cite{knuth1984} inspired documents that mix code and prose.

\\bibliographystyle{plain}
\\bibliography{refs}
\\end{document}
""",
    "files": [],
}

# Run the Actor and wait for it to finish
run = client.actor("jumblemog/latex-to-pdf").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "latex": "\\\\documentclass[11pt]{article}\\n\\\\usepackage[margin=2.5cm]{geometry}\\n\\\\usepackage{amsmath,amssymb}\\n\\\\usepackage{booktabs}\\n\\\\usepackage{tikz}\\n\\\\usepackage[colorlinks, allcolors=blue!60!black]{hyperref}\\n\\\\begin{filecontents*}{refs.bib}\\n@article{knuth1984,\\n  author  = {Donald E. Knuth},\\n  title   = {Literate Programming},\\n  journal = {The Computer Journal},\\n  year    = {1984},\\n  volume  = {27},\\n  pages   = {97--111}\\n}\\n\\\\end{filecontents*}\\n\\n\\\\title{Compiling \\\\LaTeX{} in the Cloud}\\n\\\\author{An AI Agent}\\n\\\\date{October 2026}\\n\\n\\\\begin{document}\\n\\\\maketitle\\n\\n\\\\begin{abstract}\\nThis short paper has equations, a table, a TikZ figure and a citation, all compiled to PDF by one API call.\\n\\\\end{abstract}\\n\\n\\\\section{Results}\\nThe quadratic formula gives the roots of $ax^2 + bx + c = 0$:\\n\\\\begin{equation}\\n  x = \\\\frac{-b \\\\pm \\\\sqrt{b^2 - 4ac}}{2a}.\\n  \\\\label{eq:quadratic}\\n\\\\end{equation}\\nEquation~\\\\eqref{eq:quadratic} has two real roots when $b^2 > 4ac$, as Table~\\\\ref{tab:cases} shows.\\n\\n\\\\begin{table}[h]\\n  \\\\centering\\n  \\\\begin{tabular}{lcc}\\n    \\\\toprule\\n    Case      & Discriminant     & Real roots \\\\\\\\\\n    \\\\midrule\\n    Two roots & $b^2 - 4ac > 0$  & 2 \\\\\\\\\\n    One root  & $b^2 - 4ac = 0$  & 1 \\\\\\\\\\n    None      & $b^2 - 4ac < 0$  & 0 \\\\\\\\\\n    \\\\bottomrule\\n  \\\\end{tabular}\\n  \\\\caption{Roots of a quadratic equation.}\\n  \\\\label{tab:cases}\\n\\\\end{table}\\n\\n\\\\begin{figure}[h]\\n  \\\\centering\\n  \\\\begin{tikzpicture}[scale=0.8]\\n    \\\\draw[->] (-3,0) -- (3,0) node[right] {$x$};\\n    \\\\draw[->] (0,-1.5) -- (0,4) node[above] {$y$};\\n    \\\\draw[thick, blue, domain=-2.2:2.2, samples=50] plot (\\\\x, {\\\\x*\\\\x - 1});\\n    \\\\fill[red] (-1,0) circle (2pt) (1,0) circle (2pt);\\n  \\\\end{tikzpicture}\\n  \\\\caption{$y = x^2 - 1$ crosses the $x$-axis twice.}\\n\\\\end{figure}\\n\\nLiterate programming~\\\\cite{knuth1984} inspired documents that mix code and prose.\\n\\n\\\\bibliographystyle{plain}\\n\\\\bibliography{refs}\\n\\\\end{document}\\n",
  "files": []
}' |
apify call jumblemog/latex-to-pdf --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,jumblemog/latex-to-pdf"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/3hK4BJTRpOm20vjk9/builds/ZZ777wQWta7R14kxU/openapi.json
