我按照这个帖子编写了以下代码:
\begin{table}[h!]
\centering
\begin{tabularx}{\textwidth}{|c|c|c|c|c|c|}
\hline A & B & C & D & E & F \\ \hline AA & BB & CC & blablabla blibli blobloblo blslklqs blablabla blibli blobloblo blslklqs blablabla blibli blobloblo blslklqs & \cite{urdampilleta2019gate} \\ \hline
\end{tabularx}
\end{table}
我的错误在哪里?我该如何改正?
答案1
需要一列。(在 之后X
也缺少。它有助于对齐行。)&
\cite
&
\documentclass[12pt,a4paper]{article}
\usepackage{tabularx}
\begin{document}
\begin{table}[h!]
\begin{tabularx}{\textwidth}{|c|c|c|X|c|c|}
\hline
A&B &C &D &E &F\\
\hline
AA&BB &CC &blablabla blibli blobloblo blslklqs blablabla blibli blobloblo blslklqs blablabla blibli blobloblo blslklqs
&\cite{urdampilleta2019gate}&\\
\hline
\end{tabularx}
\end{table}
\end{document}
答案2
为了娱乐和锻炼...使用tabularray
(2021N 版)套餐:
\documentclass[12pt,a4paper]{article}
\usepackage{tabularray}
\usepackage{lipsum}
\begin{document}
\begin{table}[ht]
\begin{tblr}{hlines, vlines,
colspec={cc c X[j] cc},
}
A & B & C & D & E & F \\
AA &BB &CC & \lipsum[66]
& \cite{urdampilleta2019gate}
& \\
\end{tblr}
\end{table}
\end{document}