groff
[Top][All Lists]
Advanced

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

Re: [Groff] Another silly question: \n[.ll]


From: Anton Shepelev
Subject: Re: [Groff] Another silly question: \n[.ll]
Date: Fri, 29 Jun 2012 17:31:03 +0400

Zoe Blade:

> As per page 101 of The GNU Troff Manual, I'm look-
> ing at \n[.ll] which I'd expect to be  6.5  inches
> measured  in  ems,  but  when  I print this figure
> (even with the phrase "\n[.ll]" being the entirety
> of  the  Groff  input  file), the output is always
> 468000 (or 451275 for A4 paper, etc).  This  is  a
> lot larger than what I was expecting.

All  numeric registers store only an integer number,
while all units of measurement in groff  are  imple-
mented  using  "scaling indicators", which do naught
else but multiply the preceeding value by a  certain
factor:

             http://tinyurl.com/7k8u87e
             http://tinyurl.com/7scqz6t

If  you want to get the number of centimeters in .ll
then write:

             .nr ll-cm \n[.ll]/1c
             .tm Centimeters: \n[ll-cm]

A default scaling indicator only affects the  way  a
number  is  interpreted  when not followed by an ex-
plicit scaling indicator, and can be applied via:

            .warn
            .nr a (c;2)
            .tm \n[a] \" will print 188
            .nr a (c;2u)
            .tm \n[a] \" will print 2

-- 
()  ascii ribbon campaign - against html e-mail 
/\  www.asciiribbon.org   - against proprietary attachments



reply via email to

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