Generalhyperref | Hyperlink directly on a section title

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
Heresy
Posts: 12
Joined: Mon May 21, 2012 7:24 pm

hyperref | Hyperlink directly on a section title

Post by Heresy »

Dear All,

I would like to make a back reference from every chapter title in my document to the table of contents, that is to say that clicking on a title would lead to the display of the table of contents.

This could be applied generally for each kind of sections and could be useful to go back rapidly to the table of contents after going to the wrong chapter to be read.

I put the following in my document:

Code: Select all

\renewcommand{\contentsname}{Table of Contents}
\setcounter{tocdepth}{4}
\clearpage
\phantomsection
\addcontentsline{toc}{chapter}{Table of Contents}
\tableofcontents
\label{Table of Contents}
However, when it comes to create the link, I do not know by what \chapter{Introduction} must be replaced. I would imagine something like the following, but working:

Code: Select all

\hyperref[ref{Table of Contents}] {\chapter{Introduction}}
.

Thank you.

Regards.
Last edited by Stefan Kottwitz on Thu May 24, 2012 7:50 am, edited 1 time in total.
TeX Live 2012 and Texmaker 4.0.2

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

Stefan Kottwitz
Site Admin
Posts: 10345
Joined: Mon Mar 10, 2008 9:44 pm

hyperref | Hyperlink directly on a section title

Post by Stefan Kottwitz »

Hi,

I recommend to redefine the \chapter macro or an implicitly used macro such as \@makechapterhead. Further redefine \section. How you can do this, depends on the class which you are using, because the class defines the macro.

So please tell us the class name. Perhaps you would have got a working code already, if you would have posted a Infominimal working example which a reader could have modified.

Stefan
LaTeX.org admin
Heresy
Posts: 12
Joined: Mon May 21, 2012 7:24 pm

Re: hyperref | Hyperlink directly on a section title

Post by Heresy »

Hello,

Thanks Stefan for your reply. I appreciate it.

I use the class book. A MWE can be found enclosed. Your suggestion sounds right, but to be honest, I don't know how to handle it.

Thanks for any help.

Regards.
Attachments
MWE.tex
MWE
(2.04 KiB) Downloaded 269 times
TeX Live 2012 and Texmaker 4.0.2
Post Reply