diff options
author | Mojca Miklavec <mojca.miklavec@gmail.com> | 2013-05-07 23:38:30 +0000 |
---|---|---|
committer | Mojca Miklavec <mojca.miklavec@gmail.com> | 2013-05-07 23:38:30 +0000 |
commit | 1a8e9572db5e1902de28cf84b45f8ed8b45de5c0 (patch) | |
tree | cb220baa38f0f8b44f52e0f5340ed4c4c011ca13 /Master/texmf-dist/tex/luatex/hyph-utf8 | |
parent | a51a5c6021b880f32efe163726f67cc673551c68 (diff) |
hyph-utf8 (2012.05.08)
- add Georgian hyphenation patterns (by Levan Shoshiashvili)
- add Thai hyphenation patterns (by Theppitak Karoonboonyanan) [not yet added as a package]
- cleanup luatex-hyphen module
- fix adding a dialect of a synonym in LuaTeX
git-svn-id: svn://tug.org/texlive/trunk@30326 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/etex.src | 4 | ||||
-rw-r--r-- | Master/texmf-dist/tex/luatex/hyph-utf8/hyphen.cfg | 6 | ||||
-rw-r--r-- | Master/texmf-dist/tex/luatex/hyph-utf8/luatex-hyphen.lua | 14 |
3 files changed, 13 insertions, 11 deletions
diff --git a/Master/texmf-dist/tex/luatex/hyph-utf8/etex.src b/Master/texmf-dist/tex/luatex/hyph-utf8/etex.src index 343c56eff02..3f9d18c8b8c 100644 --- a/Master/texmf-dist/tex/luatex/hyph-utf8/etex.src +++ b/Master/texmf-dist/tex/luatex/hyph-utf8/etex.src @@ -282,7 +282,7 @@ \directlua{ if not status.ini_version then if not luatexhyphen then - dofile(assert(kpse.find_file("luatex-hyphen.lua"))) + luatexhyphen = require("luatex-hyphen") end luatexhyphen.loadlanguage("\luatexluaescapestring{#1}", \the\language) @@ -310,7 +310,7 @@ \csname fi\endcsname \csname if\directlua{% do we want to skip this language now? if not luatexhyphen then - dofile(assert(kpse.find_file("luatex-hyphen.lua"))) + luatexhyphen = require("luatex-hyphen") end if (luatexhyphen.lookupname("\luatexluaescapestring{#1}") == nil) or (\number\csname lang@#1\endcsname == 0) then diff --git a/Master/texmf-dist/tex/luatex/hyph-utf8/hyphen.cfg b/Master/texmf-dist/tex/luatex/hyph-utf8/hyphen.cfg index 98a68cac2ea..93195fd653a 100644 --- a/Master/texmf-dist/tex/luatex/hyph-utf8/hyphen.cfg +++ b/Master/texmf-dist/tex/luatex/hyph-utf8/hyphen.cfg @@ -101,7 +101,7 @@ \ifx\directlua\relax\else \directlua{ if not luatexhyphen then - dofile(assert(kpse.find_file("luatex-hyphen.lua"))) + luatexhyphen = require("luatex-hyphen") end luatexhyphen.adddialect("\string#1", "\string#2") }% @@ -232,7 +232,7 @@ \global\@namedef{lu@texhyphen@loaded@\the\language}{}% \directlua{ if not luatexhyphen then - dofile(assert(kpse.find_file("luatex-hyphen.lua"))) + luatexhyphen = require("luatex-hyphen") end luatexhyphen.loadlanguage("\luatexluaescapestring{#1}", \the\language)}% @@ -332,7 +332,7 @@ \else \directlua{ if not luatexhyphen then - dofile(assert(kpse.find_file("luatex-hyphen.lua"))) + luatexhyphen = require("luatex-hyphen") end processnow = (tex.language == 0) or (luatexhyphen.lookupname("\luatexluaescapestring{#1}") == nil)}% 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 bb4895ed991..fa7ed3851ca 100644 --- a/Master/texmf-dist/tex/luatex/hyph-utf8/luatex-hyphen.lua +++ b/Master/texmf-dist/tex/luatex/hyph-utf8/luatex-hyphen.lua @@ -12,9 +12,6 @@ -- -- This work is under the CC0 license. -- -local error, dofile, pairs, ipairs = error, dofile, pairs, ipairs -local io, texio, lang, kpse = io, texio, lang, kpse -module('luatexhyphen') local function wlog(msg, ...) texio.write_nl('log', 'luatex-hyphen: '..msg:format(...)) end @@ -30,7 +27,7 @@ else wlog('using data file: %s', dbfile) language_dat = dofile(dbfile) end -function lookupname(name) +local function lookupname(name) if language_dat[name] then return language_dat[name], name else @@ -43,7 +40,7 @@ function lookupname(name) end end end -function loadlanguage(lname, id) +local function loadlanguage(lname, id) if id == 0 then return end @@ -79,7 +76,7 @@ function loadlanguage(lname, id) end end end -function adddialect(dialect, language) +local function adddialect(dialect, language) if dialect ~= '0' then dialect = dialect:gsub('l@', '') language = language:gsub('l@', '') @@ -89,5 +86,10 @@ function adddialect(dialect, language) end end end +return { + lookupname = lookupname, + loadlanguage = loadlanguage, + adddialect = adddialect, +} -- -- End of File `luatex-hyphen.lua'. |