This is the mail archive of the mailing list .

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Man Page Adventures in DocBook and Jade

Greetings Oasis DocuPeople,

I have a question for anyone who has any expertise in DocBook (sgml), Jade,
and man page production. Please forgive my lengthy introduction, but I
it necessary to explain where my problems lie.

 My task appeared fairly straightforward: I had to produce a man page for
 the Linux Event Logging command evlview, the synopsis for which was
 to look like this:

 evlview [(1)source (defaults to /var/evlog/event_log)]
 [(2)destination (defaults to stdout)] [-filter filter] | -help

 (1)  -new [-timeout nsec] | [-log srclogfile] [-tail nrec] [-reverse]

 (2)  -out destlogfile | [-spec formatstr] [-specf formatfile] [-compact] [
 -separator sep]

 After consulting the O'Reilly DocBook (Walsh and Muellner), I was fairly
 certain I could get some semblance of that result using the following code
 inside a <refentry>:

           <group choice="plain">
                     <synopfragmentref linkend="source">source (defaults to

                     <synopfragmentref linkend="destination">destination
                     (defaults to stdout)</synopfragmentref>
                <arg choice="opt">-filter
                <arg choice="plain">-help>/arg>

           <synopfragment id="source">
                <group choice="plain">
                <arg choice="plain">
                     <arg choice="plain">-new</arg>
                     <arg choice="opt">-timeout
                     <arg choice="plain">
                          <arg choice="opt">-log
                     <arg choice="opt">-tail
                     <arg choice="opt">-reverse</arg>

           <synopfragment id="destination">
                <group choice="plain">
                <arg choice="plain">
                     <arg choice="plain">-out
                <arg choice="plain">
                     <arg choice="opt">
                     <arg choice="opt">-specf
                     <arg choice="opt">-compact</arg>
                     <arg choice="opt">-separator

 When I ran the Jade command docbook2html on this sgml file, I got
 exactly what I expected. When I ran docbook2man, however, I got this
 garbled synopsis:

         evlview    [                [    source  (defaults  to
          [ destination (defaults to stdout)]
          [-filter  filter] ]  -help
          [ -timeout nsec]
           [-log srclogfile]
          [ -tail nrec]
          [ -reverse]
                            -out destlogfile
           [ -spec formatstr]
          [ -specf formatfile]
          [ -compact]
          [ -serarator sep]

 In addition to being damned difficult to read, this grouping is incorrect.
 Not only does it not indicate that source and destination are groups, this
 man page output does not clearly identify which lines correspond to source
 and which to destination. Moreover, the square brackets separating the
 other options from -help misidentify those options as an optional grouping
 (the relationship of the group to -help is exclusive).

 I considered altering the parser scripts to produce the desired results,
 but the actual conversion script at the heart of docbook2man is perl,
 and I don't know perl. Ultimately, in order to meet deadlines, I decided
 modify the troff file directly, changing it from:

 \fBevlview\fR \fB [                  [ source (defaults
 to /var/evlog/event_log)]
  [ destination (defaults to stdout)]
  [ -filter
 ]  -help
 \fR \fB                  -new
  [ -timeout
   [ -log \fIsrclogfile\fB]
  [ -tail \fInrec\fB]
  [ -reverse]
 \fB                  -out \fIdestlogfile\fB
   [ -spec \fIformatstr\fB]
 -specf \fIformatfile\fB]
  [ -compact]
  [ -separator


 \fBevlview\fR \fB [\fR(1) \fBsource \fR(defaults to
 [\fR(2) \fBdestination \fR(defaults to \fIstdout\fR)\fB] [ -filter
 \fIfilter\fB] | -help

 \fR (1)\fB-new [ -timeout \fInsec\fB] | [ -log \fIsrclogfile\fB] [ -tail
 \fInrec\fB] [ -reverse]

 \fR (2)\fB-out \fIdestlogfile\fB | [ -spec \fIformatstr\fB] [ -specf
 [ -compact] [ -separator \fIsep\fB] \fR

 So here are my questions: am I missing something? Am I making this harder
 than it has to be? Is there a better parser than docbook2man available
 for producing man pages from DocBook? Does Jade/DocBook require a special
 annotation in the sgml in order to enable the <group> functions and
 a man page consistent with the html and ps outputs?


 Dennis Grace

 IBM Information Developer
 (512) 838-4977  T/L 678-4977  cell: (512)-296-7830

 Is there another word for 'synonym'?

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]