texlive[54711] Master/texmf-dist: gnuplottex

commits+karl at tug.org commits+karl at tug.org
Mon Apr 13 00:31:14 CEST 2020


Revision: 54711
          http://tug.org/svn/texlive?view=revision&revision=54711
Author:   karl
Date:     2020-04-13 00:31:14 +0200 (Mon, 13 Apr 2020)
Log Message:
-----------
gnuplottex

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/gnuplottex/example-pdf.tex
    trunk/Master/texmf-dist/doc/latex/gnuplottex/gnuplottex.pdf
    trunk/Master/texmf-dist/source/latex/gnuplottex/gnuplottex.dtx
    trunk/Master/texmf-dist/tex/latex/gnuplottex/gnuplottex.sty

Modified: trunk/Master/texmf-dist/doc/latex/gnuplottex/example-pdf.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/gnuplottex/example-pdf.tex	2020-04-12 22:30:57 UTC (rev 54710)
+++ trunk/Master/texmf-dist/doc/latex/gnuplottex/example-pdf.tex	2020-04-12 22:31:14 UTC (rev 54711)
@@ -1,6 +1,6 @@
 \documentclass[a4paper]{article}
 
-\usepackage{gnuplottex}
+\usepackage[subfolder]{gnuplottex}
 
 \begin{document}
 

Modified: trunk/Master/texmf-dist/doc/latex/gnuplottex/gnuplottex.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/source/latex/gnuplottex/gnuplottex.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/gnuplottex/gnuplottex.dtx	2020-04-12 22:30:57 UTC (rev 54710)
+++ trunk/Master/texmf-dist/source/latex/gnuplottex/gnuplottex.dtx	2020-04-12 22:31:14 UTC (rev 54711)
@@ -42,7 +42,7 @@
 %<package> \NeedsTeXFormat{LaTeX2e}[1999/12/01]
 %<package> \ProvidesPackage{gnuplottex}
 %<*package>
-    [2019/12/22 v0.9.4 gnuplot graphs in LaTeX]
+    [2020/03/19 v0.9.5 gnuplot graphs in LaTeX]
 \RequirePackage{graphicx,moreverb,keyval,ifthen,catchfile}
 %</package>
 %
@@ -67,7 +67,7 @@
 %</driver>                                                       
 % \fi
 %
-% \CheckSum{457}
+% \CheckSum{465}
 %
 % \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
@@ -108,6 +108,7 @@
 % \changes{v0.9.2}{2016/08/21}{Misc bugfixes (thanks fostermaier, Enrico Gregorio, Jan-Benedict Glaw).}
 % \changes{v0.9.3}{2019/09/22}{Whitespace fixes (thanks Johannes Hielscher).}
 % \changes{v0.9.4}{2019/12/22}{Whitespace fixes (thanks Johannes Hielscher).}
+% \changes{v0.9.5}{2020/03/19}{Make subfolder creation test conditional on shell escape being enabled (thanks Alex Serenko).}
 %
 % \GetFileInfo{gnuplottex.dtx}
 %
@@ -562,7 +563,7 @@
 % \fi
 \begin{figure}%
 	\centering%
-	\begin{gnuplot}[terminal=tikz, terminaloptions={color dashed providevars a,c}]
+	\begin{gnuplot}[terminal=tikz, terminaloptions={color providevars a,c}]
 		set key box top left
 		set key width -0.9
 		set key height 0.25
@@ -596,7 +597,7 @@
 %~\\
 %\verb+\begin{figure}%+\\
 %\verb+   \centering%+\\
-%\verb+   \begin{gnuplot}[terminal=tikz, terminaloptions={color dashed providevars a,c}]+\\
+%\verb+   \begin{gnuplot}[terminal=tikz, terminaloptions={color providevars a,c}]+\\
 %\verb+      set key box top left+\\
 %\verb+      set key width -0.9+\\
 %\verb+      set key height 0.25+\\
@@ -639,7 +640,7 @@
 % \verb+   \centering%+\\
 % \verb+   \tikzsetnextfilename{ThisIsASinus}+\\
 % \verb+   \begin{tikzpicture}[gnuplot]+\\
-% \verb+   \begin{gnuplot}[terminal=tikz, terminaloptions=color dashed nopicenvironment]+\\
+% \verb+   \begin{gnuplot}[terminal=tikz, terminaloptions=color 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+\\
@@ -698,7 +699,7 @@
 				\immediate\write18{touch \tmpfile}
 		\fi
 		\ifmiktex
-				\IfFileExists{\tmpfile.}{\ShellEscapetrue}{\ShellEscapefalse}
+				\IfFileExists{\tmpfile}{\ShellEscapetrue}{\ShellEscapefalse}
 				\immediate\write18{del "\tmpfile"}
 		\else
 				\IfFileExists{\tmpfile}{\ShellEscapetrue}{\ShellEscapefalse}
@@ -708,38 +709,40 @@
 \fi
 
 \ifusesubfolder
-    \ifmiktex
-        \immediate\write18{mkdir gnuplottex}
-        \immediate\write18{echo test > "gnuplottex/\tmpfile"}
-    \else
-        \immediate\write18{mkdir -p "gnuplottex"}
-        \immediate\write18{touch "gnuplottex/\tmpfile"}
-    \fi
-    \IfFileExists{gnuplottex/\tmpfile}{
+    \def\subfolder{gnuplottex}
+    \ifShellEscape
         \ifmiktex
-            \immediate\write18{del "gnuplottex\@backslashchar\tmpfile"}
+            \immediate\write18{mkdir \subfolder}
+            \immediate\write18{echo test > "\subfolder/\tmpfile"}
         \else
-            \immediate\write18{rm -f "gnuplottex/\tmpfile"}
+            \immediate\write18{mkdir -p "\subfolder"}
+            \immediate\write18{touch "\subfolder/\tmpfile"}
         \fi
-        \def\subfolder{gnuplottex/}
-        }{
-            \PackageWarningNoLine{gnuplottex}
-                {Creation of subfolder failed.\MessageBreak
-                You'll need to create the folder yourself}
-            \def\subfolder{}
-        }
+        \IfFileExists{gnuplottex/\tmpfile}{
+            \ifmiktex
+                \immediate\write18{del "\subfolder\@backslashchar\tmpfile"}
+            \else
+                \immediate\write18{rm -f "\subfolder/\tmpfile"}
+            \fi
+            }{
+                \PackageWarningNoLine{gnuplottex}
+                    {Creation of subfolder failed.\MessageBreak
+                    You'll need to create the folder yourself}
+                \def\subfolder{}
+            }
+    \fi
 \else
-    \def\subfolder{}
+    \def\subfolder{.}
 \fi
 
 
 \ifShellEscape
     \PackageInfo{gnuplottex}
-    {Automatically converting gnuplot files.}
+    {Automatically converting gnuplot files}
 \else
     \PackageWarningNoLine{gnuplottex}
         {Shell escape not enabled.\MessageBreak
-        You'll need to convert the graphs yourself.}
+        You'll need to convert the graphs yourself}
 \fi
 \newcounter{fignum}
 %    \end{macrocode}
@@ -754,7 +757,7 @@
     \def\BeforeStream
     {\message{Opening gnuplot stream #1}%
         \immediate\write\verbatim at out{\string set terminal \gnuplotterminal \gnuplotterminaloptions}%
-				\immediate\write\verbatim at out{\string set output '\subfolder\figname.\gnuplottexextension{\gnuplotterminal}'}%
+				\immediate\write\verbatim at out{\string set output '\subfolder/\figname.\gnuplottexextension{\gnuplotterminal}'}%
     \ifusesiunitx
         \ifthenelse{\equal{\extension}{\string tex}}{\usesiunitxingnuplot}{\PackageWarningNoLine{gnuplottex}{Axis numbers not written in \noexpand\num{}. Use a terminal that allows TeX output to enable this feature.}}
     \else
@@ -808,7 +811,7 @@
 		\def\gnuplotterminaloptions{}%%
 		\def\gnuplotscale{1}%%
 		\setkeys{pic}{#1}%%
-    \xdef\gnuplotCutFile{\subfolder\figname.gnuplot}%%
+    \xdef\gnuplotCutFile{\subfolder/\figname.gnuplot}%%
     \gnuplotverbatimwrite{\gnuplotCutFile}}
     {\endgnuplotverbatimwrite%
     \gnuplotgraphicsprocess%
@@ -820,24 +823,24 @@
 \def\extension{\gnuplottexextension{\gnuplotterminal}}
 \long\gdef\gnuplotgraphicsprocess{%
 		\ifShellEscape%
-				\IfFileExists{\subfolder\figname.gnuplot}{%
+				\IfFileExists{\subfolder/\figname.gnuplot}{%
                         \ifmiktex
-                            \immediate\write18{\gnuplotexe\space \subfolder\figname.gnuplot}%
+                            \immediate\write18{\gnuplotexe\space \subfolder/\figname.gnuplot}%
                         \else
-                            \immediate\write18{\gnuplotexe\space \subfolder\figname.gnuplot\space 2>>\jobname.gnuploterrors}%
+                            \immediate\write18{\gnuplotexe\space \subfolder/\figname.gnuplot\space 2>>\jobname.gnuploterrors}%
                         \fi%
-						\IfFileExists{\subfolder\figname.\extension}{%
-								\PackageInfo{gnuplottex}{\subfolder\figname.gnuplot converted}%
+						\IfFileExists{\subfolder/\figname.\extension}{%
+								\PackageInfo{gnuplottex}{\subfolder/\figname.gnuplot converted}%
                 \ifcleanup
                     \ifmiktex
-                        \immediate\write18{del "\subfolder\figname.gnuplot"}%
+                        \immediate\write18{del "\subfolder/\figname.gnuplot"}%
                     \else
-                        \immediate\write18{rm -f "\subfolder\figname.gnuplot"}%
+                        \immediate\write18{rm -f "\subfolder/\figname.gnuplot"}%
                     \fi%
                 \fi%
             }
 						{\PackageWarningNoLine{gnuplottex}
-								{Conversion of \subfolder\figname.gnuplot failed}}}{}%
+								{Conversion of \subfolder/\figname.gnuplot failed}}}{}%
 		\fi}
 \long\def\gnuploterrors at eatpar#1#2\@nil{\def\gnuploterrors@{#2}}
 \AtEndDocument{%
@@ -858,13 +861,13 @@
 % \subsection{Graph inclusion}
 %    \begin{macrocode}
 \long\gdef\gnuplotgraphicsinclude{%
-		\IfFileExists{\subfolder\figname.\extension}{%
+		\IfFileExists{\subfolder/\figname.\extension}{%
 				\ifthenelse{\equal{\extension}{\string tex}}
-						{\scalebox{\gnuplotscale}{\input{\subfolder\figname.\extension}}}
-						{\includegraphics[scale=\gnuplotscale]{\subfolder\figname.\extension}}
+						{\scalebox{\gnuplotscale}{\input{\subfolder/\figname.\extension}}}
+						{\includegraphics[scale=\gnuplotscale]{\subfolder/\figname.\extension}}
 		}
 		{\PackageWarningNoLine{gnuplottex}
-				{Please convert \subfolder\figname.gnuplot manually}}
+				{Please convert \subfolder/\figname.gnuplot manually}}
 }
 %    \end{macrocode}
 %
@@ -874,7 +877,7 @@
   \immediate\openout \verbatim at out #1%
   \message{Opening gnuplot stream #1}%
   \immediate\write\verbatim at out{\string set terminal \gnuplotterminal \gnuplotterminaloptions}%
-  \immediate\write\verbatim at out{\string set output '\subfolder\figname.\gnuplottexextension{\gnuplotterminal}'}%
+  \immediate\write\verbatim at out{\string set output '\subfolder/\figname.\gnuplottexextension{\gnuplotterminal}'}%
   \ifusesiunitx
     \ifthenelse{\equal{\extension}{\string tex}}{\usesiunitxingnuplot}{\PackageWarningNoLine{gnuplottex}{Axis numbers not written in \noexpand\num{}. Use a terminal that allows TeX output to enable this feature.}}
   \else
@@ -897,7 +900,7 @@
   \def\gnuplotterminaloptions{}
   \def\gnuplotscale{1}
   \setkeys{pic}{#1}
-  \xdef\gnuplotCutFile{\subfolder\figname.gnuplot}
+  \xdef\gnuplotCutFile{\subfolder/\figname.gnuplot}
   \gnuplotloadfilewrite{\gnuplotCutFile}{#2}
   \gnuplotgraphicsprocess%
   \gnuplotgraphicsinclude

Modified: trunk/Master/texmf-dist/tex/latex/gnuplottex/gnuplottex.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/gnuplottex/gnuplottex.sty	2020-04-12 22:30:57 UTC (rev 54710)
+++ trunk/Master/texmf-dist/tex/latex/gnuplottex/gnuplottex.sty	2020-04-12 22:31:14 UTC (rev 54711)
@@ -20,7 +20,7 @@
 %% 
 %%                     Antoine Chambert-Loir
 %%                     <chambert at math.polytechnique.fr>
-%%                     http://www.math.polytechnique.fr/\protect \unhbox \voidb at x \penalty \@M \ {}chambert
+%%                     http://www.math.polytechnique.fr/\protect \unhbox \voidb at x \protect \penalty \@M \ {}chambert
 %% 
 %% Ecole polytechnique, Palaiseau Cedex, France
 %% 
@@ -41,7 +41,7 @@
 %% 
  \NeedsTeXFormat{LaTeX2e}[1999/12/01]
  \ProvidesPackage{gnuplottex}
-    [2019/12/22 v0.9.4 gnuplot graphs in LaTeX]
+    [2020/03/19 v0.9.5 gnuplot graphs in LaTeX]
 \RequirePackage{graphicx,moreverb,keyval,ifthen,catchfile}
 \newif\ifShellEscape
 \newif\ifmiktex \miktexfalse
@@ -71,7 +71,7 @@
 \immediate\write18{touch \tmpfile}
 \fi
 \ifmiktex
-\IfFileExists{\tmpfile.}{\ShellEscapetrue}{\ShellEscapefalse}
+\IfFileExists{\tmpfile}{\ShellEscapetrue}{\ShellEscapefalse}
 \immediate\write18{del "\tmpfile"}
 \else
 \IfFileExists{\tmpfile}{\ShellEscapetrue}{\ShellEscapefalse}
@@ -81,37 +81,39 @@
 \fi
 
 \ifusesubfolder
-    \ifmiktex
-        \immediate\write18{mkdir gnuplottex}
-        \immediate\write18{echo test > "gnuplottex/\tmpfile"}
-    \else
-        \immediate\write18{mkdir -p "gnuplottex"}
-        \immediate\write18{touch "gnuplottex/\tmpfile"}
-    \fi
-    \IfFileExists{gnuplottex/\tmpfile}{
+    \def\subfolder{gnuplottex}
+    \ifShellEscape
         \ifmiktex
-            \immediate\write18{del "gnuplottex\@backslashchar\tmpfile"}
+            \immediate\write18{mkdir \subfolder}
+            \immediate\write18{echo test > "\subfolder/\tmpfile"}
         \else
-            \immediate\write18{rm -f "gnuplottex/\tmpfile"}
+            \immediate\write18{mkdir -p "\subfolder"}
+            \immediate\write18{touch "\subfolder/\tmpfile"}
         \fi
-        \def\subfolder{gnuplottex/}
-        }{
-            \PackageWarningNoLine{gnuplottex}
-                {Creation of subfolder failed.\MessageBreak
-                You'll need to create the folder yourself}
-            \def\subfolder{}
-        }
+        \IfFileExists{gnuplottex/\tmpfile}{
+            \ifmiktex
+                \immediate\write18{del "\subfolder\@backslashchar\tmpfile"}
+            \else
+                \immediate\write18{rm -f "\subfolder/\tmpfile"}
+            \fi
+            }{
+                \PackageWarningNoLine{gnuplottex}
+                    {Creation of subfolder failed.\MessageBreak
+                    You'll need to create the folder yourself}
+                \def\subfolder{}
+            }
+    \fi
 \else
-    \def\subfolder{}
+    \def\subfolder{.}
 \fi
 
 \ifShellEscape
     \PackageInfo{gnuplottex}
-    {Automatically converting gnuplot files.}
+    {Automatically converting gnuplot files}
 \else
     \PackageWarningNoLine{gnuplottex}
         {Shell escape not enabled.\MessageBreak
-        You'll need to convert the graphs yourself.}
+        You'll need to convert the graphs yourself}
 \fi
 \newcounter{fignum}
 \def\figname{\jobname-gnuplottex-fig\thefignum}
@@ -122,7 +124,7 @@
     \def\BeforeStream
     {\message{Opening gnuplot stream #1}%
         \immediate\write\verbatim at out{\string set terminal \gnuplotterminal \gnuplotterminaloptions}%
-\immediate\write\verbatim at out{\string set output '\subfolder\figname.\gnuplottexextension{\gnuplotterminal}'}%
+\immediate\write\verbatim at out{\string set output '\subfolder/\figname.\gnuplottexextension{\gnuplotterminal}'}%
     \ifusesiunitx
         \ifthenelse{\equal{\extension}{\string tex}}{\usesiunitxingnuplot}{\PackageWarningNoLine{gnuplottex}{Axis numbers not written in \noexpand\num{}. Use a terminal that allows TeX output to enable this feature.}}
     \else
@@ -172,7 +174,7 @@
 \def\gnuplotterminaloptions{}%%
 \def\gnuplotscale{1}%%
 \setkeys{pic}{#1}%%
-    \xdef\gnuplotCutFile{\subfolder\figname.gnuplot}%%
+    \xdef\gnuplotCutFile{\subfolder/\figname.gnuplot}%%
     \gnuplotverbatimwrite{\gnuplotCutFile}}
     {\endgnuplotverbatimwrite%
     \gnuplotgraphicsprocess%
@@ -180,24 +182,24 @@
 \def\extension{\gnuplottexextension{\gnuplotterminal}}
 \long\gdef\gnuplotgraphicsprocess{%
 \ifShellEscape%
-\IfFileExists{\subfolder\figname.gnuplot}{%
+\IfFileExists{\subfolder/\figname.gnuplot}{%
                         \ifmiktex
-                            \immediate\write18{\gnuplotexe\space \subfolder\figname.gnuplot}%
+                            \immediate\write18{\gnuplotexe\space \subfolder/\figname.gnuplot}%
                         \else
-                            \immediate\write18{\gnuplotexe\space \subfolder\figname.gnuplot\space 2>>\jobname.gnuploterrors}%
+                            \immediate\write18{\gnuplotexe\space \subfolder/\figname.gnuplot\space 2>>\jobname.gnuploterrors}%
                         \fi%
-\IfFileExists{\subfolder\figname.\extension}{%
-\PackageInfo{gnuplottex}{\subfolder\figname.gnuplot converted}%
+\IfFileExists{\subfolder/\figname.\extension}{%
+\PackageInfo{gnuplottex}{\subfolder/\figname.gnuplot converted}%
                 \ifcleanup
                     \ifmiktex
-                        \immediate\write18{del "\subfolder\figname.gnuplot"}%
+                        \immediate\write18{del "\subfolder/\figname.gnuplot"}%
                     \else
-                        \immediate\write18{rm -f "\subfolder\figname.gnuplot"}%
+                        \immediate\write18{rm -f "\subfolder/\figname.gnuplot"}%
                     \fi%
                 \fi%
             }
 {\PackageWarningNoLine{gnuplottex}
-{Conversion of \subfolder\figname.gnuplot failed}}}{}%
+{Conversion of \subfolder/\figname.gnuplot failed}}}{}%
 \fi}
 \long\def\gnuploterrors at eatpar#1#2\@nil{\def\gnuploterrors@{#2}}
 \AtEndDocument{%
@@ -214,19 +216,19 @@
   \fi
 }
 \long\gdef\gnuplotgraphicsinclude{%
-\IfFileExists{\subfolder\figname.\extension}{%
+\IfFileExists{\subfolder/\figname.\extension}{%
 \ifthenelse{\equal{\extension}{\string tex}}
-{\scalebox{\gnuplotscale}{\input{\subfolder\figname.\extension}}}
-{\includegraphics[scale=\gnuplotscale]{\subfolder\figname.\extension}}
+{\scalebox{\gnuplotscale}{\input{\subfolder/\figname.\extension}}}
+{\includegraphics[scale=\gnuplotscale]{\subfolder/\figname.\extension}}
 }
 {\PackageWarningNoLine{gnuplottex}
-{Please convert \subfolder\figname.gnuplot manually}}
+{Please convert \subfolder/\figname.gnuplot manually}}
 }
 \newcommand{\gnuplotloadfilewrite}[2]{%
   \immediate\openout \verbatim at out #1%
   \message{Opening gnuplot stream #1}%
   \immediate\write\verbatim at out{\string set terminal \gnuplotterminal \gnuplotterminaloptions}%
-  \immediate\write\verbatim at out{\string set output '\subfolder\figname.\gnuplottexextension{\gnuplotterminal}'}%
+  \immediate\write\verbatim at out{\string set output '\subfolder/\figname.\gnuplottexextension{\gnuplotterminal}'}%
   \ifusesiunitx
     \ifthenelse{\equal{\extension}{\string tex}}{\usesiunitxingnuplot}{\PackageWarningNoLine{gnuplottex}{Axis numbers not written in \noexpand\num{}. Use a terminal that allows TeX output to enable this feature.}}
   \else
@@ -249,7 +251,7 @@
   \def\gnuplotterminaloptions{}
   \def\gnuplotscale{1}
   \setkeys{pic}{#1}
-  \xdef\gnuplotCutFile{\subfolder\figname.gnuplot}
+  \xdef\gnuplotCutFile{\subfolder/\figname.gnuplot}
   \gnuplotloadfilewrite{\gnuplotCutFile}{#2}
   \gnuplotgraphicsprocess%
   \gnuplotgraphicsinclude



More information about the tex-live-commits mailing list.