Forrest logo
back to the latexmk tool

latexmk:tldr:37b9e

latexmk: Compile a PDF document.
$ latexmk -pdf ${source-tex}
try on your machine

The command "latexmk -pdf ${source-tex}" is used to compile a LaTeX document into a PDF format using the LaTeXMK tool. Here's an explanation of each part of the command:

  • "latexmk": This is the command to run the LaTeXMK tool. LaTeXMK is a Perl script that automates the process of compiling LaTeX documents.

  • "-pdf": This option tells LaTeXMK to compile the document into a PDF format. LaTeXMK will automatically handle the necessary LaTeX compilation steps to generate the PDF output.

  • "${source-tex}": This is a placeholder for the name of the LaTeX source file. The command should be used in a scripting or command-line environment where "${source-tex}" will be replaced with the actual name of the LaTeX file. For example, if the LaTeX file is named "document.tex", the command would be "latexmk -pdf document.tex".

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the latexmk tool