我想对Quarto文档中的文本进行说明。这意味着它应该在单词之间自动添加文本,以便每一行文本的边缘与两个边距对齐。在word-document中,这将是以下突出显示的符号:

所以我想知道这个方法在Quarto文档中是否可行?下面是一个可重复的例子:
---
title: "How to justify text in Quarto"
format: html
editor: visual
---
## Quarto
Quarto enables you to weave together content and executable code into a finished document. To learn more about Quarto see <https://quarto.org>.
Quarto is based on Pandoc and uses its variation of markdown as its underlying document syntax. Pandoc markdown is an extended and slightly revised version of John Gruber's Markdown syntax.
Markdown is a plain text format that is designed to be easy to write, and, even more importantly, easy to read:输出:

正如您所看到的,文本是不对的,因为文本的行并不都在每一行的两边,两边都有边距。
发布于 2022-11-06 13:28:54
由于输出格式是HTML,所以您只需要将CSS属性text-align设置为justify。
---
title: "How to justify text in Quarto"
format: html
engine: knitr
---
```{css, echo = FALSE}.justify {
文本对齐:证明正确!重要
}
## Quarto
::: {.justify}
Quarto enables you to weave together content and executable code into a finished document. To learn more about Quarto see <https://quarto.org>.
Quarto is based on Pandoc and uses its variation of markdown as its underlying document syntax. Pandoc markdown is an extended and slightly revised version of John Gruber's Markdown syntax and Markdown is a plain text format.
Markdown is a plain text format that is designed to be easy to write, and, even more importantly, easy to read:
:::

https://stackoverflow.com/questions/74336124
复制相似问题