1

In moderncv: I added my xing profile using \extrainfo according to this source

However, the link is http and I'd like to change to https.

Additional Info: It might be possible to adapt this instruction on how to change the social linkedin profile, but it didn’t found out how.

Minimal Working Example:

\documentclass{moderncv}
\moderncvstyle{casual}
\makeatletter
\RenewDocumentCommand{\social}{O{}O{}m}{%
  \ifthenelse{\equal{#2}{}}%
    { 
    \ifthenelse{\equal{#1}{linkedin}}{\collectionadd[linkedin]{socials}{\protect\href{https://www.linkedin.com/in/#3}{#3}}}{}%
      \ifthenelse{\equal{#1}{twitter}} {\collectionadd[twitter]{socials} {\protect\httplink[#3]{www.twitter.com/#3}}}    {}%
      \ifthenelse{\equal{#1}{github}}  {\collectionadd[github]{socials}  {\protect\httplink[#3]{www.github.com/#3}}}     {}%
    }
    {\collectionadd[#1]{socials}{\protect\httplink[#3]{#2}}}}
\makeatother
\name{Daniel}{Nahmias}
\social[linkedin]{danielnahmias} 
%\social[xing]{Daniel_Nahmias} % currently doesn't work, so that I use \extrainfo
%\social[twitter]{jdoe}        not needed
%\social[github]{jdoe}        not needed
%\social[gitlab]{jdoe}        not needed
%\social[skype]{jdoe}        not needed
\extrainfo{\httplink[\faXingSquare~Daniel Nahmias]{xing.com/profile/Daniel_Nahmias}} 
\begin{document}
\makecvtitle
\section{Education}
\cventry{year--year}{Degree}{Institution}{City}{\textit{Grade}}{Description}
\end{document}

2 Answers 2

1

You have to change three things:

  1. You need to add a new definition for the xing symbol: \newcommand*{\xingsocialsymbol} {\faXingSquare~}
  2. Add a new command \httpslink like

    \newcommand*{\httpslink}[2][]{% <=======================================
      \ifthenelse{\equal{#1}{}}%
        {\href{https://#2}{#2}}%
        {\href{https://#2}{#1}}}
    
  3. Add a new definition for xing in socials command:

    \ifthenelse{\equal{#1}{xing}}{\collectionadd[xing]{socials}{\protect\httpslink[#3]{www.xing.com/profile/#3}}}{}%
    

So with the following complete MWE

\documentclass{moderncv}

% makes a https hyperlink
% usage: \httpslink[optional text]{link}
\newcommand*{\httpslink}[2][]{% <=======================================
  \ifthenelse{\equal{#1}{}}%
    {\href{https://#2}{#2}}%
    {\href{https://#2}{#1}}}

\newcommand*{\xingsocialsymbol}  {\faXingSquare~} % <===================

\moderncvstyle{casual}

\makeatletter
\RenewDocumentCommand{\social}{O{}O{}m}{%
  \ifthenelse{\equal{#2}{}}%
    { 
    \ifthenelse{\equal{#1}{linkedin}}{\collectionadd[linkedin]{socials}{\protect\href{https://www.linkedin.com/in/#3}{#3}}}{}%
    \ifthenelse{\equal{#1}{xing}}{\collectionadd[xing]{socials}{\protect\httpslink[#3]{www.xing.com/profile/#3}}}{}% <================================================================
      \ifthenelse{\equal{#1}{twitter}} {\collectionadd[twitter]{socials} {\protect\httplink[#3]{www.twitter.com/#3}}}    {}%
      \ifthenelse{\equal{#1}{github}}  {\collectionadd[github]{socials}  {\protect\httplink[#3]{www.github.com/#3}}}     {}%
    }
    {\collectionadd[#1]{socials}{\protect\httplink[#3]{#2}}}}
\makeatother

\name{Daniel}{Nahmias}
\social[linkedin]{danielnahmias} 
\social[xing]{Daniel\_Nahmias} % <======================================
%\social[twitter]{jdoe}        not needed
%\social[github]{jdoe}        not needed
%\social[gitlab]{jdoe}        not needed
%\social[skype]{jdoe}        not needed


\begin{document}

\makecvtitle
\section{Education}
\cventry{year--year}{Degree}{Institution}{City}{\textit{Grade}}{Description}

\end{document}

you get the wished result:

enter image description here

0

With both ways (but not logo for first):

\documentclass{moderncv}
\moderncvstyle{casual}
\makeatletter
\RenewDocumentCommand{\social}{O{}O{}m}{%
  \ifthenelse{\equal{#2}{}}%
    { 
    \ifthenelse{\equal{#1}{linkedin}}{\collectionadd[linkedin]{socials}{\protect\href{https://www.linkedin.com/in/#3}{#3}}}{}%
     \ifthenelse{\equal{#1}{xing}}{\collectionadd[xing]{socials}{\protect\href{https://wwww.xing.com/#3}{$#3$}}}{}%
      \ifthenelse{\equal{#1}{twitter}} {\collectionadd[twitter]{socials} {\protect\httplink[#3]{www.twitter.com/#3}}}    {}%
      \ifthenelse{\equal{#1}{github}}  {\collectionadd[github]{socials}  {\protect\httplink[#3]{www.github.com/#3}}}     {}%
    }
    {\collectionadd[#1]{socials}{\protect\httplink[#3]{#2}}}}
\makeatother
\name{Daniel}{Nahmias}
\social[linkedin]{danielnahmias} 
\social[xing]{Daniel_Nahmias} % currently doesn't work, so that I use \extrainfo
%\social[twitter]{jdoe}        not needed
%\social[github]{jdoe}        not needed
%\social[gitlab]{jdoe}        not needed
%\social[skype]{jdoe}        not needed
\extrainfo{\url{https:www.xing.com/profile/Daniel_Nahmias}}
\begin{document}
\makecvtitle
\section{Education}
\cventry{year--year}{Degree}{Institution}{City}{\textit{Grade}}{Description}
\end{document}
2
  • Thanks, koleygr. Is there a way to include the Xing logo in the https version? As it is, I prefer the original with logo and http over this.
    – nemu
    Commented Mar 28, 2018 at 14:31
  • Already done by @Kurt
    – koleygr
    Commented Mar 28, 2018 at 14:49

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .