我有一个 CV 版本,它编译成功,并且包含许多修改,例如第二个地址行、包含来自 Font Awesome 的几个图标(例如 Whatsapp 和 Skype)等。但是,我尝试包含 Telegram 图标似乎不起作用。在“\addresstwo”行(第 87 行)中,我可以显示 Whatsapp 的 MWE 工作正常。当我尝试将其更改为下面的行时,我编译时出现错误消息并且没有图标。我运行的是 Windows 7 Ultimate SP1。
\documentclass[11pt,a4paper,sans]{moderncv}
% moderncv themes
\moderncvstyle{casual}
\moderncvcolor{blue}
\moderncvicons{awesome}
%Other packages
\usepackage{verbatim} %allows for blocks of comments
%\usepackage{amssymb}
%\usepackage[english]{babel}
\usepackage{stackengine} %allows for signiture to be added to letter.
% Code for a second address in the info block:
\makeatletter
\RenewDocumentCommand{\address}{mG{}G{}G{}}{\def\@addressstreet{#1}\def\@addresscity{#2}\def\@addresscountry{#3}\def\@addressmobilephone{#4}}
\newcommand*{\addresstwo}[4]{\def\@addressstreettwo{#1}\def\@addresscitytwo{#2}\def\@addresscountrytwo{#3}\def\@addressmobilephonetwo{#4}}
\renewcommand*{\makecvfoot}{%
\recomputecvfootlengths{}%
\fancypagestyle{plain}{%
\fancyfoot[c]{%
\parbox[b]{\footwidth}{%
\centering%
\color{color2}\addressfont%
\vspace{\baselineskip}% forces a white line to ensure space between main text and footer (as footer height can't be known in advance)
\ifthenelse{\isundefined{\@addressstreet}}{}{\addtofoot[]{\addresssymbol\@addressstreet}%
\ifthenelse{\equal{\@addresscity}{}}{}{\addtofoot[~--~]{\@addresscity}}% if \addresstreet is defined, \addresscity and \addresscountry will always be defined but could be empty
\ifthenelse{\equal{\@addresscountry}{}}{}{\addtofoot[~--~]{\@addresscountry}}%
\ifthenelse{\equal{\@addressmobilephone}{}}{}{\addtofoot[~--~]{\@addressmobilephone}}%
%\ifthenelse{\isundefined{\@addressstreettwo}}{}{\addtofoot[]{\addresssymbol\@addressstreettwo}%
\ifthenelse{\isundefined{\@addressstreettwo}}{\flushfoot\@firstfootelementtrue\\}{\flushfoot\\\addtofoot[]{\addresssymbol\@addressstreettwo}%
\ifthenelse{\equal{\@addresscitytwo}{}}{}{\addtofoot[~--~]{\@addresscitytwo}}%
\ifthenelse{\equal{\@addresscountrytwo}{}}{}{\addtofoot[~--~]{\@addresscountrytwo}}%
\ifthenelse{\equal{\@addressmobilephonetwo}{}}{}{\addtofoot[~--~]{\@addressmobilephonetwo}}%
\flushfoot\@firstfootelementtrue\\}}%
\collectionloop{phones}{% the key holds the phone type (=symbol command prefix), the item holds the number
\addtofoot{\csname\collectionloopkey phonesymbol\endcsname\collectionloopitem}}%
\ifthenelse{\isundefined{\@email}}{}{\addtofoot{\emailsymbol\emaillink{\@email}}}%
\ifthenelse{\isundefined{\@homepage}}{}{\addtofoot{\homepagesymbol\httplink{\@homepage}}}%
\collectionloop{socials}{% the key holds the social type (=symbol command prefix), the item holds the link
\addtofoot{\csname\collectionloopkey socialsymbol\endcsname\collectionloopitem}}%
\ifthenelse{\isundefined{\@extrainfo}}{}{\addtofoot{\@extrainfo}}%
\ifthenelse{\lengthtest{\footboxwidth=0pt}}{}{\flushfoot}% the lengthtest is required to avoid flushing an empty footer, which could cause a blank line due to the \\ after the address, if no other personal info is used
}}}%
\pagestyle{plain}}
% Code for a skype symbol in the info block:
\newcommand*{\skypesocialsymbol}{{\color{cyan!65!white}\faSkype}}
\newcommand*{\tangerinesocialsymbol}{{\includegraphics[height=.7\baselineskip]{tangerine}}}
\collectionadd[skype]{socials}{ SkypeAddress}
\renewcommand*{\recomputefootlengths}{%
\setlength{\footwidth}{1.0\textwidth}}
\renewcommand*{\makeletterclosing}{
\@closing\\[1em]%
{\bfseries \@firstname~\@lastname}%
\ifthenelse{\isundefined{\@enclosure}}{}{%
\\[3em]%
{\color{color2}\itshape\enclname: \@enclosure}}}
\makeatother
% Code to change the symbols used in the info block:
\makeatletter
\renewcommand*{\mobilephonesymbol} {{\Large{\faMobile}}~\normalsize}
\renewcommand*{\emailsymbol} {{\color{red!85!black}{\small\faEnvelopeO}~}} % alternative: \faInbox
\renewcommand*{\linkedinsocialsymbol}{{\color{cyan!55!black}\small\faLinkedin}~} % alternative: \faLinkedinSquare
\renewcommand*{\twittersocialsymbol} {{\color{cyan!75!white}\small\faTwitter}~} % alternative: \faTwitterSquare
\renewcommand*{\githubsocialsymbol} {{\color{black}\faGithubSquare}~}
\makeatother
\definecolor{color1}{rgb}{0.22,0.45,0.70}% light blue
% adjust the page margins
\usepackage[scale=0.8, left=1.6cm, right=1.7cm]{geometry}
% personal data
\name{First}{Last Name}
\title{Job Title}
\address{Street Address 1}{Zip}{Country}{{ \ \Large{\faMobile}}~+00~(0)~000~00~0000}
\addresstwo{Street Address 1}{Zip}{Country}{{ \ \Large{\faMobile}} \ {\color{green!60!black}\faWhatsapp } ~+0~(000)~000~0000}
%\addresstwo{Street Address 1}{Zip}{Country}{{ \ \Large{\faMobile}} \ {\color{green!60!black}\faTelegram } ~+0~(000)~000~0000}
\email{[email protected]}
\social[linkedin]{My Name} % optional, remove / comment the line if not wanted
\social[twitter]{My Name} % optional, remove / comment the line if not wanted
\social[github]{My Name} % optional, remove / comment the line if not wanted
% bibliography adjustements (only useful if you make citations in your resume, or print a list of publications using BibTeX)
% to show numerical labels in the bibliography (default is to show no labels)
\makeatletter\renewcommand*{\bibliographyitemlabel}{\@biblabel{\arabic{enumiv}}}\makeatother
% to redefine the bibliography heading string ("Publications")
%\renewcommand{\refname}{Articles}
% bibliography with mutiple entries
%\usepackage{multibib}
%\newcites{book,misc}{{Books},{Others}}
%----------------------------------------------------------------------------------
% content
%----------------------------------------------------------------------------------
\begin{document}
%----- resume ---------------------------------------------------------
\makecvtitle
%\newpage
\section{Resume Section}
\cventry{2000--present}{Job Title}{}{City, Country}{}{
Project details:%
\begin{itemize}%
\item Responsibilities
\end{itemize}%
}
\end{document}
我猜这与我的 FontAwesome 版本有关,但我已经进入 Miktex 2.9 并运行“维护(管理员)/Miktex 更新(管理员)”程序以及“/MiKTeX 包管理器(管理员)”更新,但无法使其正常工作。我不完全确定所有这些包管理器是如何更新的,所以我可能做错了什么。欢迎任何建议。
答案1
2018年更新:
有了新的fontawesome5
包,您现在可以直接使用\faTelegram
:
% !TeX TS-program = xelatex
\documentclass{article}
\usepackage{fontawesome5}
\begin{document}
\faTelegram
\end{document}
2018年之前:
该软件包fontawesome
不包含命令\faTelegram
。可以在软件包文档中找到可用符号的概述:http://mirrors.ctan.org/fonts/fontawesome/doc/fontawesome.pdf
如果您对纸飞机感到满意:
\documentclass[11pt,a4paper,sans]{moderncv}
% moderncv themes
\moderncvstyle{casual}
\moderncvcolor{blue}
\moderncvicons{awesome}
%Other packages
\usepackage{verbatim} %allows for blocks of comments
%\usepackage{amssymb}
%\usepackage[english]{babel}
\usepackage{stackengine} %allows for signiture to be added to letter.
% Code for a second address in the info block:
\makeatletter
\RenewDocumentCommand{\address}{mG{}G{}G{}}{\def\@addressstreet{#1}\def\@addresscity{#2}\def\@addresscountry{#3}\def\@addressmobilephone{#4}}
\newcommand*{\addresstwo}[4]{\def\@addressstreettwo{#1}\def\@addresscitytwo{#2}\def\@addresscountrytwo{#3}\def\@addressmobilephonetwo{#4}}
\renewcommand*{\makecvfoot}{%
\recomputecvfootlengths{}%
\fancypagestyle{plain}{%
\fancyfoot[c]{%
\parbox[b]{\footwidth}{%
\centering%
\color{color2}\addressfont%
\vspace{\baselineskip}% forces a white line to ensure space between main text and footer (as footer height can't be known in advance)
\ifthenelse{\isundefined{\@addressstreet}}{}{\addtofoot[]{\addresssymbol\@addressstreet}%
\ifthenelse{\equal{\@addresscity}{}}{}{\addtofoot[~--~]{\@addresscity}}% if \addresstreet is defined, \addresscity and \addresscountry will always be defined but could be empty
\ifthenelse{\equal{\@addresscountry}{}}{}{\addtofoot[~--~]{\@addresscountry}}%
\ifthenelse{\equal{\@addressmobilephone}{}}{}{\addtofoot[~--~]{\@addressmobilephone}}%
%\ifthenelse{\isundefined{\@addressstreettwo}}{}{\addtofoot[]{\addresssymbol\@addressstreettwo}%
\ifthenelse{\isundefined{\@addressstreettwo}}{\flushfoot\@firstfootelementtrue\\}{\flushfoot\\\addtofoot[]{\addresssymbol\@addressstreettwo}%
\ifthenelse{\equal{\@addresscitytwo}{}}{}{\addtofoot[~--~]{\@addresscitytwo}}%
\ifthenelse{\equal{\@addresscountrytwo}{}}{}{\addtofoot[~--~]{\@addresscountrytwo}}%
\ifthenelse{\equal{\@addressmobilephonetwo}{}}{}{\addtofoot[~--~]{\@addressmobilephonetwo}}%
\flushfoot\@firstfootelementtrue\\}}%
\collectionloop{phones}{% the key holds the phone type (=symbol command prefix), the item holds the number
\addtofoot{\csname\collectionloopkey phonesymbol\endcsname\collectionloopitem}}%
\ifthenelse{\isundefined{\@email}}{}{\addtofoot{\emailsymbol\emaillink{\@email}}}%
\ifthenelse{\isundefined{\@homepage}}{}{\addtofoot{\homepagesymbol\httplink{\@homepage}}}%
\collectionloop{socials}{% the key holds the social type (=symbol command prefix), the item holds the link
\addtofoot{\csname\collectionloopkey socialsymbol\endcsname\collectionloopitem}}%
\ifthenelse{\isundefined{\@extrainfo}}{}{\addtofoot{\@extrainfo}}%
\ifthenelse{\lengthtest{\footboxwidth=0pt}}{}{\flushfoot}% the lengthtest is required to avoid flushing an empty footer, which could cause a blank line due to the \\ after the address, if no other personal info is used
}}}%
\pagestyle{plain}}
% Code for a skype symbol in the info block:
\newcommand*{\skypesocialsymbol}{{\color{cyan!65!white}\faSkype}}
\newcommand*{\tangerinesocialsymbol}{{\includegraphics[height=.7\baselineskip]{tangerine}}}
\collectionadd[skype]{socials}{ SkypeAddress}
\renewcommand*{\recomputefootlengths}{%
\setlength{\footwidth}{1.0\textwidth}}
\renewcommand*{\makeletterclosing}{
\@closing\\[1em]%
{\bfseries \@firstname~\@lastname}%
\ifthenelse{\isundefined{\@enclosure}}{}{%
\\[3em]%
{\color{color2}\itshape\enclname: \@enclosure}}}
\makeatother
% Code to change the symbols used in the info block:
\makeatletter
\renewcommand*{\mobilephonesymbol} {{\Large{\faMobile}}~\normalsize}
\renewcommand*{\emailsymbol} {{\color{red!85!black}{\small\faEnvelopeO}~}} % alternative: \faInbox
\renewcommand*{\linkedinsocialsymbol}{{\color{cyan!55!black}\small\faLinkedin}~} % alternative: \faLinkedinSquare
\renewcommand*{\twittersocialsymbol} {{\color{cyan!75!white}\small\faTwitter}~} % alternative: \faTwitterSquare
\renewcommand*{\githubsocialsymbol} {{\color{black}\faGithubSquare}~}
\makeatother
\definecolor{color1}{rgb}{0.22,0.45,0.70}% light blue
% adjust the page margins
\usepackage[scale=0.8, left=1.6cm, right=1.7cm]{geometry}
% personal data
\name{First}{Last Name}
\title{Job Title}
\address{Street Address 1}{Zip}{Country}{{ \ \Large{\faMobile}}~+00~(0)~000~00~0000}
%\addresstwo{Street Address 1}{Zip}{Country}{{ \ \Large{\faMobile}} \ {\color{green!60!black}\faWhatsapp } ~+0~(000)~000~0000}
\addresstwo{Street Address 1}{Zip}{Country}{{ \ \Large{\faMobile}} \ {\color{green!60!black}\faPaperPlaneO } ~+0~(000)~000~0000}
\email{[email protected]}
\social[linkedin]{My Name} % optional, remove / comment the line if not wanted
\social[twitter]{My Name} % optional, remove / comment the line if not wanted
\social[github]{My Name} % optional, remove / comment the line if not wanted
% bibliography adjustements (only useful if you make citations in your resume, or print a list of publications using BibTeX)
% to show numerical labels in the bibliography (default is to show no labels)
\makeatletter\renewcommand*{\bibliographyitemlabel}{\@biblabel{\arabic{enumiv}}}\makeatother
% to redefine the bibliography heading string ("Publications")
%\renewcommand{\refname}{Articles}
% bibliography with mutiple entries
%\usepackage{multibib}
%\newcites{book,misc}{{Books},{Others}}
%----------------------------------------------------------------------------------
% content
%----------------------------------------------------------------------------------
\begin{document}
%----- resume ---------------------------------------------------------
\makecvtitle
%\newpage
\section{Resume Section}
\cventry{2000--present}{Job Title}{}{City, Country}{}{
Project details:%
\begin{itemize}%
\item Responsibilities
\end{itemize}%
}
\end{document}