如何对齐四开文本?

Qui*_*ten 7 html text justify quarto

我想证明文档中文本的合理性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:
Run Code Online (Sandbox Code Playgroud)

输出:

在此输入图像描述


正如您所看到的,文本没有对齐,因为文本行并不全部位于每行的两个边距处。

sha*_*fee 11

由于输出格式为 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:

:::
Run Code Online (Sandbox Code Playgroud)

四开文本对齐