More DocBook

So Calum brings up two interesting points about DocBook output for the web: First, without any sidebars or maximum widths set, the line width is too wide for most normal-sighted users. Second, the lack of a navigation sidebar makes it difficult to keep track of where you are and jump quickly to other places in the document.

And Calum is absolutely right. The good news is that these two problems can be solved in one fell swoop. Long ago, I created a customization for Norm’s stylesheets to add a navigation sidebar and make the output fit the Gnome web site. We’ve used it primarily for the release notes. The implementation is kind of slow and fragile, but it does work.

Regular readers of gnome-doc-devel-list will know that Peter Williams has been trying to add these sorts of things, so that we can have kick-ass standalone HTML builds without hassle. He’s also developed a gnome-doc-process script, which makes it easy to process DocBook from the command line. We’ll get all that into CVS in the next release cycle.

The goal with adding such extensions is to do them without doing something stupid, like overriding the body-creating template, like I did in the customizations mentioned above. Fortunately, I have control over my stylesheets, and I can add hooks wherever we need them to make this happen.

Here’s our seven-step program for success:

  1. Make all output prettier.
  2. Provide the necessary goodness to make HTML suitable for our web site, and hopefully easily tailored to other web sites.
  3. Get a simple script to do the transforms.
  4. Use this as the base infastructure for library.gnome.org.
  5. Get people to write documentation.
  6. Put all of our documentation online.
  7. Brag on our blogs about how we have the bestest documentation ever.

The bragging part is important. Fortunately, it’s easy, and we’re all really good at it. I mean, we are awesome braggers. Nobody brags as well as we do. We rule.

XMMS, FLAC, and FC4

Why doesn’t Fedora Core 4 ship with FLAC support enabled in XMMS? I get the whole MP3 thing; I’m cool with that. All my ripped CDs are in Ogg Vorbis, because that’s the sort of left-wing tree-hugging pinko Free Software zealot I am. But FLAC, the Free Lossless Audio Codec, it’s pretty free.

FLAC is the only example I can think of where the shiny new free format completely decimated the entrenched non-free format. It clubbed SHN to within inches of its life and left it lying in a ditch. And it’s stood strong against Apple’s best efforts to strangle lossless audio with Digital Restrictions Management using ALE.

FLAC is a winner. Let’s treat it as such.

Planet readers should now skip on to Christian’s excellent post on GPL and DRM. This paragraph isn’t for you. Hi Silke. I love you.

Purty DocBook

If you watch mailing lists and IRC carefully, and you keep your eye out for the word “DocBook”, you’ll see a trend emerge. People like to complain that the HTML you get from DocBook looks ugly. But it doesn’t have to be that way.

These days, you have basically two options for converting DocBook to HTML: Either you use Norm’s pan-galactice all-singing-all-dancing XSLT, or you use mine. Mine don’t provide as many options, and they still lack support for some of the more complex book-oriented stuff, but they’re mighty fast.

People said DocBook was slow, so I set out to prove them wrong. Now they say it’s ugly. So, hey, a challenge. Understand that any amount of prettification necessarily involves dictating style. Try writing HTML without any CSS or other fancy styling stuff. It looks ugly. So the goal here is to continue to make the generated XHTML generic, but to make the default CSS styling nicer. And there’s my long-standing goal of making Yelp do less customization to gnome-doc-utils than it currently does.

So, mockups:
BeanStalk Manual
Working with Beans
Purchasing Beans (includes an admonition)
Bean Storage and Care (includes a program listing)

These are rough sketches, and there are a few problems still. The XHTML behind them is clean, and easy to create from DocBook source. Everything is in the CSS. More to come later.

Creative Commons Attribution 3.0 United States
This work by Shaun McCance is licensed under a Creative Commons Attribution 3.0 United States.