删除 longtblr 表内的 itemize 列表中的垂直空格

删除 longtblr 表内的 itemize 列表中的垂直空格

我有一个itemize列表longtblr

\documentclass{article}
\usepackage[a4paper,margin=1mm]{geometry}
\usepackage{lipsum}
\usepackage{paracol}
\usepackage{tabularray}
\usepackage{enumitem} % <-- for a compact itemize list

\begin{document}


\DefTblrTemplate{firsthead, middlehead,lasthead}{default}{}
\begin{longtblr}[
  presep=-4pt,postsep=0pt
]{
  colspec = {lX},
  colsep=4pt,
  hline{odd}={solid},
  row{odd}={belowsep=0pt},
  row{even}={abovesep=0pt},
  cell{even}{1} = {c=2}{wd=\textwidth-8pt,halign=j}
}
    01/01/2020 $-$ 31/12/2022 & \textbf{First}\\
    \begin{itemize}[noitemsep,topsep=0pt,parsep=0pt,partopsep=0pt]
        \item first item
        \item second item
        \item third item
        \item fourth item
        \item fifth item
        \item sixth item
    \end{itemize} &\\
    01/01/2018 $-$ 31/12/2019 & \textbf{Second}\\
    \lipsum[2] &\\
\end{longtblr}

\end{document}

在此处输入图片描述 如何删除列表01/01/2020 $-$ 31/12/2022 & \textbf{First}\\开始/顶部之间的垂直空白itemize

这是我想要的输出: 在此处输入图片描述

答案1

tabularray文档第 5.10 节 Library varwidth

  • \UseTblrLibrary{varwidth}
  • measure=vbox,stretch=-1

完整代码

\documentclass{article}
\usepackage[a4paper,margin=1mm]{geometry}
\usepackage{lipsum}
% \usepackage{paracol}
\usepackage{tabularray}
\UseTblrLibrary{varwidth}%<-- added
\usepackage{enumitem} % <-- for a compact itemize list

\begin{document}


\DefTblrTemplate{firsthead, middlehead,lasthead}{default}{}
\begin{longtblr}[
presep=-4pt,postsep=0pt
]{
colspec = {l X},
colsep=4pt,
hline{odd}={solid},
row{odd}={belowsep=0pt},
row{even}={abovesep=0pt},
cell{even}{1} = {c=2}{wd=\textwidth-8pt,halign=j},
measure=vbox,stretch=-1,%<-- added
}
    01/01/2020 $-$ 31/12/2022 & \textbf{First}\\
    \begin{itemize}[noitemsep,nosep]
        \item first item
        \item second item
        \item third item
        \item fourth item
        \item fifth item
        \item sixth item
    \end{itemize} &\\
    01/01/2018 $-$ 31/12/2019 & \textbf{Second}\\
    \lipsum[2] &\\
\end{longtblr}

\end{document}

在此处输入图片描述

相关内容