Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Package hyperref Info: bookmark level for <list type> unknown defaults to 0 #296

Open
muzimuzhi opened this issue Nov 3, 2024 · 1 comment
Assignees

Comments

@muzimuzhi
Copy link
Contributor

tcolorbox shares a similar with thmtools (muzimuzhi/thmtools#70): when hyperref is loaded, using /tcb/new/list inside to add boxes to some list may cause a hyperref info

Package hyperref Info: bookmark level for <list type> unknown defaults to 0 on input line ...

when the corresponding \toclevel@<list type> is undefined. Here <list type> is the value of /tcb/new/list type which defaults to tcolorbox.

\documentclass{article}
\usepackage{tcolorbox}
\usepackage{hyperref}

\newtcolorbox[list inside=lotcb, auto counter]{mytcb}[1][]{title={Box \thetcbcounter: #1}}

\makeatletter
%\def\toclevel@tcolorbox{0}
\makeatother

\begin{document}
\tcblistof{lotcb}{List of mytcb}

\begin{mytcb}[Title]
  content
\end{mytcb}

\begin{mytcb}[Title]
  content
\end{mytcb}

\end{document}

From the hyperref manual, sec. 4.1 Counters

\toclevel@<counter>

This is a variable which should contain a number. It is used for the level in the bookmarks. It should be defined for all counters which are used in toc like lists and \addcontentsline. Typical values are [...]

(Actually it need not be a <counter>, but <list type>.)

@T-F-S
Copy link
Owner

T-F-S commented Nov 4, 2024

Thank you for reporting this! I will add the needed code line to the next version.

@T-F-S T-F-S self-assigned this Nov 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants