[OS X TeX] Tex to rtf converter
Herbert Schulz
herbs at wideopenwest.com
Wed Aug 4 17:42:59 EDT 2010
On Aug 4, 2010, at 4:27 PM, Herbert Schulz wrote:
>
> Howdy,
>
> First... since latex2rtf and latex2html are not part of a TeX Live distribution (ergo MacTeX) there is no reason to include such and engine.
>
> Here's an engine I use for creating latex->html documents using tex4ht. First go to ~/Library/TeXShop/Engines/ and pick any .engine file, duplicate it (Cmd-D) and renaame the duplicate htlatex.engine. Then open that file in TeXShop by double clicking it, replace all the text in that engine with
>
> #!/bin/bash
> htlatex "$1" "html,pic-m+,pic-tabular,pic-fbox"
>
> (make sure you end with a final return) and save it. When you restart TeXshop and open a source file take a look at the popup menu next to the Typeset button on the toolbar. you'll see the new engine listed.
>
> Here's how you use this engine. Open a latex .tex file you wish translated to html (I suggest you first COPY it and associated files into a new folder since lots of files will be generated) and, at the top of the file put the line
>
> % !TEX TS-program = htlatex
>
> replacing any line like that may already there. Then simply Typeset (Cmd-T). Since there is no pdf file created you must simply wait until processing shown in the Console window stops. Assuming you started with myfile.tex look for the myfile.html file. When you double click this file it should open in your Browser and show your document converted to html. It's usually quite ugly unless yout take pains to make it as best you can (e.g., use the mathptmx package to make math appear with the usual Times, etc.). You'll also want to play with the options listed in the engine: this is why such an engine is not supplied with TeXShop---too much personal taste.
>
> Good Luck,
>
> Herb Schulz
Howdy,
One more thing. if you've never used engines outside of the default ones that appear in the Typeset Menu (the extra engines only appear in that popup menu in the toolbar) you should take a look at the many engines that are supplied with TeXShop but activated to keep things simple for the beginner. Take a look at the folders in ~/Library/TeXshop/Engines/Inactive/.
I'll even push a set I put together that you may find useful :-). Take a look at the documentation (it also gives you the simple method to activate the engines) for the latexmk engines. These engines automate the process of creating documents with cross-references, bibliographies, indexes, etc., by running (pdf/xe)latex multiple times, with possible intermediate runs of bibtex and/or makeindex, to resolve cross-references, etc. It works with many multiple bibliography and index packages, etc.
Good Luck,
Herb Schulz
(herbs at wideopenwest dot com)
More information about the MacOSX-TeX
mailing list