summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/gnuplottex
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2006-11-03 06:16:00 +0000
committerNorbert Preining <preining@logic.at>2006-11-03 06:16:00 +0000
commita6d4e22f961008636a3bfc36f89570e6fa0c85f6 (patch)
tree9d13f81b2a37ab6bdf3336066017d4cb5e701011 /Master/texmf-dist/tex/latex/gnuplottex
parente9b9a3f32d1a5b371fa2256f098ee4b158f6df1d (diff)
several updates (sorry Karl, it was a long train ride):
updates of packages: screenplay, bussproofs computational-complexity dvdcoll gnuplottex mathmode movie15 pgf pstricks-add pst-labo trfsigns (dvi->pdf move, COPYING file to doc) toptesi tocvsec2 thumb textfit (doc move) added to tpm-ctan-check: typogrid trsym trfsigns tracking toptesi toolbox todo tocvsec2 tocloft tocbibind titling titlefoot thumb textopo textfit teubner tensor git-svn-id: svn://tug.org/texlive/trunk@2382 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/gnuplottex')
-rw-r--r--Master/texmf-dist/tex/latex/gnuplottex/gnuplottex.sty81
1 files changed, 23 insertions, 58 deletions
diff --git a/Master/texmf-dist/tex/latex/gnuplottex/gnuplottex.sty b/Master/texmf-dist/tex/latex/gnuplottex/gnuplottex.sty
index e4427eee8dc..4fe162fc373 100644
--- a/Master/texmf-dist/tex/latex/gnuplottex/gnuplottex.sty
+++ b/Master/texmf-dist/tex/latex/gnuplottex/gnuplottex.sty
@@ -41,16 +41,14 @@
%%
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
\ProvidesPackage{gnuplottex}
- [2006/04/02 v0.1 gnuplot graphs in LaTeX]
-\RequirePackage{graphicx,moreverb,keyval}
+ [2006/10/28 v0.2 gnuplot graphs in LaTeX]
+\RequirePackage{latexsym,graphicx,moreverb,keyval}
\newif\ifShellEscape
\newif\ifmiktex \miktexfalse
-\newif\ifpdf \pdffalse
\DeclareOption{shell}{\ShellEscapetrue}
\DeclareOption{noshell}{\ShellEscapefalse}
\DeclareOption{miktex}{\global\miktextrue}
-\DeclareOption{pdf}{\pdftrue}
\ExecuteOptions{shell}
\ProcessOptions\relax
@@ -82,9 +80,9 @@
\def\gnuplotverbatimwrite#1{%
\def\BeforeStream
- {\message{Opening gnuplot stream=\figname.gnuplot}%
- \immediate\write\verbatim@out{\string set terminal postscript eps enhanced}
-\immediate\write\verbatim@out{\string set output '\figname.eps'}
+ {\message{Opening gnuplot stream #1}%
+ \immediate\write\verbatim@out{\string set terminal latex}
+\immediate\write\verbatim@out{\string set output '\figname.tex'}
}
\@bsphack
\immediate\openout \verbatim@out #1
@@ -97,74 +95,41 @@
\verbatim@start}
\def\endgnuplotverbatimwrite{%
\immediate\closeout\verbatim@out
- \@esphack}
-\define@key{pic}{width}{\def\gnuplotwidth{#1}}
-\define@key{pic}{height}{\def\gnuplotheight{#1}}
+ \@esphack
+\catcode`\\0
+\catcode`\{1
+\catcode`\}2
+\catcode`\$3
+\catcode`\&4
+\catcode`\^^M5
+\catcode`\#6
+\catcode`\^7
+\catcode`\_8
+\catcode`\ 10
+\catcode`\%14}
+\define@key{pic}{scale}{\def\gnuplotscale{#1}}
\newenvironment{gnuplot}[1][]{\stepcounter{fignum}%
-\let\gnuplotwidth\undefined
-\let\gnuplotheight\undefined
+\def\gnuplotscale{1}
\setkeys{pic}{#1}
\xdef\gnuplotCutFile{\figname.gnuplot}
\gnuplotverbatimwrite{\gnuplotCutFile}}
{\endgnuplotverbatimwrite%
\gnuplotgraphicsinclude}
\long\gdef\gnuplotgraphicsprocess{%
- \ifShellEscape
+\ifShellEscape
\IfFileExists{\figname.gnuplot}{%
\immediate\write18{gnuplot \figname.gnuplot}
-\IfFileExists{\figname.eps}{%
-\ifpdf
-\immediate\write18{epstopdf \figname.eps}
-\IfFileExists{\figname.pdf}{%
+\IfFileExists{\figname.tex}{%
\PackageInfo{gnuplottex}
{\figname.gnuplot converted}}
{\PackageWarningNoLine{gnuplottex}
-{Conversion of \figname.gnuplot failed.}}
-\else
-\PackageInfo{gnuplottex}
-{\figname.gnuplot converted}
-\fi}
-{\PackageWarningNoLine{gnuplottex}
{Conversion of \figname.gnuplot failed.}}}{}
\fi}
\long\gdef\gnuplotgraphicsinclude{\gnuplotgraphicsprocess%
-\ifpdf
-\IfFileExists{\figname.pdf}{%
-\ifx\gnuplotwidth\undefined
-\ifx\gnuplotheight\undefined
-\includegraphics{\figname}
-\else
-\includegraphics[height=\gnuplotheight]{\figname}
-\fi
-\else
-\ifx\gnuplotheight\undefined
-\includegraphics[width=\gnuplotwidth]{\figname}
-\else
-\includegraphics[width=\gnuplotwidth,height=\gnuplotheight]{\figname}
-\fi
-\fi
-}
+\IfFileExists{\figname.tex}{%
+\scalebox{\gnuplotscale}{\input{\figname}}}
{\PackageWarningNoLine{gnuplottex}
{Please convert \figname.gnuplot manually}}
-\else
-\IfFileExists{\figname.eps}{%
-\ifx\gnuplotwidth\undefined
-\ifx\gnuplotheight\undefined
-\includegraphics{\figname}
-\else
-\includegraphics[height=\gnuplotheight]{\figname}
-\fi
-\else
-\ifx\gnuplotheight\undefined
-\includegraphics[width=\gnuplotwidth]{\figname}
-\else
-\includegraphics[width=\gnuplotwidth,height=\gnuplotheight]{\figname}
-\fi
-\fi
-}
-{\PackageWarningNoLine{gnuplottex}
-{Please convert \figname.gnuplot manually}}
-\fi
}
\endinput
%%