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:
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](https://private-user-images.githubusercontent.com/153905/333035943-d55f83ca-8d9b-4401-9128-39e41f88d7de.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjExOTY4NzQsIm5iZiI6MTcyMTE5NjU3NCwicGF0aCI6Ii8xNTM5MDUvMzMzMDM1OTQzLWQ1NWY4M2NhLThkOWItNDQwMS05MTI4LTM5ZTQxZjg4ZDdkZS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwNzE3JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDcxN1QwNjA5MzRaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT00YmY2Nzc3MDVlNzBkZjY4ODExY2Y1NmM4ZGYzMzJmZmFlM2MxNWE3MDc3NWI1NTJjNjBiNTM1YjA4OWYxYTUxJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.COVqLgQx5ljmVIxXkuG0j0tbjnYZSk7BZb04ImGIkxE)
@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.