[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[groff] 03/03: tmac/an-ext.tmac: Succumb to hyphenation reality.
From: |
G. Branden Robinson |
Subject: |
[groff] 03/03: tmac/an-ext.tmac: Succumb to hyphenation reality. |
Date: |
Sat, 15 Aug 2020 15:44:40 -0400 (EDT) |
gbranden pushed a commit to branch master
in repository groff.
commit 45ff6c6564d5e205f4704bfffecffbe3718d2c3a
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Sun Aug 16 05:27:11 2020 +1000
tmac/an-ext.tmac: Succumb to hyphenation reality.
URLs in real documents, like our man pages, were getting hyphenated
in spite of my efforts. Fix this by permitting the "punctuation"
arguments to .ME and .UE to be hyphenated again.
Here's my understanding.
I think this is because while it is tempting to think of a groff
document as a tree (and if we were redesigning it from scratch, it might
be), that is not completely true. Changes in hyphenation mode don't
leave nodes in the tree that will be respected when it's time to break
the line. Instead, at break time, groff checks the current hyphenation
mode, and if it's not 0, merrily backtracks over the pending output line
and sticks in a hyphen wherever the patterns and mode will allow and
where not specifically prohibited by hyphenation exceptions or words
beginning with \%.
* tmac/an-ext.tmac (.ME, .UE): Restore hyphenation after "punctuation"
arguments have been output. The next token will always be a space
node, the end of the document, or similar.
* tmac/tmac.am: Mark the punctuation hyphenation tests as expected to
fail, because they now do.
---
ChangeLog | 9 +++++++++
tmac/an-ext.tmac | 4 ++--
tmac/tmac.am | 8 ++++++--
3 files changed, 17 insertions(+), 4 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 89c87f2..e278c8f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
2020-08-16 G. Branden Robinson <g.branden.robinson@gmail.com>
+ * tmac/an-ext.tmac (.ME, .UE): Restore hyphenation after
+ "punctuation" arguments have been output. The next token will
+ always be a space node, the end of the document, or similar.
+
+ * tmac/tmac.am: Mark the punctuation hyphenation tests as
+ expected to fail, because they now do.
+
+2020-08-16 G. Branden Robinson <g.branden.robinson@gmail.com>
+
* tmac/ps.tmac: Define ordinary hyphen-minus as fallback
character for U+2011 (non-breaking hyphen). Prompted by
discussion with Dave Kemper in Savannah #58390.
diff --git a/tmac/an-ext.tmac b/tmac/an-ext.tmac
index 15a9058..823e7a5 100644
--- a/tmac/an-ext.tmac
+++ b/tmac/an-ext.tmac
@@ -127,9 +127,9 @@
. el \{\
. nh
\\*(la\\*(m1\\*(ra\c
-. hy \\n(HY
. ie \n(.g \&\\$*\"
. el \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9\"
+. hy \\n(HY
. \}
..
.
@@ -168,9 +168,9 @@
. el \{\
. nh
\\*(la\\*(m1\\*(ra\c
-. hy \\n(HY
. ie \n(.g \&\\$*\"
. el \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9\"
+. hy \\n(HY
. \}
..
.
diff --git a/tmac/tmac.am b/tmac/tmac.am
index 1a67205..39fb189 100644
--- a/tmac/tmac.am
+++ b/tmac/tmac.am
@@ -142,8 +142,8 @@ EXTRA_DIST += \
tmac_TESTS = \
tmac/tests/an-ext_ME_punct_hyphenates.sh \
- tmac/tests/an-ext_MT_body_hyphenates.sh \
tmac/tests/an-ext_UE_punct_hyphenates.sh \
+ tmac/tests/an-ext_MT_body_hyphenates.sh \
tmac/tests/an-ext_UR_body_hyphenates.sh \
tmac/tests/an-old_AT_and_UC_footer_saved_and_restored.sh \
tmac/tests/an-old_CS_register_off.sh \
@@ -152,9 +152,13 @@ tmac_TESTS = \
tmac/tests/an-old_CT_register_off.sh \
tmac/tests/an-old_CT_register_on.sh \
tmac/tests/an-old_CT_register_unspecified.sh
-
TESTS += $(tmac_TESTS)
+tmac_XFAIL_TESTS = \
+ tmac/tests/an-ext_ME_punct_hyphenates.sh \
+ tmac/tests/an-ext_UE_punct_hyphenates.sh
+XFAIL_TESTS += $(tmac_XFAIL_TESTS)
+
dist-hook: tmac-dist-hook
tmac-dist-hook:
chmod u+w $(distdir)/tmac
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [groff] 03/03: tmac/an-ext.tmac: Succumb to hyphenation reality.,
G. Branden Robinson <=