# Class moderncv error: undefined control sequence \gitlabsocialsymbol

I'm having problems to display the favicon for Gitlab in my moderncv project. I think it has to do with my installation of moderncv.

I'm on a Ubuntu machine and first I installed texlive-latex-extra.

After some googling I found out that the moderncv version in TeX Live is out of date. So I cloned the moderncv git repo and put it into /home/{user}/texmf/tex/latex/moderncv.


$e=\lim_{n \to \infty} \left(1+\frac{1}{n}\right)^n$

\makeletterclosing

%\clearpage\end{CJK*}                              % if you are typesetting your resume in Chinese using CJK; the \clearpage is required for fancyhdr to work correctly with CJK, though it kills the page numbering by making \lastpage undefined
\end{document}

%% end of file template.tex'.


I get the following error:

Undefined control sequence.
\gitlabsocialsymbol ->{\small \faGitlab


If it makes any difference I'm using VS Code with the LaTeX Workshop plugin. I think the compiler it is using is latexmk.

If I take out the line social[gitlab]{jdoe} everything works fine.

Would be much appreciated if anyone could help me sort out these issues. Happy to provide any additional info that is needed.

• Welcome to TeX StackExchange. If you had to manually update moerncv, most likely the fontawesome package is out of date too. Sadly, manually updating fontawesome is a bit more advanced and might require even more updates of other packages. So I would recommend replacing the whole TeX Live version packaged for Ubuntu with an up-to-date version of TeX Live. See here for details how to install "vanilla" TeX Live on Ubuntu. – Marcel Krüger Mar 5 '19 at 16:41
• Thanks for your reply! Yes I think you are right in regards to fontawesome. I was using a version from 2015. I just tried to update by downloading a package from ctan and putting the files in my local texmf folder. It does compile now with the Gitlab favicon but the icons are all wrong now and I get warnings that fonts were substitued. I guess I will try your way and install up-to-date TeX Live. – c_student Mar 5 '19 at 16:51

You did not tell us which versions of modencv and fontawesome you use.

At last ubuntu (and debian) installed an outdated version of TeX Live. Better is to use the original TeX Live you can install following this question.

If you want to try only installation of fontawesome on Ubuntu, use the command:

sudo apt-get install texlive-fonts-extra


Make sure that the FNDB is updated and that all font maps are loaded (I do not use ubuntu, I do not know how that is done with that OS).

After installing TeX Live new you lost your manualy updated moderncv. Therefore it is better to add the needed changes to moderncv into the preamble of your cv.

Please see the following code (I marked all important code changings with <=========; Please see that I changed http in the links to the today used and more secure https):

\documentclass[11pt,a4paper,sans]{moderncv}

% moderncv themes
\moderncvstyle{casual} % casual, classic, banking, oldstyle and fancy
\moderncvcolor{blue}

\usepackage[utf8]{inputenc}

\usepackage[scale=0.75]{geometry}

\ifthenelse{\equal{#1}{}}%
{\href{https://#2}{#2}}%
{\href{https://#2}{#1}}}

\newcommand*{\xingsocialsymbol}    {{\small\faXing}~} % <===============
\newcommand*{\gitlabsocialsymbol}  {{\small\faGitlab}~} % <=============

\makeatletter % <=======================================================
\RenewDocumentCommand{\social}{O{}O{}m}{%
\ifthenelse{\equal{#2}{}}%
{%
}
\makeatother % <========================================================

% personal data
\name{John}{Doe}
\title{Resumé title}
\phone[mobile]{+1~(234)~567~890}
\phone[fixed]{+2~(345)~678~901}
\phone[fax]{+3~(456)~789~012}
\email{john@doe.org}
\homepage{www.johndoe.com}
\social[xing]{john\_doe} % <============================================
\social[github]{jdoe}
\social[gitlab]{jdoe}
\social[skype]{jdoe} % <================================================
\quote{Some quote}

\setlength{\footskip}{66pt}

\begin{document}

\makecvtitle

\section{Education}
\cventry{year--year}{Degree}{Institution--3}{City--4}{\textit{Grade}--5}{Description--6}  % arguments 3 to 6 can be left empty

\section{Master thesis}
\cvitem{title}{\emph{Title}}
\cvitem{supervisors}{Supervisors}
\cvitem{description}{Short thesis abstract}

\section{Experience}
\subsection{Vocational}
\cventry{year--year}{Job title}{Employer}{City}{}{General description
no longer than 1--2 lines.\newline{}%
Detailed achievements:%
\begin{itemize}%
\item Achievement 1;
\item Achievement 2, with sub-achievements:
\begin{itemize}%
\item Sub-achievement (a);
\item Sub-achievement (b), with sub-sub-achievements (don't do this!);
\begin{itemize}
\item Sub-sub-achievement i;
\item Sub-sub-achievement ii;
\item Sub-sub-achievement iii;
\end{itemize}
\item Sub-achievement (c);
\end{itemize}
\item Achievement 3.
\end{itemize}}
\cventry{year--year}{Job title}{Employer}{City}{}{Description
line 1\newline{}Description line 2}
\subsection{Miscellaneous}
\cventry{year--year}{Job title}{Employer}{City}{}{Description}

\section{Languages}
\cvitemwithcomment{Language 1}{Skill level}{Comment}
\cvitemwithcomment{\textbf{Language} 2}{\textbf{Skill} level}{Comment}
\cvitemwithcomment{Language 3}{Skill level}{Comment}

\section{Computer skills}
\cvdoubleitem{category 1}{XXX, YYY, ZZZ}{category 4}{XXX, YYY, ZZZ}
\cvdoubleitem{category 2}{XXX, YYY, ZZZ}{category 5}{XXX, YYY, ZZZ}
\cvdoubleitem{category 3}{XXX, YYY, ZZZ}{category 6}{XXX, YYY, ZZZ}

\section{Interests}
\cvitem{hobby 1}{Description}
\cvitem{hobby 2}{Description}
\cvitem{hobby 3}{Description}

\section{Extra 1}
\cvlistitem{Item 1}
\cvlistitem{Item 2}
\cvlistitem{Item 3. This item is particularly long and therefore
normally spans over several lines. Did you notice the indentation
when the line wraps?}

\section{Extra 2}
\cvlistdoubleitem{Item 1}{Item 4}
\cvlistdoubleitem{Item 2}{Item 5}
\cvlistdoubleitem{Item 3}{Item 6. Like item 3 in the single column list before, this item is particularly long to wrap over several lines.}

\section{References}
\begin{cvcolumns}
\cvcolumn{Category 1}{\begin{itemize}\item Person 1\item Person 2\item Person 3\end{itemize}}
\cvcolumn{Category 2}{Amongst others:\begin{itemize}\item Person 1, and\item Person 2\end{itemize}(more upon request)}
\cvcolumn[0.5]{All the rest \& some more}{\textit{That} person, and \textbf{those} also (all available upon request).}
\end{cvcolumns}

\end{document}


and its result:

This is compiled with current class moderncv 2.0.0 (that one from ctan, not from the github!), current fontawesome fontawesome.sty 2016/05/15 v4.6.3.1 font awesome icons and current MiKTeX pdfTeX, Version 3.14159265-2.6-1.40.20 (MiKTeX 2.9.6960 64-bit).

• Thanks! It's working now after I installed the newest version of texlive and fontawesome. Even without your tweaks. Interestingly the Gitlab social symbol is not working when I use classic style for moderncv instead of casual. I guess it is because moderncv uses different icons for the classic style. Can you confirm that the Gitlab icon does work for you in classic style? Also I prefer the casual symbols anyway, so is there a simple way to switch between them or do I have to redefine them like you did? – c_student Mar 6 '19 at 17:34
• @c_student in classic style the command \moderncvicons{marvosym} is used. You can use fontawesome with adding \moderncvicons{awesome} before \begin{document} and after \moderncvstyle{classic} ... – Mensch May 30 '19 at 16:40
• I know the topic is a bit older, but with a 1:1 copy in texmaker (UTF-8) I still get 3 errors which I can not get solved: ! LaTeX Error: Command \httpslink already defined. ! LaTeX Error: Command \xingsocialsymbol already defined. the same for \gitlabsocialsymbol and \skypesocialsymbol and 2nd question: ! Package inputenc Error: Invalid UTF-8 byte sequence. i am normal in iso-8859-15 for the test i just created a new utf-8 document now. Can this be easily converted later? I could not figure it out from some sources. – protter Feb 26 at 17:49
• @protter meanwhile exists version 2.1 of class moderncv with included command \httpslink and included xing and skype etc symbols. Check the logfile to confirm you are using version 2.1. Then comment my additions in the mwe above and try again. If you still have errors please ask a new question with your current code resulting in errors ... – Mensch Mar 1 at 23:39