On 03.10.24 23:21, G. Branden Robinson wrote:
At 2024-10-03T23:06:18+0200, joerg van den hoff wrote:
table of content when using ms macros (wide entries failing to line
break and "pushing" the page number out of line to the right instead).
I cannot say, however, whether this is a 1.23-related issue or whether
it just has escaped my attention previously (would have to revert to
1.22 to check, no time right now etc.).
A sample document that reproduces this issue would be really helpful.
attached is an example. I tried to condense it and reduce those MHEAD,SHEAD macros to a minimum
(they are doing more in my actual setup). so the missing SN numbers in the resulting TOC in this
example are not a bug :).
the example should be reproducible on A4 paper (otherwise play around with point size to trigger the
bug(s)). document should be formatted with something like
groff -ms -Tps (or -Tpdf).
to summarize the issues:
1.
the most serious one is misalignment of page number column for entries which are long but seemingly
fail to line break early enough. there are also instances where the line break just occurs too late
w/o causing page number column misalignment (this seems to be the case when no
further ruler char
creeps in).
2.
a related issue it seems is long entries which just fit into the line w/o misaligning the page
number but where ruler chars are still inserted and partly, in fact, overlap with last char from the
preceding text. possibly this is the main issue for (1) and (2): emitting one too many ruler chars
beyond end-of-ruler in other entries (plus too late line breaking).
3.
very long entries trigger line breaks but second line does not honour indent of first line. this is
IIRC probably not a regression but has "always" happened.
issues 1) and 2) above I can not remember to have seen previously (in my actual 150p document which
I have maintained for 25 years) so my suspicion would be that it is a regression. but I might be wrong.
HTH,
joerg
It could form the basis of a regression test; we have about 220 of those
now, 217 of which I wrote. Their reason for being is to prevent the
sorts of problems you and Deri are concerned about.
Regards,
Branden
.ds FAM T
.nr PS 15700
.nr VS \n(PS+4p
.de MHEAD
.\"------
.XS
.ta 2n 4n 6n 8n 10n 12n 14n 16n 18n
.sp 1v
.ds spacer \h'1n'
.ie '\\*[SN-STYLE]'' \fB\\$1\fP
.el \fB\\*[SN-STYLE]\t\\*[spacer]\\$1\fP
.XE
..
.de SHEAD
.XS
.ta 2n 4n 6n 8n 10n 12n 14n 16n 18n
.ds pxoff
.ds spacer \h'1n'
.ie (\\$1 == 0) \\$2
.el \\*[SN-STYLE]\t\\*[pxoff]\\*[spacer]\\$2
.XE
..
.LP
.ce
TOC bugs
.LP
Example of issues with alignment in TOC when using the .PX macro from the ms
package. Effects depend of course on font, fontsize, papersize and hyphenation
details. The present example should at least be reproducible on A4 paper with
standard font (times roman) and base point size 15700. Current font family and
pointsize is:
.DS
FAM: \*[FAM]
PS: \n(PS
.DE
.MHEAD "Chapter whatever
.SHEAD 2 "long entry not honouring indent after line break as one can see: foo
bar baz foo bar baz
.SHEAD 2 "this entry fails to line break but instead pushes numbers to the right
.SHEAD 2 "short and good entry
.SHEAD 2 "long entry not honouring indent after line breaking. the word
'elaboration' seem hyphenated to late, too (hyphenation aligned with page
numbers)
.SHEAD 2 "short and good entry
.SHEAD 2 "the next entry below shows additional problem of spurious ruler
(single dot) way to close to preceding text
.SHEAD 2 "Distributed Model als unendlich-dimensionales Kompartmentmodell
.SHEAD 2 "short and good entry
.MHEAD "Chapter whatever
.PX