+++ /dev/null
-#!/bin/bash
-#
-# Process Asymptote files for asyfig inclusion.
-#
-# usage: asyprocess [LATEX OPTIONS] -- [ASY-FILE] ...
-#
-# There are also the special options:
-# --texinputs=STR the value of which is prepended to the kpsewhich
-# default for TEXINPUTS (module search path).
-# --pretex=STR the value of which is used for the LaTeX preamble.
-LATEX=pdflatex
-PRETEX="\documentclass{article}"
-LATEX_OPTIONS=""
-TEXINPUTS=""
-
-# process options
-while [ "$1" != "--" ] && [ -n "$1" ]; do
- if [ "${1:0:12}" == "--texinputs=" ]; then
- TEXINPUTS="${1:12}"
- elif [ "${1:0:9}" == "--pretex=" ]; then
- PRETEX="${1:9}"
- else
- LATEX_OPTIONS="$LATEX_OPTIONS $1"
- fi
- shift
-done
-if [ "$1" == "--" ]; then shift; fi
-
-for file in $*; do
- echo "Process '$file' with '$LATEX_OPTIONS'"
- echo "Searching $TEXINPUTS"
- TEXINPUTS="$TEXINPUTS:" \
- $LATEX -shell-escape -jobname="${file}-comp" -interaction=batchmode \
- $LATEX_OPTIONS \
- "$PRETEX \usepackage{asyprocess}\ProcessAsy \begin{document}\ShowAsy \end{document}" || exit 1
-done
-
-exit 0