Nimble Toolbox

Compile LaTeX to PDF

Paste LaTeX or open a .tex file, and it compiles to a PDF as you type, with the figures and bibliography you add beside it. TeX runs in this tab; your document is never uploaded.

The PDF appears here.

How to use it#

  1. Paste your LaTeX into the box, or open a .tex file with Open file or by dropping it on the box.
  2. Add any figures, a .bib, or other .tex files the document reads with Add files, or drop them on the list.
  3. Wait for the PDF to appear. The first compile downloads TeX, about 20 MB, and later ones start at once.
  4. Read the error under the result if there is one, and find its line by the numbers down the left of the box, or switch to Log for the whole of what TeX said.
  5. Download the PDF.

Real pdfLaTeX, not an imitation#

The PDF is made by pdfTeX from TeX Live 2023, the same program a TeX installation runs, compiled to WebAssembly so it runs in the browser. It reads the same packages, lays out the same lines, and breaks the same pages, so the PDF matches what the document makes anywhere else, and the errors are the ones TeX gives.

It runs LaTeX as many times as the document needs. Cross-references, a table of contents, and page numbers in "page 3 of 10" settle on a second pass, and a document citing from a .bib file has BibTeX run between the passes, up to three passes in all.

Shell escape is off, as it is on most online services, so minted, which runs Python to colour code, and anything else that starts a program cannot work. Use listings for coloured code instead.

Which packages it has#

The packages most documents load are here: amsmath and the AMS fonts, graphicx, xcolor, hyperref, geometry, booktabs, listings, babel, fancyhdr, caption, siunitx, enumitem, cleveref, natbib, TikZ with pgfplots, tikz-cd, chemfig, and forest, beamer for slides, and well over a thousand more from the LaTeX, science, and font collections of TeX Live. Latin Modern and the standard PostScript fonts are included.

The journal classes most often asked for are here too: IEEEtran for IEEE papers, elsarticle for Elsevier, and REVTeX for the APS journals, with their bibliography styles, and apacite for APA references. Some publishers' classes are not, acmart among them, and nor are packages that bring fonts of their own.

Each package is downloaded the first time a document loads it, in small pieces, and your browser keeps it for next time. The first compile takes longest, about 20 MB of TeX and its common files; a document that loads TikZ or a large font set fetches a little more when it first does.

A package that is not here gives an error naming it. If it is a single .sty file, add it with Add files and it is used like any other.

Figures, bibliographies, and several files#

Add every file the document reads: pictures, a .bib, a class or style file, and the .tex files it pulls in with \input or \include. Each goes beside the document under its own name, and also at any path the document reads it from, so \includegraphics{figures/plot} finds plot.png without you rebuilding the folder.

pdfLaTeX includes PNG, JPG, and PDF pictures. An SVG has to be turned into one of those first, which the SVG to PNG converter does.

A bibliography written with natbib or a plain \bibliography runs through BibTeX. biblatex works with backend=bibtex in its options; its default, Biber, is a separate program that does not run in a browser.

Symbols, emoji, and other alphabets#

pdfLaTeX predates Unicode, and each of its fonts holds a few hundred characters, so on a TeX installation a "↔", a "✓", or a line of a pasted folder tree stops the compile with "Unicode character not set up for use with LaTeX". Here about 1,400 such symbols print anyway, each from a font TeX already has: arrows and maths symbols, ticks, crosses, stars, and pointing hands, the lines of a folder tree, the bold and double-struck letters such as "𝐱" and "ℝ" that chat tools paste, superscripts such as "⁴", and fractions such as "⅓". A Greek letter prints as the maths letter, which suits a symbol but not Greek prose.

Letters with an ogonek or a stroke, as in Polish and Croatian, print under the default font encoding, which otherwise stops at "ą" or "đ". In a listings code block each character is read whole, so an accented word or a folder tree there no longer ends the compile with "Invalid UTF-8 byte sequence". A character you define yourself with \newunicodechar, or in the literate option of listings, keeps your definition.

Emoji print in colour, as the Twemoji pictures, sized to the text around them: "😀", "🚀", "✅", and about 1,300 more. A flag, a skin tone, or an emoji joined from several, such as a family, prints as its separate parts, with the skin tone left out. Cyrillic prints too, in a Computer Modern style, without loading anything.

What pdfLaTeX has no font for still shows as a boxed question mark, named with its line in the note under the result: Chinese, Japanese, Korean, Arabic, and Hebrew, Greek prose, and accents typed as separate combining marks. Those need XeLaTeX or LuaLaTeX with a font that has them, which this page does not run yet.

Writing in another language#

babel loads German, French, Spanish, Italian, Portuguese, Dutch, Polish, Czech, Slovak, Danish, Norwegian, Swedish, Finnish, Hungarian, Romanian, Croatian, Slovenian, Catalan, Turkish, Russian, and Ukrainian as it does on a TeX installation, so \usepackage[ngerman]{babel} gives German dates and headings, and words break at line ends by German rules. Load T1 with \usepackage[T1]{fontenc} for a language with accents, so words with them hyphenate and copy out of the PDF correctly.

For Russian or Ukrainian, load the T2A encoding as well, as in \usepackage[T2A]{fontenc} and \usepackage[russian]{babel}. A language not in the list loads from babel's locale files with provide=*, as in \usepackage[welsh, provide=*]{babel}, which gives its dates and headings and hyphenates it as English.

When it does not compile#

The first error TeX hit shows under the result, with its line number and, for the common ones, what it usually means: an undefined command names the command, and a missing package or picture names the file. TeX stops at the first error, and one mistake often causes several more, so fixing the first and letting it compile again is the quickest way through.

A character pdfLaTeX has no font for, such as an emoji or a Chinese character, does not stop it. The PDF is made with a boxed question mark in its place, and the note under the result names each one and its line.

Log shows everything TeX wrote, including warnings that did not stop it, such as an overfull line or a reference it could not resolve.

Frequently asked questions#

Is my document uploaded?

#

No. pdfLaTeX runs in this tab, and your document, its figures, and the PDF stay on your device. What does download is TeX itself and the packages your document loads, from this site, the same files for everyone.

Do I need to install LaTeX?

#

No. TeX Live runs inside the page, so a browser is all it takes to turn a .tex file into a PDF, on a computer where you cannot install software too. The first compile downloads about 20 MB of it, which your browser keeps, so later visits start much sooner.

Do I need an account?

#

No. There is no sign-up or sign-in: open the page, paste or open your .tex file, and download the PDF. Your document never reaches a server, so there is nothing an account would hold.

Which packages does it have?

#

TeX Live 2023's LaTeX, science, and recommended font collections, with TikZ, pgfplots, biblatex, IEEEtran, elsarticle, and REVTeX added: amsmath, graphicx, hyperref, geometry, booktabs, listings, siunitx, cleveref, beamer, and well over a thousand more. A package that is missing is named in the error, and its .sty file can be added with Add files.

Can it compile with XeLaTeX or LuaLaTeX?

#

Not yet: it compiles with pdfLaTeX. A document that loads fontspec needs XeLaTeX or LuaLaTeX, and gives an error here. Most documents that do not choose a system font compile with pdfLaTeX unchanged.

Can it print emoji and Unicode symbols?

#

Yes, most of them. Emoji print in colour as Twemoji pictures, and arrows, maths symbols, ticks and crosses, box drawing, bold and double-struck maths letters, accented letters, and Cyrillic print from fonts the page has, so "↔", "✓", or "😀" compiles where a TeX installation stops with "not set up for use with LaTeX". Chinese, Japanese, Korean, Arabic, and Hebrew do not: each shows as a boxed question mark.

Can I write in German, French, Spanish, or Russian?

#

Yes. Load the language with babel as you would anywhere, as in \usepackage[french]{babel}, and the date, headings such as "Table des matières", and hyphenation come out in French. Twenty-one languages are here besides English, Russian and Ukrainian among them with \usepackage[T2A]{fontenc}; another loads from babel's locale files with provide=*.

Why is there a boxed question mark in my PDF?

#

The document has a character pdfLaTeX has no font for, so a boxed question mark stands in for it, and the note under the result names the character and its line. It happens with Chinese, Japanese, Korean, Arabic, and Hebrew, and with an accent typed as a separate combining mark. Take the character out, or draw it another way, such as a picture with \includegraphics; printing it as it is needs XeLaTeX or LuaLaTeX, which this page does not run yet.

Why does it run more than once?

#

LaTeX learns where every label, section, and citation lands only as it writes the pages, so references and the table of contents are filled in on the next pass. It runs again whenever LaTeX asks, up to three times, and runs BibTeX first when the document cites from a .bib file.

Can I convert markdown to PDF this way?

#

Yes. The markdown to PDF converter does it in one step, compiling here as this page does. To change the LaTeX on the way, turn the markdown into LaTeX with the markdown to LaTeX converter, choosing Whole file, edit it, and paste the result here.

Does it work on a phone?

#

Yes. The preview draws every page as a picture, so it reads the same on a phone, though the first compile downloads about 20 MB and a long document takes longer than on a computer.

Is my work saved if I close the tab?

#

Yes, the text is. As you type, a draft is kept in this browser's own storage, on your device and never sent anywhere, and it is back in the box when you return. Figures and other added files are not kept, so add them again. On a shared computer, untick Keep a draft in this browser, which deletes the stored copy at once. The draft lives only in this browser, so keep your .tex file as well.