[OS X TeX] Novice needs your help in latex2html and latex2rtf

Peter Dyballa Peter_Dyballa at Web.DE
Mon Nov 21 05:27:09 EST 2005


Am 21.11.2005 um 00:21 schrieb Peter Dyballa:

>> I'm using TexShop and iTexMac, is there any configuration here thus I  
>> can run
>> the latex2html and
>> latex2rtf by pressing some buttons?
>
> There are no button ...
>

My first recommendation wasn't complete, it only would have given  
TeXShop the ability to find latex2html and latex2rtf once you would  
have set them in Preferences -> Miscellaneous.

A more complete approach would be to create engines for TeXShop. They  
are located in ~/Library/TeXShop/Engines and have names like  
<programme>.engine. There might be already some. For latex2html.engine  
and latex2rtf.engine you would use this:

	#!/bin/tcsh -f
	set path=($path /usr/local/teTeX/bin/powerpc-apple-darwin-current  
/sw/bin)
	latex2html "$1"
	
	#!/bin/tcsh -f
	set path=($path /usr/local/teTeX/bin/powerpc-apple-darwin-current  
/sw/bin)
	latex2rtf "$1"

TeXShop would show these engines in the LaTeX or TeX menu. This way you  
would have the buttons. You could even ease this approach by adding to  
your TeX source lines like:

	%!TEX TS-program = latex2html

or

	%!TEX TS-program = latex2rtf

added by a line like

	%!TEX encoding = UTF-8 Unicode

or

	%!TEX encoding = IsoLatin

by which you tell TeXShop which engine to use automatically for tex'ing  
and which method to use to display the source in TeXShop editor.

This approach with the engines would make it unnecessary to change  
files in /etc or in your home directory. It would enable just these two  
shell scripts to find what they need in Fink's area. You would need to  
add one final step in Terminal: invoke 'chmod 755  
~/Library/TeXShop/Engines/*.engine'.


One can imagine that these simple scripts might fail because they do  
not find the teTeX distribution. Then a line like this before the  
actual command would help:

	setenv  
TEXMF	${HOME}/Library/texmf,/sw/etc/texmf.local/tex/latex/html,/usr/ 
local/teTeX/share/texmf.local,/usr/local/teTeX/share/texmf.gwtex,/usr/ 
local/teTeX/share/texmf.tetex,/usr/local/teTeX/share/texmf

dito if they would need to know other values. A different approach  
would be to correct the programmes' configuration files accordingly.

Both, latex2html and latex2rtf, accept many switches as to produce  
output compliant to some HTML standard or in some language or coding.  
You can just make the single engine many with descriptive names and put  
in front of "$1" these options. I think TeXShop can't handle these  
extra options.

--
Greetings

   Pete     === -Q
              ==<__/% >>
_____________(_)____ at _____________________________

------------------------- Info --------------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
          & FAQ: http://latex.yauh.de/faq/
TeX FAQ: http://www.tex.ac.uk/faq
List Archive: http://tug.org/pipermail/macostex-archives/




More information about the MacOSX-TeX mailing list