Running examples in ‘starticles-Ex.R’ failed
The error most likely occurred in:

> ### Name: starticles
> ### Title: A Generic, Publisher-Independent Template for Writing Scientific
> ###   Documents in 'rmarkdown'
> ### Aliases: starticles
> ### Keywords: package
> 
> ### ** Examples
> 
> # Use a temporary directory ----------------------------
> owd = getwd()
> td = tempfile()
> dir.create(td,recursive=TRUE)
> setwd(td)
> print(td) # To see where files will be
[1] "/tmp/RtmpOQiOng/working_dir/RtmpkCfur9/file1d4e0251073f22"
> 
> # Create the draft template ----------------------------
> rmarkdown::draft("MYARTICLENAME.Rmd","generic_article","starticles",edit=FALSE)
> 
> # Render PDF document ----------------------------------
> # Fails for me when run using RStudio "Run examples" link in help,
> # but not when sourced from command line.
> 
> # Requires recent version of pandoc (provided by RStudio)
> if (rmarkdown::pandoc_available(version="2.17"))
+   rmarkdown::render("MYARTICLENAME/MYARTICLENAME.Rmd",
+                     envir=new.env(parent = globalenv()))


processing file: MYARTICLENAME.Rmd
output file: MYARTICLENAME.knit.md

/usr/local/clang/bin/pandoc +RTS -K512m -RTS MYARTICLENAME.knit.md --to latex --from markdown+autolink_bare_uris+tex_math_single_backslash --output MYARTICLENAME.tex --lua-filter /data/gannet/ripley/R/test-clang/bookdown/rmarkdown/lua/custom-environment.lua --lua-filter /data/gannet/ripley/R/test-clang/rmarkdown/rmarkdown/lua/pagebreak.lua --lua-filter /data/gannet/ripley/R/test-clang/rmarkdown/rmarkdown/lua/latex-div.lua --embed-resources --standalone --template generic_article_template.tex --number-sections --highlight-style tango --pdf-engine pdflatex --wrap preserve --variable tables=yes --standalone -Mhas-frontmatter=false --citeproc 
! Undefined control sequence.
l.364 ...ticle at the end of a sentence (\citeproc
                                                  {ref-horvath2018dna}{Horva...

Error: LaTeX failed to compile MYARTICLENAME.tex. See https://yihui.org/tinytex/r/#debugging for debugging tips. See MYARTICLENAME.log for more info.
Execution halted