On 5/10/2026 12:24 PM, Wolfgang Schuster wrote:
Hi,
the \dontleavehmode in spac_hanging_finish has to be replaced with
\noindent, otherwise the image is indented with the start of the paragraph.
Example:
\setupindenting[yes,big]
\starttext
\starthanging{\blackrule[width=4cm,height=4cm]}
\samplefile{lorem}
\stophanging
Patch:
\def\spac_hanging_finish
{\ifdim\ht\nextbox>\strutht
\setbox\nextbox\tbox{\box\nextbox}%
\fi
\scratchdistance {\directhangingparameter\c!distance}%
\scratchcounter {\directhangingparameter\c!n}%
\scratchtopoffset {\directhangingparameter\c!topoffset}%
\scratchbottomoffset{\directhangingparameter\c!bottomoffset}%
\ifnum\scratchcounter>\zerocount
\noflines\scratchcounter
\else
\scratchdimen{%
\htdp\nextbox
+\scratchtopoffset
+\scratchbottomoffset
}%
\getnoflines\scratchdimen
\fi
\boxyoffset\nextbox-\scratchtopoffset
\ht\nextbox\strutht
\dp\nextbox\strutdp
\shapingpenalty\plustenthousand
\scratchwidth{\wd\nextbox+\scratchdistance}%
\scratchhsize{\hsize-\scratchwidth}%
\parshape {\noflines+\plusone}%
\ifx\m_spac_hanging_location\v!right
\expandedrepeat \noflines {\zeropoint \scratchhsize}
\else
\expandedrepeat \noflines {\scratchwidth \scratchhsize}
\fi
\zeropoint \hsize
\relax
\pushparagraphtweak {shift}
- \dontleavehmode
+ \noindent
\ifx\m_spac_hanging_location\v!right
\rlap{\kern\scratchhsize\kern\scratchdistance\box\nextbox}%
\else
\llap{\box\nextbox\kern\scratchdistance}%
\fi
\ignorepars}
ok, test added to test suite
Hans
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
_______________________________________________
dev-context mailing list -- [email protected]
To unsubscribe send an email to [email protected]