If I feed a simple LaTeX table to Pandoc, e.g.
\begin{table}[h!]
\begin{tabular}{ll}
x&y\\
\end{tabular}
\caption{A caption}
\end{table}
and convert it to HTML using
pandoc -s table.tex -o table.html
the resulting table will lack the caption (moreover, it also prints the characters '[h!]' which is just for table positioning):
<p>[h!]</p>
<table>
<tbody>
<tr class="odd">
<td align="left">x</td>
<td align="left">y</td>
</tr>
</tbody>
</table>
Do I have to run pandoc differently? I am using pandoc version 1.12.3 on a Mac OS X 10.6.8. Captions used to be rendered fine in HTML with my previous version of Pandoc (1.9, I believe).
Best Answer
This issue was resolved in a newer version of Pandoc (cf. this commit, following OP's ticket at github). Versions older than
1.12.4
should correct this problem.For instance, with pandoc 1.12.4.2 (Compiled with texmath 0.6.6.1, highlighting-kate 0.5.8.5.), the following code
produces
which renders as
when compiled with
pandoc -s table.tex -o table.html
.