groff
[Top][All Lists]
Advanced

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

Re: [Groff] Line Breaks


From: Werner LEMBERG
Subject: Re: [Groff] Line Breaks
Date: Sun, 06 Mar 2011 15:49:11 +0100 (CET)

> .sp |2i
> 1.
> .br
> \X'ps:'\c
> .br
> 2.
> 
> the output becomes:-
> 
> 1.
> <blank line>
> 2.
> 
> The second .br now does its job because it thinks there is
> "something" in the current line, whereas in fact the \X command
> should just be passed through to the output device.
> 
> My question is: Is this desirable behaviour? Or should \X \Y .device
> and .devicem all be "transparent" with regards to whether a line
> break triggers a position movement?

\X and \Y start a word, they are not transparent.  Compare this to
TeX's \hbox{}.  This has been so from the very beginning, IIRC.

> Is it desirable to make \X et al "transparent" so this effect won't
> happen.  Will it break something else?

Yes, I fear that it might break things.  While implementing .device
and .devicem, I was tempted to make those two requests transparent
w.r.t. the beginning of line recognition, but since all other
escape/device pairs (like \m - .color) behave identically, I thought
it would be best to continue with this practise.

> Will I be able to work out how to "fix" it?  (That last one is sort
> of rhetorical - you don't have to answer!!).

It's indeed rhetorical, since I won't accept such a patch :-) Besides
this, it's not very difficult; if you look up the word `transparent'
in the ChangeLog files you can find some examples how to do it.

Note, however, that the `output' request (equivalent to \! at
top-level) *is* transparent:

  1.
  .br
  .output x X ps:
  .br.
  2.

  ->  1.
      2.

I agree that some of this stuff is badly documented in the
groff.texinfo file (and sometimes at wrong places; e.g., the
non-transparent \X and \Y behaviour is documented in the description
of the \: escape).  Patches to improve this are highly welcomed.


    Werner



reply via email to

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