Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
LaTeX Beginner's Guide

You're reading from   LaTeX Beginner's Guide When there‚Äôs a scientific or technical paper to write, the versatility of LaTeX is very attractive. But where can you learn about the software? The answer is this superb beginner‚Äôs guide, packed with examples and explanations.

Arrow left icon
Product type Paperback
Published in Mar 2011
Publisher Packt
ISBN-13 9781847199867
Length 336 pages
Edition 1st Edition
Tools
Arrow right icon
Toc

Table of Contents (21) Chapters Close

LaTeX
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
1. Getting Started with LaTeX FREE CHAPTER 2. Formatting Words, Lines, and Paragraphs 3. Designing Pages 4. Creating Lists 5. Creating Tables and Inserting Pictures 6. Cross-Referencing 7. Listing Content and References 8. Typing Math Formulas 9. Using Fonts 10. Developing Large Documents 11. Enhancing Your Documents Further 12. Troubleshooting 13. Using Online Resources Pop Quiz Answers Index

Time for action – introducing variable references


We will use the varioref commands, \vref and \vpageref , to achieve enhanced reference texts:

  1. Open our current example. Add the package varioref to your preamble:

    \usepackage{varioref}
  2. Edit the content of the second chapter:

    \emph{amsmath}, on position \ref{item:amsmath} of the top list
    in section~\vref{sec:packages}, is indispensable to high-quality
    mathematical typesetting in \LaTeX. \emph{amssymb}, on position
    \ref{item:amssymb}, provides a huge amount of math symbols.
    See also the footnote \vpageref{fn:project}.
  3. Typeset twice and look at the result:

What just happened?

The command \vref checked the distance to the referenced section. As it's on the facing page, that is, on the preceding page in a two-sided layout, it wrote "1.2 on the facing page". Similar for \vpageref, it refers to "the preceding page".

\vref{name} acts in the following way:

  • If the reference and \label{name} are on the same page, it behaves exactly like \ref. The page number...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at AU $24.99/month. Cancel anytime