# HTML to LaTeX

Convert semantic HTML into a standalone LaTeX document you can edit, compile, or turn into a project.

HTML to LaTeX is useful when the content is already structured but trapped in web markup. Headings, paragraphs, emphasis, lists, links, and simple tables become LaTeX source instead of a copy-and-paste cleanup job.

## Use it when

- you control the HTML or have permission to reuse its content;
- the page uses meaningful elements such as headings, paragraphs, and lists;
- you want a clean document structure rather than a visual copy of the webpage.

This tool is not a website downloader. Paste the HTML itself. It does not run page scripts, log into sites, or recreate a layout driven by CSS and JavaScript.

## Convert markup

1. Open **HTML to LaTeX**, or run `/html-to-latex`.
2. Paste an HTML fragment or a full document.
3. Choose **Convert**.
4. Inspect the generated `converted.tex` source.
5. Copy it, save it, or create a LaTeX project.

For example:

```html
<h2>Method</h2>
<p>We compared <strong>three</strong> conditions.</p>
<ul><li>Control</li><li>Treatment</li></ul>
```

becomes a section, paragraph, bold phrase, and itemized list in LaTeX.

## What survives the move

The local Pandoc conversion follows semantic structure. Visual-only choices such as grid positioning, responsive breakpoints, animations, and most CSS decoration do not have a reliable LaTeX equivalent and are not the goal.

Check links, code blocks, tables, nested lists, image references, and any mathematical HTML. If you import an `.html` file through Oleafly's project importer, embedded media can be extracted into `assets/`; the pasted Tools workflow is best for self-contained markup and text.

:::tip[Want a web result instead?]
If your source is LaTeX and the destination is a browser or screen reader, use [LaTeX to HTML](/docs/tools/latex-to-html/) for standalone HTML with MathML equations.
:::

Conversion runs locally. The tool does not fetch remote images or stylesheets referenced by the pasted page.
