summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/generic/babel
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2015-08-03 22:05:09 +0000
committerKarl Berry <karl@freefriends.org>2015-08-03 22:05:09 +0000
commit2d5aaeac9797374ab4ba49d579116893e1e949a3 (patch)
tree8b4ff321ffaebcc8c6d160013ef6e60f41e32af2 /Master/texmf-dist/tex/generic/babel
parentb1bd2dbbfd4d6be2af62246fa1889e5470fd45f0 (diff)
babel (3aug15)
git-svn-id: svn://tug.org/texlive/trunk@38036 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/generic/babel')
-rw-r--r--Master/texmf-dist/tex/generic/babel/babel.def8
-rw-r--r--Master/texmf-dist/tex/generic/babel/babel.sty7
-rw-r--r--Master/texmf-dist/tex/generic/babel/blplain.tex2
-rw-r--r--Master/texmf-dist/tex/generic/babel/bplain.tex2
-rw-r--r--Master/texmf-dist/tex/generic/babel/hyphen.cfg6
-rw-r--r--Master/texmf-dist/tex/generic/babel/luababel.def97
-rw-r--r--Master/texmf-dist/tex/generic/babel/nil.ldf4
-rw-r--r--Master/texmf-dist/tex/generic/babel/plain.def2
-rw-r--r--Master/texmf-dist/tex/generic/babel/switch.def10
9 files changed, 106 insertions, 32 deletions
diff --git a/Master/texmf-dist/tex/generic/babel/babel.def b/Master/texmf-dist/tex/generic/babel/babel.def
index ed3232d161b..3d32f7e8f1b 100644
--- a/Master/texmf-dist/tex/generic/babel/babel.def
+++ b/Master/texmf-dist/tex/generic/babel/babel.def
@@ -38,7 +38,7 @@
%% and covered by LPPL is defined by the unpacking scripts (with
%% extension .ins) which are part of the distribution.
%% File 'babel.dtx'
-%%\ProvidesFile{babel.dtx}[2014/09/25 v3.9l The Babel package]
+%%\ProvidesFile{babel.dtx}[2015/08/03 v3.9m The Babel package]
%% Babel package for LaTeX2e.
%% Copyright (C) 1989-2008 by Johannes Braams,
%% TeXniek
@@ -56,11 +56,11 @@
\wlog{File: #1 #4 #3 <#2>}%
\let\ProvidesFile\@undefined}
\fi
-\ProvidesFile{babel.def}[2014/09/25 3.9l Babel common definitions]
+\ProvidesFile{babel.def}[2015/08/03 3.9m Babel common definitions]
\ifx\AtBeginDocument\@undefined
\input plain.def\relax
\fi
-\def\bbl@tempa{3.9l}%
+\def\bbl@tempa{3.9m}%
\ifx\bbl@version\bbl@tempa\else
\input switch.def\relax
\fi
@@ -718,7 +718,7 @@
\ifx\bbl@hyphlist\@empty\else
\bbl@warning{%
You must not intermingle \string\selectlanguage\space and\\%
- \string\babelhyphenation\space or some exception will not\\%
+ \string\babelhyphenation\space or some exceptions will not\\%
be taken into account. Reported}%
\fi
\ifx\@empty#1%
diff --git a/Master/texmf-dist/tex/generic/babel/babel.sty b/Master/texmf-dist/tex/generic/babel/babel.sty
index bfe4259cda9..5de7c55e299 100644
--- a/Master/texmf-dist/tex/generic/babel/babel.sty
+++ b/Master/texmf-dist/tex/generic/babel/babel.sty
@@ -38,7 +38,7 @@
%% and covered by LPPL is defined by the unpacking scripts (with
%% extension .ins) which are part of the distribution.
%% File 'babel.dtx'
-%%\ProvidesFile{babel.dtx}[2014/09/25 v3.9l The Babel package]
+%%\ProvidesFile{babel.dtx}[2015/08/03 v3.9m The Babel package]
%% Babel package for LaTeX2e.
%% Copyright (C) 1989-2008 by Johannes Braams,
%% TeXniek
@@ -48,10 +48,10 @@
%% by Javier Bezos
%% all rights reserved.
\NeedsTeXFormat{LaTeX2e}[2005/12/01]
-\ProvidesPackage{babel}[2014/09/25 3.9l The Babel package]
+\ProvidesPackage{babel}[2015/08/03 3.9m The Babel package]
\@ifpackagewith{babel}{debug}
{\input switch.def\relax}
- {\def\bbl@tempa{3.9l}%
+ {\def\bbl@tempa{3.9m}%
\ifx\bbl@version\bbl@tempa\else
\input switch.def\relax
\fi}
@@ -243,6 +243,7 @@
\DeclareOption{lowersorbian}{\bbl@load@language{lsorbian}}
\DeclareOption{malay}{\bbl@load@language{bahasam}}
\DeclareOption{meyalu}{\bbl@load@language{bahasam}}
+\DeclareOption{melayu}{\bbl@load@language{bahasam}}
\DeclareOption{newzealand}{\bbl@load@language{english}}
\DeclareOption{nynorsk}{\bbl@load@language{norsk}}
\DeclareOption{polutonikogreek}{%
diff --git a/Master/texmf-dist/tex/generic/babel/blplain.tex b/Master/texmf-dist/tex/generic/babel/blplain.tex
index d80d8ee843d..948340c523b 100644
--- a/Master/texmf-dist/tex/generic/babel/blplain.tex
+++ b/Master/texmf-dist/tex/generic/babel/blplain.tex
@@ -38,7 +38,7 @@
%% and covered by LPPL is defined by the unpacking scripts (with
%% extension .ins) which are part of the distribution.
%% File 'babel.dtx'
-%%\ProvidesFile{babel.dtx}[2014/09/25 v3.9l The Babel package]
+%%\ProvidesFile{babel.dtx}[2015/08/03 v3.9m The Babel package]
%% Babel package for LaTeX2e.
%% Copyright (C) 1989-2008 by Johannes Braams,
%% TeXniek
diff --git a/Master/texmf-dist/tex/generic/babel/bplain.tex b/Master/texmf-dist/tex/generic/babel/bplain.tex
index 63f66c12e44..a38632250f1 100644
--- a/Master/texmf-dist/tex/generic/babel/bplain.tex
+++ b/Master/texmf-dist/tex/generic/babel/bplain.tex
@@ -38,7 +38,7 @@
%% and covered by LPPL is defined by the unpacking scripts (with
%% extension .ins) which are part of the distribution.
%% File 'babel.dtx'
-%%\ProvidesFile{babel.dtx}[2014/09/25 v3.9l The Babel package]
+%%\ProvidesFile{babel.dtx}[2015/08/03 v3.9m The Babel package]
%% Babel package for LaTeX2e.
%% Copyright (C) 1989-2008 by Johannes Braams,
%% TeXniek
diff --git a/Master/texmf-dist/tex/generic/babel/hyphen.cfg b/Master/texmf-dist/tex/generic/babel/hyphen.cfg
index 3e4021001b1..238c31a0437 100644
--- a/Master/texmf-dist/tex/generic/babel/hyphen.cfg
+++ b/Master/texmf-dist/tex/generic/babel/hyphen.cfg
@@ -38,7 +38,7 @@
%% and covered by LPPL is defined by the unpacking scripts (with
%% extension .ins) which are part of the distribution.
%% File 'babel.dtx'
-%%\ProvidesFile{babel.dtx}[2014/09/25 v3.9l The Babel package]
+%%\ProvidesFile{babel.dtx}[2015/08/03 v3.9m The Babel package]
%% Babel package for LaTeX2e.
%% Copyright (C) 1989-2008 by Johannes Braams,
%% TeXniek
@@ -52,7 +52,7 @@
\wlog{File: #1 #4 #3 <#2>}%
\let\ProvidesFile\@undefined}
\fi
-\ProvidesFile{hyphen.cfg}[2014/09/25 3.9l Babel hyphens]
+\ProvidesFile{hyphen.cfg}[2015/08/03 3.9m Babel hyphens]
\xdef\bbl@format{\jobname}
\ifx\AtBeginDocument\@undefined
\def\@empty{}
@@ -83,7 +83,7 @@
\countdef\last@language=19
\def\addlanguage{\alloc@9\language\chardef\@cclvi}
\fi
-\toks8{Babel <3.9l> and hyphenation patterns for }%
+\toks8{Babel <3.9m> and hyphenation patterns for }%
\def\process@line#1#2 #3 #4 {%
\ifx=#1%
\process@synonym{#2}%
diff --git a/Master/texmf-dist/tex/generic/babel/luababel.def b/Master/texmf-dist/tex/generic/babel/luababel.def
index 0eeedc14690..dc8f155e23d 100644
--- a/Master/texmf-dist/tex/generic/babel/luababel.def
+++ b/Master/texmf-dist/tex/generic/babel/luababel.def
@@ -41,7 +41,12 @@
%% Babel package for LaTeX version 2e
%% Copyright (C) 2103-2014
%% by Javier Bezos
-\directlua{%
+\begingroup
+\catcode`\%=12
+\catcode`\'=12
+\catcode`\"=12
+\catcode`\:=12
+\directlua{
require("luatex-hyphen")
Babel = {}
function Babel.bytes(line)
@@ -50,7 +55,8 @@
end
function Babel.begin_process_input()
if luatexbase and luatexbase.add_to_callback then
- luatexbase.add_to_callback('process_input_buffer',Babel.bytes,'Babel.bytes')
+ luatexbase.add_to_callback('process_input_buffer',
+ Babel.bytes,'Babel.bytes')
else
Babel.callback = callback.find('process_input_buffer')
callback.register('process_input_buffer',Babel.bytes)
@@ -63,7 +69,33 @@
callback.register('process_input_buffer',Babel.callback)
end
end
+ function Babel.addpatterns(pp, lg)
+ local lg = lang.new(lg)
+ local pats = lang.patterns(lg) or ''
+ lang.clear_patterns(lg)
+ for p in pp:gmatch('[^%s]+') do
+ ss = ''
+ for i in string.utfcharacters(p:gsub('%d', '')) do
+ ss = ss .. '%d?' .. i
+ end
+ ss = ss:gsub('^%%d%?%.', '%%.') .. '%d?'
+ ss = ss:gsub('%.%%d%?$', '%%.')
+ pats, n = pats:gsub('%s' .. ss .. '%s', ' ' .. p .. ' ')
+ if n == 0 then
+ tex.sprint(
+ [[\string\csname\space bbl@info\endcsname{New pattern: ]]
+ .. p .. [[}]])
+ pats = pats .. ' ' .. p
+ else
+ tex.sprint(
+ [[\string\csname\space bbl@info\endcsname{Renew pattern: ]]
+ .. p .. [[}]])
+ end
+ end
+ lang.patterns(lg, pats)
+ end
}
+\endgroup
\def\BabelStringsDefault{unicode}
\let\luabbl@stop\relax
\AddBabelHook{luatex}{encodedcommands}{%
@@ -77,25 +109,39 @@
\luabbl@stop
\let\luabbl@stop\relax}
\AddBabelHook{luatex}{patterns}{%
- \ifx\directlua\relax\else
- \ifcsname lu@texhyphen@loaded@\the\language\endcsname \else
- \global\@namedef{lu@texhyphen@loaded@\the\language}{}%
- \directlua{
- luatexhyphen.loadlanguage('\luatexluaescapestring{\string#1}',
- '\the\language')}%
- \fi
- \fi}
+ \ifcsname lu@texhyphen@loaded@\the\language\endcsname \else
+ \global\@namedef{lu@texhyphen@loaded@\the\language}{}%
+ \directlua{
+ luatexhyphen.loadlanguage([[\string#1]],
+ '\the\language')}%
+ \fi
+ \@ifundefined{bbl@patterns@}{}{%
+ \begingroup
+ \@expandtwoargs\in@{,\number\language,}{,\bbl@pttnlist}%
+ \ifin@\else
+ \ifx\bbl@patterns@\@empty\else
+ \directlua{ Babel.addpatterns(
+ [[\bbl@patterns@]], \number\language) }%
+ \fi
+ \@ifundefined{bbl@patterns@#1}%
+ \@empty
+ {\directlua{ Babel.addpatterns(
+ [[\space\csname bbl@patterns@#1\endcsname]],
+ \number\language) }}%
+ \xdef\bbl@pttnlist{\bbl@pttnlist\number\language,}%
+ \fi
+ \endgroup}}
\AddBabelHook{luatex}{adddialect}{%
\ifx\directlua\relax\else
\directlua{
- luatexhyphen.adddialect('\luatexluaescapestring{\string#1}',
- '\luatexluaescapestring{\string#2}')
+ luatexhyphen.adddialect([[\string#1]],
+ [[\string#2]])
}%
\fi}
\AddBabelHook{luatex}{everylanguage}{%
\directlua{
processnow = (tex.language == 0) or
- (luatexhyphen.lookupname('\luatexluaescapestring{\string#1}') == nil)}%
+ (luatexhyphen.lookupname([[\string#1]]) == nil)}%
\ifnum0=\directlua{tex.sprint(processnow and "0" or "1")}\relax
\global\@namedef{lu@texhyphen@loaded@\the\language}{}%
\fi}
@@ -108,6 +154,31 @@
\input #1\relax
\fi
\directlua{processnow = nil}}
+\@onlypreamble\babelpatterns
+\AtEndOfPackage{%
+ \newcommand\babelpatterns[2][\@empty]{%
+ \ifx\bbl@patterns@\relax
+ \let\bbl@patterns@\@empty
+ \fi
+ \ifx\bbl@pttnlist\@empty\else
+ \bbl@warning{%
+ You must not intermingle \string\selectlanguage\space and\\%
+ \string\babelpatterns\space or some patterns will not\\%
+ be taken into account. Reported}%
+ \fi
+ \ifx\@empty#1%
+ \protected@edef\bbl@patterns@{\bbl@patterns@\space#2}%
+ \else
+ \edef\bbl@tempb{\zap@space#1 \@empty}%
+ \bbl@for\bbl@tempa\bbl@tempb{%
+ \bbl@fixname\bbl@tempa
+ \bbl@iflanguage\bbl@tempa{%
+ \bbl@csarg\protected@edef{patterns@\bbl@tempa}{%
+ \@ifundefined{bbl@patterns@\bbl@tempa}%
+ \@empty
+ {\csname bbl@patterns@\bbl@tempa\endcsname\space}%
+ #2}}}%
+ \fi}}
\AddBabelHook{xetex}{loadkernel}{%
\begingroup
% Reset chars "80-"C0 to category "other", no case mapping:
diff --git a/Master/texmf-dist/tex/generic/babel/nil.ldf b/Master/texmf-dist/tex/generic/babel/nil.ldf
index 5179b3e8612..edddba78010 100644
--- a/Master/texmf-dist/tex/generic/babel/nil.ldf
+++ b/Master/texmf-dist/tex/generic/babel/nil.ldf
@@ -38,7 +38,7 @@
%% and covered by LPPL is defined by the unpacking scripts (with
%% extension .ins) which are part of the distribution.
%% File 'babel.dtx'
-%%\ProvidesFile{babel.dtx}[2014/09/25 v3.9l The Babel package]
+%%\ProvidesFile{babel.dtx}[2015/08/03 v3.9m The Babel package]
%% Babel package for LaTeX2e.
%% Copyright (C) 1989-2008 by Johannes Braams,
%% TeXniek
@@ -47,7 +47,7 @@
%% TeXniek
%% by Javier Bezos
%% all rights reserved.
-\ProvidesLanguage{nil}[2014/09/25 3.9l Nil language]
+\ProvidesLanguage{nil}[2015/08/03 3.9m Nil language]
\LdfInit{nil}{datenil}
\ifx\l@nohyphenation\@undefined
\@nopatterns{nil}
diff --git a/Master/texmf-dist/tex/generic/babel/plain.def b/Master/texmf-dist/tex/generic/babel/plain.def
index 86615c7fb27..7f2889efd9b 100644
--- a/Master/texmf-dist/tex/generic/babel/plain.def
+++ b/Master/texmf-dist/tex/generic/babel/plain.def
@@ -38,7 +38,7 @@
%% and covered by LPPL is defined by the unpacking scripts (with
%% extension .ins) which are part of the distribution.
%% File 'babel.dtx'
-%%\ProvidesFile{babel.dtx}[2014/09/25 v3.9l The Babel package]
+%%\ProvidesFile{babel.dtx}[2015/08/03 v3.9m The Babel package]
%% Babel package for LaTeX2e.
%% Copyright (C) 1989-2008 by Johannes Braams,
%% TeXniek
diff --git a/Master/texmf-dist/tex/generic/babel/switch.def b/Master/texmf-dist/tex/generic/babel/switch.def
index 0e5654ea15a..5f26d4dadfd 100644
--- a/Master/texmf-dist/tex/generic/babel/switch.def
+++ b/Master/texmf-dist/tex/generic/babel/switch.def
@@ -38,7 +38,7 @@
%% and covered by LPPL is defined by the unpacking scripts (with
%% extension .ins) which are part of the distribution.
%% File 'babel.dtx'
-%%\ProvidesFile{babel.dtx}[2014/09/25 v3.9l The Babel package]
+%%\ProvidesFile{babel.dtx}[2015/08/03 v3.9m The Babel package]
%% Babel package for LaTeX2e.
%% Copyright (C) 1989-2008 by Johannes Braams,
%% TeXniek
@@ -52,7 +52,7 @@
\wlog{File: #1 #4 #3 <#2>}%
\let\ProvidesFile\@undefined}
\fi
-\ProvidesFile{switch.def}[2014/09/25 3.9l Babel switching mechanism]
+\ProvidesFile{switch.def}[2015/08/03 3.9m Babel switching mechanism]
\ifx\AtBeginDocument\@undefined
\input plain.def\relax
\fi
@@ -73,8 +73,8 @@
\countdef\last@language=19
\def\addlanguage{\alloc@9\language\chardef\@cclvi}
\fi
-\def\bbl@version{3.9l}
-\def\bbl@date{2014/09/25}
+\def\bbl@version{3.9m}
+\def\bbl@date{2015/08/03}
\def\adddialect#1#2{%
\global\chardef#1#2\relax
\bbl@usehooks{adddialect}{{#1}{#2}}%
@@ -240,6 +240,8 @@
\expandafter\bbl@switch\expandafter{\languagename}}}
\let\bbl@hyphlist\@empty
\let\bbl@hyphenation@\relax
+\let\bbl@pttnlist\@empty
+\let\bbl@patterns@\relax
\let\bbl@hymapsel=\@cclv
\def\bbl@patterns#1{%
\language=\expandafter\ifx\csname l@#1:\f@encoding\endcsname\relax