groff-commit
[Top][All Lists]
Advanced

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

[groff] 01/01: [mom] Fixes handling of LINEBREAK at page transitions. Ad


From: Peter Schaffter
Subject: [groff] 01/01: [mom] Fixes handling of LINEBREAK at page transitions. Adds warning if input contains tbl(1) data but '-t' not given on the command line.
Date: Mon, 25 Jul 2022 17:15:30 -0400 (EDT)

PTPi pushed a commit to branch master
in repository groff.

commit 2f4432718c50ac6cd59491366fb470f0d92f87ba
Author: Peter Schaffter <peter@schaffter.ca>
AuthorDate: Mon Jul 25 14:51:53 2022 -0400

    [mom] Fixes handling of LINEBREAK at page transitions.
    Adds warning if input contains tbl(1) data but '-t' not given on the 
command line.
---
 contrib/mom/ChangeLog       |  5 +++++
 contrib/mom/momdoc/toc.html |  4 ++--
 contrib/mom/om.tmac         | 16 +++++++++++++---
 3 files changed, 20 insertions(+), 5 deletions(-)

diff --git a/contrib/mom/ChangeLog b/contrib/mom/ChangeLog
index f1e0470f..76ae030a 100644
--- a/contrib/mom/ChangeLog
+++ b/contrib/mom/ChangeLog
@@ -1,3 +1,8 @@
+2022-05-31
+
+       * Make mom emit a warning and abort when tbl(1) data present
+               without a corresponding -t on the command line.
+
 2022-05-20  G. Branden Robinson <g.branden.robinson@gmail.com>
 
        * momdoc/appendices.html: Reflect file rename in groff
diff --git a/contrib/mom/momdoc/toc.html b/contrib/mom/momdoc/toc.html
index ef6bcf44..7cd6a427 100644
--- a/contrib/mom/momdoc/toc.html
+++ b/contrib/mom/momdoc/toc.html
@@ -20,7 +20,7 @@ FDL in the main directory of the groff source package.
 
 <head>
   <meta http-equiv="content-type" content="text/html;charset=utf-8"/>
-  <title>Mom, version 2.5_a -- Table of Contents</title>
+  <title>Mom, version 2.5_b -- Table of Contents</title>
   <link rel="stylesheet" type="text/css" href="stylesheet.css" />
 </head>
 
@@ -31,7 +31,7 @@ FDL in the main directory of the groff source package.
 <div class="page">
 
   <div class="version">
-    mom, version 2.5_a
+    mom, version 2.5_b
   </div>
 
 <h1 class="toc" style="margin-top: 9px;">Table of Contents</h1>
diff --git a/contrib/mom/om.tmac b/contrib/mom/om.tmac
index f10e8910..f5a8d157 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_a
+Version 2.5_b
 -------------
 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_a
+.ds version 2.5_b
 .if dVERSION \{\
 .   ab [mom]: Version \*[version]
 .\}
@@ -11825,7 +11825,12 @@ Shimming must be disabled with NO_SHIM before using 
FLEX.
 \#
 .MAC LINEBREAK END
 .    if r #Q_AT_TOP .rr #Q_AT_TOP
-.    ie  '\\*[$LINEBREAK_CHAR]'' .sp 2
+.    if \\n[@TOP] .RESTORE_SPACE
+.    ie '\\*[$LINEBREAK_CHAR]'' \{\
+.       br
+.       nop \&
+.       sp
+.    \}
 .    el \{\
 .       ie \\n[#END_QUOTE] .
 .       el .sp
@@ -20586,6 +20591,11 @@ E\\R'#CAP_HEIGHT \\n[.cht]'
 .END
 \#
 .MAC TE END
+.    if !r TW \{\
+.       tm1 "[mom]: '\\n[.F]' contains tbl(1) data but '-t' flag is missing 
from
+.       tm1 "        the command line.
+.       ab Aborting.
+.    \}
 .    ev tbl*end \" Needed because of .ad changes
 .    evc \\*[ev-current] 
 .    nh



reply via email to

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