[groff] 01/01: groff.texi: Improve documentation of `.hy' request.

2018-03-03 Thread Werner LEMBERG
wl pushed a commit to branch master
in repository groff.

commit d592d320cd43cf4ecee67a7aa80b52691671465d
Author: Werner Lemberg 
Date:   Sun Mar 4 08:34:20 2018 +0100

groff.texi: Improve documentation of `.hy' request.
---
 doc/groff.texi | 35 ---
 1 file changed, 28 insertions(+), 7 deletions(-)

diff --git a/doc/groff.texi b/doc/groff.texi
index cbaf495..3abd114 100644
--- a/doc/groff.texi
+++ b/doc/groff.texi
@@ -7044,13 +7044,34 @@ value is larger than@tie{}1.
 Using values 4 and@tie{}16 can't be used together since they contradict
 each other; the same holds for values 8 and@tie{}32.
 
-For historical reasons the default value of the @code{hy} request
-doesn't fit the American English hyphenation patterns that are used by
-groff as the default.  These patterns expect that neither the first
-character nor the last two characters are to be hyphenated; this
-corresponds to value@tie{}4.  Consequently, @code{hy}'s default
-value@tie{}1 or even setting values 16 or@tie{}32 might lead to
-(additional) incorrect hyphenation points.
+The number of characters at the beginning of a word after which the
+first hyphenation point should be inserted is determined by the patterns
+themselves; it can't be reduced further without introducing additional,
+invalid hyphenation points (unfortunately, this information is not part
+of a pattern file, you have to know it in advance).  The same is true
+for the number of characters at the end of word before the last
+hyphenation point should be inserted.  For example, the code
+
+@Example
+.ll 1
+.hy 48
+@endExample
+
+returns
+
+@Example
+s-
+plit-
+t-
+in-
+g
+@endExample
+
+instead of the correct `split-ting'.  US-English patterns as distributed
+with groff need two characters at the beginning and three characters at
+the end; this means that value@tie{}4 of @code{hy} is mandatory.
+Value@tie{}8 is possible as an additional restriction, but values@tie{}1
+(the default!), 16, and@tie{}32 should be avoided.
 
 Hyphenation exceptions within pattern files (i.e., the words within a
 @code{\hyphenation} group) also obey the hyphenation restrictions given

___
Groff-commit mailing list
Groff-commit@gnu.org
https://lists.gnu.org/mailman/listinfo/groff-commit


[groff] 01/01: Minor comment fix.

2018-03-03 Thread Werner LEMBERG
wl pushed a commit to branch master
in repository groff.

commit 2a2a42c096ead8a28bd8262c937edfc436331cda
Author: Werner Lemberg 
Date:   Sun Mar 4 08:45:34 2018 +0100

Minor comment fix.
---
 src/roff/troff/env.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/roff/troff/env.cpp b/src/roff/troff/env.cpp
index 4ffc6e8..882ad7d 100644
--- a/src/roff/troff/env.cpp
+++ b/src/roff/troff/env.cpp
@@ -4027,7 +4027,7 @@ void hyphenate(hyphen_list *h, unsigned flags)
  // number.  Example:
  //
  //   hbuf:  . h e l p f u l .
- //   num:  0 0 0 0 0 1 0 0 0 0
+ //   num:  0 0 0 2 4 3 0 0 0 0
  if (!(flags & HYPHEN_FIRST_CHAR))
num[2] = 0;
  if (flags & HYPHEN_NOT_FIRST_CHARS)

___
Groff-commit mailing list
Groff-commit@gnu.org
https://lists.gnu.org/mailman/listinfo/groff-commit