summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/generic/hyphenex/hyphenex.sh
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/source/generic/hyphenex/hyphenex.sh')
-rw-r--r--Master/texmf-dist/source/generic/hyphenex/hyphenex.sh92
1 files changed, 92 insertions, 0 deletions
diff --git a/Master/texmf-dist/source/generic/hyphenex/hyphenex.sh b/Master/texmf-dist/source/generic/hyphenex/hyphenex.sh
new file mode 100644
index 00000000000..14bd729b985
--- /dev/null
+++ b/Master/texmf-dist/source/generic/hyphenex/hyphenex.sh
@@ -0,0 +1,92 @@
+#! /bin/sh
+#
+#
+# hyphenex.sh
+#
+# This small filter converts a hyphenation exception log article for
+# TUGBoat to a real \hyphenation block.
+#
+# Written by Werner Lemberg <wl@gnu.org>.
+#
+# Version 1.4 (2007/11/16)
+#
+# Public domain.
+#
+#
+# Usage:
+#
+# sh hyphenex.sh < tugboat-article > hyphenation-exceptions
+
+cat >/tmp/sed.$$ <<SED_EOF
+1 i\\
+% Hyphenation exceptions for US English, based on hyphenation exception\\
+% log articles in TUGboat.\\
+%\\
+% Copyright 2007 TeX Users Group.\\
+% You may freely use, modify and/or distribute this file.\\
+%\\
+% This is an automatically generated file. Do not edit!\\
+%\\
+% Please contact the TUGboat editorial staff <tugboat@tug.org>\\
+% for corrections and omissions.\\
+\\
+\\\\hyphenation{
+\$ i\\
+}\\
+\\
+% EOF
+/^\\\\tabalign/ {
+ s/{}//g
+ s/[ ][ ]*/ /g
+ s/ *\\\\[^ ][^ ]*\$//
+ s/\\\\tabalign *[^ ][^ ]*.*& *\\(.*\\)\$/ \\1/p
+ b
+}
+/^\\\\[123456]/ !d
+s/\\\\4/\\\\1/
+s/\\\\5/\\\\2/
+s/\\\\6/\\\\3/
+s/[ ][ ]*/ /g
+s/^/ /
+s/\\\\1 [^ ][^ ]* {\\(.*\\)}\$/\\1/
+s/\\\\2 [^ ][^ ]* {\\(.*\\) \\(.*\\),\\(.*\\),\\(.*\\)}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