groff-commit
[Top][All Lists]
Advanced

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

[Groff-commit] groff ChangeLog src/preproc/tbl/table.cpp src/p...


From: Werner LEMBERG
Subject: [Groff-commit] groff ChangeLog src/preproc/tbl/table.cpp src/p...
Date: Fri, 18 Jul 2008 07:37:16 +0000

CVSROOT:        /cvsroot/groff
Module name:    groff
Changes by:     Werner LEMBERG <wl>     08/07/18 07:37:16

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

Log message:
        * src/preproc/tbl/table.cpp (table::compute_separation_factor): Emit
        warning messages if table gets squeezed.
        (table::compute_widths): Fix computation of AVAILABLE_REG.
        Emit warning if table is wider than line length.
        
        * src/preproc/tbl/tbl.man: Minor improvements.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/groff/ChangeLog?cvsroot=groff&r1=1.1132&r2=1.1133
http://cvs.savannah.gnu.org/viewcvs/groff/src/preproc/tbl/table.cpp?cvsroot=groff&r1=1.14&r2=1.15
http://cvs.savannah.gnu.org/viewcvs/groff/src/preproc/tbl/tbl.man?cvsroot=groff&r1=1.18&r2=1.19

Patches:
Index: ChangeLog
===================================================================
RCS file: /cvsroot/groff/groff/ChangeLog,v
retrieving revision 1.1132
retrieving revision 1.1133
diff -u -b -r1.1132 -r1.1133
--- ChangeLog   2 May 2008 05:14:21 -0000       1.1132
+++ ChangeLog   18 Jul 2008 07:37:16 -0000      1.1133
@@ -1,3 +1,12 @@
+2008-07-18  Werner LEMBERG  <address@hidden>
+
+       * src/preproc/tbl/table.cpp (table::compute_separation_factor): Emit
+       warning messages if table gets squeezed.
+       (table::compute_widths): Fix computation of AVAILABLE_REG.
+       Emit warning if table is wider than line length.
+
+       * src/preproc/tbl/tbl.man: Minor improvements.
+
 2008-05-02  Larry Jones  <address@hidden>
 
        * contrib/chem/Makefile.sub (README, examples/README): In makefiles,

Index: src/preproc/tbl/table.cpp
===================================================================
RCS file: /cvsroot/groff/groff/src/preproc/tbl/table.cpp,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -b -r1.14 -r1.15
--- src/preproc/tbl/table.cpp   11 Sep 2007 07:14:17 -0000      1.14
+++ src/preproc/tbl/table.cpp   18 Jul 2008 07:37:16 -0000      1.15
@@ -1,5 +1,5 @@
 // -*- C++ -*-
-/* Copyright (C) 1989, 1990, 1991, 1992, 2000, 2003, 2004, 2007
+/* Copyright (C) 1989, 1990, 1991, 1992, 2000, 2003, 2004, 2007, 2008
    Free Software Foundation, Inc.
      Written by James Clark (address@hidden)
 
@@ -2078,7 +2078,13 @@
       prints(".nr " SEPARATION_FACTOR_REG " \\n[.l]-\\n[.i]");
       for (i = 0; i < ncolumns; i++)
        printfs("-\\n[%1]", span_width_reg(i, i));
-      printfs("/%1>?0\n", as_string(total_sep));
+      printfs("/%1\n", as_string(total_sep));
+      prints(".ie \\n[" SEPARATION_FACTOR_REG "]<=0 \\{"
+            ".tm warning: page \\n%: column separation set to zero\n"
+            ".nr " SEPARATION_FACTOR_REG " 0\n"
+            ".\\}\n"
+            ".el .if \\n[" SEPARATION_FACTOR_REG "]<1n "
+            ".tm warning: page \\n%: table squeezed horizontally to fit line 
length\n");
     }
   }
 }
@@ -2158,13 +2164,19 @@
   for (q = entry_list; q; q = q->next)
     if (!q->mod->zero_width)
       q->do_width();
-  printfs(".nr " COLCOUNT_REG " %1\n", as_string(count_block_columns()));
-  prints(".nr " AVAILABLE_REG " \\n[.ll]-\\n[.in]\n");
   for (i = 0; i < ncolumns; i++)
     compute_span_width(i, i);
   for (p = span_list; p; p = p->next)
     compute_span_width(p->start_col, p->end_col);
-  prints(".nr " AVAILABLE_REG " 0>?\\n[" AVAILABLE_REG "]\n");
+  printfs(".nr " COLCOUNT_REG " %1\n", as_string(count_block_columns()));
+  prints(".nr " AVAILABLE_REG " \\n[.l]-\\n[.i]");
+  for (i = 0; i < ncolumns; i++)
+    printfs("-\\n[%1]", span_width_reg(i, i));
+  prints("\n");
+  prints(".if \\n[" AVAILABLE_REG "]<0 \\{"
+        ".tm warning: page \\n%: table wider than line width\n"
+        ".nr " AVAILABLE_REG " 0\n"
+        ".\\}\n");
   make_columns_equal();
   // Note that divide_span keeps equal width columns equal.
   for (p = span_list; p; p = p->next)

Index: src/preproc/tbl/tbl.man
===================================================================
RCS file: /cvsroot/groff/groff/src/preproc/tbl/tbl.man,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -b -r1.18 -r1.19
--- src/preproc/tbl/tbl.man     5 Jan 2007 14:42:22 -0000       1.18
+++ src/preproc/tbl/tbl.man     18 Jul 2008 07:37:16 -0000      1.19
@@ -1,5 +1,5 @@
 .ig
-Copyright (C) 1989-1995, 2001, 2002, 2003, 2004, 2006, 2007
+Copyright (C) 1989-1995, 2001, 2002, 2003, 2004, 2006, 2007, 2008
   Free Software Foundation, Inc.
 
 Permission is granted to make and distribute verbatim copies of
@@ -89,9 +89,9 @@
 (table end) macros.
 The line immediately following the
 .B .TS
-macro may contain any of the following global options (ignoring the case
-of characters -- Unix tbl only accepts options with all characters lowercase
-or all characters uppercase):
+macro may contain any of the following global options (ignoring the case of
+characters \[en] Unix tbl only accepts options with all characters lowercase
+or all characters uppercase), separated by spaces, tabs, or commas:
 .
 .TP
 .B center
@@ -111,7 +111,11 @@
 .
 .TP
 .B expand
-Makes the table as wide as the current line length.
+Makes the table as wide as the current line length (providing a column
+separation factor).
+In case the sum of the column widths is larger than the current line length,
+the column separation factor is set to zero; such tables extend into the
+right margin, and there is no column separation at all.
 .
 .TP
 .B box
@@ -167,7 +171,7 @@
 .
 .LP
 The global options must end with a semicolon.
-There might be whitespace after an option and its argument in parentheses.
+There might be whitespace between an option and its argument in parentheses.
 .
 .LP
 After global options come lines describing the format of each line of
@@ -176,6 +180,7 @@
 the last format line (which you must end with a period) describes all
 remaining lines of the table.
 A single key character describes each column of each line of the table.
+Key characters can be separated by spaces or tabs.
 You may run format specs for multiple lines together on the same line by
 separating them with commas.
 .
@@ -340,9 +345,9 @@
 .
 .LP
 A number suffix on a key character is interpreted as a column
-separation in ens (multiplied in proportion if the
+separation in en units (multiplied in proportion if the
 .B expand
-option is on).
+option is on \[en] in case of overfull tables this might be zero).
 Default separation is 3n.
 .
 .LP
@@ -578,7 +583,7 @@
 .
 .
 .SH REFERENCE
-Lesk, M.E.: "TBL -- A Program to Format Tables".
+Lesk, M.E.: "TBL \[en] A Program to Format Tables".
 For copyright reasons it cannot be included in the groff distribution,
 but copies can be found with a title search on the World Wide Web.
 .




reply via email to

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