From e9d6d57d90449717e3a5a70e914275379a3dee6b Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Fri, 11 Dec 2015 23:19:08 +0000 Subject: gnuplottex (11dec15) git-svn-id: svn://tug.org/texlive/trunk@39082 c570f23f-e606-0410-a88d-b1316a301751 --- .../texmf-dist/tex/latex/gnuplottex/gnuplottex.sty | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) (limited to 'Master/texmf-dist/tex/latex/gnuplottex') 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}} -- cgit v1.2.3