Update latexmkrc to correctly generate glossaries and pygments

This commit is contained in:
Jip J. Dekker 2021-02-04 15:28:07 +11:00
parent 939089480e
commit 29739c95ba
No known key found for this signature in database
GPG Key ID: 517DF4A00618C9C3
2 changed files with 20 additions and 18 deletions

View File

@ -6,24 +6,27 @@ $bibtex_use = 2;
$clean_ext = "run.xml %R-blx.bib %R-blx.aux ist xdy";
# Rule to typeset minizinc files
add_cus_dep('mzn', 'mzntex', 0, 'run_pygmentize');
add_cus_dep('py', 'pytex', 0, 'run_pygmentize');
sub run_pygmentize {
system "pipenv run pygmentize -f latex $_[0].mzn > $_[0].mzntex";
add_cus_dep('mzn', 'mzntex', 0, 'run_pygmentize_mzn');
sub run_pygmentize_mzn {
system "pipenv run pygmentize -f latex -Olinenos=True,texcomments=True,mathescape=True $_[0].mzn > $_[0].mzntex";
}
add_cus_dep('py', 'pytex', 0, 'run_pygmentize_py');
sub run_pygmentize_py {
system "pipenv run pygmentize -f latex -Olinenos=True,texcomments=True,mathescape=True $_[0].py > $_[0].pytex";
}
push @generated_exts, 'mzntex', 'pytex';
# Rule to generate glossaries
add_cus_dep('glo', 'gls', 0, 'run_makeglossaries');
add_cus_dep('acn', 'acr', 0, 'run_makeglossaries');
add_cus_dep('glo', 'gls', 0, 'run_makeindex');
add_cus_dep('acn', 'acr', 0, 'run_makeindex');
sub run_makeglossaries {
if ( $silent ) {
system "makeglossaries -q '$_[0]'";
}
else {
system "makeglossaries '$_[0]'";
};
sub run_makeindex {
my $source = $$Psource;
my $dest = $$Pdest;
my $log = $dest."LOG";
my $cmd = "makeindex %O -s \"$_[0].ist\" -t \"$log\" -o \"$dest\" \"$source\"";
if ($silent) { $cmd =~ s/%O/-q/; }
else { $cmd =~ s/%O//; }
return system $cmd;
}
push @generated_exts, 'glo', 'gls', 'glg';
push @generated_exts, 'acn', 'acr', 'alg';
push @generated_exts, 'glo', 'gls', 'glsLOG', 'glg';
push @generated_exts, 'acn', 'acr', 'acrLOG', 'alg';

View File

@ -42,8 +42,7 @@ Scale=1.4
% References
\usepackage[
style=mla-new,
mancitepar=true,
style=apa,
]{biblatex}
% Glossary / Acronyms