|
1 | | -# latexmkrc |
| 1 | +# LaTeX compilation configuration for KHA-256 documentation |
| 2 | +$pdf_mode = 1; |
| 3 | +$postscript_mode = 0; |
| 4 | +$dvi_mode = 0; |
2 | 5 |
|
3 | | -# LATEXOPTS tanımlı mı kontrol et, değilse boş string yap |
4 | | -my $latexopts = $ENV{'LATEXOPTS'} // ''; |
| 6 | +# Use XeLaTeX for Unicode support |
| 7 | +$pdflatex = 'xelatex -interaction=nonstopmode -shell-escape'; |
5 | 8 |
|
6 | | -$latex = 'latex ' . $latexopts . ' %O %S'; |
7 | | -$pdflatex = 'pdflatex ' . $latexopts . ' %O %S'; |
8 | | -$lualatex = 'lualatex ' . $latexopts . ' %O %S'; |
9 | | -$xelatex = 'xelatex --no-pdf ' . $latexopts . ' %O %S'; |
| 9 | +# Cleanup rules |
| 10 | +$clean_ext = 'bbl blg aux dvi fdb_latexmk fls log nav out snm toc vrb'; |
10 | 11 |
|
11 | | -$makeindex = 'makeindex -s python.ist %O -o %D %S'; |
12 | | -add_cus_dep( "glo", "gls", 0, "makeglo" ); |
13 | | -sub makeglo { |
14 | | - return system( "makeindex -s gglo.ist -o '$_[0].gls' '$_[0].glo'" ); |
| 12 | +# Max repeats |
| 13 | +$max_repeat = 5; |
| 14 | + |
| 15 | +# Enable synctex |
| 16 | +$pdf_previewer = "start evince %O %S"; |
| 17 | + |
| 18 | +# Additional LaTeX options |
| 19 | +add_cus_dep('glo', 'gls', 0, 'makeglossaries'); |
| 20 | +add_cus_dep('acn', 'acr', 0, 'makeglossaries'); |
| 21 | + |
| 22 | +# Custom rule for glossaries |
| 23 | +sub makeglossaries { |
| 24 | + my ($base_name, $path) = fileparse( $_[0] ); |
| 25 | + my @args = ( "-q", "$path$base_name" ); |
| 26 | + return system "makeglossaries", @args; |
15 | 27 | } |
| 28 | + |
| 29 | +# Ensure proper compilation order |
| 30 | +push @generated_exts, 'glo', 'gls', 'glg'; |
| 31 | +push @generated_exts, 'acn', 'acr', 'alg'; |
| 32 | +push @generated_exts, 'ist', 'slg', 'slo'; |
| 33 | +push @generated_exts, 'lof', 'lot'; |
| 34 | + |
| 35 | +# Output directory |
| 36 | +$out_dir = '_build/latex'; |
| 37 | + |
| 38 | +# Keep intermediate files for debugging |
| 39 | +$cleanup_includes_cusdep = 0; |
0 commit comments