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.

Hans
--- tex/context/base/mkxl/strc-flt.mklx.orig
+++ tex/context/base/mkxl/strc-flt.mklx
@@ -2273,6 +2273,9 @@
  \def\strc_floats_build_box_next_right#1%
   {\ifconditional\c_strc_floats_par_float \hpack \else \expandafter \strc_floats_align_content \fi % skip, no pack
       {\d_strc_float_temp_height\ht\b_strc_floats_content
+      \ifdim\htdp\b_strc_floats_caption>\d_strc_float_temp_height
+        \d_strc_float_temp_height\htdp\b_strc_floats_caption
+      \fi
        \box\b_strc_floats_content
        \ifinset\v!hang\floatcaptionlocation\else
          \dotfskip{\floatcaptionparameter\c!distance}%
@@ -2282,6 +2285,9 @@
  \def\strc_floats_build_box_next_left#1%
   {\ifconditional\c_strc_floats_par_float \hpack \else \expandafter \strc_floats_align_content \fi % skip, no pack
       {\d_strc_float_temp_height\ht\b_strc_floats_content
+      \ifdim\htdp\b_strc_floats_caption>\d_strc_float_temp_height
+        \d_strc_float_temp_height\htdp\b_strc_floats_caption
+      \fi
        \vbox to\d_strc_float_temp_height{#1}%
        \ifinset\v!hang\floatcaptionlocation\else
          \dotfskip{\floatcaptionparameter\c!distance}%
@@ -2297,12 +2303,18 @@
  \def\strc_floats_build_box_next_right_hang#1%
   {\ifconditional\c_strc_floats_par_float \hpack \else \expandafter \strc_floats_align_content \fi
       {\d_strc_float_temp_height\ht\b_strc_floats_content
+      \ifdim\htdp\b_strc_floats_caption>\d_strc_float_temp_height
+        \d_strc_float_temp_height\htdp\b_strc_floats_caption
+      \fi
        \box\b_strc_floats_content
        \vbox to\d_strc_float_temp_height{#1}}}

  \def\strc_floats_build_box_next_left_hang#1%
   {\ifconditional\c_strc_floats_par_float \hpack \else \expandafter \strc_floats_align_content \fi
       {\d_strc_float_temp_height\ht\b_strc_floats_content
+      \ifdim\htdp\b_strc_floats_caption>\d_strc_float_temp_height
+        \d_strc_float_temp_height\htdp\b_strc_floats_caption
+      \fi
        \vbox to\d_strc_float_temp_height{#1}%
        \box\b_strc_floats_content}}


Cheers,
Florent

Le mer. 9 sept. 2026 à 08:16, Florent Michel <[email protected] <mailto:[email protected]>> a écrit :

    Hi,

    Thanks Hans for the upload! MetaFun's new 3D features look really
    impressive, and in many cases seem to give better results than
    closed-source (and expensive) solutions!

    I also noticed what looks like a small bug with `location=right` for
    captions (or maybe a bug in the way I'm using it): the following
    modification to the Wiki example (https://wiki.contextgarden.net/
    Command/setupcaption <https://wiki.contextgarden.net/Command/
    setupcaption>) produces a caption for Figure 2 that overlaps with
    Figure 3.

    ```
    \starttext

    \definefloat[rightfigure][rightfigure][figure]

    \setupcaption[rightfigure][location=right]

    \placefigure{\input{ward}}{\framed{figure 1}}
    \placerightfigure{\input{ward}}{\framed{figure 2}}
    \placefigure{\input{ward}}{\framed{figure 3}}

    \stoptext
    ```

    Cheers,
    Florent

    Le mer. 9 sept. 2026 à 06:38, Henning Hraban Ramm <[email protected]
    <mailto:[email protected]>> a écrit :


        Am 07.09.26 um 23:12 schrieb Hans Hagen via ntg-context:
         > I pushed an update (hopefully ok because bots were saturating
        the logs
         > and such so we ran out of disk space).
         >
         > Apart from fixes for issues mentioned / encountered the last
        weeks we
         > also added a goodie file for lm so that Jim can go forward.
        Thank you!

        Unfortunately, I see changes WRT floats:
        captions that used to be left aligned are now centered,
        combinations are wider than textwidth, and their captions are
        even wider.

        I found a MWE for caption alignment, but so far not for the
        combination
        problem:

        \useMPlibrary[dum]

        \setupcaptions[figure][
             align=flushleft,
             number=no,
        ]

        \starttext

        \startplacefigure[location=top,title=Some caption]
        \externalfigure[dummy][width=1tw]
        \stopplacefigure

        \stoptext


        Hraban

        
___________________________________________________________________________________
        If your question is of interest to others as well, please add an
        entry to the Wiki!

        maillist : [email protected] <mailto:[email protected]> /
        https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
        <https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl>
        webpage  : https://www.pragma-ade.nl <https://www.pragma-
        ade.nl> / https://context.aanhet.net <https://
        context.aanhet.net> (mirror)
        archive  : https://github.com/contextgarden/context <https://
        github.com/contextgarden/context>
        wiki     : https://wiki.contextgarden.net <https://
        wiki.contextgarden.net>
        
___________________________________________________________________________________


___________________________________________________________________________________
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
___________________________________________________________________________________


--

-----------------------------------------------------------------
                                          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
___________________________________________________________________________________

Reply via email to