Search code examples
latexknitrsweave

How can I manually add a line break in the title in a knitr RSweave file?


Here's what I have:

\documentclass{article}

\begin{document}

\title{This is the document title}

\maketitle

\end{document}

I'd like something like this:

\documentclass{article}

\begin{document}

\title{This is 
the document title}

\maketitle

\end{document}

How can I manually add a line break in the document title?


Solution

  • Simply add a line break:

    \documentclass{article}
    
    \begin{document}
    
    \title{This is\\ 
    the document title}
    
    \maketitle
    
    \end{document}