如何在 rmarkdown 的标题中强制换行? [英] How can I force a line break in rmarkdown's title?
本文介绍了如何在 rmarkdown 的标题中强制换行?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在 rmarkdown 文档中有一个很长的标题,我想在特定位置强制换行.
I have a quite long title in a rmarkdown document and I would like to force a line break in a specific position.
最小示例:
---
title: "Quite long title want the * line break at the asterisk"
output: html_document
---
我尝试过:\n、\newline、\\ 和手动换行符.它们似乎都不起作用.
I have tried: \n, \newline, \\ and a manual line break. None of them seem to work.
我相信它必须非常简单,但我一直无法找到解决方案.
I believe it has to be quite straightforward but I haven't been able to find a solution.
推荐答案
尝试在每一行中使用管道 |
:
Try using a pipe |
in each line:
---
title: |
| Veryyyyyyy
| yyyyyyyyyyyyyy Looooo
| oooooooooooooooo
| oooooooooooong
author: "Foo Bar"
date: "6 March 2015"
output: html_document
---
这篇关于如何在 rmarkdown 的标题中强制换行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文