I am required to convert a LaTeX file (mypaper.tex
) to a DOCX file, for the requirement of a journal.
The latex document contains the following:
- Tables, figures and equations
- Bibliographic citations (my bibliographic database is titled
mycitation.bib
)
The figures are in a subdirectory called images
. In the latex file, I have referred to this subdirectory by using the command
\graphicspath{{images/}}
I downloaded a CSL file from the Zotero database. Let us say that the name of the CSL file is springer-science-reviews.csl
Now I run the following command to convert from .tex
to .docx
pandoc -s -S --filter pandoc-crossref --filter pandoc-citeproc --csl springer-science-reviews.csl --bibliography mycitation.bib mypaper.tex -o mypaper.docx
I see the following problems:
- Cross referencing does not work. [\ref{tab:pollution} remains in the docx file as {tab:pollution}
- Tables with commands like
@extracolsep
or those dependent on the latex'sarray
package are not rendered correctly.
An example, which does not work, is given here:
\begin{table}[htbp]
\centering
\caption{Pollution data}
\label{tab:pollution}
\begin{tabular}{@{\extracolsep{5pt}} clccccc}
\toprule & Name & V1 & V2 & Z1 & Z2 &Level\\
& {} & {$\mu$g/m$^3$} &{$\mu$g/m$^3$} &{$\mu$g/m$^3$} &{} &{}\\
\midrule
1 & MNEC & $77.160$ & $32.149$ & $3.793$ & $40.696$ &Good\\
2 & BNEC & $142.643$ & $36.142$ & $8.801$ & $66.274$ &Moderate\\
3 & TVCEN & $111.702$ & $41.657$ & $5.949$ & $57.070$ &Moderate\\
\bottomrule
\end{tabular}
\end{table}