I want to convert MS Office documents(DOC&DOCX) into LaTeX!

I need to do two steps to finish the conversion.

The first step is to convert the MS Office documents into libreoffice(ODT) by libreoffice4.2 odt:"writer8" *.DOCX.

The second step is to convert libreoffice(ODT) into LaTeX by w2l -config writer2latex.xml *.odt, which uses command xetex and this command support Chinese.

Actually I am able to finish the first step but I face some problems in the second step.

the formulas inputted by Mathtype and images have been converted the format of .svm, which can be opened in libreoffice(ODT). However, the LaTeX can't recognize .svm, which drives me crazy.

PS:This step is finished successfully. In the second step, if I open ODT produced in the first step in libreoffice(ODT) and export .tex using writer2latex extension, then the formulas inputted by Mathtype and images have been converted the format of .pdf, which can be recognized by LaTeX. The .tex can be compiled using xetex *.tex.

All the operations are executed in the environment of debian 7.5 , texlive2013.


Indeed, as written in the documentation of Writer2LaTeX for command line usage,

Limitation: The export filters support conversion of embedded objects and graphics to a suitable format. The command line utility can only handle graphics in the original format.

Hence, using the w2l command-line produces those .svm files. If you want to keep working with the command-line and not to have to launch OpenOffice (or LibreOffice, for that matter), you can use unoconv. A simple

unoconv -f pdf input-file001.svm 

will produce a input-file001.pdf that you might want to crop using

pdfcrop input-file001.pdf

you can then include your document using


You can have a look at a related question on SuperUser.

| improve this answer | |

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.