列出清单后附加新行

列出清单后附加新行

我使用 shareLatex 的这个模板写简历https://www.sharelatex.com/templates/cv-or-resume/moderncv-oldstyle

\section{Food}\section{Food}
\cvitem{AA}{\begin{itemize}
\item aefefuh huih huih huhi hiu huiyfuyfg gyguy guygg uig serdyov soujdfzx gydfx 
\item aefefuh huih huih huhi hiu huiyfuyfg gyguy guygg uig serdyov soujdfzx gydfx 
\item aefefuh huih huih huhi hiu huiyfuyfg gyguy guygg uig serdyov soujdfzx gydfx  ae ra wer awer awe r awer 
\end{itemize}}
\cvitem{BB}{\begin{itemize}
\item efuh huih huih huhi hiu huiyfuyfg gyguy guygg uig serdyov soujdfzx gydfx  ddd oghcghvho gftudf ogdftftu fgyugvghcv
\item aefefuh huih huih huhi hiu huiyfuyfg gyguy guygg uig serdyov soujdfzx gydfx 
\item aefefuh huih huih huhi hiu huiyfuyfg gyguy guygg uig serdyov soujdfzx gydfx 
\end{itemize}}%

输出结果如下。有什么方法可以删除中间两个部分之间的空白行吗?尽量不要使用vspace或其他东西来强制删除。 在此处输入图片描述

答案1

您添加到问题中的图像表明您正在使用样式classic而不是oldstyle

的相关定义\cvitem是:

\renewcommand*{\cvitem}[3][.25em]{%
  \begin{tabular}{@{}p{\hintscolumnwidth}@{\hspace{\separatorcolumnwidth}}p{\maincolumnwidth}@{}}%
    \raggedleft\hintstyle{#2} &{#3}%
  \end{tabular}%
  \par\addvspace{#1}}

这意味着您可以添加负 baseskip 作为可选参数来摆脱空行:

\cvitem[-\baselineskip]{AA}{\begin{itemize} % <====================================

因此,有了以下 MWE

\documentclass[11pt,a4paper,sans]{moderncv}

% moderncv themes
\moderncvstyle{classic} % oldstyle
\moderncvcolor{grey}

% character encoding
\usepackage[utf8]{inputenc}

% adjust the page margins
\usepackage[scale=0.75]{geometry}

% personal data
\name{John}{Doe}
\title{Resumé title}                               % 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
\phone[fax]{+3~(456)~789~012}                      % 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{additional information}                 % optional, remove / comment the line if not wanted
\photo[64pt][0.4pt]{example-image}
\quote{Some quote}                                 % optional, remove / comment the line if not wanted


\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{Food}
\cvitem[-\baselineskip]{AA}{\begin{itemize} % <====================================
\item aefefuh huih huih huhi hiu huiyfuyfg gyguy guygg uig serdyov soujdfzx gydfx 
\item aefefuh huih huih huhi hiu huiyfuyfg gyguy guygg uig serdyov soujdfzx gydfx 
\item aefefuh huih huih huhi hiu huiyfuyfg gyguy guygg uig serdyov soujdfzx gydfx  ae ra wer awer awe r awer 
\end{itemize}}
\cvitem{BB}{\begin{itemize}
\item efuh huih huih huhi hiu huiyfuyfg gyguy guygg uig serdyov soujdfzx gydfx  ddd oghcghvho gftudf ogdftftu fgyugvghcv
\item aefefuh huih huih huhi hiu huiyfuyfg gyguy guygg uig serdyov soujdfzx gydfx 
\item aefefuh huih huih huhi hiu huiyfuyfg gyguy guygg uig serdyov soujdfzx gydfx 
\end{itemize}}%

\end{document}

你得到你想要的:

在此处输入图片描述

相关内容