我一直遇到这个问题,但我不明白问题所在
Argument of \begin has an extra }. <inserted text> \par l.78 \item <Item 1>
这是文档
\section{Previous Jobs}
\cventry{2011 --}{Teacher}{\textsc{Text}}
\begin{itemize}
\item Item 1
\item Item 2
\item Item 3
\item Item 4
\item Item 5
\item Item 6
\item Item 7
\item Item 8
\end{itemize}
答案1
命令\cventry
定义为有 6 个参数,其中参数 3 至 6 可以留空(但必须写{}
):
\cventry{year--year}{Degree}{Institution--3}{City--4}{\textit{Grade}--5}{Description--6} % arguments 3 to 6 can be left empty
使用以下 MWE (我添加了缺失的{}
,请参阅用 标记的代码<======
)
\documentclass[11pt,a4paper,sans]{moderncv}
\moderncvstyle{classic} % casual, classic, banking, oldstyle and fancy
\moderncvcolor{blue}
\usepackage[utf8]{inputenc}
\usepackage[scale=0.75]{geometry}
% personal data
\name{John}{Doe}
\title{Resumé title}
\address{street and number}{postcode city}{country}
\phone[mobile]{+1~(234)~567~890}
\phone[fixed]{+2~(345)~678~901}
\phone[fax]{+3~(456)~789~012}
\email{[email protected]}
\homepage{www.johndoe.com}
\social[linkedin]{john.doe}
\social[twitter]{jdoe}
\social[github]{jdoe}
\extrainfo{additional information}
\photo[64pt][0.4pt]{example-image-a}
\quote{Some quote}
\setlength{\footskip}{66pt}
\begin{document}
\makecvtitle
\section{Education}
\cventry{year--year}{Degree}{Institution--3}{City--4}{\textit{Grade}--5}{Description--6} % arguments 3 to 6 can be left empty
\cventry{year--year}{Degree}{Institution}{City}{\textit{Grade}}{Description}
\section{Previous Jobs}
\cventry{2011 --}{Teacher}{\textsc{Text}}{}{}{} % <=====================
\begin{itemize}
\item Item 1
\item Item 2
\item Item 3
\item Item 4
\item Item 5
\item Item 6
\item Item 7
\item Item 8
\end{itemize}
\end{document}
你可以编译,没有任何错误!结果是: