latexmk super powers

latexmk is a handy tool to build latex documents. these days i investigated in the advanced usage of latexmk.

latexmk can use configuration files, latexmkrc in the current directory is used as a default, then ~/.latexmkrc.

with latexmk -pvc latexmk watches a .tex file and builds it whenever its content or a dependency of it changes. -pvc also opens a viewer for the file and updates it, so it really supports the workflow when editing latex documents.

a sample latexmkrc file might look like that:

$pdf_previewer = 'start evince';
@default_files = ('thesis');
$print_type = 'pdf';
$pdf_mode = 1;
$pdflatex = 'pdflatex -interaction=nonstopmode -halt-on-error';

update: $pdflatex = 'pdflatex -interaction=nonstopmode -halt-on-error'; makes pdflatex stop on the first error, not asking for any user input.

Keine Kommentare:

Kommentar veröffentlichen