Update of bug #64531 (project groff):
Status: None => Need Info
Assigned to: None => gbranden
_______________________________________________________
Follow-up Comment #1:
I think this may be a matter of documentation.
[comment #0 original submission:]
> Reported by Doug McIlroy, some time ago
(http://lists.gnu.org/r/bug-groff/2009-11/msg00000.html).
Some time...I'll say.
> There was no followup on the email list, and groff 1.23 exhibits the same
behavior.
> ----
> A trouble with footnotes in text processed with groff -ms -e.
>
> The footnote in the attached document is inappropriately continued to the
next page, where an apparently bare footnote separator appears.
>
> Tests done with groff 1.20.1.
>
> [I suppose the continuation was caused by white space generated by
.EN--apparently a pernicious analog of the relatively harmless ancient troff
bug of sometimes emitting a blank page after the end of a document.]
Doug's supposition looks correct to me. (Who's surprised?)
It seems to me like all we can do is recommend caution when using displays in
footnotes, given the semantics of the `DD` register.
I got more satisfactory output with the following.
$ diff -u EXPERIMENTS/anomalousfootnote.ms EXPERIMENTS/anomalousfootnote2.ms
--- EXPERIMENTS/anomalousfootnote.ms 2023-08-22 11:03:33.406057509 -0500
+++ EXPERIMENTS/anomalousfootnote2.ms 2023-08-22 11:05:43.125646995 -0500
@@ -5,6 +5,8 @@
Footnote here*
.FS
* Footnote with 2-line equation
+.nr DD-old \n[DD]
+.nr DD 0
.EQ L
pile{
1 above
@@ -12,6 +14,7 @@
}
.EN
.FE
+.nr DD \n[DD-old]
.sp |45.2v
.nf
A
Observations:
1. Trying to fool with `nr` requests inside the _eqn_ region fails
dramatically, as one would expect.
2. Kinda sucks that you can't tell _eqn_ to sneak a request back to the
formatter.
3. If you want to prevent trailing vertical space from `DD` _after_ the
equation, you have to also prevent it before. There is no window between `EN`
and the beginning of _eqn_ input through which you can sneak an alteration of
`DD`.
So I guess our advice is: when using a footnote in a display, you may want to
save `DD` and temporarily set it zero (unless setting multiple adjacent
displays in the same footnote, in which case set `DD` to zero prior to the
last display. This will also eliminate the vertical space _before_ the
display, and if you want it you will have to demand it of the formatter
directly, using the saved value.
Thus:
$ diff -u EXPERIMENTS/anomalousfootnote.ms EXPERIMENTS/anomalousfootnote3.ms
--- EXPERIMENTS/anomalousfootnote.ms 2023-08-22 11:03:33.406057509 -0500
+++ EXPERIMENTS/anomalousfootnote3.ms 2023-08-22 11:13:45.452089940 -0500
@@ -5,6 +5,9 @@
Footnote here*
.FS
* Footnote with 2-line equation
+.nr DD-old \n[DD]
+.nr DD 0
+.sp \n[DD-old]u
.EQ L
pile{
1 above
@@ -12,6 +15,7 @@
}
.EN
.FE
+.nr DD \n[DD-old]
.sp |45.2v
.nf
A
In neither of my altered versions does a vacant footnote squat at the bottom
of page 2.
This seems like one of those topics for an "Intermediate _ms_ User's Guide".
Oh, good, you already added Doug to the CC list. Doug, what do you think? Am
I missing a trick?
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?64531>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/