我试图在顶行保留两列,并使其余的单列具有自动宽度扩展。但是,我不知道该怎么做。我阅读了文档,但细节太多,我无法理解。
代码:
\documentclass[a4paper,11pt]{article}
\usepackage{tabularx}
\usepackage{tabularray}
\usepackage{float}
\begin{document}
\begin{table}[ht]
\begin{tblr}{width=\textwidth,
colspec={X[l] X[r]},
hline{1,3} = {solid},
}
\text{Lorem Ipsum} & \text{Ipsum Lorem}\\
It is easy with "tabularray" package to set row fonts. And you can change the environment from "tblr" to "longtblr" to get a long table. \\
\end{tblr}
\end{table}
\end{document}
电流输出:
所需输出:
\documentclass[a4paper,11pt]{article}
\usepackage{tabularray}
\begin{document}
\begin{table}[ht]
\begin{tblr}{width=\textwidth,
colspec={X[l] X[r]},
hline{1,3} = {solid},
}
\textit{Lorem Ipsum} & \textit{Ipsum Lorem}\\
\SetCell[c=2]{\linewidth-12pt,halign=j} It is easy with "tabularray" package to set row fonts. And you can change the environment from "tblr" to "longtblr" to get a long table. &\\
\SetCell[c=2]{\linewidth-12pt,halign=j} It is easy with "tabularray" package to set row fonts. And you can change the environment from "tblr" to "longtblr" to get a long table. &\\
\end{tblr}
\end{table}
\end{document}