Search code examples
latexoverleaf

Copied project on overleaf does not display font awsome icons anymore


I copied an existing project on overleaf but it doesn't display the icons, instead shows the code, for example, the main project is:

enter image description here

but the copied project is for LinkedIn icon:

enter image description here

here is a minimal reproducible example:

\documentclass[10pt,letterpaper,roman]{moderncv}
\usepackage{array}
\usepackage{url}
\usepackage{moderncvcompatibility}
\usepackage{tikz}
\usepackage[super]{nth}
\usepackage{ulem}
\usepackage{fontawesome5}
\usepackage{enumitem}
\usepackage{filecontents}
\usepackage[scale=0.89, top=0.3in, bottom=0.35in]{geometry} 

\moderncvstyle{banking} 
\moderncvcolor{blue} 


\firstname{Shirin}
\familyname{JZ}
\email{...}
\mobile{...}
\extrainfo{\link[\faLinkedin \addvspace{1}]{...}}


\begin{document}
\makecvtitle
\end{document}

Solution

  • Two problems:

    • you can't use \addvspace{1} where you are using it. You'll get an error message because of this. Never ignore error messages...
    \documentclass[10pt,letterpaper,roman]{moderncv}
    \usepackage{array}
    \usepackage{url}
    \usepackage{moderncvcompatibility}
    \usepackage{tikz}
    \usepackage[super]{nth}
    \usepackage{ulem}
    \usepackage{fontawesome5}
    \usepackage{enumitem}
    \usepackage{filecontents}
    \usepackage[scale=0.89, top=0.3in, bottom=0.35in]{geometry} 
    
    \moderncvstyle{banking} 
    \moderncvcolor{blue} 
    
    
    \firstname{Shirin}
    \familyname{JZ}
    \email{...}
    \mobile{...}
    \extrainfo{
    \link[
    \faLinkedin %\addvspace{1}
    ]{...}}
    
    
    \begin{document}
    \makecvtitle
    \end{document}
    
    
    • the problem with the missing icon seems to be specific to the TL2021 version overleaf is using. It works fine with an updated TL2021 (as well as the TL2022 pretest) version. To avoid the problem, you can select TL2020 from the overleaf side bar:

    enter image description here

    https://www.overleaf.com/read/gdqshmnxcnvp