diff options
author | Karl Berry <karl@freefriends.org> | 2015-12-11 23:19:08 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2015-12-11 23:19:08 +0000 |
commit | e9d6d57d90449717e3a5a70e914275379a3dee6b (patch) | |
tree | b0eb9a81c13035f3823e9f973b7aa3948967918a | |
parent | 0c77232187fdaa1f3d5635e9bb69ce5fea40f993 (diff) |
gnuplottex (11dec15)
git-svn-id: svn://tug.org/texlive/trunk@39082 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r-- | Master/texmf-dist/doc/latex/gnuplottex/gnuplottex.pdf | bin | 402383 -> 404137 bytes | |||
-rw-r--r-- | Master/texmf-dist/source/latex/gnuplottex/gnuplottex.dtx | 51 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/gnuplottex/gnuplottex.sty | 20 |
3 files changed, 63 insertions, 8 deletions
diff --git a/Master/texmf-dist/doc/latex/gnuplottex/gnuplottex.pdf b/Master/texmf-dist/doc/latex/gnuplottex/gnuplottex.pdf Binary files differindex c8efe1c6c74..e4acf301892 100644 --- a/Master/texmf-dist/doc/latex/gnuplottex/gnuplottex.pdf +++ b/Master/texmf-dist/doc/latex/gnuplottex/gnuplottex.pdf diff --git a/Master/texmf-dist/source/latex/gnuplottex/gnuplottex.dtx b/Master/texmf-dist/source/latex/gnuplottex/gnuplottex.dtx index bfb90c8b120..a624cb41d27 100644 --- a/Master/texmf-dist/source/latex/gnuplottex/gnuplottex.dtx +++ b/Master/texmf-dist/source/latex/gnuplottex/gnuplottex.dtx @@ -1,6 +1,6 @@ % \iffalse meta-comment % -% Copyright (c) 2006-2013, Lars Kotthoff <lars@larsko.org> and contributors +% Copyright (c) 2006-2015, Lars Kotthoff <lars@larsko.org> and contributors % % Large portions copied from pdftex, % Copyright (c) 2001-3, Radhakrishnan CV <cvr@river-valley.com> @@ -42,8 +42,8 @@ %<package> \NeedsTeXFormat{LaTeX2e}[1999/12/01] %<package> \ProvidesPackage{gnuplottex} %<*package> - [2013/11/24 v0.8 gnuplot graphs in LaTeX] -\RequirePackage{latexsym,graphicx,moreverb,keyval,ifthen} + [2015/12/08 v0.9 gnuplot graphs in LaTeX] +\RequirePackage{graphicx,moreverb,keyval,ifthen,catchfile} %</package> % %<*driver> @@ -67,7 +67,7 @@ %</driver> % \fi % -% \CheckSum{412} +% \CheckSum{452} % % \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 @@ -102,6 +102,8 @@ % \changes{v0.7.1}{2013/09/08}{Fix bug with subfolder option with MikTeX (Thomas Schmid).} % \changes{v0.7.2}{2013/11/16}{Allow to specify path to gnuplot (Manuel Solano).} % \changes{v0.8}{2013/11/24}{Extended Documentation.} +% \changes{v0.8.1}{2013/12/29}{Extended Documentation.} +% \changes{v0.9}{2015/12/08}{Show any errors during conversion on Unix (Enrico Gregorio, suggested by Udo H\"ofel).} % % \GetFileInfo{gnuplottex.dtx} % @@ -613,6 +615,31 @@ %\verb- while its offset is $c=\num{\gpgetvar{c}}$.}%-\\ %\verb+ \label{pic:tikz}%+\\ %\verb+\end{figure}%+\\ +% As compiling all pictures everytime can take quite a long time, the \texttt{tikz}-package offers the possibility to externalize the pictures, resulting in a great speedup. +% An example for Lua\TeX{} is shown below, pictures are not generated if they are up-to-date. +% In the preamble write:\\ +% \verb+\usepackage{tikz} +\\ +% \verb+\usetikzlibrary{external}+\\ +% \verb+\tikzexternalize[prefix=gnuplottex/] %-- Use the gnuplottex-subfolder. Deactivate+\\ +%\verb+ %-- the subfolderoption of gnuplottex to use!+\\ +% \verb+\tikzset{external/system call={lualatex -shell-escape -halt-on-error+\\ +% \verb+-interaction=batchmode -jobname "\image" "\texsource"}}+\\ +% \verb+\tikzexternalize+\\ +% In the document, write e.\,g.:\\ +% \verb+\begin{figure}%+\\ +% \verb+ \centering%+\\ +% \verb+ \tikzsetnextfilename{ThisIsASinus}+\\ +% \verb+ \begin{tikzpicture}[gnuplot]+\\ +% \verb+ \begin{gnuplot}[terminal=tikz, terminaloptions=color dashed nopicenvironment]+\\ +%\verb+ set grid xtics mxtics lt 0 ls 0+\\ +%\verb+ set grid ytics mytics lt 0 ls 0+\\ +%\verb+ set key box top left+\\ +%\verb+ plot sin(x) w l t 'Sinus'+\\ +% \verb+ \end{gnuplot}+\\ +% \verb+ \end{tikzpicture}+\\ +% \verb+ \caption{Captiontext.}%+\\ +% \verb+ \label{pic:ThisIsASinus}%+\\ +%\verb+\end{figure}%+\\ % % \DescribeMacro{pstex,pslatex,pstricks} % The \texttt{pstex}- and \texttt{pslatex}-terminal produces unusable output with pdf\TeX. @@ -667,6 +694,7 @@ \else \IfFileExists{\tmpfile}{\ShellEscapetrue}{\ShellEscapefalse} \immediate\write18{rm -f \tmpfile} + \immediate\write18{rm -f "\jobname.gnuploterrors"} \fi \fi @@ -784,7 +812,11 @@ \long\gdef\gnuplotgraphicsprocess{% \ifShellEscape \IfFileExists{\subfolder\figname.gnuplot}{% - \immediate\write18{\gnuplotexe\space \subfolder\figname.gnuplot} + \ifmiktex + \immediate\write18{\gnuplotexe\space \subfolder\figname.gnuplot} + \else + \immediate\write18{\gnuplotexe\space \subfolder\figname.gnuplot\space 2>>\jobname.gnuploterrors} + \fi \IfFileExists{\subfolder\figname.\extension}{% \PackageInfo{gnuplottex}{\subfolder\figname.gnuplot converted} \ifcleanup @@ -798,6 +830,15 @@ {\PackageWarningNoLine{gnuplottex} {Conversion of \subfolder\figname.gnuplot failed}}}{} \fi} +\long\def\gnuploterrors@eatpar#1#2\@nil{\def\gnuploterrors@{#2}} +\AtEndDocument{% + \CatchFileDef\gnuploterrors@{\jobname.gnuploterrors}{\endlinechar=`^^J \catcode`\ =12 }% + \expandafter\gnuploterrors@eatpar\gnuploterrors@\@nil + \ifx\gnuploterrors@\@empty\else + \PackageWarningNoLine{gnuplottex}{Gnuplot execution produced errors:^^J% + \detokenize\expandafter{\gnuploterrors@}}% + \fi +} % \end{macrocode} % % \subsection{Graph inclusion} diff --git a/Master/texmf-dist/tex/latex/gnuplottex/gnuplottex.sty b/Master/texmf-dist/tex/latex/gnuplottex/gnuplottex.sty index f61428bbb16..b3cb89ea3cf 100644 --- a/Master/texmf-dist/tex/latex/gnuplottex/gnuplottex.sty +++ b/Master/texmf-dist/tex/latex/gnuplottex/gnuplottex.sty @@ -41,8 +41,8 @@ %% \NeedsTeXFormat{LaTeX2e}[1999/12/01] \ProvidesPackage{gnuplottex} - [2013/11/24 v0.8 gnuplot graphs in LaTeX] -\RequirePackage{latexsym,graphicx,moreverb,keyval,ifthen} + [2015/12/08 v0.9 gnuplot graphs in LaTeX] +\RequirePackage{graphicx,moreverb,keyval,ifthen,catchfile} \newif\ifShellEscape \newif\ifmiktex \miktexfalse \newif\ifusesiunitx @@ -76,6 +76,7 @@ \else \IfFileExists{\tmpfile}{\ShellEscapetrue}{\ShellEscapefalse} \immediate\write18{rm -f \tmpfile} + \immediate\write18{rm -f "\jobname.gnuploterrors"} \fi \fi @@ -180,7 +181,11 @@ \long\gdef\gnuplotgraphicsprocess{% \ifShellEscape \IfFileExists{\subfolder\figname.gnuplot}{% -\immediate\write18{\gnuplotexe\space \subfolder\figname.gnuplot} + \ifmiktex + \immediate\write18{\gnuplotexe\space \subfolder\figname.gnuplot} + \else + \immediate\write18{\gnuplotexe\space \subfolder\figname.gnuplot\space 2>>\jobname.gnuploterrors} + \fi \IfFileExists{\subfolder\figname.\extension}{% \PackageInfo{gnuplottex}{\subfolder\figname.gnuplot converted} \ifcleanup @@ -194,6 +199,15 @@ {\PackageWarningNoLine{gnuplottex} {Conversion of \subfolder\figname.gnuplot failed}}}{} \fi} +\long\def\gnuploterrors@eatpar#1#2\@nil{\def\gnuploterrors@{#2}} +\AtEndDocument{% + \CatchFileDef\gnuploterrors@{\jobname.gnuploterrors}{\endlinechar=`^^J \catcode`\ =12 }% + \expandafter\gnuploterrors@eatpar\gnuploterrors@\@nil + \ifx\gnuploterrors@\@empty\else + \PackageWarningNoLine{gnuplottex}{Gnuplot execution produced errors:^^J% + \detokenize\expandafter{\gnuploterrors@}}% + \fi +} \long\gdef\gnuplotgraphicsinclude{% \IfFileExists{\subfolder\figname.\extension}{% \ifthenelse{\equal{\extension}{\string tex}} |