Render works with knit button but not with rmarkdown::render

Hi there! I have a problem I can't get to the bottom of. I have an Rmd document with PDF as output, rendered through lualatex. When I render this using the Knit button, everything works flawlessly, but when I run the exactly same file using the rmarkdown::render() function, it fails with an "undefined control sequence" error.

If someone would have an idea on why this is happening and how I could solve it, that would be a life saver!

Thanks in advance and cheers!

This seems odd and it should indeed work the same.

Can you share more about the content of the document ? without more information it will be really hard to help

This topic was automatically closed 45 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.