[XeTeX] XeTeX, fancy headers and htlatex

Robert Spence spence at saar.de
Tue Jan 30 17:38:48 CET 2007


Rene,

Just a brief footnote to my posting of a few minutes ago:

I find it's a good idea, when trying to produce PDF and HTML in  
parallel from a (La)TeX source document, if as much of the HTML  
formatting as possible is done via CSS.  The instructions for  
building the .css file to accompany your .html file can be  placed in  
a file such as mycfg.cfg, which is referred to in the second  
parameter of the htlatex command (obligatorily in double quotation  
marks).  The resulting .css file is far from pretty, but it's valid.   
Most of the stuff one would want to do with fancy headers only  
affects .tex-->.pdf (via whatever route), not .tex-->.html (via the  
command htlatex).

(La)TeX unfortunately doesn't go as far as HTML/CSS in terms of  
separating form from content, which raises the broader issue of  
whether one should be attempting to produce .html from .tex in the  
first place, or whether it wouldn't be better to do everything  
in .xml right from the start, and then just call TeX as a typesetting  
engine if you want a printout or PDF ...  (On the other hand, TeX is  
just _so_ much fun to program in ...)

If you like, I can send you some examples (off-list) of experiments  
I've successfully conducted with XeTeX and TeX4ht in parallel.

You _can_ get it all to work, with a bit of tweaking.  Do you have  
many mathematical formulae to typeset, by the way?  Do they get  
successfully converted into graphics?  (The worst thing I've come up  
against while trying to use XeTeX and TeX4ht in parallel is active- 
link URLs which contain symbols like a tilde---I haven't been able to  
work that one out at all, so far...)

-- Rob Spence



More information about the XeTeX mailing list