I have been having an issue recently where when I am typing in math mode in R Markdown it ignores any new line markers when I knit the document to PDF. For example, if I type
$$ H_0: E(Y) = \beta_0 + \beta_1X \\ H_a: E(Y) \neq \beta_0 +\beta_1X $$
I get the following output when I knit the document:
It's strange because in the preview when editing the document the output appears correctly with each hypothesis appearing on its own line. I should also note that this only seems to happen when knitting to PDF, and the formatting works perfectly fine when knitting to HTML.
Any help would be greatly appreciated.