bug-groff
[Top][All Lists]
Advanced

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

[bug #64013] [ms] EQ macro ignores second argument if first empty


From: G. Branden Robinson
Subject: [bug #64013] [ms] EQ macro ignores second argument if first empty
Date: Fri, 7 Apr 2023 21:40:19 -0400 (EDT)

Update of bug #64013 (project groff):

                  Status:               Postponed => In Progress            
         Planned Release:                  1.24.0 => None                   

    _______________________________________________________

Follow-up Comment #2:

In my branch for pushing next week.


diff --git a/tmac/s.tmac b/tmac/s.tmac
index 6870656b1..7a6ec8283 100644
--- a/tmac/s.tmac
+++ b/tmac/s.tmac
@@ -1885,15 +1885,20 @@ along with this program.  If not, see
<http://www.gnu.org/licenses/>.
 .if \\n[tbl@within-table] \
 .      @error .EQ is not allowed within a .TS/.TE table
 .br
+.nr eqn*type -1
 .ds eqn*num "\\$2
-.ie '\\$1'L' .nr eqn*type 0
-.el \{\
-.      ie '\\$1'I' .nr eqn*type 1
-.      el \{\
-.              nr eqn*type 2
-.              if !'\\$1'C' .ds eqn*num "\\$1
+.if '\\$1'L' .nr eqn*type 0
+.if '\\$1'I' .nr eqn*type 1
+.if '\\$1'C' .nr eqn*type 2
+.ie (\\n[eqn*type] < 0) \{\
+.      ie (\\n[.$] = 1) .if !'\\$1'' \{\
+.              ds eqn*msg .EQ: unrecognized alignment '\\$1';
+.              as eqn*msg " assuming it is an equation label
+.              @warning \\*[eqn*msg]
+.              ds eqn*num "\\$1
+.              rm eqn*msg
 .      \}
-.\}
+.el .if !'\\$1'' .@error .EQ: unrecognized alignment '\\$1'
 .di eqn*div
 .in 0
 .if '\*(.T'html' \{\




    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?64013>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/




reply via email to

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