9

Suppose I have a text like this

Lorem ipsum dolor sit amet, consectetuer adipiscing elit,
sed diam nonummy nibh euismod tincidunt ut laoreet dolore
magna aliquam erat volutpat. Ut wisi enim ad minim veniam

I want to refer the word euismod to another section, so the reader can read about it in the right place.

What are the possibilities?

0

2 Answers 2

4

One option is to use cleveref with hyperref. The bare \ref can also be used.

\documentclass{article}
\usepackage[ocgcolorlinks,linkcolor=magenta]{hyperref}
\usepackage{cleveref}

\begin{document}

\section{Simulation Techniques}\label{sec:sim}
Some text for this section here.
\newpage
Lorem ipsum dolor sit amet, consectetuer adipiscing elit,
sed diam nonummy nibh euismod~(see section~\ref{sec:sim}) tincidunt ut laoreet dolore
magna aliquam erat volutpat. Ut wisi enim ad minim veniam

% OR

Lorem ipsum dolor sit amet, consectetuer adipiscing elit,
sed diam nonummy nibh euismod~(see~\cref{sec:sim}) tincidunt ut laoreet dolore
magna aliquam erat volutpat. Ut wisi enim ad minim veniam

\end{document}

enter image description here

11

Without any additional package you can use \label,\ref and \pageref commands for cross referencing. (See wikibooks article on cross-referencing.)

To link the word directly, to the section you want, you can use \hyperref command from hyperref package. You will need to replace euismod by \hyperref[sec:label]{euismod}, where sec:label refers to the label for appropriate section and is set by adding \label{sec:label} somewhere in the section you want to link to. (Refer hyperref manual or wikibooks more details on customization.)

The following example will link the word euismod to reference section. The blindtext package is to just add random text to the document.

linking words

\documentclass{article}
\usepackage{hyperref}
    \hypersetup{ colorlinks = true, linkcolor = blue }
\usepackage{blindtext}

\begin{document}
Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy 
nibh \hyperref[sec:reference]{euismod} tincidunt ut laoreet dolore magna 
aliquam erat volutpat. Ut wisi enim ad minim veniam

\blinddocument
\section*{Reference section} \label{sec:reference}
\blindtext
\end{document}
0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .