diff options
author | Karl Berry <karl@freefriends.org> | 2006-09-13 22:44:27 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2006-09-13 22:44:27 +0000 |
commit | 0aee9ae22923a72fc92c8f0837e6cb411764c14a (patch) | |
tree | 1e220bcd3e8edeacfd81e2065a01ad7e197a5601 | |
parent | 326a40829b63e3cc10425bbddec737d7191b1c62 (diff) |
test update from hans
git-svn-id: svn://tug.org/texlive/trunk@2123 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r-- | Master/texmf-dist/tex/context/base/supp-mpe.tex | 46 |
1 files changed, 42 insertions, 4 deletions
diff --git a/Master/texmf-dist/tex/context/base/supp-mpe.tex b/Master/texmf-dist/tex/context/base/supp-mpe.tex index da1641d3d3e..f1d54f7533d 100644 --- a/Master/texmf-dist/tex/context/base/supp-mpe.tex +++ b/Master/texmf-dist/tex/context/base/supp-mpe.tex @@ -38,7 +38,11 @@ %D \chardef\makeMPintoPDFobject\plusone %D \stoptyping -\writestatus{loading}{MetaPost Special Extensions} +\ifx\writestatus\undefined + \immediate\write16{[Loading MPS to PDF extensions.]} +\else + \writestatus{loading}{Context Support Macros / MPS extensions} +\fi %D We implement extensions by using the \METAPOST\ special %D mechanism. Opposite to \TEX's specials, the \METAPOST\ ones @@ -160,14 +164,31 @@ %D version and revision number are not used. Any version number %D greater than zero will enable special support. -\def\handleMPspecialscomment #1.#2 #3 % version.revision signal +\newconditional\manyMPspecials % \settrue\manyMPspecials + +\def\handleMPspecialscomment #1.#2 #3 % version.revision signal #4=div=1000|10000 {\doresetMPstack \chardef\MPspecialversion #1% \chardef\MPspecialrevision#2% \chardef\MPspecialsignal #3% \let\handleMPsequence\dohandleMPsequence + \ifnum#1=\plusone + \expandafter\handleMPsequence + \else + \expandafter\handleMPspecialscommentx + \fi} + +\def\handleMPspecialscommentx #1 % version 2 +% {\doifelsedoifelse{#1}{10000}{\settrue\manyMPspecials}{\setfalse\manyMPspecials}% local + {\ifnum10000=0#1\relax\settrue\manyMPspecials\else\setfalse\manyMPspecials\fi \handleMPsequence} +% one can say (in meta-ini): +% +% \prependtoks +% _special_div_ := 1000\ifconditional\manyMPspecials0\fi ; +% \to \MPextensions + %D In case of \PDF, we need to prepare resourcs. \newtoks\MPstartresources @@ -256,8 +277,20 @@ %D Now we can handle special color signals. We only do this %D when special are detected. -\def\MPrgbnumber#1{\expandafter\doMPrgbnumber#1000.0000\relax} -\def\doMPrgbnumber#1.#2#3#4#5\relax{#2#3#4} +% \def\MPrgbnumber#1{\expandafter\doMPrgbnumber#1000.0000\relax} +% \def\doMPrgbnumber#1.#2#3#4#5\relax{#2#3#4} + +%D We cannot use \type {\everyMPtoPDFconversion} because in \MPTOPDF\ +%D we don't have the \type {\appendtoks} macro available. + +\def\setMPextensions + {\ifconditional\manyMPspecials + \def\MPrgbnumber##1{\expandafter\doMPrgbnumber##10000.00000\relax}% + \def\doMPrgbnumber##1.##2##3##4##5##6\relax{##2##3##4##5}% + \else + \def\MPrgbnumber##1{\expandafter\doMPrgbnumber##1000.0000\relax}% + \def\doMPrgbnumber##1.##2##3##4##5\relax{##2##3##4}% + \fi} %D The naive case looks like: %D @@ -388,6 +421,11 @@ \ifnum\MPrgbnumber\lastMPgvalue>10 % really needed \scratchcounter\MPrgbnumber\lastMPbvalue \edef\currentMPspecial{\the\scratchcounter}% +\let\previousMPcolorspec\currentMPcolorspec +\edef\currentMPcolorspec{\lastMPrvalue\lastMPgvalue\lastMPbvalue}% +\ifx\previousMPcolorspec\currentMPcolorspec \else + \revokeMPtransparencyspecial +\fi \ifnum\finiMPpath=2 % to outer level \the\invokeMPspecials \fi |