* Process \includegraphics{filename}.

svn path=/nixpkgs/trunk/; revision=3237
This commit is contained in:
Eelco Dolstra 2005-06-21 20:34:15 +00:00
parent fa6570f716
commit 1751b6481d
2 changed files with 6 additions and 1 deletions

View File

@ -5,7 +5,7 @@ ensureDir $out
dot2pdf() {
sourceFile=$1
targetName=$out/$(basename $(stripHash $sourceFile; echo $strippedName) .dot).pdf
echo "convering $sourceFile to $targetName..."
echo "converting $sourceFile to $targetName..."
dot -Tps $sourceFile > tmp.ps
epstopdf --outfile $targetName tmp.ps
}

View File

@ -56,6 +56,11 @@ while (scalar @workset > 0) {
$bib =~ s/\s+$//;
push @workset, $path . "/" . $bib . ".bib";
}
} elsif (/\\includegraphics(\[.*\])?\{(.*)\}/) {
my $fn2 = $2;
die "absolute path! $fn2" if substr($fn2, 0, 1) eq "/";
push @workset, $path . "/" . $fn2 . ".pdf";
push @workset, $path . "/" . $fn2 . ".ps";
}
# !!! also support \usepackage
}