Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Is there a way of creating a dependency tree for packages \RequirePackageing each other for those packages used in my document, ideally with the respective required options and version numbers? Are there any tools or packages for this purpose? This is very important for debugging package options conflicts (see "Package options and \RequirePackage: order of commands and option conflicts?"; see also "What are best practices for package authors to deal with package conflicts?").

For example, I don't need to load graphicx explicitly because dtklogos (which I'm using) already requires/loads it. In fact graphicx also requires/loads graphics and also keyval, which is incidentally also required/loaded by microtype. Etc. I would like to give an example involving package option conflicts, but as the relevant dependencies are cumbersome to figure out and debug, no example is on my mind right now (I've bumped into several, but since they didn't compile, I abandoned them and have forgotten about them); this is one thing this question can actually help to address.

share|improve this question
    
You need to know which package loads what before hand -> There must be a list of what loads what -> There must be a central log of this -> that log should be updated -> CTAN should have that too -> ... :) option clash for xcolor –  percusse Feb 24 '13 at 14:46
    
@percuße There must be a way for LaTeX to automatically detect calls to \RequirePackage for it to log/write/track them somewhere else. If not, something should probably be patched; I genuinely hope that I won't need to wait for LaTeX3 :-) –  Lover of Structure Feb 24 '13 at 15:11
    
I think that's unfortunately pretty much wishful thinking but indeed would be nice to have. However, there are not many such cases where you would have this problem. So manual approach would almost always be easier. –  percusse Feb 24 '13 at 15:18
1  
\RequirePackage is everywhere yes but option clashes are rare. If some author decided to use dvipsnames and another svgnames for xcolor package, what should you do? What should be tracked? If a package requires another which requires yet enother how much deep should you go? The issue is not that straightforward to keep track of the packages AND their respective options. –  percusse Feb 24 '13 at 15:22
2  
If your package needs graphicx, then load it, regardless, if it is already loaded or another package loads it. Thus package dtklogo might load graphicx in it current version, but this is very likely an implementation detail for the package. In a later version dtklogos might implement it differently without graphicx and your package is then broken. –  Heiko Oberdiek Feb 24 '13 at 16:04
show 6 more comments

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.