ModernCVはクラシックスタイルでのみgitlabアイコンを表示しません

Aug 20 2020

MWE:

\documentclass[10pt,a4paper,sans]{moderncv}
\moderncvstyle{classic}
\usepackage[utf8]{inputenc}
\usepackage[scale=0.75]{geometry}
\name{Short}{LongName}
\email{[email protected]}
\phone[mobile]{+1123456789}
 \homepage{www.johndoe.com}
\social[linkedin]{asdf}
 \social[twitter]{asdf}
\social[github]{asdf}
\social[gitlab]{asdf}

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

しかし、それは他のすべてのスタイル(カジュアル、バンキング、オールドスタイル、ファンシー)で機能します。

私のシステムはArchLinuxで、エディターはTexStudioです。

回答

1 Marijn Aug 20 2020 at 22:50

このclassicスタイルでは、Gitlabアイコンを入力し、の3つの引数バージョンを使用してリンクし\social、完全なURLの2番目のオプションの引数を指定できます。

classicスタイル内のアイコンはmarvosymパッケージに含まれていますが、他のスタイルfontawesomeはアイコンに使用されます。MarvosymにはGitlabアイコンがないため、このアイコンをclassicスタイルに含める場合fontawesomeは、のアイコンコマンドを読み込んで定義する必要がありますmoderncv

MWE:

\documentclass[10pt,a4paper,sans]{moderncv}
\moderncvstyle{classic}
% load fontawesome icons
\usepackage{fontawesome}
% set the moderncv command for the Gitlab icon
% create command if it does not exist
\providecommand*{\gitlabsocialsymbol}{}
% set command to \faGitlab from fontawesome
\renewcommand*{\gitlabsocialsymbol}{{\scriptsize\faGitlab}~}
\usepackage[utf8]{inputenc}
\usepackage[scale=0.75]{geometry}
\name{Short}{LongName}
\email{[email protected]}
\phone[mobile]{+1123456789}
 \homepage{www.johndoe.com}
\social[linkedin]{asdf}
\social[twitter]{asdf}
\social[github]{asdfhub}
% set full url for the link
\social[gitlab][www.gitlab.com/asdflab]{asdflab}

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

結果: