In order to be able to convert in multiple formats, you need a base format that's universal and well documented: that's text format. But you need to be able to add formatting & more, so the format could be either LaTeX or Markdown.
To convert formats, pandoc[1] looks to be the standard.