I'm currently attempting to organize a paper out of a bunch of notes I've built up recently; a possibly useful suggestion I received is to write each theorem, definition, etc. on an index card, so that I can physically move them around to figure out how the paper should be organized.
Of course, definitions have to come before the theorems that use them, some theorems use other theorems in their proofs, and so on -- so to the extent that I'm remembering to do so, I'm indicating these sorts of dependencies on the index cards as well.
It occurs to me that what I am doing here is trying to extend a partial order (the ordering that comes from the dependency) to a total order. There are of course constraints on this order; certain results, although not logically related, are related in some philosophical sense and should perhaps be kept near each other. It's actually an interesting optimization problem.
Now if only I were writing a paper about extending partial orders to total orders...
(But my paper does talk quite a bit about permutations. And a total order will end up being a permutation of my index cards.)