![从 moderncv 银行模板中删除 \item 成就、\item 子成就](https://linux22.com/image/350369/%E4%BB%8E%20moderncv%20%E9%93%B6%E8%A1%8C%E6%A8%A1%E6%9D%BF%E4%B8%AD%E5%88%A0%E9%99%A4%20%5Citem%20%E6%88%90%E5%B0%B1%E3%80%81%5Citem%20%E5%AD%90%E6%88%90%E5%B0%B1.png)
我是 LaTeX 新手,目前正在尝试使用 Modern cv Banking 模板创建我的简历。在“经验”部分下,我想删除所有“\item Achievement.\item subachievement
等等”。我尝试通过评论%
将其删除,但随后收到错误消息:失控参数?
有人知道为什么会发生这种情况吗?
\section{Experience}
\subsection{Vocational}
\cventry{year--year}{Job title}{Employer}{City}{}{General description no longer than 1--2 lines.\newline{}%
Detailed achievements:%
\begin{itemize}%
\item Achievement 1;
\item Achievement 2, with sub-achievements:
\begin{itemize}%
\item Sub-achievement (a);
\item Sub-achievement (b), with sub-sub-achievements (don't do this!);
\begin{itemize}
\item Sub-sub-achievement i;
\item Sub-sub-achievement ii;
\item Sub-sub-achievement iii;
\end{itemize}
\item Sub-achievement (c);
\end{itemize}
\item Achievement 3.
\end{itemize}}
\cventry{year--year}{Job title}{Employer}{City}{}{Description line 1\newline{}Description line 2}
\subsection{Miscellaneous}
\cventry{year--year}{Job title}{Employer}{City}{}{Description}
答案1
您的问题是您评论的最后一行:
%\end{itemize}}
你看到第二个}
了吗?这个右括号是用来关闭命令的最后一个参数的\cventry
。
因此,您需要将最后一个字符}
放入下一行,如下所示:
%\end{itemize}%
} % end of \cventry.
参见下面的代码片段。我在其中对每一个都进行了注释itemize
。请注意,我将最后一个括号写在了新行中!
\cventry{year--year}{Job title}{Employer}{City}{}{General description no longer than 1--2 lines.\newline{}%
Detailed achievements:%
%\begin{itemize}%
%\item Achievement 1;
%\item Achievement 2, with sub-achievements:
%%\begin{itemize}%
%%\item Sub-achievement (a);
%%\item Sub-achievement (b), with sub-sub-achievements (don't do this!);
%%%\begin{itemize}
%%%\item Sub-sub-achievement i;
%%%\item Sub-sub-achievement ii;
%%%\item Sub-sub-achievement iii;
%%%\end{itemize}
%%\item Sub-achievement (c);
%%\end{itemize}
%\item Achievement 3.
%\end{itemize}% <=======================================================
} % end of cventry! <===================================================
加上这些注释之后,最终的代码是:
\cventry{year--year}{Job title}{Employer}{City}{}{General description no longer than 1--2 lines.\newline{}%
Detailed achievements.%
} % end of cventry! <===================================================
并且每个开头{
都有一个结尾}
。该代码编译时没有错误消息...
以下 MWE 编译时没有错误:
\documentclass[11pt,a4paper,sans]{moderncv}
\moderncvstyle{banking}
\moderncvcolor{blue}
\usepackage[scale=0.75]{geometry}
\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]{picture}
\quote{Some quote}
\begin{document}
\makecvtitle
\section{Education}
\cventry{year--year}{Degree}{Institution}{City}{\textit{Grade}}{Description} % arguments 3 to 6 can be left empty
\cventry{year--year}{Degree}{Institution}{City}{\textit{Grade}}{Description}
\section{Master thesis}
\cvitem{title}{\emph{Title}}
\cvitem{supervisors}{Supervisors}
\cvitem{description}{Short thesis abstract}
\section{Experience}
\subsection{Vocational}
\cventry{year--year}{Job title}{Employer}{City}{}{General description no longer than 1--2 lines.\newline{}%
Detailed achievements:%
%\begin{itemize}%
%\item Achievement 1;
%\item Achievement 2, with sub-achievements:
%%\begin{itemize}%
%%\item Sub-achievement (a);
%%\item Sub-achievement (b), with sub-sub-achievements (don't do this!);
%%%\begin{itemize}
%%%\item Sub-sub-achievement i;
%%%\item Sub-sub-achievement ii;
%%%\item Sub-sub-achievement iii;
%%%\end{itemize}
%%\item Sub-achievement (c);
%%\end{itemize}
%\item Achievement 3.
%\end{itemize}% <=======================================================
} % end of cventry! <===================================================
\cventry{year--year}{Job title}{Employer}{City}{}{Description line 1\newline{}Description line 2}
\subsection{Miscellaneous}
\cventry{year--year}{Job title}{Employer}{City}{}{Description}
\section{Languages}
\cvitemwithcomment{Language 1}{Skill level}{Comment}
\cvitemwithcomment{Language 2}{Skill level}{Comment}
\cvitemwithcomment{Language 3}{Skill level}{Comment}
\end{document}
并在该 pdf 中得到结果: