我正在moderncv
使用银行风格,我希望能够在里面添加一个新行\extrainfo
。
ps:我已经看过了“如何在现代银行简历模板中多次使用 \extrainfo?”其中显示了如何在其中添加多个额外信息\extrainfo
,但无法添加新行,我还看到了“如何使用多个 \extrainfo?“但这个答案并不适用于银行风格。
梅威瑟:
\documentclass[11pt,a4paper,sans]{moderncv}
\moderncvstyle{banking}
\moderncvcolor{green}
\usepackage[scale=0.8]{geometry}
\name{Name}{Name}
\title{Curriculum~Vitae}
\address{%
Apt 1, Mt Everest,
Best street,
Bestcity,
}{}{Bestland}
\phone[mobile]{0000000000}
\email{}
\homepage{www.site.com}
\social[github]{github}
\extrainfo{%
extra info 1
extra info 2
}
\quote{Look no further: I'm the best!}
\begin{document}
\makecvtitle
\section{Experience}
\end{document}
答案1
信息内容的换行取决于内容的大小(宽度)。如果您希望信息内容extra info 1
单独extra info 2
成行,请确保将其放在足够宽的框中。下面我使用tabular
空格填充了左侧/右侧2em
。在里面,tabular
您可以\\
按预期使用以下方法换行:
\documentclass[11pt,a4paper,sans]{moderncv}
\moderncvstyle{banking}
\moderncvcolor{green}
\usepackage[scale=0.8]{geometry}
\name{Name}{Name}
\title{Curriculum~Vitae}
\address{%
Apt 1, Mt Everest,
Best street,
Bestcity,
}{}{Bestland}
\phone[mobile]{0000000000}
\email{}
\homepage{www.site.com}
\social[github]{github}
\extrainfo{%
\begin{tabular}{@{\hspace{2em}}c@{\hspace{2em}}}
extra info 1 \\ extra info 2
\end{tabular}
}
\quote{Look no further: I'm the best!}
\begin{document}
\makecvtitle
\section{Experience}
\end{document}
答案2
您始终可以使用表格或 \parbox:
\documentclass[11pt,a4paper,sans]{moderncv}
\moderncvstyle{banking}
\moderncvcolor{green}
\usepackage[scale=0.8]{geometry}
\name{Name}{Name}
\title{Curriculum~Vitae}
\address{%
Apt 1, Mt Everest,
Best street,
Bestcity,
}{}{Bestland}
\phone[mobile]{0000000000}
\email{}
\homepage{www.site.com}
\social[github]{github}
\extrainfo{%
\begin{tabular}[t]{@{}l@{}}extra info 1\\
extra info 2\end{tabular}
}
\quote{Look no further: I'm the best!}
\begin{document}
\makecvtitle
\section{Experience}
\end{document}