From ca4a6cc93318a5aa22584599a9d2fc3d5df21bfc Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 27 Oct 2010 16:09:07 +0000 Subject: [PATCH] * Hack to handle PGF/TikZ constructs that require an additional run. svn path=/nixpkgs/trunk/; revision=24505 --- pkgs/misc/tex/nix/run-latex.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/pkgs/misc/tex/nix/run-latex.sh b/pkgs/misc/tex/nix/run-latex.sh index 1db41f3c336..58c7cac302f 100644 --- a/pkgs/misc/tex/nix/run-latex.sh +++ b/pkgs/misc/tex/nix/run-latex.sh @@ -64,9 +64,9 @@ runLaTeX echo -# Run bibtex to process all bibliographies. There may be several when -# we're using the multibib package. for auxFile in $(find . -name "*.aux"); do + # Run bibtex to process all bibliographies. There may be several + # when we're using the multibib package. if grep -q '\\citation' $auxFile; then echo "RUNNING BIBTEX ON $auxFile..." auxBase=$(basename $auxFile .aux) @@ -75,6 +75,12 @@ for auxFile in $(find . -name "*.aux"); do runNeeded=1 echo fi + + # "\pgfsyspdfmark" in the aux file seems to indicate that PGF/TikZ + # requires a second run (e.g. to resolve arrows between pictures). + if grep -q pgfsyspdfmark $auxFile; then + runNeeded=1 + fi done