groff-commit
[Top][All Lists]
Advanced

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

[Groff-commit] groff ChangeLog NEWS doc/groff.texinfo man/grof...


From: Werner LEMBERG
Subject: [Groff-commit] groff ChangeLog NEWS doc/groff.texinfo man/grof...
Date: Fri, 11 Aug 2006 10:27:55 +0000

CVSROOT:        /cvsroot/groff
Module name:    groff
Changes by:     Werner LEMBERG <wl>     06/08/11 10:27:54

Modified files:
        .              : ChangeLog NEWS 
        doc            : groff.texinfo 
        man            : groff_diff.man 
        src/roff/troff : charinfo.h node.cpp 

Log message:
        Add new flag to .cflags to enable hyphenation without looking at
        hcode values.
        
        * src/roff/troff/charinfo.h (charinfo): New enumeration value
        `IGNORE_HCODES'.
        New member function `ignore_hcodes'.
        
        * src/roff/troff/node.cpp (break_char_node::add_self,
        node::add_char): Updated.
        
        * doc/groff.texinfo, man/groff_diff.man, NEWS: Document it.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/groff/ChangeLog?cvsroot=groff&r1=1.980&r2=1.981
http://cvs.savannah.gnu.org/viewcvs/groff/NEWS?cvsroot=groff&r1=1.219&r2=1.220
http://cvs.savannah.gnu.org/viewcvs/groff/doc/groff.texinfo?cvsroot=groff&r1=1.245&r2=1.246
http://cvs.savannah.gnu.org/viewcvs/groff/man/groff_diff.man?cvsroot=groff&r1=1.57&r2=1.58
http://cvs.savannah.gnu.org/viewcvs/groff/src/roff/troff/charinfo.h?cvsroot=groff&r1=1.13&r2=1.14
http://cvs.savannah.gnu.org/viewcvs/groff/src/roff/troff/node.cpp?cvsroot=groff&r1=1.24&r2=1.25

Patches:
Index: ChangeLog
===================================================================
RCS file: /cvsroot/groff/groff/ChangeLog,v
retrieving revision 1.980
retrieving revision 1.981
diff -u -b -r1.980 -r1.981
--- ChangeLog   9 Aug 2006 15:55:17 -0000       1.980
+++ ChangeLog   11 Aug 2006 10:27:54 -0000      1.981
@@ -1,3 +1,17 @@
+2006-08-11  Werner LEMBERG  <address@hidden>
+
+       Add new flag to .cflags to enable hyphenation without looking at
+       hcode values.
+
+       * src/roff/troff/charinfo.h (charinfo): New enumeration value
+       `IGNORE_HCODES'.
+       New member function `ignore_hcodes'.
+
+       * src/roff/troff/node.cpp (break_char_node::add_self,
+       node::add_char): Updated.
+
+       * doc/groff.texinfo, man/groff_diff.man, NEWS: Document it.
+
 2006-08-09  Werner LEMBERG  <address@hidden>
 
        Support composite Unicode characters again.  Reported by Colin.

Index: NEWS
===================================================================
RCS file: /cvsroot/groff/groff/NEWS,v
retrieving revision 1.219
retrieving revision 1.220
diff -u -b -r1.219 -r1.220
--- NEWS        31 Jul 2006 09:48:57 -0000      1.219
+++ NEWS        11 Aug 2006 10:27:54 -0000      1.220
@@ -47,6 +47,11 @@
   The new number register `.zoom' holds the zoom value of the current font,
   in multiples of 1/1000th.
 
+o The `cflags' request has been extended with a new flag value 64, to be
+  used in combination with values 2 (break before character) and 4 (break
+  after character).  If set, the hyphenation codes of the surrounding
+  characters are ignored.
+
 Pic
 ---
 

Index: doc/groff.texinfo
===================================================================
RCS file: /cvsroot/groff/groff/doc/groff.texinfo,v
retrieving revision 1.245
retrieving revision 1.246
diff -u -b -r1.245 -r1.246
--- doc/groff.texinfo   31 Jul 2006 09:48:57 -0000      1.245
+++ doc/groff.texinfo   11 Aug 2006 10:27:54 -0000      1.246
@@ -472,7 +472,7 @@
 @title groff
 @subtitle The GNU implementation of @code{troff}
 @subtitle Edition 1.19.3
address@hidden Spring 2006
address@hidden Summer 2006
 @author by Trent address@hidden
 @author and Werner Lemberg (@email{bug-groff@@gnu.org})
 
@@ -2176,7 +2176,7 @@
 
 @item address@hidden
 Set hyphenation flags.  Possible values are address@hidden hyphenate without
-restrictions, address@hidden to not hyphenate the last word on a page,
+restrictions, address@hidden not hyphenate the last word on a page,
 address@hidden not hyphenate the last two characters of a word, and
 address@hidden not hyphenate the first two characters of a word.  These
 values are additive; the default address@hidden
@@ -9362,14 +9362,19 @@
 @item 2
 @cindex hyphenating characters
 @cindex characters, hyphenation
-Lines can be broken before the character (initially no characters have
-this property).
+Lines can be broken before the character (initially no characters have this
+property).  This only works if both the characters before and after have
+non-zero hyphenation codes (as set with the @code{hcode} request).  Use
address@hidden to override this behaviour.
 
 @item 4
 @cindex @code{hy} glyph, and @code{cflags}
 @cindex @code{em} glyph, and @code{cflags}
-Lines can be broken after the character (initially the character
address@hidden and the symbols @samp{\[hy]} and @samp{\[em]} have this 
property).
+Lines can be broken after the character (initially the character @samp{-}
+and the symbols @samp{\[hy]} and @samp{\[em]} have this property).  This
+only works if both the characters before and after have non-zero hyphenation
+codes (as set with the @code{hcode} request).  Use address@hidden to override
+this behaviour.
 
 @item 8
 @cindex overlapping characters
@@ -9405,6 +9410,22 @@
 this is the same as having a zero space factor in @TeX{} (initially
 characters @samp{"')]*} and the symbols @samp{\[dg]} and @samp{\[rq]} have
 this property).
+
address@hidden 64
+Ignore hyphenation code values of the surrounding characters.  Use this in
+combination with values 2 address@hidden (initially no characters have this
+property).  For example, if you need an automatic break point after the
+hyphen in number ranges like `3000-5000', insert
+
address@hidden
+.cflags 68 -
address@hidden
+
address@hidden
+into your document.  Note, however, that this can lead to bad layout if done
+without thinking; in most situations, a better solution instead of changing
+the @code{cflags} value is to insert @code{\:} right after the hyphen at the
+places which really need a break point.
 @end table
 @endDefreq
 

Index: man/groff_diff.man
===================================================================
RCS file: /cvsroot/groff/groff/man/groff_diff.man,v
retrieving revision 1.57
retrieving revision 1.58
diff -u -b -r1.57 -r1.58
--- man/groff_diff.man  12 Jul 2006 19:31:09 -0000      1.57
+++ man/groff_diff.man  11 Aug 2006 10:27:54 -0000      1.58
@@ -3,7 +3,7 @@
 .ig
 groff_diff.man
 
-Last update : 11 Jul 2006
+Last update : 11 Aug 2006
 
 This file is part of groff, the GNU roff type-setting system.
 It is the source of the man-page groff_diff(7).
@@ -1046,6 +1046,7 @@
 this property); a line is not broken at a character with this
 property unless the characters on each side both have non-zero
 hyphenation codes.
+This can be overridden with value 64.
 .
 .IP 4
 Lines can be broken after the character (initially characters
@@ -1053,6 +1054,7 @@
 have this property); a line is not broken at a character with
 this property unless the characters on each side both have non-zero
 hyphenation codes.
+This can be overridden with value 64.
 .
 .IP 8
 The character overlaps horizontally (initially characters
@@ -1072,6 +1074,11 @@
 having a zero space factor in \*[tx] (initially characters
 .B \[dq]')]*\[rs](dg\[rs](rq
 have this property).
+.
+.IP 64
+Ignore hyphenation code values of the surrounding characters.
+Use this in combination with values 2 and\~4 (initially no characters have
+this property).
 .RE
 .
 .TP

Index: src/roff/troff/charinfo.h
===================================================================
RCS file: /cvsroot/groff/groff/src/roff/troff/charinfo.h,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -b -r1.13 -r1.14
--- src/roff/troff/charinfo.h   23 Feb 2006 20:00:47 -0000      1.13
+++ src/roff/troff/charinfo.h   11 Aug 2006 10:27:54 -0000      1.14
@@ -44,7 +44,8 @@
     BREAK_AFTER = 4,
     OVERLAPS_HORIZONTALLY = 8,
     OVERLAPS_VERTICALLY = 16,
-    TRANSPARENT = 32
+    TRANSPARENT = 32,
+    IGNORE_HCODES = 64
   };
   enum {
     TRANSLATE_NONE,
@@ -54,7 +55,7 @@
     TRANSLATE_HYPHEN_INDICATOR
   };
   symbol nm;
-  charinfo(symbol s);
+  charinfo(symbol);
   glyph *as_glyph();
   int ends_sentence();
   int overlaps_vertically();
@@ -62,6 +63,7 @@
   int can_break_before();
   int can_break_after();
   int transparent();
+  int ignore_hcodes();
   unsigned char get_hyphenation_code();
   unsigned char get_ascii_code();
   unsigned char get_asciify_code();
@@ -122,6 +124,11 @@
   return flags & TRANSPARENT;
 }
 
+inline int charinfo::ignore_hcodes()
+{
+  return flags & IGNORE_HCODES;
+}
+
 inline int charinfo::numbered()
 {
   return number >= 0;

Index: src/roff/troff/node.cpp
===================================================================
RCS file: /cvsroot/groff/groff/src/roff/troff/node.cpp,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -b -r1.24 -r1.25
--- src/roff/troff/node.cpp     12 Jul 2006 19:31:09 -0000      1.24
+++ src/roff/troff/node.cpp     11 Aug 2006 10:27:54 -0000      1.25
@@ -2839,16 +2839,20 @@
 node *break_char_node::add_self(node *n, hyphen_list **p)
 {
   assert((*p)->hyphenation_code == 0);
-  if ((*p)->breakable && (break_code & 1)) {
+  if (break_code & 1) {
+    if ((*p)->breakable || break_code & 4) {
     n = new space_node(H0, col, n);
     n->freeze_space();
   }
+  }
   next = n;
   n = this;
-  if ((*p)->breakable && (break_code & 2)) {
+  if (break_code & 2) {
+    if ((*p)->breakable || break_code & 4) {
     n = new space_node(H0, col, n);
     n->freeze_space();
   }
+  }
   hyphen_list *pp = *p;
   *p = (*p)->next;
   delete pp;
@@ -5073,6 +5077,8 @@
     break_code = 1;
   if (ci->can_break_after())
     break_code |= 2;
+  if (ci->ignore_hcodes())
+    break_code |= 4;
   if (break_code) {
     node *next1 = res->next;
     res->next = 0;




reply via email to

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