diff options
Diffstat (limited to 'Master/texmf-dist/tex/generic/babel')
10 files changed, 185 insertions, 37 deletions
diff --git a/Master/texmf-dist/tex/generic/babel/babel.def b/Master/texmf-dist/tex/generic/babel/babel.def index d13f7573336..87b4bc87125 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}[2018/09/02 3.23 Babel common definitions] +\ProvidesFile{babel.def}[2018/09/26 3.24 Babel common definitions] \ifx\AtBeginDocument\@undefined \input plain.def\relax \fi @@ -1326,6 +1326,7 @@ \ifx\bbl@KVP@captions\@nil \let\bbl@KVP@captions\bbl@KVP@import \fi + % Load ini \bbl@ifunset{date#2}% {\bbl@provide@new{#2}}% {\bbl@ifblank{#1}% @@ -1336,6 +1337,7 @@ import=lang-tag}% {Use this macro as documented}}% {\bbl@provide@renew{#2}}}% + % Post tasks \bbl@exp{\\\babelensure[exclude=\\\today]{#2}}% \bbl@ifunset{bbl@ensure@\languagename}% {\bbl@exp{% @@ -1371,6 +1373,33 @@ \fi \bbl@exp{\\\bbl@add\\\bbl@mapselect{\\\bbl@mapdir{\languagename}}}% \fi + \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}% + \or + %% TODO - xetex + \fi \ifcase\bbl@engine\else \bbl@ifunset{bbl@dgnat@\languagename}{}% {\expandafter\ifx\csname bbl@dgnat@\languagename\endcsname\@empty\else @@ -1387,6 +1416,15 @@ \fi \fi}% \fi + \bbl@ifunset{bbl@rqtex@\languagename}{}% + {\expandafter\ifx\csname bbl@rqtex@\languagename\endcsname\@empty\else + \let\BabelBeforeIni\@gobbletwo + \chardef\atcatcode=\catcode`\@ + \catcode`\@=11\relax + \InputIfFileExists{babel-\bbl@cs{rqtex@\languagename}.tex}{}{}% + \catcode`\@=\atcatcode + \let\atcatcode\relax + \fi}% \let\languagename\bbl@savelangname} \def\bbl@setdigits#1#2#3#4#5{% \bbl@exp{% @@ -1552,12 +1590,17 @@ \bbl@exportkey{sbcp}{identification.script.tag.bcp47}{}% \bbl@exportkey{sotf}{identification.script.tag.opentype}{DFLT}} \let\bbl@secline@typography\bbl@inikv +\let\bbl@secline@characters\bbl@inikv \let\bbl@secline@numbers\bbl@inikv \def\bbl@after@ini{% \bbl@exportkey{lfthm}{typography.lefthyphenmin}{2}% \bbl@exportkey{rgthm}{typography.righthyphenmin}{3}% \bbl@exportkey{hyphr}{typography.hyphenrules}{}% + \bbl@exportkey{intsp}{typography.intraspace}{}% + \bbl@exportkey{jstfy}{typography.justify}{w}% + \bbl@exportkey{chrng}{characters.ranges}{}% \bbl@exportkey{dgnat}{numbers.digits.native}{}% + \bbl@exportkey{rqtex}{identification.require.babel}{}% \bbl@xin@{0.5}{\@nameuse{bbl@@kv@identification.version}}% \ifin@ \bbl@warning{% @@ -1640,7 +1683,7 @@ range 0-9999.}% {There is little you can do. Sorry.}% \fi\fi\fi\fi}} -\newcommand\BabelDateyyyy[1]{{\number#1}} +\newcommand\BabelDateyyyy[1]{{\number#1}} % FIXME - add leading 0 \def\bbl@replace@finish@iii#1{% \bbl@exp{\def\\#1####1####2####3{\the\toks@}}} \def\bbl@TG@@date{% @@ -1665,7 +1708,7 @@ \bbl@csarg\bbl@add@list{lsys@#1}{Script=\bbl@cs{sname@#1}}% \bbl@ifunset{bbl@lname@#1}{}% {\bbl@csarg\bbl@add@list{lsys@#1}{Language=\bbl@cs{lname@#1}}}% - \bbl@csarg\bbl@toglobal{lsys@#1}%}% + \bbl@csarg\bbl@toglobal{lsys@#1}% \bbl@exp{% TODO - should be global, but even local does its job % I'm still not sure -- must investigate \<keys_if_exist:nnF>{fontspec-opentype}{Script/\bbl@cs{sname@#1}}% diff --git a/Master/texmf-dist/tex/generic/babel/babel.sty b/Master/texmf-dist/tex/generic/babel/babel.sty index dca5d90e568..6a16f6bb909 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}[2018/09/02 3.23 The Babel package] +\ProvidesPackage{babel}[2018/09/26 3.24 The Babel package] \@ifpackagewith{babel}{debug} {\providecommand\bbl@trace[1]{\message{^^J[ #1 ]}}% \let\bbl@debug\@firstofone} @@ -253,6 +253,7 @@ \DeclareOption{noconfigs}{} \DeclareOption{showlanguages}{} \DeclareOption{silent}{} +\DeclareOption{mono}{} \DeclareOption{shorthands=off}{\bbl@tempa shorthands=\bbl@tempa} \DeclareOption{math=active}{} \DeclareOption{math=normal}{\def\bbl@mathnormal{\noexpand\textormath}} diff --git a/Master/texmf-dist/tex/generic/babel/hyphen.cfg b/Master/texmf-dist/tex/generic/babel/hyphen.cfg index 45c35c3300c..ace448f12bb 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}[2018/09/02 3.23 Babel hyphens] +\ProvidesFile{hyphen.cfg}[2018/09/26 3.24 Babel hyphens] \xdef\bbl@format{\jobname} \ifx\AtBeginDocument\@undefined \def\@empty{} diff --git a/Master/texmf-dist/tex/generic/babel/locale/km/babel-km.ini b/Master/texmf-dist/tex/generic/babel/locale/km/babel-km.ini index 617ecd2737a..701fe382291 100644 --- a/Master/texmf-dist/tex/generic/babel/locale/km/babel-km.ini +++ b/Master/texmf-dist/tex/generic/babel/locale/km/babel-km.ini @@ -11,8 +11,8 @@ [identification] charset = utf8 -version = 1.1 -date = 2018-04-11 +version = 1.2 +date = 2018-09-07 name.local = ខ្មែរ name.english = Khmer name.babel = khmer @@ -26,27 +26,27 @@ encodings = derivate = no [captions] -preface = -ref = -abstract = -bib = -chapter = -appendix = -contents = -listfigure = -listtable = -index = -figure = -table = -part = -encl = -cc = -headto = -page = -see = -also = -proof = -glossary = +preface = អារម្ភកថា +ref = ឯកសារយោង +abstract = សង្ខេប +bib = គន្ថនិទ្ទេស +chapter = ជំពូក +appendix = សេចក្ដីបន្ថែម +contents = មាតិការ +listfigure = បញ្ជីរូបភាព +listtable = បញ្ជីតារាង +index = សន្ទស្សន៍ +figure = រូប +table = តារាង +part = ផ្នែក +encl = ឯកសារភ្ជាប់ +cc = ចម្លងជួន +headto = ផ្ញើរទៅ +page = ទំព័រ +see = មើល +also = មើលបន្ថែម +proof = សម្រាយ +glossary = សទានុក្រម [captions.licr] preface = @@ -142,8 +142,11 @@ exhyphenchar = preexhyphenchar = postexhyphenchar = hyphenationmin = +justify = s +intraspace = 0 .1 0 [characters] +ranges = 1780..17FF delimiters.quotes = “”‘’ auxiliary = [\u17B4\u17B5\u200B \u17CC \u17CE \u17CF \u17D1 ឝ ឞ] exemplarCharacters = [\u17D0 ៈ \u17CB \u17C9 \u17CA \u17CD ក ខ គ ឃ ង ច ឆ ជ ឈ ញ ដ ឋ ឌ ឍ ណ ត ថ ទ ធ ន ប ផ ព ភ ម យ រ ឫ ឬ ល ឭ ឮ វ ស ហ ឡ អ {អា} ឥ ឦ ឧ {ឧក} ឩ ឪ ឯ ឰ ឱ ឲ ឳ ា \u17B7 \u17B8 \u17B9 \u17BA \u17BB \u17BC \u17BD ើ ឿ ៀ េ ែ ៃ ោ ៅ \u17C6 ះ \u17D2] diff --git a/Master/texmf-dist/tex/generic/babel/locale/lo/babel-lo.ini b/Master/texmf-dist/tex/generic/babel/locale/lo/babel-lo.ini index 6806fdad98d..255e260db93 100644 --- a/Master/texmf-dist/tex/generic/babel/locale/lo/babel-lo.ini +++ b/Master/texmf-dist/tex/generic/babel/locale/lo/babel-lo.ini @@ -11,8 +11,8 @@ [identification] charset = utf8 -version = 1.1 -date = 2018-04-11 +version = 1.2 +date = 2018-09-07 name.local = ລາວ name.english = Lao name.babel = lao @@ -119,8 +119,11 @@ exhyphenchar = preexhyphenchar = postexhyphenchar = hyphenationmin = +justify = s +intraspace = 0 .1 0 [characters] +ranges = 0E80..0EFF delimiters.quotes = “”‘’ auxiliary = [\u200B ໐ ໑ ໒ ໓ ໔ ໕ ໖ ໗ ໘ ໙] exemplarCharacters = [\u0EC8 \u0EC9 \u0ECA \u0ECB \u0ECC \u0ECD ໆ ກ ຂ ຄ ງ ຈ ສ ຊ ຍ ດ ຕ ຖ ທ ນ ບ ປ ຜ ຝ ພ ຟ ມ ຢ ຣ ລ ວ ຫ ໜ ໝ ອ ຮ ຯ ະ \u0EB1 າ ຳ \u0EB4 \u0EB5 \u0EB6 \u0EB7 \u0EB8 \u0EB9 \u0EBB \u0EBC ຽ ເ ແ ໂ ໃ ໄ] diff --git a/Master/texmf-dist/tex/generic/babel/locale/th/babel-th.ini b/Master/texmf-dist/tex/generic/babel/locale/th/babel-th.ini index 3285804bf0f..9762713b1e0 100644 --- a/Master/texmf-dist/tex/generic/babel/locale/th/babel-th.ini +++ b/Master/texmf-dist/tex/generic/babel/locale/th/babel-th.ini @@ -11,8 +11,8 @@ [identification] charset = utf8 -version = 1.1 -date = 2018-04-11 +version = 1.2 +date = 2018-09-07 name.local = ไทย name.english = Thai name.babel = thai @@ -24,6 +24,7 @@ script.tag.opentype = thai level = 1 encodings = derivate = no +require.babel = thai [captions] preface = คำนำ @@ -72,7 +73,8 @@ proof = \thaiPhoPhan\thaiSaraI\thaiSoSua\thaiChoChan\thaiSaraUu\space \thaiNoNu\ glossary = [date.gregorian] -date.long = [d] [MMMM] [G] [y] +; Should be [G] instead of พ.ศ. +date.long = [d] [MMMM] พ.ศ. [y] date.short = [d]/[M]/[yy] months.wide.1 = มกราคม months.wide.2 = กุมภาพันธ์ @@ -156,8 +158,11 @@ exhyphenchar = preexhyphenchar = postexhyphenchar = hyphenationmin = +justify = s +intraspace = 0 .1 0 [characters] +ranges = 0E00..0E7F delimiters.quotes = “”‘’ auxiliary = [\u200B] exemplarCharacters = [ฯ ๆ \u0E4E \u0E4C \u0E47 \u0E48 \u0E49 \u0E4A \u0E4B ก ข ฃ ค ฅ ฆ ง จ ฉ ช ซ ฌ ญ ฎ ฏ ฐ ฑ ฒ ณ ด ต ถ ท ธ น บ ป ผ ฝ พ ฟ ภ ม ย ร ฤ ล ฦ ว ศ ษ ส ห ฬ อ ฮ \u0E4D ะ \u0E31 า ๅ ำ \u0E34 \u0E35 \u0E36 \u0E37 \u0E38 \u0E39 เ แ โ ใ ไ \u0E3A] diff --git a/Master/texmf-dist/tex/generic/babel/locale/th/babel-thai.tex b/Master/texmf-dist/tex/generic/babel/locale/th/babel-thai.tex index 39c07418b35..994b33fe302 100644 --- a/Master/texmf-dist/tex/generic/babel/locale/th/babel-thai.tex +++ b/Master/texmf-dist/tex/generic/babel/locale/th/babel-thai.tex @@ -9,4 +9,19 @@ \fi \BabelBeforeIni{th}{% } + +\addto\datethai{% + \babel@save\BabelDatey + \def\BabelDatey#1{{\number\numexpr#1+543}}} + +\ifcase\bbl@engine\or\or + \bbl@tentative{thai}% + % \XeTeXlinebreakskip should be reset with \fontsize + \addto\extrasthai{% + \XeTeXlinebreaklocale "th" + \XeTeXlinebreakskip 0em plus .1em} + \addto\noextrasthai{% + \XeTeXlinebreaklocale "en"} +\fi + \endinput
\ No newline at end of file diff --git a/Master/texmf-dist/tex/generic/babel/luababel.def b/Master/texmf-dist/tex/generic/babel/luababel.def index 6b5912ba4bd..22bc238a7c7 100644 --- a/Master/texmf-dist/tex/generic/babel/luababel.def +++ b/Master/texmf-dist/tex/generic/babel/luababel.def @@ -306,6 +306,77 @@ {\csname bbl@patterns@\bbl@tempa\endcsname\space}% #2}}}% \fi}} +\def\bbl@intraspace#1 #2 #3\@@{% + \directlua{ + Babel = Babel or {} + Babel.intraspaces = Babel.intraspaces or {} + Babel.intraspaces['\csname bbl@sbcp@\languagename\endcsname'] = % + {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 + }} +\begingroup +\catcode`\%=12 +\catcode`\^=14 +\catcode`\'=12 +\catcode`\~=12 +\gdef\bbl@seaintraspace{^ + \let\bbl@seaintraspace\relax + \directlua{ + Babel = Babel or {} + Babel.sea_ranges = Babel.sea_ranges or {} + function Babel.set_chranges (script, chrng) + local c = 0 + for s, e in string.gmatch(chrng..' ', '(.-)%.%.(.-)%s') do + Babel.sea_ranges[script..c]={tonumber(s,16), tonumber(e,16)} + c = c + 1 + end + end + function Babel.sea_disc_to_space (head) + local sea_ranges = Babel.sea_ranges + local last_char = nil + local quad = 655360 ^^ 10 pt = 655360 = 10 * 65536 + for item in node.traverse(head) do + local i = item.id + if i == node.id'glyph' then + last_char = item + elseif i == 7 and item.subtype == 3 and last_char + and last_char.char > 0x0C99 then + quad = font.getfont(last_char.font).size + for lg, rg in pairs(sea_ranges) do + if last_char.char > rg[1] and last_char.char < rg[2] then + lg = lg:sub(1, 4) + local intraspace = Babel.intraspaces[lg] + local intrapenalty = Babel.intrapenalties[lg] + local n + if intrapenalty ~= 0 then + n = node.new(14, 0) ^^ penalty + n.penalty = intrapenalty + node.insert_before(head, item, n) + end + 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) + node.remove(head, item) + end + end + end + end + end + luatexbase.add_to_callback('hyphenate', + function (head, tail) + lang.hyphenate(head) + Babel.sea_disc_to_space(head) + end, + 'Babel.sea_disc_to_space') +}} +\endgroup \AddBabelHook{luatex}{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 736e1566b52..8790e7636f2 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}[2018/09/02 3.23 Nil language] +\ProvidesLanguage{nil}[2018/09/26 3.24 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 37a3e1f7416..ad9c532c5da 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}[2018/09/02 3.23 Babel switching mechanism] +\ProvidesFile{switch.def}[2018/09/26 3.24 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.23} -\def\bbl@date{2018/09/02} +\def\bbl@version{3.24} +\def\bbl@date{2018/09/26} \def\adddialect#1#2{% \global\chardef#1#2\relax \bbl@usehooks{adddialect}{{#1}{#2}}% @@ -394,6 +394,13 @@ it in the preamble with something like:\\% \string\renewcommand\@backslashchar#2{..}\\% Reported}} +\def\bbl@tentative{\protect\bbl@tentative@i} +\def\bbl@tentative@i#1{% + \bbl@warning{% + Some functions in '#1' are tentative.\\% + They might not work as expected and their behavior\\% + could change in the future.\\% + Reported}} \def\@nolanerr#1{% \bbl@error {You haven't defined the language #1\space yet}% |