[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [groff] Odd indentation in -ms using .IP after .SH 1 with .nr PSINC
From: |
Ralph Corderoy |
Subject: |
Re: [groff] Odd indentation in -ms using .IP after .SH 1 with .nr PSINC 3p |
Date: |
Fri, 17 Aug 2018 10:36:47 +0100 |
Hi,
Tadziu wrote:
> > .SH 1
> > Locations
> > .IP " 1." 4
>
> "GROWPS" causes the point size for "SH 1" to become larger. This
> larger point size is still active when "IP" is called, and the indent
> (in current ens) of the "IP" call is interpreted with the larger point
> size.
I've also been looking into this as an exercise in learning more.
For those that are also interested...
`IP' is aliased to address@hidden'.
.de @IP
.if \\n[.$]>1 .nr \\n[.ev]:ai (n;\\$2)
.par*start \\n[\\n[.ev]:ai] 0
The `\\$2' is `4' from Kurt's `.IP'. As Tadziu says, that's `4n' as
reflects the current font size. Having set `:ai' particular to this
environment, `par*start' is also passed it.
.de par*start
address@hidden
.nr \\n[.ev]:pli \\$1
.nr \\n[.ev]:pri \\$2
address@hidden
So now `:pli', paragraph left indent, holds the same value. The real
work happens in address@hidden' that's called next.
.de address@hidden
.br
.\" Skip irrelevant lines.
.in (u;\\n[\\n[.ev]:li]+\\n[\\n[.ev]:pli])
.ft 1
.fam \\*[FAM]
There's the `.in' setting the indent and using `:pli'. The `.ft' and
`.fam' immediately follow, but too late to affect the first evaluation
of `4' as `4n' in address@hidden'.
Tadziu, you gave workarounds, but unless this is historical behaviour
that must be preserved, isn't the order wrong and address@hidden' should get the
paragraph reset before interpreting its `$2'?
--
Cheers, Ralph.
https://plus.google.com/+RalphCorderoy