![如何注释具有增加的 hline 数量的 \hline 条目?](https://linux22.com/image/339004/%E5%A6%82%E4%BD%95%E6%B3%A8%E9%87%8A%E5%85%B7%E6%9C%89%E5%A2%9E%E5%8A%A0%E7%9A%84%20hline%20%E6%95%B0%E9%87%8F%E7%9A%84%20%5Chline%20%E6%9D%A1%E7%9B%AE%EF%BC%9F.png)
答案1
\hline
我从source2e中取出了的定义并对其进行了修改。
\documentclass{article}
\usepackage{amsmath, amsfonts}
\newcounter{mycount}
\makeatletter
\def\hline{\noalign{\ifnum0=`}\fi% from source2e
\stepcounter{mycount}\llap{\scriptsize\raisebox{-.75ex}[0pt][0pt]{\themycount}\hspace{.2em}}% added
\hrule \@height \arrayrulewidth \futurelet\reserved@a\@xhline}% from source2e
\makeatother
\begin{document}
\begin{tabular}{ l l }
\hline%_{1}
1 & 2\\
\hline%_{2}
3 & 3\\
\hline%_{3} How to annotate hlines?
\end{tabular}
\end{document}