You are using a browser which doesn't fully support Cascading Style Sheets. This site will look much better in a browser that supports web standards, but its content is accessible to any browser or Internet device.
Reference without label
The concept of links we looked at so far was to make a piece of our text pointing to a chapter or anchor. For this, we made this piece of text a
\REF tag body, and specified the link target by the tags
name option.
\REF{name=There}<piece of text>
With this concept, the piece of text was always displayed. Now thinking of typical documents we quickly find cases where the text displayed should be something that is determined by the thing we reference, not something we know when writing the link: the number of a chapter or the title of a page that contains an anchor. And this becomes possible by omitting the tag body - which is obvious as we just said we don't need a text that we know of at link time.
Here is an example:
Chapter "\REF{type=linked name="That chapter"}" told us ...
The tag has no body, and so the chapters name ("That chapter") is made the link text, which relieves us from typing in it's title twice as in the long form
Chapter "\REF{type=linked name="That chapter"}<That chapter>" told us ...
And how to achieve display of the page number? A new option comes in for this, called
valueformat. Its default value
pure makes appear the
value of the referenced thing, which in case of a chapter headline is this headline itself. And so, the
Chapter "\REF{type=linked name="That chapter"}" told us ...
example worked.
By the way, for links to sequences the value of a named sequence number is the number, not the name:
Image \SEQ{name="block graph" type=images}.
...
Looking at the \REF{type=linked
name="block graph"}. image, we see
that the block graph ...
so the last part of this example results in something like
Looking at the 5. image, we see
that the block graph ...
Now to display the page number in a reference - just set
valueformat to
pagenr.
As mentioned in the \REF{type=linked
name=There valueformat=pagenr}. chapter, ....
Likewise,
pagetitle makes the
title of a referenced chapter appear. Huh? Isn't that what is displayed with
pure? Not necessarily - think of sequences or anchors.
pure for a sequence means "show me the sequence number", while
pagetitle says "show me the title of the chapter that contains the numbered item". Same for anchors. For links to chapters, well, you're right, there's no difference between
pure and
pagetitle.