latexmk

Compile LaTeX source files into finished documents. Automatically does multiple runs when needed. More information: <https://mg.readthedocs.io/latexmk.html>.

Install

All systems
curl cmd.cat/latexmk.sh
Debian Debian
apt-get install latexmk
Ubuntu
apt-get install latexmk
Arch Arch Linux
pacman -S latexmk
image/svg+xml Kali Linux
apt-get install latexmk
Fedora
dnf install latexmk
Windows (WSL2)
sudo apt-get update sudo apt-get install latexmk
Raspbian
apt-get install latexmk

Compile LaTeX source files into finished documents. Automatically does multiple runs when needed. More information: <https://mg.readthedocs.io/latexmk.html>.

  • Compile a DVI (Device Independent file) document from every source:
    latexmk
  • Compile a DVI document from a specific source file:
    latexmk source.tex
  • Compile a PDF document:
    latexmk -pdf source.tex
  • Force the generation of a document even if there are errors:
    latexmk -f source.tex
  • Clean up temporary TEX files created for a specific TEX file:
    latexmk -c source.tex
  • Clean up all temporary TEX files in the current directory:
    latexmk -c

© tl;dr; authors and contributors