tingerrr / subpar

A typst package for creating sub figures.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to align first line of captions?

augustebaum opened this issue · comments

Hi,

I'm really excited about subpar, I jumped on it as soon as I saw the first version was released!

I'm trying it out on a project of mine and I see the figure captions are aligned nicely, but the result looks a bit off to my taste:

2024-05-03T13_23_53_screenshot

In this case it would make more sense to me if the captions' first lines were aligned.

Do you have any suggestions on how I could achieve this, or would it have to be integrated into subpar?

In your specific case (where the images appear to be of similar size), you could try setting supbar.grid(align: top, ...).

This is one of the issues I'm not yet sure how to solve easily.

Both figures and captions may be different sizes:

image

@tingerr — why can't you use grid cells for each image and caption, then you can align images to bottom and captions to top?

@tingerr — why can't you use grid cells for each image and caption, then you can align images to bottom and captions to top?

This is what I will eventually do, the problem is that I need to write up all the code to peer into potentially any kind of content a user passes and resolve certain styles in the correct context, especially when using references.

Currently, users don't have to do anything to use the @reference syntax, and I'd like to keep it that way, but I haven't come up with a solution that preserves this.