Files
pandoc/test/command/5367.md
T
John MacFarlane 57272eab32 LaTeX writer: don't use footnotehyper for notes in longtable.
Instead, generate them manually as we do for floating tables.

This removes our dependency on footnotehyper, and solves a
compatibility problem with `endfloat`.

Closes #11857.
2026-09-20 11:33:39 -07:00

974 B

% pandoc -t latex
hello[^1]

: Sample table.[^2]

-----------
 Fruit[^3]
-----------
 Bans[^4]
-----------

dolly[^5]

[^1]: doc footnote
[^2]: caption footnote
[^3]: header footnote
[^4]: table cell footnote
[^5]: doc footnote
^D
hello\footnote{doc footnote}

\begin{longtable}[]{@{}
  >{\centering\arraybackslash}p{(\linewidth - 0\tabcolsep) * \real{0.1667}}@{}}
\caption[Sample table.]{Sample table.\footnotemark{}}\tabularnewline
\toprule\noalign{}
\begin{minipage}[b]{\linewidth}\centering
Fruit\footnotemark{}
\end{minipage} \\
\midrule\noalign{}
\endfirsthead
\toprule\noalign{}
\begin{minipage}[b]{\linewidth}\centering
Fruit{}
\end{minipage} \\
\midrule\noalign{}
\endhead
\bottomrule\noalign{}
\endlastfoot
Bans\footnotemark{} \\
\end{longtable}
\addtocounter{footnote}{-2}
\footnotetext{caption footnote}
\addtocounter{footnote}{1}
\footnotetext{header footnote}
\addtocounter{footnote}{1}
\footnotetext{table cell footnote}

dolly\footnote{doc footnote}