groff-commit
[Top][All Lists]
Advanced

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

[Groff-commit] groff ChangeLog src/preproc/eqn/eqn.man src/pre...


From: Werner LEMBERG
Subject: [Groff-commit] groff ChangeLog src/preproc/eqn/eqn.man src/pre...
Date: Mon, 07 Jan 2013 08:54:28 +0000

CVSROOT:        /cvsroot/groff
Module name:    groff
Changes by:     Werner LEMBERG <wl>     13/01/07 08:54:28

Modified files:
        .              : ChangeLog 
        src/preproc/eqn: eqn.man 
        src/preproc/tbl: table.cpp tbl.man 

Log message:
        [tbl] Allow characters #, `, and ' as eqn delimiters.
        
        While problems ` and ' have been unintentionally introduced rather
        recently, the limitation regarding # was there from the beginning. 
        
        At the same time, fix a small bug causing `.lf' requests not
        starting a line.
        
        * src/preproc/tbl/table.cpp (table::init_output,
        table::compute_expand_width, table::compute_separation_factor,
        table::define_bottom_macro, table::do_bottom): Temporarily switch
        off eqn delimiters, wrapping the code into a `.ig' block.  This uses
        the new functionality just added to eqn.
        
        * src/preproc/eqn/eqn.man, src/preproc/tbl/tbl.man: Updated.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/groff/ChangeLog?cvsroot=groff&r1=1.1373&r2=1.1374
http://cvs.savannah.gnu.org/viewcvs/groff/src/preproc/eqn/eqn.man?cvsroot=groff&r1=1.21&r2=1.22
http://cvs.savannah.gnu.org/viewcvs/groff/src/preproc/tbl/table.cpp?cvsroot=groff&r1=1.23&r2=1.24
http://cvs.savannah.gnu.org/viewcvs/groff/src/preproc/tbl/tbl.man?cvsroot=groff&r1=1.34&r2=1.35

Patches:
Index: ChangeLog
===================================================================
RCS file: /cvsroot/groff/groff/ChangeLog,v
retrieving revision 1.1373
retrieving revision 1.1374
diff -u -b -r1.1373 -r1.1374
--- ChangeLog   7 Jan 2013 08:41:22 -0000       1.1373
+++ ChangeLog   7 Jan 2013 08:54:28 -0000       1.1374
@@ -1,3 +1,21 @@
+2013-01-07  Werner LEMBERG  <address@hidden>
+
+       [tbl] Allow characters #, `, and ' as eqn delimiters.
+
+       While problems ` and ' have been unintentionally introduced rather
+       recently, the limitation regarding # was there from the beginning. 
+
+       At the same time, fix a small bug causing `.lf' requests not
+       starting a line.
+
+       * src/preproc/tbl/table.cpp (table::init_output,
+       table::compute_expand_width, table::compute_separation_factor,
+       table::define_bottom_macro, table::do_bottom): Temporarily switch
+       off eqn delimiters, wrapping the code into a `.ig' block.  This uses
+       the new functionality just added to eqn.
+
+       * src/preproc/eqn/eqn.man, src/preproc/tbl/tbl.man: Updated.
+
 2013-01-06  Werner LEMBERG  <address@hidden>
 
        [eqn] Add `delim on'.

Index: src/preproc/eqn/eqn.man
===================================================================
RCS file: /cvsroot/groff/groff/src/preproc/eqn/eqn.man,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -b -r1.21 -r1.22
--- src/preproc/eqn/eqn.man     6 Jan 2013 21:59:21 -0000       1.21
+++ src/preproc/eqn/eqn.man     7 Jan 2013 08:54:28 -0000       1.22
@@ -1187,17 +1187,6 @@
 causes a character to be set in roman type.
 .
 .
-.SH "INTERACTION WITH @address@hidden"
-It is not advisable to use the hash character (#) as a delimiter for in-line
-equations in
-.B eqn
-since
-.BR @address@hidden (@MAN1EXT@)
-uses a macro called
-.BR .T# ,
-causing a clash.
-.
-.
 .SH FILES
 .Tp \w'address@hidden@/eqnrc'u+2n
 .B @MACRODIR@/eqnrc

Index: src/preproc/tbl/table.cpp
===================================================================
RCS file: /cvsroot/groff/groff/src/preproc/tbl/table.cpp,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -b -r1.23 -r1.24
--- src/preproc/tbl/table.cpp   20 Jul 2011 18:44:50 -0000      1.23
+++ src/preproc/tbl/table.cpp   7 Jan 2013 08:54:28 -0000       1.24
@@ -1819,6 +1819,12 @@
           ".in 0\n"
           ".\\}\n"
           "..\n"
+          // protect # in macro name against eqn
+          ".ig\n"
+          ".EQ\n"
+          "delim off\n"
+          ".EN\n"
+          "..\n"
           ".de " RELEASE_MACRO_NAME "\n"
           ".if \\n[" SECTION_DIVERSION_FLAG_REG "] \\{"
           ".di\n"
@@ -1850,6 +1856,11 @@
           ".rm " SECTION_DIVERSION_NAME "\n"
           ".\\}\n"
           "..\n"
+          ".ig\n"
+          ".EQ\n"
+          "delim on\n"
+          ".EN\n"
+          "..\n"
           ".nr " TABLE_DIVERSION_FLAG_REG " 0\n"
           ".de " TABLE_KEEP_MACRO_NAME "\n"
           ".if '\\n[.z]'' \\{"
@@ -2113,12 +2124,24 @@
   if (total_separation)
     printfs("-%1n", as_string(total_separation));
   prints("\n");
-  prints(".if \\n[" EXPAND_REG "]<0 \\{");
+  prints(".if \\n[" EXPAND_REG "]<0 \\{\\\n");
   entry_list->set_location();
-  if (!(flags & NOWARN))
+  if (!(flags & NOWARN)) {
+    // protect ` and ' in warning message against eqn
+    prints(".ig\n"
+          ".EQ\n"
+          "delim off\n"
+          ".EN\n"
+          "..\n");
     prints(".tm1 \"warning: file `\\n[.F]', around line \\n[.c]:\n"
-          ".tm1 \"  table wider than line width\n"
-          ".nr " EXPAND_REG " 0\n");
+          ".tm1 \"  table wider than line width\n");
+    prints(".ig\n"
+          ".EQ\n"
+          "delim on\n"
+          ".EN\n"
+          "..\n");
+    prints(".nr " EXPAND_REG " 0\n");
+  }
   prints(".\\}\n");
   if (colcount > 1)
     printfs(".nr " EXPAND_REG " \\n[" EXPAND_REG "]/%1\n",
@@ -2153,18 +2176,31 @@
   for (int i = 0; i < ncolumns; i++)
     printfs("-\\n[%1]", span_width_reg(i, i));
   printfs("/%1\n", as_string(total_separation));
-  prints(".ie \\n[" SEPARATION_FACTOR_REG "]<=0 \\{");
+  prints(".ie \\n[" SEPARATION_FACTOR_REG "]<=0 \\{\\\n");
   entry_list->set_location();
-  if (!(flags & NOWARN))
+  if (!(flags & NOWARN)) {
+    // protect ` and ' in warning message against eqn
+    prints(".ig\n"
+          ".EQ\n"
+          "delim off\n"
+          ".EN\n"
+          "..\n");
     prints(".tm1 \"warning: file `\\n[.F]', around line \\n[.c]:\n"
           ".tm1 \"  column separation set to zero\n"
           ".nr " SEPARATION_FACTOR_REG " 0\n");
+  }
   prints(".\\}\n"
-        ".el .if \\n[" SEPARATION_FACTOR_REG "]<1n \\{");
+        ".el .if \\n[" SEPARATION_FACTOR_REG "]<1n \\{\\\n");
   entry_list->set_location();
-  if (!(flags & NOWARN))
+  if (!(flags & NOWARN)) {
     prints(".tm1 \"warning: file `\\n[.F]', around line \\n[.c]:\n"
           ".tm1 \"  table squeezed horizontally to fit line length\n");
+    prints(".ig\n"
+          ".EQ\n"
+          "delim on\n"
+          ".EN\n"
+          "..\n");
+  }
   prints(".\\}\n");
 }
 
@@ -2602,6 +2638,12 @@
 void table::define_bottom_macro()
 {
   prints(".eo\n"
+        // protect # in macro name against eqn
+        ".ig\n"
+        ".EQ\n"
+        "delim off\n"
+        ".EN\n"
+        "..\n"
         ".de T#\n"
         ".if !\\n[" SUPPRESS_BOTTOM_REG "] \\{"
         "." REPEATED_VPT_MACRO " 0\n"
@@ -2636,6 +2678,11 @@
         "." REPEATED_VPT_MACRO " 1\n"
         ".\\}\n"
         "..\n"
+        ".ig\n"
+        ".EQ\n"
+        "delim on\n"
+        ".EN\n"
+        "..\n"
         ".ec\n");
 }
 
@@ -2882,7 +2929,18 @@
   printfs(".mk %1\n", row_top_reg(nrows));
   prints(".nr " NEED_BOTTOM_RULE_REG " 1\n"
         ".nr T. 1\n"
-        ".T#\n");
+        // protect # in macro name against eqn
+        ".ig\n"
+        ".EQ\n"
+        "delim off\n"
+        ".EN\n"
+        "..\n"
+        ".T#\n"
+        ".ig\n"
+        ".EQ\n"
+        "delim on\n"
+        ".EN\n"
+        "..\n");
   if (!(flags & NOKEEP) && (flags & (BOX | DOUBLEBOX | ALLBOX)))
     prints("." TABLE_RELEASE_MACRO_NAME "\n");
   else

Index: src/preproc/tbl/tbl.man
===================================================================
RCS file: /cvsroot/groff/groff/src/preproc/tbl/tbl.man,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -b -r1.34 -r1.35
--- src/preproc/tbl/tbl.man     11 Sep 2012 18:03:29 -0000      1.34
+++ src/preproc/tbl/tbl.man     7 Jan 2013 08:54:28 -0000       1.35
@@ -1,6 +1,6 @@
 '\" t
 .ig
-Copyright (C) 1989-1995, 2001-2004, 2006-2012
+Copyright (C) 1989-1995, 2001-2004, 2006-2013
   Free Software Foundation, Inc.
 
 Permission is granted to make and distribute verbatim copies of
@@ -742,16 +742,6 @@
 .RB ( groff (@MAN1EXT@)
 automatically takes care of the correct order of preprocessors).
 .
-.LP
-It is not advisable to use the hash character (#) as a delimiter for in-line
-equations in
-.BR @address@hidden (@MAN1EXT@)
-since
-.B @address@hidden
-uses a macro called
-.BR .T# ,
-causing a clash.
-.
 .
 .SH "GNU TBL ENHANCEMENTS"
 There is no limit on the number of columns in a table, nor any limit on the



reply via email to

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