gbranden pushed a commit to branch master
in repository groff.
commit 574911a03119e53fee0447c0b8756130d310e0c9
Author: G. Branden Robinson <[email protected]>
AuthorDate: Mon Jul 20 23:38:32 2026 -0500
[ms]: Explain [HP]ORPHANS behavior more precisely.
---
doc/groff.texi.in | 21 +++++++++++++++++++--
doc/ms.ms.in | 27 +++++++++++++++++++++++++--
tmac/groff_ms.7.man | 21 +++++++++++++++++++++
3 files changed, 65 insertions(+), 4 deletions(-)
diff --git a/doc/groff.texi.in b/doc/groff.texi.in
index 67fa714b7..db646b04f 100644
--- a/doc/groff.texi.in
+++ b/doc/groff.texi.in
@@ -3590,7 +3590,14 @@ and there is insufficient space to accommodate
@code{PORPHANS}
lines before an automatic page break,
@code{groff} @file{ms}
-forces a page break before formatting the paragraph.
+forces a page break before formatting the paragraph.@footnote{Strictly,
+@code{groff} @file{ms}
+requires the equivalent vertical distance that would be required
+by
+@code{\n[PORPHANS]}
+lines of text set at the type size and vertical spacing
+configured at the time the document calls the paragraphing macro,
+plus one vertical motion quantum.}
This is a GNU extension.
Effective: next paragraph.
@@ -3631,7 +3638,17 @@ that must be kept on the same page as a section heading.
If insufficient space remains on the current page
to accommodate the heading and this number of lines of paragraph text,
@code{groff} @file{ms}
-forces a page break before setting the heading.
+forces a page break before setting the heading.@footnote{Strictly,
+@code{groff} @file{ms}
+requires the equivalent vertical distance that would be required
+by the heading itself
+plus the inter-paragraph distance
+@code{\n[PD]}
+and
+@code{\n[HORPHANS}
+lines of text set at the type size and vertical spacing
+configured at the time the document calls the heading macro,
+plus one vertical motion quantum.}
Effective: next paragraph.
diff --git a/doc/ms.ms.in b/doc/ms.ms.in
index 9fc59c55c..7d8a913a2 100644
--- a/doc/ms.ms.in
+++ b/doc/ms.ms.in
@@ -1176,7 +1176,17 @@ and there is insufficient space to accommodate
.CW \[rs]n[PORPHANS]
lines before an automatic page break,
.I "groff ms"
-forces a page break before formatting the paragraph.
+forces a page break before formatting the paragraph.\**
+.FS
+Strictly,
+.I "groff ms"
+requires the equivalent vertical distance that would be required
+by
+.CW \[rs]n[PORPHANS]
+lines of text set at the type size and vertical spacing
+configured at the time the document calls the paragraphing macro,
+plus one vertical motion quantum.
+.FE
.
This is a GNU extension.
.
@@ -1659,7 +1669,20 @@ that must be kept on the same page as a section heading.
If insufficient space remains on the current page
to accommodate the heading and this number of lines of paragraph text,
.I "groff ms"
-forces a page break before setting the heading.
+forces a page break before setting the heading.\**
+.FS
+Strictly,
+.I "groff ms"
+requires the equivalent vertical distance that would be required
+by the heading itself
+plus the inter-paragraph distance
+.CW \[rs]n[PD]
+and
+.CW \[rs]n[HORPHANS]
+lines of text set at the type size and vertical spacing
+configured at the time the document calls the heading macro,
+plus one vertical motion quantum.
+.FE
.
Any display macro call or
.I tbl ,
diff --git a/tmac/groff_ms.7.man b/tmac/groff_ms.7.man
index f592f6d94..84723d569 100644
--- a/tmac/groff_ms.7.man
+++ b/tmac/groff_ms.7.man
@@ -755,6 +755,15 @@ lines before an automatic page break,
.I "groff ms"
forces a page break before formatting the paragraph.
.
+(Strictly,
+.I "groff ms"
+requires the equivalent vertical distance that would be required
+by
+.B \[rs]n[PORPHANS]
+lines of text set at the type size and vertical spacing
+configured at the time the document calls the paragraphing macro,
+plus one vertical motion quantum.)
+.
This is a GNU extension.
.
.
@@ -1079,6 +1088,18 @@ to accommodate the heading and this number of lines of
paragraph text,
.I "groff ms"
forces a page break before setting the heading.
.
+(Strictly,
+.I "groff ms"
+requires the equivalent vertical distance that would be required
+by the heading itself
+plus the inter-paragraph distance
+.B \[rs]n[PD]
+and
+.B \[rs]n[HORPHANS]
+lines of text set at the type size and vertical spacing
+configured at the time the document calls the heading macro,
+plus one vertical motion quantum.)
+.
Any display macro call or
.IR tbl ,
.IR pic ,
_______________________________________________
groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit