diff --git a/bin/check_latex b/bin/check_latex index 8c5a6ee567..a806cea296 100755 --- a/bin/check_latex +++ b/bin/check_latex @@ -13,8 +13,8 @@ use feature 'say'; BEGIN { use Mojo::File qw(curfile); - use YAML::XS qw(LoadFile); - use Env qw(WEBWORK_ROOT PG_ROOT); + use YAML::XS qw(LoadFile); + use Env qw(WEBWORK_ROOT PG_ROOT); $WEBWORK_ROOT = curfile->dirname->dirname->to_string; @@ -51,7 +51,9 @@ my $latex_cmd = . shell_quote($ce->{webworkDirs}{assetsTex}) . ':' . shell_quote($ce->{pg}{directories}{assetsTex}) . ': ' . $ce->{externalPrograms}{latex2pdf} - . ' -interaction nonstopmode check_latex_exam.tex >> check_latex.nfo 2>&1'; + . ' -interaction nonstopmode check_latex_exam.tex >> check_latex.nfo 2>&1 &&' + . "TEXINPUTS=$ENV{WEBWORK_ROOT}/bin: $ce->{externalPrograms}{latex2pdf}" + . ' -interaction nonstopmode check_latex_standalone.tex > check_latex.nfo 2>&1'; if ((system $latex_cmd) >> 8) { if (open(my $fh, '<', "$temp_dir/check_latex.nfo")) { diff --git a/bin/check_latex_article.tex b/bin/check_latex_article.tex index 76036857ee..21d58de3e6 100644 --- a/bin/check_latex_article.tex +++ b/bin/check_latex_article.tex @@ -8,7 +8,7 @@ \usepackage{multicol} \usepackage{tcolorbox} -\usepackage[active,textmath,displaymath]{preview} % needed for dvipng +\usepackage[textmath,displaymath]{preview} % needed for dvipng \setlength{\columnsep}{.25in} \setlength{\columnseprule}{.4pt} diff --git a/bin/check_latex_exam.tex b/bin/check_latex_exam.tex index bd48c01ef5..384a8ba693 100644 --- a/bin/check_latex_exam.tex +++ b/bin/check_latex_exam.tex @@ -9,7 +9,7 @@ \usepackage{bidi} \fi -\usepackage[active,textmath,displaymath]{preview} % needed for dvipng +\usepackage[textmath,displaymath]{preview} % needed for dvipng \setlength{\columnsep}{.25in} \setlength{\columnseprule}{.4pt} diff --git a/bin/check_latex_standalone.tex b/bin/check_latex_standalone.tex new file mode 100644 index 0000000000..7f8daeecd6 --- /dev/null +++ b/bin/check_latex_standalone.tex @@ -0,0 +1,22 @@ +\documentclass{standalone} + +\usepackage[svgnames]{xcolor} +\usepackage{tikz} +\usepackage{pgfplots} +\usetikzlibrary{arrows.meta,plotmarks,calc,spath3} +\usepgfplotslibrary{fillbetween} +\pgfplotsset{compat = 1.18} + +\begin{document} + +\begin{tikzpicture} + \begin{axis} + \addplot[name path=pathA, domain=-3:3, draw=none, mark=triangle*] {(x^2)}; + \draw[{Stealth}-{Stealth}, spath/use=pathA]; + \draw ($(-1, 0) + (10pt, 10pt)$) -- ($(1, 3) - (10pt, 10pt)$); + \addplot[name path=pathB, domain=-3:3] {(-x^2 + 3)}; + \addplot[green, fill opacity=0.3] fill between[of=pathA and pathB]; + \end{axis} +\end{tikzpicture} + +\end{document}