[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Groff] Re: Groff hyphenation problem
From: |
Werner LEMBERG |
Subject: |
[Groff] Re: Groff hyphenation problem |
Date: |
Sat, 25 Nov 2000 20:50:20 +0100 (CET) |
This problem was the very reason to start maintaining groff together
with Ted:
> Why does groff suppress hyphenation break at "-" in the context of
> words with escapes like "\ " in them?
The problem is even more serious: Any word which is not finished by
either a space or a newline character won't be hyphenated. Most
escape sequences fall into this category; most notably `\ ' and `\~'.
Below are two tiny patches which solve this problem, I believe.
Before committing it I ask you all for testing.
Werner
======================================================================
--- env.h.old Sun Nov 12 16:19:15 2000
+++ env.h Thu Nov 23 22:22:22 2000
@@ -189,7 +189,6 @@
#ifdef WIDOW_CONTROL
void mark_last_line();
#endif /* WIDOW_CONTROL */
- void possibly_break_line(int forced = 0);
breakpoint *choose_breakpoint();
void hyphenate_line();
void start_field();
@@ -268,6 +267,7 @@
void set_input_line_position(hunits); // used by \n(hp
void interrupt();
void spread() { spread_flag = 1; }
+ void possibly_break_line(int forced = 0);
void do_break(); // .br
void final_break();
void add_html_tag (const char *name);
======================================================================
--- input.cc.old Thu Nov 23 08:27:19 2000
+++ input.cc Thu Nov 23 22:38:09 2000
@@ -2292,6 +2292,7 @@
curenv->add_node(tok.nd);
tok.nd = 0;
bol = 0;
+ curenv->possibly_break_line();
}
break;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Groff] Re: Groff hyphenation problem,
Werner LEMBERG <=