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

Unwanted spaces appearing since the beginning of Nov. 2024 #363

Open
Uwe-Schmock opened this issue Nov 10, 2024 · 2 comments
Open

Unwanted spaces appearing since the beginning of Nov. 2024 #363

Uwe-Schmock opened this issue Nov 10, 2024 · 2 comments

Comments

@Uwe-Schmock
Copy link

When I typeset the example file below, I get unwanted spaces at the locations where I place the \label and before the footnote sign. This happens since I updated the macro packages with TeX Live Utility on my Mac at the beginning of November 2024.
As a work around, I enter \kern-0.31em at these places, but that can cause problems at line breaks.
Any better solution is appreciated.

\documentclass{book}
\usepackage{amsthm}
\usepackage{hyperref}
\usepackage{cleveref}
\usepackage{footnotebackref}

\theoremstyle{definition}
\newtheorem{exercise}{Exercise}

\begin{document}
\begin{exercise}[\label{LabelOfExercise}A long
title of this exercise so that the label can't be placed
after it for a good link back to the beginning of
it.\footnote{Make sure you typeset at least twice.}]
Details of this exercise $\ldots$
\end{exercise}
A link back to \cref{LabelOfExercise}.

\end{document}

@u-fischer
Copy link
Member

Yes, sorry there is a spurious space in firstaid for cleveref, see also https://tex.stackexchange.com/a/730127/2388.

\documentclass{book}
\usepackage{amsthm}
\usepackage{hyperref}
\usepackage{cleveref}
\usepackage{footnotebackref}
\RemoveFromHook{label}[firstaid/cleveref]
\makeatletter
\AddToHook{label}[firstaid/cleveref]
         {\ifx
           \@currentcounter\@empty
          \else
           \firstaid@cref@updatelabeldata{\@currentcounter}%<--- was missing
          \fi} 
\makeatother
\theoremstyle{definition}
\newtheorem{exercise}{Exercise}

\begin{document}
\begin{exercise}[\label{LabelOfExercise}A long
title of this exercise so that the label can't be placed
after it for a good link back to the beginning of
it.\footnote{Make sure you typeset at least twice.}]
Details of this exercise $\ldots$
\end{exercise}
A link back to \cref{LabelOfExercise}.

\end{document}

@Uwe-Schmock
Copy link
Author

Thanks a lot, works great!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants