Re: how to get rid of [] in manpages?
On Sun, Sep 15, 2002 at 11:27:18AM +0200, martin f krafft wrote:
> also sprach Colin Watson <cjwatson@debian.org> [2002.09.15.0344 +0200]:
> > <group choice="opt"> means that the argument is optional, and therefore
> > that you want brackets around it. You should probably remove it.
> > However, even if you do you still get the brackets. A little debugging
> > indicates that it occurs at this point in the transpec:
> >
> > GI: ARG
> > AttValue: CHOICE OPT
> > StartText: \s[
> > EndText: ${_attval REP REPEAT 505}]\s
>
> (How'd you debug this. Sorry, but SGML and XML are too mysterious for
> me).
I'm not much good with SGML either. I looked through
/usr/share/sgml/transpec/docbook-to-man.ts and guessed that it might be
that section (there aren't many sections that mention '['), so I added
some extra stuff to the StartText: line above and observed it appear in
the output.
> > > Aside, I believe in meta-formats.
> >
> > This demonstrates that you haven't used groff much, I think ... look at
> > the mdoc macro set, for instance. It provides an excellent logical
> > formatting framework.
>
> Mh. Do you have a nicely formatted example file you'd be willing to
> share, which I can first use as a template, then go from there?
I've been meaning to add one to man-db. In the meantime, there's
groff_mdoc(7) as a reference manual and mdoc(7) as an introduction, and
there are a number of man pages in Debian that use mdoc - you can grep
for '^\.Dd' to find them. look(1) in bsdmainutils seems like a good
template.
--
Colin Watson [cjwatson@flatline.org.uk]
Reply to: