Skip to content

Commit

Permalink
latexmkrc: use xelatex mode properly: $pdf_mode=5
Browse files Browse the repository at this point in the history
  • Loading branch information
rrthomas committed Apr 3, 2024
1 parent 8c8458e commit ba84498
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
*.synctex.gz
*.toc
*.vrb
*.xdv
*.xdy
*.tdo
hp-*.pdf
Expand Down
7 changes: 3 additions & 4 deletions latexmkrc
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@ if (-d $hooks_dir) {
}

# Use XeLaTeX (equivalent to command-line -xelatex option)
$pdflatex = 'xelatex %O %S';
$pdflatex = "xelatex %O \"\\PassOptionsToPackage{$options}{hp-book}\\input{%S}\"" if $options;
$xelatex = "xelatex %O \"\\PassOptionsToPackage{$options}{hp-book}\\input{%S}\"" if $options;
my $basedir = curdir();
if (defined($chapter) || defined($chapterfile)) {
if (defined($chapter)) {
Expand All @@ -40,9 +39,9 @@ if (defined($chapter) || defined($chapterfile)) {
} else {
$chapter = 1;
}
$pdflatex = "xelatex -jobname=$chapterfile %O \"\\RequirePackage[pdf]{layout/hp-book}\\begin{document}\\setcounter{chapter}{" . ($chapter - 1) . "}\\input{$chapterfile}\\end{document}\"";
$xelatex = "xelatex -jobname=$chapterfile %O \"\\RequirePackage[pdf]{layout/hp-book}\\begin{document}\\setcounter{chapter}{" . ($chapter - 1) . "}\\input{$chapterfile}\\end{document}\"";
}
$pdf_mode = 1;
$pdf_mode = 5;
$postscript_mode = $dvi_mode = 0;

# Make our fonts available to TeX
Expand Down

0 comments on commit ba84498

Please sign in to comment.