Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
402 views
in Technique[技术] by (71.8m points)

r - How can I force a line break in rmarkdown's title?

I have a quite long title in a rmarkdown document and I would like to force a line break in a specific position.

Minimum example:

---
title: "Quite long title want the * line break at the asterisk"
output: html_document
---

I have tried: , ewline, \ 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.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Try using a pipe | in each line:

---
title: |
  | Veryyyyyyy  
  | yyyyyyyyyyyyyy Looooo  
  | oooooooooooooooo
  | oooooooooooong 

author: "Foo Bar"
date: "6 March 2015"
output: html_document
---

enter image description here


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...