summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/luatex/hyph-utf8
diff options
context:
space:
mode:
authorMojca Miklavec <mojca.miklavec@gmail.com>2012-04-16 20:27:04 +0000
committerMojca Miklavec <mojca.miklavec@gmail.com>2012-04-16 20:27:04 +0000
commit9d51929278483d4f1cbfe10dee38085f3ca4811c (patch)
tree3e821b4ce9b13388442fc5ca2836b0449ed2f755 /Master/texmf-dist/tex/luatex/hyph-utf8
parent20243b2f81048fc1b1a3e3f743bdb1517148d9b7 (diff)
hyph-utf8 (16apr12)
- fix babel synonyms in lualatex, upgrade from babel v3.8l to v.3.8m for hyphen.cfg - remove brazil,brazilian from hyphen-portuguese.tlpsrc (temporary patch no longer needed) - remove catalogue version from all hyphen-<foo>.tlpsrc git-svn-id: svn://tug.org/texlive/trunk@25990 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/luatex/hyph-utf8')
-rw-r--r--Master/texmf-dist/tex/luatex/hyph-utf8/hyphen.cfg23
-rw-r--r--Master/texmf-dist/tex/luatex/hyph-utf8/luatex-hyphen.lua15
2 files changed, 34 insertions, 4 deletions
diff --git a/Master/texmf-dist/tex/luatex/hyph-utf8/hyphen.cfg b/Master/texmf-dist/tex/luatex/hyph-utf8/hyphen.cfg
index d665d5212c0..f5fefbb8b17 100644
--- a/Master/texmf-dist/tex/luatex/hyph-utf8/hyphen.cfg
+++ b/Master/texmf-dist/tex/luatex/hyph-utf8/hyphen.cfg
@@ -10,7 +10,7 @@
%% intended for use with LuaTeX, but compatible with other engines.
%% The present file IS NOT part of the babel system.
%%
-%% The modifications are Copyright 2010 Khaled Hosny, Elie Roux, and Manuel
+%% The modifications are Copyright 2012 Khaled Hosny, Elie Roux, and Manuel
%% Pegourie-Gonnard, under LPPL version 1.3 or later.
%%
%% Here is the licence statement of the original hyphen.cfg file:
@@ -70,8 +70,8 @@
\fi
\ProvidesFile{hyphen.cfg}
- [2010/04/26 v3.8l-luatex-1.4 %
- Language switching mechanism for LuaTeX, adapted from babel v3.8l]
+ [2012/04/16 v3.8l-luatex-1.5 %
+ Language switching mechanism for LuaTeX, adapted from babel v3.8m]
\ifx\AtBeginDocument\@undefined
\input plain.def\relax
\fi
@@ -97,6 +97,16 @@
\fi
\def\adddialect#1#2{%
\global\chardef#1#2\relax
+ \ifx\directlua\@undefined\else
+ \ifx\directlua\relax\else
+ \directlua{
+ if not luatexhyphen then
+ dofile(assert(kpse.find_file("luatex-hyphen.lua")))
+ end
+ luatexhyphen.adddialect("\string#1", "\string#2")
+ }%
+ \fi
+ \fi
\wlog{\string#1 = a dialect from \string\language#2}}
\def\iflanguage#1{%
\expandafter\ifx\csname l@#1\endcsname\relax
@@ -391,6 +401,8 @@
\message{I couldn't find the file language.dat,\space
I will try the file hyphen.tex}
\input hyphen.tex\relax
+ \def\l@english{0}%
+ \def\languagename{english}%
\else
\last@language\m@ne
\loop
@@ -401,11 +413,16 @@
\else
\edef\bbl@line{\bbl@line\space/}%
\expandafter\process@line\bbl@line
+ \ifx\bbl@defaultlanguage\@undefined
+ \let\bbl@defaultlanguage\languagename
+ \fi
\fi
\iftrue \csname fi\endcsname
\csname if\ifeof1 false\else true\fi\endcsname
\repeat
\language=0
+ \let\languagename\bbl@defaultlanguage
+ \let\bbl@defaultlanguage\@undefined
\fi
\closein1
\let\process@language\@undefined
diff --git a/Master/texmf-dist/tex/luatex/hyph-utf8/luatex-hyphen.lua b/Master/texmf-dist/tex/luatex/hyph-utf8/luatex-hyphen.lua
index 647a106659e..6196bafcc92 100644
--- a/Master/texmf-dist/tex/luatex/hyph-utf8/luatex-hyphen.lua
+++ b/Master/texmf-dist/tex/luatex/hyph-utf8/luatex-hyphen.lua
@@ -8,7 +8,7 @@
--
-- This is a generated file (source: luatex-hyphen.dtx).
--
--- Copyright (C) 2010 by The LuaLaTeX development team.
+-- Copyright (C) 2012 by The LuaLaTeX development team.
--
-- This work is under the CC0 license.
--
@@ -44,6 +44,9 @@ function lookupname(name)
end
end
function loadlanguage(lname, id)
+ if id == 0 then
+ return
+ end
local msg = "loading%s patterns and exceptions for: %s (\\language%d)"
local ldata, cname = lookupname(lname)
if not ldata then
@@ -76,5 +79,15 @@ function loadlanguage(lname, id)
end
end
end
+function adddialect(dialect, language)
+ if dialect ~= '0' then
+ dialect = dialect:gsub('l@', '')
+ language = language:gsub('l@', '')
+ data = language_dat[language]
+ if data then
+ data.synonyms[#data.synonyms+1] = dialect
+ end
+ end
+end
--
-- End of File `luatex-hyphen.lua'.