我正在尝试在表格中创建列表。但是,列表前后的间距有问题。我不想因为 itimze/list 等而产生任何额外的间距。第一个项目符号应该紧接着上面的行开始,下面的单元格也应该紧接着下面的行开始。topsep 选项似乎在这里不起作用,即使设置为 0 等。底部有些是正确的。这是由于使用了其他任何包/格式选项等吗?还是有提示?提前谢谢
\documentclass[10pt, headinclude]{article}
\usepackage{array, xcolor, fancyhdr, booktabs}
\usepackage[paper=a4paper, left=2cm, right=2cm, top=2cm, bottom=2cm]{geometry}
\usepackage{enumitem}
\pagestyle{fancy}
\headheight = 15pt
\lhead{ipsum}
\chead{}
\rhead{November 2014}
\lfoot{}
\cfoot{\thepage}
\rfoot{}
\definecolor{lightgray}{gray}{0.8}
\newcolumntype{L}{p{0.16\textwidth}}
\newcolumntype{R}{p{0.8\textwidth}}
\newcommand\VRule{\color{black}\vrule width 0.2pt}
\begin{document}
%Header line
\renewcommand{\headrulewidth}{0pt}
\centerline{\begin{minipage}[c]{0.4\linewidth} \begin{center} \LARGE \bf
Mustermann
\end{center}
\end{minipage}}
\vspace{25pt}
\centerline{\begin{minipage}[c]{0.4\linewidth} \begin{center}
lipsum
\end{center}
\end{minipage}}
\vspace{10pt}
\section*{Personal Details}
lispum
\section*{Education}
\begin{tabular}{L!{\VRule}R}
10/2011-03/2014 & \textbf{Uni of Witchcraft}\\ lorem ipsum \\
& \begin{itemize}[noitemsep, nolistsep, topsep=0pt]
\item lorem et al:
\item `Lorem con temperum'
\item Veni, vedi, vici
\end{itemize} \\ [5pt]
\end{tabular}
\end{document}
答案1
一种简单的方法是将列表括在里面,minipage
这样空格就会被吞噬。
\begin{tabular}{L!{\VRule}R}
10/2011-03/2014 & \textbf{Uni of Witchcraft}\\
lorem ipsum & just a dummy line\\
& \begin{minipage}[t]{\linewidth}
\begin{itemize}[nosep]
\item lorem et al:
\item `Lorem con temperum'
\item Veni, vedi, vici
\end{itemize}
\end{minipage} \\ %[5pt]
& another dummy line
\end{tabular}
关于评论:
如果希望列表底部有一些空间,可以使用提供的before
和键并自行插入垂直空间:after
enumitem
\begin{tabular}{L!{\VRule}R}
10/2011-03/2014 & \textbf{Uni of Witchcraft}\\
lorem ipsum & just a dummy line\\
&
\begin{itemize}[before=\vspace{-0.5\baselineskip},after=\vspace{-\baselineskip},nosep]
\item lorem et al:
\item `Lorem con temperum'
\item Veni, vedi, vici
\end{itemize}
\\ [5pt]
& another dummy line
\end{tabular}