summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/gnuplottex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2007-10-15 16:36:16 +0000
committerKarl Berry <karl@freefriends.org>2007-10-15 16:36:16 +0000
commitcb0242710d6e1f090949ba9bd63b50c9f6410865 (patch)
tree03560008a87b187f2046fa2d413c53844e700721 /Master/texmf-dist/tex/latex/gnuplottex
parentff31968af2082f51e521acb83ade071ba1d2b128 (diff)
gnuplottex update (13oct07)
git-svn-id: svn://tug.org/texlive/trunk@5198 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/gnuplottex')
-rw-r--r--Master/texmf-dist/tex/latex/gnuplottex/gnuplottex.sty22
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}}