这是我的代码。
\documentclass{article}
\usepackage{booktabs}
\begin{document}
\begin{table}[ht]
\caption{Tabel over forkortelser}
\label{tab:forkort}
\centering
\renewcommand\arraystretch{1.3}
\begin{tabular}{ll}
\toprule
Original form & Forkortelse &
\midrule
Cross-laminated-timber & CLT &
Bygningsreglement 18 & BR18 &
Eurocodes & EC &
\bottomrule
\end{tabular}
\end{table}
\end{document}
为什么编译时会出现奇怪的现象并出现错误?
答案1
正如评论中正确提到的,您需要\\
在每行后添加以声明该行的结尾。我修改了您的代码,以便它可以编译并正常工作:
\documentclass{article}
\usepackage{booktabs}
\begin{document}
\begin{table}[ht]
\caption{Tabel over forkortelser}
\label{tab:forkort}
\centering
\renewcommand\arraystretch{1.3}
\begin{tabular}{ll}
\toprule
Original form & Forkortelse \\
\midrule
Cross-laminated-timber & CLT \\
Bygningsreglement 18 & BR18 \\
Eurocodes & EC \\
\bottomrule
\end{tabular}
\end{table}
\end{document}