• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1% xu-rohyph.tex
2% Wrapper for XeTeX to read rohyphen.tex
3% Jonathan Kew, 2006-10-07
4% Public domain
5
6\begingroup
7
8\let\INPUT=\input
9
10\expandafter\ifx\csname XeTeXrevision\endcsname\relax
11\else
12
13  %	"a = \u{a}			[-]  \u{A} [not encoded]
14  %	"A = \^{a}			[-]  \^{A} [not encoded]
15  %	"i = \^{\i}			"I = \^{I}
16  %	"s = \c{s}			"S = \c{S}
17  %	"t = \c{t}			"T = \c{T}
18  \catcode`\"=13
19  \def"#1{\ifx#1a^^^^0103\else
20    \ifx#1A^^^^00e2\else
21    \ifx#1i^^^^00ee\else
22    \ifx#1s^^^^015f\else
23    \ifx#1t^^^^0163\else
24      \errmessage{Hyphenation pattern file corrupted!}%
25    \fi\fi\fi\fi\fi}
26  \catcode`\"=12
27
28  \def\n#1{#1} % accept patterns with accented chars
29
30  \def\INPUT #1 {
31    \begingroup
32      % rohyphen's assignments to \catcode, \lccode etc are not in a group
33      % so we begin one here, and end it at \patterns
34    \input #1
35  }
36
37  \let\PATTERNS=\patterns
38  \def\patterns{%
39    \endgroup % discard legacy " definitions from rohyphen.tex
40    \endgroup % and end the group we started at \INPUT (for catcodes etc)
41    \begingroup
42    \catcode`\"=13 % activate our definitions from above
43    \PATTERNS
44  }
45
46\fi
47
48\INPUT rohyphen.tex
49
50\endgroup
51\endinput
52