Tag Info

Hot answers tagged

4

You have several bad % in your code. Always leave a space after a constant (or add \relax. In particular the bad one is at \ifnum\value{mycnt}>0% \item[item \the\mycount] text \fi% When TeX wants to perform this check, it expands \item to see if some more digits come along. In the case hyperref is loaded, the first level expansion of \item is ...


2

Just set counter secnumdepth accordingly. If the paragraph titles do not appear in the table of contents (counter tocdepth), then the depth can set to a different value for the bookmarks. Full example: \documentclass{article} \usepackage{hyperref} \usepackage{bookmark} \bookmarksetup{ open, numbered, depth=5, % otherwise the setting of counter ...


1

So in making a MWE, I found the solution. Apparently there is a conflict with subfig, hypcap, and cleveref. I don't need hypcap so I was able to just comment it out and everything works.


1

I don't think \autoref is the easiest way to deal with this. This simplest approach is to use \hyperref combined with a \phantomsection and \label: \documentclass{article} \usepackage{caption} \usepackage{hyperref} \usepackage{bookmark} \begin{document} \begin{figure}[tbp] \centering \vrule height 1cm width 1cm \caption{Hello World} \end{figure} ...


1

If the OP refers to links instead to a reference, this could be a solution. \documentclass{article} \usepackage{etoolbox}% \usepackage{caption} \usepackage{hyperref} \usepackage{bookmark} \patchcmd{\listoffigures}{\listfigurename}{\phantomsection\hypertarget{link::lof}{\listfigurename}}{}{} \newcommand{\loflink}{\hyperlink{link::lof}{\listfigurename}} ...



Only top voted, non community-wiki answers of a minimum length are eligible