On 9/9/2026 11:45 PM, Wolfgang Schuster wrote:
Am 09.09.2026 um 23:24 schrieb Hans Hagen via ntg-context:
On 9/9/2026 11:10 PM, Wolfgang Schuster wrote:
Am 09.09.2026 um 12:54 schrieb Hans Hagen via ntg-context:
On 9/9/2026 11:48 AM, Florent Michel wrote:
In case that's helpful, the following patch seems to solve the
second issue (not sure if it may have unwelcome side-effects):
I just made this
\unprotect
\def\strc_floats_build_check_boxes
{\ifdim\htdp\b_strc_floats_content<\htdp\b_strc_floats_caption
\setbox\b_strc_floats_content\vpack to
\htdp\b_strc_floats_caption\bgroup
\box\b_strc_floats_content\vfill
\egroup
\fi}
\def\strc_floats_build_box_side
{\c_page_sides_force_shape\conditionalfalse % global ?
\ifconditional\c_strc_floats_par_float
\let\next\strc_floats_build_box_high
\else
\let\next\strc_floats_build_box_middle
\processallactionsinset[\floatcaptionlocation]
[ \v!low=>\let\next\strc_floats_build_box_low,
\v!middle=>\let\next\strc_floats_build_box_middle,
\v!high=>\let\next\strc_floats_build_box_high]%
\fi
\strc_floats_build_check_boxes
\next}
\protect
\setupcaption[figure][location=right]
\starttext
\placefigure{\input{ward}}{\framed[height=5cm]{figure 1}}
\placefigure{\input{ward}}{\framed[height=5cm]{figure 2}}
\placefigure{\input{ward}}{\framed {figure 3}}
\placefigure{\input{ward}}{\framed {figure 4}}
\stoptext
but Wolfgang has to double check it for side effects.
This has negative side effects for captions in the margin areas
(rightmargin, leftmargin, innermargin and outermargin) which use the
same macro. As a result you get large vertical gaps in the document.
I wondered if it should be keyword driven? But what keyword?
The only existing keyword which makes sense is maxheight but fitheight
or autoheight (both aren't used yet) are better names.
ok, so now we have this:
\setupcaption[figure][location={right,fitheight}]
\starttext
\placefigure{\input{ward}}{\framed[height=5cm]{figure 1}}
\placefigure{\input{ward}}{\framed[height=5cm]{figure 2}}
\placefigure{\input{ward}}{\framed {figure 3}}
\placefigure{\input{ward}}{\framed {figure 4}}
\stoptext
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
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the
Wiki!
maillist : [email protected] /
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___________________________________________________________________________________