[l2h] Named Anchor tags.

Ross Moore ross@ics.mq.edu.au
Fri, 21 Jun 2002 07:50:00 +1000 (EST)

> Hi All,
>   What is the best way to place named anchor tags (just simple
> name="sec1.2part3") into the html output. We are using this to place
> lots of anchors into provincial curricula and would like to do this via
> "best practice". There are several ways, but what is recommended?

In LaTeX2HTML, perhaps the best way is to use \label commands.
Now \label{sec1.2part3} places the tag  <A NAME="sec1.2part3"></A>.
(With early versions of HTML the content of <A>...</A> tags had to be non-empty,
so a special character entity was used, &#160; I think. This may still
be encoded for LaTeX2HTML, but it can be changed.)

To make hyperlinks targeting such a marked location, there are various
commands:  \ref  \htmlref  \hyperref  (and \externalref , see below)
which allow different things for the anchor-text.

Furthermore, both \label and \ref can be used within macro expansions,
so that you can have hyperlinked \index entries, glossaries
and bibliographies, etc.

The manual documentation for LaTeX2HTML makes great use of these ideas.
You should have the LaTeX sources for this already, as part of the
LaTeX2HTML distribution.

When you use \label then LaTeX2HTML also writes a  labels.pl  file
which records all the locations where named labels occur.
This information can be read with other LaTeX2HTML jobs,
using the  \externallabels  command, so that an \externalref can
build the correct hyperlink to such a location in an external document.

For your application, I think this will be most useful.

All the best,

	Ross Moore
>   Thanks,
> Les Richardson
> H. Hardcastle School
> Edam, Sk. Canada
> _______________________________________________
> latex2html mailing list
> latex2html@tug.org
> http://tug.org/mailman/listinfo/latex2html