diff options
author | Karl Berry <karl@freefriends.org> | 2020-04-12 22:31:14 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2020-04-12 22:31:14 +0000 |
commit | cccfc34acdcf78c43f347ada30968db554b62137 (patch) | |
tree | e490dcf13fe3b50e09b26fcea3b902752e14702a /Master/texmf-dist | |
parent | a5cafa2e169673754d52e2d03e2746fb8684968f (diff) |
gnuplottex
git-svn-id: svn://tug.org/texlive/trunk@54711 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r-- | Master/texmf-dist/doc/latex/gnuplottex/example-pdf.tex | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/gnuplottex/gnuplottex.pdf | bin | 416124 -> 418750 bytes | |||
-rw-r--r-- | Master/texmf-dist/source/latex/gnuplottex/gnuplottex.dtx | 87 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/gnuplottex/gnuplottex.sty | 80 |
4 files changed, 87 insertions, 82 deletions
diff --git a/Master/texmf-dist/doc/latex/gnuplottex/example-pdf.tex b/Master/texmf-dist/doc/latex/gnuplottex/example-pdf.tex index 6ed7eccb8e8..02287b03b2d 100644 --- a/Master/texmf-dist/doc/latex/gnuplottex/example-pdf.tex +++ b/Master/texmf-dist/doc/latex/gnuplottex/example-pdf.tex @@ -1,6 +1,6 @@ \documentclass[a4paper]{article} -\usepackage{gnuplottex} +\usepackage[subfolder]{gnuplottex} \begin{document} diff --git a/Master/texmf-dist/doc/latex/gnuplottex/gnuplottex.pdf b/Master/texmf-dist/doc/latex/gnuplottex/gnuplottex.pdf Binary files differindex 2d6beeb2215..73f66927faa 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 8cb288f83dd..35d3da96e28 100644 --- a/Master/texmf-dist/source/latex/gnuplottex/gnuplottex.dtx +++ b/Master/texmf-dist/source/latex/gnuplottex/gnuplottex.dtx @@ -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@out{\string set terminal \gnuplotterminal \gnuplotterminaloptions}% - \immediate\write\verbatim@out{\string set output '\subfolder\figname.\gnuplottexextension{\gnuplotterminal}'}% + \immediate\write\verbatim@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@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@out #1% \message{Opening gnuplot stream #1}% \immediate\write\verbatim@out{\string set terminal \gnuplotterminal \gnuplotterminaloptions}% - \immediate\write\verbatim@out{\string set output '\subfolder\figname.\gnuplottexextension{\gnuplotterminal}'}% + \immediate\write\verbatim@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 diff --git a/Master/texmf-dist/tex/latex/gnuplottex/gnuplottex.sty b/Master/texmf-dist/tex/latex/gnuplottex/gnuplottex.sty index aa89d55390a..0acabce327f 100644 --- a/Master/texmf-dist/tex/latex/gnuplottex/gnuplottex.sty +++ b/Master/texmf-dist/tex/latex/gnuplottex/gnuplottex.sty @@ -20,7 +20,7 @@ %% %% Antoine Chambert-Loir %% <chambert@math.polytechnique.fr> -%% http://www.math.polytechnique.fr/\protect \unhbox \voidb@x \penalty \@M \ {}chambert +%% http://www.math.polytechnique.fr/\protect \unhbox \voidb@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@out{\string set terminal \gnuplotterminal \gnuplotterminaloptions}% -\immediate\write\verbatim@out{\string set output '\subfolder\figname.\gnuplottexextension{\gnuplotterminal}'}% +\immediate\write\verbatim@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@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@out #1% \message{Opening gnuplot stream #1}% \immediate\write\verbatim@out{\string set terminal \gnuplotterminal \gnuplotterminaloptions}% - \immediate\write\verbatim@out{\string set output '\subfolder\figname.\gnuplottexextension{\gnuplotterminal}'}% + \immediate\write\verbatim@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 |