4

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.

  • 1
    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
0

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.

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.