Skip to content

Instantly share code, notes, and snippets.

@jiyometrik
Last active June 11, 2023 09:23
Show Gist options
  • Save jiyometrik/6082749f5fa4fb03704c44e2dd92d0ea to your computer and use it in GitHub Desktop.
Save jiyometrik/6082749f5fa4fb03704c44e2dd92d0ea to your computer and use it in GitHub Desktop.
My .latexmkrc and Makefile for LaTeX projects.
#!/usr/bin/env perl
# timezone
$ENV{'TZ'} = 'Asia/Singapore';
# compilation
$pdflatex = 'pdflatex -shell-escape'; # enable shell-escape for `minted' package
$pdf_mode = 1; # only generate the pdf
$max_repeat = 8; # maximum number of runs
# viewing
# $dvi_previewer = 'start okular';
# $ps_previewer = 'start okular';
# $pdf_previewer = 'start okular';
# cleaning options
$bibtex_use = 1.5;
FILE=main
pdf:
latexmk -bibtex src/${FILE}.tex
latexmk -c
view:
open ${FILE}.pdf
clean:
latexmk -c
rm -rf _minted-main .auctex-auto *.log *.run.xml *.auxlock
remove:
latexmk -C
rm -rf _minted-main .auctex-auto *.log *.run.xml *.txt *.auxlock
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment