aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2019-03-22 11:55:41 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2019-03-22 11:55:41 -0700
commit1e6077622635b6536ec10c8c67651ef0f4901cff (patch)
treea172c78c1a51e341ee4a833b9502b2f6701e9312 /test
parent97acf152e06a8371327204f7f18b0dee726539d4 (diff)
downloadpandoc-1e6077622635b6536ec10c8c67651ef0f4901cff.tar.gz
LaTeX writer: Fix footnotes in table caption and cells.
This fixes a bug wherein footnotes appeared in the wrong order, and with duplicate numbers, when in table captions and cells. We now use regular `\footnote` commands, even in the table caption and the minipages containing cells. Apparently longtable knows how to handle this. Closes #5367.
Diffstat (limited to 'test')
-rw-r--r--test/command/5367.md44
1 files changed, 44 insertions, 0 deletions
diff --git a/test/command/5367.md b/test/command/5367.md
new file mode 100644
index 000000000..ae8744dd7
--- /dev/null
+++ b/test/command/5367.md
@@ -0,0 +1,44 @@
+```
+% 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}[]{@{}c@{}}
+\caption[Sample table.]{Sample table.\footnote{caption footnote}}\tabularnewline
+\toprule
+\begin{minipage}[b]{0.16\columnwidth}\centering
+Fruit\footnote{header footnote}\strut
+\end{minipage}\tabularnewline
+\midrule
+\endfirsthead
+\toprule
+\begin{minipage}[b]{0.16\columnwidth}\centering
+Fruit{}\strut
+\end{minipage}\tabularnewline
+\midrule
+\endhead
+\begin{minipage}[t]{0.16\columnwidth}\centering
+Bans\footnote{table cell footnote}\strut
+\end{minipage}\tabularnewline
+\bottomrule
+\end{longtable}
+
+dolly\footnote{doc footnote}
+```