groff
[Top][All Lists]
Advanced

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

Re: [Groff] Misformatting of CR font in PIC macros


From: Roger Leigh
Subject: Re: [Groff] Misformatting of CR font in PIC macros
Date: Fri, 4 Feb 2011 15:07:54 +0000
User-agent: Mutt/1.5.20 (2009-06-14)

On Fri, Feb 04, 2011 at 10:21:35AM -0000, Ted Harding wrote:
> On 04-Feb-11 09:48:42, Werner LEMBERG wrote:
> >> The left-hand boxes in the figure contain "Filename" in Roman and
> >> below it "hash.c" in Courier.  While in the pic macros both have the
> >> same x offset, "hash.c" is offset further to the right than
> >> "Filename", when both were expected to be exactly left-aligned.
> >> Note that changing \fC to \fR results in perfect alignment.
> > 
> > The difference in formatting is due to the different width of spaces
> > in the two fonts.  You shouldn't write
> > 
> >   \fR foo \fP...
> >   \fC bar \fP...
> > 
> > but rather
> > 
> >   \fRfoo\fP...
> >   \fCbar\fP...
> > 
> > groff is not LaTeX :-) spaces after a `\fX' command are *not*
> > suppressed.
> >     Werner
> 
> And, if you really need a left-space to separate the text from
> the left-hand edge of the box, and preserve alignment, use a
> space in the same font (TR) both times -- like:
> 
> "\s12\fR \fP\fChash.c\fP" at 1.062,8.721 ljust
> "\s12\fR Filename\fP"     at 1.062,9.096 ljust
> 
> and *not*
> 
> # "\s12\fC hash.c\fP"   at 1.062,8.721 ljust
> # "\s12\fR Filename\fP" at 1.062,9.096 ljust
> 
> Hoping this helps!

Many thanks for the insight.  In this specific case, the spaces were
spurious due to fig2dev being buggy, but I'll definitely bear it in
mind if I do need to do this sort of spacing alignment in the future.


Thanks,
Roger

-- 
  .''`.  Roger Leigh
 : :' :  Debian GNU/Linux             http://people.debian.org/~rleigh/
 `. `'   Printing on GNU/Linux?       http://gutenprint.sourceforge.net/
   `-    GPG Public Key: 0x25BFB848   Please GPG sign your mail.

Attachment: signature.asc
Description: Digital signature


reply via email to

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