代码:
\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}
电流输出:
期望输出:
答案1
您可以使用\SetCell
合并多个单元格:
\documentclass[a4paper,11pt]{article}
\usepackage{tabularray}
\begin{document}
\begin{table}[ht]
\begin{tblr}{width=\textwidth,
colspec={X[l] X[r]},
hline{1,3} = {solid},
cell{2-Z}{1} = {halign=j,wd=\linewidth-12pt}
}
\textit{Lorem Ipsum} & \textit{Ipsum Lorem}\\
\SetCell[c=2]{} 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]{} 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}