pandoc/test/command/5367.md
John MacFarlane 21cc52abe3 LaTeX writer: Fix regression in table header position.
In recent versions the table headers were no longer bottom-aligned
(if more than one line).  This patch fixes that by using minipages
for table headers in non-simple tables.

Closes #7347.
2021-06-05 14:13:58 -06:00

769 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{(\columnwidth - 0\tabcolsep) * \real{0.17}}@{}}
\caption[Sample table.]{Sample table.\footnote{caption footnote}}\tabularnewline
\toprule
\begin{minipage}[b]{\linewidth}\centering
Fruit\footnote{header footnote}
\end{minipage} \\
\midrule
\endfirsthead
\toprule
\begin{minipage}[b]{\linewidth}\centering
Fruit{}
\end{minipage} \\
\midrule
\endhead
Bans\footnote{table cell footnote} \\
\bottomrule
\end{longtable}

dolly\footnote{doc footnote}