[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug #61675] [me] troff warns if footnote separator wider than column
From: |
G. Branden Robinson |
Subject: |
[bug #61675] [me] troff warns if footnote separator wider than column |
Date: |
Tue, 14 Dec 2021 18:42:37 -0500 (EST) |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0 |
URL:
<https://savannah.gnu.org/bugs/?61675>
Summary: [me] troff warns if footnote separator wider than
column
Project: GNU troff
Submitted by: gbranden
Submitted on: Tue 14 Dec 2021 11:42:35 PM UTC
Category: Macro - me
Severity: 3 - Normal
Item Group: Warning/Suspicious behaviour
Status: In Progress
Privacy: Public
Assigned to: gbranden
Open/Closed: Open
Discussion Lock: Any
Planned Release: None
_______________________________________________________
Details:
This one is pretty simple. The `$s` macro draws a horizontal rule of 2i
without considering the possibility that the column width is shorter than
that.
Interestingly, what I thought _should_ have been a minimal reproducer didn't
work; apparently, I need the footnote separator to be drawn in a column after
the first to rouse the formatter's anger.
Input:
$ cat EXPERIMENTS/separatrix2.me
.if n .ll 65n
.de XX
.if \\$1 \{\
. nr N \\$1
. nr L \\$1
. af L A
. nop Jackdaws love my big sphinx of quartz\\nL.\c
. ie \\nN%11=0 \{\\**
. (f
. nop \\** Sometimes.
. )f
. \}
.el \" newline
.nr N -1
.XX \\nN
.\}
..
.2c 4n 3
.pp
.if n .XX 31
.if t .XX 43
groff 1.22.4 output:
$ nroff -me EXPERIMENTS/separatrix2.me |cat -s
troff: EXPERIMENTS/separatrix2.me:20: warning [p 1, 1.2i, div '|f', 0.0i]:
can't break line
Jackdaws love sphinx of quartzK.2
my big sphinx of Jackdaws love my
quartzAE. Jackdaws big sphinx of
love my big sphinx quartzJ. Jackdaws
of quartzAD. Jack‐ love my big sphinx
daws love my big of quartzI. Jack‐
sphinx of quartzAC. daws love my big
Jackdaws love my sphinx of quartzH.
big sphinx of Jackdaws love my
quartzAB. Jackdaws big sphinx of
love my big sphinx quartzG. Jackdaws
of quartzAA. Jack‐ love my big sphinx
daws love my big of quartzF. Jack‐
sphinx of quartzZ. daws love my big
Jackdaws love my sphinx of quartzE.
big sphinx of Jackdaws love my
quartzY. Jackdaws big sphinx of
love my big sphinx quartzD. Jackdaws
of quartzX. Jack‐ love my big sphinx
daws love my big of quartzC. Jack‐
sphinx of quartzW. daws love my big
Jackdaws love my sphinx of quartzB.
big sphinx of Jackdaws love my
quartzV.1 Jackdaws big sphinx of
love my big sphinx quartzA.
of quartzU. Jack‐
daws love my big
sphinx of quartzT.
Jackdaws love my
big sphinx of
quartzS. Jackdaws
love my big sphinx
of quartzR. Jack‐
daws love my big
sphinx of quartzQ.
Jackdaws love my
big sphinx of
quartzP. Jackdaws
love my big sphinx
of quartzO. Jack‐
daws love my big
sphinx of quartzN.
Jackdaws love my
big sphinx of
quartzM. Jackdaws
love my big sphinx
of quartzL. Jack‐ ____________________
daws love my big 2 Sometimes.
____________________
1 Sometimes.
(There are other problems with footnotes in multi-column mode; as can be seen
above, the bottom of the column retreats up the page. If you increase the
argument to the `XX` macro, you can observe this develop progressively across
all three columns. And on typesetters, the baselines of the columns don't
align--there's a sliver of extra space at the top of the second. These issues
are distinct and should be filed as separate tickets.)
The fix for this one appears straightforward.
@@ -1661,7 +1668,10 @@
. nr fp 8 \" footnote pointsize
.
.de $s \" $$$ footnote separator
-\l'2i'
+.nr __ 2i
+.if \\n($lu<\\n(__u .nr __ \\n($lu
+\l'\\n(__u'
+.rr __
..
.
.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?61675>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [bug #61675] [me] troff warns if footnote separator wider than column,
G. Branden Robinson <=