From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bill Campbell To: docbook-tools-discuss@sourceware.cygnus.com Subject: Re: docbook-tools-discuss: Re: I'm trying to set up docbook-tools... Date: Wed, 27 Dec 2000 06:36:00 -0000 Message-id: <20000707103717.A10748@kstarr.celestial.com> References: <200007041511.LAA15779@snark.thyrsus.com> <00070410352500.07357@ehome.inhouse> <873dlnjklb.fsf@nwalsh.com> <20000706095446.A13085@kstarr.celestial.com> <87puoqniw7.fsf@nwalsh.com> X-SW-Source: 2000/msg00264.html On Fri, Jul 07, 2000 at 09:56:40AM -0400, Norman Walsh wrote: >/ Bill Campbell was heard to say: .... >| Another thing I would really like to see are more tools that convert >| existing input from ?roff, TeX, and similar markup languages into DocBook >| SGML, because this would make it much easier for those of us who are fluent > >A little more discussion about how to convert from procedural markup >to structural markup is probably in order, but tools to do this are >very, very hard to write. This is the problem I call "dragging markup >up hill". Look at the troff source for an (old) O'Reilly book (I have :-), >and you'll find that the same troff markup for "italic" is used for >all the things that are italic in print. (Quelle surprise). But if you >want to mark those things up semantically, you have to distinguish >between at least three or four different kinds of italic things which >is nearly impossible to do accurately. I understand the difficulties of conversion programs like this, and the best one can hope for is to convert what exists (i.e. italic, bold, and other formatting codes) to their lowest common denominator in DocBook. On the other hand, I have thousands of pages of documentation that I've written using the -mm, -ms, and -man macros that I would like to convert with minimal effort. If someone else had written mm2db, ms2db, man2db, then I could learn a lot about DocBook by looking at the output of these commands. Furthermore, I find it a lot easier to write documentation initially using a format suitable for the -mm macros than I do going straight to DB, primarily because this is what I've been doing for the better part of twenty years (it's also a lot easier to do simple tables in tbl format than CAL tables :-). I'm well on my way to having a working program that handles the ?roff input that I've been writing for years. It's based on a program I wrote years ago that takes ?roff input, parses it for preprocessor directives, (.TS/.TE, .PS, .PE, etc.), assembles a command line that then invokes the appropriate preprocessors in the correct order, and passes it off to ?roff. Currently it handles -mm macros fairly well, and by dbtbl preprocessor at least gets my fairly simple tables into reasonable shape. I haven't tackled the pic, eqn, or grap, preprocessors because I rarely use them myself. If there are others out there who would like to work on this project, I welcome input, help -- even Andrew Tridgell's favorite pizza (with anchovies). Bill -- INTERNET: bill@Celestial.COM Bill Campbell; Celestial Systems, Inc. UUCP: camco!bill PO Box 820; 6641 E. Mercer Way FAX: (206) 232-9186 Mercer Island, WA 98040-0820; (206) 236-1676 URL: http://www.celestial.com/ ``The best we can hope for concerning the people at large is that they be properly armed.'' -- Alexander Hamilton, The Federalist Papers at 184-188