Converting a Lyx document to MS Word

2,261

Solution 1

Probably a little late to the party, but since it took me a long while to complete the task even as of today, I felt like it's worth leaving a trace.

Here's the procedure that got me home. It's a little cumbersome, yet it allowed me not to replace all special characters in my Italian document, which was were latex2rtf was failing.

  1. From Lyx, export your file in Latex(Luatex, didn't try the other options)
  2. Run htlatex [filename.tex] (a)
  3. Open the resulting file with Firefox, it should show all of your formattings rather well
  4. Select All-->Copy-->Paste into LibreOffice

I had to manually reinsert the images (b), but it felt like a gift when compared with all other methods I tried. Sorry I didn't test further refinements, but had to complete everything to comply with a tight deadline and hadn't had time to test afterwards. Will edit if able to.

(a) I suspect I got the package by installing the gigantic latex2rtf application, but it should be an easy find. (b) On that matter I suspect the Lyx export of images into Latex would have worked if the images didn't contain spaces in their filenames, but can't confirm yet. Might check and edit this little bit. Edit: checked (b), and I could not make it work. The spaces trick applies to latex2rtf.

Solution 2

Have you tried LyX-> LaTeX -> RTF-> Word?

Here are some additional suggestions, some paid options: http://wiki.lyx.org/FAQ/Compatibility#toc2

Solution 3

Install pandoc and add it to the path in LyX's preference configuration. Then reconfigure LyX and restart LyX. After restarting LyX, you will see a new export option like "export to office XML (Word)". For my experience, most math symbols can be easily converted into MS Word formula. Some are not if there is one symbol not recognized.

Good luck, the feature is available at least with LyX 2.3.4.

Share:
2,261

Related videos on Youtube

ek_ny
Author by

ek_ny

Updated on September 17, 2022

Comments

  • ek_ny
    ek_ny almost 2 years

    Maybe I'm doing this the wrong way, but in order to keep the code in my .rdl files to a minimum I would like to use a user defined function in order to populate the value in a placeholder. The UDF will just return a string. What's the easiest way to do this?

    • Rich Bradshaw
      Rich Bradshaw over 14 years
      Why do you want to do this? Wouldn't a PDF be better?
    • Robert Munteanu
      Robert Munteanu over 14 years
      It is a requirement from an external publication.
  • Robert Munteanu
    Robert Munteanu over 14 years
    Thanks for the answer. I've seen that page, but had no luck with the options listed there.
  • user
    user over 8 years
    You should be able to open the HTML file directly in most modern word processors, including Microsoft Word and LibreOffice Writer.
  • Giampaolo Ferradini
    Giampaolo Ferradini over 8 years
    It usually works, but it also failed me. The Lyx export into lyXHTML of my latest document couldn't even be read by Firefox.