Latex to ODT conversion tips

Submitted by dylan on Mon, 2007-07-23 20:40.

 
Conversion of a .tex document to open document format (RTF)

latex2rtf file.tex

 
Conversion of a .tex document to open document format (ODT)

mk4ht oolatex file.tex

 
Some notes:

  1. disable hyperref package to prevent odd bug in citation listings
  2. input document should be latex-safe, i.e. eps figures
  3. need a working java installation
  4. commands like \onehalfspacing or begin{singlespace}...end{singlespace} may not work (setspace package)

 
Conversion of PDF, EPS, or Postscript figures to EMF (enhanced metafile format) for windows apps.

Note that these instructions are for unix-like systems. EMF support can be added to pstoedit via libEMF. The libEMF library contains several windows-specific coding practices, along with some sloppy use of include files. Instructions for compiling with a modern version of GCC (4.x) can be found here.

  1. Some related pages
    • http://www.physik.tu-cottbus.de/~george/unix/emf4unix.html
    • http://boshoff.za.net/linux/archives/2003_08.html
  2. download, hack, and compile the libEMF code (details)
  3. download, configure, and install pstoedit, note that you may have to manually define where the libEMF header and lib files are:
    ./configure --with-libemf-include=/usr/local/include/libEMF/ \
    --with-libemf-lib=/usr/local/lib/
  4. run ldconfig as root to refresh the library cache
  5. [Finally] Convert a PDF file into an OpenOffice-compatible EMF file (well sort of...)
    pstoedit -pta -f emf:"-OO -p -drawbb" file.pdf file.emf
  6. It seems like figures are clipped to smaller-than-expected bounding boxes unless the special flag -drawbb is used. One side-effect of this however is a box drawn around your figure. Also, the -pta flag is needed to ensure quality text placement. Even though the resulting EMF files may look odd on a Linux machine, they appear to work as expected in Windows.
  7. 

( categories: )