Files
John MacFarlane 7a82686adc Use \toprule\noalign{} instead of \toprule() in LaTeX tables.
And similar for `\midrule` and `\bottomrule`.

This facilitates redefining `\toprule`, `\midrule`, and `\bottomrule`
without needing to gobble the ()s.

Closes #8223.
2023-01-04 13:57:41 -08:00

460 B

Ensure that we don't get duplicated footnotes when a note occurs in a header cell and \endfirsthead is used.

% pandoc -t latex
| x | y[^fn] |
|-|-|
|1|2|
: a table

[^fn]: a footnote
^D
\begin{longtable}[]{@{}ll@{}}
\caption{a table}\tabularnewline
\toprule\noalign{}
x & y\footnote{a footnote} \\
\midrule\noalign{}
\endfirsthead
\toprule\noalign{}
x & y{} \\
\midrule\noalign{}
\endhead
\bottomrule\noalign{}
\endlastfoot
1 & 2 \\
\end{longtable}