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: Tadziu Hoffmann
Subject: Re: [Groff] Another silly question: \n[.ll]
Date: Fri, 29 Jun 2012 00:56:46 +0200
User-agent: Mutt/1.5.21 (2010-09-15)


> I'm looking 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.

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

> Or, to broaden the question out to what I'm actually trying
> to accomplish overall, I'm trying to specify the right hand
> indentation.

You can also increment or decrement registers.  E.g.,

  .in +1c
  .ll -2c

This is perhaps what you're trying to achieve.





reply via email to

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