| t.link | Software | Links |
tex2doc is a template for MS Word, containing two macros: tmlTeX2Doc
and tmlBrowseDocVars. The macro tmlTeX2Doc is intended to
help converting LaTeX-documents to Word. It was tested with Word 7 (U.S.
English) for Win95, and with Word 6 (German) for Mac. I don't know if it
works with newer versions.
This program is anything but robust and it is highly optimized for my personal needs. Use at your own risk. Don't forget to make backups before running this macro.
The macro modifies the document opened in the top window, which is supposed to be a LaTeX input file. The macro does not create or save any new files. Solely, if you ask tex2doc to run BibTeX, the macro creates the needed aux-file. During the translation process it creates some new documents that should be closed automatically at the end of the translation. So, if everything goes well, you should not see any of these temporary documents.
The macro creates some document specific text styles, if they are not
already defined: abbildung (graphics/picture), abstract, enumerate,
zitat (quotation). Captions are created according to the value of the
variable xlanguage$. At this time, English and German
captions are supported -- see here for how to
adapt tmlTeX2Doc for a different language. Basically, the macro can
deal with the following commands (some commands are supported better
than others):
Pictures are usually included using
\includegraphics{filename}. You can easily add your own
commands, whereby it is possible to use commands that define a caption
and a label - search the source code for "epsabb" for an example.
The filename suffixes, which are appended to the filename, are defined
in xpicformats$. Adapt this variable according to the
graphic filters installed on your computer.
The cite-command is optimised for apacite.sty.
For performance reasons, a list of supported cite commands can be
defined by setting the variable xcitecmds$. This feature
possibly doesn't work with other bib-styles -- if you use LaTeX'
standard styles, redefine the value of xcitemode$ at the
beginning of the source code. tex2doc makes use of the
bbl-file, not the aux-file -- as LaTeX does. The aux-file is only used
to tell BibTeX which citations are to be created.
In any case, take a look at the source code. Change the variables at the beginning of the file to modify some aspects of tex2doc's behaviour. Adapt the macro to your needs.
Open the template tex2doc.dot. This template contains the macro. In order to make the macro accessible, (1) either copy the macro to your standard template (normal.dot or Normal), using the organizer (Tools/Macro/Organizer), (2) or add the file tex2doc.dot to the list of standard templates, which can be set by selecting File/Templates from the menu. In case you don't know what I'm talking about -- templates?, macros?, menu?, normal.dot? --, please consult MS Word's documentation.
How do I use the macro? First, open your LaTeX document or, even better, open a copy of your file. Secondly, select Tools/Macro from the menu and look for "tmlTex2Doc". Press "Start", "Execute", "Run", or whatever this button is called.
When running tmlTeX2Doc, a user dialog gives you the following possibilities:
xbibtex$ contains the name of your
bibtex-application. On a Mac use the application's signature.After using tmlTeX2Doc, consider selecting "SaveAs..." from the file-menu.
Some people told me that this macro doesn't work with Word 2000 or newer. As I presently don't have time to update this macro, please check out the following link for similar and possibly better programs: http://tug.org/utilities/texconv/textopc.html
8.4.1999: tex2doc.zip (25KB)
| (c) 2001 Thomas Link (last updated Jul 28 2002) | home | top |