diff options
author | Context Git Mirror Bot <phg42.2a@gmail.com> | 2016-02-15 11:15:07 +0100 |
---|---|---|
committer | Context Git Mirror Bot <phg42.2a@gmail.com> | 2016-02-15 11:15:07 +0100 |
commit | a036ac2dd19b592316e1b479360e9e6c6700e935 (patch) | |
tree | 321156a4e2af995a7f401e1b773fd8813e3928da /tex/context/base/mkiv/node-rul.mkiv | |
parent | d73f5987ca04dbdf0a134236c3314dadd7a73565 (diff) | |
download | context-a036ac2dd19b592316e1b479360e9e6c6700e935.tar.gz |
2016-02-15 10:29:00
Diffstat (limited to 'tex/context/base/mkiv/node-rul.mkiv')
-rw-r--r-- | tex/context/base/mkiv/node-rul.mkiv | 51 |
1 files changed, 50 insertions, 1 deletions
diff --git a/tex/context/base/mkiv/node-rul.mkiv b/tex/context/base/mkiv/node-rul.mkiv index 87277337e..a3df8481f 100644 --- a/tex/context/base/mkiv/node-rul.mkiv +++ b/tex/context/base/mkiv/node-rul.mkiv @@ -119,12 +119,13 @@ order {\barparameter\c!order}% rulethickness {\barparameter\c!rulethickness}% method \barparameter\c!method + max \barparameter\c!max\space % number + mp {\includeMPgraphic{\barparameter\c!mp}} 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% @@ -216,6 +217,8 @@ \definebar[\v!overstrikes] [\v!overstrike] [\c!continue=\v!no] \definebar[\v!understrikes][\v!understrike][\c!continue=\v!no] +% \setupbar[\v!overstrike][continue=all] + % we want these always so ... \ifdefined\normalmathunderbar @@ -253,6 +256,52 @@ \unexpanded\def\setupunderbar[#1]% too incompatible for the moment {} +%D Experimental new feature: + +\startuseMPgraphic{rules:under:random} + draw + ((0,RuleDepth) ... (RuleWidth,RuleDepth)) randomized (4*RuleThickness) + shifted (0,RuleFactor*RuleOffset) + withpen pencircle scaled RuleThickness + withcolor RuleColor ; + setbounds currentpicture to unitsquare xysized(RuleWidth,RuleHeight) ; +\stopuseMPgraphic + +\startuseMPgraphic{rules:under:dash} + draw + ((0,RuleDepth) ... (RuleWidth,RuleDepth)) + shifted (0,RuleFactor*RuleOffset) + dashed dashpattern(off 5/RuleFactor on 0 off 5/RuleFactor) + withpen pencircle scaled RuleThickness + withcolor RuleColor ; + setbounds currentpicture to unitsquare xysized(RuleWidth,RuleHeight) ; +\stopuseMPgraphic + +\startuseMPgraphic{rules:under:dots} + draw + ((0,RuleDepth) ... (RuleWidth,RuleDepth)) + shifted (0,RuleFactor*RuleOffset) + dashed dashpattern(on RuleFactor/2 off RuleFactor/2) + withpen pencircle scaled RuleThickness + withcolor RuleColor ; + setbounds currentpicture to unitsquare xysized(RuleWidth,RuleHeight) ; +\stopuseMPgraphic + +\definebar + [undergraphic] + [\c!mp=rules:under:dash, + \c!offset=-.2, + \c!order=\v!background] + +\definebar[underrandom] [undergraphic][\c!mp=rules:under:random] +\definebar[underrandoms][underrandom] [\c!continue=\v!yes] + +\definebar[underdash] [undergraphic][\c!mp=rules:under:dash] +\definebar[underdashes] [underdash] [\c!continue=\v!yes] + +\definebar[underdot] [undergraphic][\c!mp=rules:under:dots] +\definebar[underdots] [underdot] [\c!continue=\v!yes] + %D This will move: (a bit duplicated) \installcorenamespace{shift} |