groff-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[groff] 01/01: [mom]: Fixes broken BLANKPAGE when columns are enabled.


From: Peter Schaffter
Subject: [groff] 01/01: [mom]: Fixes broken BLANKPAGE when columns are enabled.
Date: Sat, 6 Aug 2022 13:16:21 -0400 (EDT)

PTPi pushed a commit to branch master
in repository groff.

commit 04dd6ce2869d190f943b3c373b4dd3d4bf9e3efa
Author: Peter Schaffter <peter@schaffter.ca>
AuthorDate: Sat Aug 6 13:11:22 2022 -0400

    [mom]: Fixes broken BLANKPAGE when columns are enabled.
---
 contrib/mom/BUGS                     |  3 +++
 contrib/mom/momdoc/headfootpage.html | 12 +++++++-----
 contrib/mom/om.tmac                  | 15 ++++++++++++---
 3 files changed, 22 insertions(+), 8 deletions(-)

diff --git a/contrib/mom/BUGS b/contrib/mom/BUGS
index e18d1af28..2ab897425 100644
--- a/contrib/mom/BUGS
+++ b/contrib/mom/BUGS
@@ -23,6 +23,9 @@ the Subject line or you risk my spam filters nuking your 
message.
 
 Version 2.5_b
 =============
+BLANKPAGE broken when columns are enabled.
+---Fixed---
+
 Registers #FROM_COVERTITLE and #FROM_DOC_COVERTITLE not being
 cleared in macro COLLATE.
 ---Fixed---
diff --git a/contrib/mom/momdoc/headfootpage.html 
b/contrib/mom/momdoc/headfootpage.html
index 488bf0418..ee115f454 100644
--- a/contrib/mom/momdoc/headfootpage.html
+++ b/contrib/mom/momdoc/headfootpage.html
@@ -2296,11 +2296,13 @@ one blank page, you have to tell mom:
 <span class="pre-in-pp">
   .BLANKPAGE 1
 </span>
-The optional argument, <kbd>DIVIDER</kbd>, must be given if
-you&#8217;re inserting a blank page before the start of any new
-document section (i.e. a new chapter, or endnotes, a bibliography,
-or table of contents).  Without the <kbd>DIVIDER</kbd> argument, mom
-simply inserts the blank pages and prepares the next page to receive
+The optional argument <kbd>DIVIDER</kbd> must be given if
+you&#8217;re inserting a blank page before the start of major
+document sections (chapters, endnotes, bibliographies,
+or table of contents, provided the table of contents is not being
+<a href="tables-of-contents.html#auto-relocate-toc">autorelocated</a>.
+Without the <kbd>DIVIDER</kbd> argument, mom simply
+inserts the blank pages and prepares the next page to receive
 <a href="definitions.html#running">running text</a>.
 </p>
 
diff --git a/contrib/mom/om.tmac b/contrib/mom/om.tmac
index 0277e83c3..7b9e39652 100644
--- a/contrib/mom/om.tmac
+++ b/contrib/mom/om.tmac
@@ -467,7 +467,7 @@ end
 .    ie !\\n[#DOCS]=1 \
 .       if \\n[#B_MARGIN_SET]=1 .DO_B_MARGIN
 .    el \{\
-.       if \\n[#COLUMNS]=1 .nr #COL_NUM \\n[#NUM_COLS]
+.       if (\\n[#COLUMNS]=1):(\\n[#COLUMNS]=2) .nr #COL_NUM \\n[#NUM_COLS]
 .       if !\\n[#FN_DEPTH] \{\
 .          ch FN_OVERFLOW_TRAP
 .          nr #RESET_FN_OVERFLOW_TRAP 1
@@ -10545,7 +10545,10 @@ Shimming must be disabled with NO_SHIM before using 
FLEX.
 .    \}
 .    nr @TOP 1
 .    ie \\n[#COLUMNS]=1 \{\
-.       ie (\\n[#COL_NUM]=\\n[#NUM_COLS]):(\\n[#NEWPAGE]=1) .DO_FOOTER
+.       ie (\\n[#COL_NUM]=\\n[#NUM_COLS]):(\\n[#NEWPAGE]=1) \{\
+.          rr #NEWPAGE
+.          DO_FOOTER
+.       \}
 .       el \{\
 .          ie (\\n[#ENDNOTES]=1):(\\n[#BIBLIOGRAPHY]=1) \{\
 .             if \\n[#ENDNOTES] .sp |\\n[ec]u-\\n[#EN_LEAD]u
@@ -17359,6 +17362,7 @@ E\\R'#CAP_HEIGHT \\n[.cht]'
 .          nr #RESTORE_PN_V_POS \\n[#PAGE_NUM_V_POS]
 .          PAGINATION OFF
 .       \}
+.       if \\n[#COLUMNS]=1 .nr #COLUMNS +1
 .       NEWPAGE \" Break to blank page
 .       nop \&
 .       br
@@ -17373,7 +17377,8 @@ E\\R'#CAP_HEIGHT \\n[.cht]'
 .       \}
 .       if !'\\$1'DIVIDER' .if \\n[#HEADERS_WERE_ON] .HEADERS
 .    \}
-.    NEWPAGE
+.    if \\n[#COLUMNS]=2 .nr #COLUMNS -1
+.    NEWPAGE \" Break to text page
 .    ie '\\$1'DIVIDER' \{\
 .       if \\n[#BLANKPAGE_AFTER_DEFER] .bp
 .       if \\n[#FOOTERS_WERE_ON] .FOOTERS
@@ -17395,8 +17400,11 @@ E\\R'#CAP_HEIGHT \\n[.cht]'
 .       \}
 .       if '\\$1'NULL' \{\
 .          if \\n[#FOOTERS_WERE_ON] .FOOTERS
+.          if \\n[#RESTORE_PN_V_POS]=2 \
+.             nr #PAGE_NUM_V_POS \\n[#RESTORE_PN_V_POS]
 .          if \\n[#PAGE_NUM_V_POS]=2 \
 .             if \\n[#PAGINATE_WAS_ON] .PAGINATE
+.          nr #PAGE_NUM_ADJ -\\n[#HOW_MANY]
 .       \}
 .    \}
 .    if \\n[#PAGINATE]=1 \
@@ -17410,6 +17418,7 @@ E\\R'#CAP_HEIGHT \\n[.cht]'
 .    rr #HEADERS_WERE_ON
 .    rr #FOOTERS_WERE_ON
 .    rr #PAGINATE_WAS_ON
+.    rr #RESTORE_PN_V_POS
 .END
 \#
 \# FLOATS



reply via email to

[Prev in Thread] Current Thread [Next in Thread]