I often have questions about using LaTeX in Rmarkdown, specifically about changing the header of the TeX file from within Rmarkdown, using header-includes
and suppressing some of the default functions.
For example, this solution works in a TeX file, but does not work in header-includes
, because of spaces, enters, or entire commands that cannot be entered there.* Removing spaces and commands until it does work is often the only solution. As far as I'm concerned, header-includes
sends arguments followed by a dash -
to a new rule in the header, so I'd like to understand why certain commands don't work.
When Googling these problems, there is often limited information concerning Rmarkdown specifically so I would like to know if there is a better place for these questions or whether they are appropriate for tex.stackexchange.com.
I am asking because of this question that I have been meaning to ask, but wasn't sure whether I could ask here.
* Removing all comments, {}[]
after each new command and removing all enters and spaces works in Rmarkdown, but I do not understand the reason for it.
Edit
To clarify, I am referring to using LaTeX in an Rmarkdown file, not using Rmarkdown's own syntax.
pandoc
does the conversion and you can put raw latex into your document I think. So I think that the questions are in principle on topic. That being said, I think you may well get some pushback in comments from people who will think it is off topic.