| |
Unix Programming - DocBook - Migration Tools
Migration Tools
The second biggest problem with DocBook is the effort needed to
convert old-style presentation markup to DocBook markup. Human beings
can usually parse the presentation of a document into logical
structure automatically, because (for example) they can tell from
context when an italic font means ‘emphasis’ and when it means
something else such as ‘this is a foreign phrase’.
Somehow, in converting documents to DocBook, those
sorts of distinctions need to be made explicit. Sometimes
they're present in the old markup; often they are not, and the
missing structural information has to be either deduced by
clever heuristics or added by a human.
Here is a summary of the state of conversion tools from
various other formats. None of these do a completely perfect job;
inspection and perhaps a bit of hand-editing by a human being
will be needed after conversion.
-
GNU Texinfo
-
The Free Software Foundation intends to support DocBook as an
interchange format. Texinfo has enough structure to make reasonably
good automatic conversion possible (human editing is still needed
afterwards, but not much of it), and the 4.x versions of
makeinfo feature a
--docbook switch that generates DocBook. More at the
makeinfo
project page.
-
POD
-
A POD::DocBook
module translates Plain Old Documentation markup to DocBook. It
claims to translate every POD tag except the L<> italic tag.
The man page also says “Nested =over/=back lists are not supported
within DocBook”, but notes that the module has been heavily
tested.
-
LaTeX
-
A project called
TeX4ht can, according to the author of PassiveTeX,
generate DocBook from LaTeX.
-
man pages and other troff-based markups
-
These are generally considered the biggest and nastiest conversion
problems. And indeed, the basic
troff(1) markup is at too low a presentation
level for automatic conversion tools to do much of any good. However,
the gloom in the picture lightens significantly if we consider
translation from sources of documents written in macro packages like
man(7). These have enough structural
features for automatic translation to get some traction.
I wrote a tool to do troff-to-DocBook
myself, because I couldn't find anything else that did a tolerable
job of it. It's called doclifter. It
will translate to either SGML or XML DocBook from
man(7),
mdoc(7),
ms(7), or
me(7) macros. See the documentation
for details.
[an error occurred while processing this directive]
|
|