groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Groff] Re: GNU mdoc vs UCB mdoc


From: Thorsten Glaser
Subject: [Groff] Re: GNU mdoc vs UCB mdoc
Date: Mon, 8 Sep 2008 07:51:01 +0000 (UTC)

Hello GNU groff developers!

This is from http://bugs.debian.org/498082 correspondence:

Colin Watson dixit:

>On Sun, Sep 07, 2008 at 07:57:44PM +0000, Thorsten Glaser wrote:
>> Colin Watson dixit:
>> >mdoc; docj.tmac still has it, commented as "parse argument vector
>> >(recursive)". As far as I can tell this was replaced by the
>> >doc-parse-args macro, probably in Werner Lemberg's complete rewrite of
>> >mdoc in March 2001. However, it wasn't obvious to me how to upgrade your
>> >macro.
>> 
>> Interestingb
>You'd have to ask Werner. I assume he had a good reason; he doesn't
>normally go in for rewrites for the sake of it, as far as I can see.

>> But yes, parse argument vector recursively sounds about right. Maybe I
>> can use something like this:
>> b.if \n(.g \{\
>> b.de aV
>> b.doc-parse-args \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
>> b..
>> b.\}
>> 
>> I think this use of a more than two character macro will be tolerated
>> by AT&T nroff since itb> 
>> The other option would be GNU groff mdoc tmac file upstream considering
>> to add back support for the aV macrob

>This is beyond me; I recommend asking address@hidden for help here. I
>don't know whether defining aV to doc-parse-args would be sensible or
>not.

… and here I am.

The basic quesion is: I have embedded a .Mx macro similar to .Ox, .Nx and
so on in my manual pages, which looks like this in the embedded version:
│.de Mx
│.nr cF \\n(.f
│.nr cZ \\n(.s
│.ds aa \&\f\\n(cF\s\\n(cZ
│.if \\n(aC==0 \{\
│.      ie \\n(.$==0 \&MirOS\\*(aa
│.      el .aV \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
│.\}
│.if \\n(aC>\\n(aP \{\
│.      nr aP \\n(aP+1
│.      ie \\n(C\\n(aP==2 \{\
│.              as b1 \&MirOS\ #\&\\*(A\\n(aP\\*(aa
│.              ie \\n(aC>\\n(aP \{\
│.                      nr aP \\n(aP+1
│.                      nR
│.              \}
│.              el .aZ
│.      \}
│.      el \{\
│.              as b1 \&MirOS\\*(aa
│.              nR
│.      \}
│.\}
│..

However, the “aV” macro is missing from recent GNU groff versions of the
mdoc macro package. How would I best proceed while preserving compatibi-
lity to the UCB mdoc macro package, with both GNU groff (as used by, for
example, OpenBSD) and AT&T nroff (as used by MirBSD)?

Thanks in advance!

bye,
//mirabilos
-- 
  "Using Lynx is like wearing a really good pair of shades: cuts out
   the glare and harmful UV (ultra-vanity), and you feel so-o-o COOL."
                                         -- Henry Nelson, March 1999




reply via email to

[Prev in Thread] Current Thread [Next in Thread]