3 # Process Asymptote files for asyfig inclusion.
5 # usage: asyprocess [LATEX OPTIONS] -- [ASY-FILE] ...
7 # There are also the special options:
8 # --texinputs=STR the value of which is prepended to the kpsewhich
9 # default for TEXINPUTS (module search path).
10 # --pretex=STR the value of which is used for the LaTeX preamble.
12 PRETEX="\documentclass{article}"
17 while [ "$1" != "--" ] && [ -n "$1" ]; do
18 if [ "${1:0:12}" == "--texinputs=" ]; then
20 elif [ "${1:0:9}" == "--pretex=" ]; then
23 LATEX_OPTIONS="$LATEX_OPTIONS $1"
27 if [ "$1" == "--" ]; then shift; fi
30 echo "Process '$file' with '$LATEX_OPTIONS'"
31 echo "Searching $TEXINPUTS"
32 TEXINPUTS="$TEXINPUTS:" \
33 $LATEX -shell-escape -jobname="${file}-comp" -interaction=batchmode \
35 "$PRETEX \usepackage{asyprocess}\ProcessAsy \begin{document}\ShowAsy \end{document}" || exit 1