summaryrefslogtreecommitdiff
path: root/tex/context/base/spac-grd.mkiv
diff options
context:
space:
mode:
Diffstat (limited to 'tex/context/base/spac-grd.mkiv')
-rw-r--r--tex/context/base/spac-grd.mkiv24
1 files changed, 23 insertions, 1 deletions
diff --git a/tex/context/base/spac-grd.mkiv b/tex/context/base/spac-grd.mkiv
index 979f56056..91fcf3207 100644
--- a/tex/context/base/spac-grd.mkiv
+++ b/tex/context/base/spac-grd.mkiv
@@ -247,6 +247,20 @@
\let\forcedbotbaselinecorrection\botbaselinecorrection
% experiment, todo: proper mkiv mechanism
+%
+% \input ward \par
+% \startframedtext test \stopframedtext
+% \input ward \par
+% \startlinecorrection \framed{xxx} \stoplinecorrection
+% \input ward \par
+%
+% \setupwhitespace[big]
+%
+% \input ward \par
+% \startframedtext test \stopframedtext
+% \input ward \par
+% \startlinecorrection \framed{xxx} \stoplinecorrection
+% \input ward \par
\def\dotopbaselinecorrection {\blank[\thetopbaselinecorrection ]}
\def\dobotbaselinecorrection {\blank[\thebotbaselinecorrection ]}
@@ -257,11 +271,19 @@
{\ifvmode
\bgroup
\setbaselinecorrections
- % \vspacing[white]
+ \vspacing[white]
\nointerlineskip
\dotopbaselinecorrection
\egroup
\fi}
+
+\def\dobaselinecorrection
+ {\ifdim\prevdepth>\zeropoint
+ \vspacing[\the\dimexpr-\prevdepth+\strutdp\relax]%
+ \else
+ \vspacing[\the\dimexpr\strutdp\relax]%
+ \fi
+ \prevdepth\strutdp}
\let\normalstartbaselinecorrection\startbaselinecorrection