[l2h] Sections and labels

Ross Moore ross at ics.mq.edu.au
Thu Feb 12 03:32:44 CET 2009


Hi Mercado,

On 12/02/2009, at 12:46 PM, mercado wrote:

> I am creating a document using LaTeX and LaTeX2HTML, and I am unsure
> how to use the \section command and the \label command together.
>
> If I use the \label command before the \section command, then my link
> doesn't go to the right page.  If I use the \section command before
> the \label command, then I get strange markup with a <br /> tag within
> the <h1> tag:

Try putting the \label "inside" the section command;
viz.

   \section{whatever section\label{Page-C}}

or immediately after, on the same line (no break at all):

   \section{whatever section}\label{Page-D}

At least one of these should work for you.


>
> ---------------------------------------------------------------------- 
> ----------
> <H1><A NAME="SECTION00020000000000000000"></A>
> <A NAME="Page-B"></A>
> <BR>
>
> Page B
> </H1>
> ---------------------------------------------------------------------- 
> ----------
>
> Is this a bug is LaTeX2HTML?  I am including a small, self-contained
> sample below.
>
> I am using LaTeX2HTML version 2002-2-1 (1.71).
>
> Thanks in advance.
>
> ---------------------------------------------------------------------- 
> ----------
> \usepackage{html}
>
> \begin{document}
>
> \label{Page-A}
> \section{Page A}
> This is Page A.
>
> Link to \htmlref{Page B}{Page-B}.
>
> \section{Page B}
> \label{Page-B}
> This is Page B.
>
> Link to \htmlref{Page A}{Page-A}.
>
> \end{document}
> ---------------------------------------------------------------------- 
> ----------


Hope this helps,

	Ross

------------------------------------------------------------------------
Ross Moore                                       ross at maths.mq.edu.au
Mathematics Department                           office: E7A-419
Macquarie University                             tel: +61 (0)2 9850 8955
Sydney, Australia  2109                          fax: +61 (0)2 9850 8114
------------------------------------------------------------------------





More information about the latex2html mailing list