I would like to use the hyperref
package to highlight the citations and urls in blue in the text (\usepackage[colorlinks,citecolor=blue,urlcolor=blue]{hyperref}
), as well as later using hyperref
to link Figure citations to the corresponding figure page.
However, I use a custom figure environment to handle captions spanning multiple pages in case of large figures/large captions.
When I set the hyperref package
, the captions that spanned multiple pages raise a warning
Package caption warning: The option 'hypcap=true' will be ignored for this particular \caption.
How can I concile large caption spanning multiple pages with package hyperref
?
Here is my code:
\documentclass[12pts,openright,twoside]{report}
\usepackage[a4paper,width=150mm,top=25mm,bottom=25mm, bindingoffset=6mm]{geometry}
\usepackage[font={small,sf}, singlelinecheck=false]{caption}
\usepackage{graphicx}
\graphicspath{{./fig/}}
\usepackage{chngcntr}
\counterwithout{figure}{chapter}
\counterwithout{table}{chapter}
\usepackage{natbib}
\bibliographystyle{apa}
\usepackage[nottoc,notlot,notlof]{tocbibind}
\usepackage[colorlinks,citecolor=blue,urlcolor=blue]{hyperref}
\begin{document}
\begin{center}
\includegraphics[width=\textwidth]{fig/chap2-workflow.pdf}
\bigskip
\setbox0\vbox{\makeatletter
\let\caption@rule\relax
\captionof{figure}[My Figure Title.]{Very very large caption}
\global\skip1\lastskip\unskip
\global\setbox1\lastbox
}
\unvbox0
\setbox0\hbox{\unhbox1\unskip\unskip\unpenalty
\global\setbox1\lastbox}
\unvbox1
\vskip\skip1
\label{workflow1}
\end{center}
\end{document}