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.
Missing targets
Whether the target of a reference is located above or below it doesn't matter. But what if it doesn't exist at all? By default, this is an error - a nonexisting target was probably renamed or misspelled unintentionally. But taking into account what you can do with PerlPoint, this rule not always makes sense:
- If you have a dynamic document with sections hidden occasionally and link to an existing chapter, this chapter might be missing in the final document. The link is correct, but the (valid) target might disappear nevertheless.
- Teamwork allows you to combine documents by various authors. Given there's a common outline, authors could refer to chapters written by others. These chapters exist, the links are valid, but in the local document of a single author the targets are missed.
To deal with such cases, all we have to do is to add option
occasion
to
\REF
.
As foretold in the \REF{name=Intro type=linked
occasion=1}<introduction>, we want to have a
closer look at ...
Now, if the target cannot be found, PerlPoint no longer stops processing with a complaint. Instead, it emits a warning to keep you informed - so you can check if the target is missed by intention (or just misspelled).
By the way, the last example shows that we can wrap a line within a tag option area. The same is true for the tag body - lines can be wrapped within as well.
As foretold in the \REF{name=Intro
type=linked occasion=1}<introduction
that was given a few chapters
before>, we ...
The reason this works is that the general rule of breaking lines in multiline paragraphs at whitespaces applies exactly as for plain text.
If you do not want to write such long tags with many options, always remember you can declare macros to have handy shortcuts.
// a macro for optional references +OREF:\REF{name=__n__ type=linked occasion=1}<__body__> // and then: As foretold in the \OREF{n=Intro}<introduction>, we want to have a closer look at ...
As for the
result,
type=linked
is transformed into
type=plain
behind the scenes if a target is missed with
occasion
.