我有以下代码:
\begin{table}[H]
\centering
\begin{tblr}{|X[j,valign=t] | X[j,valign=t]|X[j,valign=t]|X[j,valign=t]|}
\hline
Criteria & Sources(s) & Measures & Notes\\
\hline
Audience Engagement &
\begin{itemize}][noitemsep]
\item TKTKTTK (1999)
\item TKTKTKT (2019)
\end{itemize} &
\begin{itemize}[noitemsep]
\item TKTKTKTKT
\item TKTKTKTKTT
\end{itemize} &
fj; lfjalkjf;asdljfsdl; jfal;djfla jd; jlasdjf;ljf;ldj fla;dsj f;alj fadjljd\\
\hline
\end{tblr}
\end{table}
输出为:
第一列和最后一列垂直对齐到顶部,但中间两列(包含列表)居中。有什么办法可以解决这个问题吗?
答案1
请尝试以下操作:
\documentclass{article}
\usepackage{geometry}
\usepackage{enumitem}
\usepackage{tabularray}
\UseTblrLibrary{varwidth} % <---
\begin{document}
\begin{table}[ht]
\setlist[itemize]{nosep, itemsep=3pt, leftmargin=*}
\begin{tblr}{hlines, vlines,
colspec = {X[l] X[l] X[l] X[l] }, % <--- changed
stretch=-1, % <---
measure = vbox % <---
}
Criteria
& Sources(s)
& Measures
& Notes \\
Audience Engagement
& \begin{itemize}
\item TKTKTTK (1999)
\item TKTKTKT (2019)
\end{itemize}
& \begin{itemize}
\item TKTKTTK (1999)
\item TKTKTKT (2019)
\end{itemize}
& fj; lfjalkjf; asdljfsdl; jfal; djfla jd; jlasdjf; ljf; ldj fla; dsj f; alj fadjljd \\
\end{tblr}
\end{table}
\end{document}