On 18-Feb-06 Miklos Somogyi wrote:
> [...]
> Here's an artificial example just to see the extra space at work:
> 
> .vs  0.85c
> .ps 20
> .ft CR
> .sp 10
> Hello1
> \X'ps: exec 1 0 0 setrgbcolor'
> Hello2
> Hello3
> \X'ps: exec 0 0 0 setrgbcolor'
> .br
> Hello1 Hello2 Hello3
> .\"
> .ex
> 
> Here the red Hello2 Hello3 are one space to the right of the black
> ones.
> Does anyone know the how and why of this space?

Yes -- it comes from the LF in the input that follows

\X'ps: exec 1 0 0 setrgbcolor'

You would get the same (without the colour change) from

Hello1
\&
Hello2
Hello3
\X'ps: exec 0 0 0 setrgbcolor'
.br
Hello1 Hello2 Hello3

(i.e. the zero-width non-printing character "\&").
To get what you want, you can do it as

Hello1
\X'ps: exec 1 0 0 setrgbcolor'\
Hello2
Hello3
\X'ps: exec 0 0 0 setrgbcolor'
.br
Hello1 Hello2 Hello3

so as to "hide" the LF, or as

Hello1
\X'ps: exec 1 0 0 setrgbcolor'Hello2
Hello3
\X'ps: exec 0 0 0 setrgbcolor'
.br
Hello1 Hello2 Hello3

Hoping this helps with your real example!

Best wishes,
Ted.

--------------------------------------------------------------------
E-Mail: (Ted Harding) <[EMAIL PROTECTED]>
Fax-to-email: +44 (0)870 094 0861
Date: 18-Feb-06                                       Time: 21:52:48
------------------------------ XFMail ------------------------------


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

Reply via email to