summaryrefslogtreecommitdiff
path: root/tex/context/base/core-rul.mkii
diff options
context:
space:
mode:
Diffstat (limited to 'tex/context/base/core-rul.mkii')
-rw-r--r--tex/context/base/core-rul.mkii86
1 files changed, 44 insertions, 42 deletions
diff --git a/tex/context/base/core-rul.mkii b/tex/context/base/core-rul.mkii
index c480bffbc..4381a8d5a 100644
--- a/tex/context/base/core-rul.mkii
+++ b/tex/context/base/core-rul.mkii
@@ -25,49 +25,51 @@
\let\framedboxdepth \!!zeropoint
\def\doreshapeframedbox % frozen, that is ... \shapeboxstrut added
- {\beginofshapebox
- \unvcopy\framebox
- \endofshapebox
- \global\@@globalwidth\zeropoint
- \edef\framedboxwidth {\the\wd\framebox}%
- \edef\framedboxheight{\the\ht\framebox}%
- \edef\framedboxdepth {\the\dp\framebox}%
- \resetshapeframebox
- \reshapebox
- {\setbox0\hbox
- {\strut\ifhbox\shapebox\shapeboxstrut\unhbox\else\box\fi\shapebox}%
- \global\advance\framednoflines \plusone
- \ifdim\framedlastlength>\zeropoint\else
- \global\framedlastlength\wd0
- \fi
- \ifdim\wd0>\@@globalwidth
- \global\@@globalwidth\wd0
- \fi}%
- \ifreshapingfailed
- % no need for anothr pass or finalizer
- \else
- \dosetraggedcommand\localformat
- \raggedcommand
- \ifboxhasheight
- \setbox\framebox\vbox to \localheight
- {\hsize\@@globalwidth
- \reshapebox{\hbox to \hsize{\ifhbox\shapebox\shapeboxstrut\unhbox\else\box\fi\shapebox}}%
- \dobeforeframedbox
- \innerflushshapebox
- \doafterframedbox}%
- \else
- \setbox\framebox\vbox to \framedboxheight % \ht\framebox
- {\hsize\@@globalwidth
- \reshapebox{\hbox to \hsize{\ifhbox\shapebox\shapeboxstrut\unhbox\else\box\fi\shapebox}}%
- \ifcase\reshapeframeboxmethod
- \or \innerflushshapebox \or \innerflushshapebox
- \fi}%
- \ifcase\reshapeframeboxmethod \or
- \dp\framebox\framedboxdepth % \strutdp otherwise problem with math
+ {\ifvbox\framebox
+ \beginofshapebox
+ \unvcopy\framebox
+ \endofshapebox
+ \global\@@globalwidth\zeropoint
+ \edef\framedboxwidth {\the\wd\framebox}%
+ \edef\framedboxheight{\the\ht\framebox}%
+ \edef\framedboxdepth {\the\dp\framebox}%
+ \resetshapeframebox
+ \reshapebox
+ {\setbox0\hbox
+ {\strut\ifhbox\shapebox\shapeboxstrut\unhbox\else\box\fi\shapebox}%
+ \global\advance\framednoflines \plusone
+ \ifdim\framedlastlength>\zeropoint\else
+ \global\framedlastlength\wd0
\fi
- \fi
- \ifdim\framedlastlength=\zeropoint\global\framedlastlength\wd\framebox\fi
- \ifcase\framednoflines\global\framednoflines\plusone\fi
+ \ifdim\wd0>\@@globalwidth
+ \global\@@globalwidth\wd0
+ \fi}%
+ \ifreshapingfailed
+ % no need for anothr pass or finalizer
+ \else
+ \dosetraggedcommand\localformat
+ \raggedcommand
+ \ifboxhasheight
+ \setbox\framebox\vbox to \localheight
+ {\hsize\@@globalwidth
+ \reshapebox{\hbox to \hsize{\ifhbox\shapebox\shapeboxstrut\unhbox\else\box\fi\shapebox}}%
+ \dobeforeframedbox
+ \innerflushshapebox
+ \doafterframedbox}%
+ \else
+ \setbox\framebox\vbox to \framedboxheight % \ht\framebox
+ {\hsize\@@globalwidth
+ \reshapebox{\hbox to \hsize{\ifhbox\shapebox\shapeboxstrut\unhbox\else\box\fi\shapebox}}%
+ \ifcase\reshapeframeboxmethod
+ \or \innerflushshapebox \or \innerflushshapebox
+ \fi}%
+ \ifcase\reshapeframeboxmethod \or
+ \dp\framebox\framedboxdepth % \strutdp otherwise problem with math
+ \fi
+ \fi
+ \ifdim\framedlastlength=\zeropoint\global\framedlastlength\wd\framebox\fi
+ \ifcase\framednoflines\global\framednoflines\plusone\fi
+ \fi
\fi}
\protect \endinput