我终于设法将我的“Xing”社交图标和链接包含在我的 moderncv 的标题中。我不得不这样做,因为我没能让 fontawesome 工作(尝试了很多次;使用 LuaLaTeX 等编译)。我对现在的情况几乎很满意,但我意识到 Xing 图标太高,没有与 linkedin 图标水平对齐。我该如何管理我人为插入的 Xing 图标与 linkedin 图标对齐?我的 MWE 是:
\documentclass[11pt,a4paper,roman]{moderncv}
\moderncvstyle{banking}
\moderncvcolor{blue}
\usepackage[scale=0.75]{geometry}
\setlength{\hintscolumnwidth}{3cm}
\usepackage{lastpage}
\rfoot{\addressfont\itshape\textcolor{gray}{Seite \thepage\ von \pageref{LastPage}}}
\pageref{LastPage}}}
%----------------- Header with picture ------------------------
\usepackage{xpatch}
\makeatletter
\xpatchcmd{\maketitle}{\titlestyle{~|~\@title}}{\par\vskip1ex\titlestyle{\@title}}{}{} % activate for two lines
\@ifpackageloaded{moderncvstylebanking}{%
\let\oldmakecvtitle\makecvtitle
\renewcommand*{\makecvtitle}{%
{\centering\framebox{\includegraphics[width=\@photowidth]{\@photo}}\par\vspace{10pt}}%
\oldmakecvtitle%
}%
}{%
}
\newcommand*{\xingsocialsymbol}{\includegraphics[height=.7\baselineskip]{xing-logo}}
\collectionadd[xing]{socials}{ \href{<URL>}{john.doe}}
\makeatother
%----------------- Header mit Bild ------------------------
\usepackage[ngerman]{babel}
%----------------------------------------------------------------------------------------
% NAME AND CONTACT INFORMATION SECTION
%----------------------------------------------------------------------------------------
\firstname{John} % Your first name
\familyname{Doe} % Your last name
\title{Curriculum Vitae}
\address{Street}{City}
\mobile{number}
\email{[email protected]}
%\homepage{staff.org.edu/~jsmith}{staff.org.edu/$\sim$jsmith} % The first argument is the url for the clickable link, the second argument is the url displayed in the template - this allows special characters to be displayed such as the tilde in this example
\social[linkedin]{john-doe}
%\extrainfo{additional information}
\photo[170pt][0pt]{landscape}
%----------------------------------------------------------------------------------------
\begin{document}
\makecvtitle % Print the CV title
\section{Text}
\end{document}
这让我用 PDFLaTeX 进行了编译(出于某种原因我更喜欢这样做):
我希望有人能帮忙。这是我的第一篇文章,但这个网站和这里的人们对我这个 LaTeX 初学者来说帮助很大...
谢谢!
答案1
你应该将\raisebox
图标向下移动 0.165em,就像来源:
\newcommand*{\xingsocialsymbol}{\protect\raisebox{-0.165em}{\includegraphics[height=.7\baselineskip]{xing-logo}}}