Generate complex documents with pandoc