(no commit message)
[libreriscv.git] / conferences / fosdem2024 / fosdem2024_bigint / .latexmkrc
1 $pdf_mode = 1;
2 $pdflatex = 'pdflatex --shell-escape %O %S';
3 add_cus_dep('dia', 'dia-tex', 0, 'dia2tex');
4 sub dia2tex {
5 system("dia -n -t pgf-tex -e \"$_[0].dia-tex\" \"$_[0].dia\"");
6 # replace labels with text `latex:\something` by the latex command `\something`
7 my $sed_cmd = substr(<<'EOS', 0, -1); # remove trailing newline
8 sed -i 's/^\\node\[[^\]*\] at ([-0-9.]\+\\du,[-0-9.]\+\\du){latexcmd:\(.*\)};$/latex:\1/
9 s/latex:\\ensuremath{\\backslash}/\\/g
10 s/latex:\\\([$_{}]\)/\1/g
11 '
12 EOS
13 system("$sed_cmd \"$_[0].dia-tex\"");
14 }
15 $cleanup_includes_cusdep_generated = 1;
16 $max_repeat = 15;