Using hyperlinks
Initially, LaTeX was used primarily to produce high-quality prints on paper. Since the output was device-independent from the beginning, the results can also be viewed on screens, tablets, and smartphones.
With electronic publishing, we gain access to convenient functionalities, most notably hyperlinks, enabling effortless navigation within documents. This recipe focuses on using LaTeX to incorporate hyperlinks into a PDF.
How to do it...
We will use the hyperref package, which provides a user-friendly interface for accessing numerous PDF features, particularly hyperlinks. We can test it with examples from Chapter 1, Exploring Various Document Classes. Here are the steps to follow:
- Open the book example from the first chapter in your editor.
- At the end of the preamble, add this line for loading the hyperref package:
\usepackage{hyperref}
- Compile at least twice so LaTeX can process the data in the .aux file written by the hyperref package. ...