Closed wjones127 closed 8 years ago
Were you able to have multiple paragraphs in the abstract if you made this change? That was the initial reason why I used \n
but it appears that functionality was changed in rmarkdown
or knitr
over the last few months.
Oh you are right; this way line breaks do not appear at all. I suppose I should do more testing later to see if there is a way to keep the new line and fix the problem with my YAML headers.
This is an unsatisfying workaround, but I have just figured out I can use LaTeX's \newline
command to make new lines in these sections while using the space separator. This is what I am using in my thesis for now.
Did you have to put dollar signs around \newline
to get it to work? I did...
So I was playing around with it a little more. I don't know why you had to have dollar signs around \newline
, but I discovered \\
doesn't work, but \par
does (and is more appropriate than \newline
). If I figure out anything else I will let you know.
I think your solution of changing it to ' '
from "\n"
and then using \par
is the way to go. That appears to be working for me. I'll make the change as soon as I can and add an example to the template for each of the different files: abstract.Rmd
, dedication.Rmd
, etc. Thanks again!
I tweaked a few other things as well and made the change to \par
. Thanks, @wjones127!
When I tried adding multiline Rmd files for abstract, preface, and other pages, I ended up getting the following error:
I realized this was because the
pasteLines
function was adding newlines in the YAML header, which ended up breaking the YAML indentation format. So instead, I propose here to use a space (' '
) instead of a newline character (\n
). This is less readable in the markdown, but at least it compiles 👌