Я хотел бы оправдать текст в 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:
Вывод:
Как видите, текст не выровнен, потому что строки текста не все по обоим краям каждой строки с обоими полями.





Поскольку формат вывода — HTML, все, что вам нужно, — это свойство CSS text-align, установленное как justify.
---
title: "How to justify text in Quarto"
format: html
engine: knitr
---
```{css, echo = FALSE}
.justify {
text-align: justify !important
}
```
## 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:
:::