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
label lost in overfull box in breakable tcolorbox #34
Comments
I can confirm the problem, but currently I do not see a solution by changing the break algorithm. I did a lot of experiments, but my changes for the algorithm produced new and more severe problems for other examples. Fortunately, this problem can be easily circumvented. As far as I have seen, it can only happen at the very begin of a tcolorbox. Therefore, the label is a label for the tcolorbox itself and should preferably be put inside the options for the tcolorbox (see Another way of circumvention is to add an \documentclass{article}
\usepackage{tcolorbox}
\tcbuselibrary{breakable}
\begin{document}
\begin{tcolorbox}[breakable]
\label{lab1}
\rule{2cm}{19cm}
\end{tcolorbox}
Problem: lab1 \pageref{lab1} foo
\clearpage
\begin{tcolorbox}[breakable,label=lab2]
\rule{2cm}{19cm}
\end{tcolorbox}
No problem: lab2 \pageref{lab2} foo
\clearpage
\begin{tcolorbox}[breakable]
\mbox{}\label{lab3}
\rule{2cm}{19cm}
\end{tcolorbox}
No problem: lab3 \pageref{lab3} foo
\end{document} So, currently, I hesitate to change the break algorithm, because changes typically produce a lot of new problems for existing documents and I was not able to find a bullet-proof solution. Also, I hope that the easy ways of circumvention moderate the weight of the problem. |
This solves the problem of course. |
For the next version, I added a new warning |
A warning |
In the same situation, an The new warning also helped here :-) |
Thanks a lot for the analysis and the workaround. I had lots of boxes giving me that problem! |
Or |
Thanks :) The mbox hack worked for me, so I'm not touching it again :D |
Hi,
the label lab1 should not be lost due to the overfull box
The text was updated successfully, but these errors were encountered: