This isn't a real question, so I'm marking it community wiki.
When I was new to LaTeX, I thought that the \usepackage
command worked much like the #include
command of the C language: just put whatever you need in the preamble, in whatever order you like.
But then bugs began to bite me and I realised, with growing horror, that commutative packages seem to be the exception rather than the rule.
They appear so often that I think it would be useful to have a list here of problematic interactions between pairs of packages, and their correct order.
Also, a question for amusement:
I want to know if there exists three packages A
, B
and C
, such that A
has to be included before B
and B
needs to be included before C
, but C
needs to be included before A
.
Best Answer
Freek Dijkstra has put together a nice wiki of Latex package conflicts. Hyperref is the one he singles out for criticism: it has the nasty property that sometimes it conflicts when it is put earlier, sometimes when it is put later than other widely used packages, encouraging cargo-cult document headers.
He's had less trouble with inputenc conflicts that others, judging from complaints that I've seen, mostly, I guess, because he uses Xetex.