How to vertically align images

My understanding is that the “best” way to place logos in the header/footer of a (single page) document is with grids, e.g.:

#let logo_bl = image("logos/foo.svg")
#let logo_br = image("logos/bar.jpg")
#grid(
  columns: (1fr, 1fr),
  align: (left, right),
  logo_bl,
  logo_br,
)

But I am encountering a problem with vertical alignment. As you can see on the screenshot below, the right logo is higher than the left one.

How can I correct this so that both logos are vertically centered ?

Typst

Use align: (horizon + left, horizon + right)

1 Like

Thank you @Lutz_Hendricks ! I am very new to the typst journey, enjoying it, but a lot to learn…

Another solution would be:

#align(
  horizon,
  stack(
    dir: ltr,
    spacing: 1fr,
    logo_bl,
    logo_br,
  ),
)
1 Like