summaryrefslogtreecommitdiff
path: root/tex/context/base/mkiv/pack-mrl.mkiv
diff options
context:
space:
mode:
authorContext Git Mirror Bot <phg42.2a@gmail.com>2016-05-21 02:52:16 +0200
committerContext Git Mirror Bot <phg42.2a@gmail.com>2016-05-21 02:52:16 +0200
commita36f9abf1e0fd7de609dd1840d75bea56ec9e926 (patch)
treeb14349d1a44df698533aa324f6c17d2922bb4b59 /tex/context/base/mkiv/pack-mrl.mkiv
parentaf172a8db5f7583d0117635edde17eba5619d883 (diff)
downloadcontext-a36f9abf1e0fd7de609dd1840d75bea56ec9e926.tar.gz
2016-05-20 18:46:00
Diffstat (limited to 'tex/context/base/mkiv/pack-mrl.mkiv')
-rw-r--r--tex/context/base/mkiv/pack-mrl.mkiv37
1 files changed, 30 insertions, 7 deletions
diff --git a/tex/context/base/mkiv/pack-mrl.mkiv b/tex/context/base/mkiv/pack-mrl.mkiv
index 649b29fa6..85aa3ad04 100644
--- a/tex/context/base/mkiv/pack-mrl.mkiv
+++ b/tex/context/base/mkiv/pack-mrl.mkiv
@@ -56,10 +56,14 @@
\setstrut
\fi\fi
\useblackrulesstyleandcolor\c!style\c!color
- \vrule
- \ifx\p_width \v!max\s!width \emwidth\else\ifx\p_width \empty\else\s!width \p_width \fi\fi
- \ifx\p_height\v!max\s!height\strutht\else\ifx\p_height\empty\else\s!height\p_height\fi\fi
- \ifx\p_depth \v!max\s!depth \strutdp\else\ifx\p_depth \empty\else\s!depth \p_depth \fi\fi
+ \ifcsname\??blackruletype\directblackrulesparameter\c!type\endcsname
+ \lastnamedcs
+ \else
+ \vrule
+ \fi
+ \ifx\p_width \v!max\s!width \emwidth\else\ifx\p_width \empty\else\s!width \p_width \fi\fi
+ \ifx\p_height\v!max\s!height\strutht\else\ifx\p_height\empty\else\s!height\p_height\fi\fi
+ \ifx\p_depth \v!max\s!depth \strutdp\else\ifx\p_depth \empty\else\s!depth \p_depth \fi\fi
\egroup}
\setupblackrules
@@ -109,7 +113,7 @@
\scratchdistance\directblackrulesparameter\c!distance
\scratchcounter \directblackrulesparameter\c!n
\edef\p_alternative{\blackrulesparameter\c!alternative}%
- \ifx\p_alternative\c!b
+ \ifx\p_alternative\c!b % why not just check distance
\ifnum\scratchcounter=\plusone
\scratchdistance\zeropoint
\else
@@ -117,15 +121,34 @@
\fi
\fi
\useblackrulesstyleandcolor\c!style\c!color
+ \edef\brule
+ {\ifcsname\??blackruletype\directblackrulesparameter\c!type\endcsname
+ \lastnamedcs
+ \else
+ \vrule
+ \fi}%
\dorecurse\scratchcounter % a typical case of where we can use a simple loop
- {\vrule
+ {\brule
\s!width \scratchwidth
\s!height\scratchheight
\s!depth \scratchdepth
- \hskip\scratchdistance}%
+ \ifzeropt\scratchdistance\else
+ \hskip\scratchdistance
+ \fi}%
\unskip
\egroup}
+\installcorenamespace{blackruletype}
+
+\setvalue{\??blackruletype mp}%
+ {\frule
+ type {mp}%
+ data {\includeMPgraphic{\directblackrulesparameter\c!mp}}}
+
+\letvalue{\??blackruletype\s!no }\novrule
+%letvalue{\??blackruletype\s!yes}\vrule
+
+
\setupblackrules
[\c!n=3,
\c!alternative=\c!a,