If I found myself going through all this work to set up applescripts and whatnot, I would just use LaTeX. It's the correct tool for people that want complete control over their document formatting. I actually like iWork 5 MORE now, precisely because it does what it sets out to do even better than before - it's a basic text editor that creates fantastic looking layouts. You know, for when I don't want or need to fire up LaTeX.