diff options
author | Karl Berry <karl@freefriends.org> | 2019-05-04 22:48:20 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2019-05-04 22:48:20 +0000 |
commit | cd83806db3427557043949f1d0ef6f369e681791 (patch) | |
tree | 5545a22648580cd465c7c216b9b669730d12b033 /Master/texmf-dist/tex/luatex | |
parent | c0bef3346513bd933c0e451415a1cbf6120264d2 (diff) |
luavlna (16apr19)
git-svn-id: svn://tug.org/texlive/trunk@50993 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/luatex')
3 files changed, 24 insertions, 65 deletions
diff --git a/Master/texmf-dist/tex/luatex/luavlna/luavlna-csplain-langs.lua b/Master/texmf-dist/tex/luatex/luavlna/luavlna-csplain-langs.lua index b061bee4297..f4e1ccea168 100644 --- a/Master/texmf-dist/tex/luatex/luavlna/luavlna-csplain-langs.lua +++ b/Master/texmf-dist/tex/luatex/luavlna/luavlna-csplain-langs.lua @@ -1,59 +1,21 @@ -return { -["spanish; castilian"]={26, 126}, -["magyar; hungarian"]={30, 130}, -["english; usenglish; american"]={100}, -["icelandic"]={42, 142}, -["basque"]={33, 133}, -["coptic"]={205}, -["catalan; valencian"]={204}, -["welsh"]={24, 124}, -["irish"]={34, 134}, -["armenian"]={210}, -["chinese"]={41, 141}, -["danish"]={25, 125}, -["turkish"]={31, 131}, -["interlingua "]={103}, -["slovak"]={6, 16, 116}, -["english; ukenglish; british"]={101}, -["ukrainian"]={209}, -["turkmen"]={47, 147}, -["sanskrit"]={207}, -["hindi"]={212}, -["lao"]={214}, -["finnish"]={29, 129}, -["assamese"]={211}, -["greek; polutonikogreek"]={203}, -["czech"]={5, 15, 115}, -["tamil"]={221}, -["italian"]={102}, -["french; francais; canadien; acadian"]={22, 122}, -["telugu"]={222}, -["croatian"]={40, 140}, -["panjabi; punjabi"]={220}, -["oriya"]={219}, -["russian"]={208}, -["malayalam"]={217}, -["marathi"]={218}, -["uppersorbian"]={43, 143}, -["portuges; portuguese; brazilian; brazil"]={38, 138}, -["galician"]={45, 145}, -["latvian"]={215}, -["afrikaans"]={44, 144}, -["lithuanian"]={216}, -["slovenian;slovene"]={28, 128}, -["mongolian"]={206}, -["greek; polutonikogreek"]={202}, -["latin"]={48, 148}, -["indonesian; indon; bahasai; bahasam; malay; meyalu"]={104}, -["polish"]={23, 123}, -["bokmål"]={35, 135}, -["dutch; flemish"]={37, 137}, -["greek; polutonikogreek"]={201}, -["norsk; nynorsk; norwegian"]={36, 136}, -["kannada"]={213}, -["estonian"]={32, 132}, -["english; usenglish; american; ukenglish; british; canadian; australian; newzealand"]={0}, -["romanian; moldavian; moldovan"]={39, 139}, -["german; germanb; ngerman; naustrian"]={21, 121}, -["kurdish"]={46, 146}, -} +local languages = {} +local function parse_language_lan(content) + for name, id in content:gmatch("preplang%s+.-%s+(.-)%s+.-%s(.-)%s+") do + -- skip invalid languages + if not name:match("%#") then + languages[name] = id + end + end +end + +local langfile = kpse.find_file("lua-hyphen.lan") +if langfile then + local f = io.open(langfile, "r") + local content = f:read("*all") + parse_language_lan(content) + f:close() +end + + +return languages + diff --git a/Master/texmf-dist/tex/luatex/luavlna/luavlna-langno.lua b/Master/texmf-dist/tex/luatex/luavlna/luavlna-langno.lua index f4c654ff5fa..f703e4328a9 100644 --- a/Master/texmf-dist/tex/luatex/luavlna/luavlna-langno.lua +++ b/Master/texmf-dist/tex/luatex/luavlna/luavlna-langno.lua @@ -67,7 +67,6 @@ local load_csplain= function() local numlang = {} for k, v in pairs(l) do local first = k:gsub(" *;.*","") - --print(first) langnum[first] = v for _,i in ipairs(v) do numlang[i] = first @@ -85,7 +84,7 @@ drivers["luatex"] = load_lang_dat drivers["default"] = load_lang_dat drivers["csplain"] = load_csplain drivers["pdfcsplain"] = load_csplain -drivers["luaplain"] = load_csplain +drivers["luacsplain"] = load_csplain local load_languages = function(name) local name = name or format diff --git a/Master/texmf-dist/tex/luatex/luavlna/luavlna.lua b/Master/texmf-dist/tex/luatex/luavlna/luavlna.lua index ce596bc2588..84d4c3f82cd 100644 --- a/Master/texmf-dist/tex/luatex/luavlna/luavlna.lua +++ b/Master/texmf-dist/tex/luatex/luavlna/luavlna.lua @@ -47,15 +47,12 @@ local tex4ht = false -- must be table in the {char = true, char2=true} form local set_singlechars= function(lang,c) --print("Set single chars lua") - print(type(lang), lang) if type(lang) == "table" then for _,l in pairs(lang) do - print("language: ",l) singlechars[l] = c end else local lang = tonumber(lang) - print("language: ",lang) -- for k,_ in pairs(c) do print(k) end singlechars[lang] = c end @@ -231,7 +228,8 @@ local function prevent_single_letter (head) while head do local id = head.id local nextn = head.next - local skip = node.has_attribute(head, luatexbase.attributes.preventsinglestatus) + -- local skip = node.has_attribute(head, luatexbase.attributes.preventsinglestatus) + local skip = node.has_attribute(head, M.preventsingleid) if id == math_id then if head.subtype == 0 then word = "" |