我在 rmarkdown 文档中有一个相当长的标题,我想在特定位置强制换行。
最小示例:
---
title: "Quite long title want the * line break at the asterisk"
output: html_document
---
我尝试过:\n、\newline、\\和手动换行符,但似乎都不起作用。
我相信这应该很简单,但我找不到解决办法。
我在 rmarkdown 文档中有一个相当长的标题,我想在特定位置强制换行。
最小示例:
---
title: "Quite long title want the * line break at the asterisk"
output: html_document
---
我尝试过:\n、\newline、\\和手动换行符,但似乎都不起作用。
我相信这应该很简单,但我找不到解决办法。
尝试在每行中使用竖线符号|
:
---
title: |
| Veryyyyyyy
| yyyyyyyyyyyyyy Looooo
| oooooooooooooooo
| oooooooooooong
author: "Foo Bar"
date: "6 March 2015"
output: html_document
---
我知道这是一篇旧文章,但我还想发表一下自己的看法:
# A Title of some kind
<br><br><br><br><br>
# Another title that has 5 blank lines above it
我无法对所选答案发表评论。首选解决方案会在标题内创建表格时出现警告。多行标题的正确方法应该是:
---
title: |
Quite long title want the
line break at the asterisk
output: html_document
---