From 49129fba43caf1115c969b5486506e98439b3b31 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Thu, 18 Mar 2010 16:27:25 -0400 Subject: [PATCH] Fix Kpathsea search path configuration in asyprocess. From the Kpathsea manual: http://www.chemie.fu-berlin.de/chemnet/use/info/kpathsea/kpathsea_4.html " A search path can come from many sources. In priority order (meaning Kpathsea will use whichever it finds first): 1. A user-set environment variable, e.g., `TEXINPUTS'. 2. A program-specific configuration file, e.g., an `S /a:/b' line in Dvips' `config.ps'. 3. A line in a Kpathsea configuration file `texmf.cnf', e.g., `TEXINPUTS=/c:/d'. See section below. 4. The compile-time default (specified in `kpathsea/paths.h'). ... If the highest-priority search path (in the list in the previous section) contains an extra colon (i.e., leading, trailing, or doubled), Kpathsea inserts the next-highest-priority search path that is set at that point. ... For example, given setenv TEXINPUTS /home/karl: and a `TEXINPUTS' value from `texmf.cnf' of .:$TEXMF//tex then the final value used for searching will be: /home/karl:.:$TEXMF//tex --- tex/src/figures/asy/asyprocess | 9 ++++----- tex/src/figures/cantilever-data/Makefile | 2 +- tex/src/figures/cantilever-sim/Makefile | 2 +- tex/src/figures/contour/Makefile | 2 +- tex/src/figures/schematic/Makefile | 2 +- 5 files changed, 8 insertions(+), 9 deletions(-) diff --git a/tex/src/figures/asy/asyprocess b/tex/src/figures/asy/asyprocess index d0afb37..2c159a7 100755 --- a/tex/src/figures/asy/asyprocess +++ b/tex/src/figures/asy/asyprocess @@ -11,13 +11,12 @@ LATEX=pdflatex PRETEX="\documentclass{article}" LATEX_OPTIONS="" -MY_TEXINPUTS="" -DEFAULT_TEXINPUTS=$(kpsewhich -show-path .tex) +TEXINPUTS="" # process options while [ "$1" != "--" ] && [ -n "$1" ]; do if [ "${1:0:12}" == "--texinputs=" ]; then - MY_TEXINPUTS="${1:12}" + TEXINPUTS="${1:12}" elif [ "${1:0:9}" == "--pretex=" ]; then PRETEX="${1:9}" else @@ -29,8 +28,8 @@ if [ "$1" == "--" ]; then shift; fi for file in $*; do echo "Process '$file' with '$LATEX_OPTIONS'" - echo "Searching $MY_TEXINPUTS:$DEFAULT_TEXINPUTS" - TEXINPUTS="$MY_TEXINPUTS:$DEFAULT_TEXINPUTS" \ + 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 diff --git a/tex/src/figures/cantilever-data/Makefile b/tex/src/figures/cantilever-data/Makefile index fa4881d..a10c733 100644 --- a/tex/src/figures/cantilever-data/Makefile +++ b/tex/src/figures/cantilever-data/Makefile @@ -1,5 +1,5 @@ ASYPROCESS = ../asy/asyprocess \ - --texinputs=../.. \ + --texinputs=../..: \ --pretex='\documentclass{drexel-thesis} \input{packages}' \ -- diff --git a/tex/src/figures/cantilever-sim/Makefile b/tex/src/figures/cantilever-sim/Makefile index 7a28e49..60d7187 100644 --- a/tex/src/figures/cantilever-sim/Makefile +++ b/tex/src/figures/cantilever-sim/Makefile @@ -1,5 +1,5 @@ ASYPROCESS = ../asy/asyprocess \ - --texinputs=../.. \ + --texinputs=../..: \ --pretex='\documentclass{drexel-thesis} \input{packages}' \ -- diff --git a/tex/src/figures/contour/Makefile b/tex/src/figures/contour/Makefile index fd32acd..377c7fa 100644 --- a/tex/src/figures/contour/Makefile +++ b/tex/src/figures/contour/Makefile @@ -1,5 +1,5 @@ ASYPROCESS = ../asy/asyprocess \ - --texinputs=../.. \ + --texinputs=../..: \ --pretex='\documentclass{drexel-thesis} \input{packages}' \ -- diff --git a/tex/src/figures/schematic/Makefile b/tex/src/figures/schematic/Makefile index 0c263da..93ba39d 100644 --- a/tex/src/figures/schematic/Makefile +++ b/tex/src/figures/schematic/Makefile @@ -1,5 +1,5 @@ ASYPROCESS = ../asy/asyprocess \ - --texinputs=../.. \ + --texinputs=../..: \ --pretex='\documentclass{drexel-thesis} \input{packages}' \ -- -- 2.26.2