[groff] 01/01: [mom]: More housekeeping

2025-03-17 Thread Peter Schaffter
PTPi pushed a commit to branch master
in repository groff.

commit 7d9632c02535ee7ed8ad2182e4f2b7ca52f646f4
Author: Peter Schaffter 
AuthorDate: Mon Mar 17 13:52:48 2025 -0400

[mom]: More housekeeping

* Corrects float caption spacing
* Ensures captions go into the requested List of ...
* Fixes LISTS_STYLE TITLE_QUAD CENTER (was setting titles quad
  right)
* Corrects missing TITLE_QUAD arg to TOC_HEADER_STYLE
* Makes TOC header placement more robust
* Corrects TYPEWRITE spacing after TOC header
* Enforces non-adjusted leading as the value passed to TRAPS
---
 contrib/mom/BUGS|  9 +-
 contrib/mom/om.tmac | 81 +++--
 2 files changed, 56 insertions(+), 34 deletions(-)

diff --git a/contrib/mom/BUGS b/contrib/mom/BUGS
index c01954f89..276edaf63 100644
--- a/contrib/mom/BUGS
+++ b/contrib/mom/BUGS
@@ -23,9 +23,16 @@ the Subject line or you risk my spam filters nuking your 
message.
 
 Version 2.6_d
 =
-PDF_IMAGE after only one line text after START is moves the image to
+FLOAT captions not going into selected List of ...
+---Fixed---
+
+'LISTS_STYLE TITLE_QUAD CENTER' setting titles quad right.
+---Fixed---
+
+PDF_IMAGE after only one line text after START moves the image to
 the next page.
 ---Fixed---
+
 Some graphical objects not recognising colours initialized with
 .XCOLOR.
 ---Fixed---
diff --git a/contrib/mom/om.tmac b/contrib/mom/om.tmac
index dbf67d75e..619da9851 100644
--- a/contrib/mom/om.tmac
+++ b/contrib/mom/om.tmac
@@ -1477,7 +1477,7 @@ end
 .\" The QUAD in PP adds an unwanted linespace after a HEADING at the
 .\" top of a pdf box because of this .br, so HEADING assigns the
 .\" tmp register "bx-top\n[stack]" to inhibit it.
-.ie !\\n[pdfbx-top\\n[stack]] 'br
+.ie !\\n[pdfbx-top\\n[stack]] .if !\\n[#TOC] .br
 .el .rr pdfbx-top\\n[stack]
 .if \\n[#COVERTEXT_PP] \
 .   ds $RESTORE_DOC_QUAD \\*[$QUAD_VALUE]
@@ -5745,6 +5745,11 @@ SMALLCAPS takes precedence.
 .  el .\\*[$STYLE_TYPE]_QUAD \\$1
 .  shift
 .   \}
+.   if '\\$1'TITLE_QUAD' \{\
+.  shift
+.  \\*[$STYLE_TYPE]_QUAD \\$1
+.  shift
+.   \}
 .   if '\\$1'INDENT' \{\
 .  shift
 .  \\*[$STYLE_TYPE]_INDENT \\$1
@@ -5980,16 +5985,16 @@ SMALLCAPS takes precedence.
 . HEADER_MARGIN \\n[#HEADER_MARGIN]
 . HEADER_GAP \\n[#HEADER_GAP]
 .  \}
-.  el .if !r #T_MARGIN .T_MARGIN 6P
+.  el .if !\\n[#T_MARGIN] .T_MARGIN 6P
 .   \}
 .\}
-.if !r #T_MARGIN \
+.if !\\n[#T_MARGIN] \
 .   T_MARGIN \\n[#HEADER_MARGIN]+\\n[#HEADER_GAP]
 .if !r #DOCHEADER_ADVANCE \
 .   nr #DOCHEADER_ADVANCE \\n[#T_MARGIN]
 .if !r #FOOTER_MARGIN .FOOTER_MARGIN 3P
 .if !r #FOOTER_GAP.FOOTER_GAP 3P
-.if !r #B_MARGIN \
+.if !\\n[#B_MARGIN] \
 .   B_MARGIN \\n[#FOOTER_MARGIN]u+\\n[#FOOTER_GAP]u
 .if !\\n[#HEADER_RULE_GAP] .HEADER_RULE_GAP 4p
 .if !\\n[#FOOTER_RULE_GAP] .FOOTER_RULE_GAP 4p
@@ -6716,7 +6721,7 @@ SMALLCAPS takes precedence.
 .   substring $\\*[$CALLING_MACRO]_QUAD 0 0
 .   if '\\*[$\\*[$CALLING_MACRO]_QUAD]'L' .LEFT
 .   if '\\*[$\\*[$CALLING_MACRO]_QUAD]'C' .CENTER
-.   if '\\*[$\\*[$CALLING_MACRO]_QUAD]'C' .RIGHT
+.   if '\\*[$\\*[$CALLING_MACRO]_QUAD]'R' .RIGHT
 .\}
 .el .CENTER
 .END
@@ -8165,7 +8170,7 @@ $\\*[DOC_]COVERTITLE_\\n+[#\\*[DOC_]COVERTITLE_NUM] 
\\$\\n[#\\*[DOC_]COVERTITLE_
 .   PP
 .   PARA_INDENT \\n[#STORED_PP_INDENT]u
 .   rr #STORED_PP_INDENT
-.   ie r #ADVANCE_FROM_TOP \{\
+.   ie \\n[#ADVANCE_FROM_TOP] \{\
 .  br
 .  sp |\\n[#ADVANCE_FROM_TOP]u-1v
 .  if \\n[#ADJ_DOC_LEAD]=1 \
@@ -8529,6 +8534,7 @@ $\\*[DOC_]COVERTITLE_\\n+[#\\*[DOC_]COVERTITLE_NUM] 
\\$\\n[#\\*[DOC_]COVERTITLE_
 .   rr #DOC_AUTOLEAD
 .   rr #DOC_AUTOLEAD_FACTOR
 .   nr #DOC_LEAD \\n[.v]
+.   if '\\$2'ADJUST' .TRAPS
 .\}
 .nr #RESET_TRAPS 1
 .if !\\n[#ADJ_DOC_LEAD] .nr #REMOVE_ADJ 1
@@ -16299,11 +16305,9 @@ EN-\\n[#CH_NUM]\\n[#EN_NUMBER]-body 
\s-2\v'-\\n[#DOC_LEAD]u/7u'\\n[#EN_NUMBER]\|
 .   TRAPS
 .\}
 .el .DOC_LEAD \\*[$TOC_LEAD]
-.if '\\*[.T]'ps'  .nr #SPACE_CORRECTION 1
-.if '\\*[.T]'pdf' .nr #SPACE_CORRECTION 2
 .ie \\n[#TOC_HEADER_V_POS] \
 .   DOCHEADER OFF \\n[#TOC_HEADER_V_POS]u-\\n[#DOC_LEAD]u
-.el .DOCHEADER OFF 
\\n[#T_MARGIN]u-(\\n[#DOC_LEAD]u*\\n[#SPACE_CORRECTION]u)
+.el .DOCHEADER OFF
 .if (\\n[#PRINT_STYLE]=1)&(\\n[#SINGLE_SPACE]=1) \
 .   DOCHEADER OFF \\n[#T_MARGIN]u-(\\n[#DOC_LEAD]u*2u)
 .START
@@ -16319,6 +16323,7 @@ EN-\\n[#CH_NUM]\\n[#EN_NUMBER]-body 
\s-2\v'-\\n[#DOC_LEAD]u/7u'\\n[#EN_NUMBER]\|
 .QUAD \\*[$TOC_HEADER_QUAD]
 .if \\n[#TOC_STRING_CAPS] .CAPS
 .if \\n[#TOC_STRING_SMALLCAPS] .SMALLCAPS
+.sp |\\n[#T_MARGIN]u-1v
 .if \\n[#PRINT_STYLE]=1 \
 .   UNDERSCORE 3p "\\*[$TOC_HEADER_STRI

[groff] 01/01: [mom]: Emend docs

2025-03-17 Thread Peter Schaffter
PTPi pushed a commit to branch master
in repository groff.

commit a62ae06b11f1ad6d932dc3a575cb640954d03890
Author: Peter Schaffter 
AuthorDate: Mon Mar 17 13:54:40 2025 -0400

[mom]: Emend docs
---
 contrib/mom/momdoc/images.html  | 19 ---
 contrib/mom/momdoc/typesetting.html | 17 -
 2 files changed, 36 deletions(-)

diff --git a/contrib/mom/momdoc/images.html b/contrib/mom/momdoc/images.html
index 860223f4d..496ea82f2 100644
--- a/contrib/mom/momdoc/images.html
+++ b/contrib/mom/momdoc/images.html
@@ -1199,25 +1199,6 @@ and follow it with the text of the caption surrounded by 
double-quotes:
   .FLOAT
   .CAPTION "Caption at top of float"
 
-CAPTION can take multiple string arguments, allowing for
-captions that run to several lines.  There is a caveat: the strings
-are not automatically broken into individual lines.  You must
-provide strings that include literal breaks or spaces:
-
-
-  .FLOAT
-  .CAPTION "Caption" ".BR" "at top" ".BR" "of float"
-
-or, easier to read:
-
-
-  .FLOAT
-  .CAPTION "Caption" \
-  ".BR" \
-  "at top" \
-  ".BR" \
-  "of float"
-
 If you want a caption at the bottom, put CAPTION immediately
 before ending the float:
 
diff --git a/contrib/mom/momdoc/typesetting.html 
b/contrib/mom/momdoc/typesetting.html
index cc2d8c85b..1a1ab3be8 100644
--- a/contrib/mom/momdoc/typesetting.html
+++ b/contrib/mom/momdoc/typesetting.html
@@ -1122,23 +1122,6 @@ The size of type can also be changed inline.  See
 Inline Escapes, changing point size.
 
 
-
-
-Note: It is unfortunate that the
-pic preprocessor has already taken the name,
-PS, and thus mom’s macro for setting point
-sizes can’t use it.  However, if you aren’t using
-pic, you might want to
-alias
-PT_SIZE as PS, since there’d be no conflict.  For example
-
-
-  .ALIAS PS PT_SIZE
-
-would allow you to set point sizes with .PS.
-
-
-
 
 
 

___
groff-commit mailing list
groff-commit@gnu.org
https://lists.gnu.org/mailman/listinfo/groff-commit