add a command to output a document