[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Groff] Re: Blank line macro (.blm) evil with `groff -ms'
From: |
Keith MARSHALL |
Subject: |
Re: [Groff] Re: Blank line macro (.blm) evil with `groff -ms' |
Date: |
Mon, 2 Jul 2007 15:19:19 +0100 |
Werner Lemberg wrote:
>> I would like to report a problem with groff compilation when the
>> "blank line macro" request (.blm) is used. [...]
>
> Your analysis is wrong. The problem is completely unrelated to the
> blank line macro. It is possible to reduce your example to this:
>
> .ev 1
> .br
> .ev
> .LP
> x
>
> The call to `.br' invokes groff's output routine. This in turn
> invokes the address@hidden' macro which is called only once in the whole
> document. Its function is to initialize the global state of the
> various ms macros, and it assumes that it is in environment 0 (the
> top-level environment). In the given example, the assumption fails,
> and environment 0 isn't initialized correctly.
>
> I'm not sure whether I should classify the current behaviour as a bug
> or as a feature. I tend to say it's a feature, and I would like to
> document that the first action which causes vertical movement in the
> output must happen in the top-level environment. Anything else makes
> the initialization unreliable IMHO.
>
> Comments, please.
Since this hasn't been observed until now, it would appear that the OP
is trying to achieve something rather unusual. As address@hidden' needs to
be invoked in environment 0, perhaps a warning could be emitted if the
environment has been changed before initialisation occurs?
--- ./groff/1.19.2/tmac/s.tmac.orig Mon Jul 2 14:28:52 2007
+++ ./groff/1.19.2/tmac/s.tmac Mon Jul 2 15:05:12 2007
@@ -135,6 +135,10 @@
.als AB cov*err-not-before-tl
.de cov*first-page-init
.rm cov*first-page-init
+.if !'\\n[.ev]'0' \{\
+. @error environment changed before the first page was started!
+. @error must be in top level environment when first page is started
+.\}
address@hidden
.als RP cov*err-not-after-first-page
address@hidden
Regards,
Keith.