summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/generic/xu-hyphen/xu-dehypht.tex
blob: aeb833705ff593f628c275b67fa8519cdb7de81a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
% xu-dehypht.tex
% Wrapper for XeTeX to read dehypht.tex
% Jonathan Kew, 2006-08-17
% Public domain

\begingroup

\expandafter\ifx\csname XeTeXrevision\endcsname\relax
\else

  \catcode`\?=7
  % Define the accent macro " in such a way that it
  % expands to single letters in Unicode
  \catcode`\"=13
  \def"#1{\ifx#1a??e4\else \ifx#1o??f6\else \ifx#1u??fc\else
      \errmessage{Hyphenation pattern file corrupted!}%
    \fi\fi\fi}
  %   - patterns with umlauts are ok
  \def\n#1{#1}
  %   - define \3 to be character "00DF (\ss in Unicode)
  \def\3{??df}
  %   - define \9 to throw an error
  \def\9{\errmessage{Hyphenation pattern file corrupted!}}
  %   - duplicated patterns to support font encoding OT1 are not wanted
  \def\c#1{}
  %
  \let\PATTERNS=\patterns
  \def\patterns{% at the \patterns command in dehypht.tex...
    \endgroup % end group containing local definitions from dehypht
    \begingroup % and start our own (to match \endgroup in dehypht)
    %
    \PATTERNS % and then load the real patterns
  }

\fi

\input dehypht.tex

\endgroup
\endinput