<a href=..>
method.
The URLs of course only lead to clickable links in HTML output; in other
output formats only some descriptive text appears.
label(name)
defines a label named name
. The name of
the label can be used in a ref
or link
macro.
ref(name)
sets a reference to the label named name
.
The text of the reference is the number of the last sectioning command
that was active during the creation of the label. When using references it
is therefore important to define the corresponding labels right after a
sectioning command, as in
section(How to install my program) label(howtoinstall) This section describes... . . See section ref(howtoinstall) for installation instructions.
The macro ref(howtoinstall)
would then expand to the number of the
section named How to install my program.
link(description)(name)
always expands to the
description
. In HTML output, a clickable link is created
pointing to a label called name
. For example:
label(megahard) COMMENT(zucht...) The Jodel package isn't shareware, it isn't beggarware, it isn't freeware, it's bf(megahard-ware). . . Who wants a link(picosoft)(megahard)?
This code fragment would always set the text picosoft, but under HTML a clickable link would appear pointing to the text.
url(description)(location)
always expands to the
description
, but creates a hyperlink pointing to location
in HTML.
For example,
If you have W3 access, take a look at my url(homepage) (http://www.icce.rug.nl/we/karel/karel.html).
The text homepage
always appears, but only in HTML it is a link. (Note that the double
quotes, which are necessary in HTML around the location, are not needed in
Yodl.) To use a different font in the description
part, surrond it
inside the url paramater list, as in:
The Yodl package can be obtained at the site tt(pcnov095.win.tue.nl) in the directory url(tt(/pub/yodl)) (ftp://pcnov095.win.tue.nl/pub/yodl).
email(address)
is a special case of url
: under HTML,
the address
appears as a clickable link in slanted font to mail
address
. For example:
I can be reached as email(karel@icce.rug.nl).
I can be reached as karel@icce.rug.nl.
Always keep in mind that the name of a label must be exactly identical in both
the label
macro and in the ref
or link
macro. Other than that,
the name is irrelevant.
Note also the macro package also implements a macro includefile
, that
includes a file and automatically creates a label. That means that a Yodl file
like:
chapter(Introduction) sect(Welcome) includefile(welcome) chapter(Technical information) includefile(techinfo)
implicitly creates two labels, named welcome
and techinfo
.
Below are some randoms dont's about labels and references:
ref(em(labelname))
The reason for the incorrectness is, what internal name should
em(labelname)
generate? Here probably an attempt is made to set a
reference in italics. The right construction is of course to set whatever
ref()
returns in italics, as in:
em(ref(labelname))
label
macro should not appear nested inside another macro.
There is no strict reason for this as far as Yodl is concerned; however, the
processors of Yodl's output might go haywire. E.g., beware of the
construction
section(Introduction label(intro))
The right stanza is of course
section(Introduction) label(intro)
undef(x)
Please send Yodl questions and comments to yodl@icce.rug.nl.
Please send comments on these web pages to
(address unknown),
send other FSF & GNU inquiries and questions to
Copyright (c) 1998 Karel Kubat and Jan Nieuwenhuizen
Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved.