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: Tadziu Hoffmann
Subject: Re: [Groff] odd interaction between .bl and .(c in -me macros
Date: Fri, 24 Feb 2012 16:48:10 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

[...]
> produces the expected output (with all lines of equal length)
> when using basic groff,

because *all* lines are the default length

> but changes line length in the foo environment when using the
> -me macro set.

because the line length in environment 0 ("normal" text) has been
changed by the me macros, but environment foo retains the default
line length.


> There is nothing in the meref.me documentation that leads me
> to believe this is expected behavior, so I presume it's a bug.
> 
> 2. meref.me documents that the .ll macro sets the line length
> across all environments, but it does not work this way.

I don't thinks it's even possible to achieve this, so it must
be an error in the documentation, not in the macros.

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.
How is an "ll" at the beginning of the document going to know
which environments will be created later on?

Of course it is possible to redefine "ev" to switch to the
new environment and set the line length, but this is also
not without problems: often, environments are used to process
different parts of the text (e.g., you might use a separate
environment to process footnotes), and so you often do want to
have different parameters for the different environments. In
this case blindly setting the line length when entering the
environment is not desirable.

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"?)

(And, of course, having some knowledge of the design principles
behind groff is helpful for debugging.)





reply via email to

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