summaryrefslogtreecommitdiff
path: root/tex/context/base/mkxl/anch-bar.mkxl
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2021-05-05 20:33:15 +0200
committerContext Git Mirror Bot <phg@phi-gamma.net>2021-05-05 20:33:15 +0200
commit52c91dd191d7bd30d41aaf259480ee862160a251 (patch)
tree7cdc9225b4d764377857bad57acdccd2d5178f85 /tex/context/base/mkxl/anch-bar.mkxl
parent6addefa380c1008fbc164890e8e95dd855a361c5 (diff)
downloadcontext-52c91dd191d7bd30d41aaf259480ee862160a251.tar.gz
2021-05-05 19:24:00
Diffstat (limited to 'tex/context/base/mkxl/anch-bar.mkxl')
-rw-r--r--tex/context/base/mkxl/anch-bar.mkxl27
1 files changed, 10 insertions, 17 deletions
diff --git a/tex/context/base/mkxl/anch-bar.mkxl b/tex/context/base/mkxl/anch-bar.mkxl
index 252f41239..71cc7f163 100644
--- a/tex/context/base/mkxl/anch-bar.mkxl
+++ b/tex/context/base/mkxl/anch-bar.mkxl
@@ -17,8 +17,8 @@
%D This can be done better now ...
-%D We will implement a sidebar mechanism using the functionality from
-%D \type {core-pos}.
+%D We will implement a sidebar mechanism using the functionality from \type
+%D {core-pos}.
%D
%D \starttyping
%D \definesidebar[whow][rulecolor=green,distance=0pt]
@@ -109,16 +109,14 @@
\else
\advance\d_anch_sidebars_distance\scratchdistance\relax
\fi
- \else
- \ifnum\m_level=\plusone
- \ifzeropt\scratchdimen
- \advance\d_anch_sidebars_distance\scratchdistance\relax
- \else
- \d_anch_sidebars_distance\scratchdimen
- \fi
+ \orelse\ifnum\m_level=\plusone
+ \ifzeropt\scratchdimen
+ \advance\d_anch_sidebars_distance\scratchdistance\relax
\else
- \d_anch_sidebars_distance\dimexpr\scratchdimen+\numexpr\m_level-\plusone\relax\dimexpr\scratchdistance\relax\relax
+ \d_anch_sidebars_distance\scratchdimen
\fi
+ \else
+ \d_anch_sidebars_distance\dimexpr\scratchdimen+\numexpr\m_level-\plusone\relax\dimexpr\scratchdistance\relax\relax
\fi
\startpositionoverlay{\v!text-1}%
\normalexpanded{\setMPpositiongraphicrange % maybe expand in definition
@@ -146,13 +144,8 @@
%D one lua call).
\startMPpositionmethod{mpos:sidebar}
- \startMPpositiongraphic{mpos:sidebar}{linecolor,linewidth,distance,alternative}%
- anch_sidebars_draw (
- \MPp\MPbself,\MPp\MPeself,\MPy\MPbself,\MPy\MPeself,\MPh\MPbself,\MPd\MPeself,
- \MPx{\textanchor},\MPy{\textanchor},\MPw{\textanchor},\MPh{\textanchor},
- \MPvar{alternative},\MPvar{distance},\MPvar{linewidth},\MPvar{linecolor},
- \MPvar{topoffset}, \MPvar{bottomoffset}
- ) ;
+ \startMPpositiongraphic{mpos:sidebar}{linecolor,linewidth,distance,alternative}
+ anch_sidebars_draw("\MPbself", "\MPeself", "\textanchor") ;
\stopMPpositiongraphic
\MPpositiongraphic{mpos:sidebar}{}%
\stopMPpositionmethod