Yann's Blog - Software and hardware

June 22, 2011

Semantic End-User Documentation: Docbook or Sphinx?

Filed under: Software — Yann @ 11:11 pm

When you think of user documentation authoring systems, a couple of traditional tools often come to mind: FrameMaker, Microsoft Word, InDesign, RoboHelp, LyX, TeX files, MadCap Flare. Some are fully proprietary, while others embrace some standards. Some are semantic, while others are design driven.

With the evolving output formats that are present today (and tomorrow, for the future predictors), there is honestly no excuse to have your primary authoring environment be non-semantic. For the uninformed, semantic implies meaning – instead of making text large, you mark it as a section, or instead of indenting and changing the color of text, you denote that the text is a call-out or note.

Many editors, even our friend who can’t typeset Microsoft Word (thats another topic), have semantic capability integrated. You define headers, sub-sections, footnotes, and more. Systems such as FrameMaker and LyX are heavily geared for this workflow – they in fact make it a relative pain to not follow their conventions. Systems such as RoboHelp attempt to be semantic, but are so steeped in legacy that they become unusable: RoboHelp still depends on VBA macros and Word to generate PDFs – this is an Adobe product by the way.

What about semantic file formats which are designed for direct editing – preferably human readable or approachable? There are really two main contenders in my eye, and one of them you may not be considering: DocBook and Sphinx wih reStructuredText.

First there is DocBook. Its a standard. It was formally SGML and now XML. There are tools, XSLT transforms, and the like to output a variety of formats, include LaTeX typeset documents, webpages, and Windows Help files. However, its incredibly unfriendly for human editing. No one likes hand-writing XML – its simply not natural, even as much as HTML has established its self. DocBook is also an ecosystem – there are tools, but they all have different ideas of what they should do, and interoperability is not guaranteed.

What if you could fix the human problem and provide a better semantic system, one with a kick-ass implementation (and not an ecosystem)? Thats what Sphinx does. It is DocBook for humans. You may know Sphinx as a Python API documentation system. It is, and it excels at that job like none other. However, Sphinx is both extendable, and composable – if you never ask for API documentation, it will never give you any. It also typesets using LaTeX, spits out theme-able and gorgeous webpages, and even makes Windows Help files. And if your document has special needs, its very easy to extend to produce end user documentation.

The real question is how well suited Sphinx actually is for writing non-developer user manuals. How easily can you get a technical writer versed in reStructuredText? How easy is it to actually change the look and feel of a document? From my initial investigation, I see few issues. However, the only way to actually know is to drink the Kool-Aid. My test will be to create an end-user manual, involve non-coder friends, and identify strengths and weaknesses.

I feel that Sphinx is everything DocBook promised, delivered.

iOS – Set a pattern background image for a UIView

Filed under: Apple,Software — Yann @ 10:32 pm

In iOS, there is no way to slug a background image into a UIView – making it slightly trickier to “linenfy” your new iOS application background (and who doesn’t like the new iOS 5 linen?).

However, you can apply a UIColor. Did you know UIColor can be a pattern? And the pattern can be defined by a UIImage?

Well, it can, and here is a one-liner to do so:

1
self.view.backgroundColor = [[UIColor alloc] initWithPatternImage:[UIImage imageNamed:@"bgs/fileinbundle.png"]];

(This code depends on ARC in XCode 4.2 – apply reference counting as appropriate for other versions)

Please note that you have to set all the items which are in front of the background view to clearColor such that they will not cover the background image.

Contribtastic for Incarna is now available

Filed under: EVE-Central — Yann @ 10:07 pm

I’ve just published a new version of Contribtastic with a patched version of libevecache for Incarna compatibility. Thanks to several helpers, including some standouts from the EVE Tribune, we can at the very least upload all data types from before Incarna. New types from Incarna are not yet available due to a lack of a database dump.

Contribtastic has also dropped the “alpha” moniker – its not a sudden refresh of code, but at this point it was just silly.

In addition, the client version checks are now activated – any clients earlier than Contribtastic 2.0.0 should complain loudly and demand you download an upgrade.

Powered by WordPress