groff
[Top][All Lists]
Advanced

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

Re: [Groff] odd interaction between .bl and .(c in -me macros


From: Dave Kemper
Subject: Re: [Groff] odd interaction between .bl and .(c in -me macros
Date: Fri, 2 Mar 2012 04:32:23 -0600

On Fri, Feb 24, 2012 at 9:48 AM, Tadziu Hoffmann
<address@hidden> wrote:
> I don't thinks it's even possible to achieve this, so it must
> be an error in the documentation, not in the macros.

That's certainly possible.  In general, the -me macro set does not
interact well with environments.  Many things that one would normally
set in an environment, -me stores in registers, which are global, not per
environment.  So there is little point in switching to a new environment
and then using the -me-sanctioned method of setting, say, the paragraph
type size (that is, setting the pp register), as this change is global.

In fact, meref.me mentions environments only once, when talking about
.ll and comparing it to .xl.  Were it not for these two macros expressly
designed to deal with environments, I would conclude that using -me and
using multiple environments were incompatible.

> In the old troff, it would have been possible to redefine "ll"
> so that it changes the line lengths in all environments (there
> were only three, "0", "1", and "2"), but in groff where you can
> create new environments on the fly, this is surely not possible.

Since the -me macro set predates groff, could it be that the documentation
is referring to the troff implementation and was never updated with the
groff port?

> Of course it is possible to redefine "ev" to switch to the
> new environment and set the line length, but ...
> blindly setting the line length when entering the
> environment is not desirable.

Desirable or not, I would say that such behavior is exactly what meref.me
documents that .ll will do.

If you think it makes more sense to change the documentation than the
macro package's behavior, what then is the difference between .xl and .ll?

> The best solution would probably be not to use the low-level
> requests directly, but instead to define higher-level macros
> for specific purposes.  (Have you looked at macro "@C" as a
> wrapper around "ev"?)

I haven't looked at anything to try and debug this; it's been a pretty
low-priority problem for me thus far.



reply via email to

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