This is the mail archive of the sgml-tools@via.ecp.fr mailing list .


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

Problems generating man pages




I'm a new user of the sgmltools, and more or less an amateur at Unix
development (though I've dabbled in Unix for probably 15 years).  I'm
porting some tools to Linux and one of the first things I wanted to try was
writing a man page.  Not wanting to write it using straight groff input,
I'm trying to use LyX to author the page, exporting it to SGML, and using
the sgmtools (i386 rpm sgml-tools-1.0.9-2) to generate man output.

The problem I'm having is that character entities don't seem to be resolved
correctly.  For example, I have square brackets [] in my LyX source, which
get translated to [ and ] when I export to SGML.  But when I run
"sgml2txt -m file.sgml", the resulting file.man has "[lsqb     ]" and
"[rsqb  ]" instead of raw square brackets.  If I just convert to regular
text (by removing the -m option), the resulting file.txt DOES have the
brackets translated correctly.

I decided to put my finger on the problem (in spite of knowing Nothing
about Perl) and I traced the problem to the following conditional in
/usr/lib/sgml-tools/dist/fmt_txt.pl (near line 84):

  if ($txt->{manpage})
    {($txt->{manpage})nger
      copy ($infile, $outfile);
      return;
    }

When this leg is taken, a bunch of TOC logic is bypassed, but code to
replace character entities is being skipped as well.  If I "comment out"
the aforementioned lines, I get usable man page output.  Does someone have
a suggestion as to how this should be fixed?  I don't feel comfortable
enough with Perl or the logic flow of the sgmltools in general to submit a
patch.

Steve Turner, IBM e-boss Software Development Tools, Austin TX,
sdturne@us.ibm.com, tie 678-9959, outside 512-838-9959





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