next up previous
Next: 8. Transportability of the Up: A Short Beginner-User's Guide Previous: 6. Introducing Images in

Subsections

   
7. Cross References

LaTeX allows for two types of cross-references:

* "normal" references:
These references are relative to equations, figures, sections, figures, tables. These features are indexated by a number (possibly of the form X.X).
* "page" references:
These references are relative to the page numbers of the document.


7.1 "normal" References

A single command:

\hyperref{HTML-text}{LaTeX-text}{post-LaTex-text}{label}

allows to handle the treatment of "normal" references (equation, figures, sections, figures, tables...) by both LATEX and HTML:


LaTeX will handle the label in a normal way as \ref{label}, which is used for labelling and numbering equations, figures etc... , and this reference will be surrounded by \ref{LaTeX-text} and \ref{post-LaTeX-text} character strings.

HTML will handle the label by highlighting the character string \ref{HTML-text} the hyperlink will lead the reader to the place where label is defined.



WARNING: Apparently, this command does not support the presence of "underscore" in the label name. This is a bug of LaTeX2HTML, the "underscore" character should then be replaced by "minus" or "column" for labelling.



Example with an equation :

Here is the continuity equation (which label is assumed to be eq-cont):


 \begin{displaymath}\frac{dX}{dt} = 3 X + 2
\end{displaymath} (1)

In the source file, the following command:

\hyperref{continuity equation}{continuity equation (}{)}{eq-cont} will result in the following appearance:

with LaTeX: continuity equation (1), ...

with HTML : continuity equation, ...


Here is the effective result of the command with the software that you are using:

continuity equation

Example with a section :

The following link goes to section "Conditionality" in HTML version, and refers to the same section in the paper version:

Conditionality




7.2 "page" References

The case of page references is quite particular since HTML page are not supposed to be numbered. A reference like "see p. 42" in the paper documentation should then be avoided in general. When such a page reference is necessary it would rather appear as "see above p.42". In the electronic version, the word "above" would be highlighted and "p.42" would not appear in the HTML page. The user just have to click on "above" to be linked to the right place.

WARNING: Apparently, the command \hyperref does not support the following syntax:

\hyperref[page]{HTML-text}{LaTeX-text}{post-LaTex-text}{label},

unlike described in the reference documentation. However, the same result can easily be achieved with a double (conditional) command as follow:

\htmlref{see above}{page:cond} \latex{see above, p.~\pageref{sec:cond}} This command writes "see above" and put a link to the concerned place in the text when processed with LaTeX2HTML. When processed with LaTeX skip to the specific LaTeX command to print "see above, p. xx".



Example with a page :

The following command creates a link which goes to page where "Conditionality" section is, when processed by HTML; and refers to the true paper-number of this same page when processed by LaTeX :

Conditionality


next up previous
Next: 8. Transportability of the Up: A Short Beginner-User's Guide Previous: 6. Introducing Images in
Pierre BENARD
2002-06-19