Tables missing when I convert latex file to html or docx

I use the latest version of pandoc. and I want to convert a .tex file to .docx. But everything works well except that several tables are not converted. The original symbols are shown on the converted file, like "xxx & xxx & xxx''. I tried to convert it to .html instead but it has the same problem.

I am not a frequent pandoc user. Can someone help me out?

Here is part of the original file:

\begin{longtable}{ p{12cm} r }
Statement & XXX \\
\hline

line 1 & 100\% \\
line 2 & 100\% \\
line 3 & 88\% \\

\end{longtable}


It works well in typesetting. No errors shown. I then use this pandoc command:

pandoc -s teaching\ p.tex -o 2.html


It shows:

p12cm r Statement & XXX

line 1 & 100%

line 2 & 100%

line 3 & 88%

Thanks.

• Without any code and with no idea which command exactly you invoked? And with no idea whether the console output included any warnings or errors, and with no idea whether the file even compiles correctly with TeX? Good luck! – cfr Aug 29 '16 at 2:34

Old question, but in case someone find the same dificulties.

You are simply using the wrong pandoc command. Here is a (malformed) MWE:

\begin{longtable}{ p{12cm} r }
Statement & XXX \\
\hline

line 1 & 100\% \\
line 2 & 100\% \\
line 3 & 88\% \\

\end{longtable}


Save it in a file named document.tex and render it with pandoc document.tex -f latex -t docx -o document.docx or with pandoc document.tex -f latex -t html -o document.html. It works fine.

• This does not work for more complicated tables (e.g. regression output) – invictus Oct 17 '18 at 14:50