给出下表:
\documentclass{article}
\usepackage[a4paper,margin=1mm]{geometry}
\usepackage{lipsum}
\usepackage{tabularray}
\begin{document}
\begin{longtblr}
[presep=-4pt,postsep=0pt]
{colspec = {lX},\columnwidth,colsep=4pt,hlines}
01/01/2020 $-$ 31/12/2022 & \textbf{First}\\
01/01/2018 $-$ 31/12/2019 & \textbf{Second}\\
01/01/2016 $-$ 31/12/2017 & \textbf{Third}
\end{longtblr}
\end{document}
在 longtblr 中,我想从表格左边距到右边距添加一个文本块,如下所示:
我该怎么做?
答案1
您可以合并两个单元格:
\documentclass{article}
\usepackage[a4paper,margin=1mm]{geometry}
\usepackage{lipsum}
\usepackage{tabularray}
\begin{document}
\begin{longtblr}[
presep=-4pt,postsep=0pt
]{
colspec = {lX},
\columnwidth,
colsep=4pt,
hlines,
hline{2}={0pt}
}
01/01/2020 $-$ 31/12/2022 & \textbf{First}\\
\SetCell[c=2]{wd=\textwidth-8pt} \lipsum[2] &\\
01/01/2018 $-$ 31/12/2019 & \textbf{Second}\\
01/01/2016 $-$ 31/12/2017 & \textbf{Third}
\end{longtblr}
\end{document}