Added support for outputting to RST format