hebrewseniorlife / memor

rmarkdown template that supports customizable logo, company info, etc.
https://hebrewseniorlife.github.io/memor/
90 stars 8 forks source link

Issue with Knit-ting #14

Open JKHopf opened 3 years ago

JKHopf commented 3 years ago

Hi,

I really love the look of the memor template, but I can't get it to knit to pdf_memo. The following issue is consistently output:

"! Missing $ inserted.

$ l.318 N ote that the \texttt{echo\ =\ FALSE} parameter was added to the code Try to find the following text in test.Rmd: N You may need to add $ $ around a certain inline R expression `r ` in test.Rmd (see the above hint). See https://github.com/rstudio/rmarkdown/issues/385 for more info. Error: LaTeX failed to compile test.tex. See https://yihui.org/tinytex/r/#debugging for debugging tips. See test.log for more info. Execution halted" I have even tried with the template .Rmd file that RStudio gives when you open a new file (see copy of code below). Can you suggest any fixes? Cheers ![image](https://user-images.githubusercontent.com/36061539/118918222-c6a5d100-b975-11eb-88b5-9d7a222a284e.png)
timothytsai commented 1 year ago

So sorry for the delay! Looks like the error is being caused by the special character underscore "_" in the example on line 12 of the yaml, here is a corrected version (also use_profile is true/false):

--- title: "test" author: "JESS" date: "20/05/2021" output: memor::pdf_memo: use_profile: false company: name: Your company's name address: Your address phone: 888.888.8888 email: youremail@email.com short_title: short title footer_on_first_page: yes toc: yes lot: yes lof: yes number_sections: yes latex_engine: xelatex ---

If you need to use a special character like an underscore or colon within the YAML header, you'd need to escape the symbol as follows: your$\_$email@email.com or $\colon$