第一行两列,其余行单列宽,文字换行

第一行两列,其余行单列宽,文字换行

代码:

\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}

在此处输入图片描述

相关内容