diff options
author | Karl Berry <karl@freefriends.org> | 2006-11-16 01:02:47 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2006-11-16 01:02:47 +0000 |
commit | 3c85b55e2f245fb7edac7e445f107e6d0bb423ae (patch) | |
tree | c62b7f80edafe0455310d08e09f4218127bf9e87 /Master/texmf-dist/tex/context/base/lang-ini.tex | |
parent | e5ecff27a26ef59e1dbe9702677687fd7107be3a (diff) |
context update
git-svn-id: svn://tug.org/texlive/trunk@2444 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/context/base/lang-ini.tex')
-rw-r--r-- | Master/texmf-dist/tex/context/base/lang-ini.tex | 128 |
1 files changed, 94 insertions, 34 deletions
diff --git a/Master/texmf-dist/tex/context/base/lang-ini.tex b/Master/texmf-dist/tex/context/base/lang-ini.tex index e435c2420cf..f47a4e9147f 100644 --- a/Master/texmf-dist/tex/context/base/lang-ini.tex +++ b/Master/texmf-dist/tex/context/base/lang-ini.tex @@ -95,17 +95,17 @@ \stopmessages \startmessages norwegian library: linguals - title: språk - 1: orddelingsmønster -- for -- er lest inn (n=--,e=--,m=--) - 2: ingen orddelingsmønster -- for -- (n=--,e=--,m=--) (--,--) + title: sprøk + 1: orddelingsmønster -- for -- er lest inn (n=--,e=--,m=--) + 2: ingen orddelingsmønster -- for -- (n=--,e=--,m=--) (--,--) 3: orddelingsdefinisjon -- for -- er lest inn (n=--,e=--,m=--) 4: ingen orddelingsdefinisjon -- for -- (n=--,e=--,m=--) - 5: orddelingsmønster for -- er ikke lest inn - 6: språk -- er udefinert - 7: språk spesifikk opsjon [--] introduserer et -- hopp - 8: språk spesifikk opsjon [--] problemfritt tilføyd - 9: språk -- er aktivt - 10: orddelingsmønster -- er lest inn + 5: orddelingsmønster for -- er ikke lest inn + 6: sprà k -- er udefinert + 7: sprà k spesifikk opsjon [--] introduserer et -- hopp + 8: sprà k spesifikk opsjon [--] problemfritt tilføyd + 9: sprà k -- er aktivt + 10: orddelingsmønster -- er lest inn \stopmessages \startmessages romanian library: linguals @@ -122,6 +122,20 @@ 10: sabloanele -- incarcate \stopmessages +\startmessages french library: linguals + title: langue + 1: les motifs -- pour -- sont chargés (n=--,e=--,m=--) + 2: pas de motifs -- pour -- (n=--,e=--,m=--) (--,--) + 3: hyphenations -- pour -- chargés (n=--,e=--,m=--) + 4: pas d'hyphenations -- pour -- (n=--,e=--,m=--) + 5: les motifs pour -- ne sont pas chargés + 6: langue -- non définie + 7: les options spécifiques de langue [--] introduisent un -- saut + 8: les options spécifiques de langue [--] sont ajoutés en douceur + 9: la langue -- est active + 10: motifs -- chargés +\stopmessages + %D When loading hyphenation patterns, \TEX\ assign a number to %D each loaded table, starting with~0. Switching to a specific %D table is done by assigning the relevant number to the @@ -165,11 +179,31 @@ %D the languages. The current langage is saved in the macro %D \type {\currentlanguage}. The setup macro is mainly used %D for cosmetic purposes. +%D +%D \starttyping +%D \dorecurse{3} +%D {\language[nl] +%D \startmode[*en] english \stopmode +%D \startmode[*nl] dutch \stopmode +%D \language[en] +%D \startmode[*en] english \stopmode +%D \startmode[*nl] dutch \stopmode} +%D \stoptyping \let\currentlanguage \empty \let\currentmainlanguage\empty -\def\setupcurrentlanguage[#1]{\def\currentlanguage{#1}} +\def\setupcurrentlanguage[#1]{\setcurrentlanguage\currentmainlanguage{#1}} + +\def\setcurrentlanguage#1#2% sets modes: **id (currentmain) *id (current) + {\doifsomething{#1} + {\ifx\currentmainlanguage\empty\else\resetsystemmode{\systemmodeprefix\currentmainlanguage}\fi + \edef\currentmainlanguage{#1}% + \setsystemmode{\systemmodeprefix\currentmainlanguage}}% + \doifsomething{#2} + {\ifx\currentlanguage\empty\else\resetsystemmode\currentlanguage\fi + \edef\currentlanguage{#2}% + \setsystemmode\currentlanguage}} %D The internal macros will be defined later. @@ -249,6 +283,8 @@ \s!patterns=, \s!mapping=, \s!encoding=, + \s!lefthyphenmin=\defaultlanguageparameter\s!lefthyphenmin, + \s!righthyphenmin=\defaultlanguageparameter\s!righthyphenmin, #2]}% \doifvalue{\??la#1\c!default}{#1}{\letvalue{\??la#1\c!default}\empty}% % loop in deo: \doifvalue{\??la#1\s!patterns}{#1}{\letvalue{\??la#1\c!default}\empty}% @@ -303,22 +339,23 @@ \dodoloadpatterns{#1}{#2}{}{}% \fi} +\def\setuphyppatencoding + {\pathypsettings + \enableregime[utf]} + +\beginXETEX + \def\setuphyppatencoding + {\pathypsettings} +\endXETEX + \def\dodoloadpatterns#1#2#3#4% beware, loaded language also incr {\normallanguage\loadedlanguage % when not really needed \bgroup - % \startencoding[#3]% - % \enablemapping[#4]% hm, does a sync patterns - % \doifnothing\currentencoding{\let\currentencoding\s!default}% - % \doifnothing\currentmapping {\let\currentmapping \s!default}% - % better: \let\synchronizepatterns\relax % needed? \let\enabledmapping \empty % needed? - % old (original) patterns \doifelsenothing{#3}{\enableencoding[\s!default]}{\enableencoding[#3]}% \doifelsenothing{#4}{\enablemapping [\s!default]}{\enablemapping [#4]}% - % new patterns - % \enableregime[utf]% - % + \setuphyppatencoding \ifundefined{\??la\??la:\currentencoding:\currentmapping:#2}% \let\doshowpatterns\relax \edef\alreadyloadedlanguage @@ -373,13 +410,8 @@ %D Quick and dirty, but useful: %D %D \showsetup{setuplanguage} - -% \def\setuplanguage -% {\dodoubleargument\dosetuplanguage} - -% \def\dosetuplanguage[#1][#2]% -% {\getparameters[\??la#1][#2]% -% \doif{#1}\currentlanguage\docomplexlanguage} +%D +%D Beware, this command can only be used when a language is installed. \unprotected \def\setuplanguage {\dodoubleempty\dosetuplanguage} @@ -593,7 +625,7 @@ \ifcsname\l!prefix!\askedlanguage\endcsname \edef\askedlanguage{\csname\l!prefix!\askedlanguage\endcsname}% \ifx\currentlanguage\askedlanguage \else - \let\currentlanguage\askedlanguage + \setcurrentlanguage\currentmainlanguage\askedlanguage \docomplexlanguage \fi \else @@ -613,7 +645,7 @@ \else \edef\askedlanguage{\csname\l!prefix!\askedlanguage\endcsname}% \ifx\currentlanguage\askedlanguage \else - \let\currentlanguage\askedlanguage + \setcurrentlanguage\currentmainlanguage\askedlanguage \docomplexlanguage \fi \fi @@ -633,8 +665,7 @@ \ifcsname\l!prefix!\askedlanguage\endcsname \edef\askedlanguage{\csname\l!prefix!\askedlanguage\endcsname}% \ifx\currentmainlanguage\askedlanguage \else - \let\currentmainlanguage\askedlanguage - \let\currentlanguage\askedlanguage + \setcurrentlanguage\askedlanguage\askedlanguage \docomplexlanguage \fi \fi @@ -650,8 +681,7 @@ \@EA\ifx\csname\l!prefix!\askedlanguage\endcsname\relax\else \edef\askedlanguage{\csname\l!prefix!\askedlanguage\endcsname}% \ifx\currentmainlanguage\askedlanguage \else - \let\currentmainlanguage\askedlanguage - \let\currentlanguage\askedlanguage + \setcurrentlanguage\askedlanguage\askedlanguage \docomplexlanguage \fi \fi @@ -680,12 +710,18 @@ % \def\languageparameter#1% % {\csname\??la\defaultlanguage\currentlanguage#1\endcsname} -\def\languageparameter +\def\languageparameter % @EA = speedup {\@EA\dolanguageparameter\@EA{\defaultlanguage\currentlanguage}} -\def\xxlanguageparameter#1% +\def\specificlanguageparameter#1% @EA = speedup + {\@EA\dospecificlanguageparameter\@EA{\defaultlanguage{#1}}{#1}} + +\def\xxlanguageparameter#1% @EA = speedup {\@EA\dolanguageparameter\@EA{\defaultlanguage{#1}}} +\def\defaultlanguageparameter#1% + {\csname\??la\s!default#1\endcsname} + \beginETEX \def\dolanguageparameter#1#2% @@ -699,6 +735,17 @@ \fi\fi #2\endcsname} + \def\dospecificlanguageparameter#1#2#3% + {\csname\??la + \ifcsname\??la#2#3\endcsname + \@EA\ifx\csname\??la#2#3\endcsname\empty\s!default\else#2\fi + \else\ifcsname\??la#1#3\endcsname + \@EA\ifx\csname\??la#1#3\endcsname\empty\s!default\else#1\fi + \else + \s!default + \fi\fi + #3\endcsname} + \endETEX \beginTEX @@ -716,6 +763,19 @@ \fi #2\endcsname} + \def\dospecificlanguageparameter#1#2#3% + {\csname\??la + \@EA\ifx\csname\??la#2#3\endcsname\relax + \@EA\ifx\csname\??la#1#3\endcsname\relax + \s!default + \else + \@EA\ifx\csname\??la#1#3\endcsname\empty\s!default\else#1\fi + \fi + \else + \@EA\ifx\csname\??la#2#3\endcsname\empty\s!default\else#2\fi + \fi + #3\endcsname} + \endTEX % moved |