> > .  nr env-count 0 1
> > .
> > .  de CI
> > .    ev e-\\n+[env-count]
> > .    nop \&\\$*
> > .    nr have-int \\n[.int]
> > .    ev
> > .    fam C
> > .    ie \\n[have-int] \{\
> > .      I \&\\$*
> > .      fam
> > .    \}
> > .    el \
> > .      I \&\\$*\F[]
> > ..
>
> This seems to screw up for very long arguments.  I guess you need to
> evaluate the nop inside a diversion, otherwise if the argument
> results in more than one output line only the last remaining stuff
> remains in the current partial line of the environment, the
> completed lines get printed.

Yep.

> But how about this:
>
> .de CI
> .ds xx \\n[.fam]
> .fam C
> .I [EMAIL PROTECTED]
> .fam
> ..

Excellent!  This is *very* nice.  BTW, attaching something directly to
\$@ doesn't work: Saying [EMAIL PROTECTED]' as a macro argument is equivalent to
`\$@ foo'.  So this is probably the final version:

  .de CI
  .  ds xx \\n[.fam]
  .  fam C
  .  I \\$@ \F[]\F[\\*[xx]]
  .  fam
  ..

As a consequence, I'm not going to implement the removal of
environments :-)


    Werner


_______________________________________________
Groff mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/groff

Reply via email to