答案1
类moderncv
具有命令的固定定义\cventry
,例如对于样式banking
\renewcommand*{\cventry}[7][.25em]{
\begin{tabular*}{\maincolumnwidth}{l@{\extracolsep{\fill}}r}% <============
{\bfseries #4} & {\bfseries #5}\\%
{\itshape #3\ifthenelse{\equal{#6}{}}{}{, #6}} & {\itshape #2}\\%
\end{tabular*}%
\ifx&%
\else{\\%
\begin{minipage}{\maincolumnwidth}%
\small#7%
\end{minipage}}\fi%
\par\addvspace{#1}}
使用 cv 中的结果命令:
\cventry[length--1]{year--year--2}{Degree--3}{Institution--4}{City--5}{\textit{Grade}--6}{Description--7} % arguments 4 to 7 can be left empty
看一下定义后,您会发现您只能在中放置多行文本,并minipage
填充参数#7
(说明)。其他部分以表格形式实现,您不能简单地使用\newline
或\\
来获取新行...
#2
因此您应该将您的条目重写为(参见定义中与等相对应的数字):
\cventry{2011--2014 2}%
{Employee 3}%
{B.Sc. in Geophysics 4}%
{City, State 5}%
{6}%
{Extensive additional courses in Physics Quantum Mechanics,
Analytical Mechanics, Modern Physics 7}%
根据我的回答\item
之前的一个问题cventry
以下MWE可以解决您的问题:
\documentclass[11pt,letterpaper,sans]{moderncv}
\usepackage{enumitem}
\moderncvstyle{banking}
% style options: 'casual' (default), 'classic', 'oldstyle' and 'banking'
\moderncvcolor{blue}
\usepackage{showframe} % <==============================================
\newcommand*{\mycventry}[7][.25em]{
\begin{tabular*}{\linewidth}{l@{\extracolsep{\fill}}r}% <=============
{\bfseries #4} & {\bfseries #5}\\%
{\itshape #3\ifthenelse{\equal{#6}{}}{}{, #6}} & {\itshape #2}\\%
\end{tabular*}%
\ifx&%
\else{\\%
\begin{minipage}{\linewidth}% \maincolumnwidth <====================
\small#7%
\end{minipage}}\fi%
\par\addvspace{#1}}
% --------------------------------------------
% header details
% --------------------------------------------
\usepackage{import}
\name{John}{Smith}
\address{1234 Main Street}{Chicago, IL}{12345}
\phone[fixed]{+1 (123) 456-7899}
\homepage{https://github.com/john-smith}
\begin{document}
\makecvtitle
\section{Experience}
\begin{itemize}
\item%
\cventry{2011--2014 2}%
{Employee 3}%
{B.Sc. in Geophysics 4}%
{City, State 5}%
{6}%
{Extensive additional courses in Physics Quantum Mechanics,
Analytical Mechanics, Modern Physics 7}%
\item%
\mycventry{2011--2014 2}%
{Employee 3}%
{B.Sc. in Geophysics 4}%
{City, State 5}%
{6}%
{Extensive additional courses in Physics Quantum Mechanics,
Analytical Mechanics, Modern Physics 7}%
\end{itemize}
\end{document}
以及生成的pdf: