summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/combinedgraphics/test
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
committerNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
commite0c6872cf40896c7be36b11dcc744620f10adf1d (patch)
tree60335e10d2f4354b0674ec22d7b53f0f8abee672 /macros/latex/contrib/combinedgraphics/test
Initial commit
Diffstat (limited to 'macros/latex/contrib/combinedgraphics/test')
-rw-r--r--macros/latex/contrib/combinedgraphics/test/Makefile88
-rw-r--r--macros/latex/contrib/combinedgraphics/test/combinedgraphics_test.pdfbin0 -> 129450 bytes
-rw-r--r--macros/latex/contrib/combinedgraphics/test/combinedgraphics_test.tex226
-rw-r--r--macros/latex/contrib/combinedgraphics/test/gnuplot42.eps655
-rw-r--r--macros/latex/contrib/combinedgraphics/test/gnuplot42.pdfbin0 -> 3409 bytes
-rw-r--r--macros/latex/contrib/combinedgraphics/test/gnuplot42.plt16
-rw-r--r--macros/latex/contrib/combinedgraphics/test/gnuplot42.tex109
-rw-r--r--macros/latex/contrib/combinedgraphics/test/xfig325.eps113
-rw-r--r--macros/latex/contrib/combinedgraphics/test/xfig325.fig12
-rw-r--r--macros/latex/contrib/combinedgraphics/test/xfig325.pdfbin0 -> 2462 bytes
-rw-r--r--macros/latex/contrib/combinedgraphics/test/xfig325.tex12
11 files changed, 1231 insertions, 0 deletions
diff --git a/macros/latex/contrib/combinedgraphics/test/Makefile b/macros/latex/contrib/combinedgraphics/test/Makefile
new file mode 100644
index 0000000000..5107d5a91e
--- /dev/null
+++ b/macros/latex/contrib/combinedgraphics/test/Makefile
@@ -0,0 +1,88 @@
+#
+# Makefile for tests of combinedgraphics package
+#
+# Copyright 2009,2011,2012 Christian Schneider <software(at)chschneider(dot)eu>
+#
+# This file is part of combinedgraphics.
+#
+# combinedgraphics is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License version 3 as
+# published by the Free Software Foundation, not any later version.
+#
+# combinedgraphics is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with combinedgraphics. If not, see <http://www.gnu.org/licenses/>.
+#
+# WARNING: THIS IS ALPHA SOFTWARE AND MAY CONTAIN SERIOUS BUGS!
+#
+
+# input files
+SRCFILE := combinedgraphics_test.tex
+STYFILES := ../combinedgraphics.sty
+FIGFILES := xfig325.fig
+PLTFILES := gnuplot42.plt
+
+# installation directories
+DESTDIR := $(HOME)/.texmf
+DOCDIR := $(DESTDIR)/doc/latex/$(PACKAGE)/test
+SRCDIR := $(DESTDIR)/source/latex/$(PACKAGE)/test
+
+# output files
+PDFFILE := $(patsubst %.tex,%.pdf,$(SRCFILE))
+TEXGRAPHICS := $(patsubst %.fig,%.tex,$(FIGFILES)) \
+ $(patsubst %.plt,%.tex,$(PLTFILES))
+EPSGRAPHICS := $(patsubst %.fig,%.eps,$(FIGFILES)) \
+ $(patsubst %.plt,%.eps,$(PLTFILES))
+PDFGRAPHICS := $(patsubst %.fig,%.pdf,$(FIGFILES)) \
+ $(patsubst %.plt,%.pdf,$(PLTFILES))
+
+# required tools
+PDFLATEX := pdflatex
+FIG2DEV := fig2dev
+GNUPLOT := gnuplot
+EPSTOPDF := epstopdf
+
+# environment variables of (pdf)latex
+export TEXINPUTS := .:..:$(TEXINPUTS)
+export TEXPICTS := .:..:$(TEXPICTS)
+
+.PHONY: all test install clean distclean force
+
+all: test
+
+%.tex: %.fig
+ $(FIG2DEV) -L pstex_t $< $@
+
+%.eps: %.fig
+ $(FIG2DEV) -L pstex $< $@
+
+%.tex %.eps: %.plt
+ $(GNUPLOT) $<
+
+%.pdf: %.eps
+ $(EPSTOPDF) --outfile=$@ $<
+
+$(PDFFILE): %.pdf: %.tex $(STYFILES) $(TEXGRAPHICS) $(PDFGRAPHICS)
+ $(PDFLATEX) -interaction=nonstopmode $<
+ $(PDFLATEX) -interaction=nonstopmode $<
+ $(PDFLATEX) -interaction=nonstopmode $<
+
+test: $(PDFFILE) $(EPSGRAPHICS)
+
+install:
+ mkdir -p $(DOCDIR) $(SRCDIR)
+ install -m 644 $(PDFFILE) $(DOCDIR)
+ install -m 644 $(SRCFILE) $(FIGFILES) $(PLTFILES) Makefile \
+ $(TEXGRAPHICS) $(EPSGRAPHICS) $(PDFGRAPHICS) $(SRCDIR)
+
+clean:
+ $(RM) *.aux *.glo *.gls *.idx *.ilg *.ind *.log *.toc *~
+
+distclean: clean
+
+mrproper: distclean
+ $(RM) $(PDFFILE) $(TEXGRAPHICS) $(EPSGRAPHICS) $(PDFGRAPHICS)
diff --git a/macros/latex/contrib/combinedgraphics/test/combinedgraphics_test.pdf b/macros/latex/contrib/combinedgraphics/test/combinedgraphics_test.pdf
new file mode 100644
index 0000000000..fa8ba4d747
--- /dev/null
+++ b/macros/latex/contrib/combinedgraphics/test/combinedgraphics_test.pdf
Binary files differ
diff --git a/macros/latex/contrib/combinedgraphics/test/combinedgraphics_test.tex b/macros/latex/contrib/combinedgraphics/test/combinedgraphics_test.tex
new file mode 100644
index 0000000000..e67a523afe
--- /dev/null
+++ b/macros/latex/contrib/combinedgraphics/test/combinedgraphics_test.tex
@@ -0,0 +1,226 @@
+%
+% LaTeX test file for combinedgraphics package
+%
+% Copyright 2009,2011,2012 Christian Schneider <software(at)chschneider(dot)eu>
+%
+% This file is part of combinedgraphics.
+%
+% combinedgraphics is free software: you can redistribute it and/or modify
+% it under the terms of the GNU General Public License version 3 as
+% published by the Free Software Foundation, not any later version.
+%
+% combinedgraphics is distributed in the hope that it will be useful,
+% but WITHOUT ANY WARRANTY; without even the implied warranty of
+% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+% GNU General Public License for more details.
+%
+% You should have received a copy of the GNU General Public License
+% along with combinedgraphics. If not, see <http://www.gnu.org/licenses/>.
+%
+% WARNING: THIS IS ALPHA SOFTWARE AND MAY CONTAIN SERIOUS BUGS!
+%
+
+\documentclass[DIV12]{scrartcl}
+
+\usepackage{combinedgraphics}
+%\usepackage{combinedgraphics}
+
+\newcommand*\mycolor{\color{blue}}
+\newcommand*\myfont{\bfseries\Large}
+\newcommand*\combinput[1]{%
+ \begin{picture}(0,0)%
+ \includegraphics{#1}%
+ \end{picture}%
+ \input{#1}%
+}
+
+\begin{document}
+ \section*{Test: no macro parameters}
+ \noindent
+ \fbox{\combinput{xfig325}}%
+ \fbox{\input{gnuplot42}}\\[3ex]
+ \fbox{\includecombinedgraphics{xfig325}}%
+ \fbox{\includecombinedgraphics{gnuplot42}}\\[3ex]
+ The default output generated by manually including the graphics is given in
+ the first line and the output of \texttt{\textbackslash
+ includecombinedgraphics} with the options indicated in the headline is given
+ in the next line. Here, we should see exactly the same output in both lines,
+ because \texttt{\textbackslash includecombinedgraphics} is used without any
+ parameters.
+
+ \clearpage
+
+ \section*{Test: \texttt{textfont=\textbackslash bfseries\textbackslash
+ Large},\texttt{textcolor=\textbackslash color\{blue\}}}
+ \noindent
+ \fbox{\combinput{xfig325}}%
+ \fbox{\input{gnuplot42}}\\[3ex]
+ \fbox{\includecombinedgraphics[textfont=\myfont,textcolor=\mycolor]{xfig325}}%
+ \fbox{\includecombinedgraphics[textfont=\myfont,textcolor=\mycolor]%
+ {gnuplot42}}\\[3ex]
+ The font size is increased, the font series changed to bold-face and the color
+ to blue. Note, that the vector graphics part is not affected.
+
+ \clearpage
+
+ \section*{Test: \texttt{vecscale=1.2}}
+ \noindent
+ \fbox{\combinput{xfig325}}%
+ \fbox{\input{gnuplot42}}\\[3ex]
+ \fbox{\includecombinedgraphics[vecscale=1.2]{xfig325}}%
+ \fbox{\includecombinedgraphics[vecscale=1.2]{gnuplot42}}\\[3ex]
+ The vector graphics part is scaled by a factor of $1.2$. Note, that the text
+ positions are changed accordingly, but the font and color are not affected.
+
+ \clearpage
+
+ \section*{Test: \texttt{vecwidth=7cm}}
+ \noindent
+ \fbox{\combinput{xfig325}}%
+ \fbox{\input{gnuplot42}}\\[3ex]
+ \fbox{\includecombinedgraphics[vecwidth=7cm]{xfig325}}%
+ \fbox{\includecombinedgraphics[vecwidth=7cm]{gnuplot42}}\\
+ \fbox{\rlap{\raise 5pt\hbox{length: 7cm}}\rule{7cm}{1pt}}%
+ \fbox{\rlap{\raise 5pt\hbox{length: 7cm}}\rule{7cm}{1pt}}\\[3ex]
+ These examples are similar to the \texttt{vecscale=\ldots} examples, but the
+ scaling factor is calculated automatically such that the graphics have a
+ width of $7$cm.
+
+ \clearpage
+
+ \section*{Test: \texttt{vecheight=6cm}}
+ \noindent
+ \fbox{\combinput{xfig325}}%
+ \fbox{\input{gnuplot42}}\\[3ex]
+ \fbox{\rotatebox{90}{length: 6cm}\rule{1pt}{6cm}}%
+ \fbox{\includecombinedgraphics[vecheight=6cm]{xfig325}}%
+ \fbox{\includecombinedgraphics[vecheight=6cm]{gnuplot42}}\\[3ex]
+ Similiar example, but in this case the height is specified.
+
+ \clearpage
+
+ \section*{Test: \texttt{vecfile=\ldots}}
+ \noindent
+ \fbox{\combinput{xfig325}}%
+ \fbox{\input{gnuplot42}}\\[3ex]
+ \fbox{\includecombinedgraphics[vecfile=gnuplot42]{xfig325}}%
+ \fbox{\includecombinedgraphics[vecfile=xfig325]{gnuplot42}}\\[3ex]
+ Here, the vector graphics parts of the two graphics are interchanged (at the
+ inclusion of the first graphics file, the vector graphics part of the second
+ graphics file is passed to its \texttt{vecfile} parameter and vice versa).
+ This leads to some ``chaotic'' output, but the \texttt{vecfile} parameter
+ works as expected.
+
+ \clearpage
+
+ \section*{Test: \texttt{vecinclude=false}}
+ \noindent
+ \fbox{\combinput{xfig325}}%
+ \fbox{\input{gnuplot42}}\\[3ex]
+ \fbox{\includecombinedgraphics[vecinclude=false]{xfig325}}%
+ \fbox{\includecombinedgraphics[vecinclude=false]{gnuplot42}}\\[3ex]
+ Here, the automatic inclusion of the vector graphics part is disabled. As
+ the \LaTeX{} part of Xfig graphics do not include it (left), the vector
+ graphics part is not shown. In contrast gnuplot includes the vector graphics
+ part in the \LaTeX{} part (right).
+
+ \clearpage
+
+ \section*{Test: \texttt{vecinclude=overwrite}}
+ \noindent
+ \fbox{\combinput{xfig325}}%
+ \fbox{\input{gnuplot42}}\\[3ex]
+ \fbox{\includecombinedgraphics[vecinclude=overwrite]{xfig325}}%
+ \fbox{\includecombinedgraphics[vecinclude=overwrite]{gnuplot42}}\\[3ex]
+ The inclusion of the vector graphics part by the \LaTeX{} part is disabled
+ (if any) and \texttt{\textbackslash includecombinedgraphics} generates its
+ own code for the inclusion. In this case the vector graphics part is included
+ first, because \texttt{vecfirst=true} is the default. Note, that the label
+ ``filled'' in the gnuplot graphics has become visible. (In gnuplot's
+ \LaTeX{} parts labels are output before including the vector graphics part
+ and, hence, can become invisible under filled curves.)
+
+ \clearpage
+
+ \section*{Test: \texttt{vecfirst=false,vecinclude=overwrite}}
+ \noindent
+ \fbox{\combinput{xfig325}}%
+ \fbox{\input{gnuplot42}}\\[3ex]
+ \fbox{\includecombinedgraphics[vecfirst=false,vecinclude=overwrite]{xfig325}}%
+ \fbox{\includecombinedgraphics[vecfirst=false,vecinclude=overwrite]%
+ {gnuplot42}}\\[3ex]
+ This example is similar to the previous one, but now the vector graphics
+ part is forced to be included after the \LaTeX{} part. Note, that the text
+ in the left one is hidden and in addition to the label ``filled'', parts
+ of the axes labels etc. are hidden in the right one.
+
+ \clearpage
+
+ \section*{Test: \texttt{angle=90}}
+ \noindent
+ \fbox{\combinput{xfig325}}%
+ \fbox{\input{gnuplot42}}\\[3ex]
+ \fbox{\includecombinedgraphics[angle=90]{xfig325}}%
+ \fbox{\includecombinedgraphics[angle=90]{gnuplot42}}\\[3ex]
+ The graphics are rotated by 90 degrees.
+
+ \clearpage
+
+ \section*{Test: \texttt{scale=0.8}}
+ \noindent
+ \fbox{\combinput{xfig325}}%
+ \fbox{\input{gnuplot42}}\\[3ex]
+ \fbox{\includecombinedgraphics[scale=0.8]{xfig325}}%
+ \fbox{\includecombinedgraphics[scale=0.8]{gnuplot42}}\\[3ex]
+ The \emph{whole} graphics (vector graphics part and font) are scaled by a
+ factor of $0.8$.
+
+ \clearpage
+
+ \section*{Test: \texttt{hscale=1.2,vscale=0.8}}
+ \noindent
+ \fbox{\combinput{xfig325}}%
+ \fbox{\input{gnuplot42}}\\[3ex]
+ \fbox{\includecombinedgraphics[hscale=1.2,vscale=0.8]{xfig325}}%
+ \fbox{\includecombinedgraphics[hscale=1.2,vscale=0.8]{gnuplot42}}\\[3ex]
+ Similar to the example before, by the horizontal and vertical scaling factors
+ differ.
+
+ \clearpage
+
+ \section*{Test: \texttt{width=0.49\textbackslash textwidth,height=5cm}}
+ \noindent
+ \fbox{\combinput{xfig325}}%
+ \fbox{\input{gnuplot42}}\\[3ex]
+ \fbox{\includecombinedgraphics[width=0.49\textwidth,height=5cm]{xfig325}}%
+ \fbox{\includecombinedgraphics[width=0.49\textwidth,height=5cm]%
+ {gnuplot42}}\\[3ex]
+ Similar to the example before, but instead of scaling factors explicit
+ heights and widths are given.
+
+ \clearpage
+
+ \section*{Test: \texttt{width=0.49\textbackslash textwidth,keepaspectratio}}
+ \noindent
+ \fbox{\combinput{xfig325}}%
+ \fbox{\input{gnuplot42}}\\[3ex]
+ \fbox{\includecombinedgraphics[width=0.49\textwidth,keepaspectratio]%
+ {xfig325}}%
+ \fbox{\includecombinedgraphics[width=0.49\textwidth,keepaspectratio]%
+ {gnuplot42}}\\[3ex]
+ Again, similar as the examples before, but the new height is automatically
+ calculated such that the aspect ratio of the graphics does not change.
+
+ \clearpage
+
+ \section*{Test: \texttt{angle=30,scale=0.75,angle=15}}
+ \noindent
+ \fbox{\combinput{xfig325}}%
+ \fbox{\input{gnuplot42}}\\[3ex]
+ \fbox{\includecombinedgraphics[angle=30,scale=0.75,angle=15]{xfig325}}%
+ \fbox{\includecombinedgraphics[angle=30,scale=0.75,angle=15]{gnuplot42}}%
+ \\[3ex]
+ Here, a combination of different rotations and scalings is shown. In contrast
+ to other parameters, some (like \texttt{angle} and \texttt{scale}) do not
+ overwrite previously specified parameters, but they accumulate.
+\end{document}
diff --git a/macros/latex/contrib/combinedgraphics/test/gnuplot42.eps b/macros/latex/contrib/combinedgraphics/test/gnuplot42.eps
new file mode 100644
index 0000000000..21884fd0bf
--- /dev/null
+++ b/macros/latex/contrib/combinedgraphics/test/gnuplot42.eps
@@ -0,0 +1,655 @@
+%!PS-Adobe-2.0 EPSF-2.0
+%%Title: gnuplot42.tex
+%%Creator: gnuplot 4.4 patchlevel 0
+%%CreationDate: Fri Jul 13 20:19:16 2012
+%%DocumentFonts:
+%%BoundingBox: 50 50 230 176
+%%EndComments
+%%BeginProlog
+/gnudict 256 dict def
+gnudict begin
+%
+% The following true/false flags may be edited by hand if desired.
+% The unit line width and grayscale image gamma correction may also be changed.
+%
+/Color false def
+/Blacktext true def
+/Solid false def
+/Dashlength 1 def
+/Landscape false def
+/Level1 false def
+/Rounded false def
+/ClipToBoundingBox false def
+/TransparentPatterns false def
+/gnulinewidth 5.000 def
+/userlinewidth gnulinewidth def
+/Gamma 1.0 def
+%
+/vshift -73 def
+/dl1 {
+ 10.0 Dashlength mul mul
+ Rounded { currentlinewidth 0.75 mul sub dup 0 le { pop 0.01 } if } if
+} def
+/dl2 {
+ 10.0 Dashlength mul mul
+ Rounded { currentlinewidth 0.75 mul add } if
+} def
+/hpt_ 31.5 def
+/vpt_ 31.5 def
+/hpt hpt_ def
+/vpt vpt_ def
+Level1 {} {
+/SDict 10 dict def
+systemdict /pdfmark known not {
+ userdict /pdfmark systemdict /cleartomark get put
+} if
+SDict begin [
+ /Title (gnuplot42.tex)
+ /Subject (gnuplot plot)
+ /Creator (gnuplot 4.4 patchlevel 0)
+ /Author (chsch)
+% /Producer (gnuplot)
+% /Keywords ()
+ /CreationDate (Fri Jul 13 20:19:16 2012)
+ /DOCINFO pdfmark
+end
+} ifelse
+/doclip {
+ ClipToBoundingBox {
+ newpath 50 50 moveto 230 50 lineto 230 176 lineto 50 176 lineto closepath
+ clip
+ } if
+} def
+%
+% Gnuplot Prolog Version 4.4 (January 2010)
+%
+%/SuppressPDFMark true def
+%
+/M {moveto} bind def
+/L {lineto} bind def
+/R {rmoveto} bind def
+/V {rlineto} bind def
+/N {newpath moveto} bind def
+/Z {closepath} bind def
+/C {setrgbcolor} bind def
+/f {rlineto fill} bind def
+/Gshow {show} def % May be redefined later in the file to support UTF-8
+/vpt2 vpt 2 mul def
+/hpt2 hpt 2 mul def
+/Lshow {currentpoint stroke M 0 vshift R
+ Blacktext {gsave 0 setgray show grestore} {show} ifelse} def
+/Rshow {currentpoint stroke M dup stringwidth pop neg vshift R
+ Blacktext {gsave 0 setgray show grestore} {show} ifelse} def
+/Cshow {currentpoint stroke M dup stringwidth pop -2 div vshift R
+ Blacktext {gsave 0 setgray show grestore} {show} ifelse} def
+/UP {dup vpt_ mul /vpt exch def hpt_ mul /hpt exch def
+ /hpt2 hpt 2 mul def /vpt2 vpt 2 mul def} def
+/DL {Color {setrgbcolor Solid {pop []} if 0 setdash}
+ {pop pop pop 0 setgray Solid {pop []} if 0 setdash} ifelse} def
+/BL {stroke userlinewidth 2 mul setlinewidth
+ Rounded {1 setlinejoin 1 setlinecap} if} def
+/AL {stroke userlinewidth 2 div setlinewidth
+ Rounded {1 setlinejoin 1 setlinecap} if} def
+/UL {dup gnulinewidth mul /userlinewidth exch def
+ dup 1 lt {pop 1} if 10 mul /udl exch def} def
+/PL {stroke userlinewidth setlinewidth
+ Rounded {1 setlinejoin 1 setlinecap} if} def
+% Default Line colors
+/LCw {1 1 1} def
+/LCb {0 0 0} def
+/LCa {0 0 0} def
+/LC0 {1 0 0} def
+/LC1 {0 1 0} def
+/LC2 {0 0 1} def
+/LC3 {1 0 1} def
+/LC4 {0 1 1} def
+/LC5 {1 1 0} def
+/LC6 {0 0 0} def
+/LC7 {1 0.3 0} def
+/LC8 {0.5 0.5 0.5} def
+% Default Line Types
+/LTw {PL [] 1 setgray} def
+/LTb {BL [] LCb DL} def
+/LTa {AL [1 udl mul 2 udl mul] 0 setdash LCa setrgbcolor} def
+/LT0 {PL [] LC0 DL} def
+/LT1 {PL [4 dl1 2 dl2] LC1 DL} def
+/LT2 {PL [2 dl1 3 dl2] LC2 DL} def
+/LT3 {PL [1 dl1 1.5 dl2] LC3 DL} def
+/LT4 {PL [6 dl1 2 dl2 1 dl1 2 dl2] LC4 DL} def
+/LT5 {PL [3 dl1 3 dl2 1 dl1 3 dl2] LC5 DL} def
+/LT6 {PL [2 dl1 2 dl2 2 dl1 6 dl2] LC6 DL} def
+/LT7 {PL [1 dl1 2 dl2 6 dl1 2 dl2 1 dl1 2 dl2] LC7 DL} def
+/LT8 {PL [2 dl1 2 dl2 2 dl1 2 dl2 2 dl1 2 dl2 2 dl1 4 dl2] LC8 DL} def
+/Pnt {stroke [] 0 setdash gsave 1 setlinecap M 0 0 V stroke grestore} def
+/Dia {stroke [] 0 setdash 2 copy vpt add M
+ hpt neg vpt neg V hpt vpt neg V
+ hpt vpt V hpt neg vpt V closepath stroke
+ Pnt} def
+/Pls {stroke [] 0 setdash vpt sub M 0 vpt2 V
+ currentpoint stroke M
+ hpt neg vpt neg R hpt2 0 V stroke
+ } def
+/Box {stroke [] 0 setdash 2 copy exch hpt sub exch vpt add M
+ 0 vpt2 neg V hpt2 0 V 0 vpt2 V
+ hpt2 neg 0 V closepath stroke
+ Pnt} def
+/Crs {stroke [] 0 setdash exch hpt sub exch vpt add M
+ hpt2 vpt2 neg V currentpoint stroke M
+ hpt2 neg 0 R hpt2 vpt2 V stroke} def
+/TriU {stroke [] 0 setdash 2 copy vpt 1.12 mul add M
+ hpt neg vpt -1.62 mul V
+ hpt 2 mul 0 V
+ hpt neg vpt 1.62 mul V closepath stroke
+ Pnt} def
+/Star {2 copy Pls Crs} def
+/BoxF {stroke [] 0 setdash exch hpt sub exch vpt add M
+ 0 vpt2 neg V hpt2 0 V 0 vpt2 V
+ hpt2 neg 0 V closepath fill} def
+/TriUF {stroke [] 0 setdash vpt 1.12 mul add M
+ hpt neg vpt -1.62 mul V
+ hpt 2 mul 0 V
+ hpt neg vpt 1.62 mul V closepath fill} def
+/TriD {stroke [] 0 setdash 2 copy vpt 1.12 mul sub M
+ hpt neg vpt 1.62 mul V
+ hpt 2 mul 0 V
+ hpt neg vpt -1.62 mul V closepath stroke
+ Pnt} def
+/TriDF {stroke [] 0 setdash vpt 1.12 mul sub M
+ hpt neg vpt 1.62 mul V
+ hpt 2 mul 0 V
+ hpt neg vpt -1.62 mul V closepath fill} def
+/DiaF {stroke [] 0 setdash vpt add M
+ hpt neg vpt neg V hpt vpt neg V
+ hpt vpt V hpt neg vpt V closepath fill} def
+/Pent {stroke [] 0 setdash 2 copy gsave
+ translate 0 hpt M 4 {72 rotate 0 hpt L} repeat
+ closepath stroke grestore Pnt} def
+/PentF {stroke [] 0 setdash gsave
+ translate 0 hpt M 4 {72 rotate 0 hpt L} repeat
+ closepath fill grestore} def
+/Circle {stroke [] 0 setdash 2 copy
+ hpt 0 360 arc stroke Pnt} def
+/CircleF {stroke [] 0 setdash hpt 0 360 arc fill} def
+/C0 {BL [] 0 setdash 2 copy moveto vpt 90 450 arc} bind def
+/C1 {BL [] 0 setdash 2 copy moveto
+ 2 copy vpt 0 90 arc closepath fill
+ vpt 0 360 arc closepath} bind def
+/C2 {BL [] 0 setdash 2 copy moveto
+ 2 copy vpt 90 180 arc closepath fill
+ vpt 0 360 arc closepath} bind def
+/C3 {BL [] 0 setdash 2 copy moveto
+ 2 copy vpt 0 180 arc closepath fill
+ vpt 0 360 arc closepath} bind def
+/C4 {BL [] 0 setdash 2 copy moveto
+ 2 copy vpt 180 270 arc closepath fill
+ vpt 0 360 arc closepath} bind def
+/C5 {BL [] 0 setdash 2 copy moveto
+ 2 copy vpt 0 90 arc
+ 2 copy moveto
+ 2 copy vpt 180 270 arc closepath fill
+ vpt 0 360 arc} bind def
+/C6 {BL [] 0 setdash 2 copy moveto
+ 2 copy vpt 90 270 arc closepath fill
+ vpt 0 360 arc closepath} bind def
+/C7 {BL [] 0 setdash 2 copy moveto
+ 2 copy vpt 0 270 arc closepath fill
+ vpt 0 360 arc closepath} bind def
+/C8 {BL [] 0 setdash 2 copy moveto
+ 2 copy vpt 270 360 arc closepath fill
+ vpt 0 360 arc closepath} bind def
+/C9 {BL [] 0 setdash 2 copy moveto
+ 2 copy vpt 270 450 arc closepath fill
+ vpt 0 360 arc closepath} bind def
+/C10 {BL [] 0 setdash 2 copy 2 copy moveto vpt 270 360 arc closepath fill
+ 2 copy moveto
+ 2 copy vpt 90 180 arc closepath fill
+ vpt 0 360 arc closepath} bind def
+/C11 {BL [] 0 setdash 2 copy moveto
+ 2 copy vpt 0 180 arc closepath fill
+ 2 copy moveto
+ 2 copy vpt 270 360 arc closepath fill
+ vpt 0 360 arc closepath} bind def
+/C12 {BL [] 0 setdash 2 copy moveto
+ 2 copy vpt 180 360 arc closepath fill
+ vpt 0 360 arc closepath} bind def
+/C13 {BL [] 0 setdash 2 copy moveto
+ 2 copy vpt 0 90 arc closepath fill
+ 2 copy moveto
+ 2 copy vpt 180 360 arc closepath fill
+ vpt 0 360 arc closepath} bind def
+/C14 {BL [] 0 setdash 2 copy moveto
+ 2 copy vpt 90 360 arc closepath fill
+ vpt 0 360 arc} bind def
+/C15 {BL [] 0 setdash 2 copy vpt 0 360 arc closepath fill
+ vpt 0 360 arc closepath} bind def
+/Rec {newpath 4 2 roll moveto 1 index 0 rlineto 0 exch rlineto
+ neg 0 rlineto closepath} bind def
+/Square {dup Rec} bind def
+/Bsquare {vpt sub exch vpt sub exch vpt2 Square} bind def
+/S0 {BL [] 0 setdash 2 copy moveto 0 vpt rlineto BL Bsquare} bind def
+/S1 {BL [] 0 setdash 2 copy vpt Square fill Bsquare} bind def
+/S2 {BL [] 0 setdash 2 copy exch vpt sub exch vpt Square fill Bsquare} bind def
+/S3 {BL [] 0 setdash 2 copy exch vpt sub exch vpt2 vpt Rec fill Bsquare} bind def
+/S4 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt Square fill Bsquare} bind def
+/S5 {BL [] 0 setdash 2 copy 2 copy vpt Square fill
+ exch vpt sub exch vpt sub vpt Square fill Bsquare} bind def
+/S6 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill Bsquare} bind def
+/S7 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill
+ 2 copy vpt Square fill Bsquare} bind def
+/S8 {BL [] 0 setdash 2 copy vpt sub vpt Square fill Bsquare} bind def
+/S9 {BL [] 0 setdash 2 copy vpt sub vpt vpt2 Rec fill Bsquare} bind def
+/S10 {BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt Square fill
+ Bsquare} bind def
+/S11 {BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt2 vpt Rec fill
+ Bsquare} bind def
+/S12 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill Bsquare} bind def
+/S13 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill
+ 2 copy vpt Square fill Bsquare} bind def
+/S14 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill
+ 2 copy exch vpt sub exch vpt Square fill Bsquare} bind def
+/S15 {BL [] 0 setdash 2 copy Bsquare fill Bsquare} bind def
+/D0 {gsave translate 45 rotate 0 0 S0 stroke grestore} bind def
+/D1 {gsave translate 45 rotate 0 0 S1 stroke grestore} bind def
+/D2 {gsave translate 45 rotate 0 0 S2 stroke grestore} bind def
+/D3 {gsave translate 45 rotate 0 0 S3 stroke grestore} bind def
+/D4 {gsave translate 45 rotate 0 0 S4 stroke grestore} bind def
+/D5 {gsave translate 45 rotate 0 0 S5 stroke grestore} bind def
+/D6 {gsave translate 45 rotate 0 0 S6 stroke grestore} bind def
+/D7 {gsave translate 45 rotate 0 0 S7 stroke grestore} bind def
+/D8 {gsave translate 45 rotate 0 0 S8 stroke grestore} bind def
+/D9 {gsave translate 45 rotate 0 0 S9 stroke grestore} bind def
+/D10 {gsave translate 45 rotate 0 0 S10 stroke grestore} bind def
+/D11 {gsave translate 45 rotate 0 0 S11 stroke grestore} bind def
+/D12 {gsave translate 45 rotate 0 0 S12 stroke grestore} bind def
+/D13 {gsave translate 45 rotate 0 0 S13 stroke grestore} bind def
+/D14 {gsave translate 45 rotate 0 0 S14 stroke grestore} bind def
+/D15 {gsave translate 45 rotate 0 0 S15 stroke grestore} bind def
+/DiaE {stroke [] 0 setdash vpt add M
+ hpt neg vpt neg V hpt vpt neg V
+ hpt vpt V hpt neg vpt V closepath stroke} def
+/BoxE {stroke [] 0 setdash exch hpt sub exch vpt add M
+ 0 vpt2 neg V hpt2 0 V 0 vpt2 V
+ hpt2 neg 0 V closepath stroke} def
+/TriUE {stroke [] 0 setdash vpt 1.12 mul add M
+ hpt neg vpt -1.62 mul V
+ hpt 2 mul 0 V
+ hpt neg vpt 1.62 mul V closepath stroke} def
+/TriDE {stroke [] 0 setdash vpt 1.12 mul sub M
+ hpt neg vpt 1.62 mul V
+ hpt 2 mul 0 V
+ hpt neg vpt -1.62 mul V closepath stroke} def
+/PentE {stroke [] 0 setdash gsave
+ translate 0 hpt M 4 {72 rotate 0 hpt L} repeat
+ closepath stroke grestore} def
+/CircE {stroke [] 0 setdash
+ hpt 0 360 arc stroke} def
+/Opaque {gsave closepath 1 setgray fill grestore 0 setgray closepath} def
+/DiaW {stroke [] 0 setdash vpt add M
+ hpt neg vpt neg V hpt vpt neg V
+ hpt vpt V hpt neg vpt V Opaque stroke} def
+/BoxW {stroke [] 0 setdash exch hpt sub exch vpt add M
+ 0 vpt2 neg V hpt2 0 V 0 vpt2 V
+ hpt2 neg 0 V Opaque stroke} def
+/TriUW {stroke [] 0 setdash vpt 1.12 mul add M
+ hpt neg vpt -1.62 mul V
+ hpt 2 mul 0 V
+ hpt neg vpt 1.62 mul V Opaque stroke} def
+/TriDW {stroke [] 0 setdash vpt 1.12 mul sub M
+ hpt neg vpt 1.62 mul V
+ hpt 2 mul 0 V
+ hpt neg vpt -1.62 mul V Opaque stroke} def
+/PentW {stroke [] 0 setdash gsave
+ translate 0 hpt M 4 {72 rotate 0 hpt L} repeat
+ Opaque stroke grestore} def
+/CircW {stroke [] 0 setdash
+ hpt 0 360 arc Opaque stroke} def
+/BoxFill {gsave Rec 1 setgray fill grestore} def
+/Density {
+ /Fillden exch def
+ currentrgbcolor
+ /ColB exch def /ColG exch def /ColR exch def
+ /ColR ColR Fillden mul Fillden sub 1 add def
+ /ColG ColG Fillden mul Fillden sub 1 add def
+ /ColB ColB Fillden mul Fillden sub 1 add def
+ ColR ColG ColB setrgbcolor} def
+/BoxColFill {gsave Rec PolyFill} def
+/PolyFill {gsave Density fill grestore grestore} def
+/h {rlineto rlineto rlineto gsave closepath fill grestore} bind def
+%
+% PostScript Level 1 Pattern Fill routine for rectangles
+% Usage: x y w h s a XX PatternFill
+% x,y = lower left corner of box to be filled
+% w,h = width and height of box
+% a = angle in degrees between lines and x-axis
+% XX = 0/1 for no/yes cross-hatch
+%
+/PatternFill {gsave /PFa [ 9 2 roll ] def
+ PFa 0 get PFa 2 get 2 div add PFa 1 get PFa 3 get 2 div add translate
+ PFa 2 get -2 div PFa 3 get -2 div PFa 2 get PFa 3 get Rec
+ gsave 1 setgray fill grestore clip
+ currentlinewidth 0.5 mul setlinewidth
+ /PFs PFa 2 get dup mul PFa 3 get dup mul add sqrt def
+ 0 0 M PFa 5 get rotate PFs -2 div dup translate
+ 0 1 PFs PFa 4 get div 1 add floor cvi
+ {PFa 4 get mul 0 M 0 PFs V} for
+ 0 PFa 6 get ne {
+ 0 1 PFs PFa 4 get div 1 add floor cvi
+ {PFa 4 get mul 0 2 1 roll M PFs 0 V} for
+ } if
+ stroke grestore} def
+%
+/languagelevel where
+ {pop languagelevel} {1} ifelse
+ 2 lt
+ {/InterpretLevel1 true def}
+ {/InterpretLevel1 Level1 def}
+ ifelse
+%
+% PostScript level 2 pattern fill definitions
+%
+/Level2PatternFill {
+/Tile8x8 {/PaintType 2 /PatternType 1 /TilingType 1 /BBox [0 0 8 8] /XStep 8 /YStep 8}
+ bind def
+/KeepColor {currentrgbcolor [/Pattern /DeviceRGB] setcolorspace} bind def
+<< Tile8x8
+ /PaintProc {0.5 setlinewidth pop 0 0 M 8 8 L 0 8 M 8 0 L stroke}
+>> matrix makepattern
+/Pat1 exch def
+<< Tile8x8
+ /PaintProc {0.5 setlinewidth pop 0 0 M 8 8 L 0 8 M 8 0 L stroke
+ 0 4 M 4 8 L 8 4 L 4 0 L 0 4 L stroke}
+>> matrix makepattern
+/Pat2 exch def
+<< Tile8x8
+ /PaintProc {0.5 setlinewidth pop 0 0 M 0 8 L
+ 8 8 L 8 0 L 0 0 L fill}
+>> matrix makepattern
+/Pat3 exch def
+<< Tile8x8
+ /PaintProc {0.5 setlinewidth pop -4 8 M 8 -4 L
+ 0 12 M 12 0 L stroke}
+>> matrix makepattern
+/Pat4 exch def
+<< Tile8x8
+ /PaintProc {0.5 setlinewidth pop -4 0 M 8 12 L
+ 0 -4 M 12 8 L stroke}
+>> matrix makepattern
+/Pat5 exch def
+<< Tile8x8
+ /PaintProc {0.5 setlinewidth pop -2 8 M 4 -4 L
+ 0 12 M 8 -4 L 4 12 M 10 0 L stroke}
+>> matrix makepattern
+/Pat6 exch def
+<< Tile8x8
+ /PaintProc {0.5 setlinewidth pop -2 0 M 4 12 L
+ 0 -4 M 8 12 L 4 -4 M 10 8 L stroke}
+>> matrix makepattern
+/Pat7 exch def
+<< Tile8x8
+ /PaintProc {0.5 setlinewidth pop 8 -2 M -4 4 L
+ 12 0 M -4 8 L 12 4 M 0 10 L stroke}
+>> matrix makepattern
+/Pat8 exch def
+<< Tile8x8
+ /PaintProc {0.5 setlinewidth pop 0 -2 M 12 4 L
+ -4 0 M 12 8 L -4 4 M 8 10 L stroke}
+>> matrix makepattern
+/Pat9 exch def
+/Pattern1 {PatternBgnd KeepColor Pat1 setpattern} bind def
+/Pattern2 {PatternBgnd KeepColor Pat2 setpattern} bind def
+/Pattern3 {PatternBgnd KeepColor Pat3 setpattern} bind def
+/Pattern4 {PatternBgnd KeepColor Landscape {Pat5} {Pat4} ifelse setpattern} bind def
+/Pattern5 {PatternBgnd KeepColor Landscape {Pat4} {Pat5} ifelse setpattern} bind def
+/Pattern6 {PatternBgnd KeepColor Landscape {Pat9} {Pat6} ifelse setpattern} bind def
+/Pattern7 {PatternBgnd KeepColor Landscape {Pat8} {Pat7} ifelse setpattern} bind def
+} def
+%
+%
+%End of PostScript Level 2 code
+%
+/PatternBgnd {
+ TransparentPatterns {} {gsave 1 setgray fill grestore} ifelse
+} def
+%
+% Substitute for Level 2 pattern fill codes with
+% grayscale if Level 2 support is not selected.
+%
+/Level1PatternFill {
+/Pattern1 {0.250 Density} bind def
+/Pattern2 {0.500 Density} bind def
+/Pattern3 {0.750 Density} bind def
+/Pattern4 {0.125 Density} bind def
+/Pattern5 {0.375 Density} bind def
+/Pattern6 {0.625 Density} bind def
+/Pattern7 {0.875 Density} bind def
+} def
+%
+% Now test for support of Level 2 code
+%
+Level1 {Level1PatternFill} {Level2PatternFill} ifelse
+%
+/Symbol-Oblique /Symbol findfont [1 0 .167 1 0 0] makefont
+dup length dict begin {1 index /FID eq {pop pop} {def} ifelse} forall
+currentdict end definefont pop
+end
+%%EndProlog
+gnudict begin
+gsave
+doclip
+50 50 translate
+0.050 0.050 scale
+0 setgray
+newpath
+1.000 UL
+LTb
+1210 704 M
+63 0 V
+1996 0 R
+-63 0 V
+1210 820 M
+63 0 V
+1996 0 R
+-63 0 V
+1210 935 M
+63 0 V
+1996 0 R
+-63 0 V
+1210 1051 M
+63 0 V
+1996 0 R
+-63 0 V
+1210 1166 M
+63 0 V
+1996 0 R
+-63 0 V
+1210 1282 M
+63 0 V
+1996 0 R
+-63 0 V
+1210 1398 M
+63 0 V
+1996 0 R
+-63 0 V
+1210 1513 M
+63 0 V
+1996 0 R
+-63 0 V
+1210 1629 M
+63 0 V
+1996 0 R
+-63 0 V
+1210 1744 M
+63 0 V
+1996 0 R
+-63 0 V
+1210 1860 M
+63 0 V
+1996 0 R
+-63 0 V
+1210 704 M
+0 63 V
+0 1093 R
+0 -63 V
+1538 704 M
+0 63 V
+0 1093 R
+0 -63 V
+1865 704 M
+0 63 V
+0 1093 R
+0 -63 V
+2193 704 M
+0 63 V
+0 1093 R
+0 -63 V
+2521 704 M
+0 63 V
+0 1093 R
+0 -63 V
+2849 704 M
+0 63 V
+0 1093 R
+0 -63 V
+3176 704 M
+0 63 V
+0 1093 R
+0 -63 V
+stroke
+1210 1860 N
+0 -1156 V
+2059 0 V
+0 1156 V
+-2059 0 V
+Z stroke
+1.000 UP
+1.000 UL
+LTb
+1.000 UL
+LT0
+LTb
+LT0
+0.200 2414 1632 591 110 BoxColFill
+2414 1632 N
+591 0 V
+0 110 V
+-591 0 V
+0 -110 V
+Z stroke
+LT0
+gsave 1210 1282 N 0 0 V 21 37 V 21 36 V 20 36 V 21 36 V 21 35 V 21 35 V 21 33 V 20 33 V 21 31 V 21 31 V 21 29 V 21 27 V 20 26 V 21 24 V 21 22 V 21 20 V 21 18 V 20 17 V 21 14 V 21 12 V 21 10 V 21 7 V 20 5 V 21 3 V 21 1 V 21 -2 V 21 -4 V 20 -6 V 21 -9 V 21 -11 V 21 -13 V 21 -15 V 20 -17 V 21 -20 V 21 -21 V 21 -23 V 21 -25 V 20 -27 V 21 -28 V 21 -29 V 21 -31 V 21 -32 V 20 -33 V 21 -34 V 21 -35 V 21 -36 V 21 -36 V 20 -36 V 21 -37 V 21 -36 V 21 -37 V 20 -36 V 21 -36 V 21 -36 V 21 -35 V 21 -34 V 20 -33 V 21 -32 V 21 -31 V 21 -29 V 21 -28 V 20 -27 V 21 -25 V 21 -23 V 21 -21 V 21 -20 V 20 -17 V 21 -15 V 21 -13 V 21 -11 V 21 -9 V 20 -6 V 21 -4 V 21 -2 V 21 1 V 21 3 V 20 5 V 21 7 V 21 10 V 21 12 V 21 14 V 20 17 V 21 18 V 21 20 V 21 22 V 21 24 V 20 26 V 21 27 V 21 29 V 21 31 V 21 31 V 20 33 V 21 33 V 21 35 V 21 35 V 21 36 V 20 36 V 21 36 V 21 37 V 0 0 V -2059 0 V 0.20 PolyFill
+1210 1282 M
+21 37 V
+21 36 V
+20 36 V
+21 36 V
+21 35 V
+21 35 V
+21 33 V
+20 33 V
+21 31 V
+21 31 V
+21 29 V
+21 27 V
+20 26 V
+21 24 V
+21 22 V
+21 20 V
+21 18 V
+20 17 V
+21 14 V
+21 12 V
+21 10 V
+21 7 V
+20 5 V
+21 3 V
+21 1 V
+21 -2 V
+21 -4 V
+20 -6 V
+21 -9 V
+21 -11 V
+21 -13 V
+21 -15 V
+20 -17 V
+21 -20 V
+21 -21 V
+21 -23 V
+21 -25 V
+20 -27 V
+21 -28 V
+21 -29 V
+21 -31 V
+21 -32 V
+20 -33 V
+21 -34 V
+21 -35 V
+21 -36 V
+21 -36 V
+20 -36 V
+21 -37 V
+21 -36 V
+21 -37 V
+20 -36 V
+21 -36 V
+21 -36 V
+21 -35 V
+21 -34 V
+20 -33 V
+21 -32 V
+21 -31 V
+21 -29 V
+21 -28 V
+20 -27 V
+21 -25 V
+21 -23 V
+21 -21 V
+21 -20 V
+20 -17 V
+21 -15 V
+21 -13 V
+21 -11 V
+21 -9 V
+20 -6 V
+21 -4 V
+21 -2 V
+21 1 V
+21 3 V
+20 5 V
+21 7 V
+21 10 V
+21 12 V
+21 14 V
+20 17 V
+21 18 V
+21 20 V
+21 22 V
+21 24 V
+20 26 V
+21 27 V
+21 29 V
+21 31 V
+21 31 V
+20 33 V
+21 33 V
+21 35 V
+21 35 V
+21 36 V
+20 36 V
+21 36 V
+21 37 V
+stroke
+LTb
+1210 1860 N
+0 -1156 V
+2059 0 V
+0 1156 V
+-2059 0 V
+Z stroke
+1.000 UP
+1.000 UL
+LTb
+stroke
+grestore
+end
+showpage
+%%Trailer
diff --git a/macros/latex/contrib/combinedgraphics/test/gnuplot42.pdf b/macros/latex/contrib/combinedgraphics/test/gnuplot42.pdf
new file mode 100644
index 0000000000..b363d9fc11
--- /dev/null
+++ b/macros/latex/contrib/combinedgraphics/test/gnuplot42.pdf
Binary files differ
diff --git a/macros/latex/contrib/combinedgraphics/test/gnuplot42.plt b/macros/latex/contrib/combinedgraphics/test/gnuplot42.plt
new file mode 100644
index 0000000000..99effb6a61
--- /dev/null
+++ b/macros/latex/contrib/combinedgraphics/test/gnuplot42.plt
@@ -0,0 +1,16 @@
+# gnuplot 4.2/4.4 file
+
+set terminal epslatex
+set output "gnuplot42.tex"
+
+set size 0.5, 0.5
+
+set title "Sinus"
+set xlabel "x"
+set ylabel "sin(x)"
+set xrange [ 0 : 2 * pi ]
+
+set style fill solid 0.2
+set label "filled" at pi / 2., 0.333 center
+
+plot sin(x) with filledcurves y1 = 0
diff --git a/macros/latex/contrib/combinedgraphics/test/gnuplot42.tex b/macros/latex/contrib/combinedgraphics/test/gnuplot42.tex
new file mode 100644
index 0000000000..b1a39a2df9
--- /dev/null
+++ b/macros/latex/contrib/combinedgraphics/test/gnuplot42.tex
@@ -0,0 +1,109 @@
+% GNUPLOT: LaTeX picture with Postscript
+\begingroup
+ \makeatletter
+ \providecommand\color[2][]{%
+ \GenericError{(gnuplot) \space\space\space\@spaces}{%
+ Package color not loaded in conjunction with
+ terminal option `colourtext'%
+ }{See the gnuplot documentation for explanation.%
+ }{Either use 'blacktext' in gnuplot or load the package
+ color.sty in LaTeX.}%
+ \renewcommand\color[2][]{}%
+ }%
+ \providecommand\includegraphics[2][]{%
+ \GenericError{(gnuplot) \space\space\space\@spaces}{%
+ Package graphicx or graphics not loaded%
+ }{See the gnuplot documentation for explanation.%
+ }{The gnuplot epslatex terminal needs graphicx.sty or graphics.sty.}%
+ \renewcommand\includegraphics[2][]{}%
+ }%
+ \providecommand\rotatebox[2]{#2}%
+ \@ifundefined{ifGPcolor}{%
+ \newif\ifGPcolor
+ \GPcolorfalse
+ }{}%
+ \@ifundefined{ifGPblacktext}{%
+ \newif\ifGPblacktext
+ \GPblacktexttrue
+ }{}%
+ % define a \g@addto@macro without @ in the name:
+ \let\gplgaddtomacro\g@addto@macro
+ % define empty templates for all commands taking text:
+ \gdef\gplbacktext{}%
+ \gdef\gplfronttext{}%
+ \makeatother
+ \ifGPblacktext
+ % no textcolor at all
+ \def\colorrgb#1{}%
+ \def\colorgray#1{}%
+ \else
+ % gray or color?
+ \ifGPcolor
+ \def\colorrgb#1{\color[rgb]{#1}}%
+ \def\colorgray#1{\color[gray]{#1}}%
+ \expandafter\def\csname LTw\endcsname{\color{white}}%
+ \expandafter\def\csname LTb\endcsname{\color{black}}%
+ \expandafter\def\csname LTa\endcsname{\color{black}}%
+ \expandafter\def\csname LT0\endcsname{\color[rgb]{1,0,0}}%
+ \expandafter\def\csname LT1\endcsname{\color[rgb]{0,1,0}}%
+ \expandafter\def\csname LT2\endcsname{\color[rgb]{0,0,1}}%
+ \expandafter\def\csname LT3\endcsname{\color[rgb]{1,0,1}}%
+ \expandafter\def\csname LT4\endcsname{\color[rgb]{0,1,1}}%
+ \expandafter\def\csname LT5\endcsname{\color[rgb]{1,1,0}}%
+ \expandafter\def\csname LT6\endcsname{\color[rgb]{0,0,0}}%
+ \expandafter\def\csname LT7\endcsname{\color[rgb]{1,0.3,0}}%
+ \expandafter\def\csname LT8\endcsname{\color[rgb]{0.5,0.5,0.5}}%
+ \else
+ % gray
+ \def\colorrgb#1{\color{black}}%
+ \def\colorgray#1{\color[gray]{#1}}%
+ \expandafter\def\csname LTw\endcsname{\color{white}}%
+ \expandafter\def\csname LTb\endcsname{\color{black}}%
+ \expandafter\def\csname LTa\endcsname{\color{black}}%
+ \expandafter\def\csname LT0\endcsname{\color{black}}%
+ \expandafter\def\csname LT1\endcsname{\color{black}}%
+ \expandafter\def\csname LT2\endcsname{\color{black}}%
+ \expandafter\def\csname LT3\endcsname{\color{black}}%
+ \expandafter\def\csname LT4\endcsname{\color{black}}%
+ \expandafter\def\csname LT5\endcsname{\color{black}}%
+ \expandafter\def\csname LT6\endcsname{\color{black}}%
+ \expandafter\def\csname LT7\endcsname{\color{black}}%
+ \expandafter\def\csname LT8\endcsname{\color{black}}%
+ \fi
+ \fi
+ \setlength{\unitlength}{0.0500bp}%
+ \begin{picture}(3600.00,2520.00)%
+ \gplgaddtomacro\gplbacktext{%
+ \csname LTb\endcsname%
+ \put(1078,704){\makebox(0,0)[r]{\strut{}-1}}%
+ \put(1078,820){\makebox(0,0)[r]{\strut{}-0.8}}%
+ \put(1078,935){\makebox(0,0)[r]{\strut{}-0.6}}%
+ \put(1078,1051){\makebox(0,0)[r]{\strut{}-0.4}}%
+ \put(1078,1166){\makebox(0,0)[r]{\strut{}-0.2}}%
+ \put(1078,1282){\makebox(0,0)[r]{\strut{} 0}}%
+ \put(1078,1398){\makebox(0,0)[r]{\strut{} 0.2}}%
+ \put(1078,1513){\makebox(0,0)[r]{\strut{} 0.4}}%
+ \put(1078,1629){\makebox(0,0)[r]{\strut{} 0.6}}%
+ \put(1078,1744){\makebox(0,0)[r]{\strut{} 0.8}}%
+ \put(1078,1860){\makebox(0,0)[r]{\strut{} 1}}%
+ \put(1210,484){\makebox(0,0){\strut{} 0}}%
+ \put(1538,484){\makebox(0,0){\strut{} 1}}%
+ \put(1865,484){\makebox(0,0){\strut{} 2}}%
+ \put(2193,484){\makebox(0,0){\strut{} 3}}%
+ \put(2521,484){\makebox(0,0){\strut{} 4}}%
+ \put(2849,484){\makebox(0,0){\strut{} 5}}%
+ \put(3176,484){\makebox(0,0){\strut{} 6}}%
+ \put(308,1282){\rotatebox{-270}{\makebox(0,0){\strut{}sin(x)}}}%
+ \put(2239,154){\makebox(0,0){\strut{}x}}%
+ \put(2239,2190){\makebox(0,0){\strut{}Sinus}}%
+ \put(1725,1474){\makebox(0,0){\strut{}filled}}%
+ }%
+ \gplgaddtomacro\gplfronttext{%
+ \csname LTb\endcsname%
+ \put(2282,1687){\makebox(0,0)[r]{\strut{}sin(x)}}%
+ }%
+ \gplbacktext
+ \put(0,0){\includegraphics{gnuplot42}}%
+ \gplfronttext
+ \end{picture}%
+\endgroup
diff --git a/macros/latex/contrib/combinedgraphics/test/xfig325.eps b/macros/latex/contrib/combinedgraphics/test/xfig325.eps
new file mode 100644
index 0000000000..d082483938
--- /dev/null
+++ b/macros/latex/contrib/combinedgraphics/test/xfig325.eps
@@ -0,0 +1,113 @@
+%!PS-Adobe-2.0 EPSF-2.0
+%%Title: xfig325.fig
+%%Creator: fig2dev Version 3.2 Patchlevel 5c
+%%CreationDate: Fri Jul 13 20:19:16 2012
+%%BoundingBox: 0 0 87 87
+%Magnification: 1.0000
+%%EndComments
+%%BeginProlog
+/$F2psDict 200 dict def
+$F2psDict begin
+$F2psDict /mtrx matrix put
+/col-1 {0 setgray} bind def
+/col0 {0.000 0.000 0.000 srgb} bind def
+/col1 {0.000 0.000 1.000 srgb} bind def
+/col2 {0.000 1.000 0.000 srgb} bind def
+/col3 {0.000 1.000 1.000 srgb} bind def
+/col4 {1.000 0.000 0.000 srgb} bind def
+/col5 {1.000 0.000 1.000 srgb} bind def
+/col6 {1.000 1.000 0.000 srgb} bind def
+/col7 {1.000 1.000 1.000 srgb} bind def
+/col8 {0.000 0.000 0.560 srgb} bind def
+/col9 {0.000 0.000 0.690 srgb} bind def
+/col10 {0.000 0.000 0.820 srgb} bind def
+/col11 {0.530 0.810 1.000 srgb} bind def
+/col12 {0.000 0.560 0.000 srgb} bind def
+/col13 {0.000 0.690 0.000 srgb} bind def
+/col14 {0.000 0.820 0.000 srgb} bind def
+/col15 {0.000 0.560 0.560 srgb} bind def
+/col16 {0.000 0.690 0.690 srgb} bind def
+/col17 {0.000 0.820 0.820 srgb} bind def
+/col18 {0.560 0.000 0.000 srgb} bind def
+/col19 {0.690 0.000 0.000 srgb} bind def
+/col20 {0.820 0.000 0.000 srgb} bind def
+/col21 {0.560 0.000 0.560 srgb} bind def
+/col22 {0.690 0.000 0.690 srgb} bind def
+/col23 {0.820 0.000 0.820 srgb} bind def
+/col24 {0.500 0.190 0.000 srgb} bind def
+/col25 {0.630 0.250 0.000 srgb} bind def
+/col26 {0.750 0.380 0.000 srgb} bind def
+/col27 {1.000 0.500 0.500 srgb} bind def
+/col28 {1.000 0.630 0.630 srgb} bind def
+/col29 {1.000 0.750 0.750 srgb} bind def
+/col30 {1.000 0.880 0.880 srgb} bind def
+/col31 {1.000 0.840 0.000 srgb} bind def
+
+end
+
+/cp {closepath} bind def
+/ef {eofill} bind def
+/gr {grestore} bind def
+/gs {gsave} bind def
+/sa {save} bind def
+/rs {restore} bind def
+/l {lineto} bind def
+/m {moveto} bind def
+/rm {rmoveto} bind def
+/n {newpath} bind def
+/s {stroke} bind def
+/sh {show} bind def
+/slc {setlinecap} bind def
+/slj {setlinejoin} bind def
+/slw {setlinewidth} bind def
+/srgb {setrgbcolor} bind def
+/rot {rotate} bind def
+/sc {scale} bind def
+/sd {setdash} bind def
+/ff {findfont} bind def
+/sf {setfont} bind def
+/scf {scalefont} bind def
+/sw {stringwidth} bind def
+/tr {translate} bind def
+/tnt {dup dup currentrgbcolor
+ 4 -2 roll dup 1 exch sub 3 -1 roll mul add
+ 4 -2 roll dup 1 exch sub 3 -1 roll mul add
+ 4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb}
+ bind def
+/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul
+ 4 -2 roll mul srgb} bind def
+/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def
+/$F2psEnd {$F2psEnteredState restore end} def
+
+/pageheader {
+save
+newpath 0 87 moveto 0 0 lineto 87 0 lineto 87 87 lineto closepath clip newpath
+0.8 85.8 translate
+1 -1 scale
+$F2psBegin
+10 setmiterlimit
+0 slj 0 slc
+ 0.06299 0.06299 sc
+} bind def
+/pagefooter {
+$F2psEnd
+restore
+} bind def
+%%EndProlog
+pageheader
+%
+% Fig objects follow
+%
+%
+% here starts figure with depth 50
+% Polyline
+0 slj
+0 slc
+7.500 slw
+n 0 0 m 1350 0 l 1350 1350 l 0 1350 l
+ cp gs col6 1.00 shd ef gr gs col0 s gr
+% here ends figure;
+pagefooter
+showpage
+%%Trailer
+%EOF
diff --git a/macros/latex/contrib/combinedgraphics/test/xfig325.fig b/macros/latex/contrib/combinedgraphics/test/xfig325.fig
new file mode 100644
index 0000000000..570a574e7c
--- /dev/null
+++ b/macros/latex/contrib/combinedgraphics/test/xfig325.fig
@@ -0,0 +1,12 @@
+#FIG 3.2 Produced by xfig version 3.2.5
+Landscape
+Center
+Metric
+A4
+100.00
+Single
+-2
+1200 2
+2 2 0 1 0 6 50 -1 20 0.000 0 0 -1 0 0 5
+ 0 0 1350 0 1350 1350 0 1350 0 0
+4 1 4 50 -1 1 12 0.0000 6 135 555 675 720 square\001
diff --git a/macros/latex/contrib/combinedgraphics/test/xfig325.pdf b/macros/latex/contrib/combinedgraphics/test/xfig325.pdf
new file mode 100644
index 0000000000..3ecbd00cff
--- /dev/null
+++ b/macros/latex/contrib/combinedgraphics/test/xfig325.pdf
Binary files differ
diff --git a/macros/latex/contrib/combinedgraphics/test/xfig325.tex b/macros/latex/contrib/combinedgraphics/test/xfig325.tex
new file mode 100644
index 0000000000..2db079d030
--- /dev/null
+++ b/macros/latex/contrib/combinedgraphics/test/xfig325.tex
@@ -0,0 +1,12 @@
+\setlength{\unitlength}{4144sp}%
+%
+\begingroup\makeatletter\ifx\SetFigFont\undefined%
+\gdef\SetFigFont#1#2#3#4#5{%
+ \reset@font\fontsize{#1}{#2pt}%
+ \fontfamily{#3}\fontseries{#4}\fontshape{#5}%
+ \selectfont}%
+\fi\endgroup%
+\begin{picture}(1374,1374)(-11,-523)
+\put(676,119){\makebox(0,0)[b]{\smash{{\SetFigFont{12}{14.4}{\rmdefault}{\mddefault}{\itdefault}{\color[rgb]{1,0,0}square}%
+}}}}
+\end{picture}%