
В moderncv
документе использование тега itemize
в теге cvitem
создает дополнительный интервал после подробного списка.
Вот минимальный рабочий пример:
\documentclass{moderncv}
\moderncvstyle{casual}
\moderncvcolor{green}
\name{John}{Smith}
\begin{document}
\makecvtitle
\section{List section}
\cvitem{Some category}{
\begin{itemize}
\item the first
\item the second
\item the third
\end{itemize}
}
\cvitem{Another category}{
\begin{itemize}
\item number one
\item number two
\item number three
\end{itemize}
}
\cvitem{text}{with a description}
More text.
\end{document}
Я могу добавить \vspace{-1em}
после каждого itemize
, чтобы убрать пробел, но это похоже на борьбу с LaTeX, а не на его принятие. Есть ли настройка, которую я могу изменить, чтобы убрать здесь лишний пробел?
решение1
Возможность задать интервал a cvitem
уже предусмотрена классом moderncv
:
\documentclass{moderncv}
\moderncvstyle{casual}
\moderncvcolor{green}
\name{John}{Smith}
\begin{document}
\makecvtitle
\section{List section}
\cvitem[-1.2em]{Some category}{ %new code
\begin{itemize}
\item the first
\item the second
\item the third
\end{itemize}
}
\cvitem[-1.2em]{Another category}{ %new code
\begin{itemize}
\item number one
\item number two
\item number three
\end{itemize}
}
\cvitem{text}{with a description}
More text.
\end{document}
Смотреть moderncv.cls
файл:
% создает строку резюме с заголовком и соответствующим текстом
% использование: \cvitem[пробел]{заголовок}{текст}
решение2
Использовать minipage
:
\documentclass{moderncv}
\moderncvstyle{casual}
\moderncvcolor{green}
\name{John}{Smith}
\begin{document}
\makecvtitle
\section{List section}
\cvitem{Some category}{%
\begin{minipage}{\linewidth}
\begin{itemize}
\item the first
\item the second
\item the third
\end{itemize}
\end{minipage}
}
\cvitem{Another category}{%
\begin{minipage}{\linewidth}
\begin{itemize}
\item number one
\item number two
\item number three
\end{itemize}
\end{minipage}
}
\cvitem{text}{with a description}
More text.
\end{document}
Вы также можете использовать [t]
спецификатор позиции для minipage
:
\documentclass{moderncv}
\moderncvstyle{casual}
\moderncvcolor{green}
\name{John}{Smith}
\begin{document}
\makecvtitle
\section{List section}
\cvitem{Some category}{%
\begin{minipage}[t]{\linewidth}
\begin{itemize}
\item the first
\item the second
\item the third
\end{itemize}
\end{minipage}
}
\cvitem{Another category}{%
\begin{minipage}[t]{\linewidth}
\begin{itemize}
\item number one
\item number two
\item number three
\end{itemize}
\end{minipage}
}
\cvitem{text}{with a description}
More text.
\end{document}