views:

59

answers:

3

I work on a lot of language-based projects, and the larger ones require semi-formal specification documents. In the past, I've used OpenOffice.org or just plain HTML for these documents, and manually converted them to whatever other formats were needed. For my current project, however, I need to generate output in several formats (HTML, PDF, man page, and text, minimally) and I'm looking for a document markup or page-description language that can handle multiple output formats and the usual programming-documentation-related formatting requirements:

  • Section delimiters
  • Internal and external links
  • Named character and paragraph styles
  • Automatic section numbering
  • Automatic table-of-contents generation
  • Unicode support

I need a high degree of control over the generated output, for the sake of visual consistency. This seems like a pretty reasonable set of requirements, but offhand I don't know of a unified tool that really suits the job. I was thinking of making one, and if that becomes necessary then this question serves a dual purpose for gauging interest.

+4  A: 

Looks like DOCBOOK could interest you.

The Wikipedia article gives you an overview of the capabilities.

The best thing is that there is an open source implementation so you are free to extend or modify it to support even more output formats. This requires good knowledge of XSLT thought. Anyway better than reinventing the wheel.

jdehaan
Though I had hoped for something non-XML-based, this seems superior (for my current purposes) to LaTeX, and I like the ability to use XSLT for document transformations.
Jon Purdy
I like LaTeX too, but it still mixes a bit of formatting together with the informational data and the learning curve is quite steep. There are converters from docbook to LaTeX that give you the LaTeX typesetting power: http://wiki.docbook.org/topic/DocBookPublishingTools
jdehaan
Thanks for the tips. I've been meaning to check out LaTeX in more detail for some time, but haven't quite gotten around to it.
Jon Purdy
+3  A: 

LaTeX is the best bet I can think of. It won't do man page and plain text (although the latter should be relatively simple to hack together).

jalf
+3  A: 

LaTeX does it all.

mcandre
It does? Man pages and plaintext output too?
jalf