diff options
Diffstat (limited to 'tex/context/base/mkiv/typo-mar.mkiv')
-rw-r--r-- | tex/context/base/mkiv/typo-mar.mkiv | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tex/context/base/mkiv/typo-mar.mkiv b/tex/context/base/mkiv/typo-mar.mkiv index f265f173c..921f1f230 100644 --- a/tex/context/base/mkiv/typo-mar.mkiv +++ b/tex/context/base/mkiv/typo-mar.mkiv @@ -155,6 +155,7 @@ \forgetall \tf \resetallattributes % \deactivatecolor % needed, but maybe we should switch to maintextcolor: \onlyinheritmaintextcolor + \pickupattributes \to \everymargindatacontent % trialtypesetting: no need for margin stuff while trialing as @@ -200,11 +201,17 @@ \let\margindatahbox\naturalhbox % \hbox +\newcount\c_typo_margins_n + +\ifdefined\dotagmarginanchor \else \let\dotagmarginanchor\gobbleoneargument \fi +\ifdefined\dotagmargintext \else \let\dotagmargintext \gobbleoneargument \fi + \unexpanded\def\typo_margins_data_yes_indeed[#dataparameters][#textparameters]#content% {\iffirstargument \setupcurrentmargindata[#dataparameters]% \fi \doifelsenothing{#content}\donefalse\donetrue + \global\advance\c_typo_margins_n\plusone \ifdone \edef\currentmarginreference{\margindataparameter\c!reference}% \ifx\currentmarginreference\empty \else @@ -212,6 +219,7 @@ \fi \edef\currentmargindatastrut{\margindataparameter\c!strut}% \dostarttaggedchained\t!margintext\currentmargindata\??margindata + \dotagmargintext\c_typo_margins_n \ifcsname\currentmarginframedhash\s!parent\endcsname \setbox\nextbox\margindatahbox \currentmarginreference \bgroup \the\everymargindatacontent @@ -271,6 +279,8 @@ \ifdone \edef\p_anchor{\margindataparameter\c!anchor}% \anch_positions_initialize % we use positions at the lua end + \dostarttagged\t!marginanchor\empty + \dotagmarginanchor\c_typo_margins_n \clf_savemargindata location {\margindataparameter\c!location}% method {\margindataparameter\c!method}% @@ -306,7 +316,9 @@ line \numexpr\margindataparameter\c!line\relax stackname {\margindataparameter\c!stackname}% stack {\margindataparameter\c!stack}% + index \c_typo_margins_n \relax + \dostoptagged \else \clf_savemargindata location {\margindataparameter\c!location}% |