% hyconfig.tex % Hyphenation configuration code % Updates: % 02/28/92 language number setting was wrong. % 03/20/92 allow hyphenation exceptions file (in language.dat) loading. % 06/23/92 call the appropriate hymltex* file when using MlTeX % 07/03/92 add \accenthypencodes % 08/24/92 introduce \l@ being the language number % 08/26/92 suppress absolute font character references normally unneeded % 03/03/93 add dialect feature via ``='' sign. % 04/02/93 add \input compatible.tex when \csubinverse undefined. % 08/19/93 apply \c mods from MJF -- July 14, 92 % 08/20/93 insert space after \input X for NFSS2 (H. Soulard) % 01/13/94 add \j def for non french languages (noted by R. Lemieux). % 03/22/94 \LANGUAGESinFORMAT now contains all languages names (proposed % by Michel Lavaud). % \input hyphen replaced by \input ushyphen (sugg. of M.Lavaud). % 05/05/94 \patterns@loaded replace \LANGUAGESinFORMAT as in Babel. % 08/10/94 \input replaced by \@@input if already defined. % 10/18/94 Load compatible.tex only outside MlTeX. % 12/13/94 Allow nothing else than =name in language.dat % 12/17/94 Let language counter progress when equal sign after first language. % 12/22/94 Don't load compatible.tex whith 2e any way. % 03/02/95 " " " " any other format not OT1, this % was clearly pointed by Thierry Bouche. % 03/22/95 \encodingdefault may be undefined (as pointed by Loic Prylli). % \message{languages: patterns and exceptions,} %% %% checksum = "24430 129 519 5534" %% \ifx\@@input\undefined\let\@@input\input\fi% \def\@temp{}\let\spechyphcodes\relax\let\accenthyphcodes\relax% pure TeX \ifx\starthyph\undefined\else\def\@temp{\@@input hymltex2.tex \endinput}\fi %\let\charsubdef\undefined% for testing purposes only \ifx\charsubdef\undefined\else\def\@temp{\@@input hymltex3.tex \endinput}\fi \@temp \ifx\encodingdefault\undefined\def\encodingdefault{OT1}\fi% \ifx\csubinverse\undefined\edef\@temp{LaTeX2e}% \ifx\@temp\fmtname\else\edef\@temp{OT1}\edef\@tempa{\encodingdefault}% \ifx\@tempa\@temp% \@@input compatible % not for 2e \fi% \fi% \fi% %%%%%%%%%%%%%% pure TeX usage % =========== Special hyphenation codes ==== \gdef\accenthyphcodes{ \def\oe{^^[} % \oe % appropriate character subsitution for patterns \def\i{^^P} % \i % appropriate character subsitution for patterns \def\j{^^Q} % \j % appropriate character subsitution for patterns \def\'##1{\csname @ac@##1\endcsname} \def\`##1{\csname @gr@##1\endcsname} \def\v##1{\csname @v@##1\endcsname} %\let\^^_=\v % --bg don't see any need \def\u##1{\csname @u@##1\endcsname} %\let\^^S=\u % --bg don't see any need \def\=##1{\csname @eq@##1\endcsname} \def\^##1{\csname @hat@##1\endcsname} %\let\^^D=\^ % --bg don't see any need \def\.##1{\csname @dot@##1\endcsname} \def\H##1{\csname @H@##1\endcsname} \def\~##1{\csname @til@##1\endcsname} \def\"##1{\csname @um@##1\endcsname} %\let\@c@@=\c % recursive definition of \c does not work when letter is not in font % MJF -- July 14, 92 \def\@c@@##1{\setbox\z@\hbox{##1}\ifdim\ht\z@=1ex\accent24 ##1% \else{\ooalign{\unhbox\z@\crcr\hidewidth\char24\hidewidth}}\fi} \def\c##1{\csname @c@##1\endcsname} } \gdef\spechyphcodes{} \language=0 % ======== Load Patterns as described in language.dat ====== % (language.dat was introduced by Johannes Braams) {\newcount\l@nguage\newcount\initl@\newcount\workl@% % Compatibility with TeX 2: \language count \ifx\language\let\language\l@nguage\fi \initl@=\language\l@nguage=\initl@\workl@=\l@nguage \xdef\patterns@loaded{}% will contain all languages names \def\@newlanguage[#1]#2{\language=#1% \workl@=#1\advance\workl@ by -\initl@ \message{The #2 language is used as language number \the\workl@}% \expandafter\xdef\csname l@#2\endcsname{\the\workl@}% 08/24/92 \xdef\patterns@loaded{\patterns@loaded\space #2} \expandafter\xdef\csname#2\endcsname{\language=\the\workl@\relax}%2/28/92 \ifx\undefined\defaultlanguage\gdef\defaultlanguage{\csname#2\endcsname}\fi}% % test if #1 equal ``='' that means same language hyphenation but a dialect. \edef\test{=}% \def\@language#1#2 #3 #4/#5{\def\@tempa{=}\def\@tempb{#1}% \ifx\@tempa\@tempb% \ifnum\l@nguage > \initl@ \advance\l@nguage by -1\fi% \@newlanguage[\the\l@nguage]{#2}% \ifnum\l@nguage \test \initl@ \advance\l@nguage by -1\fi% \else\edef\test{<}\@l@ngu@ge#1#2 #3 #4/{#5}% \fi}% \def\@l@ngu@ge#1 #2 #3/#4{\begingroup\@newlanguage[#4]{#1}%20/3/92 mods \def\@tempa{#2} \ifx\@tempa\empty\else\expandafter\@@input#2 \relax\fi%% loading of patterns \edef\@tempa{#3}\edef\@tempb{\space\space} \ifx\@tempb\@tempa\else\expandafter\@@input#3 \relax\fi%% loading of exceptions \endgroup} \newif\if@more\@moretrue \openin1 = language.dat \ifeof1\message{Error: file language.dat not found, trying to load % US-english hyphenation file}\language=0\input ushyphen \else\advance\l@nguage by -1 \loop \endlinechar=-1 \read1 to \@lineD \endlinechar`\^^M \ifx\@lineD\empty \else \advance\l@nguage by 1% \edef\@lineD{\@lineD\space\space/{\the\l@nguage}}% \expandafter\@language\@lineD \fi \ifeof1 \@morefalse \fi \if@more\repeat \fi\closein1 }\defaultlanguage% go to the default language (first defined in language.dat) \endinput