Reputation: 52059
Is there an easy way to center a caption in Quarto? I work with the revealjs
format. I'd like to do this locally.
I've tried with fig-cap-location="center"
but it does not work.
Reproducible example:
---
title: "Untitled"
format: revealjs
---
## Centering the caption
![I want this to be centered](https://www.r-project.org/logo/Rlogo.png){fit-align="center"}
Upvotes: 2
Views: 2593
Reputation: 31
In https://quarto.org/docs/authoring/figures.html#figure-alignment, they say
Note that figure captions are left aligned to accommodate longer caption text (which looks odd when center aligned).
Upvotes: 1
Reputation: 9260
I think the easiest way is using css, e.g.
.caption{
text-align: center;
}
Upvotes: 3