summaryrefslogtreecommitdiff
path: root/tex/context/base/strc-ren.mkiv
diff options
context:
space:
mode:
authorMarius <mariausol@gmail.com>2012-05-19 01:20:14 +0300
committerMarius <mariausol@gmail.com>2012-05-19 01:20:14 +0300
commit3821b4213bf250551cfa122313ae2c56f9923533 (patch)
tree291a4a12a622e6d081ba8b709ab3c03780e5d445 /tex/context/base/strc-ren.mkiv
parenteda07bb8527bbb5d411be813ccd1e916c83e9d5b (diff)
downloadcontext-3821b4213bf250551cfa122313ae2c56f9923533.tar.gz
beta 2012.05.18 23:50
Diffstat (limited to 'tex/context/base/strc-ren.mkiv')
-rw-r--r--tex/context/base/strc-ren.mkiv30
1 files changed, 20 insertions, 10 deletions
diff --git a/tex/context/base/strc-ren.mkiv b/tex/context/base/strc-ren.mkiv
index 543c55fff..b2d23c108 100644
--- a/tex/context/base/strc-ren.mkiv
+++ b/tex/context/base/strc-ren.mkiv
@@ -462,17 +462,27 @@
\fi
#2}}
+% \unexpanded\def\placeheadmarginalternative#1#2%
+% {\vbox
+% {\localheadsetup
+% \begstrut % use one \strut here!
+% \dontleavehmode % in case there is no strut, else side effects with llap
+% \ifconditional\headshownumber
+% \llap{\hbox{\hfill{#1}\hskip\localheadskip\hskip\leftmargindistance}}% introduces whitespace
+% % maybe better:
+% % \inleftmargin{\hbox{\hss{#1}\hskip\localheadskip}}%
+% \fi
+% {#2}}}
+
\unexpanded\def\placeheadmarginalternative#1#2%
- {\vbox
- {\localheadsetup
- \begstrut % use one \strut here!
- \dontleavehmode % in case there is no strut, else side effects with llap
- \ifconditional\headshownumber
- \llap{\hbox{\hfill{#1}\hskip\localheadskip\hskip\leftmargindistance}}% introduces whitespace
- % maybe better:
- % \inleftmargin{\hbox{\hss{#1}\hskip\localheadskip}}%
- \fi
- {#2}}}
+ {\vbox
+ {\localheadsetup
+ \begstrut % use one \strut here!
+ \dontleavehmode % in case there is no strut, else side effects with llap
+ \ifconditional\headshownumber
+ \llap{\hbox{\hfill{#1}\hskip\dimexpr\localheadskip+\doifoddpageelse\leftmargindistance\rightmargindistance\relax}}% introduces whitespace
+ \fi
+ {#2}}}
\defineheadplacement[\v!inmargin][\v!vertical]#1#2{\placeheadmarginalternative{#1}{#2}}
\defineheadplacement[\v!margin] [\v!vertical]#1#2{\placeheadmarginalternative{#1}{#2}}