Making clickable links to sections with hyperref
\hyperref
is your friend:
\usepackage{hyperref}
%... other code
\section{Hello World}
\label{sec:hello}
\hyperref[sec:hello]{Word of text}
\hyperref does the job:
\usepackage{hyperref} % import the package
%... other code
\section{Alice in Wonderland} % a normal section we want to link to
\label{sec:Alice} % this is the bookmark for the, links which refers to the last section
% links to the section with the variable name Alice, showing: "Some Displayed Text"
\hyperref[sec:Alice]{Some Displayed Text}
% links to the section with the variable name Alice showing the name of the Section, here: "Alice in Wonderland"
\nameref{sec:Alice}
% Links to the section with the variable name Alice showing the description of the section, here: "section 1"
\autoref[sec:Alice]{Some Displayed Text}
Example: https://v2.overleaf.com/read/cbxfjrpmjcqq
Hyperref builds section links automatically. You should be able to reference them as section.i
where i
is the section number. If you wanted to say "Section 3" and link to section 3, it would look as follows:
\hyperlink{section.3}{Section 3}
If you are prone to reorganizing your sections, this is not perfect, and I would advise using one of the above solutions, however, for relatively stable orderings, this is much simpler as it doesn't require adding a \label
tag whenever you want a new section.
Testing indicates this also works for other sectioning commands like \chapter
(where the reference becomes chapter.1
). For nested sectioning commands like \subsection
, the reference becomes subsection.1.1
.
If you want to reference chapter 3 section 2 you can use the following code:
\hyperlink{section.3.2}{Section 3.2}