diff options
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r-- | Master/texmf-dist/tex/latex/gnuplottex/gnuplottex.sty | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/Master/texmf-dist/tex/latex/gnuplottex/gnuplottex.sty b/Master/texmf-dist/tex/latex/gnuplottex/gnuplottex.sty index bafdb9e617e..81b356f9799 100644 --- a/Master/texmf-dist/tex/latex/gnuplottex/gnuplottex.sty +++ b/Master/texmf-dist/tex/latex/gnuplottex/gnuplottex.sty @@ -41,7 +41,7 @@ %% \NeedsTeXFormat{LaTeX2e}[1999/12/01] \ProvidesPackage{gnuplottex} - [2007/10/06 v0.4.1 gnuplot graphs in LaTeX] + [2007/10/13 v0.4.2 gnuplot graphs in LaTeX] \RequirePackage{latexsym,graphicx,moreverb,keyval,ifthen} \newif\ifShellEscape \newif\ifmiktex \miktexfalse @@ -84,7 +84,7 @@ \def\gnuplotverbatimwrite#1{% \def\BeforeStream {\message{Opening gnuplot stream #1}% - \immediate\write\verbatim@out{\string set terminal \gnuplotterminal} + \immediate\write\verbatim@out{\string set terminal \gnuplotterminal \gnuplotterminaloptions} \immediate\write\verbatim@out{\string set output '\figname.\gnuplottexextension{\gnuplotterminal}'} } \@bsphack @@ -121,8 +121,10 @@ \def\gnuplottexextension#1{\@ifundefined{gnuplottexextension@#1}{#1}{\csname gnuplottexextension@#1\endcsname}} \define@key{pic}{scale}[1]{\def\gnuplotscale{#1}} \define@key{pic}{terminal}[latex]{\def\gnuplotterminal{#1}} +\define@key{pic}{terminaloptions}{\def\gnuplotterminaloptions{ #1}} \newenvironment{gnuplot}[1][]{\stepcounter{fignum}% \def\gnuplotterminal{latex} +\def\gnuplotterminaloptions{} \def\gnuplotscale{1} \setkeys{pic}{#1} \xdef\gnuplotCutFile{\figname.gnuplot} @@ -130,21 +132,21 @@ {\endgnuplotverbatimwrite% \gnuplotgraphicsprocess% \gnuplotgraphicsinclude} +\def\extension{\gnuplottexextension{\gnuplotterminal}} \long\gdef\gnuplotgraphicsprocess{% \ifShellEscape \IfFileExists{\figname.gnuplot}{% \immediate\write18{gnuplot \figname.gnuplot} -\IfFileExists{\figname.\gnuplottexextension{\gnuplotterminal}}{% -\PackageInfo{gnuplottex} -{\figname.gnuplot converted}} +\IfFileExists{\figname.\extension}{% +\PackageInfo{gnuplottex}{\figname.gnuplot converted}} {\PackageWarningNoLine{gnuplottex} -{Conversion of \figname.gnuplot failed.}}}{} +{Conversion of \figname.gnuplot failed}}}{} \fi} \long\gdef\gnuplotgraphicsinclude{% -\IfFileExists{\figname.\gnuplottexextension{\gnuplotterminal}}{% -\ifthenelse{\equal{\gnuplottexextension{\gnuplotterminal}}{\string tex}} -{\scalebox{\gnuplotscale}{\input{\figname.\gnuplottexextension{\gnuplotterminal}}}} -{\includegraphics[scale=\gnuplotscale]{\figname.\gnuplottexextension{\gnuplotterminal}}} +\IfFileExists{\figname.\extension}{% +\ifthenelse{\equal{\extension}{\string tex}} +{\scalebox{\gnuplotscale}{\input{\figname.\extension}}} +{\includegraphics[scale=\gnuplotscale]{\figname.\extension}} } {\PackageWarningNoLine{gnuplottex} {Please convert \figname.gnuplot manually}} |