[tex4ht] Use Original \label as Anchor Text

Karl Berry karl at freefriends.org
Sat Sep 26 01:35:44 CEST 2009

Hi Allen,

    I tried \htmlanchor in the version of Tex4ht which comes with Fedora
    11, which the RPM describes as version "1.0.2008_09_16_1413". 

That version should be ok.

    I could not find htmlanchor defined in the Tex and Tex4ht
    directories. Is this in a later version of Tex4ht?

No.  I gave you the wrong information, because I'd forgotten what I'd
done; I kew \htmlanchor didn't sound right for one of Eitan's names!

What I actually do in the TL manual is this (when processing with

\def\htmlanchor#1{\HCode{<a id="#1"></a>}}

I also define \htmlanchor to just gobble its argument when processing
otherwise, since \HCode wouldn't be defined.  (Of course there are other
ways to conditionalize it.)

Bottom line: you can use \HCode{...} to insert literal HTML into your

Happy anchoring,

More information about the tex4ht mailing list