Intelligent document authoring & publishing