[XeTeX] XeTeX, fancy headers and htlatex
macmechanic at fastmail.fm
Tue Jan 30 19:44:15 CET 2007
Robert Spence wrote:
> Just a brief footnote to my posting of a few minutes ago:
Thank you, thank you, thank you for your help and offer to help even
I would love to see your examples, etc. One of the things I like about
TeX is that I can write a document once and get it typeset beautifully
for printing as well as easily make html docs without a lot of extra
work. Mostly I've used LaTeX and am now exploring using XeTeX to see if
that would work best for me. Now, on to some of the specifics . . .
> 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.
Ok, this makes sense. I am no wiz but I try to make nice web pages that
are w3c and css compliant. That said, I really am a LaTeX novice -- I've
used LaTeX for 3-4 years now and mostly have been able to do most of
what I need, but my needs are not sophisticated. Indeed, I really don't
know what some of the stuff in my preamble exactly does. But, by
trial-and-error and borrowing from documents that I like, I've gotten to
something that works for me.
As an example of my needs/uses, visit
where you will see that I make some of the class documents available in
both pdf and html format. This is because I do not print out documents
for the class (there are sometimes ca. 100 and I try to save paper). The
pdf documents are, of course, written in LaTeX. I make some of the
documents (usually assignments) avail as html.
A typical document that I'll write in LaTeX and convert to html too
occasionally use math equations, and they have been a chore to get to
work in html. My work around for those is to make the equation using
LaTeXiT, then make a jpg or something to use in the web version. I know,
not very elegant!
These are examples of two documents that I wrote in LaTeX but didn't get
very good html output
I think this is mostly because I don't know a lot of fancy stuff and how
to correctly constrain image size, etc. I get 'bounding box' errors and
the like . . .
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).
A lot of this makes sense, but I've never worked with a .cfg file.
> (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 ...)
I do know some html and css - but xml is something I know nothing about.
> 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?
Not really and when I do have a problem, see my not elegant workaround
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...)
I've had this problem too in LaTeX. I seem to recall that there is a
special command for this .... I'll have to look in one of my books to
see if I can find it again.
> -- Rob Spence
Thanks so much!
More information about the XeTeX