在标题中插入换行符

Insert a linebreak in title

如何在 rmarkdown 文档的标题中插入换行符? 这不起作用:

---
title: "title \break subtitle"
output: pdf_document 
---`

使用管道

The pipe symbol at the end of a line in YAML signifies that any indented text that follows should be interpreted as a multi-line scalar value. See the YAML spec.

Specifically, the pipe indicates that (except for the indentation) the scalar value should be interpreted literally in such a way that preserves newlines. Conversely, the > character indicates that multi-line "folded" scalar follows, meaning that newlines are converted to spaces.

what is the use of pipe symbol in yaml

---
title: |
    | title 
    | subtitle
output: pdf_document 
---

这是副本,但我找不到原件。

编辑:在这里!