I need to place several figures with different aspect ratios in a row using ConTeXt. I also need their heights to be equal, but summary width of pictures to be \textwidth. Height of pictures must calculated authomatically, pictures must be glued exactly side-to-side.


|pic1|   wide pic2   | pic3 |
|        \textwidth         |

How ?

  • There was a post with \startcombination solution, but it was deleted. This works just like I need if \setupcombination[distance=0mm] (no width=\textwidth) and \startcombination wrapped in \scale[width=\textwidth]{}. – s9gf4ult Jan 14 '14 at 15:39

You can use combination and (from comments) \scale. Note that if you add captions to each image, as in the below code, this text will be scaled as well.

enter image description here

\input knuth


\input knuth

  • Pictures must be glued edge-to-edge. Their height must be calculated automatically, not manually. – s9gf4ult Jan 14 '14 at 15:02
  • This also scales the captions – Aditya Jan 15 '14 at 3:42
  • @Aditya Thanks for the note. (I actually meant to remove them, as the question doesn't mention captions, but I'll add a note about that in the answer.) – Torbjørn T. Jan 15 '14 at 9:01

The solution can be achieved in two steps:

  1. Create a box in which the height of all the images is the same (does not matter what this height is)
  2. Scale the box so that its width equals textwidth.

Here is an example:

% Example images


\subject{Images without any scaling}


\subject{Images scaled to textwidth}



which gives

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.