tcolorbox vs. geometry vs. hyperref bug

Doug McKenna doug at mathemaesthetics.com
Mon May 3 22:23:35 CEST 2021


Enclosed is a MWE (boiled down after four hours of work from a 300-page document with hundreds of color boxes in it) that shows a problem I've not been able to figure out.

Placing some text in a \hypertarget on a page seems to fool the tcolorbox package into breaking the page way prematurely, after just one line!

The only remotely pertinent message in the log is

>| Package tcolorbox Warning: The upper box part has become overfull on input line 113.

I can't tell what this has to do with anything, though.

Peculiarly, if one merely changes the top page margin from its current .85in to .75in, the page break after the first line on page 2 disappears and the entire page fills with text inside a color box in an expected way.

Same change occurs if you comment out the two {adjustwidth} environment-related lines from the geometry package, which nominally do nothing:

  \begin{adjustwidth}{0.0pt}{0.0pt}
   ...
  \end{adjustwidth}

The bottom of page 3 shows that something's also wrong with the page height calculation on that page.

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.

Thanks.

Doug McKenna
Mathemaesthetics, Inc.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ColorBoxBugMWE.pdf
Type: application/pdf
Size: 19580 bytes
Desc: not available
URL: <https://tug.org/pipermail/texhax/attachments/20210503/cf389ca6/attachment-0001.pdf>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ColorBoxBugMWE.tex
Type: text/x-tex
Size: 2750 bytes
Desc: not available
URL: <https://tug.org/pipermail/texhax/attachments/20210503/cf389ca6/attachment-0001.bin>


More information about the texhax mailing list.