Split the title into multiple lines?

In an R markdown document (html and presentations), is it possible to manually split the title into several lines? I tried playing with pipes that produce a sharp exit.

--- title: 'A title I want to split on two lines' author: date: output: ioslides_presentation --- 
+15
source share
3 answers

For HTML, only the <br> tag is output, and if your output is a PDF or PDF presentation standard, then the LaTeX line break code specified by \\ should work.

Example

 --- title: 'A title I want to <br> split on two lines' author: date: output: ioslides_presentation --- 

For pdf

Just to exclude the possibilities, I tried to put \\ or \newline , both are not separated, so for PDF it seems a little more complicated. \linebreak stop parsing. Perhaps another user can solve this issue for knitr PDF files.

+17
source

For output in PDF format, the experiments showed that the following works:

 --- title: 'A title I want to \nsplit on two lines' author: date: output: pdf_document --- 

These are two spaces followed by \n .

+13
source

Examples of adding abstraction show the use of pipes | break lines and include paragraphs. This also works for the name and other elements of barley. For abstract or title:

 --- abstract: | What works for the abstract. Works for the title, too! title: | | title | subtitle output: pdf_document --- 
+13
source

Source: https://habr.com/ru/post/988194/


All Articles