groff
[Top][All Lists]
Advanced

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

Re: [Groff] Horizontal rule w/ length a fraction of the page width?


From: Michael Smith
Subject: Re: [Groff] Horizontal rule w/ length a fraction of the page width?
Date: Fri, 15 Jul 2005 22:49:31 +0900
User-agent: Mutt/1.5.9i

Werner LEMBERG <address@hidden> writes:

> There is a very important concept if you work with groff requests and
> escapes: The default scaling indicator.  For \l, it is the em unit.
> This:
> 
>   \l'\n(.l*.80'
> 
> is thus handled as
> 
>   \l'\n(.lm*.80m'

I see now. Before I posted I had been reading the groff info docs
and come across the following:

  Thus, the safest way to specify measurements is to always
  attach a scaling indicator.  If you want to multiply or divide
  by a certain scalar value, use `u' as the unit for that value.

And I think I might have even tried this:

  \l'\n(.lu*.80u'

But found that that didn't do what I thought it might do.

> But accessing a register like \n(.l always returns its value in
> internal units `u'!  Consequently, the line length will be far too
> long in most cases.  Additionally, for devices where the value of `u'
> is near to `m', computing `.80m' is round to 1, making the
> multiplication very inexact.
> 
> To overcome all those limitations I suggest that you say this:
> 
>   \l'\n(.lu*80u/100u)
> 
> avoiding fractional numbers.

Thanks! That works perfectly (with an apostrophe in place of the
closing paren, which I guess was just a typo, right?).

So, in general, for computations involving numbers less than one,
is the right way to specify them always as a fraction instead of a
decimal number? How about for fractional numbers greater than one?

Sorry if I seem clueless -- but the groff info doc and man pages don't
seem to provide much guidance about fractional numbers. At least not
that I could find. Maybe I'm not looking in the right place.

  --Mike

Attachment: smime.p7s
Description: S/MIME cryptographic signature


reply via email to

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