diff options
15 files changed, 553 insertions, 230 deletions
diff --git a/Master/texmf-dist/doc/latex/combinedgraphics/Makefile b/Master/texmf-dist/doc/latex/combinedgraphics/Makefile index 4c2c3299887..29763aaedb6 100644 --- a/Master/texmf-dist/doc/latex/combinedgraphics/Makefile +++ b/Master/texmf-dist/doc/latex/combinedgraphics/Makefile @@ -1,7 +1,7 @@ # # Makefile for combinedgraphics package # -# Copyright 2009,2011 Christian Schneider <software(at)chschneider(dot)eu> +# Copyright 2009,2011,2012 Christian Schneider <software(at)chschneider(dot)eu> # # This file is part of combinedgraphics. # @@ -57,10 +57,10 @@ pkg: $(PACKAGE).sty doc: $(PACKAGE).pdf -test: $(PACKAGE).sty force +test: $(PACKAGE).sty $(MAKE) -C test -install: force +install: mkdir -p $(DOCDIR) $(SRCDIR) $(TEXDIR) install -m 644 README COPYING $(PACKAGE).pdf $(DOCDIR) install -m 644 $(PACKAGE).ins $(PACKAGE).dtx Makefile $(SRCDIR) @@ -68,12 +68,14 @@ install: force $(MAKE) -C test install mktexlsr $(DESTDIR) -clean: force +clean: $(RM) *.aux *.glo *.gls *.idx *.ilg *.ind *.log *.toc *~ $(MAKE) -C test clean -distclean: clean force - $(RM) $(PACKAGE).sty $(PACKAGE).pdf $(TESTFILE).pdf +distclean: clean + $(RM) $(PACKAGE).sty $(MAKE) -C test distclean -force: ; +mrproper: distclean + $(RM) $(PACKAGE).pdf + $(MAKE) -C test mrproper diff --git a/Master/texmf-dist/doc/latex/combinedgraphics/README b/Master/texmf-dist/doc/latex/combinedgraphics/README index c2696be5d78..5ffea6722e5 100644 --- a/Master/texmf-dist/doc/latex/combinedgraphics/README +++ b/Master/texmf-dist/doc/latex/combinedgraphics/README @@ -22,8 +22,17 @@ has some benefits: hidden under shaded areas) \item rescaling and rotating of complete graphics (similar to |\includegraphics| from \textsf{graphicx} package) + \item scaling the vector graphics part (without affecting the font) to + a defined width or height of the graphics, which might, e.g., be of + importance for graphics that are intended for publication in a journal + requesting a certain size of graphics \end{itemize} +A test PDF file with extensively commented examples is shipped with this +package and a BASH script (\texttt{texpic2epspdf.sh}) to convert combined +EPS/\LaTeX{} and PDF/\LaTeX{} graphics to EPS or PDF files with text part +included. + See `combinedgraphics.pdf' for detailed information on usage. BUILDING @@ -70,9 +79,6 @@ Optionally you can compile the test file: INSTALLATION ============ -INSTALLATION -============ - 1) Installing with make ----------------------- diff --git a/Master/texmf-dist/doc/latex/combinedgraphics/combinedgraphics.pdf b/Master/texmf-dist/doc/latex/combinedgraphics/combinedgraphics.pdf Binary files differindex 4820d52c6f4..4261218a7fe 100644 --- a/Master/texmf-dist/doc/latex/combinedgraphics/combinedgraphics.pdf +++ b/Master/texmf-dist/doc/latex/combinedgraphics/combinedgraphics.pdf diff --git a/Master/texmf-dist/doc/latex/combinedgraphics/test/Makefile b/Master/texmf-dist/doc/latex/combinedgraphics/test/Makefile index 7be7e0b5207..5107d5a91e5 100644 --- a/Master/texmf-dist/doc/latex/combinedgraphics/test/Makefile +++ b/Master/texmf-dist/doc/latex/combinedgraphics/test/Makefile @@ -1,7 +1,7 @@ # # Makefile for tests of combinedgraphics package # -# Copyright 2009,2011 Christian Schneider <software(at)chschneider(dot)eu> +# Copyright 2009,2011,2012 Christian Schneider <software(at)chschneider(dot)eu> # # This file is part of combinedgraphics. # @@ -73,17 +73,16 @@ $(PDFFILE): %.pdf: %.tex $(STYFILES) $(TEXGRAPHICS) $(PDFGRAPHICS) test: $(PDFFILE) $(EPSGRAPHICS) -install: force +install: mkdir -p $(DOCDIR) $(SRCDIR) - install -m 644 $(TEXGRAPHICS) $(EPSGRAPHICS) $(PDFGRAPHICS) \ - $(PDFFILE) $(DOCDIR) - install -m 644 $(SRCFILE) $(FIGFILES) $(PLTFILES) Makefile $(SRCDIR) + install -m 644 $(PDFFILE) $(DOCDIR) + install -m 644 $(SRCFILE) $(FIGFILES) $(PLTFILES) Makefile \ + $(TEXGRAPHICS) $(EPSGRAPHICS) $(PDFGRAPHICS) $(SRCDIR) -clean: force +clean: $(RM) *.aux *.glo *.gls *.idx *.ilg *.ind *.log *.toc *~ -distclean: clean force - $(RM) $(PDFFILE) $(TEXGRAPHICS) $(EPSGRAPHICS) $(PDFGRAPHICS) - -force: ; +distclean: clean +mrproper: distclean + $(RM) $(PDFFILE) $(TEXGRAPHICS) $(EPSGRAPHICS) $(PDFGRAPHICS) diff --git a/Master/texmf-dist/doc/latex/combinedgraphics/test/combinedgraphics_test.pdf b/Master/texmf-dist/doc/latex/combinedgraphics/test/combinedgraphics_test.pdf Binary files differindex 8426d86e8b3..fa8ba4d7471 100644 --- a/Master/texmf-dist/doc/latex/combinedgraphics/test/combinedgraphics_test.pdf +++ b/Master/texmf-dist/doc/latex/combinedgraphics/test/combinedgraphics_test.pdf diff --git a/Master/texmf-dist/doc/latex/combinedgraphics/test/combinedgraphics_test.tex b/Master/texmf-dist/doc/latex/combinedgraphics/test/combinedgraphics_test.tex index 76cc1e220ab..e67a523afe3 100644 --- a/Master/texmf-dist/doc/latex/combinedgraphics/test/combinedgraphics_test.tex +++ b/Master/texmf-dist/doc/latex/combinedgraphics/test/combinedgraphics_test.tex @@ -1,7 +1,7 @@ % % LaTeX test file for combinedgraphics package % -% Copyright 2009,2011 Christian Schneider <software(at)chschneider(dot)eu> +% Copyright 2009,2011,2012 Christian Schneider <software(at)chschneider(dot)eu> % % This file is part of combinedgraphics. % @@ -23,6 +23,7 @@ \documentclass[DIV12]{scrartcl} \usepackage{combinedgraphics} +%\usepackage{combinedgraphics} \newcommand*\mycolor{\color{blue}} \newcommand*\myfont{\bfseries\Large} @@ -34,94 +35,192 @@ } \begin{document} - \section*{Defaults} + \section*{Test: no macro parameters} \noindent \fbox{\combinput{xfig325}}% - \fbox{\input{gnuplot42}}\\ + \fbox{\input{gnuplot42}}\\[3ex] \fbox{\includecombinedgraphics{xfig325}}% - \fbox{\includecombinedgraphics{gnuplot42}} - - \section*{Test: \texttt{textfont} and \texttt{textcolor}} + \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}}\\ + \fbox{\input{gnuplot42}}\\[3ex] \fbox{\includecombinedgraphics[textfont=\myfont,textcolor=\mycolor]{xfig325}}% - \fbox{\includecombinedgraphics[textfont=\myfont,textcolor=\mycolor]{gnuplot42}} + \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}}\\ + \fbox{\input{gnuplot42}}\\[3ex] \fbox{\includecombinedgraphics[vecscale=1.2]{xfig325}}% - \fbox{\includecombinedgraphics[vecscale=1.2]{gnuplot42}} + \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}} + \section*{Test: \texttt{vecfile=\ldots}} \noindent \fbox{\combinput{xfig325}}% - \fbox{\input{gnuplot42}}\\ + \fbox{\input{gnuplot42}}\\[3ex] \fbox{\includecombinedgraphics[vecfile=gnuplot42]{xfig325}}% - \fbox{\includecombinedgraphics[vecfile=xfig325]{gnuplot42}} + \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}}\\ + \fbox{\input{gnuplot42}}\\[3ex] \fbox{\includecombinedgraphics[vecinclude=false]{xfig325}}% - \fbox{\includecombinedgraphics[vecinclude=false]{gnuplot42}} + \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}}\\ + \fbox{\input{gnuplot42}}\\[3ex] \fbox{\includecombinedgraphics[vecinclude=overwrite]{xfig325}}% - \fbox{\includecombinedgraphics[vecinclude=overwrite]{gnuplot42}} + \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}}\\ + \fbox{\input{gnuplot42}}\\[3ex] \fbox{\includecombinedgraphics[angle=90]{xfig325}}% - \fbox{\includecombinedgraphics[angle=90]{gnuplot42}} + \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}}\\ + \fbox{\input{gnuplot42}}\\[3ex] \fbox{\includecombinedgraphics[scale=0.8]{xfig325}}% - \fbox{\includecombinedgraphics[scale=0.8]{gnuplot42}} + \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}}\\ + \fbox{\input{gnuplot42}}\\[3ex] \fbox{\includecombinedgraphics[hscale=1.2,vscale=0.8]{xfig325}}% - \fbox{\includecombinedgraphics[hscale=1.2,vscale=0.8]{gnuplot42}} + \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}}\\ + \fbox{\input{gnuplot42}}\\[3ex] \fbox{\includecombinedgraphics[width=0.49\textwidth,height=5cm]{xfig325}}% - \fbox{\includecombinedgraphics[width=0.49\textwidth,height=5cm]{gnuplot42}} + \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}}\\ - \fbox{\includecombinedgraphics[width=0.49\textwidth,keepaspectratio]{xfig325}}% - \fbox{\includecombinedgraphics[width=0.49\textwidth,keepaspectratio]{gnuplot42}} + \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}}\\ + \fbox{\input{gnuplot42}}\\[3ex] \fbox{\includecombinedgraphics[angle=30,scale=0.75,angle=15]{xfig325}}% - \fbox{\includecombinedgraphics[angle=30,scale=0.75,angle=15]{gnuplot42}} - - \section*{Test: \texttt{vecfirst=false,vecinclude=overwrite}} - \noindent - \fbox{\combinput{xfig325}}% - \fbox{\input{gnuplot42}}\\ - \fbox{\includecombinedgraphics[vecfirst=false,vecinclude=overwrite]{xfig325}}% - \fbox{\includecombinedgraphics[vecfirst=false,vecinclude=overwrite]{gnuplot42}} + \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/Master/texmf-dist/doc/latex/combinedgraphics/test/gnuplot42.eps b/Master/texmf-dist/doc/latex/combinedgraphics/test/gnuplot42.eps index aac026a067f..21884fd0bfb 100644 --- a/Master/texmf-dist/doc/latex/combinedgraphics/test/gnuplot42.eps +++ b/Master/texmf-dist/doc/latex/combinedgraphics/test/gnuplot42.eps @@ -1,7 +1,7 @@ %!PS-Adobe-2.0 EPSF-2.0 %%Title: gnuplot42.tex -%%Creator: gnuplot 4.2 patchlevel 2 -%%CreationDate: Wed Jun 15 00:40:51 2011 +%%Creator: gnuplot 4.4 patchlevel 0 +%%CreationDate: Fri Jul 13 20:19:16 2012 %%DocumentFonts: %%BoundingBox: 50 50 230 176 %%EndComments @@ -9,8 +9,8 @@ /gnudict 256 dict def gnudict begin % -% The following 6 true/false flags may be edited by hand if required -% The unit line width may also be changed +% 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 @@ -19,9 +19,11 @@ gnudict begin /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 { @@ -44,16 +46,24 @@ systemdict /pdfmark known not { SDict begin [ /Title (gnuplot42.tex) /Subject (gnuplot plot) - /Creator (gnuplot 4.2 patchlevel 2 ) - /Author (,,,) + /Creator (gnuplot 4.4 patchlevel 0) + /Author (chsch) % /Producer (gnuplot) % /Keywords () - /CreationDate (Wed Jun 15 00:40:51 2011) + /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) % -% Gnuplot Prolog Version 4.2 (August 2006) +%/SuppressPDFMark true def % /M {moveto} bind def /L {lineto} bind def @@ -63,6 +73,7 @@ end /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 @@ -303,7 +314,7 @@ end ColR ColG ColB setrgbcolor} def /BoxColFill {gsave Rec PolyFill} def /PolyFill {gsave Density fill grestore grestore} def -/h {rlineto rlineto rlineto gsave fill grestore} bind 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 @@ -424,204 +435,219 @@ end %%EndProlog gnudict begin gsave +doclip 50 50 translate 0.050 0.050 scale 0 setgray newpath 1.000 UL LTb -1122 660 M +1210 704 M 63 0 V -2041 0 R +1996 0 R -63 0 V -1122 780 M +1210 820 M 63 0 V -2041 0 R +1996 0 R -63 0 V -1122 900 M +1210 935 M 63 0 V -2041 0 R +1996 0 R -63 0 V -1122 1020 M +1210 1051 M 63 0 V -2041 0 R +1996 0 R -63 0 V -1122 1140 M +1210 1166 M 63 0 V -2041 0 R +1996 0 R -63 0 V -1122 1260 M +1210 1282 M 63 0 V -2041 0 R +1996 0 R -63 0 V -1122 1380 M +1210 1398 M 63 0 V -2041 0 R +1996 0 R -63 0 V -1122 1500 M +1210 1513 M 63 0 V -2041 0 R +1996 0 R -63 0 V -1122 1620 M +1210 1629 M 63 0 V -2041 0 R +1996 0 R -63 0 V -1122 1740 M +1210 1744 M 63 0 V -2041 0 R +1996 0 R -63 0 V -1122 1860 M +1210 1860 M 63 0 V -2041 0 R +1996 0 R -63 0 V -1122 660 M +1210 704 M 0 63 V -0 1137 R +0 1093 R 0 -63 V -1457 660 M +1538 704 M 0 63 V -0 1137 R +0 1093 R 0 -63 V -1792 660 M +1865 704 M 0 63 V -0 1137 R +0 1093 R 0 -63 V -2127 660 M +2193 704 M 0 63 V -0 1137 R +0 1093 R 0 -63 V -2461 660 M +2521 704 M 0 63 V -0 1137 R +0 1093 R 0 -63 V -2796 660 M +2849 704 M 0 63 V -0 1137 R +0 1093 R 0 -63 V -3131 660 M +3176 704 M 0 63 V -0 1137 R +0 1093 R 0 -63 V --2009 63 R -0 -1200 V -2104 0 V -0 1200 V --2104 0 V -1.000 UP 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 -2371 1687 M +0.200 2414 1632 591 110 BoxColFill +2414 1632 N 591 0 V -1122 1260 M -21 38 V -22 38 V -21 38 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 -22 36 V +20 36 V +21 36 V +21 35 V 21 35 V -21 34 V -21 32 V -22 32 V -21 30 V -21 28 V +21 33 V +20 33 V +21 31 V +21 31 V +21 29 V 21 27 V -22 25 V -21 23 V -21 21 V -21 19 V -22 17 V +20 26 V +21 24 V +21 22 V +21 20 V +21 18 V +20 17 V 21 14 V -21 13 V +21 12 V 21 10 V -22 8 V -21 5 V +21 7 V +20 5 V 21 3 V 21 1 V -22 -2 V +21 -2 V 21 -4 V -21 -7 V +20 -6 V 21 -9 V -22 -11 V -21 -14 V +21 -11 V +21 -13 V 21 -15 V -21 -18 V -22 -20 V +20 -17 V +21 -20 V +21 -21 V 21 -23 V -21 -24 V 21 -25 V -22 -28 V +20 -27 V +21 -28 V 21 -29 V 21 -31 V 21 -32 V -22 -33 V +20 -33 V 21 -34 V +21 -35 V 21 -36 V 21 -36 V -22 -37 V +20 -36 V 21 -37 V -21 -38 V -21 -38 V -22 -38 V -21 -38 V -21 -38 V +21 -36 V 21 -37 V -22 -37 V +20 -36 V 21 -36 V 21 -36 V +21 -35 V 21 -34 V -22 -33 V +20 -33 V 21 -32 V 21 -31 V 21 -29 V -22 -28 V +21 -28 V +20 -27 V 21 -25 V -21 -24 V 21 -23 V -22 -20 V -21 -18 V +21 -21 V +21 -20 V +20 -17 V 21 -15 V -21 -14 V -22 -11 V +21 -13 V +21 -11 V 21 -9 V -21 -7 V +20 -6 V 21 -4 V -22 -2 V +21 -2 V 21 1 V 21 3 V -21 5 V -22 8 V +20 5 V +21 7 V 21 10 V -21 13 V +21 12 V 21 14 V -22 17 V -21 19 V -21 21 V -21 23 V -22 25 V +20 17 V +21 18 V +21 20 V +21 22 V +21 24 V +20 26 V 21 27 V -21 28 V -21 30 V -22 32 V -21 32 V -21 34 V +21 29 V +21 31 V +21 31 V +20 33 V +21 33 V +21 35 V 21 35 V -22 36 V +21 36 V +20 36 V 21 36 V 21 37 V -21 38 V -22 38 V -21 38 V stroke LTb -1122 1860 M -0 -1200 V -2104 0 V -0 1200 V --2104 0 V +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 diff --git a/Master/texmf-dist/doc/latex/combinedgraphics/test/gnuplot42.pdf b/Master/texmf-dist/doc/latex/combinedgraphics/test/gnuplot42.pdf Binary files differindex b540d53b35c..b363d9fc114 100644 --- a/Master/texmf-dist/doc/latex/combinedgraphics/test/gnuplot42.pdf +++ b/Master/texmf-dist/doc/latex/combinedgraphics/test/gnuplot42.pdf diff --git a/Master/texmf-dist/doc/latex/combinedgraphics/test/gnuplot42.plt b/Master/texmf-dist/doc/latex/combinedgraphics/test/gnuplot42.plt index cd2e23b5a76..99effb6a61e 100644 --- a/Master/texmf-dist/doc/latex/combinedgraphics/test/gnuplot42.plt +++ b/Master/texmf-dist/doc/latex/combinedgraphics/test/gnuplot42.plt @@ -1,4 +1,4 @@ -# gnuplot 4.2 file +# gnuplot 4.2/4.4 file set terminal epslatex set output "gnuplot42.tex" @@ -10,4 +10,7 @@ set xlabel "x" set ylabel "sin(x)" set xrange [ 0 : 2 * pi ] -plot sin(x) +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/Master/texmf-dist/doc/latex/combinedgraphics/test/gnuplot42.tex b/Master/texmf-dist/doc/latex/combinedgraphics/test/gnuplot42.tex index 3a71352ab1e..b1a39a2df94 100644 --- a/Master/texmf-dist/doc/latex/combinedgraphics/test/gnuplot42.tex +++ b/Master/texmf-dist/doc/latex/combinedgraphics/test/gnuplot42.tex @@ -75,31 +75,32 @@ \begin{picture}(3600.00,2520.00)% \gplgaddtomacro\gplbacktext{% \csname LTb\endcsname% - \put(990,660){\makebox(0,0)[r]{\strut{}-1}}% - \put(990,780){\makebox(0,0)[r]{\strut{}-0.8}}% - \put(990,900){\makebox(0,0)[r]{\strut{}-0.6}}% - \put(990,1020){\makebox(0,0)[r]{\strut{}-0.4}}% - \put(990,1140){\makebox(0,0)[r]{\strut{}-0.2}}% - \put(990,1260){\makebox(0,0)[r]{\strut{} 0}}% - \put(990,1380){\makebox(0,0)[r]{\strut{} 0.2}}% - \put(990,1500){\makebox(0,0)[r]{\strut{} 0.4}}% - \put(990,1620){\makebox(0,0)[r]{\strut{} 0.6}}% - \put(990,1740){\makebox(0,0)[r]{\strut{} 0.8}}% - \put(990,1860){\makebox(0,0)[r]{\strut{} 1}}% - \put(1122,440){\makebox(0,0){\strut{} 0}}% - \put(1457,440){\makebox(0,0){\strut{} 1}}% - \put(1792,440){\makebox(0,0){\strut{} 2}}% - \put(2127,440){\makebox(0,0){\strut{} 3}}% - \put(2461,440){\makebox(0,0){\strut{} 4}}% - \put(2796,440){\makebox(0,0){\strut{} 5}}% - \put(3131,440){\makebox(0,0){\strut{} 6}}% - \put(220,1260){\rotatebox{90}{\makebox(0,0){\strut{}sin(x)}}}% - \put(2174,110){\makebox(0,0){\strut{}x}}% - \put(2174,2190){\makebox(0,0){\strut{}Sinus}}% + \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(2239,1687){\makebox(0,0)[r]{\strut{}sin(x)}}% + \put(2282,1687){\makebox(0,0)[r]{\strut{}sin(x)}}% }% \gplbacktext \put(0,0){\includegraphics{gnuplot42}}% diff --git a/Master/texmf-dist/doc/latex/combinedgraphics/test/xfig325.eps b/Master/texmf-dist/doc/latex/combinedgraphics/test/xfig325.eps index 7a18fa94253..d0824839387 100644 --- a/Master/texmf-dist/doc/latex/combinedgraphics/test/xfig325.eps +++ b/Master/texmf-dist/doc/latex/combinedgraphics/test/xfig325.eps @@ -1,8 +1,7 @@ %!PS-Adobe-2.0 EPSF-2.0 %%Title: xfig325.fig -%%Creator: fig2dev Version 3.2 Patchlevel 5 -%%CreationDate: Wed Jun 15 00:40:51 2011 -%%For: chsch@europa (,,,) +%%Creator: fig2dev Version 3.2 Patchlevel 5c +%%CreationDate: Fri Jul 13 20:19:16 2012 %%BoundingBox: 0 0 87 87 %Magnification: 1.0000 %%EndComments diff --git a/Master/texmf-dist/doc/latex/combinedgraphics/test/xfig325.pdf b/Master/texmf-dist/doc/latex/combinedgraphics/test/xfig325.pdf Binary files differindex 93d74696642..3ecbd00cff0 100644 --- a/Master/texmf-dist/doc/latex/combinedgraphics/test/xfig325.pdf +++ b/Master/texmf-dist/doc/latex/combinedgraphics/test/xfig325.pdf diff --git a/Master/texmf-dist/doc/latex/combinedgraphics/test/xfig325.tex b/Master/texmf-dist/doc/latex/combinedgraphics/test/xfig325.tex index e0700a4a45d..2db079d0301 100644 --- a/Master/texmf-dist/doc/latex/combinedgraphics/test/xfig325.tex +++ b/Master/texmf-dist/doc/latex/combinedgraphics/test/xfig325.tex @@ -1,12 +1,12 @@ \setlength{\unitlength}{4144sp}% % -\begingroup\makeatletter\ifx\SetFigFontNFSS\undefined% -\gdef\SetFigFontNFSS#1#2#3#4#5{% +\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{{\SetFigFontNFSS{12}{14.4}{\rmdefault}{\mddefault}{\itdefault}{\color[rgb]{1,0,0}square}% +\put(676,119){\makebox(0,0)[b]{\smash{{\SetFigFont{12}{14.4}{\rmdefault}{\mddefault}{\itdefault}{\color[rgb]{1,0,0}square}% }}}} \end{picture}% diff --git a/Master/texmf-dist/source/latex/combinedgraphics/combinedgraphics.dtx b/Master/texmf-dist/source/latex/combinedgraphics/combinedgraphics.dtx index 436925c88fa..1ebb72a6859 100644 --- a/Master/texmf-dist/source/latex/combinedgraphics/combinedgraphics.dtx +++ b/Master/texmf-dist/source/latex/combinedgraphics/combinedgraphics.dtx @@ -3,7 +3,7 @@ % % DocStrip file for combinedgraphics package % -% Copyright 2009,2011 Christian Schneider <software(at)chschneider(dot)eu> +% Copyright 2009,2011,2012 Christian Schneider <software(at)chschneider(dot)eu> % % cgr@addto@macro: identical to l@addto@macro from koma-script % bundle v2.9t @@ -34,7 +34,7 @@ % \iffalse %<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01] %<package>\ProvidesPackage{combinedgraphics} -%<package> [2011/06/15 v0.1.1-alpha inclusion of combined EPS/LaTeX graphics] +%<package> [2012/07/13 v0.2.2 inclusion of combined EPS/LaTeX graphics] %<*driver> \documentclass[a4paper]{ltxdoc} \usepackage{combinedgraphics} @@ -70,10 +70,15 @@ % \changes{v0.1.0-alpha}{2011/06/12}{added options for changing the inclusion % order of \LaTeX{} and vector graphics parts} % \changes{v0.1.1-alpha}{2011/06/15}{fix in Makefiles of package} +% \changes{v0.2.0}{2012/01/04}{added options for scaling vector graphics +% part to a certain width or height, respectively, plus removed ``alpha'' +% from version} +% \changes{v0.2.1}{2012/01/07}{simplified a macro} +% \changes{v0.2.2}{2012/07/12}{added comments to test file} % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % -% \CheckSum{574} +% \CheckSum{704} % % \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 @@ -104,16 +109,11 @@ % % \title{The \textsf{combinedgraphics} package\thanks{This document corresponds % to \textsf{combinedgraphics}~\fileversion, dated~\filedate. Copyright -% 2009,2011 Christian Schneider \texttt{<software(at)chschneider(dot)eu>}.}} +% 2009,2011,2012 Christian Schneider \texttt{<software(at)chschneider(dot)eu>}.}} % \author{Christian Schneider\\ \texttt{<software(at)chschneider(dot)eu>}} % % \maketitle % -% \begin{center} -% \large\textbf{\textsf{Warning: This is alpha software and may -% contain serious bugs! Use with caution and on your own risk! Check output!}} -% \end{center} -% % \tableofcontents % \clearpage % @@ -137,7 +137,16 @@ % hidden under shaded areas) % \item rescaling and rotating of complete graphics (similar to % |\includegraphics| from \textsf{graphicx} package) +% \item scaling the vector graphics part (without affecting the font) to +% a defined width or height of the graphics, which might, e.g., be of +% importance for graphics that are intended for publication in a journal +% requesting a certain size of graphics % \end{itemize} +% +% A test PDF file with extensively commented examples is shipped with this +% package and a BASH script (\texttt{texpic2epspdf.sh}) to convert combined +% EPS/\LaTeX{} and PDF/\LaTeX{} graphics to EPS or PDF files with text part +% included. % \end{abstract} % % \section{The Combined EPS/\LaTeX{} format} @@ -211,6 +220,19 @@ % package option) % \item[\texttt{vecscale}=\meta{value}] scaling factor for rescaling the % graphics without affecting the font of the \LaTeX{} part +% (Note that this will overwrite |vecwidth| or |vecheight|, if they are +% specified before.) +% \item[\texttt{vecwidth}=\meta{value}] analogous to |vecscale|, but +% the scaling factor will be calculated such that the new width of the +% total graphics will be \meta{value}; the aspect ratio will be preserved +% (Note that this will overwrite |vecscale| or |vecheight|, if they are +% specified before.) +% \item[\texttt{vecheight}=\meta{value}] analogous to |vecscale|, but +% the scaling factor will be calculated such that the new (total) height of +% the total graphics will be \meta{value}; the aspect ratio will be +% preserved +% (Note that this will overwrite |vecscale| or |vecwidth|, if they are +% specified before.) % \item[\texttt{vecinclude}=\meta{value}] generate code to include the vector % graphics part; \meta{value}s are: |auto| to automatically determine if % code is required (default), |true|/|false| to always/never generate @@ -227,7 +249,8 @@ % % Note: If the vector graphics part is already included by the \LaTeX{} part, % |vecinclude| and |vecscale| will require the vector graphics part to be -% included by an |\includegraphics| command for proper functioning. Furthermore, +% included by an |\includegraphics| command for proper functioning. Other +% graphics inclusion macros will not be detected. Furthermore, % |vecscale| also requires that the \LaTeX{} part puts its text inside a % |picture| environment whose scaling is set with % |\setlength{\unitlength}|\marg{some length}. These two prerequisites are @@ -304,6 +327,12 @@ % \item[\texttt{textcolorcmd}=\meta{value}] name of a command (\emph{without} % leading backslash) for recoloring text in \LaTeX{} part % \item[\texttt{vecscale}=\meta{value}] see section~\ref{sec:basic} +% \item[\texttt{vecwidth}=\meta{value}] see section~\ref{sec:basic}; in +% contrast to the macro options, you must not use a length as \meta{value} +% here (workaround: use |\the\somelength|) +% \item[\texttt{vecheight}=\meta{value}] see section~\ref{sec:basic}; in +% contrast to the macro options, you must not use a length as \meta{value} +% here (workaround: use |\the\somelength|) % \item[\texttt{vecinclude}=\meta{value}] see section~\ref{sec:basic} % \item[\texttt{vecfirst}=\meta{value}] see section~\ref{sec:basic} % \end{mydescription} @@ -312,8 +341,7 @@ % % Please report bugs and problems or send suggestions for this package to % Christian Schneider. Check for updates before reporting bugs at the website -% mentioned above. Do \emph{not} bother Markus Kohm or Frank Neukam with bugs, -% problems or suggestions concerning this package! +% mentioned above. % % \StopEventually{\PrintChanges\PrintIndex} % @@ -331,9 +359,11 @@ % % \subsection{Package options} % -% This |if| is required to remember the inclusion order. +% This |if| is required to remember the inclusion order. The macro specifies +% the package option from |vecscale|, |vecwidth|, |vecheight| used last. % \begin{macrocode} \newif\ifcgr@vecfirst +\def\cgr@vecscale@type{0} % \end{macrocode} % % Definitions of package options as \meta{key}|=|\meta{value} pairs. The @@ -343,7 +373,12 @@ \newcommand*\cgr@setopts{\setkeys{cgr}} \cgr@defopts{textfontcmd}{\gdef\cgr@textfont@default{\@nameuse{#1}}} \cgr@defopts{textcolorcmd}{\gdef\cgr@textcolor@default{\@nameuse{#1}}} -\cgr@defopts{vecscale}{\gdef\cgr@vecscale@default{#1}} +\cgr@defopts{vecscale}{\gdef\cgr@vecscale@default{#1}% + \gdef\cgr@vecscale@type{0}} +\cgr@defopts{vecwidth}{\gdef\cgr@vecwidth@default{#1}% + \gdef\cgr@vecscale@type{1}} +\cgr@defopts{vecheight}{\gdef\cgr@vecheight@default{#1}% + \gdef\cgr@vecscale@type{2}} \cgr@defopts{vecinclude}{\gdef\cgr@vecinclude@default{#1}} \cgr@defopts{vecfirst}{\gdef\cgr@vecfirst@default{#1}} % \end{macrocode} @@ -412,6 +447,23 @@ } % \end{macrocode} % +% |vecwidth| and |vecheight|, respectively, calculate the scaling factor for +% |vecscale| such that the width or (total) height of the vector graphics part +% equals the specified \meta{dimen}. |\vecscale| is set to |-1| to indicate +% that the factor shall be calculated. +% \begin{macrocode} +\cgr@defopts@combgrphcs{vecwidth}{% + \cgr@vecscale@wd{\cgr@texfile}{\cgr@vecfile}{#1}% + \def\setlength{\cgr@setlength}% + \def\includegraphics{\cgr@includegraphics}% +} +\cgr@defopts@combgrphcs{vecheight}{% + \cgr@vecscale@ht{\cgr@texfile}{\cgr@vecfile}{#1}% + \def\setlength{\cgr@setlength}% + \def\includegraphics{\cgr@includegraphics}% +} +% \end{macrocode} +% % |vecinclude| switches between the different \meta{value}s by setting % |\cgr@vecinclude| to one of the for macros % |\cgr@requires@graphics|\meta{value}. @@ -585,6 +637,7 @@ \def\cgr@vecscale{1} \def\cgr@vecinclude{\cgr@requires@graphicsauto} \cgr@vecfirsttrue +\def\cgr@texfile{} \def\cgr@vecfile{} \def\cgr@curr@hscale{} \def\cgr@curr@vscale{} @@ -652,12 +705,31 @@ }% % \end{macrocode} % +% Afterwards, a macro containing the name of the \LaTeX{} and vector graphics +% part, respectively, is initialized. +% \begin{macrocode} + \def\cgr@vecfile{#2}% + \def\cgr@texfile{#2}% +% \end{macrocode} +% % If set, the package options will be processed. (Suggestions for easier % handling of package options are welcome.) % \begin{macrocode} - \@ifundefined{cgr@vecscale@default}{}{% - \cgr@setopts@combgrphcs{vecscale=\cgr@vecscale@default}% - }% + \if0\cgr@vecscale@type% + \@ifundefined{cgr@vecscale@default}{}{% + \cgr@setopts@combgrphcs{vecscale=\cgr@vecscale@default}% + }% + \fi% + \if1\cgr@vecscale@type% + \@ifundefined{cgr@vecwidth@default}{}{% + \cgr@setopts@combgrphcs{vecwidth=\cgr@vecwidth@default}% + }% + \fi% + \if2\cgr@vecscale@type% + \@ifundefined{cgr@vecheight@default}{}{% + \cgr@setopts@combgrphcs{vecheight=\cgr@vecheight@default}% + }% + \fi% \@ifundefined{cgr@textfont@default}{}{% \cgr@setopts@combgrphcs{textfont=\cgr@textfont@default}% }% @@ -672,10 +744,8 @@ }% % \end{macrocode} % -% Afterwards, the macro containing the name of the vector graphics part is -% initialized and the options passed the the macro are processed. +% Now, the options passed the the macro are processed. % \begin{macrocode} - \def\cgr@vecfile{#2}% \cgr@setopts@combgrphcs{#1}% % \end{macrocode} % @@ -850,6 +920,55 @@ } % \end{macrocode} % +% The way of calculating the scaling factor for |vecwidth| and |vecheight| is +% a simplified and adapted version of |\ratio| from the |calc.sty| package. +% First, the width or (total) height of the original graphics part is measured. +% In order to do this, the graphics are put into a box. +% Afterwards, the places before the decimal point are calculated by \TeX{}'s +% built-in integer division. Finally, the decimal places are calculated with +% an algorithm as division has been taught at school. +% \begin{macrocode} +\newcount\cgr@tempdigit +\newcommand*\cgr@vecscale@wd[3]{% + \cgr@vecscale@graphicsbox{#1}{#2}% + \cgr@vecscale@calc{\wd\@tempboxa}{#3}% +} +\newcommand*\cgr@vecscale@ht[3]{% + \cgr@vecscale@graphicsbox{#1}{#2}% + \@tempdimc=\ht\@tempboxa% + \advance\@tempdimc by\dp\@tempboxa% + \cgr@vecscale@calc{\@tempdimc}{#3}% +} +\newcommand*\cgr@vecscale@graphicsbox[2]{% + \setbox\@tempboxa\hbox{% + \begingroup% + \def\setlength{\cgr@setlength@orig}% + \def\includegraphics{\cgr@gobble@optone}% + \input{#1}% + \endgroup% + }% +} +\newcommand*\cgr@vecscale@calc[2]{% + \@tempdimb=#1% + \@tempcntb=\@tempdimb% + \@tempdima=#2% + \@tempcnta=\@tempdima% + \cgr@tempdigit=\@tempcnta% + \divide\cgr@tempdigit by\@tempcntb% + \edef\cgr@vecscale{\the\cgr@tempdigit.}% + \cgr@next@digit\cgr@next@digit\cgr@next@digit% + \cgr@next@digit\cgr@next@digit\cgr@next@digit% +} +\newcommand*\cgr@next@digit{% + \multiply\cgr@tempdigit by\@tempcntb% + \advance\@tempcnta by-\cgr@tempdigit% + \multiply\@tempcnta by10% + \cgr@tempdigit=\@tempcnta% + \divide\cgr@tempdigit by\@tempcntb% + \edef\cgr@vecscale{\cgr@vecscale\the\cgr@tempdigit}% +} +% \end{macrocode} +% % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % \Finale diff --git a/Master/texmf-dist/tex/latex/combinedgraphics/combinedgraphics.sty b/Master/texmf-dist/tex/latex/combinedgraphics/combinedgraphics.sty index ae2ec9a83b5..383fd7d3267 100644 --- a/Master/texmf-dist/tex/latex/combinedgraphics/combinedgraphics.sty +++ b/Master/texmf-dist/tex/latex/combinedgraphics/combinedgraphics.sty @@ -35,16 +35,22 @@ %% \NeedsTeXFormat{LaTeX2e}[1999/12/01] \ProvidesPackage{combinedgraphics} - [2011/06/15 v0.1.1-alpha inclusion of combined EPS/LaTeX graphics] + [2012/07/13 v0.2.2 inclusion of combined EPS/LaTeX graphics] \RequirePackage{keyval} \RequirePackage{graphicx} \RequirePackage{color} \newif\ifcgr@vecfirst +\def\cgr@vecscale@type{0} \newcommand*\cgr@defopts{\define@key{cgr}} \newcommand*\cgr@setopts{\setkeys{cgr}} \cgr@defopts{textfontcmd}{\gdef\cgr@textfont@default{\@nameuse{#1}}} \cgr@defopts{textcolorcmd}{\gdef\cgr@textcolor@default{\@nameuse{#1}}} -\cgr@defopts{vecscale}{\gdef\cgr@vecscale@default{#1}} +\cgr@defopts{vecscale}{\gdef\cgr@vecscale@default{#1}% + \gdef\cgr@vecscale@type{0}} +\cgr@defopts{vecwidth}{\gdef\cgr@vecwidth@default{#1}% + \gdef\cgr@vecscale@type{1}} +\cgr@defopts{vecheight}{\gdef\cgr@vecheight@default{#1}% + \gdef\cgr@vecscale@type{2}} \cgr@defopts{vecinclude}{\gdef\cgr@vecinclude@default{#1}} \cgr@defopts{vecfirst}{\gdef\cgr@vecfirst@default{#1}} \DeclareOption*{% @@ -81,6 +87,16 @@ \def\setlength{\cgr@setlength}% \def\includegraphics{\cgr@includegraphics}% } +\cgr@defopts@combgrphcs{vecwidth}{% + \cgr@vecscale@wd{\cgr@texfile}{\cgr@vecfile}{#1}% + \def\setlength{\cgr@setlength}% + \def\includegraphics{\cgr@includegraphics}% +} +\cgr@defopts@combgrphcs{vecheight}{% + \cgr@vecscale@ht{\cgr@texfile}{\cgr@vecfile}{#1}% + \def\setlength{\cgr@setlength}% + \def\includegraphics{\cgr@includegraphics}% +} \cgr@defopts@combgrphcs{vecinclude}{% \def\cgr@vecinclude{\@nameuse{cgr@requires@graphics#1}}% } @@ -213,6 +229,7 @@ \def\cgr@vecscale{1} \def\cgr@vecinclude{\cgr@requires@graphicsauto} \cgr@vecfirsttrue +\def\cgr@texfile{} \def\cgr@vecfile{} \def\cgr@curr@hscale{} \def\cgr@curr@vscale{} @@ -250,9 +267,23 @@ %% inclusion of \LaTeX{} part \input{#2}% }% - \@ifundefined{cgr@vecscale@default}{}{% - \cgr@setopts@combgrphcs{vecscale=\cgr@vecscale@default}% - }% + \def\cgr@vecfile{#2}% + \def\cgr@texfile{#2}% + \if0\cgr@vecscale@type% + \@ifundefined{cgr@vecscale@default}{}{% + \cgr@setopts@combgrphcs{vecscale=\cgr@vecscale@default}% + }% + \fi% + \if1\cgr@vecscale@type% + \@ifundefined{cgr@vecwidth@default}{}{% + \cgr@setopts@combgrphcs{vecwidth=\cgr@vecwidth@default}% + }% + \fi% + \if2\cgr@vecscale@type% + \@ifundefined{cgr@vecheight@default}{}{% + \cgr@setopts@combgrphcs{vecheight=\cgr@vecheight@default}% + }% + \fi% \@ifundefined{cgr@textfont@default}{}{% \cgr@setopts@combgrphcs{textfont=\cgr@textfont@default}% }% @@ -265,7 +296,6 @@ \@ifundefined{cgr@vecfirst@default}{}{% \cgr@setopts@combgrphcs{vecfirst=\cgr@vecfirst@default}% }% - \def\cgr@vecfile{#2}% \cgr@setopts@combgrphcs{#1}% \cgr@curr@pic% \endgroup% @@ -387,6 +417,45 @@ \fi% \@tempa% } +\newcount\cgr@tempdigit +\newcommand*\cgr@vecscale@wd[3]{% + \cgr@vecscale@graphicsbox{#1}{#2}% + \cgr@vecscale@calc{\wd\@tempboxa}{#3}% +} +\newcommand*\cgr@vecscale@ht[3]{% + \cgr@vecscale@graphicsbox{#1}{#2}% + \@tempdimc=\ht\@tempboxa% + \advance\@tempdimc by\dp\@tempboxa% + \cgr@vecscale@calc{\@tempdimc}{#3}% +} +\newcommand*\cgr@vecscale@graphicsbox[2]{% + \setbox\@tempboxa\hbox{% + \begingroup% + \def\setlength{\cgr@setlength@orig}% + \def\includegraphics{\cgr@gobble@optone}% + \input{#1}% + \endgroup% + }% +} +\newcommand*\cgr@vecscale@calc[2]{% + \@tempdimb=#1% + \@tempcntb=\@tempdimb% + \@tempdima=#2% + \@tempcnta=\@tempdima% + \cgr@tempdigit=\@tempcnta% + \divide\cgr@tempdigit by\@tempcntb% + \edef\cgr@vecscale{\the\cgr@tempdigit.}% + \cgr@next@digit\cgr@next@digit\cgr@next@digit% + \cgr@next@digit\cgr@next@digit\cgr@next@digit% +} +\newcommand*\cgr@next@digit{% + \multiply\cgr@tempdigit by\@tempcntb% + \advance\@tempcnta by-\cgr@tempdigit% + \multiply\@tempcnta by10% + \cgr@tempdigit=\@tempcnta% + \divide\cgr@tempdigit by\@tempcntb% + \edef\cgr@vecscale{\cgr@vecscale\the\cgr@tempdigit}% +} \endinput %% %% End of file `combinedgraphics.sty'. |