LATEXWell-formed LATEX documents (those that do not
use homebrew macros, especially those using plain
TEX or obsolete commands) can be converted using the
TEX4ht package. At the time of writing (2015) this
is unsupported since the untimely death of its author,
but is fully functional.
TEX4ht can convert to HTML and ODF
(OpenOffice format) in
various ways, so the resulting file can easily be
opened in OpenOffice and
saved as a .docx file. There are
command-line options for the
oowriter program (or
lowriter if you are using
Libre Office) which allow
for scripted bulk conversion.
Other facilities are available in some editors and
online services (such as the blogs and forums which
support LATEX formatting in web pages). These may
also be used for conversion.
Microsoft WordWord
(.docx) files are Zip files
containing XML documents along with the associated
images and stylesheets. By default,
Word documents consist only
of paragraphs (w:p
elements). All the metadata about document structure
is provided as font and spacing information, which can
only reliably be interpreted by a human, making
meaningful conversion exceptionally difficult.
However, if named styles (from the
built-in style menu or created by the author) are used
consistently, it
is possible to write an XSLT3 script to match them and
output more usable XML markup.
Some editors (eg
XMLMind,
AbiWord) and other systems
now provide conversion from
Word, both to a purely
visual (HTML) format, mimicking the appearance of the
original, and to a ‘semantic’
vocabulary such as DocBook or DITA, with no
formatting.
The XSLT3 route also applies to
OpenOffice/LibreOffice,
which also stores XML in a Zip file. The markup is
different, but can be converted along the same
lines.