I think the following should be moved inside the template.tex file:
<!-- Leave these lines as they are at the end of your .Rmd file to ensure placement of methods & acknowledgements sections before the references-->
\showmatmethods
\showacknow
\pnasbreak
I think the following should be moved inside the
template.tex
file: