diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2008-05-16 11:48:46 +0000 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2008-05-16 11:48:46 +0000 |
commit | 374ccd290b8836bfdc2bf086611beef9a3b64f63 (patch) | |
tree | 4d0634b06078645afcb643d85e078a3c8495606e /pkgs/misc | |
parent | 3042994875183f78ef229266c388075e14885ac3 (diff) | |
download | nixlib-374ccd290b8836bfdc2bf086611beef9a3b64f63.tar nixlib-374ccd290b8836bfdc2bf086611beef9a3b64f63.tar.gz nixlib-374ccd290b8836bfdc2bf086611beef9a3b64f63.tar.bz2 nixlib-374ccd290b8836bfdc2bf086611beef9a3b64f63.tar.lz nixlib-374ccd290b8836bfdc2bf086611beef9a3b64f63.tar.xz nixlib-374ccd290b8836bfdc2bf086611beef9a3b64f63.tar.zst nixlib-374ccd290b8836bfdc2bf086611beef9a3b64f63.zip |
* runLaTeX: added an option to copy the collected TeX inputs to $out
(useful when you need to send TeX sources for a paper to a third party). svn path=/nixpkgs/trunk/; revision=11837
Diffstat (limited to 'pkgs/misc')
-rw-r--r-- | pkgs/misc/tex/nix/default.nix | 3 | ||||
-rw-r--r-- | pkgs/misc/tex/nix/run-latex.sh | 8 |
2 files changed, 10 insertions, 1 deletions
diff --git a/pkgs/misc/tex/nix/default.nix b/pkgs/misc/tex/nix/default.nix index 6b0ec0988374..cf17875bf359 100644 --- a/pkgs/misc/tex/nix/default.nix +++ b/pkgs/misc/tex/nix/default.nix @@ -11,6 +11,7 @@ rec { , compressBlanksInIndex ? true , packages ? [] , searchRelativeTo ? dirOf (toString rootFile) # !!! duplication + , copySources ? false }: assert generatePDF -> !generatePS; @@ -22,7 +23,7 @@ rec { copyIncludes = ./copy-includes.pl; inherit rootFile generatePDF generatePS extraFiles - compressBlanksInIndex; + compressBlanksInIndex copySources; includes = import (findLaTeXIncludes {inherit rootFile searchRelativeTo;}); diff --git a/pkgs/misc/tex/nix/run-latex.sh b/pkgs/misc/tex/nix/run-latex.sh index 847532101b3c..0b6e29988fe4 100644 --- a/pkgs/misc/tex/nix/run-latex.sh +++ b/pkgs/misc/tex/nix/run-latex.sh @@ -2,6 +2,9 @@ source $stdenv/setup ensureDir $out +mkdir root +cd root + startDir=$(perl $copyIncludes $includes) cd $startDir @@ -48,6 +51,11 @@ runLaTeX() { echo +if test -n "$copySources"; then + cp -prd $TMPDIR/root $out/tex-srcs +fi + + echo "PASS 1..." runLaTeX echo |