summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/lambda/antomega/hyphen.cfg
blob: 63694901193a749c99f3f1ff23a9f741ce152f08 (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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
%%
%% This is file `hyphen.cfg',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% antomega.dtx  (with options: `kernel,patterns')
%% 
%% This file is part of the ANTOMEGA project version 0.7
%% -----------------------------------------------------
%% 
%% It may be distributed under the terms of the LaTeX Project Public
%% License, as described in lppl.txt in the base LaTeX distribution.
%% Either version 1.0 or, at your option, any later version.
%% Copyright (C) 2001 -- 2002 by Alexej Kryukov
%% Please report errors to: A.M. Kryukov <basileia@yandex.ru>
%% 

\let\ant@tempa\ProvidesFile
\def\ProvidesFile#1[#2 #3 #4]{%
   \toks8{Antomega <#3> and hyphenation patterns for }%
   \ant@tempa#1[#2 #3 #4]%
   \let\ProvidesFile\ant@tempa}
\def\ProvidesLanguage#1{%
   \begingroup
      \catcode`\ 10 %
      \@makeother\/%
      \@ifnextchar[%]
         {\@provideslanguage{#1}}{\@provideslanguage{#1}[]}}
\def\@provideslanguage#1[#2]{%
   \wlog{Language: #1 #2}%
      \expandafter\xdef\csname ver@#1.ldf\endcsname{#2}%
      \endgroup}
\ProvidesFile{hyphen.cfg}
   [2003/08/26 v0.7
   Taken from Babel language switching mechanism
   and modified for Antomega]
\countdef\last@language=19
\def\addlanguage{\alloc@9\language\chardef\@cclvi}
\def\adddialect#1#2{%
   \global\chardef#1#2\relax
   \wlog{\string#1 = a dialect from \string\language#2}}
\def\iflanguage#1{%
   \expandafter\ifx\csname l@#1\endcsname\relax
      \PackageWarning{antomega}{#1 is not a known language.}%
   \else
      \ifnum\csname l@#1\endcsname=\language
         \expandafter\@firstoftwo
      \else
         \expandafter\@secondoftwo
      \fi%
   \fi}
\ifx\makeletter\@undefined
   \def\makeletter#1#2{%
      \ifnum\catcode#2=11\else\catcode#2=12 \fi
      \ifnum\catcode#1=11\else\catcode#1=12 \fi
      \uccode#1=#1 \uccode#2=#1%
      \lccode#1=#2 \lccode#2=#2}
\fi
\ifx\makelcletter\@undefined
   \def\makelcletter#1#2{%
      \ifnum\catcode#2=11\else\catcode#2=12 \fi
      \uccode#2=#1%
      \lccode#2=#2}
\fi
\ifx\makeucletter\@undefined
   \def\makeucletter#1#2{%
      \ifnum\catcode#1=11\else\catcode#1=12 \fi
      \uccode#1=#1%
      \lccode#1=#2}
\fi
\ifx\makesameletter\@undefined
   \def\makesameletter#1#2{%
      \ifnum\catcode#1=11\else\catcode#1=12 \fi
      \uccode#1=\uccode#2%
      \lccode#1=\lccode#2}
\fi
\openin1 = antomega.cfg
\ifeof1
   \message{I couldn't find the file antomega.cfg.\space
           Codes for Unicode characters will not be loaded.}
\else
   \input{antomega.cfg}
\fi
\closein1
\def\hyphenrules#1{%
   \expandafter\ifx\csname l@#1\endcsname\@undefined
      \@nolanerr{#1}%
   \else
      \language=\csname l@#1\endcsname\relax
   \fi
}
\def\endhyphenrules{}
\def\set@hyphenmins#1#2{\lefthyphenmin#1\righthyphenmin#2}
\def\process@line#1#2 #3/{%
   \ifx=#1
      \process@synonym#2 /
   \else
      \process@language#1#2 #3/%
   \fi
}
\toks@{}
\def\process@synonym#1 /{%
   \ifnum\last@language=\m@ne
      \expandafter\chardef\csname l@#1\endcsname0\relax
      \wlog{\string\l@#1=\string\language0}
      \toks@\expandafter{\the\toks@
         \expandafter\let\csname #1hyphenmins\expandafter\endcsname
         \csname\languagename hyphenmins\endcsname}%
   \else
      \expandafter\chardef\csname l@#1\endcsname\last@language
      \wlog{\string\l@#1=\string\language\the\last@language}
      \expandafter\let\csname #1hyphenmins\expandafter\endcsname
      \csname\languagename hyphenmins\endcsname
   \fi
  }
\def\process@language#1 #2 #3/{%
   \expandafter\addlanguage\csname l@#1\endcsname
   \expandafter\language\csname l@#1\endcsname
   \def\languagename{#1}%
   \global\toks8\expandafter{\the\toks8#1, }%
   \begingroup
      \ant@get@enc#1:\@@@
      \ifx\ant@hyph@enc\@empty
      \else
         \fontencoding{\ant@hyph@enc}\selectfont
      \fi
      \lefthyphenmin\m@ne
      \input #2\relax
      \ifnum\lefthyphenmin=\m@ne
      \else
         \expandafter\xdef\csname #1hyphenmins\endcsname{%
            \set@hyphenmins{\the\lefthyphenmin}{\the\righthyphenmin}}%
      \fi
   \endgroup
   \ifnum\the\language=\z@
      \expandafter\ifx\csname #1hyphenmins\endcsname\relax
         \set@hyphenmins\tw@\thr@@\relax
      \else
         \expandafter\expandafter\expandafter\set@hyphenmins
            \csname #1hyphenmins\endcsname
      \fi
      \the\toks@
   \fi
   \toks@{}%
   \def\ant@tempa{#3}%
   \ifx\ant@tempa\@empty
   \else
      \ifx\ant@tempa\space
      \else
         \input #3\relax
      \fi
   \fi
}
\def\ant@get@enc#1:#2\@@@{%
  \def\ant@tempa{#1}%
  \def\ant@tempb{#2}%
  \ifx\ant@tempb\@empty
    \let\ant@hyph@enc\@empty
  \else
    \ant@get@enc#2\@@@
    \edef\ant@hyph@enc{\ant@tempa}%
  \fi}
\openin1 = language.dat
\ifeof1
  \message{I couldn't find the file language.dat,\space
           I will try the file hyphen.tex}
  \input hyphen.tex\relax
\else
  \last@language\m@ne
  \loop
    \endlinechar\m@ne
    \read1 to \ant@line
    \endlinechar`\^^M
    \ifx\ant@line\@empty
    \else
      \edef\ant@line{\ant@line\space/}%
      \expandafter\process@line\ant@line
    \fi
    \iftrue \csname fi\endcsname
    \csname if\ifeof1 false\else true\fi\endcsname
  \repeat
  \language=0
\fi
\closein1
\let\process@language\@undefined
\let\process@synonym\@undefined
\let\process@line\@undefined
\let\ant@tempa\@undefined
\let\ant@tempb\@undefined
\let\ant@eq@\@undefined
\let\ant@line\@undefined
\let\ant@get@enc\@undefined
\ifx\addto@hook\@undefined
\else
  \expandafter\addto@hook\expandafter\everyjob\expandafter{%
    \expandafter\typeout\expandafter{\the\toks8 loaded.}}
\fi
\endinput
%%
%% End of file `hyphen.cfg'.