[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
blank pages in UTP document (was: Regressions in UTP document)
From: |
G. Branden Robinson |
Subject: |
blank pages in UTP document (was: Regressions in UTP document) |
Date: |
Fri, 4 Oct 2024 19:00:18 -0500 |
Hi Deri,
Let me start a new thread for this topic.
At 2024-10-04T23:04:17+0100, Deri wrote:
> On Friday, 4 October 2024 20:21:13 BST G. Branden Robinson wrote:
> > At 2024-10-04T16:41:19+0100, Deri wrote:
> > > The fix in June did fix the original problem with page breaks in
> > > the FBDL document that MichaĆ was working on, but does not fix the
> > > problem with UTP.
> >
> > Okay. As noted earlier today, the latter problem is fixed now.
>
> In FBDL, but still causes the extra pages in UTP, any idea why?
The page counts seem to jump around. Rendering to PostScript using the
1.0 branch, I get the following:
utp_book_groff_1.22.4_539pp.ps
utp_book_groff_1.23.0_527pp.ps
utp_book_groff_1.23.0-2133_552.ps
So from 1.22.4 to 1.23.0, the page count drops by 12 pages, but in groff
Git HEAD it balloons back up by 25.
I didn't initially notice anything amiss because I interpreted you as
meaning that there were empty/blank pages piling up at the end of the
document, which I didn't (and don't) see in any of the foregoing--a
contentful final index page occurs in each case.
Putting the 1.23.0 and Git renderings side by side, leaping to the end
and scrolling backwards, it takes a while to find discrepancies. We see
occasional blank pages, but they occur in the same places, and in
reasonable spots; where chapter or chapter-like divisions of the text
occur, new ones are forced to recto pages as is conventional in
typesetting. (Our Texinfo manual, rendered by a completely independent
typesetting system, does the same thing.)
The page breaks are even in the same places, the conspicuous output line
numbers previously discussed withstanding.
Eventually, I see two blank pages before Appendix C, "Shell Command
Summary", p. 518 (#504) [groff 1.23.0-2133] and p. 496 (#483) [groff
1.23.0]. Something certainly seems to be off, as this makes this
appendix start on a verso page with groff Git.
But also, and extra weirdly, not only is there no blank page before
Appendix B, "Formatter Command Summary", but no page break at all before
it in the 1.23.0 version of the document, p. 467 (#455)! By contrast,
the Git rendering has this appendix starting on its own page at p. 488
(#474).[1]
I would claim that, tracking the development of groff from 1.23.0 to the
present, the placement of Appendix C is a regression (if not caused by
something hinky like invisible but explicit vertical space injected by
the document itself), but the placement of Appendix B is an improvement.
I'll investigate. I'm attaching all 3 exhibits in the meantime.
Meanwhile, I have an aside.[2]
Regards,
Branden
[1] Less happily, something is permitting a break between a display
caption above a table, and the subsequent table itself. Don't
know yet if that's a failure of this document to use "with keep" ms
display macros, or a bug in groff ms. Yet another item goes on the
queue...
[2] I notice that the UTP document ran afoul of this much-discussed[3]
and heavily NEWSed change in 1.23.0:
* Type size escape sequences of the form "\sNN", where NN is in the
range 10-39, are now recognized only in compatibility mode ("groff
-C"); when encountered, an error diagnostic is emitted. Otherwise,
"\sN" is interpreted as setting the type size to the single-digit
value N (in scaled points), which ends the escape sequence. This
change eliminates a quirk in the language grammar that dates back to
the mid-1970s (AT&T troff by Ossanna) but was not documented in the
Troff User's Manual until 1992 when Kernighan updated CSTR #54 for
device-independent AT&T troff.
The form "\s(NN" is accepted for two-digit sizes in all known troffs.
The form "\s[NNN]" accepts a numeric expression of variable length;
it has been supported by groff since version 1.01 (March 1991) or
earlier, by Heirloom Doctools troff since its 2005-08-16 release, and
by neatroff, but not by Plan 9 troff. The form "\s'NNN'" is also
widely supported.
Summary: in your documents, rewrite escape sequences beginning with
"\s1", "\s2", or "\s3" in an unambiguous and portable form. For
instance, "\s36" can become any of:
\s(36
\s[36]
\s'36'
You can use
grep '\\s[123]'
to find instances in your documents.
Those who have changed the escape character with the `ec` request
(an advanced usage) are expected to be able to cope; ask the
development team for support if you need it.
This causes all the chapter headings to set at 1-point type, which is
pretty unpleasant. The following change fixes it.
diff --git a/src/utp.mac b/src/utp.mac
index 889d924..ab40da9 100644
--- a/src/utp.mac
+++ b/src/utp.mac
@@ -255,12 +255,12 @@ Version of 16 November 2002
.\}
.el .ds chapter_type Chapter
.\" If there is a section number, output Type and section number
-.if !'\\$1'' \s14\fB\\*[chapter_type] \\$1\fP\s0
+.if !'\\$1'' \s(14\fB\\*[chapter_type] \\$1\fP\s0
.\" If there is no section number, but there is a type, then ouput it
-.if '\\$1'' .if !'\\$3'' \s14\fB\\*[chapter_type]\fP\s0
+.if '\\$1'' .if !'\\$3'' \s(14\fB\\*[chapter_type]\fP\s0
.sp 5p
.\" Print the section title if there is one
-\#.if !'\\$2'' \s14\fB\\$2\fP\s0
+\#.if !'\\$2'' \s(14\fB\\$2\fP\s0
.if !'\\$2'' \{\
.ps 14
.B
And another thing! When running make(1), the UTP project makes
alterations to checked-in files:
$ git status
[...]
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
modified: toc.t
modified: utp_ix.t
[...]
This is not idiomatic usage of Git. I would refactor the build process.
Possibly these two files need not be checked in at all. That certainly
_seems_ to be the case, as they are not re-read, but clobbered.
$ make
/usr/bin/groff -step -ms -rRef=1 ix.macro utp_book.t >/dev/null 2>utp.aux.tmp
mv utp.aux.tmp utp.aux
/usr/bin/awk -f toc.awk utp.aux >toc.t.tmp
[...]
mv toc.t.tmp toc.t
cd index && ./make.index ../utp.aux >../utp_ix.t.tmp
mv utp_ix.t.tmp utp_ix.t
[...]
[3] https://lists.gnu.org/archive/html/groff/2020-03/msg00054.html
https://lists.gnu.org/archive/html/groff/2020-03/msg00074.html
https://lists.gnu.org/archive/html/groff/2020-04/msg00002.html
https://lists.gnu.org/archive/html/groff/2020-04/msg00011.html
signature.asc
Description: PGP signature
- Re: Regressions in UTP document (was: removing the .IX macro from the ms package in 1.23 breaks old documents), (continued)
- Re: Regressions in UTP document (was: removing the .IX macro from the ms package in 1.23 breaks old documents), G. Branden Robinson, 2024/10/03
- Re: Regressions in UTP document (was: removing the .IX macro from the ms package in 1.23 breaks old documents), G. Branden Robinson, 2024/10/03
- Re: Regressions in UTP document (was: removing the .IX macro from the ms package in 1.23 breaks old documents), G. Branden Robinson, 2024/10/04
- Re: Regressions in UTP document (was: removing the .IX macro from the ms package in 1.23 breaks old documents), G. Branden Robinson, 2024/10/04
- Re: Regressions in UTP document (was: removing the .IX macro from the ms package in 1.23 breaks old documents), G. Branden Robinson, 2024/10/04
- Re: Regressions in UTP document (was: removing the .IX macro from the ms package in 1.23 breaks old documents), Deri, 2024/10/04
- Re: Regressions in UTP document (was: removing the .IX macro from the ms package in 1.23 breaks old documents), G. Branden Robinson, 2024/10/04
- Re: Regressions in UTP document (was: removing the .IX macro from the ms package in 1.23 breaks old documents), Dave Kemper, 2024/10/04
- when to deprecate and when to withdraw features (was: Regressions in UTP document), G. Branden Robinson, 2024/10/04
- Re: Regressions in UTP document (was: removing the .IX macro from the ms package in 1.23 breaks old documents), Deri, 2024/10/04
- blank pages in UTP document (was: Regressions in UTP document),
G. Branden Robinson <=
- Re: blank pages in UTP document (was: Regressions in UTP document), G. Branden Robinson, 2024/10/04
- Re: blank pages in UTP document (was: Regressions in UTP document), Dave Kemper, 2024/10/07
- Re: Regressions in UTP document, G. Branden Robinson, 2024/10/08