svmiller / svm-r-markdown-templates

This is my (deprecated) suite of R Markdown templates for academic manuscripts, beamer presentations, and syllabi. DOWNLOAD {stevetemplates} INSTEAD.
http://svmiller.com/stevetemplates/
Other
896 stars 737 forks source link

Error rendering PDF manuscript using the tex template #20

Open jananiravi opened 5 years ago

jananiravi commented 5 years ago

Thanks for uploading these helpful templates, @svmiller! I'm trying to write an academic MS using RMarkdown and am trying a bunch of options including distill (previously, radix) by @jjallaire.

I would like to check out your article template for the PDF version but I am encountering the following error.

Input (yaml)

  pdf_document:
    latex_engine: pdflatex
    number_sections: true
    fig_caption: true
    keep_tex: true
    citation_package: natbib
    template: "templates/svm-latex-ms.tex"

Output (error)

"template" (line 1059, column 152):
unexpected "<"
expecting letter
Error: pandoc document conversion failed with error 5
Execution halted

I tried some of these solutions since a similar error was described (https://github.com/rstudio/tufte/issues/56), but haven't been able to fix it yet. Please advise. thanks!

JDLeongomez commented 5 years ago

Hi @svmiller. Thanks for this. I am experiencing the same problem, with both a ms I was working on, and the article template.

The only difference, being in the line (769 in my case):

"template" (line 769, column 152):
unexpected "<"
expecting letter
Error: pandoc document conversion failed with error 5
Execution halted

I also tried the solutions @jananiravi mentioned with no success.

svmiller commented 5 years ago

FWIW, I'm not getting anything out of the ordinary on my end. For both of you, could you please share a MWE from the raw .tex file for your MWEs?

zlkrvsm commented 3 years ago

I think this problem was caused by Saving link as... the template file. I had a similar problem and when I opened the template it had saved the html code of the page rather than the TeX code. Maybe try redownloading the templates once the file has been opened in github or copy-pasting into a new .tex file.

neo-mashiro commented 3 years ago

This is interesting, I've been using this for a long time in 2019 and 2020, never had an issue with it. The last time I used it was around Mar 2020. Today when I run knitr, I saw the same compilation error, which is really strange. I tried to compile the .tex template alone without R markdown, turned out to be successful, not sure why the R-markdown pandoc is complaining about it.