this is my first time asking questions on this forum, long time reader however, so please bear with me.
I currently have a document, in book class, for which I have been making use of the hypref package in order to link the table of contents (toc) entries to the corresponding section, I have got it set-up such that I can click the title of the various sections and they take me back to the toc page.
I also have entries for a list of figures (lof), list of tables (lot) and bibliography (bib), and in the toc the links to the corresponding pages work fine to take me to the relevant page, however, I would like to be able to make the titles of the lof,lot and bib be a link to take back to the toc.
I can't find a way to access the title of any of them, I have also tried creating a chapter and placing the \listoffigures in there, and then inserting the chapter and linking the chapter title to the toc, which kind of works, but there are two entries for lof in the toc, and the lof automatically jumps to a new page, so I end up with a chapter with a linked title to the toc, followed by a new page and then the contents as generated by the lof.
I have been trying to find a similar issue online for some time, and have yet turned up nothing useful, and so I made this account to hopefully solve this. If anyone knows of a similar question already having been asked, or knows a way to make this work, I would appreciate any help in this matter.
TLDR: Trying to link lof,lot and bib titles back to the toc
Here is a MWE
\documentclass[11pt,twoside,openany]{book}
\usepackage[nottoc,numbib]{tocbibind}
\usepackage{hyperref}
\begin{document}
\addtocontents{toc}{\protect\hypertarget{TOC}{}}
{\hypersetup{linkcolor=black} \tableofcontents}
\listoffigures
\chapter[Introduction]{\hyperlink{TOC}{Introduction}}
text here
\end{document}
I found this discussion where they go about a different means of toc linking and back, which I might end up using, however, the lof still doesnt link back to toc, here's a modified MWE
\documentclass{book}
\usepackage[utf8]{inputenc}
\usepackage{etoolbox}
\usepackage{blindtext}
\usepackage{hyperref}
\usepackage[nottoc,numbib]{tocbibind}
\makeatletter
\patchcmd{\addcontentsline}{{#2}{#3}{\thepage }}%
{{#2}{#3}{\protect\Hy@raisedlink{\protect\hypertarget{back@currentHref}{}}{\thepage}} }%
{\typeout{** patch \string\addcontentsline\space success}}%
{\typeout{** patch \string\addcontentsline\space failure}}%
\AtBeginDocument{\renewcommand{\Sectionformat}[2]%
{\ifnum #2>\c@secnumdepth {#1}\else\hyperlink{back@currentHref}{#1}\fi}}
\patchcmd{@makechapterhead}{\bfseries #1\par}{\bfseries\hyperlink{back@currentHref}{#1}\par}%
{\typeout{** patch \string@makechapterhead\space success}}%
{\typeout{** patch \string@makechapterhead\space failure}}
\makeatother
%\hypersetup{colorlinks=true,linkcolor=black}
\begin{document}
\tableofcontents
\listoffigures
\Blinddocument
\end{document}