下面的代码
\documentclass{article}
\usepackage{arydshln} % These two packages aren't needed in this code because it's a minimal example,
\usepackage{tabularx} % but they're included because they're the source of the error.
\begin{document}
\begin{tabular}{c}
line 1 \\
\hline
line 2
\end{tabular}
\end{document}
给出了关于“\hline”的错误:
\adl@hline ...mpcnta \xdef \adl@rowsL {\adl@rowsL
(#1/\number
\@tempcnta );}... l.10 \hline
?
答案1
tabularx
之前加载arydshln
。
下面的代码按预期工作。
\documentclass{article}
\usepackage{tabularx}
\usepackage{arydshln}
\begin{document}
\begin{tabular}{c}
line 1 \\
\hline
line 2
\end{tabular}
\end{document}