diff options
Diffstat (limited to 'tex/context/base/node-rul.mkiv')
-rw-r--r-- | tex/context/base/node-rul.mkiv | 88 |
1 files changed, 49 insertions, 39 deletions
diff --git a/tex/context/base/node-rul.mkiv b/tex/context/base/node-rul.mkiv index 2d2e61134..7fa0473a5 100644 --- a/tex/context/base/node-rul.mkiv +++ b/tex/context/base/node-rul.mkiv @@ -112,19 +112,20 @@ \unexpanded\def\node_rules_define {\edef\p_node_rules_color{\barparameter\c!color}% - \setevalue{\??barattribute\currentbar}{\number\ctxlua{nodes.rules.define { - method = \barparameter\c!method, - offset = \barparameter\c!offset, - continue = "\barparameter\c!continue", - dy = \barparameter\c!dy, - rulethickness = "\barparameter\c!rulethickness", - unit = "\barparameter\c!unit", - order = "\barparameter\c!order", - max = \barparameter\c!max, - ma = \thecolormodelattribute, - ca = \thecolorattribute\p_node_rules_color, - ta = \thetransparencyattribute\p_node_rules_color - }}}} + \setevalue{\??barattribute\currentbar}{\number + \clf_definerule + continue {\barparameter\c!continue}% + unit {\barparameter\c!unit}% + order {\barparameter\c!order}% + rulethickness {\barparameter\c!rulethickness}% + method \barparameter\c!method + ma \thecolormodelattribute + ca \thecolorattribute\p_node_rules_color + ta \thetransparencyattribute\p_node_rules_color + offset \barparameter\c!offset\space % number + dy \barparameter\c!dy\space % number + max \barparameter\c!max + \relax}} \unexpanded\def\node_rules_redefine#1% {\def\currentbar{#1}\node_rules_define} @@ -132,13 +133,16 @@ \unexpanded\def\node_rules_direct#1% {\groupedcommand{\node_rules_set{#1}}\relax} -\def\node_rules_set - {\ctxlua{nodes.rules.enable()}% will be moved to lua - \glet\node_rules_set\node_rules_set_indeed - \node_rules_set} +% \unexpanded\def\node_rules_set +% {\clf_enablerules % will be moved to lua +% \glet\node_rules_set\node_rules_set_indeed +% \node_rules_set} +% +%\unexpanded\def\node_rules_set_indeed#1% maybe reverse the 1000 (also maybe use more attributes instead of settings) -\def\node_rules_set_indeed#1% maybe reverse the 1000 (also maybe use more attributes instead of settings) - {\edef\currentbar{#1}% +\unexpanded\def\node_rules_set#1% maybe reverse the 1000 (also maybe use more attributes instead of settings) + {\clf_enablerules % will be relaxed + \edef\currentbar{#1}% \expandafter\let\expandafter\c_node_rules_index\csname\??barindex#1\endcsname \advance\c_node_rules_index\plusone \usebarstyleandcolor\c!foregroundstyle\c!foregroundcolor @@ -157,6 +161,8 @@ \unexpanded\def\setbar[#1]% {\node_rules_set{#1}} +\let\directsetbar\node_rules_set + % ungrouped \newcount\c_node_rules_nesting % todo: same as colors @@ -279,31 +285,27 @@ \to \everydefineshift \unexpanded\def\node_shifts_define - {\setevalue{\??shiftattribute\currentshift}{\number\ctxlua{nodes.shifts.define { - method = \shiftparameter\c!method, - continue = "\shiftparameter\c!continue", - dy = \shiftparameter\c!dy, - unit = "\shiftparameter\c!unit", - }}}} + {\setevalue{\??shiftattribute\currentshift}{\number + \clf_defineshift + continue {\shiftparameter\c!continue}% + unit {\shiftparameter\c!unit}% + method \shiftparameter\c!method + dy \shiftparameter\c!dy % number + \relax}} \unexpanded\def\node_shifts_redefine#1% {\def\currentshift{#1}\node_shifts_define} -\unexpanded\def\node_shifts_set - {\ctxlua{nodes.shifts.enable()}% - \glet\node_shifts_set\node_shifts_set_indeed - \node_shifts_set} - -% \unexpanded\def\node_shifts_direct#1% -% {\doisolatedgroupedalign{\node_shifts_set{#1}}\donothing} - -\unexpanded\def\node_shifts_direct#1% - {\groupedcommand - {\begingroup\dostartisolation\begingroup\node_shifts_set{#1}} - {\endgroup\dostopisolation\endgroup}} +% \unexpanded\def\node_shifts_set +% {\clf_enableshifts +% \glet\node_shifts_set\node_shifts_set_indeed +% \node_shifts_set} +% +% \def\node_shifts_set_indeed#1% todo: check parent ! -\def\node_shifts_set_indeed#1% todo: check parent ! - {\def\currentshift{#1}% +\unexpanded\def\node_shifts_set#1% todo: check parent ! + {\clf_enableshifts + \def\currentshift{#1}% \expandafter\let\expandafter\c_node_shifts_index\csname\??shiftindex#1\endcsname \advance\c_node_shifts_index\plusone \attribute\shiftedattribute\numexpr @@ -320,6 +322,14 @@ \unexpanded\def\stopshift {\endgroup} +% \unexpanded\def\node_shifts_direct#1% +% {\doisolatedgroupedalign{\node_shifts_set{#1}}\donothing} + +\unexpanded\def\node_shifts_direct#1% + {\groupedcommand + {\begingroup\dostartisolation\begingroup\node_shifts_set{#1}} + {\endgroup\dostopisolation\endgroup}} + \setupshifts [\c!method=0, \c!continue=\v!no, |