summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/generic/expex/source/example2.tex
blob: 584d2ba27d5c88a2c4c10a30543b6cb27dc1f74d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53

\vfil\eject
\introsec{Named reference}

\codedisplay
If examples and parts of examples are tagged, they can be
referred to by name.

\pex<pg>
\a This is the man that John interviewed {\sl e\/} before
telling you that you should give the job to~{\sl e}.
\a<A> This is someone who John expected {\sl e\/} to be successful
though believing {\sl e\/} to be incompetent.
\xe

Now, names can be used.  The name/reference pairs can be written
to a file, making forward reference possible and backwards
reference at a distance reliable.  You can refer to part
\getref{pg.A} of example (\getref{pg}), or (\getfullref{pg.A}).

If you use a tag that has not been defined, {\sl ExPex\/} will
let you know. If you try to reference a name which has no
reference, \getref{pg.B} for example, a warning will be issued
and the (bracketed) tag printed as shown at the beginning of this
sentence.  If you try to tag a part of an example which has no
tag, {\sl ExPex\/} will let you know about that as well.
|endcodedisplay

\framedisplay~
\bigskip
If examples and parts of examples are tagged, they can be
referred to by name.

\pex<pg>
\a This is the man that John interviewed {\sl e\/} before
telling you that you should give the job to~{\sl e}.
\a<A> This is someone who John expected {\sl e\/} to be successful
though believing {\sl e\/} to be incompetent.
\xe

Now, names can be used.  The name/reference pairs can be written
to a file, making forward reference possible and backwards
reference at a distance reliable.  You can refer to part
\getref{pg.A} of example (\getref{pg}), or (\getfullref{pg.A}).

If you use a tag that has not been defined, {\sl ExPex\/} will
let you know. If you try to reference a name which has no
reference, \getref{pg.B} for example, a warning will be issued
and the (bracketed) tag printed as shown at the beginning of this
sentence.  If you try to tag a part of an example which has no
tag, {\sl ExPex\/} will let you know about that as well.
\bigskip
\endframedisplay