# What is the recommended way to insert side-by-side figures?

It is often necessary to put figures side-by-side in a document to make adequate use of space. I would like to know the recommended way to do so in texmacs.

The image above shows how things look when I insert two `small figures` from texmacs. I have two issues with this: (1) there is too much white space between the images, and (2) the caption does not automatically break into separate lines. Basically, I’d like to be able to achieve something like the image below.

For many complex typesetting tasks (title pages, institutional headers for letters, graphical decorations around theorems, placement of figures…) I usually use tables. In this case I would have a wide table with two columns with exact width of `0.5par`, or a bit less. I think this will enough to force the content to wrap correctly.

I just created a wide table with two columns, set the cell width to 0.5par, added two small-figures, the caption still doesn’t wrap around the cell size.

Yes, it seems there is a bug in the definition of the \small-figure macro. Try to put this in your preamble.

``````<assign|small-figure|<macro|body|caption|<surround|<compound|next-figure>||<render-small-figure|figure|<compound|figure-text>
<compound|the-figure>|<arg|body>|<surround|<set-binding|<compound|the-figure>>||<arg|caption>>>>>>
``````

I’ve modified a bit the macro so to have a `surround` wrapping the figure. This works for me and produces captions which correctly wrap inside a fixed-with table cell.

2 Likes

I filed a bug report: https://savannah.gnu.org/bugs/index.php?62256

2 Likes