首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何在Quarto中对文本进行辩护?

如何在Quarto中对文本进行辩护?
EN

Stack Overflow用户
提问于 2022-11-06 13:08:26
回答 1查看 114关注 0票数 1

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

所以我想知道这个方法在Quarto文档中是否可行?下面是一个可重复的例子:

代码语言:javascript
复制
---
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:

输出:

正如您所看到的,文本是不对的,因为文本的行并不都在每一行的两边,两边都有边距。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2022-11-06 13:28:54

由于输出格式是HTML,所以您只需要将CSS属性text-align设置为justify

代码语言:javascript
复制
---
title: "How to justify text in Quarto"
format: html
engine: knitr
---

```{css, echo = FALSE}

.justify {

文本对齐:证明正确!重要

}

代码语言:javascript
复制
## 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:

:::

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/74336124

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档