summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorManuel Pégourié-Gonnard <mpg@elzevir.fr>2008-09-10 20:15:16 +0000
committerManuel Pégourié-Gonnard <mpg@elzevir.fr>2008-09-10 20:15:16 +0000
commitf3fe45d3bc69ef621d0db8f5c93cfcbb5a761747 (patch)
tree3f437ed37e2952eef7f3d9200ea94f61941697af /Master
parente3a6580980db6fb87922a58f4b56206d2eb4ba18 (diff)
pst-pdf update (2008/09/10)
git-svn-id: svn://tug.org/texlive/trunk@10547 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r--Master/texmf-dist/doc/latex/pst-pdf/CHANGES14
-rw-r--r--Master/texmf-dist/doc/latex/pst-pdf/pst-pdf-DE.pdfbin483990 -> 492298 bytes
-rw-r--r--Master/texmf-dist/doc/latex/pst-pdf/pst-pdf-example1.pdfbin0 -> 107089 bytes
-rw-r--r--Master/texmf-dist/doc/latex/pst-pdf/pst-pdf-example1.tex129
-rw-r--r--Master/texmf-dist/doc/latex/pst-pdf/pst-pdf-example2.pdf (renamed from Master/texmf-dist/doc/latex/pst-pdf/pst-pdf-example.pdf)bin418361 -> 414507 bytes
-rw-r--r--Master/texmf-dist/doc/latex/pst-pdf/pst-pdf-example2.tex279
-rw-r--r--Master/texmf-dist/doc/latex/pst-pdf/pst-pdf.pdfbin499163 -> 500857 bytes
-rw-r--r--Master/texmf-dist/source/latex/pst-pdf/pst-pdf.dtx315
-rw-r--r--Master/texmf-dist/source/latex/pst-pdf/pst-pdf.ins20
-rw-r--r--Master/texmf-dist/tex/latex/pst-pdf/pst-pdf.sty119
10 files changed, 672 insertions, 204 deletions
diff --git a/Master/texmf-dist/doc/latex/pst-pdf/CHANGES b/Master/texmf-dist/doc/latex/pst-pdf/CHANGES
index 1f1a8a298d1..8d795ebd400 100644
--- a/Master/texmf-dist/doc/latex/pst-pdf/CHANGES
+++ b/Master/texmf-dist/doc/latex/pst-pdf/CHANGES
@@ -23,7 +23,7 @@ v1.0g
\usepicture: Now \usepspicture does accept a numerical
parameter. (RN)
v1.0h
- postscript: Based no more on the comment environment from the
+ psmatrix: Based no more on the comment environment from the
verbatim package. (RN)
v1.0i
\ppf@is@pdfTeX@graphic: No more errors for given files without
@@ -71,7 +71,7 @@ v1.1c
Supress handling of pdfLaTeX graphic formats in DVI mode.
(RN)
v1.1d
- psmatrix: Support for PSTricks environment "psmatrix". (RN)
+ postscript: Support for PSTricks environment "psmatrix". (RN)
v1.1e
General: New option "displaymath" (see preview package).
(HjG/RN)
@@ -80,7 +80,8 @@ v1.1f
compilation of the dtx file in LaTeX mode is possible.
(RN)
v1.1g
- psmatrix: "psmatrix" environment (preserve math mode). (RN/HjG)
+ postscript: "psmatrix" environment (preserve math mode).
+ (RN/HjG)
pspicture: pspicture environment must still parse its arguments.
(RN/HjG)
v1.1h
@@ -115,3 +116,10 @@ v1.1q
v1.1r
General: Fixed values for \PreviewBbAdjust because \paperwidth
is not allways defined (suggested by Will Robertson).
+v1.1s
+ General: Dummy definition of the page key in DVI mode.
+v1.1t
+ General: Remove the line "\let\output\@gobble" because of bad
+ side effects. (RN)
+ postscript: Using environ the environment postscript is now
+ simple and more robust. (RN)
diff --git a/Master/texmf-dist/doc/latex/pst-pdf/pst-pdf-DE.pdf b/Master/texmf-dist/doc/latex/pst-pdf/pst-pdf-DE.pdf
index 88f7e0fe8e7..da40c518d28 100644
--- a/Master/texmf-dist/doc/latex/pst-pdf/pst-pdf-DE.pdf
+++ b/Master/texmf-dist/doc/latex/pst-pdf/pst-pdf-DE.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/pst-pdf/pst-pdf-example1.pdf b/Master/texmf-dist/doc/latex/pst-pdf/pst-pdf-example1.pdf
new file mode 100644
index 00000000000..eafc459977d
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/pst-pdf/pst-pdf-example1.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/pst-pdf/pst-pdf-example1.tex b/Master/texmf-dist/doc/latex/pst-pdf/pst-pdf-example1.tex
new file mode 100644
index 00000000000..11cb6cd16f3
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/pst-pdf/pst-pdf-example1.tex
@@ -0,0 +1,129 @@
+%%
+%% This is file `pst-pdf-example1.tex',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% pst-pdf.dtx (with options: `example1')
+%%
+%% This is a generated file.
+%%
+%% Copyright (C) 2004-2008 by Rolf Niepraschk <Rolf.Niepraschk@gmx.de>
+%% and Hubert Gaesslein
+%%
+%% This file may be distributed and/or modified under the conditions of
+%% the LaTeX Project Public License, either version 1.2 of this license
+%% or (at your option) any later version. The latest version of this
+%% license is in:
+%%
+%% http://www.latex-project.org/lppl.txt
+%%
+%% and version 1.2 or later is part of all distributions of LaTeX version
+%% 1999/12/01 or later.
+%%
+%% Process this file with the scripts `ps4pdf' or `ps4pdf.bat' or call
+%%
+%% latex pst-pdf-example1.tex
+%% dvips -Ppdf -o pst-pdf-example1-pics.ps pst-pdf-example1.dvi
+%% ps2pdf -dAutoRotatePages=/None pst-pdf-example1-pics.ps pst-pdf-example1-pics.pdf
+%% pdflatex pst-pdf-example1.tex
+%%
+\listfiles
+\documentclass[12pt,a4paper]{article}
+\usepackage[margin={25mm,30mm}]{geometry}
+
+\usepackage[dvipsnames]{pstricks}
+\usepackage{pst-node,pst-tree,psfrag}
+\usepackage{pst-pdf}
+
+\pagestyle{empty}
+
+\begin{document}
+
+\section*{\textsf{pst-pdf:} A short example document}
+
+\subsection*{png graphic and postscript graphic together}
+
+\noindent\includegraphics[width=.35\textwidth]{knuth}% A none-ps graphic
+\hfill
+\includegraphics[width=.60\textwidth]{elephant}% A ps graphic
+
+\subsection*{PSTricks code inside a pspicture environment}
+
+\newpsobject{showgrid}{psgrid}{subgriddiv=1,griddots=10,gridlabels=8pt}
+
+\begin{center}
+\begin{pspicture}(-5.25,-5.25)(5.25,5.25)%
+ \pscircle*[linecolor=Apricot]{5}
+ \rput(0,0.5){\includegraphics[width=8\psxunit]{elephant}}
+ \Huge\sffamily\bfseries
+ \rput(-4.5,4.5){A} \rput(4.5,4.5){B}
+ \rput(-4.5,-4.5){C}\rput(4.5,-4.5){D}
+ \rmfamily
+ \rput(0,-3.8){PSTricks}
+ \rput(0,3.8){\LaTeX}
+ \showgrid
+\end{pspicture}
+\end{center}
+
+\subsection*{PSTricks code without a pspicture environment}
+
+%%----------------------------------------------------------------------
+%% From: The \LaTeX\ Graphics Companion; first release.
+\definecolor{pink}{rgb}{1, .75, .8}
+\renewcommand\psedge{\nccurve}
+\newcommand{\Female}[2][]{{\psset{linecolor=pink}\TR[#1]{\emph{#2}}}}
+\newcommand{\Male}[2][]{{\psset{linecolor=blue}\TR[#1]{#2}}}
+\psset{nodesep=2pt,angleA=90,angleB=-90}
+\footnotesize
+
+\pstree[treemode=U]{\Female{{\bfseries Matilde}}}{%
+ \pstree{\Male{Sebastian}}{%
+ \pstree{\Male[name=P]{Philip}}{\Male{Frederick}\Female{Ethel}}
+ \pstree{\Female[name=W]{Mary}}{\Male{Lionel}\Female{Agnes}}}
+ \pstree{\Female{Leonor}}{%
+ \pstree{\Male[name=R]{Ra\'ul}}{\Male{Joaquim}\Female{J\'ulia}}
+ \pstree{\Female[name=A]{Am\'elia}}{\Male{\'Alvaro}\Female{Augusta}}}
+}
+
+%%----------------------------------------------------------------------
+
+\subsection*{psfrag demo}
+
+\normalsize
+
+\noindent
+\includegraphics[width=.475\textwidth]{psf-demo.eps}
+\hfill
+\begin{psfrags}
+ \psfragscanon
+ \psfrag{x1}[br][ ]{\LaTeX} \psfrag{x2}[br][br]{\LaTeX}
+ \psfrag{x3}[br][tl]{\LaTeX} \psfrag{x4}[br][Br]{\LaTeX}
+ \psfrag{x5}[Br][ r][1.15][45]{\Huge\LaTeX}
+ \psfrag{x6}[tl][ l][1.15][45]{\Huge\LaTeX}
+ \includegraphics[width=.475\textwidth]{psf-demo}
+\end{psfrags}
+
+\subsection*{The postscript environment}
+
+\begin{center}
+\begin{postscript}
+\Large
+\noindent
+$
+ \bordermatrix{%
+ & A & B & C\cr
+ & \rnode{D}{D} & E & \rnode{F}{F}\cr
+ & G & H & I\cr
+ & \rnode{J}{J} & K & M
+ }
+$
+\ncline[nodesep=-1em,linecolor=red]{D}{F}
+\ncline[nodesep=-1em,linecolor=red]{D}{J}
+\end{postscript}
+\end{center}
+
+\end{document}
+\endinput
+%%
+%% End of file `pst-pdf-example1.tex'.
diff --git a/Master/texmf-dist/doc/latex/pst-pdf/pst-pdf-example.pdf b/Master/texmf-dist/doc/latex/pst-pdf/pst-pdf-example2.pdf
index ddd38196c06..f451f6b6981 100644
--- a/Master/texmf-dist/doc/latex/pst-pdf/pst-pdf-example.pdf
+++ b/Master/texmf-dist/doc/latex/pst-pdf/pst-pdf-example2.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/pst-pdf/pst-pdf-example2.tex b/Master/texmf-dist/doc/latex/pst-pdf/pst-pdf-example2.tex
new file mode 100644
index 00000000000..1cfe003f77c
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/pst-pdf/pst-pdf-example2.tex
@@ -0,0 +1,279 @@
+%%
+%% This is file `pst-pdf-example2.tex',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% pst-pdf.dtx (with options: `example2')
+%%
+%% This is a generated file.
+%%
+%% Copyright (C) 2004-2008 by Rolf Niepraschk <Rolf.Niepraschk@gmx.de>
+%% and Hubert Gaesslein
+%%
+%% This file may be distributed and/or modified under the conditions of
+%% the LaTeX Project Public License, either version 1.2 of this license
+%% or (at your option) any later version. The latest version of this
+%% license is in:
+%%
+%% http://www.latex-project.org/lppl.txt
+%%
+%% and version 1.2 or later is part of all distributions of LaTeX version
+%% 1999/12/01 or later.
+%%
+%% Process this file with the scripts `ps4pdf' or `ps4pdf.bat' or call
+%%
+%% latex pst-pdf-example2.tex
+%% dvips -Ppdf -o pst-pdf-example2-pics.ps pst-pdf-example2.dvi
+%% ps2pdf -dAutoRotatePages=/None pst-pdf-example2-pics.ps pst-pdf-example2-pics.pdf
+%% pdflatex pst-pdf-example2.tex
+%%
+\listfiles\errorcontextlines=100\relax
+\documentclass[12pt]{article}
+
+%% before `psfrag'!
+\usepackage[displaymath,dvipsnames]{pst-pdf}
+%%\usepackage[displaymath,dvipsnames,notightpage]{pst-pdf}
+
+\usepackage{pst-node,pst-tree}
+
+\usepackage{psfrag,tabularx}
+
+\pagestyle{empty}
+
+\begin{postscript}[trim=0 0 0 0,ignore]
+ \includegraphics[width=.475\textwidth]{penguin.eps}
+\end{postscript}
+\savepicture{ps:A}
+
+\begin{pst-pdf-defs}%
+
+%% This definition must be within the pst-pdf-defs environment!
+\newcommand*\mytree{%
+ \begin{psmatrix}[rowsep=.2cm,colsep=2cm]
+ & & E \\
+ & A & \\
+ & & F \\
+ $\bullet$ & & \\
+ & & G \\
+ & B & \\
+ & & H \\
+ \scriptsize
+ \psset{shortput=nab,arrows=->,labelsep=2pt,nodesep=2pt,nrot=:U}
+
+ \ncline{4,1}{2,2}\ncput*{$0,2$}
+ \ncline{4,1}{6,2}\ncput*{$x$}
+
+ \ncline{2,2}{1,3}\ncput*{$0,3$}
+ \ncline{2,2}{3,3}\ncput*{$y$}
+
+ \ncline{6,2}{5,3}\ncput*{$z$}
+ \ncline{6,2}{7,3}\ncput*{$0,8$}
+ \end{psmatrix}%
+}
+
+\end{pst-pdf-defs}%
+
+%% This works without the pst-pdf-defs environment!
+\newcommand*\mymatrix{%
+ \begin{postscript}
+ \[
+ \begin{array}{rcl}
+ a & b & c \\
+ 1 & 2 & 3 \\
+ \end{array}
+ \]
+ \end{postscript}%
+}
+
+\begin{document}
+
+\setkeys{Gin}{showname,frame}%
+
+\psset{unit=0.0714\textwidth}% 1/14 * \textwidth
+\newpsobject{showgrid}{psgrid}{subgriddiv=1,griddots=10,gridlabels=6pt}
+
+\newcommand*\BASEMARKER{\rule{.5em}{.4pt}}
+
+\setlength\parindent{0pt}
+
+\centering
+
+\section*{\textsf{pst-pdf:}
+ PSTricks and other PostScript code in pdf\LaTeX\ documents}
+
+\vfill
+
+\begin{pspicture}(-5.5,-5.25)(5.25,5.25)%
+%%\begin{pspicture}[trim=-.5 -.25 .25 .25,frame](-5,-5)(5,5)% PSTricks2
+ \pscircle*[linecolor=Apricot]{5}
+ \rput(0,0.5){\includegraphics[width=8\psxunit]{elephant}}
+ \Huge\sffamily\bfseries
+ \rput(-4.5,4.5){A} \rput(4.5,4.5){B}
+ \rput(-4.5,-4.5){C}\rput(4.5,-4.5){D}
+ \rmfamily
+ \rput(0,-3.8){PSTricks}
+ \rput(0,3.8){\LaTeX}
+ \showgrid
+\end{pspicture}\savepicture{ps:B}
+
+\vfill\null\newpage
+
+\usepicture{ps:A}
+\hfill
+\includegraphics[width=.475\textwidth]{insect1}
+
+\vfill
+
+\usepicture[angle=180,origin=c]{ps:A}
+\hfill
+\usepicture[width=.47\textwidth]{ps:B}
+
+\includegraphics[width=.475\textwidth,frame=false,
+ namefont={\Huge\itshape}]{knuth}
+\hfill
+\usepicture[angle=45,origin=bl,width=.475\textwidth,innerframe]{1}%
+
+\vfill
+
+\includegraphics[width=.47\textwidth]{psf-demo}
+\hfill
+\begin{psfrags}
+ \psfragscanon
+ \psfrag{x1}[br][ ]{\LaTeX} \psfrag{x2}[br][br]{\LaTeX}
+ \psfrag{x3}[br][tl]{\LaTeX} \psfrag{x4}[br][Br]{\LaTeX}
+ \psfrag{x5}[Br][ r][1.15][45]{\Huge\LaTeX}
+ \psfrag{x6}[tl][ l][1.15][45]{\Huge\LaTeX}
+ \includegraphics[width=.47\textwidth]{psf-demo}
+\end{psfrags}
+
+\includegraphics[width=\textwidth,showname=false,frame=false]{insect15}
+
+\bigskip
+
+\Large
+
+\begin{equation}
+ \sigma(t)=\frac{1}{\sqrt{2\pi}}
+ \int^t_0 e^{-x^2/2} dx
+\end{equation}
+
+\clearpage
+
+\setkeys{Gin}{showname=false,frame=false}%
+
+{ \Huge \renewcommand*\arraystretch{1.5}
+
+ \noindent
+ \begin{tabularx}{\textwidth}{|@{}>{\centering}X@{}|} \hline
+
+ \psframebox*[fillcolor=green,framearc=.6]{HUGO}\BASEMARKER
+ \fbox{\BASEMARKER GUSTAV} \tabularnewline
+
+ \begin{postscript}
+ \psframebox*[fillcolor=green,framearc=.6]{HUGO}\BASEMARKER
+ \fbox{\BASEMARKER GUSTAV}
+ \end{postscript} \tabularnewline \hline
+
+ \end{tabularx}
+
+}
+
+\bigskip
+
+\definecolor{pink}{rgb}{1, .75, .8}
+\renewcommand\psedge{\nccurve}
+\newcommand{\Female}[2][]{{\psset{linecolor=pink}\TR[#1]{\emph{#2}}}}
+\newcommand{\Male}[2][]{{\psset{linecolor=blue}\TR[#1]{#2}}}
+
+\psset{nodesep=2pt,angleA=90,angleB=-90}
+
+{ \footnotesize
+
+ %% From: The \LaTeX\ Graphics Companion; first release.
+ \pstree[treemode=U]{\Female{{\bfseries Matilde}}}{%
+ \pstree{\Male{Sebastian}}{%
+ \pstree{\Male[name=P]{Philip}}{\Male{Frederick}\Female{Ethel}}
+ \pstree{\Female[name=W]{Mary}}{\Male{Lionel}\Female{Agnes}}}
+ \pstree{\Female{Leonor}}{%
+ \pstree{\Male[name=R]{Ra\'ul}}{\Male{Joaquim}\Female{J\'ulia}}
+ \pstree{\Female[name=A]{Am\'elia}}{\Male{\'Alvaro}\Female{Augusta}}}
+ }
+
+ \iffalse % --> Cannot work outside of a special environment!
+ \psset{linecolor=green,doubleline=true,linestyle=dotted}
+ \ncline{P}{W}\nbput{1940}
+ \ncline{R}{A}\nbput{1954}
+ \fi
+}
+
+\bigskip
+
+\psset{arrows=->,fillcolor=white,fillstyle=solid}
+
+\footnotesize
+
+\newcommand{\Show}[1]{\psshadowbox{#1}}
+
+\begin{psmatrix}[mnode=r,ref=t,unit=.3]
+ \psframebox[linestyle=none,framesep=.75]{%
+ \begin{psmatrix}[name=A,ref=c]
+ \Show{Stakeholder}
+ \end{psmatrix}} &
+ \psframebox[fillstyle=solid,fillcolor=pink,framesep=.95]{%
+ \rule{1cm}{0pt}
+ \begin{psmatrix}[ref=c]
+ [name=B]\Show{Goal} & \Show{Criteria}\\
+ \Show{Sub-goal} & \Show{Justification}
+ \ncline{1,1}{1,2}
+ \ncline{1,1}{2,2}
+ \ncline{1,1}{2,1}\tlput{Strategy}
+ \ncline{2,1}{2,2}
+ \end{psmatrix}}
+ \ncline[angleB=180]{A}{B}\naput[npos=.7]{Model}
+\end{psmatrix}
+
+\begin{postscript}[angle=90,height=\textheight,frame=false]
+
+\pstree[treemode=U]{\Female{{\bfseries Matilde}}}{%
+ \pstree{\Male{Sebastian}}{%
+ \pstree{\Male[name=P]{Philip}}{\Male{Frederick}\Female{Ethel}}
+ \pstree{\Female[name=W]{Mary}}{\Male{Lionel}\Female{Agnes}}}
+ \pstree{\Female{Leonor}}{
+ \pstree{\Male[name=R]{Ra\'ul}}{\Male{Joaquim}\Female{J\'ulia}}
+ \pstree{\Female[name=A]{Am\'elia}}{\Male{\'Alvaro}\Female{Augusta}}}
+}
+
+\psset{linecolor=green,doubleline=true,linestyle=dotted}
+\ncline{P}{W}\nbput{1940}
+\ncline{R}{A}\nbput{1954}
+
+\end{postscript}
+
+\bigskip
+
+\psset{arrows=-}
+
+\begin{displaymath}
+ \bordermatrix{%
+ & A & B & C\cr
+ & \rnode{D}{D} & E & \rnode{F}{F}\cr
+ & G & H & I\cr
+ & \rnode{J}{J} & K & M
+ }
+ \ncline[nodesep=-1em,linecolor=red]{D}{F}
+ \ncline[nodesep=-1em,linecolor=red]{D}{J}
+\end{displaymath}
+
+\bigskip
+
+\mytree
+
+\bigskip
+
+\mymatrix
+
+\end{document}
+\endinput
+%%
+%% End of file `pst-pdf-example2.tex'.
diff --git a/Master/texmf-dist/doc/latex/pst-pdf/pst-pdf.pdf b/Master/texmf-dist/doc/latex/pst-pdf/pst-pdf.pdf
index c5ccfa516b8..e0a2644f735 100644
--- a/Master/texmf-dist/doc/latex/pst-pdf/pst-pdf.pdf
+++ b/Master/texmf-dist/doc/latex/pst-pdf/pst-pdf.pdf
Binary files differ
diff --git a/Master/texmf-dist/source/latex/pst-pdf/pst-pdf.dtx b/Master/texmf-dist/source/latex/pst-pdf/pst-pdf.dtx
index feb9cd3106d..a378e5519e1 100644
--- a/Master/texmf-dist/source/latex/pst-pdf/pst-pdf.dtx
+++ b/Master/texmf-dist/source/latex/pst-pdf/pst-pdf.dtx
@@ -1,7 +1,7 @@
% \iffalse meta-comment
%
-% Copyright (C) 2005--2008
-% Rolf Niepraschk, <Rolf.Niepraschk@ptb.de>
+% Copyright (C) 2005-2008
+% Rolf Niepraschk, <Rolf.Niepraschk@gmx.de>
% Hubert Gaesslein
% --------------------------------------------------------------
%
@@ -24,7 +24,7 @@
%<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
%<package>\ProvidesPackage{pst-pdf}
%<*package>
- [2008/05/02 v1.1r PS graphics for pdfLaTeX (RN,HjG)]
+ [2008/09/09 v1.1t PS graphics for pdfLaTeX (RN,HjG)]
%</package>
%
%<*driver>
@@ -32,7 +32,7 @@
\documentclass[a4paper]{ltxdoc}
\usepackage[ignore]{pst-pdf}
\providecommand*\mainlang{}
-\usepackage[british,\mainlang]{babel}
+\usepackage[english,\mainlang]{babel}
\usepackage{booktabs,calc,array,url}
\usepackage[T1]{fontenc}
\usepackage{textcomp}
@@ -42,7 +42,7 @@
\RecordChanges
\begin{document}
\DocInput{pst-pdf.dtx}
- \begin{otherlanguage}{british}
+ \begin{otherlanguage}{english}
\PrintChanges \clearpage
\PrintIndex
\end{otherlanguage}
@@ -50,7 +50,7 @@
%</driver>
% \fi
%
-% \CheckSum{857}
+% \CheckSum{833}
%
% \CharacterTable
% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
@@ -155,7 +155,7 @@
% \fi
%
% \author{%
-% Rolf Niepraschk\thanks{\texttt{Rolf.Niepraschk@ptb.de}}
+% Rolf Niepraschk\thanks{\texttt{Rolf.Niepraschk@gmx.de}}
% \and
% Hubert G\"a{\ss}lein}
% \date{\filedate}
@@ -688,14 +688,13 @@
%
% \begin{environment}{pst-pdf-defs}
% \begin{macrocode}
- \newenvironment*{pst-pdf-defs}%
- {%
- \endgroup
+\newenvironment*{pst-pdf-defs}{%
+ \endgroup
% ??? \@currenvline
- }{%
- \begingroup
- \def\@currenvir{pst-pdf-defs}%
- }
+}{%
+ \begingroup
+ \def\@currenvir{pst-pdf-defs}%
+}
% \end{macrocode}
% \end{environment}
%
@@ -886,12 +885,14 @@
% \ifENGLISH
% No function in this mode.
% \fi
+% \changes{v1.1s}{2008/05/25}{Dummy definition of the page key in DVI mode.}
% \begin{macrocode}
\define@key{Gin}{innerframe}[true]{}%
\define@key{Gin}{frame}[true]{}%
\define@key{Gin}{ignore}[true]{}%
\define@key{Gin}{showname}[true]{}%
\define@key{Gin}{namefont}{}%
+ \@ifundefined{GPT@page}{\define@key{Gin}{page}{}}{}
% \end{macrocode}
% \changes{v1.0o}{2005/03/12}{New code for ``notightpage''. (RN)}
% \changes{v1.1r}{2008/05/02}{Fixed values for \cmd{\PreviewBbAdjust}
@@ -1151,6 +1152,20 @@
% \fi
% \begin{macrocode}
\PackageInfo{pst-pdf}{MODE: \ppf@TeX@mode\space (pdfTeX mode)}%
+% \end{macrocode}
+% \ifGERMAN
+% Verhindert pdf\TeX{}s Warnung \texttt{Non-PDF special ignored!}.
+% \fi
+% \ifENGLISH
+% Prevent pdf\TeX's message \texttt{Non-PDF special ignored!}.
+% \fi
+% \begin{macrocode}
+ \if@ppf@PST@used
+ \let\ppf@temp\AtBeginDvi\let\AtBeginDvi\@gobble
+ \RequirePackage{pstricks}\let\AtBeginDvi\ppf@temp
+ \fi
+% \end{macrocode}
+% \begin{macrocode}
\@temptokena{%
\let\Gin@PS@file@header\@gobble\let\Gin@PS@literal@header\@gobble
\let\Gin@PS@raw\@gobble\let\Gin@PS@restored\@gobble
@@ -1167,29 +1182,16 @@
\@ifundefined{c@lor@to@ps}{\def\c@lor@to@ps#1 #2\@@{}}{}}}%
% \end{macrocode}
% \ifGERMAN
-% Prevent pdf\TeX's message \texttt{Non-PDF special ignored!}.
-% \fi
-% \ifENGLISH
-% Prevent pdf\TeX's message \texttt{Non-PDF special ignored!}.
-% \fi
-% \begin{macrocode}
- \if@ppf@PST@used
- \let\ppf@temp\AtBeginDvi\let\AtBeginDvi\@gobble
- \RequirePackage{pstricks}\let\AtBeginDvi\ppf@temp
- \fi
-% \end{macrocode}
-% \ifGERMAN
% \PS-Ausgabe jetzt verhindern und sp\"ater noch einmal.
% \fi
% \ifENGLISH
% \PS\ output is now inhibited and later once again.
% \fi
% \begin{macrocode}
- \the\@temptokena %%% ????
+ \the\@temptokena
\expandafter\AtBeginDocument\expandafter
{\the\@temptokena\@temptokena{}}%
- \@ifundefined{PSTricksLoaded}{}
- {%
+ \@ifundefined{PSTricksLoaded}{}{%
% \end{macrocode}
% \ifGERMAN
% Zum Parsen der Argumente von PSTricks' \cmd{\pst@object} laden wir
@@ -1214,17 +1216,20 @@
% \fi
% \changes{v1.1b}{2005/04/09}{Ignore the call of
% \cmd{\nofiles} inside of \pkgname{preview}. (RN)}
-% \changes{v1.1p1}{2007/07/27}{\cmd{\let}\cmd{\output}\cmd{\@gobble}
+% \changes{v1.1p1}{2007/07/27}{\cmd{\let}\cmd{\output}\cmd{\@gobble}
% before loading of ``preview'' added. (RN)}
-% \begin{macrocode}
- \newtoks\ppf@temptoken
- \ppf@temptoken\expandafter{\the\output}%
- \let\output\@gobble
- \let\ppf@nofiles\nofiles \let\nofiles\relax
+% \changes{v1.1t}{2008/09/09}{Remove the line
+% ``\cmd{\let}\cmd{\output}\cmd{\@gobble}'' because of bad side
+% effects. (RN)}
+% \begin{macrocode}
+ \newtoks\ppf@output
+ \ppf@output\expandafter{\the\output}%
+ \let\ppf@nofiles=\nofiles \let\nofiles=\relax
+ \let\ppf@shipout=\shipout
\RequirePackage[active]{preview}[2005/01/29]%
- \let\shipout=\pr@shipout \let\nofiles\ppf@nofiles
- \output\expandafter{\the\ppf@temptoken}%
- \ppf@temptoken{}%
+ \let\shipout=\ppf@shipout \let\ppf@shipout=\relax
+ \let\nofiles=\ppf@nofiles \let\ppf@nofiles=\relax
+ \output\expandafter{\the\ppf@output} \ppf@output{}%
% \end{macrocode}
% \ifGERMAN
% \cmd{\pr@startbox}, \cmd{\pr@endbox}: Gegen\"uber Originaldefinition
@@ -1235,21 +1240,21 @@
% \fi
% \begin{macrocode}
\long\def\pr@startbox#1#2{%
- \ifpr@outer
- \toks@{#2}%
- \edef\pr@cleanup{\the\toks@}%
- \setbox\@tempboxa\vbox\bgroup
- \everydisplay{}%
- \pr@outerfalse%
- \expandafter\@firstofone
- \else
- \expandafter\@gobble
- \fi{#1}}%
+ \ifpr@outer
+ \toks@{#2}%
+ \edef\pr@cleanup{\the\toks@}%
+ \setbox\@tempboxa\vbox\bgroup
+ \everydisplay{}%
+ \pr@outerfalse%
+ \expandafter\@firstofone
+ \else
+ \expandafter\@gobble
+ \fi{#1}}%
\def\pr@endbox{%
- \egroup
- \setbox\@tempboxa\box\voidb@x
- \ppf@@getpicture
- \pr@cleanup}%
+ \egroup
+ \setbox\@tempboxa\box\voidb@x
+ \ppf@@getpicture
+ \pr@cleanup}%
% \end{macrocode}
% \ifGERMAN
% (Siehe auch identische Definition im DVI-Modus.)
@@ -1499,7 +1504,7 @@
\else\expandafter\@secondoftwo\fi}%
% \end{macrocode}
% \end{macro}
-% \begin{environment}{postscript}
+% \begin{environment}{psmatrix}
% \changes{v1.0h}{2005/02/15}{Based no more on the comment environment
% from the verbatim package. (RN)}
% \begin{environment}{pspicture}
@@ -1516,7 +1521,7 @@
% graphics out of the \cmd{\PDFcontainer} file. The value of the herein used
% |pspicture| counter's value can be used in \cmd{\label}/\cmd{\ref}.
% \fi
-% \begin{environment}{psmatrix}
+% \begin{environment}{postscript}
% \changes{v1.1d}{2005/04/19}{Support for PSTricks environment
% ``psmatrix''. (RN)}
% \changes{v1.1g}{2005/05/28}{``psmatrix'' environment
@@ -1534,55 +1539,27 @@
\let\ppf@set@mode=\@empty
\fi
}
- \newenvironment{postscript}[1][]
- {%
- \ppf@test@mmode
- \gdef\ppf@Gin@keys{}%
- \def\@tempa{postscript}\ifx\@tempa\@currenvir\gdef\ppf@Gin@keys{#1}\fi
-% \end{macrocode}
-% \ifGERMAN
-% Innerhalb der Umgebung ist das Parsen der Argumente von
-% \cmd{\pst@object} unn\"otig, daher wieder Originaldefinition
-% verwenden.
-% \fi
-% \ifENGLISH
-% Inside this environment parsing of \cmd{\pst@object}'s arguments is not
-% necessary, thus the original definition is used again.
-% \fi
-% \begin{macrocode}
- \expandafter\let\expandafter\pst@object
- \csname pr@\string\pst@object\endcsname
- \pr@outerfalse
% \end{macrocode}
-% \ifGERMAN
-% N\"otig f\"ur \cmd{\psmatrix}.
-% \fi
-% \ifENGLISH
-% Needed for \cmd{\psmatrix}.
-% \fi
+% \changes{v1.1t}{2008/09/09}{Using \pkgname{environ} the environment
+% \env{postscript} is now simple and more robust. (RN)}
% \begin{macrocode}
- \@makeother\&%
- \def\Gin@ii[##1]##2{}\setbox\@tempboxa=\vbox\bgroup
- \ppf@set@mode
- }%
- {\ppf@set@mode\egroup\aftergroup\ppf@@getpicture}%
+ \RequirePackage{environ}%
+ \newenvironment{postscript}[1][]{%
+ \def\@tempa{postscript}%
+ \ifx\@tempa\@currenvir
+ \def\ppf@Gin@keys{#1}%
+ \else
+ \def\ppf@Gin@keys{}%
+ \fi
+ \ppf@@getpicture
+ \Collect@Body\@gobble}{}%
\AtBeginDocument{%
- \@ifundefined{PSTricksLoaded}{}%
- {%
- \iffalse
- \PreviewEnvironment{pspicture}% Why doesn't it work?
- \g@addto@macro\pspicture{%
- %%\pr@outerfalse% necessary, or already there anyway?
- \@makeother\&% necessary?
- \def\Gin@ii[#1]#2{}%
- }%
- \g@addto@macro\endpspicture{\ppf@@getpicture}%
- \else
- \def\pst@@@picture[#1](#2,#3)(#4,#5){\postscript}%
- \def\endpspicture{\endpostscript\endgroup}%
- \fi
- \@ifundefined{psmatrix}{}%
- {\let\psmatrix=\postscript\let\endpsmatrix=\endpostscript}%
+ \@ifundefined{PSTricksLoaded}{}{%
+ \def\pst@@@picture[#1](#2,#3)(#4,#5){\postscript}%
+ \def\endpspicture{\endpostscript\endgroup}%
+ \@ifundefined{psmatrix}{}{%
+ \let\psmatrix=\postscript
+ \let\endpsmatrix=\endpostscript}%
}%
\@ifundefined{pfx@includegraphicx}{}{%
% \end{macrocode}
@@ -1593,10 +1570,9 @@
% wird.
% \fi
% \ifENGLISH
-% Die im pdf\TeX-Modus unn\"utze Umdefinition von
-% \cmd{\includegraphics} (Paket \pkgname{psfragx}) f\"uhrt zu zweifachem
-% Einfügen des Ergebnisses, weshalb die Originaldefition wiederhergestellt
-% wird.
+% The useless redefinition of \cmd{\includegraphics} in pdf\TeX\ mode
+% (package \pkgname{psfragx}) is leading to double insertion of the result.
+% We go back to the original meaning.
% \fi
% \begin{macrocode}
\let\includegraphics=\pfx@includegraphics
@@ -1716,16 +1692,12 @@
% \ifGERMAN
% Umgebung, die keine eigene Gruppe aufmacht. Innerhalb der Umgebung
% bekommt das Zeichen |&| den Kategoriecode "`other"'. Gedacht f\"ur
-% eigene Makros, die z.\,B.\ eine \env{psmatrix} enthalten.
-% (Einen ``Hook'' verwenden, falls andere Zeichen auch noch ben\"otigt
-% werden!?)
+% eigene Makrodefinitionen, die z.\,B.\ eine \env{psmatrix} enthalten.
% \fi
% \ifENGLISH
-% Umgebung, die keine eigene Gruppe aufmacht. Innerhalb der Umgebung
-% bekommt das Zeichen |&| den Kategoriecode "`other"'. Gedacht f\"ur
-% eigene Makros, die z.\,B.\ eine \env{psmatrix} enthalten.
-% (Einen ``Hook'' verwenden, falls andere Zeichen auch noch ben\"otigt
-% werden!?)
+% Environment without grouping. The character |&| has the catcode
+% ``other''. Useful for user-defined macro definitions with e.\,g.\ %
+% \env{psmatrix} inside.
% \fi
% \begin{macrocode}
\renewenvironment*{pst-pdf-defs}%
@@ -1773,14 +1745,119 @@
% \Finale
%\endinput
%
-% And here comes the example document ...
-%<*example>
+% And here comes the example documents ...
+%<*example1>
+%% Process this file with the scripts `ps4pdf' or `ps4pdf.bat' or call
+%%
+%% latex pst-pdf-example1.tex
+%% dvips -Ppdf -o pst-pdf-example1-pics.ps pst-pdf-example1.dvi
+%% ps2pdf -dAutoRotatePages=/None pst-pdf-example1-pics.ps pst-pdf-example1-pics.pdf
+%% pdflatex pst-pdf-example1.tex
+%%
+\listfiles
+\documentclass[12pt,a4paper]{article}
+\usepackage[margin={25mm,30mm}]{geometry}
+
+\usepackage[dvipsnames]{pstricks}
+\usepackage{pst-node,pst-tree,psfrag}
+\usepackage{pst-pdf}
+
+\pagestyle{empty}
+
+\begin{document}
+
+\section*{\textsf{pst-pdf:} A short example document}
+
+\subsection*{png graphic and postscript graphic together}
+
+\noindent\includegraphics[width=.35\textwidth]{knuth}% A none-ps graphic
+\hfill
+\includegraphics[width=.60\textwidth]{elephant}% A ps graphic
+
+\subsection*{PSTricks code inside a pspicture environment}
+
+\newpsobject{showgrid}{psgrid}{subgriddiv=1,griddots=10,gridlabels=8pt}
+
+\begin{center}
+\begin{pspicture}(-5.25,-5.25)(5.25,5.25)%
+ \pscircle*[linecolor=Apricot]{5}
+ \rput(0,0.5){\includegraphics[width=8\psxunit]{elephant}}
+ \Huge\sffamily\bfseries
+ \rput(-4.5,4.5){A} \rput(4.5,4.5){B}
+ \rput(-4.5,-4.5){C}\rput(4.5,-4.5){D}
+ \rmfamily
+ \rput(0,-3.8){PSTricks}
+ \rput(0,3.8){\LaTeX}
+ \showgrid
+\end{pspicture}
+\end{center}
+
+\subsection*{PSTricks code without a pspicture environment}
+
+%%----------------------------------------------------------------------
+%% From: The \LaTeX\ Graphics Companion; first release.
+\definecolor{pink}{rgb}{1, .75, .8}
+\renewcommand\psedge{\nccurve}
+\newcommand{\Female}[2][]{{\psset{linecolor=pink}\TR[#1]{\emph{#2}}}}
+\newcommand{\Male}[2][]{{\psset{linecolor=blue}\TR[#1]{#2}}}
+\psset{nodesep=2pt,angleA=90,angleB=-90}
+\footnotesize
+
+\pstree[treemode=U]{\Female{{\bfseries Matilde}}}{%
+ \pstree{\Male{Sebastian}}{%
+ \pstree{\Male[name=P]{Philip}}{\Male{Frederick}\Female{Ethel}}
+ \pstree{\Female[name=W]{Mary}}{\Male{Lionel}\Female{Agnes}}}
+ \pstree{\Female{Leonor}}{%
+ \pstree{\Male[name=R]{Ra\'ul}}{\Male{Joaquim}\Female{J\'ulia}}
+ \pstree{\Female[name=A]{Am\'elia}}{\Male{\'Alvaro}\Female{Augusta}}}
+}
+
+%%----------------------------------------------------------------------
+
+\subsection*{psfrag demo}
+
+\normalsize
+
+\noindent
+\includegraphics[width=.475\textwidth]{psf-demo.eps}
+\hfill
+\begin{psfrags}
+ \psfragscanon
+ \psfrag{x1}[br][ ]{\LaTeX} \psfrag{x2}[br][br]{\LaTeX}
+ \psfrag{x3}[br][tl]{\LaTeX} \psfrag{x4}[br][Br]{\LaTeX}
+ \psfrag{x5}[Br][ r][1.15][45]{\Huge\LaTeX}
+ \psfrag{x6}[tl][ l][1.15][45]{\Huge\LaTeX}
+ \includegraphics[width=.475\textwidth]{psf-demo}
+\end{psfrags}
+
+\subsection*{The postscript environment}
+
+\begin{center}
+\begin{postscript}
+\Large
+\noindent
+$
+ \bordermatrix{%
+ & A & B & C\cr
+ & \rnode{D}{D} & E & \rnode{F}{F}\cr
+ & G & H & I\cr
+ & \rnode{J}{J} & K & M
+ }
+$
+\ncline[nodesep=-1em,linecolor=red]{D}{F}
+\ncline[nodesep=-1em,linecolor=red]{D}{J}
+\end{postscript}
+\end{center}
+
+\end{document}
+%</example1>
+%<*example2>
%% Process this file with the scripts `ps4pdf' or `ps4pdf.bat' or call
%%
-%% latex pst-pdf-example.tex
-%% dvips -Ppdf -o pst-pdf-example-pics.ps pst-pdf-example.dvi
-%% ps2pdf -dAutoRotatePages=/None pst-pdf-example-pics.ps pst-pdf-example-pics.pdf
-%% pdflatex pst-pdf-example.tex
+%% latex pst-pdf-example2.tex
+%% dvips -Ppdf -o pst-pdf-example2-pics.ps pst-pdf-example2.dvi
+%% ps2pdf -dAutoRotatePages=/None pst-pdf-example2-pics.ps pst-pdf-example2-pics.pdf
+%% pdflatex pst-pdf-example2.tex
%%
\listfiles\errorcontextlines=100\relax
\documentclass[12pt]{article}
@@ -2030,4 +2107,4 @@
\mymatrix
\end{document}
-%</example>
+%</example2>
diff --git a/Master/texmf-dist/source/latex/pst-pdf/pst-pdf.ins b/Master/texmf-dist/source/latex/pst-pdf/pst-pdf.ins
index 30a9df58bf0..9b58cf757e7 100644
--- a/Master/texmf-dist/source/latex/pst-pdf/pst-pdf.ins
+++ b/Master/texmf-dist/source/latex/pst-pdf/pst-pdf.ins
@@ -1,17 +1,3 @@
-%%
-%% Copyright (C) 2004 by Rolf Niepraschk <Rolf.Niepraschk@ptb.de>
-%%
-%% This file may be distributed and/or modified under the conditions of
-%% the LaTeX Project Public License, either version 1.2 of this license
-%% or (at your option) any later version. The latest version of this
-%% license is in:
-%%
-%% http://www.latex-project.org/lppl.txt
-%%
-%% and version 1.2 or later is part of all distributions of LaTeX version
-%% 1999/12/01 or later.
-%%
-
\input docstrip.tex
\keepsilent
\askforoverwritefalse
@@ -22,7 +8,8 @@
This is a generated file.
-Copyright (C) 2004 by Rolf Niepraschk <Rolf.Niepraschk@ptb.de>
+Copyright (C) 2004-2008 by Rolf Niepraschk <Rolf.Niepraschk@gmx.de>
+ and Hubert Gaesslein
This file may be distributed and/or modified under the conditions of
the LaTeX Project Public License, either version 1.2 of this license
@@ -37,7 +24,8 @@ and version 1.2 or later is part of all distributions of LaTeX version
\endpreamble
\generate{\file{pst-pdf.sty}{\from{pst-pdf.dtx}{package}}}
-\generate{\file{pst-pdf-example.tex}{\from{pst-pdf.dtx}{example}}}
+\generate{\file{pst-pdf-example1.tex}{\from{pst-pdf.dtx}{example1}}}
+\generate{\file{pst-pdf-example2.tex}{\from{pst-pdf.dtx}{example2}}}
\obeyspaces
\Msg{*************************************************************}
diff --git a/Master/texmf-dist/tex/latex/pst-pdf/pst-pdf.sty b/Master/texmf-dist/tex/latex/pst-pdf/pst-pdf.sty
index 1aef15fa32d..e379e06a650 100644
--- a/Master/texmf-dist/tex/latex/pst-pdf/pst-pdf.sty
+++ b/Master/texmf-dist/tex/latex/pst-pdf/pst-pdf.sty
@@ -8,7 +8,8 @@
%%
%% This is a generated file.
%%
-%% Copyright (C) 2004 by Rolf Niepraschk <Rolf.Niepraschk@ptb.de>
+%% Copyright (C) 2004-2008 by Rolf Niepraschk <Rolf.Niepraschk@gmx.de>
+%% and Hubert Gaesslein
%%
%% This file may be distributed and/or modified under the conditions of
%% the LaTeX Project Public License, either version 1.2 of this license
@@ -22,7 +23,7 @@
%%
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
\ProvidesPackage{pst-pdf}
- [2008/05/02 v1.1r PS graphics for pdfLaTeX (RN,HjG)]
+ [2008/09/09 v1.1t PS graphics for pdfLaTeX (RN,HjG)]
\newcommand*\ppf@TeX@mode{-1}
\newcommand*\ppf@draft{false}
\newif\if@ppf@PST@used\@ppf@PST@usedtrue
@@ -67,13 +68,12 @@
\newcommand*\ppf@other@extensions[1]{}
\newcommand*\usepicture[2][]{}
\newcommand*\savepicture[1]{}
- \newenvironment*{pst-pdf-defs}%
- {%
- \endgroup
- }{%
- \begingroup
- \def\@currenvir{pst-pdf-defs}%
- }
+\newenvironment*{pst-pdf-defs}{%
+ \endgroup
+}{%
+ \begingroup
+ \def\@currenvir{pst-pdf-defs}%
+}
\RequirePackage{graphicx}%
\let\ppf@Ginclude@graphics\Ginclude@graphics
\let\ppf@Gin@extensions\Gin@extensions
@@ -129,6 +129,7 @@
\define@key{Gin}{ignore}[true]{}%
\define@key{Gin}{showname}[true]{}%
\define@key{Gin}{namefont}{}%
+ \@ifundefined{GPT@page}{\define@key{Gin}{page}{}}{}
\if@ppf@tightpage\else
\def\PreviewBbAdjust{%
-600pt -600pt 600pt 600pt}%
@@ -208,45 +209,44 @@
\let\pdfliteral\@gobble%
\or
\PackageInfo{pst-pdf}{MODE: \ppf@TeX@mode\space (pdfTeX mode)}%
+ \if@ppf@PST@used
+ \let\ppf@temp\AtBeginDvi\let\AtBeginDvi\@gobble
+ \RequirePackage{pstricks}\let\AtBeginDvi\ppf@temp
+ \fi
\@temptokena{%
\let\Gin@PS@file@header\@gobble\let\Gin@PS@literal@header\@gobble
\let\Gin@PS@raw\@gobble\let\Gin@PS@restored\@gobble
\@ifundefined{PSTricksLoaded}{}{%
\PSTricksOff
\@ifundefined{c@lor@to@ps}{\def\c@lor@to@ps#1 #2\@@{}}{}}}%
- \if@ppf@PST@used
- \let\ppf@temp\AtBeginDvi\let\AtBeginDvi\@gobble
- \RequirePackage{pstricks}\let\AtBeginDvi\ppf@temp
- \fi
- \the\@temptokena %%% ????
+ \the\@temptokena
\expandafter\AtBeginDocument\expandafter
{\the\@temptokena\@temptokena{}}%
- \@ifundefined{PSTricksLoaded}{}
- {%
- \newtoks\ppf@temptoken
- \ppf@temptoken\expandafter{\the\output}%
- \let\output\@gobble
- \let\ppf@nofiles\nofiles \let\nofiles\relax
+ \@ifundefined{PSTricksLoaded}{}{%
+ \newtoks\ppf@output
+ \ppf@output\expandafter{\the\output}%
+ \let\ppf@nofiles=\nofiles \let\nofiles=\relax
+ \let\ppf@shipout=\shipout
\RequirePackage[active]{preview}[2005/01/29]%
- \let\shipout=\pr@shipout \let\nofiles\ppf@nofiles
- \output\expandafter{\the\ppf@temptoken}%
- \ppf@temptoken{}%
+ \let\shipout=\ppf@shipout \let\ppf@shipout=\relax
+ \let\nofiles=\ppf@nofiles \let\ppf@nofiles=\relax
+ \output\expandafter{\the\ppf@output} \ppf@output{}%
\long\def\pr@startbox#1#2{%
- \ifpr@outer
- \toks@{#2}%
- \edef\pr@cleanup{\the\toks@}%
- \setbox\@tempboxa\vbox\bgroup
- \everydisplay{}%
- \pr@outerfalse%
- \expandafter\@firstofone
- \else
- \expandafter\@gobble
- \fi{#1}}%
+ \ifpr@outer
+ \toks@{#2}%
+ \edef\pr@cleanup{\the\toks@}%
+ \setbox\@tempboxa\vbox\bgroup
+ \everydisplay{}%
+ \pr@outerfalse%
+ \expandafter\@firstofone
+ \else
+ \expandafter\@gobble
+ \fi{#1}}%
\def\pr@endbox{%
- \egroup
- \setbox\@tempboxa\box\voidb@x
- \ppf@@getpicture
- \pr@cleanup}%
+ \egroup
+ \setbox\@tempboxa\box\voidb@x
+ \ppf@@getpicture
+ \pr@cleanup}%
\AtBeginDocument{%
\@ifundefined{pst@object}{}%
{%
@@ -372,36 +372,23 @@
\let\ppf@set@mode=\@empty
\fi
}
- \newenvironment{postscript}[1][]
- {%
- \ppf@test@mmode
- \gdef\ppf@Gin@keys{}%
- \def\@tempa{postscript}\ifx\@tempa\@currenvir\gdef\ppf@Gin@keys{#1}\fi
- \expandafter\let\expandafter\pst@object
- \csname pr@\string\pst@object\endcsname
- \pr@outerfalse
- \@makeother\&%
- \def\Gin@ii[##1]##2{}\setbox\@tempboxa=\vbox\bgroup
- \ppf@set@mode
- }%
- {\ppf@set@mode\egroup\aftergroup\ppf@@getpicture}%
+ \RequirePackage{environ}%
+ \newenvironment{postscript}[1][]{%
+ \def\@tempa{postscript}%
+ \ifx\@tempa\@currenvir
+ \def\ppf@Gin@keys{#1}%
+ \else
+ \def\ppf@Gin@keys{}%
+ \fi
+ \ppf@@getpicture
+ \Collect@Body\@gobble}{}%
\AtBeginDocument{%
- \@ifundefined{PSTricksLoaded}{}%
- {%
- \iffalse
- \PreviewEnvironment{pspicture}% Why doesn't it work?
- \g@addto@macro\pspicture{%
- %%\pr@outerfalse% necessary, or already there anyway?
- \@makeother\&% necessary?
- \def\Gin@ii[#1]#2{}%
- }%
- \g@addto@macro\endpspicture{\ppf@@getpicture}%
- \else
- \def\pst@@@picture[#1](#2,#3)(#4,#5){\postscript}%
- \def\endpspicture{\endpostscript\endgroup}%
- \fi
- \@ifundefined{psmatrix}{}%
- {\let\psmatrix=\postscript\let\endpsmatrix=\endpostscript}%
+ \@ifundefined{PSTricksLoaded}{}{%
+ \def\pst@@@picture[#1](#2,#3)(#4,#5){\postscript}%
+ \def\endpspicture{\endpostscript\endgroup}%
+ \@ifundefined{psmatrix}{}{%
+ \let\psmatrix=\postscript
+ \let\endpsmatrix=\endpostscript}%
}%
\@ifundefined{pfx@includegraphicx}{}{%
\let\includegraphics=\pfx@includegraphics