# Make an hyperref link to current chapter/section

I would like a way to make an hyperref link to the beginning of the current section or chapter, that has the same effect of using \label{section} and \ref{section} with hyperref on, but without having to use \label.

Here is an MWE:

\documentclass[10pt,a5paper]{report}
\usepackage{fontspec}
\usepackage{lipsum}

\begin{document}
\chapter{Chapter 1}
\lipsum[1-2]

\section{Section 1}
\lipsum[3-5]

\section{Section 2}
\lipsum[6]
\lipsum[6]
\end{document}

• What is the current section and what is wrong with \label? – user31729 Sep 29 '15 at 12:47
• The "current" section is the section where the link is. Since I would use this function quite a lot, it would be nicer not to have to label them each time. – HcN Sep 29 '15 at 12:51
• Anyway, this means auto-labelling somewhat. How do you want to refer to the current section. The current section 'moves' through the document when being viewed. – user31729 Sep 29 '15 at 12:53
• See the edited question if it is clearer. – HcN Sep 29 '15 at 12:58
• The table of contents already has links to all the chapters etc. The names can be found in the aux file. – John Kormylo Sep 29 '15 at 13:46

Something like this?

\documentclass[10pt,a5paper]{report}
\usepackage{xcolor}
\usepackage{fontspec}
\usepackage{lipsum}

\begin{document}
\chapter{Chapter 1}\hypertarget{chapter::\theHchapter}{}%
\lipsum[1-2]

\section{Section 1}
\lipsum[3-5]

\section{Section 2}\hypertarget{section::\theHsection}{}%
\lipsum[6]
\lipsum[6]

\chapter{Chapter 1}\hypertarget{chapter::\theHchapter}{}%
\lipsum[1-2]

\section{Section 1}
\lipsum[3-5]

\section{Section 2}\hypertarget{section::\theHsection}{}%
\lipsum[6]

• Perfect. \hyperlink{section.\arabic{chapter}.\arabic{section}}{Link to current section.} does exactly what I want. Many thanks to you two. – HcN Sep 29 '15 at 14:09