From 9a0fefc34640abc1f6a5c34d89a3ce5ec96ae882 Mon Sep 17 00:00:00 2001 From: Hans Hagen Date: Sat, 25 Mar 2006 13:21:00 +0100 Subject: stable 2006.03.25 13:21 --- tex/context/base/cont-new.tex | 15 +-- tex/context/base/context.tex | 5 +- tex/context/base/core-bar.tex | 195 +++++++++++++++++++++++++++++++++++ tex/context/base/core-ver.tex | 24 ++--- tex/context/base/m-plus.tex | 5 +- tex/context/base/m-streams.tex | 17 ++-- tex/context/base/mult-sys.tex | 2 + tex/context/base/page-plg.tex | 209 ++++++++++++++++++++++++++++++++++++++ tex/context/base/page-str.tex | 2 - tex/context/base/plus-rul.tex | 194 ----------------------------------- tex/context/base/xtag-mmp.tex | 2 + tex/context/interface/keys-cz.xml | 2 +- tex/context/interface/keys-de.xml | 2 +- tex/context/interface/keys-en.xml | 2 +- tex/context/interface/keys-fr.xml | 2 +- tex/context/interface/keys-it.xml | 2 +- tex/context/interface/keys-nl.xml | 2 +- tex/context/interface/keys-ro.xml | 2 +- 18 files changed, 442 insertions(+), 242 deletions(-) create mode 100644 tex/context/base/core-bar.tex create mode 100644 tex/context/base/page-plg.tex delete mode 100644 tex/context/base/plus-rul.tex (limited to 'tex') diff --git a/tex/context/base/cont-new.tex b/tex/context/base/cont-new.tex index 1c91e92f6..0021ff2e1 100644 --- a/tex/context/base/cont-new.tex +++ b/tex/context/base/cont-new.tex @@ -11,20 +11,7 @@ %C therefore copyrighted by \PRAGMA. See mreadme.pdf for %C details. -\ifx \newcontextversion \undefined % temp hack for testing by taco - \def\newcontextversion#1% - {\doifelse{#1}\contextversion - {\let\newcontextversion\gobbleoneargument} - {\writeline - \writestatus{Fatal Error}{Your format does not match the base files!}% - \writeline - \writestatus{Format Version}{\contextversion}% - \writestatus{Files Version}{#1}% - \batchmode - \normalend}} -\fi - -\newcontextversion{2006.03.24 09:16} +\newcontextversion{2006.03.25 13:21} %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.tex b/tex/context/base/context.tex index 4bf41a16a..7af379e14 100644 --- a/tex/context/base/context.tex +++ b/tex/context/base/context.tex @@ -31,7 +31,7 @@ %D 2004.8.30 the low level interface is english. Watch out and adapt %D your styles an modules. -\def\contextversion{2006.03.24 09:16} +\def\contextversion{2006.03.25 13:21} %D For those who want to use this: @@ -272,6 +272,8 @@ \input page-app.tex % unfinished \input page-flw.tex % experimental: flows \input page-spr.tex % experimental: spreads +\input page-plg.tex % experimental: plugins +\input page-str.tex % experimental: streams \input core-job.tex @@ -294,6 +296,7 @@ %D On which the next one depends: \input core-pos.tex +\input core-bar.tex \input core-snc.tex %D A few more languages, that have specifics using core diff --git a/tex/context/base/core-bar.tex b/tex/context/base/core-bar.tex new file mode 100644 index 000000000..eeb3de630 --- /dev/null +++ b/tex/context/base/core-bar.tex @@ -0,0 +1,195 @@ +%D \module +%D [ file=core-bar, +%D version=2003.03.16, +%D title=\CONTEXT\ Core Macros, +%D subtitle=Margin Bars and alike, +%D author=Hans Hagen, +%D date=\currentdate, +%D copyright=PRAGMA-ADE] +%C +%C This module is part of the \CONTEXT\ macro||package and is +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. + +\writestatus{loading}{Context Plus Macros / Margin Bars etc} + +\unprotect + +%D We will implement a sidebar mechanism using the +%D functionality from \type {core-pos}. +%D +%D \starttyping +%D \definesidebar[whow][rulecolor=green,distance=] +%D +%D \input tufte \par +%D \startsidebar +%D \input tufte \par +%D \input tufte \par +%D \startsidebar[whow] +%D \input tufte \par +%D \input tufte \par +%D \input tufte +%D \stopsidebar \par +%D \input tufte \par +%D \input tufte +%D \stopsidebar \par +%D \input tufte \par +%D \input tufte \par +%D \startsidebar +%D \input tufte \par +%D \input tufte \par +%D \input tufte \par +%D \input tufte \par +%D \input tufte +%D \stopsidebar \par +%D \input tufte \par +%D \input tufte \par +%D \startsidebar +%D \input tufte +%D \input tufte +%D \input tufte +%D \input tufte +%D \input tufte +%D \stopsidebar +%D \stoptyping + +\newcounter\currentsidebar +\newdimen \sidebardistance + +\def\setupsidebars + {\dodoubleargument\dosetupsidebars} + +\def\dosetupsidebars[#1][#2]% + {\ifsecondargument + \getparameters[\??br#1][#2]% + \else + \getparameters[\??br][#1]% + \fi} + +% \setupMPvariables +% [mpos:bar] +% [linecolor=red, +% linewidth=2pt, +% distance=5pt] + +\setupsidebars + [\c!rulethickness=2pt, + \c!rulecolor=red, + \c!distance=.5\bodyfontsize] + +\def\definesidebar + {\dodoubleempty\dodefinesidebar} + +\def\dodefinesidebar[#1][#2]% + {\copyparameters + [\??br#1][\??br] + [\c!rulethickness,\c!rulecolor,\c!distance]% + \getparameters + [\??br#1][#2]} + +\def\startsidebar + {\dosingleempty\dostartsidebar} + +\def\dostartsidebar[#1]% + {\bgroup + \dontleavehmode + \checktextbackgrounds + \doglobal\increment\currentsidebar + \doifelsenothing{#1} + {\advance\sidebardistance\@@brdistance} + {\doifelsevaluenothing{\??br#1\c!distance} + {\advance\sidebardistance\@@brdistance} + {\sidebardistance\getvalue{\??br#1\c!distance}}}% + \startpositionoverlay{text-1}% + \expanded{\setMPpositiongraphicrange + {b:side:\currentsidebar}% + {e:side:\currentsidebar}% + {mpos:bar}% + {self=side:\currentsidebar, + linewidth=\getvalue{\??br#1\c!rulethickness}, + linecolor=\getvalue{\??br#1\c!rulecolor}, + distance=\the\sidebardistance}}% + \stoppositionoverlay +% \edef\stopsidebar{\noexpand\dostopsidebar{\currentsidebar}}% + \bpos{side:\currentsidebar}\ignorespaces} + +% \def\dostopsidebar#1% +% {\removelastspace\tpos{side:#1}\carryoverpar\egroup} + +\def\stopsidebar + {\removelastspace\tpos{side:\currentsidebar}\carryoverpar\egroup} + +\startMPpositionmethod{mpos:bar} + \startMPpositiongraphic{mpos:bar}{linecolor,linewidth,distance}% + StartPage ; + path p ; p := + if \MPp\MPbself=\MPp\MPeself : + (xpart ulcorner Field[Text][Text],\MPy\MPbself+\MPh\MPbself) -- + (xpart llcorner Field[Text][Text],\MPy\MPeself-\MPd\MPeself) ; + elseif RealPageNumber=\MPp\MPbself : + (xpart ulcorner Field[Text][Text],\MPy\MPbself+\MPh\MPbself) -- + (llcorner Field[Text][Text]) ; + elseif RealPageNumber=\MPp\MPeself : + (ulcorner Field[Text][Text]) -- + (xpart llcorner Field[Text][Text],\MPy\MPeself-\MPd\MPeself) ; + else : + (ulcorner Field[Text][Text]) -- + (llcorner Field[Text][Text]) ; + fi ; + p := p shifted (-llcorner Field[Text][Text]-(\MPvar{distance},0)) ; + interim linecap := butt ; + draw p + withpen pencircle scaled \MPvar{linewidth} + withcolor \MPvar{linecolor} ; + StopPage ; + \stopMPpositiongraphic + \MPpositiongraphic{mpos:bar}{}% +\stopMPpositionmethod + +%D We now reimplement the margin rules handler defined in +%D \type {core-rul}: +%D +%D \setupmarginrules[level=5] +%D +%D \startmarginrule[1] +%D First we set the level at~5. Next we typeset this first +%D paragraph as a level~1 one. As expected no rule show up. +%D \stopmarginrule +%D +%D \startmarginrule[5] +%D The second paragraph is a level~5 one. As we can see here, +%D the marginal rule gets a width according to its level. +%D \stopmarginrule +%D +%D \startmarginrule[8] +%D It will of course be no surprise that this third paragraph +%D has a even thicker margin rule. This behavior can be +%D overruled by specifying the width explictly. +%D \stopmarginrule + +\definesidebar + [\v!margin] + [\c!rulecolor=\s!black, + \c!rulethickness=\@@karulethickness, + \c!distance=\dimexpr\leftmargindistance-\@@karulethickness/2\relax] + +\definecomplexorsimple\startmarginrule + +\def\simplestartmarginrule + {\complexstartmarginrule[1]} + +\def\complexstartmarginrule[#1]% + {\bgroup + \ifnum#1<\@@kalevel\relax + \let\stopmarginrule\egroup + \else + \def\@@kadefaultwidth{#1}% + \let\stopmarginrule\dostopmarginrule + \@EA\startsidebar\@EA[\@EA\v!margin\@EA]% + \fi} + +\def\dostopmarginrule + {\stopsidebar + \egroup} + +\protect \endinput diff --git a/tex/context/base/core-ver.tex b/tex/context/base/core-ver.tex index cf2a8f4d8..223c39644 100644 --- a/tex/context/base/core-ver.tex +++ b/tex/context/base/core-ver.tex @@ -1225,9 +1225,9 @@ \ifdone \startpacked % includes \bgroup \dosetuptypelinenumbering{#2}% - \doifinset{\\currenttyping\c!option}{\v!commands,\v!slanted,\v!normal} + \doifinset{\typingparameter\c!option}{\v!commands,\v!slanted,\v!normal} {\setuptyping[#1][\c!option=\v!none]}% - \doif{\currenttyping\c!option}\v!color + \doif{\typingparameter\c!option}\v!color {\expandafter\aftersplitstring#3\at.\to\prettyidentifier \settypingparameter\c!option{\prettyidentifier}}% \initializetyping @@ -1238,25 +1238,25 @@ {\scratchcounter\getvalue{\currenttypingclass#3\v!global\c!start}}% \advance\scratchcounter\plusone \setxvalue{\currenttypingclass#3\v!global\c!start}{\the\scratchcounter}% - \doifelsenothing{\currenttyping\c!start} + \doifelsenothing{\typingparameter\c!start} {\processfileverbatim\readfilename} - {\doif{\currenttyping\c!start}\v!continue + {\doif{\typingparameter\c!start}\v!continue {\setevalue{\currenttypingclass#1\c!start}% {\getvalue{\currenttypingclass#3\v!global\c!start}}}% - \doifelsenothing{\currenttyping\c!stop} - {\doifelsenothing{\currenttyping\c!nlines} + \doifelsenothing{\typingparameter\c!stop} + {\doifelsenothing{\typingparameter\c!nlines} {\processfileverbatim\readfilename} - {\scratchcounter\currenttyping\c!start - \advance\scratchcounter\currenttyping\c!nlines + {\scratchcounter\typingparameter\c!start + \advance\scratchcounter\typingparameter\c!nlines \advance\scratchcounter\minusone \setxvalue{\currenttypingclass#3\v!global\c!start}% {\the\scratchcounter}% \processfilelinesverbatim\readfilename - {\currenttyping\c!start}} + {\typingparameter\c!start} {\getvalue{\currenttypingclass#3\v!global\c!start}}}}% {\processfilelinesverbatim\readfilename - {\currenttyping\c!start} - {\currenttyping\c!stop }}% + {\typingparameter\c!start} + {\typingparameter\c!stop }}}% \stopverbatimcolor \stoppacked % includes \egroup \else @@ -1266,7 +1266,7 @@ \showmessage\m!verbatims1\ascii \egroup \fi - \currenttyping\c!after + \typingparameter\c!after \egroup} %D \macros diff --git a/tex/context/base/m-plus.tex b/tex/context/base/m-plus.tex index a38c73129..312d9f931 100644 --- a/tex/context/base/m-plus.tex +++ b/tex/context/base/m-plus.tex @@ -23,7 +23,8 @@ %D \usemodule[plus] %D \stoptyping -\readfile {plus-rul} \donothing \donothing -\readfile {plus-pag} \donothing \donothing +% \readfile {plus-rul} \donothing \donothing +% \readfile {page-str} \donothing \donothing +% \readfile {page-plg} \donothing \donothing \endinput diff --git a/tex/context/base/m-streams.tex b/tex/context/base/m-streams.tex index 847f250e9..5cd618bc4 100644 --- a/tex/context/base/m-streams.tex +++ b/tex/context/base/m-streams.tex @@ -1,5 +1,3 @@ -\ifx\definestreamlayer\undefined \input page-str \fi - %D First we implement a simple left||right synchronization %D mechanism, which we may perfect and extend over time. @@ -128,6 +126,7 @@ \def\startstreamlayer[#1]% {\bgroup + \def\startstreamlayer[##1]{\bgroup\let\stopstreamlayer\egroup}% \edef\currentstreamlayer{#1}% \enableoutputstream[main]% \synchronizeoutput @@ -319,14 +318,12 @@ \starttext - \startstreamlayer[block] - \title{Sample \recurselevel} - \startcolumns - \dorecurse{4}{\input tufte \par} - \stopcolumns - \stopstreamlayer - -% \stoptext +% \startstreamlayer[block] +% \title{Sample \recurselevel} +% \startcolumns +% \dorecurse{4}{\input tufte \par} +% \stopcolumns +% \stopstreamlayer \dorecurse {10} { \startstreamlayer[block] diff --git a/tex/context/base/mult-sys.tex b/tex/context/base/mult-sys.tex index 2e02bbf07..838162e71 100644 --- a/tex/context/base/mult-sys.tex +++ b/tex/context/base/mult-sys.tex @@ -403,6 +403,7 @@ \definesystemvariable {bl} % BLanko \definesystemvariable {bg} % BleedinG \definesystemvariable {bo} % BlankO (definitions) +\definesystemvariable {br} % sideBaR \definesystemvariable {bs} % SelecteerBlokken \definesystemvariable {bt} % BuTton \definesystemvariable {bu} % BUffer @@ -483,6 +484,7 @@ \definesystemvariable {lb} % LaBels \definesystemvariable {ld} % LegenDa \definesystemvariable {le} % LinetablE +\definesystemvariable {lf} % LocalFigures \definesystemvariable {lg} % taal (LanGuage) \definesystemvariable {li} % LIjst \definesystemvariable {ll} % Layers diff --git a/tex/context/base/page-plg.tex b/tex/context/base/page-plg.tex new file mode 100644 index 000000000..8478d6ef6 --- /dev/null +++ b/tex/context/base/page-plg.tex @@ -0,0 +1,209 @@ +%D \module +%D [ file=page-pls, +%D version=2003.03.16, +%D title=\CONTEXT\ Core Macros, +%D subtitle=Page Setup, +%D author=Hans Hagen, +%D date=\currentdate, +%D copyright=PRAGMA-ADE] +%C +%C This module is part of the \CONTEXT\ macro||package and is +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. + +\ifx\pageareabox\undefined \else \endinput \fi + +\writestatus{loading}{Context Core Macros / Extra Page Building} + +%D This feature has been present for a while but has never been +%D exploited: pluggable pagebuilders. The next example code +%D demonstrates the application of one such a plug-in. This variant +%D support \type {page}, \type {leftpage} and \type {rightpage} +%D definitions where specific areas are placed with the \type +%D {\pagearea} command. +%D +%D \starttyping +%D \setupheadertexts[the header text] +%D \setupfootertexts[a pretty long left footer text][something right] +%D \setupbottomtexts[a not so long bottom text][another right thing] +%D \setuptexttexts [margin][something marginal][indeed] +%D +%D \startpagelayout[leftpage] +%D \setupTABLE[offset=overlay] +%D \setupTABLE[c][1][width=\leftmarginwidth] +%D \bTABLE +%D \bTR +%D \bTD[nx=3,background=color,backgroundcolor=green] +%D \pagearea[header][text][middle] +%D \eTD +%D \eTR +%D \bTR +%D \bTD \pagearea[text][margin][left] \eTD +%D \bTD[nx=2] \pagearea[text] \eTD +%D \eTR +%D \bTR +%D \bTD[nx=3,offset=overlay] +%D {\bTABLE[width=.5\hsize] +%D \bTR +%D \bTD \pagearea[footer][text][left] \eTD +%D \bTD \pagearea[bottom][text][left] \eTD +%D \eTR +%D \eTABLE} +%D \eTD +%D \eTR +%D \eTABLE +%D \stoppagelayout +%D +%D \startpagelayout[rightpage] +%D \setupTABLE[offset=overlay] +%D \setupTABLE[c][1][width=\rightmarginwidth] +%D \bTABLE +%D \bTR +%D \bTD[nx=3] \pagearea[header][text][middle] \eTD +%D \eTR +%D \bTR +%D \bTD \pagearea[text][margin][left] \eTD +%D \bTD[nx=2] \pagearea[text] \eTD +%D \eTR +%D \bTR +%D \bTD[nx=3,offset=overlay] +%D {\bTABLE[width=.5\hsize] +%D \bTR +%D \bTD \pagearea[bottom][text][right] \eTD +%D \bTD \pagearea[footer][text][right] \eTD +%D \eTR +%D \eTABLE} +%D \eTD +%D \eTR +%D \eTABLE +%D \stoppagelayout +%D +%D \setupcolors[state=start] +%D +%D \setupbackgrounds[text][background=color,backgroundcolor=blue] +%D \setupbackgrounds[header][text][background=color,backgroundcolor=red] +%D +%D \setuppagenumbering[alternative=doublesided,location=] +%D +%D \setuplayout[method=makeup] +%D +%D \definetextbackground +%D [test] +%D [state=start, +%D background=color, +%D backgroundcolor=yellow] +%D +%D \starttext +%D +%D \dorecurse{10}{\input tufte \par} +%D +%D \input tufte \starttest \input tufte \stoptest \input tufte +%D +%D \starttabulate +%D \NC test \NC \starttest \input tufte \stoptest \NC \NR +%D \stoptabulate +%D +%D \dorecurse{10}{\input tufte \par} +%D +%D \stoptext +%D \stoptyping + +\unprotect + +\setvalue{\??ly\c!method\v!makeup}#1#2% + {\setbox\pagebox\hbox + {\vbox to \textheight + {\offinterlineskip + % optie + \vskip-1\topskip + \vskip\strutheight + % + \textwidth\makeupwidth + \hsize\textwidth + \boxmaxdepth\maxdepth + \noindent + \dopagecontents#1#2}}% + \wd\pagebox\makeupwidth + \ht\pagebox\textheight + \dp\pagebox\zeropoint + \hsize\paperwidth + \vsize\paperheight + \setbox\pagebox\vbox + {\doifbothsidesoverruled + \let\!!stringa\v!page + \orsideone + \let\!!stringa\v!rightpage + \orsidetwo + \let\!!stringa\v!leftpage + \od + \getvalue{\??ly\c!method:\!!stringa}}% + \wd\pagebox\paperwidth + \ht\pagebox\paperheight + \dp\pagebox\zeropoint} + +\newbox\pageareabox + +\def\pagearea + {\dotripleempty\dopagearea} + +\def\dopagearea[#1][#2][#3]% + {\ifthirdargument + \doifelse{#3}\v!left + {\dodopagearea{#1}{#2}\c!lefttext} + {\doifelse{#3}\v!right + {\dodopagearea{#1}{#2}\c!righttext} + {\dodopagearea{#1}{#2}\c!middletext}}% + \else\ifsecondargument + \doifbothsidesoverruled + \dodopagearea{#1}{#2}\c!righttext + \orsideone + \dodopagearea{#1}{#2}\c!righttext + \orsidetwo + \dodopagearea{#1}{#2}\c!lefttext + \od + \else + \doif{#1}\v!text % copy due to trial runs in TABLE + {\iftrialtypesetting + \copy\pagebox + \else + \setbox\pagebox\vbox + {\localstarttextcolor + \box\pagebox + \localstoptextcolor}% + \localpositioningfalse + \addtextbackground\pagebox + \addtextgridlayer\pagebox + \box\pagebox + \fi}% + \fi\fi} + +\def\dodopagearea#1#2#3% + {\setbox\pageareabox\vbox{\getvalue{\??tk#1#2#3}}% + \ifsomebackgroundfound{#1#2}% + \iftrialtypesetting + \box\pageareabox + \else + \localframed + [\??ma#1#2] + [\c!width=\wd\pageareabox, + \c!height=\ht\pageareabox, + \c!offset=\v!overlay] + {\box\pageareabox}% + \fi + \else + \box\pageareabox + \fi} + +\setvalue{\??ly\c!method:\v!leftpage }{\getvalue{\??ly\c!method:\v!page}} +\setvalue{\??ly\c!method:\v!rightpage}{\getvalue{\??ly\c!method:\v!page}} + +% \long\def\startpagelayout[#1]#2\stoppagelayout +% {\long\setvalue{\??ly\c!method:#1}{#2}} + +\long\def\startpagelayout + {\bgroup\catcode`\^^M=\@@ignore\dostartpagelayout} + +\long\def\dostartpagelayout[#1]#2\stoppagelayout + {\egroup\long\setvalue{\??ly\c!method:#1}{#2}} + +\protect \endinput diff --git a/tex/context/base/page-str.tex b/tex/context/base/page-str.tex index 340b1bae6..a6c1e8e2c 100644 --- a/tex/context/base/page-str.tex +++ b/tex/context/base/page-str.tex @@ -311,8 +311,6 @@ %D Although one can put floats in a stream, it sometimes makes sense %D to keep them apart and this is what local floats do. -\definesystemvariable{lf} - \def\setuplocalfloats {\getparameters[\??lf]} diff --git a/tex/context/base/plus-rul.tex b/tex/context/base/plus-rul.tex deleted file mode 100644 index ff56305b5..000000000 --- a/tex/context/base/plus-rul.tex +++ /dev/null @@ -1,194 +0,0 @@ -%D \module -%D [ file=plus-rul, -%D version=2003.03.16, -%D title=\CONTEXT\ Plus Macros, -%D subtitle=Ruled Stuff Handling, -%D author=Hans Hagen, -%D date=\currentdate, -%D copyright=PRAGMA-ADE] -%C -%C This module is part of the \CONTEXT\ macro||package and is -%C therefore copyrighted by \PRAGMA. See mreadme.pdf for -%C details. - -\writestatus{loading}{Context Plus Macros / Ruled Content Handling} - -\unprotect - -%D \definesidebar[whow][rulecolor=green,distance=] -%D -%D \input tufte \par -%D \startsidebar -%D \input tufte \par -%D \input tufte \par -%D \startsidebar[whow] -%D \input tufte \par -%D \input tufte \par -%D \input tufte -%D \stopsidebar \par -%D \input tufte \par -%D \input tufte -%D \stopsidebar \par -%D \input tufte \par -%D \input tufte \par -%D \startsidebar -%D \input tufte \par -%D \input tufte \par -%D \input tufte \par -%D \input tufte \par -%D \input tufte -%D \stopsidebar \par -%D \input tufte \par -%D \input tufte \par -%D \startsidebar -%D \input tufte -%D \input tufte -%D \input tufte -%D \input tufte -%D \input tufte -%D \stopsidebar - -\newcounter\currentsidebar -\newdimen \sidebardistance - -\definesystemvariable{sr} - -\def\setupsidebars - {\dodoubleargument\dosetupsidebars} - -\def\dosetupsidebars[#1][#2]% - {\ifsecondargument - \getparameters[\??sr#1][#2]% - \else - \getparameters[\??sr][#1]% - \fi} - -% \setupMPvariables -% [mpos:bar] -% [linecolor=red, -% linewidth=2pt, -% distance=5pt] - -\setupsidebars - [\c!rulethickness=2pt, - \c!rulecolor=red, - \c!distance=.5\bodyfontsize] - -\def\definesidebar - {\dodoubleempty\dodefinesidebar} - -\def\dodefinesidebar[#1][#2]% - {\copyparameters - [\??sr#1][\??sr] - [\c!rulethickness,\c!rulecolor,\c!distance]% - \getparameters - [\??sr#1][#2]} - -\def\startsidebar - {\dosingleempty\dostartsidebar} - -\def\dostartsidebar[#1]% - {\bgroup - \dontleavehmode - \checktextbackgrounds - \doglobal\increment\currentsidebar - \doifelsenothing{#1} - {\advance\sidebardistance\@@srdistance} - {\doifelsevaluenothing{\??sr#1\c!distance} - {\advance\sidebardistance\@@srdistance} - {\sidebardistance\getvalue{\??sr#1\c!distance}}}% - \startpositionoverlay{text-1}% - \expanded{\setMPpositiongraphicrange - {b:side:\currentsidebar}% - {e:side:\currentsidebar}% - {mpos:bar}% - {self=side:\currentsidebar, - linewidth=\getvalue{\??sr#1\c!rulethickness}, - linecolor=\getvalue{\??sr#1\c!rulecolor}, - distance=\the\sidebardistance}}% - \stoppositionoverlay -% \edef\stopsidebar{\noexpand\dostopsidebar{\currentsidebar}}% - \bpos{side:\currentsidebar}\ignorespaces} - -% \def\dostopsidebar#1% -% {\removelastspace\tpos{side:#1}\carryoverpar\egroup} - -\def\stopsidebar - {\removelastspace\tpos{side:\currentsidebar}\carryoverpar\egroup} - -\startMPpositionmethod{mpos:bar} - \startMPpositiongraphic{mpos:bar}{linecolor,linewidth,distance}% - StartPage ; - path p ; p := - if \MPp\MPbself=\MPp\MPeself : - (xpart ulcorner Field[Text][Text],\MPy\MPbself+\MPh\MPbself) -- - (xpart llcorner Field[Text][Text],\MPy\MPeself-\MPd\MPeself) ; - elseif RealPageNumber=\MPp\MPbself : - (xpart ulcorner Field[Text][Text],\MPy\MPbself+\MPh\MPbself) -- - (llcorner Field[Text][Text]) ; - elseif RealPageNumber=\MPp\MPeself : - (ulcorner Field[Text][Text]) -- - (xpart llcorner Field[Text][Text],\MPy\MPeself-\MPd\MPeself) ; - else : - (ulcorner Field[Text][Text]) -- - (llcorner Field[Text][Text]) ; - fi ; - p := p shifted (-llcorner Field[Text][Text]-(\MPvar{distance},0)) ; - interim linecap := butt ; - draw p - withpen pencircle scaled \MPvar{linewidth} - withcolor \MPvar{linecolor} ; - StopPage ; - \stopMPpositiongraphic - \MPpositiongraphic{mpos:bar}{}% -\stopMPpositionmethod - -%D We now reimplement the margin rules handler defined in -%D \type {core-rul}: -%D -%D \setupmarginrules[level=5] -%D -%D \startmarginrule[1] -%D First we set the level at~5. Next we typeset this first -%D paragraph as a level~1 one. As expected no rule show up. -%D \stopmarginrule -%D -%D \startmarginrule[5] -%D The second paragraph is a level~5 one. As we can see here, -%D the marginal rule gets a width according to its level. -%D \stopmarginrule -%D -%D \startmarginrule[8] -%D It will of course be no surprise that this third paragraph -%D has a even thicker margin rule. This behavior can be -%D overruled by specifying the width explictly. -%D \stopmarginrule - -\definesidebar - [\v!margin] - [\c!rulecolor=\s!black, - \c!rulethickness=\@@karulethickness, - \c!distance=\dimexpr\leftmargindistance-\@@karulethickness/2\relax] - -\definecomplexorsimple\startmarginrule - -\def\simplestartmarginrule - {\complexstartmarginrule[1]} - -\def\complexstartmarginrule[#1]% - {\bgroup - \ifnum#1<\@@kalevel\relax - \let\stopmarginrule\egroup - \else - \def\@@kadefaultwidth{#1}% - \let\stopmarginrule\dostopmarginrule - \@EA\startsidebar\@EA[\@EA\v!margin\@EA]% - \fi} - -\def\dostopmarginrule - {\stopsidebar - \egroup} - - - -\protect \endinput diff --git a/tex/context/base/xtag-mmp.tex b/tex/context/base/xtag-mmp.tex index 0405ed1bb..ebb136551 100644 --- a/tex/context/base/xtag-mmp.tex +++ b/tex/context/base/xtag-mmp.tex @@ -514,6 +514,8 @@ \doif{mprescripts/}{#1}{\donefalse}% weak, the / here \ifdone \advance\scratchcounter 1 \fi} +\let\pMULTISCRIPTmmlPRE\pMULTISCRIPTmmlPOST + \stopXMLmapping \protect \endinput diff --git a/tex/context/interface/keys-cz.xml b/tex/context/interface/keys-cz.xml index 82044a5d2..4304e23a3 100644 --- a/tex/context/interface/keys-cz.xml +++ b/tex/context/interface/keys-cz.xml @@ -1,6 +1,6 @@ - + diff --git a/tex/context/interface/keys-de.xml b/tex/context/interface/keys-de.xml index d8511eb20..8cc3a1e68 100644 --- a/tex/context/interface/keys-de.xml +++ b/tex/context/interface/keys-de.xml @@ -1,6 +1,6 @@ - + diff --git a/tex/context/interface/keys-en.xml b/tex/context/interface/keys-en.xml index cda8069ed..44f1ff998 100644 --- a/tex/context/interface/keys-en.xml +++ b/tex/context/interface/keys-en.xml @@ -1,6 +1,6 @@ - + diff --git a/tex/context/interface/keys-fr.xml b/tex/context/interface/keys-fr.xml index 1d2f336c0..3bd67647c 100644 --- a/tex/context/interface/keys-fr.xml +++ b/tex/context/interface/keys-fr.xml @@ -1,6 +1,6 @@ - + diff --git a/tex/context/interface/keys-it.xml b/tex/context/interface/keys-it.xml index 5b0641029..49f05cb8a 100644 --- a/tex/context/interface/keys-it.xml +++ b/tex/context/interface/keys-it.xml @@ -1,6 +1,6 @@ - + diff --git a/tex/context/interface/keys-nl.xml b/tex/context/interface/keys-nl.xml index ed62a3ab7..17f53ade2 100644 --- a/tex/context/interface/keys-nl.xml +++ b/tex/context/interface/keys-nl.xml @@ -1,6 +1,6 @@ - + diff --git a/tex/context/interface/keys-ro.xml b/tex/context/interface/keys-ro.xml index ad67bf3aa..e12d568b1 100644 --- a/tex/context/interface/keys-ro.xml +++ b/tex/context/interface/keys-ro.xml @@ -1,6 +1,6 @@ - + -- cgit v1.2.3