Skip to main content
replaced http://tex.stackexchange.com/ with https://tex.stackexchange.com/
Source Link

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 array
  • various packages that load xcolor and/or graphicx

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.)

  • http://tex.stackexchange.com/a/39047/2693https://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 collcell package, 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 array package, so the problem doesn't really arise any more.
  • http://tex.stackexchange.com/a/23690/2693https://tex.stackexchange.com/a/23690/2693 Here the comment makes it clear that the OP didn't necessarily understand the syntax of newcolumntype; the beamer documentation won't help other than (presumably) a pointer to array.

Here's an answer of mine that does what I'm suggesting:

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 array
  • various packages that load xcolor and/or graphicx

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.)

  • http://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 collcell package, 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 array package, so the problem doesn't really arise any more.
  • http://tex.stackexchange.com/a/23690/2693 Here the comment makes it clear that the OP didn't necessarily understand the syntax of newcolumntype; the beamer documentation won't help other than (presumably) a pointer to array.

Here's an answer of mine that does what I'm suggesting:

  • http://tex.stackexchange.com/a/37240/2693 The solution here uses \resizebox which is a graphicx command. Although beamer loads graphicx it makes little sense to just use beamer in the solution, so I loaded graphicx explicitly with a comment in the code to that effect.

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 array
  • various packages that load xcolor and/or graphicx

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 collcell package, 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 array package, 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 newcolumntype; the beamer documentation won't help other than (presumably) a pointer to array.

Here's an answer of mine that does what I'm suggesting:

  • https://tex.stackexchange.com/a/37240/2693 The solution here uses \resizebox which is a graphicx command. Although beamer loads graphicx it makes little sense to just use beamer in the solution, so I loaded graphicx explicitly with a comment in the code to that effect.
Tweeted twitter.com/#!/StackTeX/status/154297084617555968
added some examples
Source Link
Alan Munn
  • 222.3k
  • 2
  • 73
  • 135

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 array
  • various packages that load xcolor and/or graphicx

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.)

  • http://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 collcell package, 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 array package, so the problem doesn't really arise any more.
  • http://tex.stackexchange.com/a/23690/2693 Here the comment makes it clear that the OP didn't necessarily understand the syntax of newcolumntype; the beamer documentation won't help other than (presumably) a pointer to array.

Here's an answer of mine that does what I'm suggesting:

  • http://tex.stackexchange.com/a/37240/2693 The solution here uses \resizebox which is a graphicx command. Although beamer loads graphicx it makes little sense to just use beamer in the solution, so I loaded graphicx explicitly with a comment in the code to that effect.

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 array
  • various packages that load xcolor and/or graphicx

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.

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 array
  • various packages that load xcolor and/or graphicx

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.)

  • http://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 collcell package, 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 array package, so the problem doesn't really arise any more.
  • http://tex.stackexchange.com/a/23690/2693 Here the comment makes it clear that the OP didn't necessarily understand the syntax of newcolumntype; the beamer documentation won't help other than (presumably) a pointer to array.

Here's an answer of mine that does what I'm suggesting:

  • http://tex.stackexchange.com/a/37240/2693 The solution here uses \resizebox which is a graphicx command. Although beamer loads graphicx it makes little sense to just use beamer in the solution, so I loaded graphicx explicitly with a comment in the code to that effect.
Source Link
Alan Munn
  • 222.3k
  • 2
  • 73
  • 135

Package dependencies in answers

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 array
  • various packages that load xcolor and/or graphicx

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.