Similary to my answer to Why are all of my footnotes hyperlinked to the titlepage? this is a matter of package loading order. (One could argue this is a duplicate.) setspace
is your bad boy hereā¦ What you need to be aware of is that arsclassica
loads classicthesis
which loads hyperref
. This means you need to load setspace
before arsclassica
.
However, both arsclassica
and classicthesis
at least nowadays try loading hyperref
with the option hyperfootnotes=false
which made it tricky to reproduce the MWE. We also need to load hyperref
before arsclassica
to get them activated again.
classicthesis
also loads footmisc
which is not terribly compatible with hyperref
. As can be seen in my linked answer it must be loaded before hyperref
, too. this means we need this loading order:
\usepackage{setspace}
\usepackage{footmisc}
\usepackage{hyperref}
\usepackage{arsclassica}
Actually classicthesis
does not load footmisc
if it finds the command \deffootnote
. The latter is a KOMA-Script command and available in KOMA-Script classes. What the maintainer of classicthesis
didn't seem to be aware is that one can load the package scrextend
for \deffootnote
as well. So lets exchange footmisc
and scrextend
to be on the safer side:
\usepackage{setspace}
\usepackage{scrextend}
\usepackage{hyperref}
\usepackage{arsclassica}
When we apply this to the MWE we get correctly hyperlinked footnotes (as of today 2021/01/04). I didn't use an external file book_structure.tex
but simply included the code in the preamble and re-ordered:
\documentclass[11pt, a4paper, oneside, headinclude,footinclude]{book}
\usepackage[T1, T2A]{fontenc}
\usepackage[english, russian]{babel}
\usepackage[margin = 1.5cm]{geometry}
\usepackage{setspace} % making 1.5 line spacing
\onehalfspacing
\usepackage{scrextend}
\usepackage[hyperfootnotes]{hyperref}
\usepackage{arsclassica}
\usepackage{amsfonts}
\renewcommand*\rmdefault{iwona}
\newcommand*{\titleTH}{%
\begingroup
\raggedleft
\vspace*{\baselineskip}
{\LARGE\bfseries Some book title}\\[\baselineskip]
{\Large Version x.x.x}\par
\endgroup
}
\begin{document}
\titleTH
\thispagestyle{empty}
\newpage
\chapter{System requirements}
\textbf{Supported operating systems:} Unix OS family (e.g. Mac OS X, Linux,
FreeBSD) and Microsoft Windows OS family (e.g. 2000, 2003, XP, Vista, Seven,
8/8.1, 10).
\textbf{CPU architectures:} x86 (x86-32, x86-64), ARMv7.
\textbf{CPU model:}\footnote{see our white paper on selection of hardware for
LPR} selected individually (in accordance to number of recognition threads
to be used on the server, video framerate and resolution). When adding one or
more recognition threads, CPU load increases linearly.
\end{document}
REVISED APPROACH (\stackinset
)
Here, I just \stackinset
any number of \hyperref
ed \makebox
es to encompass the desired portion of the base image. The \stackinset
can be specified relative to the l
,c
,r
horizontal anchors and the t
,c
,b
vertical anchors.
\documentclass{article}
\usepackage{graphicx}
\usepackage{hyperref,stackengine}
\begin{document}
\begin{figure}
\centering
\stackinset{l}{10pt}{t}{20pt}{\hyperref[topleft]{\makebox(100,100){}}}{%
\stackinset{r}{30pt}{t}{40pt}{\hyperref[topright]{\makebox(50,40){}}}{%
\stackinset{l}{40pt}{b}{50pt}{\hyperref[bottomleft]{\makebox(70,20){}}}{%
\stackinset{r}{110pt}{b}{70pt}{\hyperref[bottomright]{\makebox(40,80){}}}{%
\includegraphics[width=\linewidth]{example-image}}}}}
\end{figure}
\clearpage
\pagebreak
\section{Section 1}
\label{topleft}
Some Text
\pagebreak
\section{Section 2}
\label{topright}
Some Text
\pagebreak
\section{Section 3}
\label{bottomleft}
Some Text
\pagebreak
\section{Section 4}
\label{bottomright}
Some Text
\end{document}
ORIGINAL APPROACH (\clipbox
)
Here I use \clipbox
to partition the figure into 4 [unequal-sized] quadrants, though there is, in theory, no reason you can't slice it into any number of rectangles.
I don't know how, but I am sure hyperref
provides the means to make the \hyperref
bounding box invisible.
\documentclass{article}
\usepackage{graphicx}
\usepackage{hyperref,trimclip,stackengine}
\begin{document}
\begin{figure}
\centering
\setbox0=\hbox{\includegraphics[width=\linewidth]{example-image}}
\stackunder[0pt]{%
\hyperref[topleft]{\clipbox{0pt .4\ht0{} .3\wd0{} 0pt}{\copy0}}%
\hyperref[topright]{\clipbox{.7\wd0{} .4\ht0{} 0pt 0pt}{\copy0}}}{%
\hyperref[bottomleft]{\clipbox{0pt 0pt .3\wd0{} .6\ht0}{\copy0}}%
\hyperref[bottomright]{\clipbox{.7\wd0{} 0pt 0pt .6\ht0}{\copy0}}}
\end{figure}
\clearpage
\pagebreak
\section{Section 1}
\label{topleft}
Some Text
\pagebreak
\section{Section 2}
\label{topright}
Some Text
\pagebreak
\section{Section 3}
\label{bottomleft}
Some Text
\pagebreak
\section{Section 4}
\label{bottomright}
Some Text
\end{document}
A click in separate corners of the image will take you to different pages in the document.
Best Answer
The inserted
link
is a hyper-link, not a LaTeX\label
. Therefore the\hyperlink
macro works but not the\pageref
. I don't think you can get the page information from a hyper-link, so I think you need to add\label
s manually. This can be done best using thepagecommand
key and a custom counter: