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

thmtools and hyperref #70

Open
GMS103 opened this issue Nov 2, 2024 · 6 comments
Open

thmtools and hyperref #70

GMS103 opened this issue Nov 2, 2024 · 6 comments
Labels
bug Something isn't working compatibility

Comments

@GMS103
Copy link

GMS103 commented Nov 2, 2024

After the last updates, I am getting the errors indicated in
latex3/hyperref#359
I mention it here as I am not sure if it is a hyperref or a thmtools issue.

@u-fischer
Copy link

see latex3/hyperref#359 (comment)

@GMS103
Copy link
Author

GMS103 commented Nov 2, 2024

@muzimuzhi
Do you think you could address this 2 things?
TIA
Comment by Ulrike:

As said these are not errors. The info about the bookmark level is not new, I get that also in older texlive. thmtools misses here to define the toc level. This can be done with

\makeatletter
\def\toclevel@The{1} %or some other level
\makeatother

The warning about the destination is new. hyperref no longer (re)defines the \theH<counter> as the kernel handles that. But as thmtools uses a non-standard way to declare "numberwithin" counters it will have to reset \theH<counter> itself. E.g.

\declaretheoremstyle[numberwithin=section]{mytheostyle}
\declaretheorem[name=Theorem,numbered=yes,style=mytheostyle]{The}
\renewcommand\theHThe{\thesection .\arabic {The}}

@muzimuzhi
Copy link
Owner

Err maybe it's too late to stop recording list of theorems entries (in .loe) by default. 😒

@muzimuzhi muzimuzhi added bug Something isn't working compatibility labels Nov 3, 2024
@muzimuzhi
Copy link
Owner

@u-fischer May I ask what't the recommended time to define \toclevel@<list type>, right when defining a theorem, or delayed to begindocument hook? And do you suggest to not define \toclevel@<list type> if hyperref is not loaded?

@u-fischer
Copy link

@muzimuzhi you can define \toclevel@XXX whenever you want and you should do it also if hyperref is not defined (the tagging code makes use of the values, to decide about the level of a toc entry). I would define it at the same time you define the \l@XXX command, then users can reset the level in the preamble if they want.

@rzach
Copy link

rzach commented Nov 17, 2024

Just in case someone else finds this because their hyperlinks to theorems are broken now (e.g., links to Thm 2.1 will point to Thm 1.1 as the hyperlink name is just Thm.1 for both): I could work around it by putting

\hypersetup{hypertexnames=false}

in the preamble.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working compatibility
Projects
None yet
Development

No branches or pull requests

4 participants