next up previous contents
Next: More fun with labels Up: Labels and Cross-References Previous: Your first label   Contents

Your first cross-references

Place the cursor somewhere in Section 2 of your document. Type

If you want to know more about this document, then see  
Section , which can be found on page .
Now -- with the cursor after the word ``section'' -- choose Insert $ \triangleright$Cross Reference. The Reference dialog pops up. It shows a list of the possible labels you can reference. At the moment, there should be only one, ``sec:aboutdocument''. Select it (it may be selected by default), and click Apply. Now put the cursor after the word ``page'', and change the reference type to use the page number then click Apply. (To be really correct, you should put a Protected Blank in between the word ``Section'' and the reference. Same for the page reference.)

LYX puts the references in a box right where the cursor was. In the printed document, this reference marker will be replaced with either the page or section number (depending on what you selected in the Insert Reference dialog). Use View $ \triangleright$Update $ \triangleright$DVI, and you'll see that on the last page we refer to ``Section 2'' and ``Page 1'' (or whatever page Section 2's title is on).

Conveniently, a cross-reference acts a hyperlink when you're editing a document in LYX; clicking on it will pop up the Reference dialog, clicking Go to reference will move the cursor to the referenced label.


next up previous contents
Next: More fun with labels Up: Labels and Cross-References Previous: Your first label   Contents
Jay Bolton 2004-04-15