diff options
author | Hans Hagen <pragma@wxs.nl> | 2001-07-02 00:00:00 +0200 |
---|---|---|
committer | Hans Hagen <pragma@wxs.nl> | 2001-07-02 00:00:00 +0200 |
commit | ab399f7f60b937f771dd33f9b826d83dab3e84e2 (patch) | |
tree | dfb3b001d6c0ee78967f6849168d41614b06fc2c /tex/context/base/meta-ini.tex | |
parent | 661f9f4a789474b20056f6bd4855c66d9791b301 (diff) | |
download | context-ab399f7f60b937f771dd33f9b826d83dab3e84e2.tar.gz |
stable 2001.07.02
Diffstat (limited to 'tex/context/base/meta-ini.tex')
-rw-r--r-- | tex/context/base/meta-ini.tex | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/tex/context/base/meta-ini.tex b/tex/context/base/meta-ini.tex index 3b7050659..d635571ee 100644 --- a/tex/context/base/meta-ini.tex +++ b/tex/context/base/meta-ini.tex @@ -79,6 +79,10 @@ graphictextdirective "\the\everyMPTEXgraphic" ; \to \MPinitializations +%D Some safeguards: + +\appendtoks \let\handlecompoundcharacter\string \to \everyMPgraphic + %D We save the number of graphics for the sake of \TEXEXEC. \newcounter\totalnumberofMPgraphics @@ -282,10 +286,12 @@ \def\doprepareMPvariable#1% {\doifelsenothing{\getvalue{#1}} {\setevalue{#1}{\MPcolor{black}}} - {\doifcolorelse{\getvalue{#1}} + {\edef\!!stringa{\getvalue{#1}}% + \convertcommand\!!stringa\to\ascii % otherwise problems + \doifcolorelse{\ascii} % with 2\bodyfontsize {\setevalue{#1}{\MPcolor{\getvalue{#1}}}} {\setbox\scratchbox=\hbox{\scratchdimen=\getvalue{#1}sp}% - \ifdim\wd\scratchbox=\!!zeropoint + \ifdim\wd\scratchbox=\zeropoint \scratchcounter=\getvalue{#1}\relax \setevalue{#1}{\the\scratchcounter}% \else @@ -329,7 +335,9 @@ %D The current data is loaded with: \def\getMPdata% - {\readlocfile{\MPdatafile}{}{}} + {\startreadingfile + \readlocfile{\MPdatafile}{}{}% + \stopreadingfile} %D When we collect graphics in one file, we run into %D troubles, since \METAPOST\ has a built in limit (of 4) @@ -339,7 +347,9 @@ \def\getMPdata% {\long\def\MPdata##1##2% {\ifnum##1=\currentMPgraphic\relax##2\fi}% - \readlocfile{\MPgraphicfile.mpd}{}{}} + \startreadingfile + \readlocfile{\MPgraphicfile.mpd}{}{}% + \stopreadingfile} %D We have to enable this mechanism with: @@ -385,7 +395,9 @@ {\dodoubleempty\dostartMPenvironment} % that reset gives \emptytoks \long\def\dostartMPenvironment[#1][#2]#3\stopMPenvironment% - {\doif{#1}{\s!reset}{\resetMPenvironment}% + {\doif{#1}{\s!reset}{\resetMPenvironment}% % reset mp toks + \doif{#1}{\v!globaal}{#3}% % use in main doc too + \doif{#1}{+}{#3}% % use in main doc too \convertargument#3\to\ascii \expandafter\appendtoks\ascii\to\everyMPTEXgraphic} |