Skip to main content
Compiling a LaTeX manuscript with cross-references and a bibliography takes multiple ordered passes, so running pdflatex by hand breaks down as soon as a paper grows or co-authors join. You have three practical ways to automate builds—local latexmk and make, containerized CI such as GitHub Actions, or a browser editor—and many teams combine them.

Choosing a build workflow

Option 1: Local builds with latexmk and a Makefile

latexmk ships with TeX Live and inspects .aux, .fls, and bibliography dependencies to run pdflatex (or xelatex/lualatex), BibTeX/Biber, and cross-reference passes in the required order until the output stabilizes.
Store project defaults in a .latexmkrc file next to main.tex so every collaborator runs the same settings with plain latexmk:
When your project also needs surrounding tasks—such as a marked-up revision PDF or an upload tarball—wrap latexmk in a short Makefile:
latexdiff-vc ships with TeX Live alongside latexdiff and writes main-diffsubmitted-v1.pdf when given --git -r submitted-v1 --pdf. Note that arxiv assumes classic BibTeX has produced $(MAIN).bbl; if your venue uses BibLaTeX/Biber or accepts .bib directly, check its submission instructions before bundling.

Option 2: Reproducible CI with GitHub Actions and a pinned TeX Live container

Running latexmk inside a pinned official texlive/texlive Docker image avoids relying on unverified third-party wrapper actions and keeps the exact TeX Live distribution stable across future revisions:
Two details make CI builds dependable:
  • Stop on errors and check warnings explicitly. -interaction=nonstopmode -halt-on-error prevents TeX from hanging on a prompt and returns a non-zero exit code on errors. Unresolved \ref or \cite keys still exit 0 by default, so checking main.log for There were undefined references. and Citation .* undefined catches broken links before submission.
  • Pin the container digest (and action versions). Rolling latest tags update weekly; pinning a specific texlive/texlive@sha256:... digest (or a historic release tag such as TL2025-historic) keeps builds reproducible months later during journal revisions.

Option 3: Combining GitHub CI with a browser editor

You do not have to choose between CI and browser editing. In LaTeX Cloud Studio, full compilation runs latexmk on TeX Live 2026 so bibliography and cross-reference passes finish in one compile, and projects can be transferred through ZIP upload/export and GitHub import, push, and pull workflows (see GitHub Sync, Import & Export). Co-authors who prefer editing in the browser can push commits to the same GitHub repository that runs your CI workflow and Makefile targets. Want multi-pass latexmk compilation without maintaining a local TeX installation? Start from the Basic Article template in LaTeX Cloud Studio or import your existing GitHub repository.