mitchelloharawild / vitae

R Markdown Résumés and CVs

Home Page:https://pkg.mitchelloharawild.com/vitae/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

! Missing } inserted error

nsigitsutanto opened this issue · comments

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.

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

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.