How to align two figures holding images besides each other?

I have two figures with captions, that I want to align besides each other in the same column, also, is it possible to get rid of the Figure x: thing which comes automatically with the caption?

#figure(
  grid(
    columns: 2,
    [
      #figure(image("2.png", width: 40%), caption: [Graph A]),
      #figure(image("3.png", width: 40%), caption: [Graph B]),
    ]
  ),
)

Let me ask for a clarification: Are you looking for a way to put the two graphs side-by-side into one column of a multi-column grid? Something like this:

#let img1 = box(stroke: black, inset: 0.5em)[Figure 1]
#let img2 = box(stroke: blue, inset: 0.5em)[Another figure \ Different size]

#grid(columns: 2, stroke: black, inset: 1em,
  [empty col 1],
  grid(columns: 2, inset: 0.5em,
    figure(img1, caption: [F1]),
    figure(img2, caption: [F2])
  )
)

which produces

Or am I misreading the question?

To remove the “Figure x:” you can set the figure supplement to none: supplement: none.

1 Like

Not exactly, I only want to have two images besides each other, with captions for each of them. So like you already showed with your picture, just that picture one goes into one box and picture two goes into box two.

Like this?

#let img1 = box(stroke: black, inset: 0.5em)[Figure 1]
#let img2 = box(stroke: blue, inset: 0.5em)[Another figure \ Different size]

  #grid(columns: 2, inset: 0.5em, stroke: green,
    figure(img1, caption: [F1], supplement: none),
    figure(img2, caption: [F2], supplement: none)

Is the problem then one of alignment? In that case, oasis-align may help.

2 Likes