* 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
This commit is contained in:
parent
3042994875
commit
374ccd290b
@ -11,6 +11,7 @@ rec {
|
|||||||
, compressBlanksInIndex ? true
|
, compressBlanksInIndex ? true
|
||||||
, packages ? []
|
, packages ? []
|
||||||
, searchRelativeTo ? dirOf (toString rootFile) # !!! duplication
|
, searchRelativeTo ? dirOf (toString rootFile) # !!! duplication
|
||||||
|
, copySources ? false
|
||||||
}:
|
}:
|
||||||
|
|
||||||
assert generatePDF -> !generatePS;
|
assert generatePDF -> !generatePS;
|
||||||
@ -22,7 +23,7 @@ rec {
|
|||||||
copyIncludes = ./copy-includes.pl;
|
copyIncludes = ./copy-includes.pl;
|
||||||
|
|
||||||
inherit rootFile generatePDF generatePS extraFiles
|
inherit rootFile generatePDF generatePS extraFiles
|
||||||
compressBlanksInIndex;
|
compressBlanksInIndex copySources;
|
||||||
|
|
||||||
includes = import (findLaTeXIncludes {inherit rootFile searchRelativeTo;});
|
includes = import (findLaTeXIncludes {inherit rootFile searchRelativeTo;});
|
||||||
|
|
||||||
|
@ -2,6 +2,9 @@ source $stdenv/setup
|
|||||||
|
|
||||||
ensureDir $out
|
ensureDir $out
|
||||||
|
|
||||||
|
mkdir root
|
||||||
|
cd root
|
||||||
|
|
||||||
startDir=$(perl $copyIncludes $includes)
|
startDir=$(perl $copyIncludes $includes)
|
||||||
cd $startDir
|
cd $startDir
|
||||||
|
|
||||||
@ -48,6 +51,11 @@ runLaTeX() {
|
|||||||
echo
|
echo
|
||||||
|
|
||||||
|
|
||||||
|
if test -n "$copySources"; then
|
||||||
|
cp -prd $TMPDIR/root $out/tex-srcs
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
echo "PASS 1..."
|
echo "PASS 1..."
|
||||||
runLaTeX
|
runLaTeX
|
||||||
echo
|
echo
|
||||||
|
Loading…
x
Reference in New Issue
Block a user