Skip to content
LemmaGet the app

LaTeX to PDF on Android: Convert .tex Files on Your Phone

By Laxmi SolutionsUpdated 4 min read

Someone sends you a .tex file, or you have a LaTeX project in a folder on your phone, and you need the PDF now. Online LaTeX-to-PDF converters work, but they mean uploading your document and waiting on a queue. This guide shows how to compile a .tex file to PDF on the phone itself with Lemma, including multi-file projects, bibliographies and the errors you are most likely to meet.

Online converter or on-device compiler?

A web converter takes your .tex file, compiles it on a server and sends a PDF back. That is fine for a one-off, but every edit means another upload, images and .bib files have to be bundled, and a thesis draft or a signed letter leaves your hands. An on-device compiler keeps the loop short: edit, compile, read, repeat, with nothing uploaded and no connection required after the first run.

How the two approaches compare on a phone
Online converterLemma (on-device)
Needs a connectionEvery compileFirst compile of a new package only
Multi-file projectsZip and re-upload each timeOpen the folder; files stay in place
PrivacyDocument sent to a serverNever leaves the phone
Edit and re-compileRepeat the uploadTap Compile, or compile on save
Error messagesOften a raw logListed with line numbers; tap to jump

Open the .tex file

  1. Install Lemma from Google Play (free, no account). The offline compiler, about 13 MB, downloads once.
  2. From your file manager, email or chat app, open the .tex file with Lemma. It opens straight into the editor.
  3. For a project with several files, choose New project → Import folder and pick the folder, or import the .zip export from Overleaf or any other editor.
  4. A project on GitHub or GitLab can be cloned directly: New project → Git repository, paste the URL.

In a multi-file project Lemma picks the main file by looking for \documentclass. If it guesses wrong, long-press the right file's tab in the editor and choose Set as main file.

Compile to PDF

Tap Compile. The first time a document uses a package, Lemma downloads it (once) and shows the progress; after that the compile runs offline. The PDF appears below the source on a phone and beside it on a tablet. Sync scroll keeps the two aligned, and tapping a spot in the PDF jumps to the line that produced it.

Lemma compiles with Tectonic, a XeTeX-based engine, so Unicode input and fontspec work out of the box. Most documents written for pdfLaTeX compile unchanged; the exceptions are covered in pdfLaTeX vs XeLaTeX vs LuaLaTeX.

\documentclass[11pt]{article}
\usepackage{geometry}
\geometry{a4paper, margin=2.5cm}
\usepackage{graphicx}

\begin{document}
\section*{Field report}
Compiled on a phone, no server involved.

\includegraphics[width=\linewidth]{figure.png}
\end{document}

Images referenced with \includegraphics must be inside the project folder (or a subfolder). An image in your Downloads folder is not part of the project; copy it in first.

Bibliographies, citations and multiple passes

Lemma runs as many passes as the document needs, so cross-references, tables of contents and BibTeX bibliographies resolve in one tap. Put the .bib file in the project and cite as usual:

\bibliographystyle{plain}
\bibliography{references}   % references.bib in the project

Biber (used by biblatex with the Biber backend) and makeindex are not available on the device; switch to BibTeX, or compile that one document on a desktop. The trade-offs are in BibTeX vs biblatex.

Fixing a compile that fails

When the compile stops, Lemma lists the errors with their line numbers; tap one to jump to it. The three you will meet most often:

  • File 'x.sty' not found: a package that does not exist in the TeX distribution, or a typo in \usepackage. Check the name on CTAN.
  • Missing $ inserted: a math symbol such as _, ^ or \alpha outside math mode. Wrap it in $…$.
  • Undefined control sequence: a command from a package you have not loaded, or a misspelt command.

A longer list, with the fix for each, is in the most common LaTeX errors.

Share, print or save the PDF

Share or export the PDF from the menu: Share sends it to any app (email, WhatsApp, Drive, a printer), Export saves the file. The .tex source stays where it was, so you can keep editing and compile again whenever you like. To keep the project on another machine too, push it to Git or let Lemma sync it to Google Drive.

LaTeX on Android, compiled on your phone.

Get it on Google Play