Will work in one RMD file but not in another. The non-working RMD is more complex, with tables (kable, kableExtra) does contain one option for knitr to format tables for latex, but that's it. The non-working RMD uses the same mystyle.sty for the font choice, etc. Hangs up the PDF creation when I use the code for the YMAL title.
Silly as it seems, do you have the requisite --- both above and below the code? YAML is whitespace-sensitive, too, so you might try rebuilding it up piece by piece.
Other than the pandoc documentation itself, my best recs would be:
Total shot in the dark but I have had a few times where I have copied something with a quotation mark from somewhere else and pasted it into my code and it turned out to be a stylized quotation mark, not your run of the mill " or ' that Rmd recognizes.
Any chance one of the parts in quotes of your non-working YAML arent turning yellow (or whatever color your highlighter makes strings)?
Alas, yes, I read through the kableExtra PDF and tried the package load method, which continues to throw the same error message -- and rejects LaTex color assignments further down the document between chunks. I don't know enough LaTex to fix this.
I get the error even if I eliminate the entire 6 lines devoted to the font selection and title formatting. If its a choice between kableExtra table formats and color headings, I'll choose kableExra.