英文:
Center caption in Quarto
问题
在Quarto中以revealjs
格式居中标题的简便方法是什么?我想在本地进行这个操作。
我尝试过使用fig-cap-location="center"
,但不起作用。
可复现的示例:
---
title: "Untitled"
format: revealjs
---
## 居中标题
![我希望这个标题居中](https://www.r-project.org/logo/Rlogo.png){fit-align="center"}
英文:
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"}
答案1
得分: 1
我认为最简单的方法是使用 CSS,例如:
.caption{
text-align: center;
}
英文:
I think the easiest way is using css, e.g.
.caption{
text-align: center;
}
答案2
得分: 1
在https://quarto.org/docs/authoring/figures.html#figure-alignment中,他们说:“请注意,图题是左对齐的,以适应更长的图题文本(在居中对齐时看起来很奇怪)。”
英文:
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).
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论