advanced doc formatting