Am 04.07.2014 um 17:31 schrieb Mojca Miklavec <mojca.miklavec.lists@gmail.com>:

On Fri, Jul 4, 2014 at 4:13 PM, Wolfgang Schuster
<schuster.wolfgang@gmail.com> wrote:

Am 04.07.2014 um 10:21 schrieb Mojca Miklavec <mojca.miklavec.lists@gmail.com>:

Hi,

When placing figures side-by-side I usually use

\placefigure[force][label]{}{\startcombination[2*1]
{\externalfigure[A]}{Some description of A}
{\externalfigure[B]}{Some description of B}
\stopcombination}

But this time I would like to get two separate figures with two separate titles:

            [figure]                            [figure]
Figure 1.1: Long description of A   Figure 1.2: Long description of B

with those long descriptions being "justified" (they split in multiple
line already), not centered.

What is the best way to achieve that?

Use the floatcombination environment.

\useMPlibrary[dum]

\starttext

\startplacefigure[location=nonumber]
       \startfloatcombination%[width=\textwidth,distance=0pt]
               \startplacefigure[title={Some description of A}]
                       %\externalfigure[A][width=4cm]
                       \framed[frame=off,offset=none,width=.5\textwidth]{\externalfigure[A][width=4cm]}
               \stopplacefigure
               \startplacefigure[title={Some description of B}]
                       %\externalfigure[B][width=4cm]
                       \framed[frame=off,offset=none,width=.5\textwidth]{\externalfigure[B][width=4cm]}
               \stopplacefigure
       \stopfloatcombination
\stopplacefigure

\stoptext

Thank you, but there are some serious problems with the layout. I
managed to find some very dirty workaround, so I can get the desired
effect, but nonetheless:

- titles are wider than the figure, so titles from left and right
overlap; what I ended up doing was
   \framed[frame=off,offset=none,width=.2\textwidth]{\externalfigure[cow][width=.4\textwidth]}

- titles are of different length (and have a different number of
lines), so I need to manually add \crlf in one of the titles to
achieve equal height and proper alignment;

- width=... and distance=... are weird; once I set some width,
distance only shifts the right figure outside of the page margin

The caption can be forced to the same width as the image with the \setupcaption command,
the vertical alignment of the images/text can be controlled with the location key but you have
to ensure both images have the same height.

\useMPlibrary[dum]

\starttext

\startplacefigure[location=nonumber]
\setupcaption[figure][width=max]
\startfloatcombination[location=top]
\startplacefigure[title={Some description of A which spans multiple lines}]
\externalfigure[A][width=4cm]
%\framed[frame=off,offset=none,width=.5\textwidth]{\externalfigure[A][width=4cm]}
\stopplacefigure
\startplacefigure[title={Some description of B}]
\externalfigure[B][width=4cm]
%\framed[frame=off,offset=none,width=.5\textwidth]{\externalfigure[B][width=4cm]}
\stopplacefigure
\stopfloatcombination
\stopplacefigure

\stoptext

Wolfgang