diff options
author | Karl Berry <karl@freefriends.org> | 2009-07-22 23:02:49 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2009-07-22 23:02:49 +0000 |
commit | 0be7d5d4c839c50c5b763ca5a743baa52595dc85 (patch) | |
tree | 932f3f3aecaf3b34d436f05c27e954fd3bc3e469 /Master/texmf-dist/tex | |
parent | 9af78fae3ed027b3cf0b82775cb6ddda20b6400e (diff) |
context-gnuplot update (22jul09)
git-svn-id: svn://tug.org/texlive/trunk@14379 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r-- | Master/texmf-dist/tex/context/third/gnuplot/t-gnuplot.tex | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/Master/texmf-dist/tex/context/third/gnuplot/t-gnuplot.tex b/Master/texmf-dist/tex/context/third/gnuplot/t-gnuplot.tex index adf4701c51e..2d345188824 100644 --- a/Master/texmf-dist/tex/context/third/gnuplot/t-gnuplot.tex +++ b/Master/texmf-dist/tex/context/third/gnuplot/t-gnuplot.tex @@ -448,7 +448,7 @@ % \dodouseGNUPLOTgraphic[name][numbers][options] \def\dodouseGNUPLOTgraphic[#1][#2][#3]% {\bgroup - \doifdefined{gps:n:#1} + \doifdefinedelse{gps:n:#1} {\edef\GNUPLOTnumber{\getvalue{gps:n:#1}}% \edef\GNUPLOTfile {\bufferprefix gnuplot-\GNUPLOTnumber}% \writeandprocessGNUPLOTscript{#1}% @@ -491,6 +491,27 @@ }% }% }% + % else part - in case that graphic gets included with \processGNUPLOTfile[name][file] + {\doifelse{\@@GNUPLOTterminal}{context} + % TODO: this part has been literally copied from above; create a subroutine instead + {\doifelse{#2}{}% + % if no explicit figure number was specified, include all the figures + {\doloop + {\doifMPgraphicelse{gpg:#1:\recurselevel}% + {\scale[#3]{\reuseMPgraphic{gpg:#1:\recurselevel}}}% + {\exitloop}}}% + % if numbers were specified, include the figures specified in the list only + {\begingroup + \def\useGNUPLOTgraphicN##1{\doifMPgraphicelse + {gpg:#1:##1}% + {\scale[#3]{\reuseMPgraphic{gpg:#1:##1}}}% + % if graphic doesn't exist: draw a dummy frame instead and warn the user + {\scale[#3]{\framed[frame=on,width=5in,height=3in,align={middle,lohi}]{GNUPLOT graphic #1, Nr. ##1 doesn't exist}}}}% + \processcommalist[#2]\useGNUPLOTgraphicN + \endgroup + }% + }% + {\message{The gnuplot graphic #1 has not been defined.}}}% \egroup} %D \macros @@ -619,6 +640,11 @@ \long\def\dostartGNUPLOTpage#1\stopGNUPLOTpage {\endgroup\startMPpage#1\stopMPpage} +% TODO: use a separate instance for MKIV +% +% \defineMPinstance[gnuplot] +% \startTEXpage\startMPcode{gnuplot} +% \stopMPcode\stopTEXpage % TODO: currently, the following definitions are used, % but the ones below would be preferred |