Skip to content

Commit f0cbc16

Browse files
committed
Switch the default latex variant to xelatex.
The pg environment variable is now `$externalPrograms{latex2pdf}`. This was changed as discussed in the development meeting today because it is odd for it to be named pdflatex if we are not using pdflatex, and to match the corresponding webwork2 change.
1 parent c7754ab commit f0cbc16

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

conf/pg_config.dist.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ externalPrograms:
8686
curl: /usr/bin/curl
8787
tar: /bin/tar
8888
latex: /usr/bin/latex --no-shell-escape
89-
pdflatex: /usr/bin/pdflatex --no-shell-escape
89+
latex2pdf: /usr/bin/xelatex --no-shell-escape
9090
dvisvgm: /usr/bin/dvisvgm
9191
pdf2svg: /usr/bin/pdf2svg
9292
convert: /usr/bin/convert

lib/LaTeXImage.pm

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -214,8 +214,8 @@ sub draw {
214214
print $fh $self->footer;
215215
close $fh;
216216
system "cd $working_dir && "
217-
. WeBWorK::PG::IO::externalCommand('pdflatex')
218-
. " --interaction=nonstopmode image.tex > pdflatex.stdout 2> /dev/null";
217+
. WeBWorK::PG::IO::externalCommand('latex2pdf')
218+
. " --interaction=nonstopmode image.tex > latex.stdout 2> /dev/null";
219219
chmod(0777, "$working_dir/image.pdf");
220220
} else {
221221
warn "Can't open $working_dir/image.tex for writing.";
@@ -251,7 +251,7 @@ sub draw {
251251
}
252252
} else {
253253
warn "The pdf file was not created.";
254-
if (open(my $err_fh, "<", "$working_dir/pdflatex.stdout")) {
254+
if (open(my $err_fh, "<", "$working_dir/latex.stdout")) {
255255
while (my $error = <$err_fh>) {
256256
warn $error;
257257
}

macros/core/PGbasicmacros.pl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2896,7 +2896,7 @@ sub image {
28962896
if ($displayMode eq 'TeX') {
28972897
my $imagePath = $imageURL; # in TeX mode, alias gives us a path, not a URL
28982898

2899-
# We're going to create PDF files with our TeX (using pdflatex), so
2899+
# We're going to create PDF files with our TeX (using LaTeX), so
29002900
# alias should have given us the path to a PNG image.
29012901
if ($imagePath) {
29022902
if ($valign eq 'top') {

0 commit comments

Comments
 (0)