Is it possible to label a nofloat figure/graphic within an adjustbox environment such that the link (using hyperref) goes to the top of the figure instead to the caption below?
The figure must be placed within the itemize with correct centering (current linewidth, not whole textwidth of the document) for both the figure and the caption and additionally a nofloat such that the link goes to the top of the figure.
I get the warning: The option `hypcap=true' will be ignored for this(caption) particular \caption
\documentclass{article}
\usepackage{caption}
\usepackage{tikz}
\usepackage{blindtext}
\usepackage{hyperref}
\usepackage{adjustbox}
\begin{document}
\begin{itemize}
\item \Blindtext[1][2]\Blindtext[1]
\begin{adjustbox}{
center=\linewidth,
caption=Some caption,
label=a,
nofloat=figure,
}
\begin{tikzpicture}
\clip(-5.686675053232457,-3.16893917565149) rectangle (5.579414724686105,0.6921754200738994);
\draw [line width=1.2pt,domain=-5.686675053232457:9.579414724686105]plot(\x,{(--4.514220105043796-1.8219356725415592*\x)/1.894960446786564});
\draw [line width=1.2pt,dash pattern=on 4pt off 4pt,domain=-5.686675053232457:9.579414724686105] plot(\x,{(--1.6188066144426525-1.0979714604086213*\x)/-0.3751399196759637});
\draw [line width=1.2pt,dash pattern=on 4pt off 4pt,domain=-5.686675053232457:9.579414724686105] plot(\x,{(--11.463481791986391--1.2426776436313691*\x)/-5.670646727250561});
\draw [line width=1.2pt,domain=-5.686675053232457:9.579414724686105] plot(\x,{(--0.4039090361160175--0.6586822831185679*\x)/-0.27723191082856635});
\draw [line width=1.2pt,domain=-5.686675053232457:9.579414724686105] plot(\x,{(-2.9955647165449215--0.8716146065783191*\x)/4.89799733746727});
\end{tikzpicture}
\end{adjustbox}
\item \Blindtext[1]
\end{itemize}
see \ref{a}
\end{document}
adjustboxdoes not support this feature of other packages yet. I will add this support in the next version of the package. Thank you very much for pointing this out. – Martin Scharrer Dec 30 '18 at 09:38