summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Master/texmf-dist/tex/context/base/m-gnuplot.tex159
-rw-r--r--Master/texmf-dist/tex/context/config/cont-fmt.tex29
2 files changed, 29 insertions, 159 deletions
diff --git a/Master/texmf-dist/tex/context/base/m-gnuplot.tex b/Master/texmf-dist/tex/context/base/m-gnuplot.tex
deleted file mode 100644
index 5e612257f7f..00000000000
--- a/Master/texmf-dist/tex/context/base/m-gnuplot.tex
+++ /dev/null
@@ -1,159 +0,0 @@
-%D \module
-%D [ file=m-gnuplot,
-%D version=2006.01.04,
-%D title=\CONTEXT\ Extra Modules,
-%D subtitle=\GNUPLOT\ Inclusion,
-%D author={Tobias Burnus, Hans Hagen, Taco Hoekwater, Mojca Miklavec},
-%D date=\currentdate,
-%D copyright=\PRAGMA]
-%C
-%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
-%C details.
-
-% todo: reuse (only if really needed)
-
-% \enablemode[demo]
-
-%D example:
-%D
-%D \starttyping
-%D texexec --pdf --mode=demo m-gnuplot
-%D \stoptyping
-
-\unprotect
-
-\ifx\operatingsystem\undefined \def\operatingsystem{unix} \fi % texexec will set that
-
-\newcounter\GNUPLOTnumber
-
-\def\startGNUPLOTinclusions
- {\bgroup
- \obeylines
- \catcode`\%=\@@letter
- \dostartGNUPLOTinclusions}
-
-\def\dostartGNUPLOTinclusions#1\stopGNUPLOTinclusions
- {\gdef\GNUPLOTinclusions{#1}%
- \egroup}
-
-\let\GNUPLOTinclusions\empty
-
-\def\startGNUPLOTgraphic#1%
- {\bgroup
- \obeylines
- \catcode`\%=\@@letter
- \dostartGNUPLOTgraphic{#1}}
-
-\def\dostartGNUPLOTgraphic#1#2\stopGNUPLOTgraphic
- {\doglobal\increment\GNUPLOTnumber
- \letgvalue{gpg:n:#1}\GNUPLOTnumber
- \setgvalue{gpg:d:\GNUPLOTnumber}{#2}%
- \egroup}
-
-\def\useGNUPLOTgraphic
- {\dodoubleempty\douseGNUPLOTgraphic}
-
-\def\douseGNUPLOTgraphic[#1][#2]%
- {\iffirstargument
- \@EA\dodouseGNUPLOTgraphic % like \externalfigure[name][optional args]
- \else
- \@EA\redouseGNUPLOTgraphic % like \useMPgraphic{name}
- \fi[#1][#2]}
-
-\def\redouseGNUPLOTgraphic[#1][#2]#3%
- {\dodouseGNUPLOTgraphic[#3][]}
-
-\newtoks\everyGNUPLOTgraphic
-
-% gnuplot only seems to handle lf so we cannot use \mappartolineend
-% also, in order to prevent fuzzy runs (or no runs) we add a ; to
-% each line
-
-\appendtoks
- \obeylines
- \def\obeyedline{;\outputnewlinechar}%
-\to \everyGNUPLOTgraphic
-
-\appendtoks
- \let\%\letterpercent
- \def\ {\letterbackslash\outputnewlinechar}%
-\to \everyGNUPLOTgraphic
-
-\def\dodouseGNUPLOTgraphic[#1][#2]%
- {\bgroup
- \doifdefined{gpg:n:#1}
- {\edef\GNUPLOTnumber{\getvalue{gpg:n:#1}}%
- \edef\GNUPLOTfile {\bufferprefix gnuplot-\GNUPLOTnumber}%
- \bgroup
- \the\everyGNUPLOTgraphic
- \immediate\openout\scratchwrite=\GNUPLOTfile.gpd
- \immediate\write\scratchwrite{set terminal \@@GNUPLOToutput\space\@@GNUPLOToption}%
- \doifnotempty
- {\GNUPLOTinclusions}{\immediate\write\scratchwrite{\GNUPLOTinclusions}}%
- \immediate\write\scratchwrite{set output "\GNUPLOTfile.\@@GNUPLOTsuffix"}%
- \immediate\write\scratchwrite{\getvalue{gpg:d:\GNUPLOTnumber}}%
- \immediate\write\scratchwrite{quit}%
- \immediate\closeout\scratchwrite
- \egroup
- \processGNUPLOTgraphic
- \convertGNUPLOTgraphic
- \externalfigure[\@@GNUPLOTresult][#2]}%
- \egroup}
-
-% we assume pdf inclusion, eps wil be implemented when applicable
-
-\def\setupGNUPLOT
- {\dodoubleempty\getparameters[@@GNUPLOT]}
-
-\def\processGNUPLOTgraphic
- {\doifelse\operatingsystem{mswin}
- {\executesystemcommand{start /MIN pgnuplot \GNUPLOTfile.gpd}} % start is needed else gp fails
- {\executesystemcommand{gnuplot \GNUPLOTfile.gpd}}}
-
-\def\convertGNUPLOTgraphic
- {\doifsomething\@@GNUPLOThandle{\executesystemcommand{\@@GNUPLOThandle}}}
-
-\def\defineGNUPLOThandle#1#2#3#4#5% name output suffix conversion-method result
- {\setvalue{@@GNUPLOT-#1}{{#2}{#3}{#4}{#5}}}
-
-\def\@@GNUPLOToutput{\filterfromvalue{@@GNUPLOT-\@@GNUPLOTmethod}41}
-\def\@@GNUPLOTsuffix{\filterfromvalue{@@GNUPLOT-\@@GNUPLOTmethod}42}
-\def\@@GNUPLOThandle{\filterfromvalue{@@GNUPLOT-\@@GNUPLOTmethod}43}
-\def\@@GNUPLOTresult{\filterfromvalue{@@GNUPLOT-\@@GNUPLOTmethod}44}
-
-\defineGNUPLOThandle{postscript}{postscript}{ps} {texmfstart newpstopdf --method=raw \GNUPLOTfile.ps}{\GNUPLOTfile.pdf}
-\defineGNUPLOThandle{ps} {postscript}{ps} {texmfstart newpstopdf --method=raw \GNUPLOTfile.ps}{\GNUPLOTfile.pdf}
-\defineGNUPLOThandle{pdf} {pdf} {pdf}{} {\GNUPLOTfile.pdf}
-\defineGNUPLOThandle{metapost} {mp} {mp} {texmfstart mptopdf \GNUPLOTfile.mp} {\GNUPLOTfile-0.pdf}
-\defineGNUPLOThandle{mp} {mp} {mp} {texmfstart mptopdf \GNUPLOTfile.mp} {\GNUPLOTfile-0.pdf}
-\defineGNUPLOThandle{png} {png} {png}{} {\GNUPLOTfile.png}
-
-\setupGNUPLOT[\c!method=ps,\c!option=]
-
-\protect \doifnotmode{demo}{\endinput}
-
-\starttext
-
-\startGNUPLOTinclusions
- set title "trigonometry"
-\stopGNUPLOTinclusions
-
-\startGNUPLOTgraphic{sin}
- plot sin(x)
-\stopGNUPLOTgraphic
-
-\startGNUPLOTgraphic{cos}
- plot cos(x)
-\stopGNUPLOTgraphic
-
-\useGNUPLOTgraphic{sin} \endgraf
-\useGNUPLOTgraphic{cos} \endgraf
-\useGNUPLOTgraphic[cos] \endgraf
-
-\setupGNUPLOT[method=ps] \useGNUPLOTgraphic[sin][object=no,height=2cm] \blank
-%setupGNUPLOT[method=pdf] \useGNUPLOTgraphic[sin][object=no,height=2cm] \blank
-\setupGNUPLOT[method=png] \useGNUPLOTgraphic[sin][object=no,height=2cm] \blank
-\setupGNUPLOT[method=mp] \useGNUPLOTgraphic[sin][object=no,height=2cm,option=color] \blank
-
-\stoptext
diff --git a/Master/texmf-dist/tex/context/config/cont-fmt.tex b/Master/texmf-dist/tex/context/config/cont-fmt.tex
new file mode 100644
index 00000000000..855d83c2451
--- /dev/null
+++ b/Master/texmf-dist/tex/context/config/cont-fmt.tex
@@ -0,0 +1,29 @@
+%D \module
+%D [ file=cont-fmt,
+%D version=2007.01.23,
+%D title=\CONTEXT\ Format options,
+%D author=Taco Hoekwater,
+%D date=\currentdate,
+%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+%D Normally, \CONTEXT\ users run
+%D \starttyping
+%D texexec --make
+%D \stoptyping
+%D to generate the \CONTEXT\ formats. \TEXEXEC\ writes a local
+%D \type{cont-fmt.tex} with the additional command||line options.
+
+%D But in \TeX Live, \type{fmtutil} is used instead, so a the
+%D separate file is needed. Because of the location of this file
+%D in the TDS tree, it will not conflict with the file created
+%D by \TEXEXEC.
+
+\writestatus{loading}{Pattern loading for TeXLive}
+
+\preloadallpatterns
+
+\endinput