mitchelloharawild / vitae

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

LaTeX Error: Command \mastodonsocialsymbol undefined #265

Closed mhweber closed 2 months ago

mhweber commented 4 months ago

Trying to compile both my CV and the example template CV with vitae using moderncv gives the error:

LaTeX Error: Command \mastodonsocialsymbol undefined

Other formats seem to work fine.

My sessionInfo():

R version 4.4.0 (2024-04-24 ucrt)
Platform: x86_64-w64-mingw32/x64
Running under: Windows 11 x64 (build 22621)

Matrix products: default

locale:
[1] LC_COLLATE=English_United States.utf8  LC_CTYPE=English_United States.utf8   
[3] LC_MONETARY=English_United States.utf8 LC_NUMERIC=C                          
[5] LC_TIME=English_United States.utf8    

time zone: America/Los_Angeles
tzcode source: internal

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

loaded via a namespace (and not attached):
 [1] digest_0.6.34     utf8_1.2.4        R6_2.5.1          fastmap_1.2.0     tidyselect_1.2.1  xfun_0.45        
 [7] magrittr_2.0.3    glue_1.6.2        tibble_3.2.1      knitr_1.48        pkgconfig_2.0.3   htmltools_0.5.8.1
[13] generics_0.1.3    rmarkdown_2.27    dplyr_1.1.4       lifecycle_1.0.4   cli_3.6.2         fansi_1.0.6      
[19] vctrs_0.6.5       vitae_0.6.0       compiler_4.4.0    rstudioapi_0.15.0 tools_4.4.0       pillar_1.9.0     
[25] evaluate_0.24.0   yaml_2.3.8        rlang_1.1.2
jmmartinf commented 3 months ago

moderncv.zip Hi, I could solve this issue... there is an updated template in LateX called "moderncv", the file moderncv.cls, has lines in "% other symbols" section like these: \newcommand{\mastodonsocialsymbol} {} \newcommand{\githubsocialsymbol} {}

To solve the problem, I had to add lines (one for each pending symbol) in the LateX template that vitae library create. So, you must include these lines in moderncv.cls file, in your working directory (for security reasons). Take care with the final symbol, due to Battlenet icon is named "battlene" in fontawesome.

I started in line number 337: \newcommand{\mastodonsocialsymbol}{\faMastodon} \newcommand{\discordsocialsymbol}{\faDiscord} \newcommand{\twitchsocialsymbol}{\faTwich} \newcommand{\youtubesocialsymbol}{\faYoutube} \newcommand{\tiktoksocialsymbol}{\faTiktoksocialsymbol} \newcommand{\instagramsocialsymbol}{\faInstagramsocialsymbol} \newcommand{\soundcloudsocialsymbol}{\faSoundcloudsocialsymbol} \newcommand{\steamsocialsymbol}{\faSteamsocialsymbol} \newcommand{\xboxsocialsymbol}{\faxboxsocialsymbol} \newcommand{\playstationsocialsymbol}{\faPlaystationsocialsymbol} \newcommand{\battlenetsocialsymbol}{\faBattlenesocialsymbol}

mhweber commented 2 months ago

Thanks @jmmartinf - this solved the issue for me as well - I will close the issue.

dendroica commented 1 week ago

Thank you! This workaround worked for me, but suggest reopening as an issue or addressing in a pull request as it would be ideal for this to work out of the box