Closed yiqinfu closed 5 years ago
having the same issue. Possibly related to #45?
No, not related to #45. The error message says that the fontawesome package has been found but that the folder containing the fonts is missing.
This is what I see when I find files in the /Users/username/Library/TinyTeX/
directory that have fontawesome
in their names (the find . -name "fontawesome"
command):
./texmf-dist/tex/latex/fontawesome
./texmf-dist/fonts/tfm/public/fontawesome
./texmf-dist/fonts/opentype/public/fontawesome
./texmf-dist/fonts/type1/public/fontawesome
./texmf-dist/fonts/enc/dvips/fontawesome
./texmf-dist/fonts/map/dvips/fontawesome
Is there anything that I'm missing?
Possibly related to this issue: https://github.com/posquit0/Awesome-CV/pull/191
Also being discussed in tinytex https://github.com/yihui/tinytex/issues/98
I think we can move the discussion back here now. TL;DR: https://github.com/yihui/tinytex/issues/98#issuecomment-467549685 With TinyTeX (meaning all latest CTAN packages), the CRAN version of vitae works, but the Github version is broken.
I had the same issue as yiqinfu. I removed the dev version of vitae
and installed the CRAN version. I tried compiling again after restarting my R session, and it gave me the same error. What got me past the compilation error was to delete the document, and create a new one. Just in case someone else is running into the same issue.
@boryanakis Thanks for the tip! That was because the current Github version of vitae copies a different (updated) version of moderncv.cls
to the directory of the Rmd file. I guess that moderncv.cls
should be the culprit.
Good to know, @yihui! I wasn't sure it would be useful for debugging but I thought it wouldn't hurt to mention it.
Thanks for working this one out @yihui - had me puzzled for a bit.
Do you have any suggestions for how .cls
and .sty
files should be handled? Ideally they would not clutter the user's folder, update when the package updates, but still allow users to customise them by having a copy of it in the same folder as the .Rmd
.
I don't have a suggestion here since I'm not really familiar with moderncv.cls
. I tend to use packages from CTAN if possible, instead of maintaining modified copies of LaTeX packages (but that is only because I'm not familiar with the internals).
in the meantime, does anyone know if there is a commit where the icons show up correctly for moderncv, AND it knits without errors?
I'm having no issues with knitting and icons with the latest development version. Trying it out with the njtierney example gives me this when using
output:
vitae::moderncv:
theme: classic
Closing this issue now, as the solution has been found.
If updating the package causes issues with moderncv
, please delete the .cls
and .sty
files from the folder containing your *.Rmd
. For LaTeX packages not being found, tinytex does a great job at installing them when required.
Further issues relating to icons can be brought up as a new issue.
I'm still getting the same error with the development version with a brand new moderncv template.
I'm not sure I understand why this was closed. I'm still getting this error with the newest development version of vitae with a brand new moderncv template.
I've just tested this again with the development version and it is working fine. Are you using tinytex (or have the fontawesome ctan package installed)? Have you deleted your old .cls and .sty files?
I have the development version, I deleted old .cls and .sty files (I also tried making a new CV from scratch) and I have tinytex. tinytex is still doing the following:
Search for FontAwesome
tlmgr search --file --global '/FontAwesome[.](tfm|afm|mf|otf)'
Doesn't find it, so it tries to install
Trying to automatically install missing LaTeX packages...
tlmgr install fontawesome
tlmgr: package repository http://mirror.las.iastate.edu/tex-archive/systems/texlive/tlnet (not verified: gpg unavailable)
tlmgr install: package already present: fontawesome
tlmgr path add
tlmgr search --file --global '/FontAwesome[.](tfm|afm|mf|otf)'
! Package fontspec Error: The font "FontAwesome" cannot be found.
Error: Failed to compile CV.tex. See https://yihui.name/tinytex/r/#debugging for debugging tips. See CV.log for more info.
In addition: Warning message:
4 failed to parse.
Execution halted
@yiqinfu, did you get this to work? I'm still getting the same error.
Same font awesome problem here. I started off with a clean directory (no cls or sty files) and used the dev version of vitae.
> sessionInfo()
R version 3.5.1 (2018-07-02)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS 10.14.4
Matrix products: default
BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.5/Resources/lib/libRlapack.dylib
locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
attached base packages:
[1] stats graphics grDevices utils datasets
[6] methods base
loaded via a namespace (and not attached):
[1] Rcpp_1.0.1 compiler_3.5.1 pillar_1.3.1
[4] prettyunits_1.0.2 remotes_2.0.3 tools_3.5.1
[7] digest_0.6.18 pkgbuild_1.0.3 pkgload_1.0.2
[10] memoise_1.1.0 evaluate_0.13 tibble_2.1.1
[13] pkgconfig_2.0.2 rlang_0.3.4 cli_1.1.0
[16] rstudioapi_0.10 curl_3.3 yaml_2.2.0
[19] xfun_0.6 withr_2.1.2 dplyr_0.8.0.1
[22] knitr_1.22 desc_1.2.0 fs_1.2.7
[25] devtools_2.0.2 rprojroot_1.3-2 tidyselect_0.2.5
[28] vitae_0.1.0.9000 glue_1.3.1 R6_2.4.0
[31] processx_3.3.0 rmarkdown_1.12 sessioninfo_1.1.1
[34] callr_3.2.0 purrr_0.3.2 magrittr_1.5
[37] backports_1.1.3 ps_1.3.0 htmltools_0.3.6
[40] usethis_1.5.0 assertthat_0.2.1 crayon_1.3.4
If I use the CRAN version of vitae, I can knit the PDF, but the social media section is not showing.
@mitchelloharawild Seems like this is still not working, at least for a couple of us. Is there anything else I can do to try to make a reproducible example? Do you think it's a vitae
issue or a tinytex
issue?
Could you try this out on your system?
If this causes an error, then the issue is with your LaTeX setup (potentially an issue with tinytex
, but I'm not entirely familiar with how it installs CTAN packages).
---
output: pdf_document
header-includes:
- \usepackage{fontawesome}
---
\faStar
@mitchelloharawild This works! I can knit the PDF, and I see the star.
Good to know! So the issue is likely with the vitae
templates.
Can you provide me with a minimally reproducible example of the error using vitae?
Is this working for you?
---
name: Marie Curie
position: "Professor"
address: "School of Physics & Chemistry, École Normale Supérieure"
phone: +1 22 3333 4444
www: mariecurie.com
email: "Marie.Curie@ens.fr"
twitter: mariecurie
github: mariecurie
linkedin: mariecurie
date: "`r format(Sys.time(), '%B %Y')`"
output: vitae::moderncv
---
{r setup, include=FALSE}
knitr::opts_chunk$set(echo = FALSE, warning = FALSE, message = FALSE)
library(vitae)
# Some stuff about me
* I poisoned myself doing research.
* I was the first woman to win a Nobel prize
* I was the first person and only woman to win a Nobel prize in two different sciences.
It returns the same "font awesome" error we saw in the past.
The following works though, including the social media icons. I tried a bunch of other templates, and moderncv is the only one that returns the "font awesome" error.
---
name: Marie Curie
position: "Professor"
address: "School of Physics & Chemistry, École Normale Supérieure"
phone: +1 22 3333 4444
www: mariecurie.com
email: "Marie.Curie@ens.fr"
twitter: mariecurie
github: mariecurie
linkedin: mariecurie
date: "`r format(Sys.time(), '%B %Y')`"
output: vitae::hyndman
---
{r setup, include=FALSE}
options(tinytex.verbose = TRUE)
# Some stuff about me
* I poisoned myself doing research.
* I was the first woman to win a Nobel prize
* I was the first person and only woman to win a Nobel prize in two different sciences.
Exact same answers as @yiqinfu. To clarify, the last example works because of the change to the hyndman template, not because of tinytex.verbose = TRUE
Thanks for your persistence with this issue, and sorry for the trouble in reproducing it.
I've been able to reproduce it in a docker container and changing the latex engine to pdflatex appears to have fixed this issue.
Can you try this again and let me know if it works?
I reinstalled the dev version of vitae and tried the following. The PDF does compile, but all the social media information isn't showing. (Thank YOU for your help!)
---
name: Marie Curie
position: "Professor"
address: "School of Physics & Chemistry, École Normale Supérieure"
phone: +1 22 3333 4444
www: mariecurie.com
email: "Marie.Curie@ens.fr"
twitter: mariecurie
github: mariecurie
linkedin: mariecurie
date: "`r format(Sys.time(), '%B %Y')`"
output: vitae::moderncv
---
{r setup, include=FALSE}
knitr::opts_chunk$set(echo = FALSE, warning = FALSE, message = FALSE)
library(vitae)
# Some stuff about me
* I poisoned myself doing research.
* I was the first woman to win a Nobel prize
* I was the first person and only woman to win a Nobel prize in two different sciences.
Can you try this, and send me a copy of the generated .pdf
and .tex
?
---
name: Marie Curie
position: "Professor"
address: "School of Physics & Chemistry, École Normale Supérieure"
phone: +1 22 3333 4444
www: mariecurie.com
email: "Marie.Curie@ens.fr"
twitter: mariecurie
github: mariecurie
linkedin: mariecurie
date: "`r format(Sys.time(), '%B %Y')`"
output:
vitae::moderncv:
keep_tex: true
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = FALSE, warning = FALSE, message = FALSE)
library(vitae)
looks like it's working for me now. Thanks!
The social media for this template is located in the footer. It looks like everything is working now.
Thanks so much! Should’ve scrolled down... =)
Good to know! So the issue is likely with the
vitae
templates. Can you provide me with a minimally reproducible example of the error using vitae?Is this working for you?
--- name: Marie Curie position: "Professor" address: "School of Physics & Chemistry, École Normale Supérieure" phone: +1 22 3333 4444 www: mariecurie.com email: "Marie.Curie@ens.fr" twitter: mariecurie github: mariecurie linkedin: mariecurie date: "`r format(Sys.time(), '%B %Y')`" output: vitae::moderncv --- {r setup, include=FALSE} knitr::opts_chunk$set(echo = FALSE, warning = FALSE, message = FALSE) library(vitae) # Some stuff about me * I poisoned myself doing research. * I was the first woman to win a Nobel prize * I was the first person and only woman to win a Nobel prize in two different sciences.
I have the same issue as @Aariq did. This template works for me, but when running my own the error occurs again. I deleted and removed the Vitae package, deleted moderncv.cls and reinstalled Tinytex for a few times. Also, I reinstalled the Vitae package from CRAN. Below is my errors and session info. Is there any alternative solution?
This is XeTeX, Version 3.14159265-2.6-0.999992 (TeX Live 2020) (preloaded format=xelatex) restricted \write18 enabled. entering extended mode
kpathsea: Running mktextfm FontAwesome /Users/huaxinwanglu/Library/TinyTeX/texmf-dist/web2c/mktexnam: Could not map source abbreviation for FontAwesome. /Users/huaxinwanglu/Library/TinyTeX/texmf-dist/web2c/mktexnam: Need to update ? mktextfm: Running mf-nowin -progname=mf \mode:=ljfour; mag:=1; ; nonstopmode; input FontAwesome This is METAFONT, Version 2.7182818 (TeX Live 2020) (preloaded base=mf)
kpathsea: Running mktexmf FontAwesome
! I can't find file `FontAwesome'. <*> ...r; mag:=1; ; nonstopmode; input FontAwesome
Please type another input file name ! Emergency stop. <*> ...r; mag:=1; ; nonstopmode; input FontAwesome
Transcript written on mfput.log. grep: FontAwesome.log: No such file or directory mktextfm: `mf-nowin -progname=mf \mode:=ljfour; mag:=1; ; nonstopmode; input FontAwesome' failed to make FontAwesome.tfm. kpathsea: Appending font creation commands to missfont.log. tlmgr search --file --global '/FontAwesome.' tlmgr search --file --global '/mktextfm' Trying to automatically install missing LaTeX packages... tlmgr install fontawesome texlive-scripts tlmgr: package repository http://ctan.mines-albi.fr/systems/texlive/tlnet (not verified: gpg unavailable) tlmgr install: package already present: fontawesome tlmgr install: package already present: texlive-scripts This is XeTeX, Version 3.14159265-2.6-0.999992 (TeX Live 2020) (preloaded format=xelatex) restricted \write18 enabled. entering extended mode
kpathsea: Running mktextfm FontAwesome /Users/huaxinwanglu/Library/TinyTeX/texmf-dist/web2c/mktexnam: Could not map source abbreviation for FontAwesome. /Users/huaxinwanglu/Library/TinyTeX/texmf-dist/web2c/mktexnam: Need to update ? mktextfm: Running mf-nowin -progname=mf \mode:=ljfour; mag:=1; ; nonstopmode; input FontAwesome This is METAFONT, Version 2.7182818 (TeX Live 2020) (preloaded base=mf)
kpathsea: Running mktexmf FontAwesome
! I can't find file `FontAwesome'. <*> ...r; mag:=1; ; nonstopmode; input FontAwesome
Please type another input file name ! Emergency stop. <*> ...r; mag:=1; ; nonstopmode; input FontAwesome
Transcript written on mfput.log. grep: FontAwesome.log: No such file or directory mktextfm: `mf-nowin -progname=mf \mode:=ljfour; mag:=1; ; nonstopmode; input FontAwesome' failed to make FontAwesome.tfm. kpathsea: Appending font creation commands to missfont.log. tlmgr search --file --global '/FontAwesome.' tlmgr search --file --global '/mktextfm' ! Package fontspec Error: The font "FontAwesome" cannot be found.
Error: LaTeX failed to compile R_CV.tex. See https://yihui.org/tinytex/r/#debugging for debugging tips. See R_CV.log for more info. Execution halted
sessionInfo() R version 4.0.3 (2020-10-10) Platform: x86_64-apple-darwin17.0 (64-bit) Running under: macOS Big Sur 10.16
Matrix products: default LAPACK: /Library/Frameworks/R.framework/Versions/4.0/Resources/lib/libRlapack.dylib
locale: [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
attached base packages: [1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] crayon_1.3.4 digest_0.6.27 dplyr_1.0.2 R6_2.5.0
[5] lifecycle_0.2.0 magrittr_2.0.1 evaluate_0.14 pillar_1.4.7
[9] rlang_0.4.9 rstudioapi_0.13 ellipsis_0.3.1 vctrs_0.3.6
[13] generics_0.1.0 rmarkdown_2.6 tools_4.0.3 glue_1.4.2
[17] purrr_0.3.4 tinytex_0.28 xfun_0.19 yaml_2.2.1
[21] compiler_4.0.3 pkgconfig_2.0.3 htmltools_0.5.0 vitae_0.3.0
[25] tidyselect_1.1.0 knitr_1.30 tibble_3.0.4
Thanks for your persistence with this issue, and sorry for the trouble in reproducing it.
I've been able to reproduce it in a docker container and changing the latex engine to pdflatex appears to have fixed this issue.
Can you try this again and let me know if it works?
Switching to pdflatex also works for me, but in this case we cannot customize the font style. The problem with fontawesome isn't indeed solved in this way.
Okay, I have just worked it out! The only thing I did which makes a difference from continue errors is to replace \newfontfamily{\FA}{FontAwesome}
in fontawesome.sty with\newfontfamily{\FA}{FontAwesome.otf}
.
So, just add a ''.otf'' solve the problem!
I'm having trouble knitting the Marie Curie CV template.
The code is:
I get the following error:
Knitting other Rmd files to PDF works, so I think this is a
vitae
-specific issue. I'm using TinyTex.Thanks!