diff options
author | Hans Hagen <pragma@wxs.nl> | 2018-04-16 00:08:11 +0200 |
---|---|---|
committer | Context Git Mirror Bot <phg42.2a@gmail.com> | 2018-04-16 00:08:11 +0200 |
commit | d5d5a39dc16881d098a99b74cba9020d96be4e11 (patch) | |
tree | 3d32c01797d034acc0107f6abd9c2d66af0b5ba6 /tex/context/base/mkiv/node-rul.mkiv | |
parent | 25fcad7435f56cdce2658336909f4da6a65589c0 (diff) | |
download | context-d5d5a39dc16881d098a99b74cba9020d96be4e11.tar.gz |
2018-04-15 23:21:00
Diffstat (limited to 'tex/context/base/mkiv/node-rul.mkiv')
-rw-r--r-- | tex/context/base/mkiv/node-rul.mkiv | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/tex/context/base/mkiv/node-rul.mkiv b/tex/context/base/mkiv/node-rul.mkiv index 643e93c42..a7ec99f7d 100644 --- a/tex/context/base/mkiv/node-rul.mkiv +++ b/tex/context/base/mkiv/node-rul.mkiv @@ -146,6 +146,8 @@ {\node_rules_set{#1}\barparameter\c!left}% {\relax\barparameter\c!right}} +% store in properties + \unexpanded\def\node_rules_set#1% maybe reverse the 1000 (also maybe use more attributes instead of settings) {\edef\currentbar{#1}% \usebarstyleandcolor\c!foregroundstyle\c!foregroundcolor @@ -571,4 +573,35 @@ \c!distance=.25\emwidth, \c!rulethickness=.25\exheight] +%D Bonus: +%D +%D \starttyping +%D \startuseMPgraphic{foo} +%D fill unitsquare +%D xyscaled (RuleWidth,RuleHeight+RuleDepth) enlarged (ExHeight/4,ExHeight/8) +%D shifted (-ExHeight/8,ExHeight/16) +%D withcolor RuleColor ; +%D \stopuseMPgraphic +%D +%D \definelinefiller[foo][mp=foo,color=darkred] +%D +%D \linefillerhbox[foo]{OEPS} +%D \stoptyping + +\unexpanded\def\node_backgrounds_filler_box#1#2[#3]% + {\bgroup + \clf_enablebackgroundboxes + \dowithnextbox{% + \node_linefiller_set{#3}% + #1% + attr \backgroundattribute \plusone + attr \linefillerattribute \the\attribute\linefillerattribute + {\box\nextbox}% + \egroup}% + #2} + +\unexpanded\def\linefillerhbox{\node_backgrounds_filler_box\hpack\hbox} +\unexpanded\def\linefillervbox{\node_backgrounds_filler_box\vpack\vbox} +\unexpanded\def\linefillervtop{\node_backgrounds_filler_box\tpack\vtop} + \protect \endinput |