groff
[Top][All Lists]
Advanced

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

Re: [Groff] No-space mode in diversions


From: Werner LEMBERG
Subject: Re: [Groff] No-space mode in diversions
Date: Sat, 05 May 2001 10:29:30 +0200 (CEST)

> The troff user's manual states that no-space mode is associated
> with the current diversion, and Unix troff behaves accordingly.

May I ask that you send me the UNIX nroff output of your example?

> GNU troff currently implements no-space mode only for the
> top-level diversion.  Anybody interested in a quick fix?

Yes, I'm interested.  Please send it to me. :-)

Nevertheless, looking into the source code of gtroff, it seems that
James Clark has intentionally implemented .ns for the top-level
diversion only (and this behaviour is already documented in
groff.texinfo).  You can always use `\!.ns' within a diversion to
induce the desired behaviour.  Does somebody know the reason behind
this way of implementation?

> (Of course it doesn't work in the current version of groff because
> the code to handle it is not there.  Unix nroff shows interesting
> behavior: if you remove the `.br' after `bar' in this sample code,
> it behaves as if the `.ns' were completely ineffective.  Probably
> because `.sp' generates a break, causing `bar' to be output, which
> turns no-space mode off, after which `.sp' is allowed to space.  Is
> this interpretation correct?  Does it make sense to act this way?  I
> think it would have been nicer if `.sp' caused a break, but threw
> away its arguments while still in no-space mode.)

Using `.ns' while a partial line is still there doesn't work.  You
have to be in `vertical mode' (to use a TeX specific phrase).  And I
think this makes sense.
 
> Also, I think we should have a number register to query no-space
> mode.  I suggest `.q' (in analogy to `.u') to give `1' in no-space
> mode and `0' in (default) normal mode.

Implemented in the current snapshot.  Please test (in 12 hours or so).


    Werner

reply via email to

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