180 lines
4.1 KiB
HTML
180 lines
4.1 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
|
||
<HTML>
|
||
<HEAD>
|
||
<META NAME="GENERATOR" CONTENT="SGML-Tools 1.0.9">
|
||
<TITLE>Linuxdoc Reference: Labels and References</TITLE>
|
||
<LINK HREF="Linuxdoc-Reference-11.html" REL=next>
|
||
<LINK HREF="Linuxdoc-Reference-9.html" REL=previous>
|
||
<LINK HREF="Linuxdoc-Reference.html#toc10" REL=contents>
|
||
</HEAD>
|
||
<BODY>
|
||
<A HREF="Linuxdoc-Reference-11.html">Next</A>
|
||
<A HREF="Linuxdoc-Reference-9.html">Previous</A>
|
||
<A HREF="Linuxdoc-Reference.html#toc10">Contents</A>
|
||
<HR>
|
||
<H2><A NAME="labelandreference"></A> <A NAME="s10">10. Labels and References</A></H2>
|
||
|
||
<P>
|
||
<HR>
|
||
<PRE>
|
||
<!entity % xref
|
||
" label|ref|pageref|cite|url|htmlurl|ncite " >
|
||
</PRE>
|
||
<HR>
|
||
<P>As soon as it´s a little bit more sophisticated a document will need
|
||
references to other places within the document.
|
||
<P>
|
||
<P>
|
||
<H2><A NAME="label"></A> <A NAME="ss10.1">10.1 Label Tag</A>
|
||
</H2>
|
||
|
||
<P>
|
||
<HR>
|
||
<PRE>
|
||
<!element label - o empty>
|
||
<!attlist label id cdata #required>
|
||
</PRE>
|
||
<HR>
|
||
|
||
If you want to refer to a spot, chapter or section within your document
|
||
you place a <EM>label tag</EM>.
|
||
<P>A example could look like:
|
||
<HR>
|
||
<PRE>
|
||
<sect1>Welcome to the article<label id="intro">
|
||
<p>...
|
||
</PRE>
|
||
<HR>
|
||
<P>
|
||
<P>
|
||
<H2><A NAME="ref"></A> <A NAME="ss10.2">10.2 Reference Tag</A>
|
||
</H2>
|
||
|
||
<P>
|
||
<HR>
|
||
<PRE>
|
||
<!element ref - o empty>
|
||
<!attlist ref
|
||
id cdata #required
|
||
name cdata "<@@refnam>">
|
||
</PRE>
|
||
<HR>
|
||
<P>With this tag you can refer to a place within your document
|
||
labeled as in
|
||
<A HREF="#label">Label Tag</A>.
|
||
<P>The way the reference is mapped in you document again depends
|
||
to the mapper.
|
||
May result to a hyper-ref (HTML) or a section number (LaTeX).
|
||
<P>
|
||
<P>
|
||
<H2><A NAME="pageref"></A> <A NAME="ss10.3">10.3 Page reference Tag</A>
|
||
</H2>
|
||
|
||
<P>
|
||
<HR>
|
||
<PRE>
|
||
<!element pageref - o empty>
|
||
<!attlist pageref
|
||
id cdata #required>
|
||
</PRE>
|
||
<HR>
|
||
<P>A example for a pageref:
|
||
<HR>
|
||
<PRE>
|
||
<pageref id="intro">
|
||
</PRE>
|
||
<HR>
|
||
<P>In the HTML mapping there is no use for <EM>pageref</EM>, because there are
|
||
no page numbers.
|
||
In LaTeX mapping the tag is mapped to the pagenumber of the reffered label.
|
||
<P>
|
||
<H2><A NAME="url"></A> <A NAME="ss10.4">10.4 Url Tag</A>
|
||
</H2>
|
||
|
||
<P>
|
||
<HR>
|
||
<PRE>
|
||
<!element url - o empty>
|
||
<!attlist url
|
||
url cdata #required
|
||
name cdata "<@@urlnam>" >
|
||
</PRE>
|
||
<HR>
|
||
<P>A example for a <EM>url</EM>:
|
||
<HR>
|
||
<PRE>
|
||
<url url="http://www.gnu.org" name="GNU Organization">
|
||
</PRE>
|
||
<HR>
|
||
|
||
<A HREF="http://www.gnu.org">GNU Organisation</A><P>The mapping to html brings up a hyper-ref in your document.
|
||
The reference is the value of the <EM>url</EM> attribute, the text
|
||
standing in the Hyperref is the <EM>name</EM> attribute's value.
|
||
<P>In LaTeX mapping this one results to the name followed by the url.
|
||
<P>
|
||
<P>
|
||
<H2><A NAME="htmlurl"></A> <A NAME="ss10.5">10.5 Htmlurl Tag</A>
|
||
</H2>
|
||
|
||
<P>
|
||
<HR>
|
||
<PRE>
|
||
<!element htmlurl - o empty>
|
||
<!attlist htmlurl
|
||
url cdata #required
|
||
name cdata "<@@urlnam>" >
|
||
</PRE>
|
||
<HR>
|
||
|
||
A example for a htmlurl:
|
||
<HR>
|
||
<PRE>
|
||
<htmlurl url="http://www.gnu.org" name="GNU Organization">
|
||
</PRE>
|
||
<HR>
|
||
|
||
<A HREF="http://www.gnu.org">GNU Organisation</A><P>The only difference between this tag and the
|
||
<A HREF="#url">Url Tag</A> is in the LaTeX mapping.
|
||
<P>The LaTeX mapping simply drops the url attribute and
|
||
emphasizes the name.
|
||
<P>In all other cases it's absolutely the same as the <EM>url tag</EM>.
|
||
<P>
|
||
<P>
|
||
<H2><A NAME="cite"></A> <A NAME="ss10.6">10.6 Cite Tag</A>
|
||
</H2>
|
||
|
||
<P>
|
||
<HR>
|
||
<PRE>
|
||
<!element cite - o empty>
|
||
<!attlist cite
|
||
id cdata #required>
|
||
</PRE>
|
||
<HR>
|
||
<P>AFAIK this one need´s bibTeX to work nicely.
|
||
So I'm terribly sorry, but I was not jet able to make use of it.
|
||
For that reason for sure I'm the wrong one to explain about it.
|
||
<P>
|
||
<P>
|
||
<H2><A NAME="ncite"></A> <A NAME="ss10.7">10.7 Ncite Tag</A>
|
||
</H2>
|
||
|
||
<P>
|
||
<HR>
|
||
<PRE>
|
||
<!element ncite - o empty>
|
||
<!attlist ncite
|
||
id cdata #required
|
||
note cdata #required>
|
||
</PRE>
|
||
<HR>
|
||
<P>Same as
|
||
<A HREF="#cite">Cite Tag</A>.
|
||
<P>
|
||
<HR>
|
||
<A HREF="Linuxdoc-Reference-11.html">Next</A>
|
||
<A HREF="Linuxdoc-Reference-9.html">Previous</A>
|
||
<A HREF="Linuxdoc-Reference.html#toc10">Contents</A>
|
||
</BODY>
|
||
</HTML>
|