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: Zoë Blade
Subject: Re: [Groff] Another silly question: \n[.ll]
Date: Fri, 29 Jun 2012 00:07:41 +0100

> Numerical values such as line lengths or indents or positions
> are stored internally in (device-dependent) "basic resolution
> units".  The formatter accepts input in other units, but
> converts these to basic units when it encounters them, and
> reading back a register returns its contents in these units.
> If you want to use one of these values again as input, you
> must specify "u" as unit, to tell troff not to apply any
> default unit conversion.  Example:
> 
>  .ll 15c            \" 15 cm is converted to internal units
>  .nr xx \n[.l]/2    \" do some arithmetic
>  .ll \n[xx]u        \" use the computed value as line length

Thank you very much!  Now I realise what I was misreading in the
manual, namely:

> The default scaling indicator is ‘m’.

Which was referring to input, not output.

> You can also increment or decrement registers.  E.g.,
> 
>  .in +1c
>  .ll -2c
> 
> This is perhaps what you're trying to achieve.

Thanks.  I gather that's relative to its last value, whereas I'm
trying to change it relative to its initial value, hence storing
that value in a variable right away, and subtracting things from
that later on.

Thanks,
Zoe.


reply via email to

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