groff-commit
[Top][All Lists]
Advanced

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

[groff] 01/01: [mom]: om.tmac: Fixes pagination, fixes nroff output inco


From: Peter Schaffter
Subject: [groff] 01/01: [mom]: om.tmac: Fixes pagination, fixes nroff output incompatibility
Date: Mon, 16 Jan 2023 09:57:57 -0500 (EST)

PTPi pushed a commit to branch master
in repository groff.

commit 6d6fb22cb10d1bfba618b2e75a59b8c59e764b5e
Author: Peter Schaffter <peter@schaffter.ca>
AuthorDate: Mon Jan 16 09:52:19 2023 -0500

    [mom]: om.tmac: Fixes pagination, fixes nroff output incompatibility
    
    If nroff is called on a file containing PRINTSTYLE TYPESET, abort
    with a warning the PRINTSTYLE TYPEWRITE must be used.
    
    Update BUGS, ChangeLog, NEWS
---
 contrib/mom/BUGS      |  9 ++++++---
 contrib/mom/ChangeLog | 19 ++++++++++++-------
 contrib/mom/NEWS      |  6 +++---
 contrib/mom/om.tmac   | 24 +++++++++++++++++++-----
 4 files changed, 40 insertions(+), 18 deletions(-)

diff --git a/contrib/mom/BUGS b/contrib/mom/BUGS
index 376b29b58..89b734a92 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
 =============
+PAGINATE not restoring page numbers after being disabled.
+---Fixed---
+
 Sentence space not being restored after a terminating REF.
 ---Fixed---
 
@@ -285,7 +288,7 @@ Forced floats not advancing on the page after output if the 
float is
 forced to the next page, causing running text to overprint.
 ---Fixed---
 
-Text after defered floats not being shimmed properly.
+Text after deferred floats not being shimmed properly.
 ---Fixed---
 
 Tables that span pages overprinting first two lines of table on new
@@ -401,7 +404,7 @@ Version 1.5-b
 Use of \E*[UC] and \E*[LC] inside strings for HDRFTR_RECTO and
 HDRFTR_VERSO breaking headers.
 ---Not fixable.  CAPS option added to HDRFTR_RECTO/VERSO to
-   accomodate situations where capitalized reserved
+   accommodate situations where capitalized reserved
    strings(\*[$TITLE], \*[$AUTHOR], etc) are desired.---
 
 COLLATE depositing a blank page if last output line before it falls
@@ -799,7 +802,7 @@ FOOTNOTE, whether in column mode or not, was using
 #FN_COUNT_FOR_COLS for all footnote markers and handling.
 ---Fixed---
 
-Deferred footnotes that occured on the second to last page of
+Deferred footnotes that occurred on the second to last page of
 documents not printing.
 ---Fixed---
 
diff --git a/contrib/mom/ChangeLog b/contrib/mom/ChangeLog
index 0701464a8..cc5494c62 100644
--- a/contrib/mom/ChangeLog
+++ b/contrib/mom/ChangeLog
@@ -1,3 +1,8 @@
+
+2023-01-16
+       * om.tac (PRINSTYLE): Abort with message if nroff is called on a
+       document using PRINTSTYLE TYPESET.
+
 2022-11-16
 
        * om.tmac (PAPER): Adjust #R_MARGIN to work with papersize.tmac.
@@ -103,7 +108,7 @@
 
        * templates added for setting up copyright pages
 
-       * updated mom.am to include the templates when buliding
+       * updated mom.am to include the templates when building
                pdfs in mom/examples
 
 2018-11-24
@@ -308,7 +313,7 @@
 
 * Thu Sep 20 2012
 
-       o Simplify enviroment handling.
+       o Simplify environment handling.
 
 * Fri Aug 31 2012
 
@@ -326,7 +331,7 @@
 
 * Thu Sep 8 2011
 
-       o Added register #SUBHEAD, analagous to #HEAD, to fix excessive
+       o Added register #SUBHEAD, analogous to #HEAD, to fix excessive
        spacing between SUBHEADs and SUBSUBHEADs.
 
 * Sun Feb 20 2011
@@ -1041,7 +1046,7 @@
        footnotes, both "normal" footnotes and footnotes that occur inside
        QUOTE, BLOCKQUOTE and EPIGRAPH.
 
-       o Addtion of font "styles" to om.tmac, plus changes to the FAMILY
+       o Addition of font "styles" to om.tmac, plus changes to the FAMILY
        and FT macros to manage them.  New section in the doc appendices
        on adding fonts and managing the new font styles.
 
@@ -1055,7 +1060,7 @@
        used in justified text.
 
        o NEWPAGE, which used to be an alias for .bp, has been moved into
-       its own macro, in order to make it more responsive to some unusal
+       its own macro, in order to make it more responsive to some unusual
        situations.
 
        o Some changes to elvis_syn.new, including that the file
@@ -1332,7 +1337,7 @@
 
        o Changed .ne in .HEAD when PRINTSTYLE TYPESET from 5 to 4.  With
        5, heads required at least 2 lines of text underneath or they'd be
-       defered to the next page, which created too much whitespace at the
+       deferred to the next page, which created too much whitespace at the
        end of the page.  Heads will now be processed on the same page if
        the head plus at least one line of text underneath fits.  I figure
        it's easier for the user to break to a new page manually if this
@@ -1656,7 +1661,7 @@
 
        o String tabs weren't working as advertised when set from within a
        tab.  Fixed.  Two new registers added: #ST_OFFSET and #IN_TAB.
-       String tabs now behave poperly and intuitively when set within
+       String tabs now behave properly and intuitively when set within
        tabs.
 
        o Added a note to docs about surrounding \w'...' escape with
diff --git a/contrib/mom/NEWS b/contrib/mom/NEWS
index 2279a90d9..d7cf82add 100644
--- a/contrib/mom/NEWS
+++ b/contrib/mom/NEWS
@@ -14,7 +14,7 @@ Releases 2.4 — 2.4-4_e
 General bug fix releases, with an overhaul of float, image, and
 pre-processor handling to correct inconsistencies in spacing,
 indents, labels, and captions.  Corrects page numbering issue in
-"Lists of..." when pre-processor material is floated and defered.
+"Lists of..." when pre-processor material is floated and deferred.
 
 Release 2.3
 -----------
@@ -184,7 +184,7 @@ cover or doc cover, as well as tell her whether to include 
covers
 and doc covers in the pagination scheme.
 
 The convenience macro, CODE, has been made more convenient.  A new
-control macro allows setting users' prefered fixed-width fonts.
+control macro allows setting users' preferred fixed-width fonts.
 Additionally, CODE can now be called inline.
 
 New inline escapes, \*[UC] and \*[LC], have been added to allow
@@ -260,7 +260,7 @@ Release 1.3-a
 -------------
 Bug fixes: First baseline of type wasn't going where it was supposed
 to when the docheader was turned off; fixes to errors in html
-formattting of docs.
+formatting of docs.
 
 Release 1.3
 -----------
diff --git a/contrib/mom/om.tmac b/contrib/mom/om.tmac
index 6cb69b2df..9c8649151 100644
--- a/contrib/mom/om.tmac
+++ b/contrib/mom/om.tmac
@@ -20,7 +20,7 @@ for more details.
 You should have received a copy of the GNU General Public License
 along with this program. If not, see <http://www.gnu.org/licenses/>.
 
-Version 2.5_b
+Version 2.5_c
 -------------
 Antoine de St-Exupéry asserted that elegance in engineering is
 achieved not when there is nothing left to add, but when there is
@@ -53,7 +53,7 @@ extensions, and float management).
 .if (\n[.x]\n[.y] < 118) \
 .   ab [mom]: You need GNU troff version 1.18 or higher to run this version of 
mom.
 \# Mom version
-.ds version 2.5_b
+.ds version 2.5_c
 .if dVERSION \{\
 .   ab [mom]: Version \*[version]
 .\}
@@ -4250,6 +4250,12 @@ y\R'#DESCENDER \\n[.cdp]'
 \#   Number registers: TYPEWRITE=1, TYPESET=2.
 \#
 .MAC PRINTSTYLE END
+.    if n \{\
+.       if '\\$1'TYPESET' \{\
+.         pl 1
+.         ab [mom]: Terminal output requires PRINTSTYLE TYPEWRITE.  Aborting.
+.       \}
+.    \}
 .    if !\\n[#COLLATE]=1 \{\
 .       if !d$PAPER \{\
 .          PAGELENGTH 11i
@@ -4956,7 +4962,8 @@ y\R'#DESCENDER \\n[.cdp]'
 \# *Function:
 \#   Creates strings and sets registers for document types.
 \# *Notes:
-\#   Number registers: DEFAULT=1, CHAPTER=2, NAMED=3, LETTER=4
+\#   Number registers: DEFAULT=1, CHAPTER=2, NAMED=3, LETTER=4,
+\#   SLIDES=5
 \#
 .MAC DOCTYPE END
 .    if '\\$1'DEFAULT' .nr #DOC_TYPE 1
@@ -5834,7 +5841,7 @@ SMALLCAPS takes precedence.
 .MAC DEFAULTS END
 .    if !\\n[#DOC_TYPE]=5 \{\
 .       ie !d $PAPER \{\
-.          PAGEWIDITH \\n[#PAGE_WIDTH]u
+.          PAGEWIDTH \\n[#PAGE_WIDTH]u
 .          PAGELENGTH \\n[.p]u
 .       \}
 .       el .PAPER \\*[$PAPER]
@@ -12971,9 +12978,16 @@ Shimming must be disabled with NO_SHIM before using 
FLEX.
 \#   Default is on.
 \#
 .MAC PAGINATE END
-.    ie '\\$1'' .nr #PAGINATE 1
+.    ie '\\$1'' \{\
+.       nr #PAGINATE 1
+.       if \\n[#SAVED_V_POS] \{\
+.          nr #PAGE_NUM_V_POS \\n[#SAVED_V_POS]
+.          rr #SAVED_V_POS
+.       \}
+.    \}
 .    el \{\
 .      nr #PAGINATE 0
+.      nr #SAVED_V_POS \\n[#PAGE_NUM_V_POS]
 .      rr #PAGE_NUM_V_POS
 .    \}
 .    if \\n[#HF_OFF]=1 \{\



reply via email to

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