Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Insert a linebreak in title

How do I insert a linebreak in the title of an rmarkdown document? This does not work:

---
title: "title \break subtitle"
output: pdf_document 
---`
like image 337
Michael Avatar asked Mar 19 '15 18:03

Michael


People also ask

How to add line break in the widget title?

If you try to add HTML tags in the widget title, they will be stripped before the widget content is output. So if you want to add Line Break in the widget title, you will need to perform some code jugglery. In this post I will share a simple technique which you can use to insert line break in the widget title.

How do I add a line break to a text file?

Hit the key combination Shift + Enter to create a line break. You will now be able to add content in the line right after the break. Notice that the cursor will not situate itself in the blank space where the break is when you click on the space. This is the line break.

How to add/start new line in title tag?

Add/Start New Line In Title Tag. 3.) You Can Add Unlimited Lines In A Title Tag. 4.) Add This Code In Any Title Tag Like Link,Image,DIV etc. 5.) Simple And Easy To Use Code To Add Line Break. How To Add In Blog/Website? 1.) Just Go To Your HTML File. 2.) Now Copy The Below Code And Paste It Between “ <body> </body> “. 3.) Save It, Now You Are Done.

How to add line break in blog/website?

Simple And Easy To Use Code To Add Line Break. How To Add In Blog/Website? 1.) Just Go To Your HTML File. 2.) Now Copy The Below Code And Paste It Between “ <body> </body> “. 3.) Save It, Now You Are Done. <a href=" URL " title=" Line1Line2Line3 "> Link Text </a> 1.)


1 Answers

Use pipes

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 
---

enter image description here

This is a duplicate but I can't find the original.

edit: here it is!

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

like image 123
rawr Avatar answered Oct 25 '22 11:10

rawr