Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions bin/check_latex
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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")) {
Expand Down
2 changes: 1 addition & 1 deletion bin/check_latex_article.tex
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down
2 changes: 1 addition & 1 deletion bin/check_latex_exam.tex
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down
22 changes: 22 additions & 0 deletions bin/check_latex_standalone.tex
Original file line number Diff line number Diff line change
@@ -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}