如何在 LaTeX 中添加带有其徽标/图标的网站链接?

如何在 LaTeX 中添加带有其徽标/图标的网站链接?
- \profilepic{alice.jpeg}
- \cvname{Alice}
- \cvjobtitle{Advanture}
- \cvdate{26 November, 1865}
- \cvaddress{United Kingdom}
- \cvnumberphone{+880567632189}
- \cvsite{http://en.wikipedia.org}
- \cvmail{[email protected]}

此代码取自基于在线的 Overleaf。我想在此代码中添加两行。在显示电话号码的行下方,我想删除简历网站,并添加我的 Facebook 和 LinkedIn 个人资料链接。我希望以这样的方式显示这两个链接:只有我的名字会以蓝色显示,当任何人点击我的名字时,他们都会自动访问我的个人资料。我还希望在这些链接的左侧显示他们的徽标/图标(Facebook 徽标和 LinkedIn 徽标)。

请告诉我该怎么做。提前谢谢。

答案1

尝试将以下内容添加到序言中(\documentclass{twentysecondcv}和之间\begin{document}

\usepackage{fontawesome}

\newcommand{\givenfacebook}{}
\newcommand{\givenlinkedin}{}

\newcommand{\cvfacebook}[1]{\renewcommand{\givenfacebook}{#1}}
\newcommand{\cvlinkedin}[1]{\renewcommand{\givenlinkedin}{#1}}

\renewcommand{\makeprofile}
{
\begin{tikzpicture}[remember picture,overlay]
     \node [rectangle, fill=asidecolor, anchor=north, minimum width=9.90cm, minimum height=\paperheight+1cm] (box) at (-5cm,0.5cm){};
\end{tikzpicture}


\begin{textblock}{6}(0.5, 0.2)
\begin{flushleft}
\hspace{13pt}
\begin{tikzpicture}[x=\imagescale,y=-\imagescale]
    \clip (600/2, 567/2) circle (567/2);

        \node[anchor=north west, inner sep=0pt, outer sep=0pt] at (0,0) {\includegraphics[width=\imagewidth]{\givenprofilepic}};
\end{tikzpicture}

{\Huge\color{mainblue}\givencvname}

\begin{flushright}
{\Large\color{black!80}\givencvjobtitle}
\end{flushright}
\renewcommand{\arraystretch}{1.6}
\begin{tabular}{p{0.5cm} @{\hskip 0.5cm}p{5cm}}
\ifthenelse{\equal{\givencvdate}{}}{}{\textsc{\Large\icon{\Info}} & \givencvdate\\}
\ifthenelse{\equal{\givencvaddress}{}}{}{\textsc{\Large\icon{\Letter}} & \givencvaddress\\}
\ifthenelse{\equal{\givennumberphone}{}}{}{\textsc{\Large\icon{\Telefon}} & \givennumberphone\\}
\ifthenelse{\equal{\givencvsite}{}}{}{\textsc{\Large\icon{\Mundus}} & \givencvsite}\\
\ifthenelse{\equal{\givenfacebook}{}}{}{\textsc{\large\icon{\faFacebook}} & \href{http://www.facebook.com/\givenfacebook }{\givencvname}\\}
\ifthenelse{\equal{\givenlinkedin}{}}{}{\textsc{\large\icon{\faLinkedin}} & \href{http://www.linkedin.com/in/\givenlinkedin }{\givencvname}\\}
\ifthenelse{\equal{\givencvmail}{}}{}{\textsc{\large\icon{@}} & \href{mailto:\givencvmail}{\givencvmail}}
\end{tabular}


\profilesection{About me}{3.2cm}
\givenaboutme


\profilesection{Skill}{5cm}
\givenskill
\giventextskill
\noindent
\scriptsize
\noindent
(*)[The skill scale is from 0 (Fundamental Awareness) to 6 (Expert).]

\end{flushleft}
\end{textblock}
\vspace{-10pt}
}

fontawesome包用于 Facebook 和 LinkedIn 徽标。from\makeprofile的原始代码twentysecondcv.cls来自https://github.com/spagnuolocarmine/TwentySecondsCurriculumVitae-LaTex/

定义了两个新命令\cvfacebook{foo}\cvlinkedin{bar},使 facebook 链接指向www.facebook.com/foo,使 linkedin 链接指向www.linkedin.com/in/bar

唯一的变化\renewcommand{\makeprofile}是我添加了两行

\ifthenelse{\equal{\givenfacebook}{}}{}{\textsc{\large\icon{\faFacebook}} & \href{http://www.facebook.com/\givenfacebook }{\givencvname}\\}
\ifthenelse{\equal{\givenlinkedin}{}}{}{\textsc{\large\icon{\faLinkedin}} & \href{http://www.linkedin.com/in/\givenlinkedin }{\givencvname}\\}

然后,左侧的个人信息由

\profilepic{alice.jpeg} %path of profile pic
\cvname{Alice} %your name
\cvjobtitle{Adventurer}%your actual job position
\cvdate{26 November 1865}%date of birth
\cvaddress{United Kingdom}%address
\cvnumberphone{+39 0325658974}%telphone number
\cvmail{[email protected]}%e-mail
\cvsite{http://en.wikipedia.org}%personal site
\cvfacebook{foo}
\cvlinkedin{bar}

这些命令应包含在文档正文中。要删除其中任何一个,只需删除(或%在行首使用注释掉)相应的命令即可。

简历图片

相关内容