diff options
author | Hans Hagen <pragma@wxs.nl> | 2012-05-05 13:20:00 +0200 |
---|---|---|
committer | Hans Hagen <pragma@wxs.nl> | 2012-05-05 13:20:00 +0200 |
commit | 6edcfc834f2d62a9eac0fbfde575dee821facef5 (patch) | |
tree | 242854fda8856e380156ea0e2824c287a8581953 /tex | |
parent | 3e0a49fa480ce962beb49ca9f4741ee97bebc176 (diff) | |
download | context-6edcfc834f2d62a9eac0fbfde575dee821facef5.tar.gz |
beta 2012.05.05 13:20
Diffstat (limited to 'tex')
-rw-r--r-- | tex/context/base/cont-new.mkii | 2 | ||||
-rw-r--r-- | tex/context/base/cont-new.mkiv | 2 | ||||
-rw-r--r-- | tex/context/base/context-version.pdf | bin | 4067 -> 4065 bytes | |||
-rw-r--r-- | tex/context/base/context-version.png | bin | 105270 -> 105265 bytes | |||
-rw-r--r-- | tex/context/base/context.mkii | 2 | ||||
-rw-r--r-- | tex/context/base/context.mkiv | 2 | ||||
-rw-r--r-- | tex/context/base/meta-ini.mkiv | 127 | ||||
-rw-r--r-- | tex/context/base/mlib-pdf.mkiv | 4 | ||||
-rw-r--r-- | tex/context/base/mlib-pps.mkiv | 33 | ||||
-rw-r--r-- | tex/context/base/mult-sys.mkiv | 1 | ||||
-rw-r--r-- | tex/context/base/pack-rul.mkiv | 2 | ||||
-rw-r--r-- | tex/context/base/status-files.pdf | bin | 24314 -> 24310 bytes | |||
-rw-r--r-- | tex/context/base/status-lua.pdf | bin | 173203 -> 173198 bytes | |||
-rw-r--r-- | tex/generic/context/luatex/luatex-fonts-merged.lua | 2 |
14 files changed, 113 insertions, 64 deletions
diff --git a/tex/context/base/cont-new.mkii b/tex/context/base/cont-new.mkii index 3d8d8afb8..0465870a8 100644 --- a/tex/context/base/cont-new.mkii +++ b/tex/context/base/cont-new.mkii @@ -11,7 +11,7 @@ %C therefore copyrighted by \PRAGMA. See mreadme.pdf for %C details. -\newcontextversion{2012.05.05 10:42} +\newcontextversion{2012.05.05 13:20} %D This file is loaded at runtime, thereby providing an %D excellent place for hacks, patches, extensions and new diff --git a/tex/context/base/cont-new.mkiv b/tex/context/base/cont-new.mkiv index 82330e215..f77ac2a53 100644 --- a/tex/context/base/cont-new.mkiv +++ b/tex/context/base/cont-new.mkiv @@ -11,7 +11,7 @@ %C therefore copyrighted by \PRAGMA. See mreadme.pdf for %C details. -\newcontextversion{2012.05.05 10:42} +\newcontextversion{2012.05.05 13:20} %D This file is loaded at runtime, thereby providing an %D excellent place for hacks, patches, extensions and new diff --git a/tex/context/base/context-version.pdf b/tex/context/base/context-version.pdf Binary files differindex 00c2e5f71..325c833fd 100644 --- a/tex/context/base/context-version.pdf +++ b/tex/context/base/context-version.pdf diff --git a/tex/context/base/context-version.png b/tex/context/base/context-version.png Binary files differindex 0e5e80ed8..46f1d7e81 100644 --- a/tex/context/base/context-version.png +++ b/tex/context/base/context-version.png diff --git a/tex/context/base/context.mkii b/tex/context/base/context.mkii index 40f1e299a..ba093fdc7 100644 --- a/tex/context/base/context.mkii +++ b/tex/context/base/context.mkii @@ -20,7 +20,7 @@ %D your styles an modules. \edef\contextformat {\jobname} -\edef\contextversion{2012.05.05 10:42} +\edef\contextversion{2012.05.05 13:20} %D For those who want to use this: diff --git a/tex/context/base/context.mkiv b/tex/context/base/context.mkiv index 64af2d758..5f858c499 100644 --- a/tex/context/base/context.mkiv +++ b/tex/context/base/context.mkiv @@ -23,7 +23,7 @@ %D up and the dependencies are more consistent. \edef\contextformat {\jobname} -\edef\contextversion{2012.05.05 10:42} +\edef\contextversion{2012.05.05 13:20} %D For those who want to use this: diff --git a/tex/context/base/meta-ini.mkiv b/tex/context/base/meta-ini.mkiv index 41f697cc8..d214a98a9 100644 --- a/tex/context/base/meta-ini.mkiv +++ b/tex/context/base/meta-ini.mkiv @@ -27,11 +27,12 @@ \restoreendofline % see interferences-001.tex \to \everyMPgraphic -\def\MPruntimefile {mprun} -\def\currentMPformat {metafun} -\def\defaultMPgraphicinstance{metafun} +\def\MPruntimefile {mprun} +\def\currentMPformat {metafun} +\def\defaultMPinstance{metafun} %installcorenamespace{graphicvariable} % todo +\installcorenamespace{mpinstance} \installcorenamespace{mpinstancetokens} \installcorenamespace{mpgraphic} \installcorenamespace{mpstaticgraphic} @@ -45,9 +46,9 @@ {\dosinglegroupempty\meta_start_definitions} \def\meta_start_definitions#1#2\stopMPdefinitions - {\edef\currentMPgraphicinstance{#1}% - \ifx\currentMPgraphicinstance\empty - \let\currentMPgraphicinstance\defaultMPgraphicinstance + {\edef\currentMPinstance{#1}% + \ifx\currentMPinstance\empty + \let\currentMPinstance\defaultMPinstance \fi \global\t_meta_instance\expandafter{\the\t_meta_instance#2}} @@ -92,15 +93,31 @@ \edef\currentwidth {\the\hsize \space}% \edef\currentheight {\the\vsize \space}} -\def\t_meta_instance{\csname\??mpinstancetokens\currentMPgraphicinstance\endcsname} % token register +\def\t_meta_instance{\csname\??mpinstancetokens\currentMPinstance\endcsname} % token register -\unexpanded\def\defineMPinstance - {\dodoubleargument\meta_define_instance} +\installcommandhandler \??mpinstance {MPinstance} \??mpinstance -\def\meta_define_instance[#1][#2]% - {\ifcsname\??mpinstancetokens#1\endcsname\else\expandafter\newtoks\csname\??mpinstancetokens#1\endcsname\fi - \t_meta_instance\emptytoks % in case we redefine - \getparameters[\??gi#1][\s!format=mpost,\s!extensions=\v!no,\s!initializations=\v!no,#2]} +\setupMPinstance + [\s!format=metafun, + \s!extensions=\v!no, + \s!initializations=\v!no, + \c!textstyle=, + \c!textcolor=] + +% \unexpanded\def\defineMPinstance +% {\dodoubleargument\meta_define_instance} + +% \def\meta_define_instance[#1][#2]% +% {\ifcsname\??mpinstancetokens#1\endcsname\else\expandafter\newtoks\csname\??mpinstancetokens#1\endcsname\fi +% \t_meta_instance\emptytoks % in case we redefine +% \getparameters[\??mpinstance#1][\s!format=mpost,\s!extensions=\v!no,\s!initializations=\v!no,#2]} + +\appendtoks + \ifcsname\??mpinstancetokens\currentMPinstance\endcsname \else + \expandafter\newtoks\csname\??mpinstancetokens\currentMPinstance\endcsname + \fi + \t_meta_instance\emptytoks % in case we redefine +\to \everydefineMPinstance \unexpanded\def\resetMPinstance[#1]% {\writestatus\m!metapost{reset will be implemented when needed}} @@ -112,19 +129,14 @@ {\edef\currentMPgraphicname{#2}% \ifx\currentMPgraphicname\empty \edef\currentMPgraphicname{#1}% - \let\currentMPgraphicinstance\defaultMPgraphicinstance + \let\currentMPinstance\defaultMPinstance \else - \edef\currentMPgraphicinstance{#1}% + \edef\currentMPinstance{#1}% \fi - \edef\currentMPgraphicformat - {\ifcsname\??gi\currentMPgraphicinstance\s!format\endcsname - \csname\??gi\currentMPgraphicinstance\s!format\endcsname - \else - \defaultMPgraphicinstance - \fi}} + \edef\currentMPformat{\MPinstanceparameter\s!format}} -\def\currentMPgraphicinstance{\defaultMPgraphicinstance} -\def\currentMPgraphicformat {\currentMPgraphicinstance} +\def\currentMPinstance{\defaultMPinstance} +\def\currentMPformat {\currentMPinstance} \defineMPinstance[metafun] [\s!format=metafun,\s!extensions=\v!yes,\s!initializations=\v!yes] \defineMPinstance[extrafun][\s!format=metafun,\s!extensions=\v!yes,\s!initializations=\v!yes] @@ -157,13 +169,24 @@ \meta_preset_definitions \setMPrandomseed % this has to change % we need to preexpand the token lists - \doifelsevalue{\??gi\currentMPgraphicinstance\s!extensions}\v!yes - {\settrue \c_meta_include_extensions - \letgvalue{\??gi\currentMPgraphicinstance\s!extensions}\v!no} - {\setfalse\c_meta_include_extensions}% - \doifelsevalue{\??gi\currentMPgraphicinstance\s!initializations}\v!yes - {\settrue \c_meta_include_initializations}% - {\setfalse\c_meta_include_initializations}} + \edef\p_extensions{\MPinstanceparameter\s!extensions}% + \ifx\p_extensions\v!yes + \settrue \c_meta_include_extensions + \global\letMPinstanceparameter\s!extensions\v!no % needs checking + \else + \setfalse\c_meta_include_extensions + \fi + \edef\p_initializations{\MPinstanceparameter\s!initializations}% + \ifx\p_initializations\v!yes + \settrue \c_meta_include_initializations + \else + \setfalse\c_meta_include_initializations + \fi + \edef\p_setups{\MPinstanceparameter\c!setups}% + \ifx\p_setups\empty \else + \setups[\p_setups]% + \fi + \useMPinstancestyleandcolor\c!textstyle\c!textcolor} \def\meta_stop_current_graphic {\global\t_meta_instance\emptytoks @@ -174,8 +197,8 @@ \forgetall \setbox\b_meta_graphic\hbox\bgroup % ; added 20100901 (as in mkii) \normalexpanded{\noexpand\ctxlua{metapost.graphic( - "\currentMPgraphicinstance", - "\currentMPgraphicformat", + "\currentMPinstance", + "\currentMPformat", \!!bs#1;\!!es, \!!bs\meta_flush_current_initializations;\!!es, \!!bs\meta_flush_current_preamble;\!!es, @@ -264,8 +287,8 @@ \ifcsname\??mpclip#1\endcsname \meta_start_current_graphic \xdef\MPclippath{\normalexpanded{\noexpand\ctxlua{metapost.theclippath( - "\currentMPgraphicinstance", - "\currentMPgraphicformat", + "\currentMPinstance", + "\currentMPformat", \!!bs\getvalue{\??mpclip#1}\!!es, \!!bs\meta_flush_current_initializations\!!es, \!!bs\meta_flush_current_preamble\!!es @@ -682,19 +705,36 @@ %D In order to synchronize the main \TEX\ run and the runs %D local to \METAPOST, environments can be passed. -\unexpanded\def\startMPenvironment % second arg gobbles spaces, so that reset gives \emptytoks - {\dodoubleempty\dostartMPenvironment} +% \unexpanded\def\startMPenvironment % second arg gobbles spaces, so that reset gives \emptytoks +% {\dodoubleempty\dostartMPenvironment} + +% \def\dostartMPenvironment[#1][#2]#3\stopMPenvironment +% {\edef\m_meta_option{#1} +% \ifx\m_meta_option\s!reset +% \resetMPenvironment % reset mp toks +% \else\ifx\m_meta_option\v!global +% #3% % use in main doc too +% \else\ifx\m_meta_option\!!plustoken +% #3% % use in main doc too +% \fi\fi\fi +% \ctxlua{metapost.tex.set(\!!bs\detokenize{#3}\!!es)}} + +\unexpanded\def\startMPenvironment + {\begingroup + \catcode\endoflineasciicode \ignorecatcode + \dosingleempty\dostartMPenvironment} -\def\dostartMPenvironment[#1][#2]#3\stopMPenvironment - {\edef\m_meta_option{#1} +\def\dostartMPenvironment[#1]#2\stopMPenvironment + {\endgroup + \edef\m_meta_option{#1} \ifx\m_meta_option\s!reset \resetMPenvironment % reset mp toks \else\ifx\m_meta_option\v!global - #3% % use in main doc too + #2% % use in main doc too \else\ifx\m_meta_option\!!plustoken - #3% % use in main doc too + #2% % use in main doc too \fi\fi\fi - \ctxlua{metapost.tex.set(\!!bs\detokenize{#3}\!!es)}} + \ctxlua{metapost.tex.set(\!!bs\detokenize{#2}\!!es)}} \let\stopMPenvironment\relax @@ -736,7 +776,8 @@ \meta_end_graphic_group} \def\meta_start_code_standard#1#2\stopMPcode - {\meta_process_graphic{#2}} + {\let\currentMPinstance\defaultMPinstance + \meta_process_graphic{#2}} \let\stopMPcode\relax @@ -766,7 +807,7 @@ % \startMPrun{mprun} input mp-www.mp ; \stopMPrun % instance % \externalfigure[mprun.4][width=10cm,height=8cm] -\let\MPruninstance\defaultMPgraphicinstance +\let\MPruninstance\defaultMPinstance \unexpanded\def\useMPrun#1#2% name n {\begingroup diff --git a/tex/context/base/mlib-pdf.mkiv b/tex/context/base/mlib-pdf.mkiv index a049f302d..b9871eead 100644 --- a/tex/context/base/mlib-pdf.mkiv +++ b/tex/context/base/mlib-pdf.mkiv @@ -139,8 +139,8 @@ \meta_start_current_graphic \forgetall \normalexpanded{\noexpand\ctxlua{metapost.graphic( - "\currentMPgraphicinstance", - "\currentMPgraphicformat", + "\currentMPinstance", + "\currentMPformat", \!!bs#2;\!!es, \!!bs\meta_flush_current_initializations;\!!es, \!!bs\meta_flush_current_preamble;\!!es, diff --git a/tex/context/base/mlib-pps.mkiv b/tex/context/base/mlib-pps.mkiv index 950d1be57..4a6b89909 100644 --- a/tex/context/base/mlib-pps.mkiv +++ b/tex/context/base/mlib-pps.mkiv @@ -31,20 +31,30 @@ % of interference with the page builder. \newbox \MPtextbox -\newtoks\everyMPLIBsettext +\newtoks\everyMPLIBsettext % not used -\def\MPLIBfigure#1#2% - {\setbox\scratchbox\hbox{\externalfigure[#1][\c!mask=#2]}% - \ctxlua{metapost.edefsxsy(\number\wd\scratchbox,\number\ht\scratchbox,0)}% - \vbox to \zeropoint{\vss\hbox to \zeropoint{\scale[\c!sx=\sx,\c!sy=\sy]{\box\scratchbox}\hss}}} +\newconditional\MPLIBtextgetdone + +% \def\MPLIBsettext#1% #2% +% {\dowithnextbox{\ctxlua{metapost.settext(\number\nextbox,#1)}}\hbox} \def\MPLIBsettext#1% #2% - {\dowithnextbox{\ctxlua{metapost.settext(\number\nextbox,#1)}}\hbox} + {\ifconditional\MPLIBtextgetdone + \else + \cldcontext{metapost.tex.get()}% MPenvironments are depricated + \settrue\MPLIBtextgetdone % no \global needed + \fi + \dowithnextbox{\ctxlua{metapost.settext(\number\nextbox,#1)}}\hbox} \def\MPLIBgettextscaled#1#2#3% why a copy .. can be used more often {\ctxlua{metapost.gettext(\number\MPtextbox,#1)}% \vbox to \zeropoint{\vss\hbox to \zeropoint{\scale[\c!sx=#2,\c!sy=#3]{\raise\dp\MPtextbox\box\MPtextbox}\forcecolorhack\hss}}} +\def\MPLIBfigure#1#2% + {\setbox\scratchbox\hbox{\externalfigure[#1][\c!mask=#2]}% + \ctxlua{metapost.edefsxsy(\number\wd\scratchbox,\number\ht\scratchbox,0)}% + \vbox to \zeropoint{\vss\hbox to \zeropoint{\scale[\c!sx=\sx,\c!sy=\sy]{\box\scratchbox}\hss}}} + % horrible: \def\MPLIBgettextscaledcm#1#2#3#4#5#6#7#8#9% 2-7: sx,rx,ry,sy,tx,ty @@ -103,16 +113,15 @@ \def\MPLIBextrapass#1% {\ctxlua{metapost.graphic_extra_pass("#1")}} +% \def\MPLIBresettexts +% {\ctxlua{metapost.resettextexts()}} + \def\MPLIBresettexts - {\ctxlua{metapost.resettextexts()}} + {\ctxlua{metapost.resettextexts()}%$ + \setfalse\MPLIBtextgetdone} %D Experiment -\let\MPLIBstartgroup\gobblefivearguments -\let\MPLIBstopgroup \relax - -%D Also experimental: - \def\doMPLIBstopgroup#1#2#3#4#5#6% some day this might happen elsewhere {\egroup \wd\scratchbox \dimexpr#5\onebasepoint-#3\onebasepoint\relax diff --git a/tex/context/base/mult-sys.mkiv b/tex/context/base/mult-sys.mkiv index da1109aef..bf40fa8c1 100644 --- a/tex/context/base/mult-sys.mkiv +++ b/tex/context/base/mult-sys.mkiv @@ -484,7 +484,6 @@ \definesystemvariable {fw} % simpleFonts by Wolfgang \definesystemvariable {fx} % FoXet \definesystemvariable {gb} % Graphic Bitmaps -\definesystemvariable {gi} % Graphic Instance \definesystemvariable {gv} % Graphic Variable \definesystemvariable {ha} % HAng \definesystemvariable {id} % Index diff --git a/tex/context/base/pack-rul.mkiv b/tex/context/base/pack-rul.mkiv index e6dfa8d5f..73c1be29f 100644 --- a/tex/context/base/pack-rul.mkiv +++ b/tex/context/base/pack-rul.mkiv @@ -1881,7 +1881,7 @@ \def\pack_framed_do_setups {\ifx\p_framed_setups\empty \else - \setups[\p_framed_setups]% + \setups[\p_framed_setups]% \texsetup \fi} \def\pack_framed_format_format_yes diff --git a/tex/context/base/status-files.pdf b/tex/context/base/status-files.pdf Binary files differindex bd91c6c66..4bae51be9 100644 --- a/tex/context/base/status-files.pdf +++ b/tex/context/base/status-files.pdf diff --git a/tex/context/base/status-lua.pdf b/tex/context/base/status-lua.pdf Binary files differindex 6772415d6..9b404f7d2 100644 --- a/tex/context/base/status-lua.pdf +++ b/tex/context/base/status-lua.pdf diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua index 828b89dc3..89fa50f3f 100644 --- a/tex/generic/context/luatex/luatex-fonts-merged.lua +++ b/tex/generic/context/luatex/luatex-fonts-merged.lua @@ -1,6 +1,6 @@ -- merged file : luatex-fonts-merged.lua -- parent file : luatex-fonts.lua --- merge date : 05/05/12 10:42:56 +-- merge date : 05/05/12 13:20:11 do -- begin closure to overcome local limits and interference |