groff
[Top][All Lists]
Advanced

[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: Tadziu Hoffmann
Subject: Re: [groff] Odd indentation in -ms using .IP after .SH 1 with .nr PSINC 3p
Date: Fri, 17 Aug 2018 20:23:17 +0200
User-agent: Mutt/1.9.1 (2017-09-22)


Here's a patch to fix the problem, but I'm not entirely
happy with it since it feels like it is usurping ms's chain
of command.  On the other hand, I'm not sure a clean solution
exists short of rewriting a large part of ms's internals.

The problem is that we have to delay evaluating IP's argument
until the font size has been reset, which I've attempted to
do by simply passing the argument unevaluated down the call
hierarchy, instead of saving it in a number register right
away, as appears customary in this ms implementation.[*]

However, address@hidden is called from a great number of places,
and these usually set the indent registers beforehand.
I've left this as it is, so now two ways of setting the
indents exist: via register and optionally via argument.

What my patch does is:

  In IP: pass argument unevaluated to par*start.
  In other paragraph macros: pass arguments from registers
    to par*start with explicit "u" scaling indicator.

  In par*start and address@hidden: don't set registers,
    but instead pass arguments to address@hidden

  In address@hidden: move font-size setting stuff before
    indent-setting stuff; set registers from optional
    arguments with default "n" scaling indicator
    before setting indents.

Please test!



[*] What I do in my own macros in these cases is to save the
argument in a string instead of a number register, thus
allowing it to be stored literally and later interpreted when
necessary in the appropriate context, but doing this here
would have also required widespread modifications to the ms
source code to remain internally consistent.


Attachment: s.tmac.patch
Description: Text document


reply via email to

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