From 374ccd290b8836bfdc2bf086611beef9a3b64f63 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Fri, 16 May 2008 11:48:46 +0000 Subject: * 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 --- pkgs/misc/tex/nix/default.nix | 3 ++- pkgs/misc/tex/nix/run-latex.sh | 8 ++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) (limited to 'pkgs/misc') diff --git a/pkgs/misc/tex/nix/default.nix b/pkgs/misc/tex/nix/default.nix index 6b0ec09883746..cf17875bf3594 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 847532101b3c6..0b6e29988fe44 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 -- cgit 1.4.1