As you suggested, Rob, I took a careful look at the pdf of the Discrete Mathematics
book distributed by Oscar Levin and took notes on anomalies.
Not surprisingly, many of the potential problems I referred to in earlier
posts do indeed show up. Among the dozens I observed, most were pretty
minor, that is, things that looked rather inelegant by most typesetting
conventions but were still legible. There were a few cases that I would
consider more serious and that really impeded the reader.
Roughly speaking, the number of problematic pages is proportional
to the density of tcolorbox, or, perhaps more properly, the minipages.
So here are a few of suggestions that might ameliorate this problem:
1. For floats within a tcolorbox: add an attribute, say topfloat,
that would take a single float (presumably the first) and float it
to the top of the page. A similar attribute could be used for moving
a float to the bottom of the page.
2. A new attribute to be used with tcolorbox to add a small amount
of \vglue before and after the tcolorbox itself. Since \parskip is
set to 0, some vertical glue would be really helpful for reading.
3. The use of \tcbbreak and the parameter
break at <length> can control
the allowable break points within a given tcolorbox. It would be nice
to have an attribute whose effect is to have a single break point after
n lines. The second (easier to implement) choice would be to have a
breakpoint at a given distance from the top of the displayed box.
These suggestions are somewhat counter to the philosophy of PreTeXt:
it allows some user control of the presentation. However, problematic
examples are not low probability special cases; rather, they will surely
occur, especially with the repeated use of large tcolorboxes.
I should mention that my mind has changed on one thing: most (but not all)
of the problems arising in this context can be remedied by adroit editing
of the intermediate LaTeX file. I'm not sure we want to encourage this
as a solution, but it means some repair is possible.