Debian Codegraph @

texmf-dist/doc/generic/hyph-utf8/hyphenation-distribution.tex

raw
1 \setuplayout
2 [backspace=2cm,width=middle]
3
4 % \usetypescript[antykwa-poltawskiego]
5 % \setupbodyfont[antykwa-poltawskiego,10pt]
6 \usetypescript[antykwa-poltawskiego][ec]
7 \setupbodyfont[antykwa-poltawskiego,10pt]
8
9 \setuphead
10 [section,subject]
11 [style=\bfc]
12 \setuphead
13 [subsection,subsubject]
14 [style=\bfb]
15 \setuppagenumbering
16 [location={footer}]
17 \setuplayout
18 [header=0pt,headerdistance=0pt,height=24cm]
19 \setupwhitespace
20 [medium]
21
22 \def\TeXLive{\TeX\ Live}
23 \def\MiKTeX{MiK\TeX}
24 \def\W32TeX{W32\TeX}
25 \def\pTeX{p\TeX}
26
27 \starttext
28
29 \section{\TeX\ distributions}
30
31 \subsection{\TeXLive}
32
33 In \TeXLive\ you can install different language collections \type{collection-lang}{\tt\sl <foo>}.
34
35 \placefigure[force]{}{\externalfigure[img/texlive-collection.png][width=340pt]}
36
37 For example, the German collection \type{collection-langgerman} contains packages \type{hyphen-german} and \type{dehyph-exptl} which both contain hyphenation patterns (in addition to many other packages related to German language). The Greek collection \type{collection-langgreek} contains \type{hyphen-greek} and \type{hyphen-ancientgreek} among other packages. The package \type{dehyph-exptl} is maintained independently, while all packages \type{hyphen-}{\tt\sl<foo>} belong to \type{hyph-utf8}.
38
39
40
41
42 Hyphenation packages may contain one or more patterns. For example \type{hyphen-norwegian} contains two directives for adding two hyphenation patterns:
43 \starttyping
44 execute AddHyphen \
45 name=bokmal synonyms=norwegian,norsk \
46 lefthyphenmin=2 \
47 righthyphenmin=2 \
48 file=loadhyph-nb.tex \
49 file_patterns=hyph-nb.pat.txt \
50 file_exceptions=hyph-nb.hyp.txt
51 execute AddHyphen \
52 name=nynorsk \
53 lefthyphenmin=2 \
54 righthyphenmin=2 \
55 file=loadhyph-nn.tex \
56 file_patterns=hyph-nn.pat.txt \
57 file_exceptions=hyph-nn.hyp.txt
58 \stoptyping
59
60 The keywords {\bf name} and {\bf synonyms} are used as language name to access the patterns in \TeX, {\bf file} is used as pattern loader for 8-bit engines and \XeTeX, while {\bf file\_patterns} and {\bf file\_exceptions} are plain text files used by \LuaTeX.
61
62 The information from \type{AddHyphen} directives end up in three different files: \type{language.dat} used by \LaTeX, \type{language.def} used by plain \eTeX\ and \type{language.dat.lua} used by \LuaTeX.
63
64 All the three are placed in\crlf
65 \strut\type{ $TEXMFSYSVAR/tex/generic/config},\crlf
66 for example in\crlf
67 \strut\type{ /usr/local/texlive/2017/texmf-var/tex/generic/config},\crlf
68 while a static copy also exists in\crlf
69 \strut\type{ $TEXMFDIST/tex/generic/config},\crlf
70 but that one contains all languages and only makes sense if you have a complete checkout from SVN repository for example.
71
72 \placefigure[force]{\type{language.dat}}{
73 \starttyping
74 % from hyphen-norwegian:
75 bokmal loadhyph-nb.tex
76 =norwegian
77 =norsk
78 nynorsk loadhyph-nn.tex
79 \stoptyping
80 }
81
82 \placefigure[force]{\type{language.def}}{
83 \starttyping
84 % from hyphen-norwegian:
85 \addlanguage{bokmal}{loadhyph-nb.tex}{}{2}{2}
86 \addlanguage{norwegian}{loadhyph-nb.tex}{}{2}{2}
87 \addlanguage{norsk}{loadhyph-nb.tex}{}{2}{2}
88 \addlanguage{nynorsk}{loadhyph-nn.tex}{}{2}{2}
89 \stoptyping
90 }
91
92 \placefigure[force]{\type{language.dat.lua} (the keyword \type{loader} is not used anywhere at the moment)}{
93 \starttyping
94 -- from hyphen-norwegian:
95 ['bokmal'] = {
96 loader = 'loadhyph-nb.tex',
97 lefthyphenmin = 2,
98 righthyphenmin = 2,
99 synonyms = { 'norwegian', 'norsk' },
100 patterns = 'hyph-nb.pat.txt',
101 hyphenation = 'hyph-nb.hyp.txt',
102 },
103 ['nynorsk'] = {
104 loader = 'loadhyph-nn.tex',
105 lefthyphenmin = 2,
106 righthyphenmin = 2,
107 synonyms = { },
108 patterns = 'hyph-nn.pat.txt',
109 hyphenation = 'hyph-nn.hyp.txt',
110 },
111 \stoptyping
112 }
113
114 The files \type{language.dat} and \type{language.def} are used both by 8-bit and native Unicode engines. On one hand this simplifies things, while on the other it makes very little sense to include sanskrit patterns in \pdfTeX\ -- the package doesn't load any patterns in that case any way. It might be that there will be multiple copies of \type{language.dat} for different engines in future.
115
116 \subsection{\MiKTeX}
117
118 In \MiKTeX\ application {\bf MiKTeX Options} which you can run from Start menu ({\em Maintenance} $\rightarrow$ {\em Settings} or {\em Maintenance (Admin)} $\rightarrow$ {\em Settings (Admin)\/}) or from command line (\type{mo.exe} or \type{mo_admin.exe}) you can select which languages you want to include into \TeX\ formats.
119
120 \placefigure[force]{user interface to select the desired languages}{\externalfigure[img/MiKTeX-languages.png]}%[width=7cm]
121
122 Based on that selection \MiKTeX\ creates three files \type{language.dat}, \type{language.def} and \type{language.dat.lua} in directory
123 \starttyping
124 C:\ProgramData\MiKTeX\2.9\tex\generic\config
125 \stoptyping
126
127 The contents of those files are the same as described in \TeXLive\ section, but the needed information about names of languages and required files comes from
128 \starttyping
129 C:\Program Files\MiKTeX 2.9\MiKTeX\config\languages.ini
130 \stoptyping
131 instead of special \type{hyphen-}{\tt\sl<foo>} packages.
132
133 (Exact location might depend on where you install \MiKTeX\ and whether you install it for all users or just for yourself. It may also depend on Windows version. The information above holds for \MiKTeX\ 2.9 on Windows 7 with system-wide installation.)
134
135 \placefigure[force]{\type{languages.ini}}{
136 \starttyping
137 [bokmal]
138 loader=loadhyph-nb.tex
139 lefthyphenmin=2
140 righthyphenmin=2
141 synonyms=norwegian,norsk
142 patterns=hyph-nb.pat.txt
143
144 [nynorsk]
145 loader=loadhyph-nn.tex
146 lefthyphenmin=2
147 righthyphenmin=2
148 patterns=hyph-nn.pat.txt
149 \stoptyping
150 }
151
152 % \subsection{\W32TeX}
153
154 \page
155
156 List of languages in \TeXLive\ 2017:
157 \startcolumns[two]
158 \starttyping
159 collection-langarabic
160 hyphen-arabic
161 arabic
162 hyphen-farsi
163 farsi,persian
164 collection-langchinese
165 hyphen-chinese
166 pinyin
167 collection-langcyrillic
168 hyphen-belarusian
169 belarusian
170 hyphen-bulgarian
171 bulgarian
172 hyphen-churchslavonic
173 churchslavonic
174 hyphen-mongolian
175 mongolian
176 mongolianlmc
177 hyphen-russian
178 russian
179 hyphen-serbian
180 serbian
181 serbianc
182 hyphen-ukrainian
183 ukrainian
184 collection-langczechslovak
185 hyphen-czech
186 czech
187 hyphen-slovak
188 slovak
189 collection-langenglish
190 hyphen-english
191 ukenglish,british,UKenglish
192 usenglishmax
193 collection-langeuropean
194 hyphen-armenian
195 armenian
196 hyphen-croatian
197 croatian
198 hyphen-danish
199 danish
200 hyphen-dutch
201 dutch
202 hyphen-estonian
203 estonian
204 hyphen-finnish
205 finnish
206 hyphen-friulan
207 friulan
208 hyphen-hungarian
209 hungarian
210 hyphen-icelandic
211 icelandic
212 hyphen-irish
213 irish
214 hyphen-kurmanji
215 kurmanji
216 hyphen-latin
217 classiclatin
218 latin
219 liturgicallatin
220 hyphen-latvian
221 latvian
222 hyphen-lithuanian
223 lithuanian
224 hyphen-norwegian
225 bokmal,norwegian,norsk
226 nynorsk
227 hyphen-occitan
228 occitan
229 hyphen-piedmontese
230 piedmontese
231 hyphen-romanian
232 romanian
233 hyphen-romansh
234 romansh
235 hyphen-slovenian
236 slovenian,slovene
237 hyphen-swedish
238 swedish
239 hyphen-turkish
240 turkish
241 hyphen-uppersorbian
242 uppersorbian
243 hyphen-welsh
244 welsh
245 collection-langfrench
246 hyphen-basque
247 basque
248 hyphen-french
249 french,patois,francais
250 collection-langgerman
251 hyphen-german
252 german
253 ngerman
254 swissgerman
255 collection-langgreek
256 hyphen-greek
257 monogreek
258 greek,polygreek
259 hyphen-ancientgreek
260 ancientgreek
261 ibycus
262 collection-langitalian
263 hyphen-italian
264 italian
265 collection-langother
266 hyphen-afrikaans
267 afrikaans
268 hyphen-coptic
269 coptic
270 hyphen-esperanto
271 esperanto
272 hyphen-ethiopic
273 ethiopic,amharic,geez
274 hyphen-georgian
275 georgian
276 hyphen-indic
277 assamese
278 bengali
279 gujarati
280 hindi
281 kannada
282 malayalam
283 marathi
284 oriya
285 panjabi
286 tamil
287 telugu
288 hyphen-indonesian
289 indonesian
290 hyphen-interlingua
291 interlingua
292 hyphen-sanskrit
293 sanskrit
294 hyphen-thai
295 thai
296 hyphen-turkmen
297 turkmen
298 collection-langpolish
299 hyphen-polish
300 polish
301 collection-langportuguese
302 hyphen-portuguese
303 portuguese,portuges
304 collection-langspanish
305 hyphen-spanish
306 spanish,espanol
307 hyphen-catalan
308 catalan
309 hyphen-galician
310 galician
311 \stoptyping
312 \stopcolumns
313
314 % \section{Special cases}
315 %
316 % \subsection{German}
317 %
318 % \subsection{Russian and Ukrainian}
319 %
320 % \section{How to add your own language?}
321
322 \stoptext