summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/generic
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2019-05-04 21:09:35 +0000
committerKarl Berry <karl@freefriends.org>2019-05-04 21:09:35 +0000
commit4c7e9e5ca9cf88c9a2a11e287c02649ef2f4dd21 (patch)
tree544b9382402947823e3ab550a1ef1f2701a2fac9 /Master/texmf-dist/tex/generic
parentdd5c343ffb293f783e4a2c3cefee4631478a4376 (diff)
babel (4may19)
git-svn-id: svn://tug.org/texlive/trunk@50977 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/generic')
-rw-r--r--Master/texmf-dist/tex/generic/babel/babel-bidi-basic-r.lua2
-rw-r--r--Master/texmf-dist/tex/generic/babel/babel-bidi-basic.lua2
-rw-r--r--Master/texmf-dist/tex/generic/babel/babel-data-bidi.lua (renamed from Master/texmf-dist/tex/generic/babel/babel-bidi.lua)4
-rw-r--r--Master/texmf-dist/tex/generic/babel/babel-data-cjk.lua288
-rw-r--r--Master/texmf-dist/tex/generic/babel/babel.def73
-rw-r--r--Master/texmf-dist/tex/generic/babel/babel.sty5
-rw-r--r--Master/texmf-dist/tex/generic/babel/hyphen.cfg2
-rw-r--r--Master/texmf-dist/tex/generic/babel/locale/ja/babel-ja.ini5
-rw-r--r--Master/texmf-dist/tex/generic/babel/locale/ko/babel-ko.ini5
-rw-r--r--Master/texmf-dist/tex/generic/babel/locale/yue/babel-yue.ini5
-rw-r--r--Master/texmf-dist/tex/generic/babel/locale/zh/babel-zh-Hans-HK.ini6
-rw-r--r--Master/texmf-dist/tex/generic/babel/locale/zh/babel-zh-Hans-MO.ini6
-rw-r--r--Master/texmf-dist/tex/generic/babel/locale/zh/babel-zh-Hans-SG.ini6
-rw-r--r--Master/texmf-dist/tex/generic/babel/locale/zh/babel-zh-Hans.ini6
-rw-r--r--Master/texmf-dist/tex/generic/babel/locale/zh/babel-zh-Hant-HK.ini6
-rw-r--r--Master/texmf-dist/tex/generic/babel/locale/zh/babel-zh-Hant-MO.ini6
-rw-r--r--Master/texmf-dist/tex/generic/babel/locale/zh/babel-zh-Hant.ini6
-rw-r--r--Master/texmf-dist/tex/generic/babel/locale/zh/babel-zh.ini5
-rw-r--r--Master/texmf-dist/tex/generic/babel/luababel.def150
-rw-r--r--Master/texmf-dist/tex/generic/babel/nil.ldf2
-rw-r--r--Master/texmf-dist/tex/generic/babel/switch.def15
21 files changed, 502 insertions, 103 deletions
diff --git a/Master/texmf-dist/tex/generic/babel/babel-bidi-basic-r.lua b/Master/texmf-dist/tex/generic/babel/babel-bidi-basic-r.lua
index 0705daa99d6..a39c69bed77 100644
--- a/Master/texmf-dist/tex/generic/babel/babel-bidi-basic-r.lua
+++ b/Master/texmf-dist/tex/generic/babel/babel-bidi-basic-r.lua
@@ -36,7 +36,7 @@ Babel = Babel or {}
Babel.bidi_enabled = true
-require('babel-bidi.lua')
+require('babel-data-bidi.lua')
local characters = Babel.characters
local ranges = Babel.ranges
diff --git a/Master/texmf-dist/tex/generic/babel/babel-bidi-basic.lua b/Master/texmf-dist/tex/generic/babel/babel-bidi-basic.lua
index 02e1406e4d1..7f3269bbb91 100644
--- a/Master/texmf-dist/tex/generic/babel/babel-bidi-basic.lua
+++ b/Master/texmf-dist/tex/generic/babel/babel-bidi-basic.lua
@@ -43,7 +43,7 @@ Babel.fontmap[2] = {} -- al/an
Babel.bidi_enabled = true
-require('babel-bidi.lua')
+require('babel-data-bidi.lua')
local characters = Babel.characters
local ranges = Babel.ranges
diff --git a/Master/texmf-dist/tex/generic/babel/babel-bidi.lua b/Master/texmf-dist/tex/generic/babel/babel-data-bidi.lua
index 97f6bb69c27..584796078b1 100644
--- a/Master/texmf-dist/tex/generic/babel/babel-bidi.lua
+++ b/Master/texmf-dist/tex/generic/babel/babel-data-bidi.lua
@@ -1,10 +1,10 @@
--
--- This is file `babel-bidi.lua',
+-- This is file `babel-data-bidi.lua',
-- generated with the docstrip utility.
--
-- The original source files were:
--
--- babel.dtx (with options: `bidi')
+-- babel.dtx (with options: `bididata')
--
--
-- Copyright (C) 2012-2019 Javier Bezos and Johannes L. Braams.
diff --git a/Master/texmf-dist/tex/generic/babel/babel-data-cjk.lua b/Master/texmf-dist/tex/generic/babel/babel-data-cjk.lua
new file mode 100644
index 00000000000..5c297aa8313
--- /dev/null
+++ b/Master/texmf-dist/tex/generic/babel/babel-data-cjk.lua
@@ -0,0 +1,288 @@
+--
+-- This is file `babel-data-cjk.lua',
+-- generated with the docstrip utility.
+--
+-- The original source files were:
+--
+-- babel.dtx (with options: `cjkdata')
+--
+--
+-- Copyright (C) 2012-2019 Javier Bezos and Johannes L. Braams.
+-- Copyright (C) 1989-2012 Johannes L. Braams and
+-- any individual authors listed elsewhere in this file.
+-- All rights reserved.
+--
+-- This file is part of the Babel system.
+-- --------------------------------------
+--
+-- It may be distributed and/or modified under the
+-- conditions of the LaTeX Project Public License, either version 1.3
+-- of this license or (at your option) any later version.
+-- The latest version of this license is in
+-- http://www.latex-project.org/lppl.txt
+-- and version 1.3 or later is part of all distributions of LaTeX
+-- version 2003/12/01 or later.
+--
+-- This work has the LPPL maintenance status "maintained".
+--
+-- The Current Maintainer of this work is Javier Bezos.
+--
+-- The list of derived (unpacked) files belonging to the distribution
+-- and covered by LPPL is defined by the unpacking scripts (with
+-- extension |.ins|) which are part of the distribution.
+--
+
+Babel = Babel or {}
+
+Babel.cjk_characters = {
+ [0x0021]={c='ex'},
+ [0x0024]={c='pr'},
+ [0x0025]={c='po'},
+ [0x0028]={c='op'},
+ [0x0029]={c='cp'},
+ [0x002B]={c='pr'},
+ [0x002C]={c='is'},
+ [0x002D]={c='hy'},
+ [0x002E]={c='is'},
+ [0x002F]={c='sy'},
+ [0x003A]={c='is'},
+ [0x003B]={c='is'},
+ [0x003F]={c='ex'},
+ [0x005B]={c='op'},
+ [0x005C]={c='pr'},
+ [0x005D]={c='cp'},
+ [0x007B]={c='op'},
+ [0x007D]={c='cl'},
+ [0x00A1]={c='op'},
+ [0x00A2]={c='po'},
+ [0x00A3]={c='pr'},
+ [0x00A4]={c='pr'},
+ [0x00A5]={c='pr'},
+ [0x00B0]={c='po'},
+ [0x00B1]={c='pr'},
+ [0x201A]={c='op'},
+ [0x201E]={c='op'},
+ [0x2024]={c='in'},
+ [0x2025]={c='in'},
+ [0x2026]={c='in'},
+ [0x2030]={c='po'},
+ [0x2031]={c='po'},
+ [0x2032]={c='po'},
+ [0x2033]={c='po'},
+ [0x2034]={c='po'},
+ [0x2035]={c='po'},
+ [0x2036]={c='po'},
+ [0x2037]={c='po'},
+ [0x203C]={c='ns'},
+ [0x203D]={c='ns'},
+ [0x2044]={c='is'},
+ [0x2045]={c='op'},
+ [0x2046]={c='cl'},
+ [0x2047]={c='ns'},
+ [0x2048]={c='ns'},
+ [0x2049]={c='ns'},
+ [0x207D]={c='op'},
+ [0x207E]={c='cl'},
+ [0x208D]={c='op'},
+ [0x208E]={c='cl'},
+ [0x20A7]={c='po'},
+ [0x20B6]={c='po'},
+ [0x20BB]={c='po'},
+ [0x20BE]={c='po'},
+ [0x2103]={c='po'},
+ [0x2109]={c='po'},
+ [0x2116]={c='pr'},
+ [0x2212]={c='pr'},
+ [0x2213]={c='pr'},
+ [0x22EF]={c='in'},
+ [0x2308]={c='op'},
+ [0x2309]={c='cl'},
+ [0x230A]={c='op'},
+ [0x230B]={c='cl'},
+ [0x2329]={c='op'},
+ [0x232A]={c='cl'},
+ [0x2983]={c='op'},
+ [0x2984]={c='cl'},
+ [0x2985]={c='op'},
+ [0x2986]={c='cl'},
+ [0x2987]={c='op'},
+ [0x2988]={c='cl'},
+ [0x2989]={c='op'},
+ [0x298A]={c='cl'},
+ [0x298B]={c='op'},
+ [0x298C]={c='cl'},
+ [0x298D]={c='op'},
+ [0x298E]={c='cl'},
+ [0x298F]={c='op'},
+ [0x2990]={c='cl'},
+ [0x2991]={c='op'},
+ [0x2992]={c='cl'},
+ [0x2993]={c='op'},
+ [0x2994]={c='cl'},
+ [0x2995]={c='op'},
+ [0x2996]={c='cl'},
+ [0x2997]={c='op'},
+ [0x2998]={c='cl'},
+ [0x29D8]={c='op'},
+ [0x29D9]={c='cl'},
+ [0x29DA]={c='op'},
+ [0x29DB]={c='cl'},
+ [0x29FC]={c='op'},
+ [0x29FD]={c='cl'},
+ [0x2CF9]={c='ex'},
+ [0x2CFE]={c='ex'},
+ [0x2E18]={c='op'},
+ [0x2E22]={c='op'},
+ [0x2E23]={c='cl'},
+ [0x2E24]={c='op'},
+ [0x2E25]={c='cl'},
+ [0x2E26]={c='op'},
+ [0x2E27]={c='cl'},
+ [0x2E28]={c='op'},
+ [0x2E29]={c='cl'},
+ [0x2E2E]={c='ex'},
+ [0x2E42]={c='op'},
+ [0x3001]={c='cl'},
+ [0x3002]={c='cl'},
+ [0x3005]={c='ns'},
+ [0x3008]={c='op'},
+ [0x3009]={c='cl'},
+ [0x300A]={c='op'},
+ [0x300B]={c='cl'},
+ [0x300C]={c='op'},
+ [0x300D]={c='cl'},
+ [0x300E]={c='op'},
+ [0x300F]={c='cl'},
+ [0x3010]={c='op'},
+ [0x3011]={c='cl'},
+ [0x3014]={c='op'},
+ [0x3015]={c='cl'},
+ [0x3016]={c='op'},
+ [0x3017]={c='cl'},
+ [0x3018]={c='op'},
+ [0x3019]={c='cl'},
+ [0x301A]={c='op'},
+ [0x301B]={c='cl'},
+ [0x301C]={c='ns'},
+ [0x301D]={c='op'},
+ [0x301E]={c='cl'},
+ [0x301F]={c='cl'},
+ [0x303B]={c='ns'},
+ [0x303C]={c='ns'},
+ [0x309B]={c='ns'},
+ [0x309C]={c='ns'},
+ [0x309D]={c='ns'},
+ [0x309E]={c='ns'},
+ [0x30A0]={c='ns'},
+ [0x30FB]={c='ns'},
+ [0x30FD]={c='ns'},
+ [0x30FE]={c='ns'},
+ [0xA015]={c='ns'},
+ [0xA60E]={c='ex'},
+ [0xA838]={c='po'},
+ [0xFD3E]={c='cl'},
+ [0xFD3F]={c='op'},
+ [0xFDFC]={c='po'},
+ [0xFE10]={c='is'},
+ [0xFE11]={c='cl'},
+ [0xFE12]={c='cl'},
+ [0xFE13]={c='is'},
+ [0xFE14]={c='is'},
+ [0xFE15]={c='ex'},
+ [0xFE16]={c='ex'},
+ [0xFE17]={c='op'},
+ [0xFE18]={c='cl'},
+ [0xFE19]={c='in'},
+ [0xFE35]={c='op'},
+ [0xFE36]={c='cl'},
+ [0xFE37]={c='op'},
+ [0xFE38]={c='cl'},
+ [0xFE39]={c='op'},
+ [0xFE3A]={c='cl'},
+ [0xFE3B]={c='op'},
+ [0xFE3C]={c='cl'},
+ [0xFE3D]={c='op'},
+ [0xFE3E]={c='cl'},
+ [0xFE3F]={c='op'},
+ [0xFE40]={c='cl'},
+ [0xFE41]={c='op'},
+ [0xFE42]={c='cl'},
+ [0xFE43]={c='op'},
+ [0xFE44]={c='cl'},
+ [0xFE47]={c='op'},
+ [0xFE48]={c='cl'},
+ [0xFE50]={c='cl'},
+ [0xFE52]={c='cl'},
+ [0xFE54]={c='ns'},
+ [0xFE55]={c='ns'},
+ [0xFE56]={c='ex'},
+ [0xFE57]={c='ex'},
+ [0xFE59]={c='op'},
+ [0xFE5A]={c='cl'},
+ [0xFE5B]={c='op'},
+ [0xFE5C]={c='cl'},
+ [0xFE5D]={c='op'},
+ [0xFE5E]={c='cl'},
+ [0xFE69]={c='pr'},
+ [0xFE6A]={c='po'},
+ [0xFF01]={c='ex', w='f'},
+ [0xFF04]={c='pr', w='f'},
+ [0xFF05]={c='po', w='f'},
+ [0xFF08]={c='op', w='f'},
+ [0xFF09]={c='cl', w='f'},
+ [0xFF0C]={c='cl', w='f'},
+ [0xFF0E]={c='cl', w='f'},
+ [0xFF1A]={c='ns', w='f'},
+ [0xFF1B]={c='ns', w='f'},
+ [0xFF1F]={c='ex', w='f'},
+ [0xFF3B]={c='op', w='f'},
+ [0xFF3D]={c='cl', w='f'},
+ [0xFF5B]={c='op', w='f'},
+ [0xFF5D]={c='cl', w='f'},
+ [0xFF5F]={c='op', w='f'},
+ [0xFF60]={c='cl', w='f'},
+ [0xFF61]={c='cl', w='h'},
+ [0xFF62]={c='op', w='h'},
+ [0xFF63]={c='cl', w='h'},
+ [0xFF64]={c='cl', w='h'}
+}
+
+Babel.cjk_class = setmetatable ( Babel.cjk_characters, {
+ __index = function(_, k)
+ if (k >= 0xAC00 and k <= 0xD7A3) -- H2/H3
+ or (k >= 0x2E80 and k <= 0x9FFF)
+ or (k >= 0xF900 and k <= 0xFAFF)
+ or (k >= 0xFE10 and k <= 0xFE1F)
+ or (k >= 0xFE30 and k <= 0xFE6F)
+ or (k >= 0xFF00 and k <= 0xFFEF)
+ or (k >= 0x1F000 and k <= 0x1FFFD)
+ or (k >= 0x20000 and k <= 0x2FFFD)
+ or (k >= 0x30000 and k <= 0x3FFFD) then
+ return {c='I'}
+ elseif (k >= 0x20A0 and k <= 0x20CF) then
+ return {c='pr'}
+ else
+ return {c='O'}
+ end
+ end })
+
+-- Note ns = ex = sy = is = po = hy. Here, 'I' and 'O' are
+-- pseudo-classes for ideographic-like (id, h2, h3), and 'other',
+-- respectively. Jamo is not considered yet, but very likely at least
+-- jl must be.
+
+Babel.cjk_breaks = {
+ ['op'] = { },
+ ['cl'] = { ['op']=1, ['pr']=1, ['in']=1, ['I']=1 },
+ ['ns'] = { ['op']=1, ['pr']=1, ['po']=1, ['in']=1, ['I']=1 },
+ ['ex'] = { ['op']=1, ['pr']=1, ['po']=1, ['in']=1, ['I']=1 },
+ ['sy'] = { ['op']=1, ['pr']=1, ['po']=1, ['in']=1, ['I']=1 },
+ ['is'] = { ['op']=1, ['pr']=1, ['po']=1, ['in']=1, ['I']=1 },
+ ['pr'] = { ['pr']=1, ['po']=1, ['in']=1 },
+ ['po'] = { ['op']=1, ['pr']=1, ['po']=1, ['in']=1, ['I']=1 },
+ ['in'] = { ['op']=1, ['pr']=1, ['po']=1, ['I']=1 },
+ ['hy'] = { ['op']=1, ['pr']=1, ['po']=1, ['in']=1, ['I']=1 },
+ --
+ ['I'] = { ['op']=1, ['pr']=1, ['I']=1, ['O']=1 },
+ ['O'] = { ['I']=1 }
+}
diff --git a/Master/texmf-dist/tex/generic/babel/babel.def b/Master/texmf-dist/tex/generic/babel/babel.def
index 1b65f99346f..ba2a930334f 100644
--- a/Master/texmf-dist/tex/generic/babel/babel.def
+++ b/Master/texmf-dist/tex/generic/babel/babel.def
@@ -41,7 +41,7 @@
\wlog{File: #1 #4 #3 <#2>}%
\let\ProvidesFile\@undefined}
\fi
-\ProvidesFile{babel.def}[2019/04/22 3.30 Babel common definitions]
+\ProvidesFile{babel.def}[2019/05/04 3.31 Babel common definitions]
\ifx\AtBeginDocument\@undefined
\input plain.def\relax
\fi
@@ -379,6 +379,8 @@
\def\main@language#1{%
\def\bbl@main@language{#1}%
\let\languagename\bbl@main@language
+ \bbl@id@assign
+ \chardef\localeid\@nameuse{bbl@id@@\languagename}%
\bbl@patterns{\languagename}}
\AtBeginDocument{%
\expandafter\selectlanguage\expandafter{\bbl@main@language}%
@@ -1361,7 +1363,6 @@
\catcode`\[=12 \catcode`\]=12 \catcode`\==12 %
\let\bbl@ini@captions@aux\@gobbletwo
\def\bbl@inidate ####1.####2.####3.####4\relax ####5####6{}%
- \let\bbl@inikv@typography\bbl@iniskip
\bbl@read@ini{##1}%
\bbl@exportkey{chrng}{characters.ranges}{}%
\bbl@exportkey{dgnat}{numbers.digits.native}{}%
@@ -1405,27 +1406,44 @@
\ifcase\bbl@engine\or
\bbl@ifunset{bbl@intsp@\languagename}{}%
{\expandafter\ifx\csname bbl@intsp@\languagename\endcsname\@empty\else
- \bbl@seaintraspace
- \ifx\bbl@KVP@intraspace\@nil
- \bbl@exp{%
- \\\bbl@intraspace\bbl@cs{intsp@\languagename}\\\@@}%
- \fi
- \directlua{
- Babel = Babel or {}
- Babel.sea_ranges = Babel.sea_ranges or {}
- Babel.set_chranges('\bbl@cs{sbcp@\languagename}',
- '\bbl@cs{chrng@\languagename}')
- }
- \ifx\bbl@KVP@intrapenalty\@nil
- \bbl@intrapenalty0\@@
- \fi
- \fi
- \ifx\bbl@KVP@intraspace\@nil\else % We may override the ini
- \expandafter\bbl@intraspace\bbl@KVP@intraspace\@@
- \fi
- \ifx\bbl@KVP@intrapenalty\@nil\else
- \expandafter\bbl@intrapenalty\bbl@KVP@intrapenalty\@@
- \fi}%
+ \bbl@xin@{\bbl@cs{sbcp@\languagename}}{Hant,Hans,Jpan,Kore}%
+ \ifin@
+ \bbl@cjkintraspace
+ \directlua{
+ Babel = Babel or {}
+ Babel.locale_props = Babel.locale_props or {}
+ Babel.locale_props[\the\localeid].linebreak = 'c'
+ }%
+ \ifx\bbl@KVP@intraspace\@nil
+ \bbl@exp{%
+ \\\bbl@intraspace\bbl@cs{intsp@\languagename}\\\@@}%
+ \fi
+ \ifx\bbl@KVP@intrapenalty\@nil
+ \bbl@intrapenalty0\@@
+ \fi
+ \else
+ \bbl@seaintraspace
+ \ifx\bbl@KVP@intraspace\@nil
+ \bbl@exp{%
+ \\\bbl@intraspace\bbl@cs{intsp@\languagename}\\\@@}%
+ \fi
+ \directlua{
+ Babel = Babel or {}
+ Babel.sea_ranges = Babel.sea_ranges or {}
+ Babel.set_chranges('\bbl@cs{sbcp@\languagename}',
+ '\bbl@cs{chrng@\languagename}')
+ }%
+ \ifx\bbl@KVP@intrapenalty\@nil
+ \bbl@intrapenalty0\@@
+ \fi
+ \fi
+ \fi
+ \ifx\bbl@KVP@intraspace\@nil\else % We may override the ini
+ \expandafter\bbl@intraspace\bbl@KVP@intraspace\@@
+ \fi
+ \ifx\bbl@KVP@intrapenalty\@nil\else
+ \expandafter\bbl@intrapenalty\bbl@KVP@intrapenalty\@@
+ \fi}%
\or
\bbl@xin@{\bbl@cs{sbcp@\languagename}}{Thai,Laoo,Khmr}%
\ifin@
@@ -2089,6 +2107,15 @@
\fi
\else
\global\bbl@csarg\chardef{wdir@#1}\z@
+ \fi
+ \ifodd\bbl@engine
+ \bbl@csarg\ifcase{wdir@#1}%
+ \directlua{ Babel.locale_props[\the\localeid].textdir = 'l' }%
+ \or
+ \directlua{ Babel.locale_props[\the\localeid].textdir = 'r' }%
+ \or
+ \directlua{ Babel.locale_props[\the\localeid].textdir = 'al' }%
+ \fi
\fi}
\def\bbl@switchdir{%
\bbl@ifunset{bbl@lsys@\languagename}{\bbl@provide@lsys{\languagename}}{}%
diff --git a/Master/texmf-dist/tex/generic/babel/babel.sty b/Master/texmf-dist/tex/generic/babel/babel.sty
index 7ee327b7c48..bc61531bafb 100644
--- a/Master/texmf-dist/tex/generic/babel/babel.sty
+++ b/Master/texmf-dist/tex/generic/babel/babel.sty
@@ -33,7 +33,7 @@
%%
\NeedsTeXFormat{LaTeX2e}[2005/12/01]
-\ProvidesPackage{babel}[2019/04/22 3.30 The Babel package]
+\ProvidesPackage{babel}[2019/05/04 3.31 The Babel package]
\@ifpackagewith{babel}{debug}
{\providecommand\bbl@trace[1]{\message{^^J[ #1 ]}}%
\let\bbl@debug\@firstofone}
@@ -238,7 +238,7 @@
\AtEndOfPackage{\EnableBabelHook{babel-bidi}}%
\RequirePackage{luatexbase}%
\directlua{
- require('babel-bidi.lua')
+ require('babel-data-bidi.lua')
require('babel-bidi-\bbl@tempa.lua')
}
\bbl@activate@preotf
@@ -306,6 +306,7 @@
{\ExecuteOptions{bidi=basic}}
\DeclareOption{bidi=basic}%
{\let\bbl@beforeforeign\leavevmode
+ % TODO - to locale_props, not as separate attribute
\newattribute\bbl@attr@dir
% I don't like it, hackish:
\frozen@everymath\expandafter{%
diff --git a/Master/texmf-dist/tex/generic/babel/hyphen.cfg b/Master/texmf-dist/tex/generic/babel/hyphen.cfg
index 213ca7f27ce..f866ec5d6e2 100644
--- a/Master/texmf-dist/tex/generic/babel/hyphen.cfg
+++ b/Master/texmf-dist/tex/generic/babel/hyphen.cfg
@@ -37,7 +37,7 @@
\wlog{File: #1 #4 #3 <#2>}%
\let\ProvidesFile\@undefined}
\fi
-\ProvidesFile{hyphen.cfg}[2019/04/22 3.30 Babel hyphens]
+\ProvidesFile{hyphen.cfg}[2019/05/04 3.31 Babel hyphens]
\xdef\bbl@format{\jobname}
\ifx\AtBeginDocument\@undefined
\def\@empty{}
diff --git a/Master/texmf-dist/tex/generic/babel/locale/ja/babel-ja.ini b/Master/texmf-dist/tex/generic/babel/locale/ja/babel-ja.ini
index 790e28cf11a..bab79c73c73 100644
--- a/Master/texmf-dist/tex/generic/babel/locale/ja/babel-ja.ini
+++ b/Master/texmf-dist/tex/generic/babel/locale/ja/babel-ja.ini
@@ -11,8 +11,8 @@
[identification]
charset = utf8
-version = 1.0
-date = 2017-09-01
+version = 1.1
+date = 2019-05-05
name.local = 日本語
name.english = Japanese
name.babel = japanese
@@ -142,6 +142,7 @@ exhyphenchar =
preexhyphenchar =
postexhyphenchar =
hyphenationmin =
+intraspace = 0 .1 0
[characters]
delimiters.quotes = 「」『』
diff --git a/Master/texmf-dist/tex/generic/babel/locale/ko/babel-ko.ini b/Master/texmf-dist/tex/generic/babel/locale/ko/babel-ko.ini
index 9584dd47f16..09d7b371460 100644
--- a/Master/texmf-dist/tex/generic/babel/locale/ko/babel-ko.ini
+++ b/Master/texmf-dist/tex/generic/babel/locale/ko/babel-ko.ini
@@ -11,8 +11,8 @@
[identification]
charset = utf8
-version = 1.0
-date = 2017-09-01
+version = 1.1
+date = 2019-05-05
name.local = 한국어
name.english = Korean
name.babel = korean
@@ -142,6 +142,7 @@ exhyphenchar =
preexhyphenchar =
postexhyphenchar =
hyphenationmin =
+intraspace = 0 .1 0
[characters]
delimiters.quotes = “”‘’
diff --git a/Master/texmf-dist/tex/generic/babel/locale/yue/babel-yue.ini b/Master/texmf-dist/tex/generic/babel/locale/yue/babel-yue.ini
index 185035195f0..c3c8caa7d81 100644
--- a/Master/texmf-dist/tex/generic/babel/locale/yue/babel-yue.ini
+++ b/Master/texmf-dist/tex/generic/babel/locale/yue/babel-yue.ini
@@ -11,8 +11,8 @@
[identification]
charset = utf8
-version = 1.1
-date = 2018-04-11
+version = 1.2
+date = 2019-05-05
name.local = 粵語
name.english = Cantonese
name.babel = cantonese
@@ -143,6 +143,7 @@ exhyphenchar =
preexhyphenchar =
postexhyphenchar =
hyphenationmin =
+intraspace = 0 .1 0
[characters]
delimiters.quotes = 「」『』
diff --git a/Master/texmf-dist/tex/generic/babel/locale/zh/babel-zh-Hans-HK.ini b/Master/texmf-dist/tex/generic/babel/locale/zh/babel-zh-Hans-HK.ini
index 49cd8e64ae9..0aa41f18044 100644
--- a/Master/texmf-dist/tex/generic/babel/locale/zh/babel-zh-Hans-HK.ini
+++ b/Master/texmf-dist/tex/generic/babel/locale/zh/babel-zh-Hans-HK.ini
@@ -11,8 +11,8 @@
[identification]
charset = utf8
-version = 1.1
-date = 2018-04-11
+version = 1.2
+date = 2019-05-05
name.local = 中文
name.english = Chinese
name.babel = chinese-simplified-hongkongsarchina
@@ -146,6 +146,8 @@ exhyphenchar =
preexhyphenchar =
postexhyphenchar =
hyphenationmin =
+intraspace = 0 .1 0
+opentype.features = +smpl
[characters]
delimiters.quotes = “”‘’
diff --git a/Master/texmf-dist/tex/generic/babel/locale/zh/babel-zh-Hans-MO.ini b/Master/texmf-dist/tex/generic/babel/locale/zh/babel-zh-Hans-MO.ini
index aba98ab5309..1b1931c3773 100644
--- a/Master/texmf-dist/tex/generic/babel/locale/zh/babel-zh-Hans-MO.ini
+++ b/Master/texmf-dist/tex/generic/babel/locale/zh/babel-zh-Hans-MO.ini
@@ -11,8 +11,8 @@
[identification]
charset = utf8
-version = 1.1
-date = 2018-04-11
+version = 1.2
+date = 2019-05-05
name.local = 中文
name.english = Chinese
name.babel = chinese-simplified-macausarchina
@@ -146,6 +146,8 @@ exhyphenchar =
preexhyphenchar =
postexhyphenchar =
hyphenationmin =
+intraspace = 0 .1 0
+opentype.features = +smpl
[characters]
delimiters.quotes = “”‘’
diff --git a/Master/texmf-dist/tex/generic/babel/locale/zh/babel-zh-Hans-SG.ini b/Master/texmf-dist/tex/generic/babel/locale/zh/babel-zh-Hans-SG.ini
index 39e80c108b4..155f647dc84 100644
--- a/Master/texmf-dist/tex/generic/babel/locale/zh/babel-zh-Hans-SG.ini
+++ b/Master/texmf-dist/tex/generic/babel/locale/zh/babel-zh-Hans-SG.ini
@@ -11,8 +11,8 @@
[identification]
charset = utf8
-version = 1.1
-date = 2018-04-11
+version = 1.2
+date = 2019-05-05
name.local = 中文
name.english = Chinese
name.babel = chinese-simplified-singapore
@@ -147,6 +147,8 @@ exhyphenchar =
preexhyphenchar =
postexhyphenchar =
hyphenationmin =
+intraspace = 0 .1 0
+opentype.features = +smpl
[characters]
delimiters.quotes = “”‘’
diff --git a/Master/texmf-dist/tex/generic/babel/locale/zh/babel-zh-Hans.ini b/Master/texmf-dist/tex/generic/babel/locale/zh/babel-zh-Hans.ini
index 3cb52988f49..0255e1eeea2 100644
--- a/Master/texmf-dist/tex/generic/babel/locale/zh/babel-zh-Hans.ini
+++ b/Master/texmf-dist/tex/generic/babel/locale/zh/babel-zh-Hans.ini
@@ -11,8 +11,8 @@
[identification]
charset = utf8
-version = 1.1
-date = 2018-04-11
+version = 1.2
+date = 2019-05-05
name.local = 中文
name.english = Chinese
name.babel = chinese-simplified
@@ -143,6 +143,8 @@ exhyphenchar =
preexhyphenchar =
postexhyphenchar =
hyphenationmin =
+intraspace = 0 .1 0
+opentype.features = +smpl
[characters]
delimiters.quotes = “”‘’
diff --git a/Master/texmf-dist/tex/generic/babel/locale/zh/babel-zh-Hant-HK.ini b/Master/texmf-dist/tex/generic/babel/locale/zh/babel-zh-Hant-HK.ini
index 0b2d23ea111..a8406bcd2ff 100644
--- a/Master/texmf-dist/tex/generic/babel/locale/zh/babel-zh-Hant-HK.ini
+++ b/Master/texmf-dist/tex/generic/babel/locale/zh/babel-zh-Hant-HK.ini
@@ -11,8 +11,8 @@
[identification]
charset = utf8
-version = 1.1
-date = 2018-04-11
+version = 1.2
+date = 2019-05-05
name.local = 中文
name.english = Chinese
name.babel = chinese-traditional-hongkongsarchina
@@ -146,6 +146,8 @@ exhyphenchar =
preexhyphenchar =
postexhyphenchar =
hyphenationmin =
+intraspace = 0 .1 0
+opentype.features = +trad
[characters]
delimiters.quotes = 「」『』
diff --git a/Master/texmf-dist/tex/generic/babel/locale/zh/babel-zh-Hant-MO.ini b/Master/texmf-dist/tex/generic/babel/locale/zh/babel-zh-Hant-MO.ini
index 9e0db221f76..bbec33519ea 100644
--- a/Master/texmf-dist/tex/generic/babel/locale/zh/babel-zh-Hant-MO.ini
+++ b/Master/texmf-dist/tex/generic/babel/locale/zh/babel-zh-Hant-MO.ini
@@ -11,8 +11,8 @@
[identification]
charset = utf8
-version = 1.1
-date = 2018-04-11
+version = 1.2
+date = 2019-05-05
name.local = 中文
name.english = Chinese
name.babel = chinese-traditional-macausarchina
@@ -146,6 +146,8 @@ exhyphenchar =
preexhyphenchar =
postexhyphenchar =
hyphenationmin =
+intraspace = 0 .1 0
+opentype.features = +trad
[characters]
delimiters.quotes = 「」『』
diff --git a/Master/texmf-dist/tex/generic/babel/locale/zh/babel-zh-Hant.ini b/Master/texmf-dist/tex/generic/babel/locale/zh/babel-zh-Hant.ini
index 18a4abd9717..5a7fbdb1166 100644
--- a/Master/texmf-dist/tex/generic/babel/locale/zh/babel-zh-Hant.ini
+++ b/Master/texmf-dist/tex/generic/babel/locale/zh/babel-zh-Hant.ini
@@ -11,8 +11,8 @@
[identification]
charset = utf8
-version = 1.1
-date = 2018-04-11
+version = 1.2
+date = 2019-05-05
name.local = 中文
name.english = Chinese
name.babel = chinese-traditional
@@ -143,6 +143,8 @@ exhyphenchar =
preexhyphenchar =
postexhyphenchar =
hyphenationmin =
+intraspace = 0 .1 0
+opentype.features = +trad
[characters]
delimiters.quotes = 「」『』
diff --git a/Master/texmf-dist/tex/generic/babel/locale/zh/babel-zh.ini b/Master/texmf-dist/tex/generic/babel/locale/zh/babel-zh.ini
index 07f0f8804c2..659642d43e0 100644
--- a/Master/texmf-dist/tex/generic/babel/locale/zh/babel-zh.ini
+++ b/Master/texmf-dist/tex/generic/babel/locale/zh/babel-zh.ini
@@ -11,8 +11,8 @@
[identification]
charset = utf8
-version = 1.1
-date = 2018-04-11
+version = 1.2
+date = 2019-05-05
name.local = 中文
name.english = Chinese
name.babel = chinese
@@ -143,6 +143,7 @@ exhyphenchar =
preexhyphenchar =
postexhyphenchar =
hyphenationmin =
+intraspace = 0 .1 0
[characters]
delimiters.quotes = “”‘’
diff --git a/Master/texmf-dist/tex/generic/babel/luababel.def b/Master/texmf-dist/tex/generic/babel/luababel.def
index c3cd913bbf7..a2fbb24b845 100644
--- a/Master/texmf-dist/tex/generic/babel/luababel.def
+++ b/Master/texmf-dist/tex/generic/babel/luababel.def
@@ -317,12 +317,15 @@
Babel.intraspaces = Babel.intraspaces or {}
Babel.intraspaces['\csname bbl@sbcp@\languagename\endcsname'] = %
{b = #1, p = #2, m = #3}
+ Babel.locale_props[\the\localeid].intraspace = %
+ {b = #1, p = #2, m = #3}
}}
\def\bbl@intrapenalty#1\@@{%
\directlua{
Babel = Babel or {}
Babel.intrapenalties = Babel.intrapenalties or {}
Babel.intrapenalties['\csname bbl@sbcp@\languagename\endcsname'] = #1
+ Babel.locale_props[\the\localeid].intrapenalty = #1
}}
\begingroup
\catcode`\%=12
@@ -333,6 +336,7 @@
\let\bbl@seaintraspace\relax
\directlua{
Babel = Babel or {}
+ Babel.sea_enabled = true
Babel.sea_ranges = Babel.sea_ranges or {}
function Babel.set_chranges (script, chrng)
local c = 0
@@ -374,13 +378,81 @@
end
end
end
+ }^^
+ \bbl@luahyphenate}
+\catcode`\%=14
+\gdef\bbl@cjkintraspace{%
+ \let\bbl@cjkintraspace\relax
+ \directlua{
+ Babel = Babel or {}
+ require'babel-data-cjk.lua'
+ Babel.cjk_enabled = true
+ function Babel.cjk_linebreak(head)
+ local GLYPH = node.id'glyph'
+ local last_char = nil
+ local quad = 655360 % 10 pt = 655360 = 10 * 65536
+ local last_class = nil
+
+ for item in node.traverse(head) do
+ if item.id == GLYPH then
+
+ local LOCALE = node.get_attribute(item,
+ luatexbase.registernumber'bbl@attr@locale')
+
+ local props = Babel.locale_props[LOCALE]
+
+ class = Babel.cjk_class[item.char].c
+
+ if class == 'cp' then class = 'cl' end % )] as CL
+ if class == 'id' then class = 'I' end
+
+ if class and last_class and Babel.cjk_breaks[last_class][class] then
+ br = Babel.cjk_breaks[last_class][class]
+ else
+ br = 0
+ end
+
+ if br == 1 and props.linebreak == 'c' then
+ local intrapenalty = props.intrapenalty
+ if intrapenalty ~= 0 then
+ local n = node.new(14, 0) % penalty
+ n.penalty = intrapenalty
+ node.insert_before(head, item, n)
+ end
+ local intraspace = props.intraspace
+ local n = node.new(12, 13) % (glue, spaceskip)
+ node.setglue(n, intraspace.b * quad,
+ intraspace.p * quad,
+ intraspace.m * quad)
+ node.insert_before(head, item, n)
+ end
+
+ quad = font.getfont(item.font).size
+ last_class = class
+ else % if penalty, glue or anything else
+ last_class = nil
+ end
+ end
+ lang.hyphenate(head)
+ end
+ }%
+ \bbl@luahyphenate}
+\gdef\bbl@luahyphenate{%
+ \let\bbl@luahyphenate\relax
+ \directlua{
luatexbase.add_to_callback('hyphenate',
- function (head, tail)
- lang.hyphenate(head)
+ function (head, tail)
+ if Babel.cjk_enabled then
+ Babel.cjk_linebreak(head)
+ end
+ lang.hyphenate(head)
+ if Babel.sea_enabled then
Babel.sea_disc_to_space(head)
- end,
- 'Babel.sea_disc_to_space')
-}}
+ end
+ end,
+ 'Babel.hyphenate')
+ }
+}
\endgroup
\AddBabelHook{luatex}{loadkernel}{%
\begingroup
@@ -581,22 +653,24 @@
\fi
\ifx\bbl@opt@layout\@nnil\endinput\fi % if no layout
\ifx\bbl@beforeforeign\leavevmode % A poor test for bidi=
- \def\bbl@nextfake#1{% non-local changes - always inside a group!
+ \def\bbl@nextfake#1{% non-local changes, use always inside a group!
\bbl@exp{%
\mathdir\the\bodydir
#1% Once entered in math, set boxes to restore values
- \everyvbox{%
- \the\everyvbox
- \bodydir\the\bodydir
- \mathdir\the\mathdir
- \everyhbox{\the\everyhbox}%
- \everyvbox{\the\everyvbox}}%
- \everyhbox{%
- \the\everyhbox
- \bodydir\the\bodydir
- \mathdir\the\mathdir
- \everyhbox{\the\everyhbox}%
- \everyvbox{\the\everyvbox}}}}%
+ \<ifmmode>%
+ \everyvbox{%
+ \the\everyvbox
+ \bodydir\the\bodydir
+ \mathdir\the\mathdir
+ \everyhbox{\the\everyhbox}%
+ \everyvbox{\the\everyvbox}}%
+ \everyhbox{%
+ \the\everyhbox
+ \bodydir\the\bodydir
+ \mathdir\the\mathdir
+ \everyhbox{\the\everyhbox}%
+ \everyvbox{\the\everyvbox}}%
+ \<fi>}}%
\def\@hangfrom#1{%
\setbox\@tempboxa\hbox{{#1}}%
\hangindent\wd\@tempboxa
@@ -606,38 +680,22 @@
\noindent\box\@tempboxa}
\fi
\IfBabelLayout{tabular}
- {\def\@tabular{%
- \leavevmode\hbox\bgroup\bbl@nextfake$% %$
- \let\@acol\@tabacol \let\@classz\@tabclassz
- \let\@classiv\@tabclassiv \let\\\@tabularcr\@tabarray}}
+ {\bbl@replace\@tabular{$}{\bbl@nextfake$}%
+ \let\bbl@tabular\@tabular
+ \AtBeginDocument{%
+ \ifx\bbl@tabular\@tabular\else
+ \bbl@replace\@tabular{$}{\bbl@nextfake$}%
+ \fi}}
{}
\IfBabelLayout{lists}
- {\def\list#1#2{%
- \ifnum \@listdepth >5\relax
- \@toodeep
- \else
- \global\advance\@listdepth\@ne
- \fi
- \rightmargin\z@
- \listparindent\z@
- \itemindent\z@
- \csname @list\romannumeral\the\@listdepth\endcsname
- \def\@itemlabel{#1}%
- \let\makelabel\@mklab
- \@nmbrlistfalse
- #2\relax
- \@trivlist
- \parskip\parsep
- \parindent\listparindent
- \advance\linewidth -\rightmargin
- \advance\linewidth -\leftmargin
- \advance\@totalleftmargin \leftmargin
- \parshape \@ne
- \@totalleftmargin \linewidth
+ {\expandafter\def\expandafter\bbl@toreplace\expandafter{\list{##1}{##2}}%
+ \bbl@replace\bbl@toreplace{\parshape}{\bbl@listparshape}%
+ \bbl@exp{\def\\\list##1##2{\the\toks@}}% \toks@ <- implicit result
+ \def\bbl@listparshape#1#2#3{%
+ \parshape #1 #2 #3 %
\ifnum\bbl@getluadir{page}=\bbl@getluadir{par}\else
\shapemode\tw@
- \fi
- \ignorespaces}}
+ \fi}}
{}
\IfBabelLayout{counters}%
{\def\@textsuperscript#1{{% lua has separate settings for math
diff --git a/Master/texmf-dist/tex/generic/babel/nil.ldf b/Master/texmf-dist/tex/generic/babel/nil.ldf
index a50efbf34e7..96b40f18e8c 100644
--- a/Master/texmf-dist/tex/generic/babel/nil.ldf
+++ b/Master/texmf-dist/tex/generic/babel/nil.ldf
@@ -32,7 +32,7 @@
%% extension |.ins|) which are part of the distribution.
%%
-\ProvidesLanguage{nil}[2019/04/22 3.30 Nil language]
+\ProvidesLanguage{nil}[2019/05/04 3.31 Nil language]
\LdfInit{nil}{datenil}
\ifx\l@nohyphenation\@undefined
\@nopatterns{nil}
diff --git a/Master/texmf-dist/tex/generic/babel/switch.def b/Master/texmf-dist/tex/generic/babel/switch.def
index f03f7486849..f079f6184d2 100644
--- a/Master/texmf-dist/tex/generic/babel/switch.def
+++ b/Master/texmf-dist/tex/generic/babel/switch.def
@@ -37,7 +37,7 @@
\wlog{File: #1 #4 #3 <#2>}%
\let\ProvidesFile\@undefined}
\fi
-\ProvidesFile{switch.def}[2019/04/22 3.30 Babel switching mechanism]
+\ProvidesFile{switch.def}[2019/05/04 3.31 Babel switching mechanism]
\ifx\AtBeginDocument\@undefined
\input plain.def\relax
\fi
@@ -58,8 +58,8 @@
\countdef\last@language=19
\def\addlanguage{\alloc@9\language\chardef\@cclvi}
\fi
-\def\bbl@version{3.30}
-\def\bbl@date{2019/04/22}
+\def\bbl@version{3.31}
+\def\bbl@date{2019/05/04}
\def\adddialect#1#2{%
\global\chardef#1#2\relax
\bbl@usehooks{adddialect}{{#1}{#2}}%
@@ -116,7 +116,14 @@
{\count@\bbl@id@last\relax
\advance\count@\@ne
\bbl@csarg\chardef{id@@\languagename}\count@
- \edef\bbl@id@last{\the\count@}}%
+ \edef\bbl@id@last{\the\count@}%
+ \ifcase\bbl@engine\or
+ \directlua{
+ Babel = Babel or {}
+ Babel.locale_props = Babel.locale_props or {}
+ Babel.locale_props[\bbl@id@last] = {}
+ }%
+ \fi}%
{}}
\expandafter\def\csname selectlanguage \endcsname#1{%
\ifnum\bbl@hymapsel=\@cclv\let\bbl@hymapsel\tw@\fi