Am 07.03.2026 um 23:40 schrieb Giuseppe Bilotta:
Hello all,

as I had the opportunity to mention in the last online meeting, I'm
getting back into ConTeXt after a several-years pause to look into its
use for the future numbers of a newsletter that is currently being
typeset in Scribus.
I will have several questions in the coming days, but for starters,
here's one concerning figure placement.

In several occasions, I need to place multiple images side-by-side as
a single figure, covering the entire textwidth (or some other
specified width).
These figure need to have all the same height, but may have somewhat
(or very) different aspect ratios.

Currently, the way I'm doing this is with something like

\placefigure[here][]{Caption of the figures,
combined}{\startcombination[2*1,distance=2mm]
{\externalfigure[left-figure.png][height=3.9cm]}{}
{\externalfigure[right-figure.png][height=3.9cm]}{}
\stopcombination}

and then tweak the height so that I get the intended result. However,
this is extremely fastidious and doesn't scale well. Ideally, I can
specify the width,
but this either results in a larger gap (if the chosen figure height
is too small) or in an overflow (height too large).

Is there some magic keyword to do the automatic computation of the
height so that the total (proportionally scaled) width of the
subfigures matches the combination prescribed width - distance?

Am I correct you want something like this with a gap between the images?

\setupexternalfigures[location=default]

\showframe[text][text]

\starttext

\scale
  [width=1tw]
  {\externalfigure[mill]  [height=1lh]%
   \externalfigure[hacker][height=1lh]}

\stoptext

Wolfgang

___________________________________________________________________________________
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