jbezos / enumitem

Customize enumerate, itemize and description
MIT License
45 stars 5 forks source link

\enit@getsizefor too early #7

Closed daleif closed 5 years ago

daleif commented 5 years ago

Shouldn't these record the values at the start of the document instead of at package loading?

Otherwise a user who redefines say \normalsize in their preamble, will have to remember to do this before loading enumitem.

Enumitem is not really a package one would think about when dealing with font sizes.

jbezos commented 5 years ago

I'm not sure, for three reasons. The feature has to be explicitly requested with 'sizes', so the user is clearly aware enumitem is dealing with sizes somehow. In most cases (I'd say 98%) the sizes are set by the class and never changed. And finally, there will be a \SetEnumitemSizes, and I think delaying the action of a macro would be confusing.

daleif commented 5 years ago

I think you asume too much about the users, most just assume it works. Consider a university that provides a package for their users to use (not a class), assume that package changes all the font sizes, then the user need to know that the package does this and make sure to load enunitem after that package.

Or say, you are the author of that package, I don't think user writing a package that auto loads enumitem would even consider it having load order issues with adjusting the font size.

I certainly didn't when a user wrote me yesterday.

FrankMittelbach commented 5 years ago

To argue along the same lines and loading order requirement is a problem especially as there are a good number of packages ( and growing) that load others and thus hide the fact that they change fontsizes or hide the fact that they load enumitem etc.

jbezos commented 5 years ago

With so many packages delaying some code with \AtBeginDocument, we often get lost. This is why I try to avoid it as much as possible -- a simple rule: everything is done with \usepackage{enumitem}. For the same token, even the definitions for enumerate and the like should be delayed, just in case a local style modifies them (and these conflicts do happen). This doen't mean I won't change the behaviour, but the current one was the intended one (yes, I considered to delay it with \AtBeginDocument, but I discarded the idea), and I'd like to think a little more about it. Some problematic use cases (with real code) would be useful.

jbezos commented 5 years ago

After trying many combinations of \setlist, \usepackage and redefinitions of sizes, I've come to the conclusion the current behavior is not worse than delaying it to \begin{document} (sometimes better, sometimes worse). Perhaps the only logical place to define the size labels is with \setlist (storing somehow the values in force) or at each list, but this would be, imo, an overkill.