It's not uncommon that answers to questions use a package which itself loads another package. In that case, details of the answer might end up being opaque if the answer uses commands documented in the dependency, but not in the actually loaded package.
Some common cases where this is the case:
- various table packages that all load
- various packages that load
I suggest that we try to explicitly mention and load the dependencies in answer code if the answer uses commands from both the main package and the dependency.
Here's some answers of the sort I have in mind: (I didn't really want to pick on people so I didn't add specific answers in my original version of the question.)
- https://tex.stackexchange.com/a/39047/2693 This answer was what prompted my question in the first place. (The issue is much less obvious in the answers present state). Peter's initial answer just used the
collcellpackage, but part of the answer used
\newcolumntype. In fact, Martin (author of
collcell) is explicit in his documentation about the use of
array, so in this particular case, there isn't too much of a problem. In it's current state, since there has been some discussion independently about the
arraypackage, so the problem doesn't really arise any more.
- https://tex.stackexchange.com/a/23690/2693 Here the comment makes it clear that the OP didn't necessarily understand the syntax of
beamerdocumentation won't help other than (presumably) a pointer to
Here's an answer of mine that does what I'm suggesting:
The solution here uses
\resizeboxwhich is a
graphicxit makes little sense to just use
beamerin the solution, so I loaded
graphicxexplicitly with a comment in the code to that effect.
graphicx(which it actually doesn't, it comes from
graphics; not that it really matters). You have a comment "loaded by beamer, but included here for explicitness" there, which for some new users might be more confusing than helpful. IMHO, it would be better mentioning it in the normal text before: "You could wrap the table in
graphicxpackage. This package is already loaded by
beamer." (Also you still miss a
%in this answer; see my comment there)