diff options
Diffstat (limited to 'Master/texmf-dist/tex/generic/babel/luababel.def')
-rw-r--r-- | Master/texmf-dist/tex/generic/babel/luababel.def | 47 |
1 files changed, 46 insertions, 1 deletions
diff --git a/Master/texmf-dist/tex/generic/babel/luababel.def b/Master/texmf-dist/tex/generic/babel/luababel.def index c5857c196fc..4bc4e24fd47 100644 --- a/Master/texmf-dist/tex/generic/babel/luababel.def +++ b/Master/texmf-dist/tex/generic/babel/luababel.def @@ -39,7 +39,7 @@ %% extension .ins) which are part of the distribution. %% File `bbunicode.dtx' %% Babel package for LaTeX version 2e -%% Copyright (C) 2103 +%% Copyright (C) 2103-2014 %% by Javier Bezos \directlua{% require("luatex-hyphen") @@ -92,6 +92,22 @@ '\luatexluaescapestring{\string#2}') }% \fi} +\AddBabelHook{luatex}{initiateactive}{% + \bbl@csarg\edef{doactive#2}{% + \futurelet\noexpand\let@token + \expandafter\noexpand\csname luabbl@doactive#2\endcsname}% + \def\bbl@tempa##1##2{% + \@namedef{luabbl@doactive#2}{% + \ifcat\noexpand\let@token a% + \expandafter##1% + \else\ifcat\noexpand\let@token.% + \expandafter\expandafter\expandafter##1% + \else + \expandafter\expandafter\expandafter##2% + \fi\fi}}% + \@expandtwoargs\bbl@tempa + {\expandafter\noexpand\csname user@active#2\endcsname}% + {\expandafter\noexpand\csname normal@char#2\endcsname}} \AddBabelHook{luatex}{everylanguage}{% \directlua{ processnow = (tex.language == 0) or @@ -108,6 +124,35 @@ \input #1\relax \fi \directlua{processnow = nil}} +\AddBabelHook{xetex}{loadkernel}{% + \begingroup + % Reset chars "80-"C0 to category "other", no case mapping: + \catcode`\@=11 \count@=128 + \loop\ifnum\count@<192 + \global\uccode\count@=0 \global\lccode\count@=0 + \global\catcode\count@=12 \global\sfcode\count@=1000 + \advance\count@ by 1 \repeat + % Other: + \def\O ##1 {% + \global\uccode"##1=0 \global\lccode"##1=0 + \global\catcode"##1=12 \global\sfcode"##1=1000 }% + % Letter: + \def\L ##1 ##2 ##3 {\global\catcode"##1=11 + \global\uccode"##1="##2 + \global\lccode"##1="##3 + % Uppercase letters have sfcode=999: + \ifnum"##1="##3 \else \global\sfcode"##1=999 \fi }% + % Letter without case mappings: + \def\l ##1 {\L ##1 ##1 ##1 }% + \l 00AA + \L 00B5 039C 00B5 + \l 00BA + \O 00D7 + \l 00DF + \O 00F7 + \L 00FF 0178 00FF + \endgroup + \input #1\relax} \def\babelFSstore#1{% \bbl@for\bbl@tempa{#1}{% \edef\bbl@tempb{\noexpand\bbl@FSstore{\bbl@tempa}} |