summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2011-01-20 21:39:35 +0000
committerKarl Berry <karl@freefriends.org>2011-01-20 21:39:35 +0000
commit02b0b6f506ffda8c9043310519b3b4bdd18fdaac (patch)
treea8fc9c09e0b82238f5e1bba2b8f9d305a1162683 /Master
parentc8959017f6539e46109db2487682b6db54edce83 (diff)
pst2pdf (20jan11)
git-svn-id: svn://tug.org/texlive/trunk@21135 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r--Master/texmf-dist/doc/latex/pst2pdf/Changes6
-rw-r--r--Master/texmf-dist/doc/latex/pst2pdf/Makefile (renamed from Master/texmf-dist/source/latex/pst2pdf/Makefile)26
-rw-r--r--Master/texmf-dist/doc/latex/pst2pdf/README2
-rw-r--r--Master/texmf-dist/doc/latex/pst2pdf/pst2pdf-doc.bib39
-rw-r--r--Master/texmf-dist/doc/latex/pst2pdf/pst2pdf-doc.pdfbin71139 -> 73142 bytes
-rw-r--r--Master/texmf-dist/doc/latex/pst2pdf/pst2pdf-doc.tex18
-rw-r--r--Master/texmf-dist/doc/latex/pst2pdf/test2-pdf.pdfbin176631 -> 165265 bytes
-rwxr-xr-xMaster/texmf-dist/scripts/pst2pdf/pst2pdf56
8 files changed, 76 insertions, 71 deletions
diff --git a/Master/texmf-dist/doc/latex/pst2pdf/Changes b/Master/texmf-dist/doc/latex/pst2pdf/Changes
index d9b6cb98bc4..afe13167e70 100644
--- a/Master/texmf-dist/doc/latex/pst2pdf/Changes
+++ b/Master/texmf-dist/doc/latex/pst2pdf/Changes
@@ -1,4 +1,10 @@
pst2pdf.pl --------
+0.12 2011-01-19 - new optional arguments for runninh
+ bibtex or biber
+0.11 2010-10-03 - use graphicspath instead of $imageDir to
+ allow working with Windows
+ - test for pst-exa to write \psset in the
+ pdf file
0.10 2010-01-04 allow using the package pst-exa
0.09 2009-10-01 allow pspicture*
0.08 2009-08-28 test for png files (only for Linux)
diff --git a/Master/texmf-dist/source/latex/pst2pdf/Makefile b/Master/texmf-dist/doc/latex/pst2pdf/Makefile
index 580978848e1..442e4f0040d 100644
--- a/Master/texmf-dist/source/latex/pst2pdf/Makefile
+++ b/Master/texmf-dist/doc/latex/pst2pdf/Makefile
@@ -48,23 +48,15 @@ arch :
zip $(ARCHNAME).zip $(ARCHFILES)
tds:
- cp -u Changes $(TDS)/doc/generic/$(PACKAGE)/
- cp -u README $(TDS)/doc/generic/$(PACKAGE)/
- cp -u $(MAIN).pdf $(TDS)/doc/generic/$(PACKAGE)/
-#
- cp -u Changes $(TDS)/tex/latex/$(PACKAGE)/
- cp -u $(PACKAGE).sty $(TDS)/tex/latex/$(PACKAGE)/
-#
- cp -u Changes $(TDS)/tex/generic/$(PACKAGE)/
- cp -u $(PACKAGE).tex $(TDS)/tex/generic/$(PACKAGE)/
-#
- cp -u Changes $(TDS)/dvips/$(PACKAGE)/
- cp -u $(PACKAGE).pro $(TDS)/dvips/$(PACKAGE)/
-#
- cp -u Changes $(TDS)/source/$(PACKAGE)/
- cp -u $(MAIN).tex $(TDS)/source/$(PACKAGE)/
- cp -u $(MAIN).bib $(TDS)/source/$(PACKAGE)/
- cp -u Makefile $(TDS)/source/$(PACKAGE)/
+ cp -u Changes $(TDS)/scripts/$(PACKAGE)/
+ cp -u README $(TDS)/scripts/$(PACKAGE)/
+ cp -u $(MAIN).pdf $(TDS)/scripts/$(PACKAGE)/
+ cp -u $(MAIN).tex $(TDS)/scripts/$(PACKAGE)/
+ cp -u $(MAIN).bib $(TDS)/scripts/$(PACKAGE)/
+ cp -u Makefile $(TDS)/scripts/$(PACKAGE)/
+ cp -u test?.tex $(TDS)/scripts/$(PACKAGE)/
+ cp -u test?-pdf.pdf $(TDS)/scripts/$(PACKAGE)/
+ cp -u pst2pdf.pl $(TDS)/scripts/$(PACKAGE)/
# EOF
diff --git a/Master/texmf-dist/doc/latex/pst2pdf/README b/Master/texmf-dist/doc/latex/pst2pdf/README
index 31e846d5d96..37db62ada72 100644
--- a/Master/texmf-dist/doc/latex/pst2pdf/README
+++ b/Master/texmf-dist/doc/latex/pst2pdf/README
@@ -41,6 +41,8 @@ Options:
--verbose
--clear
--noImages
+--runBibtex
+--runBiber
for more documentation => perldoc pst2pdf or read the documentation
diff --git a/Master/texmf-dist/doc/latex/pst2pdf/pst2pdf-doc.bib b/Master/texmf-dist/doc/latex/pst2pdf/pst2pdf-doc.bib
index 8894fa5f494..75da5a14ec5 100644
--- a/Master/texmf-dist/doc/latex/pst2pdf/pst2pdf-doc.bib
+++ b/Master/texmf-dist/doc/latex/pst2pdf/pst2pdf-doc.bib
@@ -67,15 +67,6 @@
}
-@Book{voss:chaos,
- author = {Herbert Vo{\ss}},
- title = {Chaos und {F}raktale selbst programmieren: von {M}andelbrotmengen
- {\"u}ber {F}arbmanipulationen zur perfekten Darstellung},
- publisher = {{Franzis Verlag}},
- year = {1994},
- address = {Poing}
-}
-
@Article{girou:01:,
author = {Denis Girou},
title = {Pr\'esentation de {PST}ricks},
@@ -107,20 +98,20 @@
@Manual{pstricks,
Title = {PSTricks - {\PS} macros for generic {\TeX}},
- Author = {{Timothy van} Zandt},
+ Author = {{Timothy van} Zandt and Herbert Vo{\ss}},
Organization = {},
- Address = {\url{http://www.tug.org/application/PSTricks}},
+ Address = {\url{http://PSTricks.tug.org/}},
Note = {},
- year = 1993
+ year = 2011
}
@Manual{pst-plot,
Title = {\texttt{pst-plot}: Plotting two dimensional functions and data},
- Author = {{Timothy van} Zandt},
+ Author = {{Timothy van} Zandt and Herbert Vo{\ss}},
Organization = {},
Address = {\url{CTAN:graphics/pstricks/generic/pst-plot.tex}},
Note = {},
- year = 1999
+ year = 2011
}
@Manual{multido,
@@ -135,25 +126,9 @@
@Book{PSTricks2,
author = {Herbert Vo\ss},
title = {\texttt{PSTricks} -- {G}rafik f\"ur \TeX{} und \LaTeX},
- edition = {5.},
+ edition = {6.},
publisher = {DANTE -- Lehmanns},
- year = {2008},
+ year = {2011},
address = {Heidelberg/Hamburg}
}
-@Book{voss:math,
- author = {Herbert Vo\ss},
- title = {\LaTeX\ in {M}athematik und {N}aturwissenschaften},
- publisher = {{Franzis-Verlag}},
- year = {2006},
- address = {Poing}
-}
-
-@Manual{wolfram,
- author = {Eric Weisstein},
- title = {Wolfram MathWorld},
- publisher = {{Wolfram}},
- year = {2007},
- address = {\url{http://mathworld.wolfram.com}}
-}
-
diff --git a/Master/texmf-dist/doc/latex/pst2pdf/pst2pdf-doc.pdf b/Master/texmf-dist/doc/latex/pst2pdf/pst2pdf-doc.pdf
index 6636cce59f2..ff8111a0aeb 100644
--- a/Master/texmf-dist/doc/latex/pst2pdf/pst2pdf-doc.pdf
+++ b/Master/texmf-dist/doc/latex/pst2pdf/pst2pdf-doc.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/pst2pdf/pst2pdf-doc.tex b/Master/texmf-dist/doc/latex/pst2pdf/pst2pdf-doc.tex
index c201a359881..5d98d2d9088 100644
--- a/Master/texmf-dist/doc/latex/pst2pdf/pst2pdf-doc.tex
+++ b/Master/texmf-dist/doc/latex/pst2pdf/pst2pdf-doc.tex
@@ -2,7 +2,7 @@
\documentclass[11pt,english,BCOR10mm,DIV12,bibliography=totoc,parskip=false,
smallheadings, headexclude,footexclude,oneside]{pst-doc}
\usepackage[utf8]{inputenc}
-\usepackage{pst-exa,pst-text,pst-grad}
+\usepackage{pst-text,pst-grad,pst-exa}
\let\pstFV\fileversion
\DeclareFixedFont{\RM}{T1}{ptm}{b}{n}{4cm}
\renewcommand\bgImage{\pscharpath[fillstyle=gradient,
@@ -16,7 +16,8 @@
\begin{document}
\title{\texttt{pst2pdf}}
-\subtitle{Running a PSTricks document with pdflatex and \nxLPack{pst-exa}; v.\pstFV}
+\subtitle{Running a PSTricks document with pdflatex and \nxLPack{pst-exa};\\
+\small v.\pstFV}
\author{Herbert Vo\ss}
\docauthor{}
\date{\today}
@@ -34,7 +35,8 @@ code and output of PSTricks examples when running in pdf mode.
\vfill\noindent
Thanks to: \\
-Rolf Nirpraschk
+Pablo Gonzales Luengo;
+Rolf Niepraschk
\end{abstract}
@@ -74,7 +76,9 @@ The options listed in Table~\ref{perloptions} refer only to the script and not t
\Loption{--tempDir} & literal & . & the temporary directory for the temp files\\
\Loption{--verbose} & boolean & 1 & for a long \Lprog{pst2pdf} log\\
\Loption{--clear} & boolean & 0 & delete all temporary files\\
-\Loption{--noImages} & boolean & 0 & create no images, build only the pdf with the alread existing images\\\bottomrule
+\Loption{--noImages} & boolean & 0 & create no images, build only the pdf with the alread existing images\\
+\Loption{--runBibTeX} & boolean & 0 & runs \Lprog{bibtex} \\
+\Loption{--runBiber} & boolean & 0 & runs \Lprog{biber} if a file with extension \Lext{bcf} exists \\\bottomrule
\end{tabularx}
\end{table}
@@ -100,7 +104,7 @@ The package provides the environment \Lenv{PSTexample} with the optional
arguments listed in Table~\ref{pst-exaoptions}.
\begin{table}
-\caption{Possible optional arguments for the Perl script \nxLprog{pst2pdf}}\label{pst-exaoptions}
+\caption{Possible optional arguments for the package \LPack{pst-exa}}\label{pst-exaoptions}
\begin{tabularx}{\linewidth}{@{} l l l X @{}}\\\toprule
\emph{name} & \emph{values} & \textrm{\emph{default}} & \emph{description}\\\midrule
\Lkeyword{pos} & \Lkeyval{l},\Lkeyval{r},\Lkeyval{b},\Lkeyval{t} & \Lkeyval{l} & position of the image, maybe left, right, bottom ot top of the code.\\
@@ -108,7 +112,8 @@ arguments listed in Table~\ref{pst-exaoptions}.
\Lkeyword{valign} & \Lkeyval{l},\Lkeyval{r},\Lkeyval{c} & \Lkeyval{c} & the vertical alignment of the image.\\
\Lkeyword{frame} & see lst & & option is passed to \Lcs{lstinputlisting} from the package \LPack{listings}.\\
\Lkeyword{width} & length &0.5\Ldim{linewidth} & the width of the example box.\\
-\Lkeyword{sep} & length &1em & separation between image and code.\\\bottomrule
+\Lkeyword{sep} & length &1em & separation between image and code.\\
+\Lkeyword{imageDir} & literal &images/ & directory for the created images and tex files.\\\bottomrule
\end{tabularx}
\end{table}
@@ -122,7 +127,6 @@ with the package \LPack{pst-exa}.
\item[test3.tex] another example
\end{compactdesc}
-\clearpage
\section{List of all optional arguments for \texttt{pst-exa}}
\xkvview{family=pst-exa,columns={key,type,default}}
diff --git a/Master/texmf-dist/doc/latex/pst2pdf/test2-pdf.pdf b/Master/texmf-dist/doc/latex/pst2pdf/test2-pdf.pdf
index 5ea9adf0e73..5b507dae2ee 100644
--- a/Master/texmf-dist/doc/latex/pst2pdf/test2-pdf.pdf
+++ b/Master/texmf-dist/doc/latex/pst2pdf/test2-pdf.pdf
Binary files differ
diff --git a/Master/texmf-dist/scripts/pst2pdf/pst2pdf b/Master/texmf-dist/scripts/pst2pdf/pst2pdf
index 238757135d0..6b6ab985429 100755
--- a/Master/texmf-dist/scripts/pst2pdf/pst2pdf
+++ b/Master/texmf-dist/scripts/pst2pdf/pst2pdf
@@ -3,9 +3,10 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' && eval 'exec perl -S $0 $
use strict; # to be sure, that all is safe ... :-)
-# v. 0.10 simplify the use of PSTricks with pdf
-# 2010-01-04 (c) Herbert Voss <hvoss@tug.org>
+# v. 0.11 simplify the use of PSTricks with pdf
+# 2011-01-18 (c) Herbert Voss <hvoss@tug.org>
# $Id: pst2pdf.pl 239 2010-01-01 17:23:13Z herbert $
+# Thanks to Pablo Gonzales Luengo
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -31,7 +32,9 @@ use Getopt::Long; # read parameter
#----------------------- User part begin ------------------------
my $imageDir = "images"; # where to save the images
my @imageType = ("eps","pdf"); # all image types
-push (@imageType, "png") if $^O ne 'MSWin32';
+my $machine = "Linux";
+if ($^O eq 'MSWin32') { $machine = "Windows"; }
+else { push (@imageType, "png"); }
my $Iext = ".pdf"; # leave empty, if not a special one
my $tempDir = "."; # temporary directory
my $verbose = 1; # 0 or 1, logfile
@@ -39,6 +42,8 @@ my $clear = 0; # 0 or 1, clears all temporary files
my $DPI = 75; # very low value for the png's
my $Iscale = 1; # for \includegraphics
my $noImages = 0; # 1->create no images
+my $runBibTeX = 0; # 1->runs bibtex
+my $runBiber = 0; # 1->runs biber and sets $runBibTeX=0
#----------------------- User part end ---------------------------
@ARGV == 0 && die "file name expected!\n";
@@ -57,6 +62,8 @@ my $result = GetOptions ("DPI=i" => \$DPI, # numeric
"Iext=s" => \$Iext, # string
"clear" => \$clear, # flag
"noImages" => \$noImages, # flag
+ "runBibTeX" => \$runBibTeX, # flag
+ "runBiber" => \$runBiber, # flag
"verbose" => \$verbose); # flag
LOG ("Parameters:");
@@ -68,6 +75,14 @@ LOG ("==> tempDir = $tempDir");
LOG ("==> verbose = $verbose");
LOG ("==> clear = $clear");
LOG ("==> noImages = $noImages");
+LOG ("==> runBibTeX= $runBibTeX");
+LOG ("==> runBiber = $runBiber");
+
+if ($runBibTeX && $runBiber) {
+ LOG ("!!! you cannot run BibTeX and Biber at the same document ...");
+ LOG ("!!! Assuming to run Biber");
+ $runBibTeX = 0;
+}
my $imgNo = 0; # internal image counter
my $pstExaLoaded = 0; # Document loads pst-exa
@@ -228,6 +243,11 @@ sub runTeX {
system("convert $imageDir/-1.ppm $imageDir/$filename-$imgNo.png");
system("rm $imageDir/-1.ppm");
}
+ if ($Itype eq "jpg") {
+ system("pdftoppm -f 1 -l 1 -r $DPI $imageDir/$filename-$imgNo.pdf $imageDir/");
+ system("convert $imageDir/-1.ppm $imageDir/$filename-$imgNo.jpg");
+ system("rm $imageDir/-1.ppm");
+ }
if ($Itype eq "eps") { system("pdftops -f 1 -l 1 -eps $imageDir/$filename-$imgNo.pdf $imageDir/$filename-$imgNo.eps"); }
}
$imgNo++;
@@ -251,7 +271,7 @@ sub runFile {
my @PS = @$aref;
open (FILEp, "<$tempDir/$filename.preamble") or die "cannot open $tempDir/$filename.preamble!";
open (FILEsub, ">$tempDir/$filename-tmp.tex") or die "cannot open $tempDir/$filename-tmp.tex!";
-# print FILEsub "\\RequirePackage{listings}\n";
+ #print FILEsub "\\RequirePackage{listings}\n";
while (<FILEp>) { print FILEsub $_; }
print FILEsub "\\pagestyle{empty}\n";
print FILEsub "\\newenvironment{postscript}{}{}\n";
@@ -271,11 +291,11 @@ sub runpdfTeX() {
open (PDF, ">$tempDir/$pdfname-pdf.tex") or die "cannot open $tempDir/$pdfname-pdf.tex!";
open (FILE, "<$name.tex") or die "cannot open $name!";
print PDF "\\RequirePackage{graphicx}\n";
- if ($pstExaLoaded < 1) {
- print PDF "\\let\\IncludeGraphics\\includegraphics\n"; }
+ #if ($pstExaLoaded < 1) {
+ print PDF "\\let\\IncludeGraphics\\includegraphics\n"; #}
# print PDF "\\setkeys{Gin}{scale=0.25}\n";
# print PDF "\\providecommand\\psset[1]{}\n";
-# print PDF "\\graphicspath{{$imageDir/}}\n";
+ print PDF "\\graphicspath{{$imageDir/}}\n"; #uncomment
my $ignore = 0;
my $IMGno = 0;
my $depth = -1;
@@ -295,7 +315,7 @@ sub runpdfTeX() {
$type = 2;
$ignore = 1;
if ($iPS > 1) { print PDF substr($_,0,--$iPS); } # add preceeding text
- print PDF "\\IncludeGraphics[scale=$Iscale]{$imageDir/$name-tmp-$IMGno$Iext}";
+ print PDF "\\IncludeGraphics[scale=$Iscale]{$pdfname-tmp-$IMGno$Iext}"; #change name x pdfname
$IMGno++;
} # postscript env
if ( $type < 2 ) {
@@ -309,8 +329,8 @@ sub runpdfTeX() {
LOG("Increase depth: $depth");
if ( $depth == 0 ) {
if ($iPST > 1) { print PDF substr($_,0,--$iPST); }# add preceeding text
- print PDF "\\IncludeGraphics[scale=$Iscale]{$imageDir/$name-tmp-$IMGno$Iext}";
-# print PDF "\\IncludeGraphics{$name-tmp-$IMGno$Iext}"; # use \graphicspath
+ # print PDF "\\IncludeGraphics[scale=$Iscale]{$imageDir/$pdfname-tmp-$IMGno$Iext}"; #change name x pdfname
+ print PDF "\\IncludeGraphics[scale=$Iscale]{$pdfname-tmp-$IMGno$Iext}"; # use \graphicspath
$IMGno++;
LOG("Increase Image counter: $IMGno");
}
@@ -345,10 +365,12 @@ sub runpdfTeX() {
} # while (<FILE>)
close (FILE);
close (PDF);
- system("pdflatex $tempDir/$pdfname-pdf");
- system("makeindex $tempDir/$pdfname-pdf.idx");
- system("bibtex $tempDir/$pdfname-pdf");
+ my $runAgain = 0;
system("pdflatex $tempDir/$pdfname-pdf");
+ if (-e "$tempDir/$pdfname-pdf.idx") { system("makeindex $tempDir/$pdfname-pdf.idx"); $runAgain++; }
+ if ($runBibTeX && -e "$tempDir/$pdfname-pdf.aux") { system("bibtex $tempDir/$pdfname-pdf"); $runAgain++; }
+ if ($runBiber && -e "$tempDir/$pdfname-pdf.bcf") { system("biber $tempDir/$pdfname-pdf"); $runAgain++; }
+ if ($runAgain) { system("pdflatex $tempDir/$pdfname-pdf"); }
if ( $clear ) {
unlink "$tempDir/$pdfname-pdf.log";
unlink "$tempDir/$pdfname-pdf.aux";
@@ -374,7 +396,7 @@ TODO
=head1 DESCRIPTION
-runs latex and pdflatex on the TeX
+runs latex and pdflatex on the TeX source file
=head1 OPTIONS
@@ -396,6 +418,10 @@ runs latex and pdflatex on the TeX
=item --noImages - create no images, build only pdf
+=item --runBibTeX - run bibtex on the aux file, if exists
+
+=item --runBiber - run biber on the bcf file, if exists
+
=back
=head1 AUTHORS
@@ -404,7 +430,7 @@ Herbert Voss <hvoss@tug.org>
=head1 COPYRIGHT
-Copyright (c) 2007-2009 Herbert Voss <hvoss@tug.org>
+Copyright (c) 2007-2011 Herbert Voss <hvoss@tug.org>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by