tcolorbox vs. geometry vs. hyperref bug
Ulrike Fischer
news3 at nililand.de
Tue May 4 00:04:05 CEST 2021
Am Mon, 3 May 2021 14:23:35 -0600 (MDT) schrieb Doug McKenna:
> Any help or workaround that makes this work as expected would be
> appreciated. The one caveat is that I'm using TeXLive 2019, so
> perhaps there's been a bug fix since then.
looks ok on texlive 2021.
Try this after loading hyperref
\makeatletter
\def\Hy at SaveLastskip{%
\let\Hy at RestoreLastskip\relax
\ifvmode
\ifdim\lastskip=\z@
\ifnum\lastnodetype=1 %
\let\Hy at RestoreLastskip\relax
\else
\let\Hy at RestoreLastskip\nobreak
\fi
\else
\begingroup
\skip@=-\lastskip
\edef\x{%
\endgroup
\def\noexpand\Hy at RestoreLastskip{%
\noexpand\ifvmode
\noexpand\nobreak
\vskip\the\skip@
\vskip\the\lastskip\relax
\noexpand\fi
}%
}%
\x
\fi
\else
\ifhmode
\ifdim\lastskip=\z@
\let\Hy at RestoreLastskip\nobreak
\else
\begingroup
\skip@=-\lastskip
\edef\x{%
\endgroup
\def\noexpand\Hy at RestoreLastskip{%
\noexpand\ifhmode
\noexpand\nobreak
\hskip\the\skip@
\hskip\the\lastskip\relax
\noexpand\fi
}%
}%
\x
\fi
\fi
\fi
}%
\makeatother
--
Ulrike Fischer
https://www.troubleshooting-tex.de/
More information about the texhax
mailing list.