[OS X TeX] Tex to rtf converter
Herbert Schulz
herbs at wideopenwest.com
Wed Aug 4 17:27:11 EDT 2010
On Aug 4, 2010, at 3:51 PM, Sr Sur wrote:
> Also, since I have no idea what the above means, could you give as an
> example the complete engine which is in your own TeXShop?
>
> I Agree with Alain... I don't have no idea waht does it mean. ¿...?
>
> bests
>
> On 4 August 2010 20:33, Alain Schremmer <schremmer.alain at gmail.com> wrote:
>
>>
>> On Aug 4, 2010, at 1:02 PM, Peter Dyballa wrote:
>>
>> And this to create HTML output:
>>>
>>> #!/bin/tcsh -f
>>> set path=($path <path to executables of your TeX distribution>
>>> <path to where latex2html was installed>)
>>> latex2html "$1"
>>>
>>
>> I, of course, could not.
>>
>> But, if that is all there is to it, why is isn't it already there? Criminal
>> negligence?
>>
>> Also, since I have no idea what the above means, could you give as an
>> example the complete engine which is in your own TeXShop?
>>
>> If you do, in return, I will go and help you create a dry-stone wall next
>> time I am in Europe.
>>
>> Most hopeful regards
>> --schremmer
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
(herbs at wideopenwest dot com)
More information about the MacOSX-TeX
mailing list