如何在现代银行简历模板中多次使用 \extrainfo?

如何在现代银行简历模板中多次使用 \extrainfo?

目前我正在使用现代银行简历模板。问题是我想添加\extrainfo几次,例如像这样:

\extrainfo{\href{link}{\textit{extra}}}

\extrainfo{\href{https://github.com/johndoe}{\faGithub~john doe}}

该模板不允许我\extrainfo{}多次使用宏。例如:

%% start of file `template.tex'.
%% Copyright 2006-2013 Xavier Danaux ([email protected]).
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License version 1.3c,
% available at http://www.latex-project.org/lppl/.


\documentclass[11pt,a4paper,sans]{moderncv}        % possible options include font size ('10pt', '11pt' and '12pt'), paper size ('a4paper', 'letterpaper', 'a5paper', 'legalpaper', 'executivepaper' and 'landscape') and font family ('sans' and 'roman')


\usepackage{fontawesome}

\moderncvstyle{banking}
\moderncvcolor{blue}



\usepackage[utf8]{inputenc}                     
\usepackage[scale=0.90]{geometry}


% personal data
\name{\LARGE{john }} {\LARGE{doe}}
\title{\LARGE{Statement of Purpose}}                               % optional, remove / comment the line if not wanted
\address{street and number}{postcode city}{country}% optional, remove / comment the line if not wanted; the "postcode city" and and "country" arguments can be omitted or provided empty
\phone[mobile]{+1~(234)~567~890}                   % optional, remove / comment the line if not wanted
\phone[fixed]{+2~(345)~678~901}                    % optional, remove / comment the line if not wanted
\email{[email protected]}                               % optional, remove / comment the line if not wanted
\homepage{www.johndoe.com}                         % optional, remove / comment the line if not wanted

\extrainfo{\href{www.google.com}{\textit{link}}}                 % optional, remove / comment the line if not wanted

\extrainfo{\href{https://github.com/johndoe}{\faGithub~johndoe}}

\photo[64pt][0.4pt]{picture}                       % optional, remove / comment the line if not wanted; '64pt' is the height the picture must be resized to, 0.4pt is the thickness of the frame around it (put it to 0pt for no frame) and 'picture' is the name of the picture file
\quote{Some quote}                                 % optional, remove / comment the line if not wanted

% to show numerical labels in the bibliography (default is to show no labels); only useful if you make citations in your resume
%\makeatletter
%\renewcommand*{\bibliographyitemlabel}{\@biblabel{\arabic{enumiv}}}
%\makeatother
%\renewcommand*{\bibliographyitemlabel}{[\arabic{enumiv}]}% CONSIDER REPLACING THE ABOVE BY THIS

% bibliography with mutiple entries
%\usepackage{multibib}
%\newcites{book,misc}{{Books},{Others}}
%----------------------------------------------------------------------------------
%            content
%----------------------------------------------------------------------------------

\begin{document}
%-----       letter       ---------------------------------------------------------
% recipient data
\recipient{Company Recruitment team}{Company, Inc.\\123 somestreet\\some city}
\date{January 01, 1984}
\opening{}
\closing{Yours faithfully}
\enclosure[Attached]{curriculum vit\ae{}}          % use an optional argument to use a string other than "Enclosure", or redefine \enclname
\makelettertitle



\end{document}


%% end of file `template.tex'.

在此处输入图片描述

我如何添加几个附加信息子弹更多次?

更新:我尝试了 Gonzalo Medina 的方法,尽管他似乎有正确的输出,但我得到的两个链接如下:

更新此版本我得到了以下输出:

在此处输入图片描述

还有以下例外:

/usr/local/texlive/2014/texmf-dist/tex/latex/fontawesome/fontawesome.sty, line 27

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

!
! fontspec error: "font-not-found"
! 
! The font "FontAwesome" cannot be found.
! 
! See the fontspec documentation for further information.
! 
! For immediate help type H <return>.
!...............................................  

l.27 \newfontfamily{\FA}{FontAwesome}

|'''''''''''''''''''''''''''''''''''''''''''''''
| A font might not be found for many reasons.
| Check the spelling, where the font is installed etc. etc.
| 
| When in doubt, ask someone for help!
|...............................................
moderncv/examples/moderncvbodyiii.sty, line 85

Undefined control sequence.

<argument> \tiny \faCircleO 

l.85 ...dth{\listitemsymbolwidth}{\listitemsymbol}

The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
moderncv/examples/spo.tex, line 27

Undefined control sequence.

\mobilephonesymbol ->{\Large \faMobile 
                                       }~
l.27 \makelettertitle

The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
moderncv/examples/spo.tex, line 27

Font EU1/FontAwesome(0)/m/n/10.95=FontAwesome: at 10.95pt not loadable: Metric (TFM) file or installed font not found.

<to be read again> 
                   relax 
l.27 \makelettertitle

I wasn't able to read the size data for this font,
so I will ignore the font specification.
[Wizards can fix TFM files using TFtoPL/PLtoTF.]
You might try inserting a different font spec;
e.g., type `I\font<same font id>=<substitute font name>'.
moderncv/examples/spo.tex, line 27

Undefined control sequence.

\emailsymbol ->{\small \faEnvelopeO 
                                    }~
l.27 \makelettertitle

The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
moderncv/examples/spo.tex, line 27

Font EU1/FontAwesome(0)/m/n/10=FontAwesome: at 10.0pt not loadable: Metric (TFM) file or installed font not found.

<to be read again> 
                   relax 
l.27 \makelettertitle

I wasn't able to read the size data for this font,
so I will ignore the font specification.
[Wizards can fix TFM files using TFtoPL/PLtoTF.]
You might try inserting a different font spec;
e.g., type `I\font<same font id>=<substitute font name>'.
moderncv/examples/moderncvheadiii.sty

You have requested package `moderncvheadiii',
moderncv/examples/moderncvbodyiii.sty

You have requested package `moderncvbodyiii',
moderncv/examples/spo.tex, line 27

Underfull \hbox (badness 10000) in paragraph at lines 27--27

我也尝试添加fontawesome字体,但仍然一样。

答案1

您可以简单地使用一个\extrainfo命令并添加您需要的所有信息,\makeheaddetailssymbol如果您希望在各个信息之间使用通常的分隔符,则可以使用条目之间:

\extrainfo{\href{www.google.com}{\textit{link}}\makeheaddetailssymbol \href{https://github.com/johndoe}{\faGithub~johndoe}\makeheaddetailssymbol additional information3}

完整示例:

\documentclass[11pt,a4paper,sans]{moderncv}
\usepackage[scale=0.90]{geometry}
\usepackage{fontawesome}

\moderncvstyle{banking}
\moderncvcolor{blue}

\name{\LARGE{john }}{\LARGE{doe}}
\title{\LARGE{Statement of Purpose}}
\address{street and number}{postcode city}{country}
\phone[mobile]{+1~(234)~567~890}
\phone[fixed]{+2~(345)~678~901}
\email{[email protected]}
\homepage{www.johndoe.com}
\extrainfo{\href{www.google.com}{\textit{link}}\makeheaddetailssymbol \href{https://github.com/johndoe}{\faGithub~johndoe}\makeheaddetailssymbol additional information3}

\photo[64pt][0.4pt]{picture}
\quote{Some quote}

\begin{document}

\recipient{Company Recruitment team}{Company, Inc.\\123 somestreet\\some city}
\date{January 01, 1984}
\opening{}
\closing{Yours faithfully}
\enclosure[Attached]{curriculum vit\ae{}}
\makelettertitle

\end{document}

最终的标题是:

在此处输入图片描述

更新

moderncv对于/的旧版本(TeX Live2014 中的版本)fontawesome,以下是所需的代码(想法相同,但在旧版本中\makeheaddetailssymbol\maketitlesymbol):

\documentclass{moderncv}
\usepackage[scale=0.9]{geometry}
\usepackage{fontawesome}

\moderncvstyle{banking}
\moderncvcolor{blue}

\name{\LARGE{john }}{\LARGE{doe}}
\title{\LARGE{Statement of Purpose}}
\address{street and number}{postcode city}{country}
\phone[mobile]{+1~(234)~567~890}
\phone[fixed]{+2~(345)~678~901}
\email{[email protected]}
\homepage{www.johndoe.com}
\extrainfo{\href{www.google.com}{\textit{link}}\maketitlesymbol\href{https://github.com/johndoe}{\faGithub~johndoe}\maketitlesymbol additional information3}

\photo[64pt][0.4pt]{picture}
\quote{Some quote}

\begin{document}

\makecvtitle

\end{document}

该文档必须使用 xelatex 或 lualatex 进行处理,结果如下:

在此处输入图片描述

相关内容