Sunday, October 18, 2015

software - What are the tool choices for producing technical documentation in PDF and web site ready HTML?


My company currently maintains our technical documentation (User's Guide) in Google Docs. With each release I produce a PDF that we host on our website.


Here are the features of Google Docs that work well:



  • Collaboration: Multiple simultaneous editors, comment/reply/resolve system

  • Ease of use: Cloud based, built-in backups and revision history

  • Features: WYSIWYG editing, Table of Contents



And the not so nice:



  • Inability to produce an index

  • Limited styling capabilities

  • Limited HTML export capability


I'm tasked with finding a new "tool" that supports the following needs:



  • It must produce HTML with the classic left-pane-navigation / right-pane-content model

  • Functionally, it must support index creation (for both PDF and HTML), and more powerful styling



I'm open to ideas with respect to platform, though I'd love something cloud based.



Answer



Here's what we do for that. It's not cloud-based, but it is source-control-backed, like (I hope) your code already is.


Tools and technologies involved:




  • source control





  • DocBook DTD




  • your favorite editor for XML files (WYSIWYG possible)




  • XSLTProc (with ant, but you could do make or something else instead)




  • XEP (PDF generator)





  • (deprecated, but I'll mention it anyway): HTMLHelp Compiler






We write our documentation source against the DocBook DTD. This is a well-established documentation standard, and while the whole spec is big, you probably only need about 20 XML elements (tags). All the usual stuff is there -- divisions (book, chapter, section, etc), formatting (emphasis, code, etc), semantics (classname, methodname, command, guielement, etc), indexing, TOC, and so on.


Alongside the DocBook XML source are stylesheets that translate your XML input into whatever output you like. DocBook comes with some of these. We feed the XML source and the stylesheets to XSLTProc to produce an intermediate output, formatting objects (FO). We then have a step to transform that into PDF (using XEP), HTML (using XSLTProc), and (we don't do this part any more) a CHM file of HTML doc (using HTMLHelp Compiler).


We pack all those generation steps up into an ant build file (ant is what we use for our software builds already), but there's no reason you couldn't do it through make or whatever your build tool of choice is.


The XML source is checked into source control and collaboration is accomplished in the usual way. XML supports file inclusion, so you can modularize your books however you like. Because the docs are in our source-control system, it's easy to branch and tag them, and the automated nightly builds include documentation.



Because the source is XML, not some binary format, diff and merge work as you would expect, and you can use whatever editor you like. Some of our people use Abortext Epic (pretty high-end), some use Oxygen, some use NotePad+XML, and at least one old-fashioned person (ahem) uses emacs.


No comments:

Post a Comment

technique - How credible is wikipedia?

I understand that this question relates more to wikipedia than it does writing but... If I was going to use wikipedia for a source for a res...