mitchelloharawild / vitae

R Markdown Résumés and CVs
https://pkg.mitchelloharawild.com/vitae/
1.19k stars 229 forks source link

! Missing } inserted error #218

Closed nsigitsutanto closed 1 year ago

nsigitsutanto commented 1 year ago

Hi, Mitchell I want to ask something regarding "! Missing }" inserted error. I try to insert hyperlink in the tribble section. For example like this

library(tibble)
tribble(
  ~ Degree, ~ Year, ~ Institution, ~ Where,
  "Coursera", "Apr 2021", "\\href{https://www.coursera.org/account/accomplishments/specialization/certificate/VY8YVV9BZ86Q}{Google Data Analytics Certificate}", "Jakarta, Indonesia"
) %>% 
  detailed_entries(Degree, Year, Institution,.protect = F, Where)

However, when I try to run the same code template, especially this one

library(tibble)
tribble(
  ~ Degree, ~ Year, ~ Institution, ~ Where,
  "TÜV Rheinland Indonesia & Telkom University", "Nov 2019", "\\href{www.certipedia.com/quality_marks/0000072892/}{Big Data Analyst}", "Bandung, Indonesia"
) %>% 
  detailed_entries(Degree, Year, Institution, .protect = F, Where)

It always shows error like this in R console

! Missing } inserted.

} l.281 ...Analyst}}{Bandung, Indonesia}{Nov 2019}{} \vspace{-4.0mm} Error: LaTeX failed to compile CV.tex. See https://yihui.org/tinytex/r/#debugging for debugging tips. See CV.log for more info. Execution halted I've tried to modify a bit the code, but it always shows the same error. Is there any wrong in my code? Thanks in advance.
abdusali1234 commented 1 year ago

I just had this issue. I solved it by replacing the ampersand (&) with $\\&$. It should work.

mitchelloharawild commented 1 year ago

Closed as resolved. You may need to escape various characters if you use .protect = FALSE. Having .protect = TRUE will automatically escape these characters, but prevents you from being able to use LaTeX inside entries.