Considering this MWE, I found that the hyperlink of cross-reference \Cref{algo1} always navigates to the algorithm bottom where caption is printed when not loading ruled option.
My question is how to force cross-reference hyperlink navigate to the top of algorithm?
\RequirePackage{luatex85}
\documentclass{article}
\usepackage{varioref}
\usepackage{hyperref}
\usepackage{cleveref}
\usepackage{lipsum}
\usepackage[ruled]{algorithm2e}
\Crefname{algocf}{Algorithm}{Algorithms}
\begin{document}
\Cref{algo1}
\lipsum[1-5]
\begin{algorithm}
Some\;
Algorithm\;
\caption{some caption}\label{algo1}
\end{algorithm}
\end{document}
1, while the algorithm environment prints a counter of value2. So, how can I reset the environment counter to be1? I tried your previous solution, but it didn't help. – Diaa Dec 06 '16 at 18:31hypcapspoiled the navigation of figures cross-references to their tops as previously done by loadingcaptionpackage. So, how can I fix this also for figure environment? – Diaa Dec 07 '16 at 01:59hypcapanymore. – Werner Dec 07 '16 at 05:17