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}
結果:
