mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-02 15:41:48 +00:00
* 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
|
||||
, 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;});
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user