diff options
Diffstat (limited to 'Master/texmf-dist/tex/context/base/mkiv')
352 files changed, 26546 insertions, 7747 deletions
diff --git a/Master/texmf-dist/tex/context/base/mkiv/anch-pgr.lua b/Master/texmf-dist/tex/context/base/mkiv/anch-pgr.lua index 8e400cd123f..8681239c9b6 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/anch-pgr.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/anch-pgr.lua @@ -24,6 +24,7 @@ local lpegmatch = lpeg.match local jobpositions = job.positions local formatters = string.formatters local setmetatableindex = table.setmetatableindex +local settings_to_array = utilities.parsers.settings_to_array local enableaction = nodes.tasks.enableaction @@ -32,6 +33,7 @@ local context = context local implement = interfaces.implement +local texgetcount = tex.getcount local report_graphics = logs.reporter("backgrounds") local report_shapes = logs.reporter("backgrounds","shapes") local report_free = logs.reporter("backgrounds","free") @@ -78,9 +80,9 @@ local getdepth = nuts.getdepth local nodecodes = nodes.nodecodes local par_code = nodecodes.par -local start_of_par = nuts.start_of_par -local insert_before = nuts.insert_before -local insert_after = nuts.insert_after +local startofpar = nuts.startofpar +local insertbefore = nuts.insertbefore +local insertafter = nuts.insertafter local processranges = nuts.processranges @@ -99,6 +101,7 @@ local enabled = false -- many pages but for an arbitrary background shape that is not so common. local function check(specification) + -- local a = specification.attribute local index = specification.index local depth = specification.depth @@ -165,12 +168,12 @@ local function flush(head,f,l,a,parent,depth) ln = new_hlist(setlink(new_rule(65536,65536*4,0),new_kern(-65536),ln)) rn = new_hlist(setlink(new_rule(65536,0,65536*4),new_kern(-65536),rn)) end - if getid(f) == par_code and start_of_par(f) then -- we need to clean this mess - insert_after(head,f,ln) + if getid(f) == par_code and startofpar(f) then -- we need to clean this mess + insertafter(head,f,ln) else - head, f = insert_before(head,f,ln) + head, f = insertbefore(head,f,ln) end - insert_after(head,l,rn) + insertafter(head,l,rn) end return head, true end @@ -205,24 +208,10 @@ local function registerbackground(name) end end --- local function collectbackgrounds(r,n) --- if enabled then --- local parent = getbox(n) --- local head = getlist(parent) --- realpage = r --- processranges(a_textbackground,flush,head) -- ,parent) --- end --- end --- --- interfaces.implement { --- name = "collectbackgrounds", --- actions = collectbackgrounds, --- arguments = { "integer", "integer" } --- } - nodes.handlers.textbackgrounds = function(head,where,parent) -- we have hlistdir and local dir -- todo enable action in register - index = index + 1 + index = index + 1 + realpage = texgetcount("realpageno") return processranges(a_textbackground,flush,head,parent) end @@ -235,8 +224,6 @@ interfaces.implement { -- optimized already but we can assume a cycle i.e. prune the last point and then -- even less code .. we could merge some loops but his is more robust --- use idiv here - local function topairs(t,n) local r = { } for i=1,n do @@ -783,9 +770,7 @@ local function calculatemultipar(tag) for i=bindex+1,eindex-1 do br = f_tag_two(btag,i) local r = collected[br] - if not r then - report_graphics("invalid middle for %a",br) - else + if r then local rp = r.p -- page local pp = list[rp] local mp = middlepart(b,e,p,rp,r,left,right) @@ -794,6 +779,8 @@ local function calculatemultipar(tag) else list[rp] = { mp } end + else + report_graphics("invalid middle for %a",br) end end local ep = e.p -- page @@ -1213,7 +1200,7 @@ implement { actions = function(tags,anchor,page) -- no caching (yet) / page local collected = jobpositions.collected if type(tags) == "string" then - tags = utilities.parsers.settings_to_array(tags) + tags = settings_to_array(tags) end local list = { } local nofboxes = 0 diff --git a/Master/texmf-dist/tex/context/base/mkiv/anch-pos.lua b/Master/texmf-dist/tex/context/base/mkiv/anch-pos.lua index 77bf09e3923..77f55964f8f 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/anch-pos.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/anch-pos.lua @@ -49,6 +49,7 @@ local context = context local ctx_latelua = context.latelua local tex = tex +local texgetdimen = tex.getdimen local texgetcount = tex.getcount local texgetinteger = tex.getintegervalue or tex.getcount local texsetcount = tex.setcount @@ -574,8 +575,8 @@ implement { actions = function() nofparagraphs = nofparagraphs + 1 texsetcount("global","c_anch_positions_paragraph",nofparagraphs) - local box = getbox("strutbox") - local w, h, d = getwhd(box) + local h = texgetdimen("strutht") + local d = texgetdimen("strutdp") local t = { p = true, c = true, @@ -704,8 +705,8 @@ implement { name = "dosetpositionstrut", arguments = "string", actions = function(name) - local box = getbox("strutbox") - local w, h, d = getwhd(box) + local h = texgetdimen("strutht") + local d = texgetdimen("strutdp") local spec = { p = true, c = column, @@ -726,8 +727,8 @@ implement { name = "dosetpositionstrutkind", arguments = { "string", "integer" }, actions = function(name,kind) - local box = getbox("strutbox") - local w, h, d = getwhd(box) + local h = texgetdimen("strutht") + local d = texgetdimen("strutdp") local spec = { k = kind, p = true, @@ -985,7 +986,7 @@ local function overlapping(one,two,overlappingmargin) -- hm, strings so this is end local function onsamepage(list,page) - for id in gmatch(list,"(, )") do + for id in gmatch(list,"([^,%s]+)") do local jpi = collected[id] if jpi then local p = jpi.p diff --git a/Master/texmf-dist/tex/context/base/mkiv/anch-pos.mkiv b/Master/texmf-dist/tex/context/base/mkiv/anch-pos.mkiv index 772c89504d9..ce67caa9805 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/anch-pos.mkiv +++ b/Master/texmf-dist/tex/context/base/mkiv/anch-pos.mkiv @@ -477,10 +477,10 @@ %D positions being on the same page. %D %D \starttyping -%D \doifpositionsonsamepageelse{point a}{point b} +%D \doifpositionsonsamepageelse{point a,point b} %D {action when on same page} %D {action when not on same page} -%D \doifpositionsonthispageelse{point a}{point b} +%D \doifpositionsonthispageelse{point a,point b} %D {action when on this page} %D {action when not on this page} %D \stoptyping diff --git a/Master/texmf-dist/tex/context/base/mkiv/anch-snc.lua b/Master/texmf-dist/tex/context/base/mkiv/anch-snc.lua index ee13adca39d..e7520f88d1e 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/anch-snc.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/anch-snc.lua @@ -24,8 +24,8 @@ local mpnumeric = mp.numeric local mppoints = mp.points local texgetdimen = tex.getdimen -local p_number = patterns.cardinal/tonumber -local p_space = patterns.whitespace^0 +local p_number = lpegpatterns.cardinal/tonumber +local p_space = lpegpatterns.whitespace^0 local p_tag = P("syncpos:") * p_number * P(":") * p_number local p_option = p_number * ((P(",") * p_space * P("reset") * Cc(true)) + Cc(false)) -- for now diff --git a/Master/texmf-dist/tex/context/base/mkiv/attr-ini.lua b/Master/texmf-dist/tex/context/base/mkiv/attr-ini.lua index 5507f2a70b8..b05c343e598 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/attr-ini.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/attr-ini.lua @@ -35,8 +35,8 @@ attributes.states = attributes.states or { } attributes.handlers = attributes.handlers or { } attributes.unsetvalue = -0x7FFFFFFF -local currentfont = font.current -- mabe nicer is attributes.current -local currentattributes = node.current_attributes -- mabe nicer is fonts .current +local currentfont = font.current +local currentattributes = nodes and nodes.currentattributes or node.currentattributes or node.current_attr -- no nodes table yet local names = attributes.names local numbers = attributes.numbers diff --git a/Master/texmf-dist/tex/context/base/mkiv/attr-ini.mkiv b/Master/texmf-dist/tex/context/base/mkiv/attr-ini.mkiv index 71c6478f8c3..ad40a1ffead 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/attr-ini.mkiv +++ b/Master/texmf-dist/tex/context/base/mkiv/attr-ini.mkiv @@ -168,19 +168,3 @@ % \to \everyafterpagebreak \protect \endinput - -% for the luatex list: -% -% \attributedef\zeroattribute=0 -% \attributedef\someattribute=999 -% -% \directlua { -% local createtoken = newtoken.create -% function attributenumber(name) -% local n = createtoken(name).mode - createtoken("zeroattribute").mode -% return n >= 0 and n or false -% end -% } -% -% \directlua{print(attributenumber("noneattribute"))} -% \directlua{print(attributenumber("someattribute"))} diff --git a/Master/texmf-dist/tex/context/base/mkiv/back-exp.lua b/Master/texmf-dist/tex/context/base/mkiv/back-exp.lua index 7a37cc94887..1abe9164a71 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/back-exp.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/back-exp.lua @@ -325,9 +325,9 @@ local styletemplate = [[ local numbertoallign = { [0] = "justify", ["0"] = "justify", [variables.normal ] = "justify", - [1] = "right", ["1"] = "right", [variables.flushright] = "right", - [2] = "center", ["2"] = "center", [variables.middle ] = "center", - [3] = "left", ["3"] = "left", [variables.flushleft ] = "left", + "right", ["1"] = "right", [variables.flushright] = "right", + "center", ["2"] = "center", [variables.middle ] = "center", + "left", ["3"] = "left", [variables.flushleft ] = "left", } function wrapups.allusedstyles(filename) @@ -1640,7 +1640,7 @@ do d.__i__ = n data[n] = d elseif content == " " or content == "" then - if di.tg == "mspace" then + if d.tg == "mspace" then -- we append or prepend a space to a preceding or following mtext local parent = di.__p__ local index = di.__i__ -- == i @@ -3020,7 +3020,7 @@ local collectresults do -- too many locals otherwise local getkern = nuts.getkern local getwidth = nuts.getwidth - local start_of_par = nuts.start_of_par + local startofpar = nuts.startofpar local nexthlist = nuts.traversers.hlist local nextnode = nuts.traversers.node @@ -3390,7 +3390,7 @@ end last = nil currentparagraph = nil end - elseif not paragraph and id == par_code and start_of_par(n) then + elseif not paragraph and id == par_code and startofpar(n) then paragraph = getattr(n,a_taggedpar) elseif id == disc_code then -- very unlikely because we stripped them @@ -3438,8 +3438,8 @@ end for n, subtype in nexthlist, head do if subtype == linelist_code then setattr(n,a_textblock,noftextblocks) - elseif subtype == glue_code or subtype == kern_code then -- no need to set fontkerns - setattr(n,a_textblock,0) +-- elseif subtype == glue_code or subtype == kern_code then -- weird, no list +-- setattr(n,a_textblock,0) end end return false diff --git a/Master/texmf-dist/tex/context/base/mkiv/back-ini.lua b/Master/texmf-dist/tex/context/base/mkiv/back-ini.lua index d01be4a73f5..f2c22d3ba2a 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/back-ini.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/back-ini.lua @@ -132,7 +132,7 @@ end) backends.included = included function backends.timestamp() - return os.date("%Y-%m-%dT%X") .. os.timezone(true) + return os.date("%Y-%m-%dT%X") .. os.timezone() end -- Also here: diff --git a/Master/texmf-dist/tex/context/base/mkiv/back-pdp.lua b/Master/texmf-dist/tex/context/base/mkiv/back-pdp.lua index 857f13ef239..3de83bef1ac 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/back-pdp.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/back-pdp.lua @@ -22,6 +22,7 @@ local tokenscanners = tokens.scanners local scanword = tokenscanners.word local scankeyword = tokenscanners.keyword local scanstring = tokenscanners.string +local scantoks = tokenscanners.toks local scaninteger = tokenscanners.integer local scanwhd = tokenscanners.whd @@ -30,6 +31,7 @@ local report = logs.reporter("backend") local nodepool = nodes.pool local newliteral = nodepool.literal +local newlateliteral = nodepool.lateliteral local newsave = nodepool.save local newrestore = nodepool.restore local newsetmatrix = nodepool.setmatrix @@ -40,8 +42,24 @@ local variables = interfaces.variables -- literals +-- local function pdfliteral() +-- context(newliteral(scanword() or "origin",scanstring())) +-- end + +-- Who knows what will end up in e.g. tikz .. so we now do: + local function pdfliteral() - context(newliteral(scanword() or "origin",scanstring())) + local word = scanword() + local node + if word == "shipout" then + context(newlateliteral(scanword() or "origin",scantoks())) + else + context(newliteral(word or "origin",scanstring())) + end +end + +local function pdflateliteral() + context(newlateliteral(scanword() or "origin",scantoks())) end -- objects @@ -198,14 +216,15 @@ end -- mapfile mapline includechars catalog info names trailer local extensions = { - literal = pdfliteral, - obj = pdfobj, - refobj = pdfrefobj, - dest = pdfdest, - annot = pdfannot, - save = pdfsave, - restore = pdfrestore, - setmatrix = pdfsetmatrix, + literal = pdfliteral, + lateliteral = pdflateliteral, + obj = pdfobj, + refobj = pdfrefobj, + dest = pdfdest, + annot = pdfannot, + save = pdfsave, + restore = pdfrestore, + setmatrix = pdfsetmatrix, } local function pdfextension() @@ -276,12 +295,13 @@ implement { name = "pdfvariable", actions = pdfvariable } -- for the moment (tikz) -implement { name = "pdfliteral", actions = pdfliteral } -implement { name = "pdfobj", actions = pdfobj } -implement { name = "pdflastobj", actions = pdflastobj } -implement { name = "pdfrefobj", actions = pdfrefobj } ---------- { name = "pdfannot", actions = pdfannot } ---------- { name = "pdfdest", actions = pdfdest } ---------- { name = "pdfsave", actions = pdfsave } ---------- { name = "pdfrestore", actions = pdfrestore } ---------- { name = "pdfsetmatrix", actions = pdfsetmatrix } +implement { name = "pdfliteral", actions = pdfliteral } +implement { name = "pdflateliteral", actions = pdflateliteral } +implement { name = "pdfobj", actions = pdfobj } +implement { name = "pdflastobj", actions = pdflastobj } +implement { name = "pdfrefobj", actions = pdfrefobj } +--------- { name = "pdfannot", actions = pdfannot } +--------- { name = "pdfdest", actions = pdfdest } +--------- { name = "pdfsave", actions = pdfsave } +--------- { name = "pdfrestore", actions = pdfrestore } +--------- { name = "pdfsetmatrix", actions = pdfsetmatrix } diff --git a/Master/texmf-dist/tex/context/base/mkiv/blob-ini.lua b/Master/texmf-dist/tex/context/base/mkiv/blob-ini.lua index 0b35c3b65aa..012b4ddb053 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/blob-ini.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/blob-ini.lua @@ -25,28 +25,26 @@ if not modules then modules = { } end modules ['blob-ini'] = { local type, tostring = type, tostring local lpegmatch, lpegpatterns = lpeg.match, lpeg.patterns -local report_blobs = logs.reporter("blobs") +local report_blobs = logs.reporter("blobs") -local flush_node_list = node.flush_list -local hpack_node_list = node.hpack ------ vpack_node_list = node.vpack -local write_node = node.write +local flushnodelist = nodes.flushlist +local hpacknodelist = nodes.hpack -local typesetters = nodes.typesetters -local tonodes = typesetters.tonodes -local tohpack = typesetters.tohpack -local tovpack = typesetters.tovpack +local typesetters = nodes.typesetters +local tonodes = typesetters.tonodes +local tohpack = typesetters.tohpack +local tovpack = typesetters.tovpack -local implement = interfaces.implement +local context = context --- provide copies here (nicer for manuals) +local implement = interfaces.implement -blobs = blobs or { } -local blobs = blobs +blobs = blobs or { } +local blobs = blobs -blobs.tonodes = tonodes -blobs.tohpack = tohpack -blobs.tovpack = tovpack +blobs.tonodes = tonodes +blobs.tohpack = tohpack +blobs.tovpack = tovpack -- end of helpers @@ -68,7 +66,7 @@ function blobs.dispose(t) local li = list[i] local pack = li.pack if pack then - flush_node_list(pack) + flushnodelist(pack) li.pack = nil end end @@ -96,14 +94,14 @@ function blobs.pack(t,how) for i=1,#list do local pack = list[i].pack if pack then - flush_node_list(node.pack) + flushnodelist(pack) end if how == "vertical" then -- we need to prepend a local par node -- list[i].pack = vpack_node_list(list[i].head,"exactly") report_blobs("vpack not yet supported") else - list[i].pack = hpack_node_list(list[i].head,"exactly") + list[i].pack = hpacknodelist(list[i].head,"exactly") end end end @@ -114,8 +112,8 @@ function blobs.write(t) local li = list[i] local pack = li.pack if pack then - write_node(pack) - flush_node_list(pack) + context(pack) + flushnodelist(pack) li.pack = nil end end @@ -158,28 +156,28 @@ end local function strwd(str) local l = tohpack(str) local w = l.width - flush_node_list(l) + flushnodelist(l) return w end local function strht(str) local l = tohpack(str) local h = l.height - flush_node_list(l) + flushnodelist(l) return h end local function strdp(str) local l = tohpack(str) local d = l.depth - flush_node_list(l) + flushnodelist(l) return d end local function strhd(str) local l = tohpack(str) local s = l.height + l.depth - flush_node_list(l) + flushnodelist(l) return s end @@ -192,7 +190,7 @@ blobs.strhd = strhd local scan_hbox = tokens.scanners.hbox -implement { name = "strwd", actions = function() local l = scan_hbox() context(l.width) flush_node_list(l) end } -implement { name = "strht", actions = function() local l = scan_hbox() context(l.height) flush_node_list(l) end } -implement { name = "strdp", actions = function() local l = scan_hbox() context(l.depth) flush_node_list(l) end } -implement { name = "strhd", actions = function() local l = scan_hbox() context(l.height + l.depth) flush_node_list(l) end } +implement { name = "strwd", actions = function() local l = scan_hbox() context(l.width) flushnodelist(l) end } +implement { name = "strht", actions = function() local l = scan_hbox() context(l.height) flushnodelist(l) end } +implement { name = "strdp", actions = function() local l = scan_hbox() context(l.depth) flushnodelist(l) end } +implement { name = "strhd", actions = function() local l = scan_hbox() context(l.height + l.depth) flushnodelist(l) end } diff --git a/Master/texmf-dist/tex/context/base/mkiv/buff-ini.lua b/Master/texmf-dist/tex/context/base/mkiv/buff-ini.lua index 4589e5498c5..f23344edada 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/buff-ini.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/buff-ini.lua @@ -8,7 +8,7 @@ if not modules then modules = { } end modules ['buff-ini'] = { local concat = table.concat local type, next, load = type, next, load -local sub, format = string.sub, string.format +local sub, format, find = string.sub, string.format, string.find local splitlines, validstring, replacenewlines = string.splitlines, string.valid, string.replacenewlines local P, Cs, patterns, lpegmatch = lpeg.P, lpeg.Cs, lpeg.patterns, lpeg.match local utfchar = utf.char @@ -55,6 +55,7 @@ local replacesuffix = file.replacesuffix local registertempfile = luatex.registertempfile local v_yes = variables.yes +local v_append = variables.append local eol = patterns.eol local space = patterns.space @@ -125,6 +126,14 @@ local function getcontent(name) return buffer and buffer.data or "" end +local function empty(name) + if find(getcontent(name),"%S") then + return false + else + return true + end +end + local function getlines(name) local buffer = name and cache[name] return buffer and splitlines(buffer.data) @@ -201,6 +210,7 @@ buffers.assign = assign buffers.prepend = prepend buffers.append = append buffers.exists = exists +buffers.empty = empty buffers.getcontent = getcontent buffers.getlines = getlines buffers.collectcontent = collectcontent @@ -642,7 +652,7 @@ implement { end } -local function savebuffer(list,name,prefix) -- name is optional +local function savebuffer(list,name,prefix,option,directory) -- name is optional if not list or list == "" then list = name end @@ -656,13 +666,16 @@ local function savebuffer(list,name,prefix) -- name is optional if prefix == v_yes then name = addsuffix(tex.jobname .. "-" .. name,"tmp") end - io.savedata(name,replacenewlines(content)) + if directory ~= "" and dir.makedirs(directory) then + name = file.join(directory,name) + end + io.savedata(name,replacenewlines(content),"\n",option == v_append) end implement { name = "savebuffer", actions = savebuffer, - arguments = "3 strings", + arguments = "5 strings", } -- we can consider adding a size to avoid unlikely clashes @@ -675,7 +688,7 @@ local runner = sandbox.registerrunner { name = "run buffer", program = "context", method = "execute", - template = jit and "--purgeall --jit %filename%" or "--purgeall %filename%", + template = (jit and "--jit --engine=luajittex" or "--engine=luatex") .. " --purgeall %?path: --path=%path% ?% %filename%", reporter = report_typeset, checkers = { filename = "readable", @@ -769,7 +782,10 @@ local function runbuffer(name,encapsulate,runnername,suffixes) end savedata(filename,content) report_typeset("processing saved buffer %a\n",filename) - runner { filename = filename } + runner { + filename = filename, + path = environment.arguments.path, -- maybe take all set paths + } end new[tag] = (new[tag] or 0) + 1 report_typeset("no changes in %a, processing skipped",name) @@ -800,7 +816,7 @@ local function getbuffermkvi(name) -- rather direct ! ctx_viafile(resolvers.macros.preprocessed(getcontent(name)),formatters["buffer.%s.mkiv"](validstring(name,"noname"))) end -local function gettexbuffer(name) +local function getbuffertex(name) local buffer = name and cache[name] if buffer and buffer.data ~= "" then ctx_pushcatcodetable() @@ -815,15 +831,15 @@ local function gettexbuffer(name) end end -buffers.get = getbuffer -buffers.getmkiv = getbuffermkiv -buffers.gettexbuffer = gettexbuffer -buffers.run = runbuffer +buffers.get = getbuffer +buffers.getmkvi = getbuffermkvi +buffers.gettex = getbuffertex +buffers.run = runbuffer implement { name = "getbufferctxlua", actions = loadcontent, arguments = "string" } implement { name = "getbuffer", actions = getbuffer, arguments = "string" } implement { name = "getbuffermkvi", actions = getbuffermkvi, arguments = "string" } -implement { name = "gettexbuffer", actions = gettexbuffer, arguments = "string" } +implement { name = "getbuffertex", actions = getbuffertex, arguments = "string" } interfaces.implement { name = "getbuffercontent", @@ -849,6 +865,12 @@ implement { arguments = "string" } +implement { + name = "doifelsebufferempty", + actions = { empty, commands.doifelse }, + arguments = "string" +} + -- This only used for mp buffers and is a kludge. Don't change the -- texprint into texsprint as it fails because "p<nl>enddef" becomes -- "penddef" then. @@ -885,10 +907,10 @@ end -- moved here: function buffers.samplefile(name) - if not buffers.exists(name) then - buffers.assign(name,io.loaddata(resolvers.findfile(name))) + if not exists(name) then + assign(name,io.loaddata(resolvers.findfile(name))) end - buffers.get(name) + getbuffer(name) end implement { diff --git a/Master/texmf-dist/tex/context/base/mkiv/buff-ini.mkiv b/Master/texmf-dist/tex/context/base/mkiv/buff-ini.mkiv index a8a120d903c..071a189873e 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/buff-ini.mkiv +++ b/Master/texmf-dist/tex/context/base/mkiv/buff-ini.mkiv @@ -22,8 +22,8 @@ \let\currentbuffer\empty -\def\doifelsebuffer#1% - {\clf_doifelsebuffer{#1}} + \def\doifelsebuffer #1{\clf_doifelsebuffer {#1}} +\unexpanded\def\doifelsebufferempty#1{\clf_doifelsebufferempty{#1}} \let\doifbufferelse\doifelsebuffer @@ -246,12 +246,14 @@ % \savebufferinfile[x][temp.log] % gets name: temp.log \installcorenamespace{savebuffer} +\installcorenamespace{savebuffercounter} -\installsetuponlycommandhandler \??savebuffer {savebuffer} +\installcommandhandler \??savebuffer {savebuffer} \??savebuffer \setupsavebuffer [\c!list=, \c!file=, + \c!directory=, \c!prefix=\v!yes] \unexpanded\def\savebuffer @@ -262,9 +264,54 @@ \doifelseassignment{#1} {\setupcurrentsavebuffer[#1]}% {\setupcurrentsavebuffer[\c!list={#1},\c!file=#2]}% - \clf_savebuffer{\directsavebufferparameter\c!list}{\directsavebufferparameter\c!file}{\directsavebufferparameter\c!prefix}% + \clf_savebuffer % will become key/value + {\savebufferparameter\c!list}% + {\savebufferparameter\c!file}% + {\savebufferparameter\c!prefix}% + {\savebufferparameter\c!option}% + {\savebufferparameter\c!directory}% \endgroup} +%D \starttyping +%D \definesavebuffer[slide] +%D +%D \starttext +%D \startslide +%D \starttext +%D \stopslide +%D \startslide +%D slide 1 +%D \stopslide +%D text 1 \par +%D \startslide +%D slide 2 +%D \stopslide +%D text 2 \par +%D \startslide +%D \stoptext +%D \stopslide +%D \stoptext +%D \stoptyping + +\appendtoks + \ifcsname\e!stop\currentsavebuffer\endcsname\else + \definebuffer[\currentsavebuffer]% + \expandafter\newcount\csname\??savebuffercounter\currentsavebuffer\endcsname + \setuevalue{\e!stop\currentsavebuffer}{\buff_stop_save_buffer{\currentsavebuffer}}% + \setsavebufferparameter\c!file{\currentsavebuffer.tex}% + \fi +\to \everydefinesavebuffer + +\protected\def\buff_stop_save_buffer#1% + {\edef\currentsavebuffer{#1}% + \global\advance\csname\??savebuffercounter\currentsavebuffer\endcsname\plusone + \clf_savebuffer % will become key/value + {\thedefinedbuffer{\currentsavebuffer}}% + {\savebufferparameter\c!file}% + {\savebufferparameter\c!prefix}% + {\ifnum\csname\??savebuffercounter\currentsavebuffer\endcsname>\plusone\v!append\fi}% + {\savebufferparameter\c!directory}} + %D Experimental: no expansion of commands in buffer! % \startbuffer[what] diff --git a/Master/texmf-dist/tex/context/base/mkiv/buff-ver.lua b/Master/texmf-dist/tex/context/base/mkiv/buff-ver.lua index ccb8ab0df8e..2a8e3b8c2b4 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/buff-ver.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/buff-ver.lua @@ -807,8 +807,8 @@ local nospace = space^1/"" local endstring = P(-1) local compactors = { - [v_all] = Cs((backslash * (1-backslash-space)^1 * nospace * (endstring+fences) + 1)^0), - [v_absolute] = Cs((backslash * (1-symbols -space)^1 * nospace * (symbols+backslash) + 1)^0), + [v_all] = Cs((backslash * (1-backslash-space)^1 * nospace * (endstring + fences + #backslash) + 1)^0), + [v_absolute] = Cs((backslash * (1-symbols -space)^1 * nospace * (symbols + backslash ) + 1)^0), [v_last] = Cs((space^1 * endstring/"" + 1)^0), } diff --git a/Master/texmf-dist/tex/context/base/mkiv/char-def.lua b/Master/texmf-dist/tex/context/base/mkiv/char-def.lua index 7a04e869d19..1aea51318fa 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/char-def.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/char-def.lua @@ -19,11 +19,16 @@ the trouble. Some additional data is kept in other files. For a generic subset of the data here, run "context luatex-basics-prepare.tex" after adapting this file. + +Updated end 2021 as prelude to ar's remote talk at the meeting. Needs some indic +checking (see comment field). + +Todo: get rid of specials = { "font", ... } in math ... we have already vectors. ]]-- local variants_emoji={ - [0xFE0E]="text style", - [0xFE0F]="emoji style", + [0xFE0E]="text style", + [0xFE0F]="emoji style", } local variants_forms={ @@ -31,6 +36,52 @@ local variants_forms={ [0xFE01]="centered form", } +local variants_style={ + [0xFE00]="chancery style", + [0xFE01]="roundhand style", +} + +local variants_dotted={ + [0xFE00]="dotted form", +} + +local variants_90={ + [0xFE00]="rotated 90 degrees", +} + +local variants_180={ + [0xFE01]="rotated 180 degrees", +} + +local variants_270={ + [0xFE02]="rotated 270 degrees", +} + +local variants_expanded={ + [0xFE00]="expanded", +} + +local variants_90_180={ + [0xFE00]="rotated 90 degrees", + [0xFE01]="rotated 180 degrees", +} + +local variants_90_180_270={ + [0xFE00]="rotated 90 degrees", + [0xFE01]="rotated 180 degrees", + [0xFE02]="rotated 270 degrees", +} + +local variants_180_270={ + [0xFE01]="rotated 180 degrees", + [0xFE02]="rotated 270 degrees", +} + +local variants_90_270={ + [0xFE00]="rotated 90 degrees", + [0xFE02]="rotated 270 degrees", +} + characters = characters or { } characters.data={ @@ -314,7 +365,7 @@ characters.data={ description="EXCLAMATION MARK", direction="on", linebreak="ex", - mathclass="close", + mathclass="factorial", synonyms={ "bang", "factorial" }, unicodeslot=0x21, }, @@ -326,7 +377,7 @@ characters.data={ description="QUOTATION MARK", direction="on", linebreak="qu", - mathclass="default", + mathclass="ordinary", synonyms={ "neutral quotation mark" }, unicodeslot=0x22, }, @@ -389,7 +440,7 @@ characters.data={ description="APOSTROPHE", direction="on", linebreak="qu", - mathclass="default", + mathclass="ordinary", synonyms={ "apl quote", "apostrophe-quote", "neutral single quotation mark" }, unicodeslot=0x27, }, @@ -442,6 +493,7 @@ characters.data={ direction="es", linebreak="pr", mathclass="binary", + mathgroup="nary arithmetic", unicodeslot=0x2B, }, { @@ -464,9 +516,10 @@ characters.data={ description="HYPHEN-MINUS", direction="es", linebreak="hy", - mathclass="nothing", + mathclass="ordinary", mathextensible="h", mathfiller="relfill", + mathgroup="binary arithmetic", mathname="mathhyphen", mathsymbol=0x2212, synonyms={ "hyphen or minus sign", "hyphus" }, @@ -481,8 +534,16 @@ characters.data={ description="FULL STOP", direction="cs", linebreak="is", - mathclass="punctuation", - mathname="ldotp", + mathspec={ + { + class="binary", + name="ldot", + }, + { + class="punctuation", + name="ldotp", + }, + }, synonyms={ "decimal point", "dot", "period" }, unicodeslot=0x2E, }, @@ -494,7 +555,17 @@ characters.data={ description="SOLIDUS", direction="cs", linebreak="sy", - mathclass="middle", + mathclass="division", + mathspec={ + { + class="division", + name="slash", + }, + { + class="division", + name="solidus", + }, + }, synonyms={ "slash", "virgule" }, unicodeslot=0x2F, }, @@ -505,7 +576,7 @@ characters.data={ description="DIGIT ZERO", direction="en", linebreak="nu", - mathclass="number", + mathclass="digit", unicodeslot=0x30, variants={ [0xFE00]="short diagonal stroke form", @@ -520,7 +591,7 @@ characters.data={ description="DIGIT ONE", direction="en", linebreak="nu", - mathclass="number", + mathclass="digit", unicodeslot=0x31, variants=variants_emoji, }, @@ -531,7 +602,7 @@ characters.data={ description="DIGIT TWO", direction="en", linebreak="nu", - mathclass="number", + mathclass="digit", unicodeslot=0x32, variants=variants_emoji, }, @@ -542,7 +613,7 @@ characters.data={ description="DIGIT THREE", direction="en", linebreak="nu", - mathclass="number", + mathclass="digit", unicodeslot=0x33, variants=variants_emoji, }, @@ -553,7 +624,7 @@ characters.data={ description="DIGIT FOUR", direction="en", linebreak="nu", - mathclass="number", + mathclass="digit", unicodeslot=0x34, variants=variants_emoji, }, @@ -564,7 +635,7 @@ characters.data={ description="DIGIT FIVE", direction="en", linebreak="nu", - mathclass="number", + mathclass="digit", unicodeslot=0x35, variants=variants_emoji, }, @@ -575,7 +646,7 @@ characters.data={ description="DIGIT SIX", direction="en", linebreak="nu", - mathclass="number", + mathclass="digit", unicodeslot=0x36, variants=variants_emoji, }, @@ -586,7 +657,7 @@ characters.data={ description="DIGIT SEVEN", direction="en", linebreak="nu", - mathclass="number", + mathclass="digit", unicodeslot=0x37, variants=variants_emoji, }, @@ -597,7 +668,7 @@ characters.data={ description="DIGIT EIGHT", direction="en", linebreak="nu", - mathclass="number", + mathclass="digit", unicodeslot=0x38, variants=variants_emoji, }, @@ -608,7 +679,7 @@ characters.data={ description="DIGIT NINE", direction="en", linebreak="nu", - mathclass="number", + mathclass="digit", unicodeslot=0x39, variants=variants_emoji, }, @@ -621,6 +692,7 @@ characters.data={ direction="cs", linebreak="is", mathclass="relation", +--mathsymbol=0x2236, unicodeslot=0x3A, }, { @@ -642,6 +714,7 @@ characters.data={ direction="on", linebreak="al", mathclass="relation", + mathgroup="nary relation", mathname="lt", mirror=0x3E, textclass="open", @@ -657,6 +730,7 @@ characters.data={ linebreak="al", mathextensible="h", mathfiller="equalfill", + mathgroup="nary relation", mathspec={ { class="relation", @@ -664,6 +738,7 @@ characters.data={ }, { class="relation", + comment="useless", name="Relbar", }, }, @@ -677,6 +752,7 @@ characters.data={ direction="on", linebreak="al", mathclass="relation", + mathgroup="nary relation", mathname="gt", mirror=0x3C, textclass="close", @@ -711,7 +787,6 @@ characters.data={ direction="l", lccode=0x61, linebreak="al", - mathclass="variable", unicodeslot=0x41, }, { @@ -722,7 +797,6 @@ characters.data={ direction="l", lccode=0x62, linebreak="al", - mathclass="variable", unicodeslot=0x42, }, { @@ -733,7 +807,6 @@ characters.data={ direction="l", lccode=0x63, linebreak="al", - mathclass="variable", unicodeslot=0x43, }, { @@ -744,7 +817,6 @@ characters.data={ direction="l", lccode=0x64, linebreak="al", - mathclass="variable", unicodeslot=0x44, }, { @@ -755,7 +827,6 @@ characters.data={ direction="l", lccode=0x65, linebreak="al", - mathclass="variable", unicodeslot=0x45, }, { @@ -766,7 +837,6 @@ characters.data={ direction="l", lccode=0x66, linebreak="al", - mathclass="variable", unicodeslot=0x46, }, { @@ -777,7 +847,6 @@ characters.data={ direction="l", lccode=0x67, linebreak="al", - mathclass="variable", unicodeslot=0x47, }, { @@ -788,7 +857,6 @@ characters.data={ direction="l", lccode=0x68, linebreak="al", - mathclass="variable", unicodeslot=0x48, }, { @@ -800,7 +868,6 @@ characters.data={ direction="l", lccode=0x69, linebreak="al", - mathclass="variable", unicodeslot=0x49, }, { @@ -812,7 +879,6 @@ characters.data={ direction="l", lccode=0x6A, linebreak="al", - mathclass="variable", unicodeslot=0x4A, }, { @@ -823,7 +889,6 @@ characters.data={ direction="l", lccode=0x6B, linebreak="al", - mathclass="variable", unicodeslot=0x4B, }, { @@ -834,7 +899,6 @@ characters.data={ direction="l", lccode=0x6C, linebreak="al", - mathclass="variable", unicodeslot=0x4C, }, { @@ -845,7 +909,6 @@ characters.data={ direction="l", lccode=0x6D, linebreak="al", - mathclass="variable", unicodeslot=0x4D, }, { @@ -856,7 +919,6 @@ characters.data={ direction="l", lccode=0x6E, linebreak="al", - mathclass="variable", unicodeslot=0x4E, }, { @@ -867,7 +929,6 @@ characters.data={ direction="l", lccode=0x6F, linebreak="al", - mathclass="variable", unicodeslot=0x4F, }, { @@ -878,7 +939,6 @@ characters.data={ direction="l", lccode=0x70, linebreak="al", - mathclass="variable", unicodeslot=0x50, }, { @@ -889,7 +949,6 @@ characters.data={ direction="l", lccode=0x71, linebreak="al", - mathclass="variable", unicodeslot=0x51, }, { @@ -900,7 +959,6 @@ characters.data={ direction="l", lccode=0x72, linebreak="al", - mathclass="variable", unicodeslot=0x52, }, { @@ -911,7 +969,6 @@ characters.data={ direction="l", lccode=0x73, linebreak="al", - mathclass="variable", unicodeslot=0x53, }, { @@ -922,7 +979,6 @@ characters.data={ direction="l", lccode=0x74, linebreak="al", - mathclass="variable", unicodeslot=0x54, }, { @@ -933,7 +989,6 @@ characters.data={ direction="l", lccode=0x75, linebreak="al", - mathclass="variable", unicodeslot=0x55, }, { @@ -944,7 +999,6 @@ characters.data={ direction="l", lccode=0x76, linebreak="al", - mathclass="variable", unicodeslot=0x56, }, { @@ -955,7 +1009,6 @@ characters.data={ direction="l", lccode=0x77, linebreak="al", - mathclass="variable", unicodeslot=0x57, }, { @@ -966,7 +1019,6 @@ characters.data={ direction="l", lccode=0x78, linebreak="al", - mathclass="variable", unicodeslot=0x58, }, { @@ -977,7 +1029,6 @@ characters.data={ direction="l", lccode=0x79, linebreak="al", - mathclass="variable", unicodeslot=0x59, }, { @@ -988,7 +1039,6 @@ characters.data={ direction="l", lccode=0x7A, linebreak="al", - mathclass="variable", unicodeslot=0x5A, }, { @@ -1013,7 +1063,7 @@ characters.data={ description="REVERSE SOLIDUS", direction="on", linebreak="pr", - mathclass="nothing", + mathclass="division", mathname="backslash", synonyms={ "backslash" }, unicodeslot=0x5C, @@ -1036,12 +1086,13 @@ characters.data={ adobename="asciicircum", category="sk", cjkwd="na", + comment="the Hat looks rediculous in most fonts", contextname="textasciicircum", description="CIRCUMFLEX ACCENT", direction="on", linebreak="al", - mathclass="topaccent", - mathname="Hat", +--mathclass="topaccent", +--mathname="Hat", synonyms={ "spacing circumflex accent" }, unicodeslot=0x5E, }, @@ -1064,8 +1115,17 @@ characters.data={ description="GRAVE ACCENT", direction="on", linebreak="al", - mathclass="topaccent", - mathname="grave", + mathspec={ + { + class="topaccent", + name="grave", + }, + { + class="topaccent", + name="widegrave", + stretch="h", + }, + }, synonyms={ "spacing grave accent" }, unicodeslot=0x60, }, @@ -1076,7 +1136,6 @@ characters.data={ description="LATIN SMALL LETTER A", direction="l", linebreak="al", - mathclass="variable", uccode=0x41, unicodeslot=0x61, }, @@ -1087,7 +1146,6 @@ characters.data={ description="LATIN SMALL LETTER B", direction="l", linebreak="al", - mathclass="variable", uccode=0x42, unicodeslot=0x62, }, @@ -1098,7 +1156,6 @@ characters.data={ description="LATIN SMALL LETTER C", direction="l", linebreak="al", - mathclass="variable", uccode=0x43, unicodeslot=0x63, }, @@ -1109,7 +1166,6 @@ characters.data={ description="LATIN SMALL LETTER D", direction="l", linebreak="al", - mathclass="variable", uccode=0x44, unicodeslot=0x64, }, @@ -1120,7 +1176,6 @@ characters.data={ description="LATIN SMALL LETTER E", direction="l", linebreak="al", - mathclass="variable", uccode=0x45, unicodeslot=0x65, }, @@ -1131,7 +1186,6 @@ characters.data={ description="LATIN SMALL LETTER F", direction="l", linebreak="al", - mathclass="variable", uccode=0x46, unicodeslot=0x66, }, @@ -1142,7 +1196,6 @@ characters.data={ description="LATIN SMALL LETTER G", direction="l", linebreak="al", - mathclass="variable", uccode=0x47, unicodeslot=0x67, }, @@ -1153,7 +1206,6 @@ characters.data={ description="LATIN SMALL LETTER H", direction="l", linebreak="al", - mathclass="variable", uccode=0x48, unicodeslot=0x68, }, @@ -1165,7 +1217,6 @@ characters.data={ description="LATIN SMALL LETTER I", direction="l", linebreak="al", - mathclass="variable", uccode=0x49, unicodeslot=0x69, }, @@ -1176,7 +1227,6 @@ characters.data={ description="LATIN SMALL LETTER J", direction="l", linebreak="al", - mathclass="variable", uccode=0x4A, unicodeslot=0x6A, }, @@ -1187,7 +1237,6 @@ characters.data={ description="LATIN SMALL LETTER K", direction="l", linebreak="al", - mathclass="variable", uccode=0x4B, unicodeslot=0x6B, }, @@ -1198,7 +1247,6 @@ characters.data={ description="LATIN SMALL LETTER L", direction="l", linebreak="al", - mathclass="variable", uccode=0x4C, unicodeslot=0x6C, }, @@ -1209,7 +1257,6 @@ characters.data={ description="LATIN SMALL LETTER M", direction="l", linebreak="al", - mathclass="variable", uccode=0x4D, unicodeslot=0x6D, }, @@ -1220,7 +1267,6 @@ characters.data={ description="LATIN SMALL LETTER N", direction="l", linebreak="al", - mathclass="variable", uccode=0x4E, unicodeslot=0x6E, }, @@ -1231,7 +1277,6 @@ characters.data={ description="LATIN SMALL LETTER O", direction="l", linebreak="al", - mathclass="variable", uccode=0x4F, unicodeslot=0x6F, }, @@ -1242,7 +1287,6 @@ characters.data={ description="LATIN SMALL LETTER P", direction="l", linebreak="al", - mathclass="variable", uccode=0x50, unicodeslot=0x70, }, @@ -1253,7 +1297,6 @@ characters.data={ description="LATIN SMALL LETTER Q", direction="l", linebreak="al", - mathclass="variable", uccode=0x51, unicodeslot=0x71, }, @@ -1264,7 +1307,6 @@ characters.data={ description="LATIN SMALL LETTER R", direction="l", linebreak="al", - mathclass="variable", uccode=0x52, unicodeslot=0x72, }, @@ -1275,7 +1317,6 @@ characters.data={ description="LATIN SMALL LETTER S", direction="l", linebreak="al", - mathclass="variable", uccode=0x53, unicodeslot=0x73, }, @@ -1286,7 +1327,6 @@ characters.data={ description="LATIN SMALL LETTER T", direction="l", linebreak="al", - mathclass="variable", uccode=0x54, unicodeslot=0x74, }, @@ -1297,7 +1337,6 @@ characters.data={ description="LATIN SMALL LETTER U", direction="l", linebreak="al", - mathclass="variable", uccode=0x55, unicodeslot=0x75, }, @@ -1308,7 +1347,6 @@ characters.data={ description="LATIN SMALL LETTER V", direction="l", linebreak="al", - mathclass="variable", uccode=0x56, unicodeslot=0x76, }, @@ -1319,7 +1357,6 @@ characters.data={ description="LATIN SMALL LETTER W", direction="l", linebreak="al", - mathclass="variable", uccode=0x57, unicodeslot=0x77, }, @@ -1330,7 +1367,6 @@ characters.data={ description="LATIN SMALL LETTER X", direction="l", linebreak="al", - mathclass="variable", uccode=0x58, unicodeslot=0x78, }, @@ -1341,7 +1377,6 @@ characters.data={ description="LATIN SMALL LETTER Y", direction="l", linebreak="al", - mathclass="variable", uccode=0x59, unicodeslot=0x79, }, @@ -1352,7 +1387,6 @@ characters.data={ description="LATIN SMALL LETTER Z", direction="l", linebreak="al", - mathclass="variable", uccode=0x5A, unicodeslot=0x7A, }, @@ -1380,11 +1414,12 @@ characters.data={ description="VERTICAL LINE", direction="on", linebreak="ba", + mathclass="ordinary", mathspec={ - { - class="nothing", - name="arrowvert", - }, +-- { +-- class="ordinary", +-- name="arrowvert", +-- }, { class="delimiter", name="vert", @@ -1394,12 +1429,12 @@ characters.data={ name="lvert", }, { - class="close", - name="rvert", + class="middle", + name="mvert", }, { - class="relation", - name="mid", + class="close", + name="rvert", }, { class="delimiter", @@ -1432,6 +1467,7 @@ characters.data={ description="TILDE", direction="on", linebreak="al", + mathclass="relation", synonyms={ "spacing tilde" }, unicodeslot=0x7E, }, @@ -1729,7 +1765,7 @@ characters.data={ description="YEN SIGN", direction="et", linebreak="pr", - mathclass="nothing", + mathclass="ordinary", mathname="yen", synonyms={ "yuan sign" }, unicodeslot=0xA5, @@ -1753,7 +1789,7 @@ characters.data={ description="SECTION SIGN", direction="on", linebreak="ai", - mathclass="box", + mathclass="ordinary", mathname="S", synonyms={ "european paragraph sign" }, unicodeslot=0xA7, @@ -1766,8 +1802,17 @@ characters.data={ description="DIAERESIS", direction="on", linebreak="ai", - mathclass="topaccent", - mathname="ddot", + mathspec={ + { + class="topaccent", + name="ddot", + }, + { + class="topaccent", + name="wideddot", + stretch="h", + }, + }, specials={ "compat", 0x20, 0x308 }, synonyms={ "spacing diaeresis" }, unicodeslot=0xA8, @@ -1857,10 +1902,20 @@ characters.data={ description="MACRON", direction="on", linebreak="al", - mathclass="topaccent", - mathfiller="barfill", - mathmleq=0x203E, - mathname="bar", +--mathclass="topaccent", +--mathfiller="barfill", +--mathmleq=0x203E, + mathspec={ + { + class="topaccent", + name="bar", + }, + { + class="topaccent", + name="widebar", + stretch="h", + }, + }, specials={ "compat", 0x20, 0x304 }, synonyms={ "apl overbar", "overline", "spacing macron" }, unicodeslot=0xAF, @@ -1919,8 +1974,17 @@ characters.data={ description="ACUTE ACCENT", direction="on", linebreak="bb", - mathclass="topaccent", - mathname="acute", + mathspec={ + { + class="topaccent", + name="acute", + }, + { + class="topaccent", + name="wideacute", + stretch="h", + }, + }, specials={ "compat", 0x20, 0x301 }, synonyms={ "spacing acute accent" }, unicodeslot=0xB4, @@ -1933,7 +1997,7 @@ characters.data={ direction="l", linebreak="al", specials={ "compat", 0x3BC }, - uccode=0x39C, + uccode=0x3BC, unicodeslot=0xB5, }, { @@ -1944,7 +2008,7 @@ characters.data={ description="PILCROW SIGN", direction="on", linebreak="ai", - mathclass="box", + mathclass="ordinary", mathname="P", synonyms={ "european section sign", "paragraph sign" }, unicodeslot=0xB6, @@ -2337,6 +2401,7 @@ characters.data={ direction="on", linebreak="ai", mathclass="binary", + mathgroup="nary arithmetic", mathname="times", synonyms={ "cartesian product" }, unicodeslot=0xD7, @@ -2736,6 +2801,7 @@ characters.data={ direction="on", linebreak="ai", mathclass="binary", + mathgroup="binary arithmetic", mathname="div", synonyms={ "obelus" }, unicodeslot=0xF7, @@ -3738,6 +3804,7 @@ characters.data={ direction="l", linebreak="al", specials={ "compat", 0x2BC, 0x6E }, + uccode={ 0x2BC, 0x6E }, unicodeslot=0x149, }, { @@ -4387,7 +4454,7 @@ characters.data={ direction="l", linebreak="al", specials={ "compat", 0x73 }, - uccode=0x53, + uccode=0x73, unicodeslot=0x17F, }, { @@ -4683,7 +4750,6 @@ characters.data={ description="LATIN SMALL LETTER LAMBDA WITH STROKE", direction="l", linebreak="al", - mathclass="variable", mathname="lambdabar", synonyms={ "latin letter lambda bar" }, unicodeslot=0x19B, @@ -5638,6 +5704,7 @@ characters.data={ linebreak="al", shcode=0x6A, specials={ "char", 0x6A, 0x30C }, + uccode={ 0x6A, 0x30C }, unicodeslot=0x1F0, }, { @@ -7680,8 +7747,17 @@ characters.data={ description="MODIFIER LETTER CIRCUMFLEX ACCENT", direction="on", linebreak="al", - mathclass="topaccent", - mathname="hat", + mathspec={ + { + class="topaccent", + name="hat", + }, + { + class="topaccent", + name="widehat", + stretch="h", + }, + }, specials={ "compat", 0x20, 0x302 }, unicodeslot=0x2C6, }, @@ -7694,8 +7770,17 @@ characters.data={ description="CARON", direction="on", linebreak="ai", - mathclass="topaccent", - mathname="check", + mathspec={ + { + class="topaccent", + name="check", + }, + { + class="topaccent", + name="widecheck", + stretch="h", + }, + }, specials={ "compat", 0x20, 0x30C }, synonyms={ "mandarin chinese third tone", "modifier letter hacek" }, unicodeslot=0x2C7, @@ -7844,8 +7929,17 @@ characters.data={ description="BREVE", direction="on", linebreak="ai", - mathclass="topaccent", - mathname="breve", + mathspec={ + { + class="topaccent", + name="breve", + }, + { + class="topaccent", + name="widebreve", + stretch="h", + }, + }, specials={ "compat", 0x20, 0x306 }, unicodeslot=0x2D8, }, @@ -7857,8 +7951,17 @@ characters.data={ description="DOT ABOVE", direction="on", linebreak="ai", - mathclass="topaccent", - mathname="dot", + mathspec={ + { + class="topaccent", + name="dot", + }, + { + class="topaccent", + name="widedot", + stretch="h", + }, + }, specials={ "compat", 0x20, 0x307 }, synonyms={ "mandarin chinese fifth or neutral tone" }, unicodeslot=0x2D9, @@ -7871,8 +7974,17 @@ characters.data={ description="RING ABOVE", direction="on", linebreak="ai", - mathclass="topaccent", - mathname="ring", + mathspec={ + { + class="topaccent", + name="ring", + }, + { + class="topaccent", + name="widering", + stretch="h", + }, + }, specials={ "compat", 0x20, 0x30A }, unicodeslot=0x2DA, }, @@ -7894,8 +8006,17 @@ characters.data={ description="SMALL TILDE", direction="on", linebreak="al", - mathclass="topaccent", - mathname="tilde", + mathspec={ + { + class="topaccent", + name="tilde", + }, + { + class="topaccent", + name="widetilde", + stretch="h", + }, + }, specials={ "compat", 0x20, 0x303 }, unicodeslot=0x2DC, }, @@ -8194,9 +8315,6 @@ characters.data={ description="COMBINING CIRCUMFLEX ACCENT", direction="nsm", linebreak="cm", - mathclass="topaccent", - mathname="widehat", - mathstretch="h", unicodeslot=0x302, }, { @@ -8207,9 +8325,6 @@ characters.data={ description="COMBINING TILDE", direction="nsm", linebreak="cm", - mathclass="topaccent", - mathname="widetilde", - mathstretch="h", unicodeslot=0x303, }, { @@ -8691,6 +8806,7 @@ characters.data={ description="COMBINING LOW LINE", direction="nsm", linebreak="cm", + mathextensible="l", synonyms={ "underline", "underscore" }, unicodeslot=0x332, }, @@ -9281,6 +9397,7 @@ characters.data={ category="lu", description="GREEK CAPITAL LETTER HETA", direction="l", + lccode=0x371, linebreak="al", unicodeslot=0x370, }, @@ -9295,6 +9412,7 @@ characters.data={ category="lu", description="GREEK CAPITAL LETTER ARCHAIC SAMPI", direction="l", + lccode=0x373, linebreak="al", unicodeslot=0x372, }, @@ -9326,6 +9444,7 @@ characters.data={ category="lu", description="GREEK CAPITAL LETTER PAMPHYLIAN DIGAMMA", direction="l", + lccode=0x377, linebreak="al", unicodeslot=0x376, }, @@ -9382,6 +9501,7 @@ characters.data={ category="lu", description="GREEK CAPITAL LETTER YOT", direction="l", + lccode=0x3F3, linebreak="al", unicodeslot=0x37F, }, @@ -9507,6 +9627,7 @@ characters.data={ linebreak="al", shcode=0x3B9, specials={ "char", 0x3CA, 0x301 }, + uccode={ 0x3B9, 0x308, 0x301 }, unicodeslot=0x390, }, [0x391]={ @@ -9518,7 +9639,6 @@ characters.data={ direction="l", lccode=0x3B1, linebreak="al", - mathclass="variable", mathname="Alpha", unicodeslot=0x391, }, @@ -9531,7 +9651,6 @@ characters.data={ direction="l", lccode=0x3B2, linebreak="al", - mathclass="variable", mathname="Beta", unicodeslot=0x392, }, @@ -9544,7 +9663,6 @@ characters.data={ direction="l", lccode=0x3B3, linebreak="al", - mathclass="variable", mathname="Gamma", synonyms={ "gamma function" }, unicodeslot=0x393, @@ -9558,7 +9676,6 @@ characters.data={ direction="l", lccode=0x3B4, linebreak="al", - mathclass="variable", mathname="Delta", unicodeslot=0x394, }, @@ -9571,7 +9688,6 @@ characters.data={ direction="l", lccode=0x3B5, linebreak="al", - mathclass="variable", mathname="Epsilon", unicodeslot=0x395, }, @@ -9584,7 +9700,6 @@ characters.data={ direction="l", lccode=0x3B6, linebreak="al", - mathclass="variable", mathname="Zeta", unicodeslot=0x396, }, @@ -9597,7 +9712,6 @@ characters.data={ direction="l", lccode=0x3B7, linebreak="al", - mathclass="variable", mathname="Eta", unicodeslot=0x397, }, @@ -9610,7 +9724,6 @@ characters.data={ direction="l", lccode=0x3B8, linebreak="al", - mathclass="variable", mathname="Theta", unicodeslot=0x398, }, @@ -9623,7 +9736,6 @@ characters.data={ direction="l", lccode=0x3B9, linebreak="al", - mathclass="variable", mathname="Iota", unicodeslot=0x399, }, @@ -9636,7 +9748,6 @@ characters.data={ direction="l", lccode=0x3BA, linebreak="al", - mathclass="variable", mathname="Kappa", unicodeslot=0x39A, }, @@ -9649,7 +9760,6 @@ characters.data={ direction="l", lccode=0x3BB, linebreak="al", - mathclass="variable", mathname="Lambda", unicodeslot=0x39B, }, @@ -9662,7 +9772,6 @@ characters.data={ direction="l", lccode=0x3BC, linebreak="al", - mathclass="variable", mathname="Mu", unicodeslot=0x39C, }, @@ -9675,7 +9784,6 @@ characters.data={ direction="l", lccode=0x3BD, linebreak="al", - mathclass="variable", mathname="Nu", unicodeslot=0x39D, }, @@ -9688,7 +9796,6 @@ characters.data={ direction="l", lccode=0x3BE, linebreak="al", - mathclass="variable", mathname="Xi", unicodeslot=0x39E, }, @@ -9701,7 +9808,6 @@ characters.data={ direction="l", lccode=0x3BF, linebreak="al", - mathclass="variable", mathname="Omicron", unicodeslot=0x39F, }, @@ -9714,7 +9820,6 @@ characters.data={ direction="l", lccode=0x3C0, linebreak="al", - mathclass="variable", mathname="Pi", unicodeslot=0x3A0, }, @@ -9727,7 +9832,6 @@ characters.data={ direction="l", lccode=0x3C1, linebreak="al", - mathclass="variable", mathname="Rho", unicodeslot=0x3A1, }, @@ -9740,7 +9844,6 @@ characters.data={ direction="l", lccode=0x3C3, linebreak="al", - mathclass="variable", mathname="Sigma", unicodeslot=0x3A3, }, @@ -9753,7 +9856,6 @@ characters.data={ direction="l", lccode=0x3C4, linebreak="al", - mathclass="variable", mathname="Tau", unicodeslot=0x3A4, }, @@ -9766,7 +9868,6 @@ characters.data={ direction="l", lccode=0x3C5, linebreak="al", - mathclass="variable", mathname="Upsilon", unicodeslot=0x3A5, }, @@ -9779,7 +9880,6 @@ characters.data={ direction="l", lccode=0x3C6, linebreak="al", - mathclass="variable", mathname="Phi", unicodeslot=0x3A6, }, @@ -9792,7 +9892,6 @@ characters.data={ direction="l", lccode=0x3C7, linebreak="al", - mathclass="variable", mathname="Chi", unicodeslot=0x3A7, }, @@ -9805,7 +9904,6 @@ characters.data={ direction="l", lccode=0x3C8, linebreak="al", - mathclass="variable", mathname="Psi", unicodeslot=0x3A8, }, @@ -9818,7 +9916,6 @@ characters.data={ direction="l", lccode=0x3C9, linebreak="al", - mathclass="variable", mathname="Omega", unicodeslot=0x3A9, }, @@ -9903,6 +10000,7 @@ characters.data={ linebreak="al", shcode=0x3C5, specials={ "char", 0x3CB, 0x301 }, + uccode={ 0x3C5, 0x308, 0x301 }, unicodeslot=0x3B0, }, [0x3B1]={ @@ -9913,7 +10011,6 @@ characters.data={ description="GREEK SMALL LETTER ALPHA", direction="l", linebreak="al", - mathclass="variable", mathname="alpha", uccode=0x391, unicodeslot=0x3B1, @@ -9926,7 +10023,6 @@ characters.data={ description="GREEK SMALL LETTER BETA", direction="l", linebreak="al", - mathclass="variable", mathname="beta", uccode=0x392, unicodeslot=0x3B2, @@ -9939,7 +10035,6 @@ characters.data={ description="GREEK SMALL LETTER GAMMA", direction="l", linebreak="al", - mathclass="variable", mathname="gamma", uccode=0x393, unicodeslot=0x3B3, @@ -9952,7 +10047,6 @@ characters.data={ description="GREEK SMALL LETTER DELTA", direction="l", linebreak="al", - mathclass="variable", mathname="delta", uccode=0x394, unicodeslot=0x3B4, @@ -9965,7 +10059,6 @@ characters.data={ description="GREEK SMALL LETTER EPSILON", direction="l", linebreak="al", - mathclass="variable", mathname="varepsilon", uccode=0x395, unicodeslot=0x3B5, @@ -9978,7 +10071,6 @@ characters.data={ description="GREEK SMALL LETTER ZETA", direction="l", linebreak="al", - mathclass="variable", mathname="zeta", uccode=0x396, unicodeslot=0x3B6, @@ -9991,7 +10083,6 @@ characters.data={ description="GREEK SMALL LETTER ETA", direction="l", linebreak="al", - mathclass="variable", mathname="eta", uccode=0x397, unicodeslot=0x3B7, @@ -10004,7 +10095,6 @@ characters.data={ description="GREEK SMALL LETTER THETA", direction="l", linebreak="al", - mathclass="variable", mathname="theta", uccode=0x398, unicodeslot=0x3B8, @@ -10017,7 +10107,6 @@ characters.data={ description="GREEK SMALL LETTER IOTA", direction="l", linebreak="al", - mathclass="variable", mathname="iota", uccode=0x399, unicodeslot=0x3B9, @@ -10030,7 +10119,6 @@ characters.data={ description="GREEK SMALL LETTER KAPPA", direction="l", linebreak="al", - mathclass="variable", mathname="kappa", uccode=0x39A, unicodeslot=0x3BA, @@ -10043,7 +10131,6 @@ characters.data={ description="GREEK SMALL LETTER LAMDA", direction="l", linebreak="al", - mathclass="variable", mathname="lambda", uccode=0x39B, unicodeslot=0x3BB, @@ -10056,7 +10143,6 @@ characters.data={ description="GREEK SMALL LETTER MU", direction="l", linebreak="al", - mathclass="variable", mathname="mu", uccode=0x39C, unicodeslot=0x3BC, @@ -10069,7 +10155,6 @@ characters.data={ description="GREEK SMALL LETTER NU", direction="l", linebreak="al", - mathclass="variable", mathname="nu", uccode=0x39D, unicodeslot=0x3BD, @@ -10082,7 +10167,6 @@ characters.data={ description="GREEK SMALL LETTER XI", direction="l", linebreak="al", - mathclass="variable", mathname="xi", uccode=0x39E, unicodeslot=0x3BE, @@ -10095,7 +10179,6 @@ characters.data={ description="GREEK SMALL LETTER OMICRON", direction="l", linebreak="al", - mathclass="variable", mathname="omicron", uccode=0x39F, unicodeslot=0x3BF, @@ -10108,7 +10191,6 @@ characters.data={ description="GREEK SMALL LETTER PI", direction="l", linebreak="al", - mathclass="variable", mathname="pi", synonyms={ "mathematical constant 3.141592... pi", "mathematical constant pi" }, uccode=0x3A0, @@ -10122,7 +10204,6 @@ characters.data={ description="GREEK SMALL LETTER RHO", direction="l", linebreak="al", - mathclass="variable", mathname="rho", uccode=0x3A1, unicodeslot=0x3C1, @@ -10134,9 +10215,8 @@ characters.data={ description="GREEK SMALL LETTER FINAL SIGMA", direction="l", linebreak="al", - mathclass="variable", mathname="varsigma", - uccode=0x3A3, + uccode=0x3C3, unicodeslot=0x3C2, }, [0x3C3]={ @@ -10147,7 +10227,6 @@ characters.data={ description="GREEK SMALL LETTER SIGMA", direction="l", linebreak="al", - mathclass="variable", mathname="sigma", uccode=0x3A3, unicodeslot=0x3C3, @@ -10160,7 +10239,6 @@ characters.data={ description="GREEK SMALL LETTER TAU", direction="l", linebreak="al", - mathclass="variable", mathname="tau", uccode=0x3A4, unicodeslot=0x3C4, @@ -10173,7 +10251,6 @@ characters.data={ description="GREEK SMALL LETTER UPSILON", direction="l", linebreak="al", - mathclass="variable", mathname="upsilon", uccode=0x3A5, unicodeslot=0x3C5, @@ -10186,7 +10263,6 @@ characters.data={ description="GREEK SMALL LETTER PHI", direction="l", linebreak="al", - mathclass="variable", mathname="varphi", uccode=0x3A6, unicodeslot=0x3C6, @@ -10199,7 +10275,6 @@ characters.data={ description="GREEK SMALL LETTER CHI", direction="l", linebreak="al", - mathclass="variable", mathname="chi", uccode=0x3A7, unicodeslot=0x3C7, @@ -10212,7 +10287,6 @@ characters.data={ description="GREEK SMALL LETTER PSI", direction="l", linebreak="al", - mathclass="variable", mathname="psi", uccode=0x3A8, unicodeslot=0x3C8, @@ -10225,7 +10299,6 @@ characters.data={ description="GREEK SMALL LETTER OMEGA", direction="l", linebreak="al", - mathclass="variable", mathname="omega", uccode=0x3A9, unicodeslot=0x3C9, @@ -10294,6 +10367,7 @@ characters.data={ category="lu", description="GREEK CAPITAL KAI SYMBOL", direction="l", + lccode=0x3D7, linebreak="al", unicodeslot=0x3CF, }, @@ -10306,7 +10380,7 @@ characters.data={ linebreak="al", specials={ "compat", 0x3B2 }, synonyms={ "curled beta" }, - uccode=0x392, + uccode=0x3B2, unicodeslot=0x3D0, }, [0x3D1]={ @@ -10316,11 +10390,10 @@ characters.data={ description="GREEK THETA SYMBOL", direction="l", linebreak="al", - mathclass="variable", mathname="varTheta", specials={ "compat", 0x3B8 }, synonyms={ "script theta" }, - uccode=0x398, + uccode=0x3B8, unicodeslot=0x3D1, }, [0x3D2]={ @@ -10357,10 +10430,9 @@ characters.data={ description="GREEK PHI SYMBOL", direction="l", linebreak="al", - mathclass="variable", mathname="phi", specials={ "compat", 0x3C6 }, - uccode=0x3A6, + uccode=0x3C6, unicodeslot=0x3D5, }, [0x3D6]={ @@ -10370,11 +10442,10 @@ characters.data={ description="GREEK PI SYMBOL", direction="l", linebreak="al", - mathclass="variable", mathname="varpi", specials={ "compat", 0x3C0 }, synonyms={ "omega pi" }, - uccode=0x3A0, + uccode=0x3C0, unicodeslot=0x3D6, }, [0x3D7]={ @@ -10426,7 +10497,6 @@ characters.data={ direction="l", lccode=0x3DD, linebreak="al", - mathclass="variable", mathname="digamma", unicodeslot=0x3DC, }, @@ -10609,7 +10679,7 @@ characters.data={ linebreak="al", mathclass="ordinary", specials={ "compat", 0x3BA }, - uccode=0x39A, + uccode=0x3BA, unicodeslot=0x3F0, }, [0x3F1]={ @@ -10620,7 +10690,7 @@ characters.data={ direction="l", linebreak="al", specials={ "compat", 0x3C1 }, - uccode=0x3A1, + uccode=0x3C1, unicodeslot=0x3F1, }, [0x3F2]={ @@ -10658,11 +10728,10 @@ characters.data={ description="GREEK LUNATE EPSILON SYMBOL", direction="l", linebreak="al", - mathclass="variable", mathname="epsilon", specials={ "compat", 0x3B5 }, synonyms={ "straight epsilon" }, - uccode=0x395, + uccode=0x3B5, unicodeslot=0x3F5, }, [0x3F6]={ @@ -10670,7 +10739,6 @@ characters.data={ description="GREEK REVERSED LUNATE EPSILON SYMBOL", direction="on", linebreak="al", - mathclass="variable", mathname="backepsilon", synonyms={ "reversed straight epsilon" }, unicodeslot=0x3F6, @@ -13652,6 +13720,7 @@ characters.data={ category="lu", description="CYRILLIC CAPITAL LETTER LHA", direction="l", + lccode=0x515, linebreak="al", unicodeslot=0x514, }, @@ -13666,6 +13735,7 @@ characters.data={ category="lu", description="CYRILLIC CAPITAL LETTER RHA", direction="l", + lccode=0x517, linebreak="al", unicodeslot=0x516, }, @@ -13680,6 +13750,7 @@ characters.data={ category="lu", description="CYRILLIC CAPITAL LETTER YAE", direction="l", + lccode=0x519, linebreak="al", unicodeslot=0x518, }, @@ -13694,6 +13765,7 @@ characters.data={ category="lu", description="CYRILLIC CAPITAL LETTER QA", direction="l", + lccode=0x51B, linebreak="al", unicodeslot=0x51A, }, @@ -13708,6 +13780,7 @@ characters.data={ category="lu", description="CYRILLIC CAPITAL LETTER WE", direction="l", + lccode=0x51D, linebreak="al", unicodeslot=0x51C, }, @@ -13722,6 +13795,7 @@ characters.data={ category="lu", description="CYRILLIC CAPITAL LETTER ALEUT KA", direction="l", + lccode=0x51F, linebreak="al", unicodeslot=0x51E, }, @@ -13736,6 +13810,7 @@ characters.data={ category="lu", description="CYRILLIC CAPITAL LETTER EL WITH MIDDLE HOOK", direction="l", + lccode=0x521, linebreak="al", unicodeslot=0x520, }, @@ -13750,6 +13825,7 @@ characters.data={ category="lu", description="CYRILLIC CAPITAL LETTER EN WITH MIDDLE HOOK", direction="l", + lccode=0x523, linebreak="al", unicodeslot=0x522, }, @@ -13764,6 +13840,7 @@ characters.data={ category="lu", description="CYRILLIC CAPITAL LETTER PE WITH DESCENDER", direction="l", + lccode=0x525, linebreak="al", unicodeslot=0x524, }, @@ -13778,6 +13855,7 @@ characters.data={ category="lu", description="CYRILLIC CAPITAL LETTER SHHA WITH DESCENDER", direction="l", + lccode=0x527, linebreak="al", unicodeslot=0x526, }, @@ -13792,6 +13870,7 @@ characters.data={ category="lu", description="CYRILLIC CAPITAL LETTER EN WITH LEFT HOOK", direction="l", + lccode=0x529, linebreak="al", unicodeslot=0x528, }, @@ -13806,6 +13885,7 @@ characters.data={ category="lu", description="CYRILLIC CAPITAL LETTER DZZHE", direction="l", + lccode=0x52B, linebreak="al", unicodeslot=0x52A, }, @@ -13820,6 +13900,7 @@ characters.data={ category="lu", description="CYRILLIC CAPITAL LETTER DCHE", direction="l", + lccode=0x52D, linebreak="al", unicodeslot=0x52C, }, @@ -13834,6 +13915,7 @@ characters.data={ category="lu", description="CYRILLIC CAPITAL LETTER EL WITH DESCENDER", direction="l", + lccode=0x52F, linebreak="al", unicodeslot=0x52E, }, @@ -14604,6 +14686,7 @@ characters.data={ direction="l", linebreak="al", specials={ "compat", 0x565, 0x582 }, + uccode={ 0x565, 0x582 }, unicodeslot=0x587, }, [0x588]={ @@ -15681,6 +15764,13 @@ characters.data={ linebreak="cm", unicodeslot=0x61C, }, + [0x61D]={ + category="po", + description="ARABIC END OF TEXT MARK", + direction="al", + linebreak="ex", + unicodeslot=0x61D, + }, [0x61E]={ category="po", contextname="arabictripledot", @@ -20257,6 +20347,334 @@ characters.data={ linebreak="al", unicodeslot=0x86A, }, + [0x870]={ + arabic="r", + category="lo", + description="ARABIC LETTER ALEF WITH ATTACHED FATHA", + direction="al", + linebreak="al", + unicodeslot=0x870, + }, + [0x871]={ + arabic="r", + category="lo", + description="ARABIC LETTER ALEF WITH ATTACHED TOP RIGHT FATHA", + direction="al", + linebreak="al", + unicodeslot=0x871, + }, + [0x872]={ + arabic="r", + category="lo", + description="ARABIC LETTER ALEF WITH RIGHT MIDDLE STROKE", + direction="al", + linebreak="al", + unicodeslot=0x872, + }, + [0x873]={ + arabic="r", + category="lo", + description="ARABIC LETTER ALEF WITH LEFT MIDDLE STROKE", + direction="al", + linebreak="al", + unicodeslot=0x873, + }, + [0x874]={ + arabic="r", + category="lo", + description="ARABIC LETTER ALEF WITH ATTACHED KASRA", + direction="al", + linebreak="al", + unicodeslot=0x874, + }, + [0x875]={ + arabic="r", + category="lo", + description="ARABIC LETTER ALEF WITH ATTACHED BOTTOM RIGHT KASRA", + direction="al", + linebreak="al", + unicodeslot=0x875, + }, + [0x876]={ + arabic="r", + category="lo", + description="ARABIC LETTER ALEF WITH ATTACHED ROUND DOT ABOVE", + direction="al", + linebreak="al", + unicodeslot=0x876, + }, + [0x877]={ + arabic="r", + category="lo", + description="ARABIC LETTER ALEF WITH ATTACHED RIGHT ROUND DOT", + direction="al", + linebreak="al", + unicodeslot=0x877, + }, + [0x878]={ + arabic="r", + category="lo", + description="ARABIC LETTER ALEF WITH ATTACHED LEFT ROUND DOT", + direction="al", + linebreak="al", + unicodeslot=0x878, + }, + [0x879]={ + arabic="r", + category="lo", + description="ARABIC LETTER ALEF WITH ATTACHED ROUND DOT BELOW", + direction="al", + linebreak="al", + unicodeslot=0x879, + }, + [0x87A]={ + arabic="r", + category="lo", + description="ARABIC LETTER ALEF WITH DOT ABOVE", + direction="al", + linebreak="al", + unicodeslot=0x87A, + }, + [0x87B]={ + arabic="r", + category="lo", + description="ARABIC LETTER ALEF WITH ATTACHED TOP RIGHT FATHA AND DOT ABOVE", + direction="al", + linebreak="al", + unicodeslot=0x87B, + }, + [0x87C]={ + arabic="r", + category="lo", + description="ARABIC LETTER ALEF WITH RIGHT MIDDLE STROKE AND DOT ABOVE", + direction="al", + linebreak="al", + unicodeslot=0x87C, + }, + [0x87D]={ + arabic="r", + category="lo", + description="ARABIC LETTER ALEF WITH ATTACHED BOTTOM RIGHT KASRA AND DOT ABOVE", + direction="al", + linebreak="al", + unicodeslot=0x87D, + }, + [0x87E]={ + arabic="r", + category="lo", + description="ARABIC LETTER ALEF WITH ATTACHED TOP RIGHT FATHA AND LEFT RING", + direction="al", + linebreak="al", + unicodeslot=0x87E, + }, + [0x87F]={ + arabic="r", + category="lo", + description="ARABIC LETTER ALEF WITH RIGHT MIDDLE STROKE AND LEFT RING", + direction="al", + linebreak="al", + unicodeslot=0x87F, + }, + [0x880]={ + arabic="r", + category="lo", + description="ARABIC LETTER ALEF WITH ATTACHED BOTTOM RIGHT KASRA AND LEFT RING", + direction="al", + linebreak="al", + unicodeslot=0x880, + }, + [0x881]={ + arabic="r", + category="lo", + description="ARABIC LETTER ALEF WITH ATTACHED RIGHT HAMZA", + direction="al", + linebreak="al", + unicodeslot=0x881, + }, + [0x882]={ + arabic="r", + category="lo", + description="ARABIC LETTER ALEF WITH ATTACHED LEFT HAMZA", + direction="al", + linebreak="al", + unicodeslot=0x882, + }, + [0x883]={ + arabic="c", + category="lo", + description="ARABIC TATWEEL WITH OVERSTRUCK HAMZA", + direction="al", + linebreak="al", + unicodeslot=0x883, + }, + [0x884]={ + arabic="c", + category="lo", + description="ARABIC TATWEEL WITH OVERSTRUCK WAW", + direction="al", + linebreak="al", + unicodeslot=0x884, + }, + [0x885]={ + arabic="c", + category="lo", + description="ARABIC TATWEEL WITH TWO DOTS BELOW", + direction="al", + linebreak="al", + unicodeslot=0x885, + }, + [0x886]={ + arabic="d", + category="lo", + description="ARABIC LETTER THIN YEH", + direction="al", + linebreak="al", + unicodeslot=0x886, + }, + [0x887]={ + arabic="u", + category="lo", + description="ARABIC BASELINE ROUND DOT", + direction="al", + linebreak="al", + unicodeslot=0x887, + }, + [0x888]={ + arabic="u", + category="sk", + description="ARABIC RAISED ROUND DOT", + direction="al", + linebreak="al", + unicodeslot=0x888, + }, + [0x889]={ + arabic="d", + category="lo", + description="ARABIC LETTER NOON WITH INVERTED SMALL V", + direction="al", + linebreak="al", + unicodeslot=0x889, + }, + [0x88A]={ + arabic="d", + category="lo", + description="ARABIC LETTER HAH WITH INVERTED SMALL V BELOW", + direction="al", + linebreak="al", + unicodeslot=0x88A, + }, + [0x88B]={ + arabic="d", + category="lo", + description="ARABIC LETTER TAH WITH DOT BELOW", + direction="al", + linebreak="al", + unicodeslot=0x88B, + }, + [0x88C]={ + arabic="d", + category="lo", + description="ARABIC LETTER TAH WITH THREE DOTS BELOW", + direction="al", + linebreak="al", + unicodeslot=0x88C, + }, + [0x88D]={ + arabic="d", + category="lo", + description="ARABIC LETTER KEHEH WITH TWO DOTS VERTICALLY BELOW", + direction="al", + linebreak="al", + unicodeslot=0x88D, + }, + [0x88E]={ + arabic="r", + category="lo", + description="ARABIC VERTICAL TAIL", + direction="al", + linebreak="al", + unicodeslot=0x88E, + }, + [0x890]={ + arabic="u", + category="cf", + description="ARABIC POUND MARK ABOVE", + direction="an", + linebreak="al", + unicodeslot=0x890, + }, + [0x891]={ + arabic="u", + category="cf", + description="ARABIC PIASTRE MARK ABOVE", + direction="an", + linebreak="al", + unicodeslot=0x891, + }, + [0x898]={ + category="mn", + combining=0xE6, + description="ARABIC SMALL HIGH WORD AL-JUZ", + direction="nsm", + linebreak="cm", + unicodeslot=0x898, + }, + [0x899]={ + category="mn", + combining=0xDC, + description="ARABIC SMALL LOW WORD ISHMAAM", + direction="nsm", + linebreak="cm", + unicodeslot=0x899, + }, + [0x89A]={ + category="mn", + combining=0xDC, + description="ARABIC SMALL LOW WORD IMAALA", + direction="nsm", + linebreak="cm", + unicodeslot=0x89A, + }, + [0x89B]={ + category="mn", + combining=0xDC, + description="ARABIC SMALL LOW WORD TASHEEL", + direction="nsm", + linebreak="cm", + unicodeslot=0x89B, + }, + [0x89C]={ + category="mn", + combining=0xE6, + description="ARABIC MADDA WAAJIB", + direction="nsm", + linebreak="cm", + unicodeslot=0x89C, + }, + [0x89D]={ + category="mn", + combining=0xE6, + description="ARABIC SUPERSCRIPT ALEF MOKHASSAS", + direction="nsm", + linebreak="cm", + unicodeslot=0x89D, + }, + [0x89E]={ + category="mn", + combining=0xE6, + description="ARABIC DOUBLED MADDA", + direction="nsm", + linebreak="cm", + unicodeslot=0x89E, + }, + [0x89F]={ + category="mn", + combining=0xE6, + description="ARABIC HALF MADDA OVER MADDA", + direction="nsm", + linebreak="cm", + unicodeslot=0x89F, + }, [0x8A0]={ arabic="d", category="lo", @@ -20425,6 +20843,14 @@ characters.data={ linebreak="al", unicodeslot=0x8B4, }, + [0x8B5]={ + arabic="d", + category="lo", + description="ARABIC LETTER QAF WITH DOT BELOW AND NO DOTS ABOVE", + direction="al", + linebreak="al", + unicodeslot=0x8B5, + }, [0x8B6]={ arabic="d", category="lo", @@ -20569,6 +20995,93 @@ characters.data={ linebreak="al", unicodeslot=0x8C7, }, + [0x8C8]={ + arabic="d", + category="lo", + description="ARABIC LETTER GRAF", + direction="al", + linebreak="al", + unicodeslot=0x8C8, + }, + [0x8C9]={ + category="lm", + description="ARABIC SMALL FARSI YEH", + direction="al", + linebreak="al", + unicodeslot=0x8C9, + }, + [0x8CA]={ + category="mn", + combining=0xE6, + description="ARABIC SMALL HIGH FARSI YEH", + direction="nsm", + linebreak="cm", + unicodeslot=0x8CA, + }, + [0x8CB]={ + category="mn", + combining=0xE6, + description="ARABIC SMALL HIGH YEH BARREE WITH TWO DOTS BELOW", + direction="nsm", + linebreak="cm", + unicodeslot=0x8CB, + }, + [0x8CC]={ + category="mn", + combining=0xE6, + description="ARABIC SMALL HIGH WORD SAH", + direction="nsm", + linebreak="cm", + unicodeslot=0x8CC, + }, + [0x8CD]={ + category="mn", + combining=0xE6, + description="ARABIC SMALL HIGH ZAH", + direction="nsm", + linebreak="cm", + unicodeslot=0x8CD, + }, + [0x8CE]={ + category="mn", + combining=0xE6, + description="ARABIC LARGE ROUND DOT ABOVE", + direction="nsm", + linebreak="cm", + unicodeslot=0x8CE, + }, + [0x8CF]={ + category="mn", + combining=0xDC, + description="ARABIC LARGE ROUND DOT BELOW", + direction="nsm", + linebreak="cm", + unicodeslot=0x8CF, + }, + [0x8D0]={ + category="mn", + combining=0xDC, + description="ARABIC SUKUN BELOW", + direction="nsm", + linebreak="cm", + unicodeslot=0x8D0, + }, + [0x8D1]={ + category="mn", + combining=0xDC, + description="ARABIC LARGE CIRCLE BELOW", + direction="nsm", + linebreak="cm", + unicodeslot=0x8D1, + }, + [0x8D2]={ + category="mn", + combining=0xDC, + description="ARABIC LARGE ROUND DOT INSIDE CIRCLE BELOW", + direction="nsm", + linebreak="cm", + unicodeslot=0x8D2, + }, [0x8D3]={ category="mn", combining=0xDC, @@ -22700,7 +23213,6 @@ characters.data={ direction="l", indic="d", indicmark="l", - indicorder="bh", linebreak="cm", unicodeslot=0x9C8, }, @@ -22745,6 +23257,7 @@ characters.data={ direction="l", indic="c", linebreak="al", + synonyms={ "bangla khanda ta" }, unicodeslot=0x9CE, }, [0x9D7]={ @@ -22752,7 +23265,8 @@ characters.data={ category="mc", description="BENGALI AU LENGTH MARK", direction="l", - indic="o", + indic="d", + indicmark="r", indicorder="ap", linebreak="cm", unicodeslot=0x9D7, @@ -26462,6 +26976,17 @@ characters.data={ linebreak="al", unicodeslot=0xC39, }, + [0xC3C]={ + category="mn", + combining=0x7, + description="TELUGU SIGN NUKTA", + direction="nsm", + indic="o", + indicclass="nukta", + indicmark="b", + linebreak="cm", + unicodeslot=0xC3C, + }, [0xC3D]={ category="lo", description="TELUGU SIGN AVAGRAHA", @@ -26655,6 +27180,15 @@ characters.data={ linebreak="al", unicodeslot=0xC5A, }, + [0xC5D]={ + category="lo", + comment="check indic", + description="TELUGU LETTER NAKAARA POLLU", + direction="l", + indic="i", + linebreak="al", + unicodeslot=0xC5D, + }, [0xC60]={ category="lo", description="TELUGU LETTER VOCALIC RR", @@ -27452,6 +27986,15 @@ characters.data={ linebreak="cm", unicodeslot=0xCD6, }, + [0xCDD]={ + category="lo", + comment="check indic", + description="KANNADA LETTER NAKAARA POLLU", + direction="l", + indic="i", + linebreak="al", + unicodeslot=0xCDD, + }, [0xCDE]={ category="lo", description="KANNADA LETTER FA", @@ -27592,6 +28135,13 @@ characters.data={ linebreak="al", unicodeslot=0xCF2, }, + [0xCF3]={ + category="mc", + description="KANNADA SIGN COMBINING ANUSVARA ABOVE RIGHT", + direction="l", + linebreak="cm", + unicodeslot=0xCF3, + }, [0xD00]={ category="mn", description="MALAYALAM SIGN COMBINING ANUSVARA ABOVE", @@ -28212,6 +28762,7 @@ characters.data={ direction="nsm", indic="o", indicclass="halant", + indicmark="r", linebreak="cm", synonyms={ "malayalam chandrakkala", "malayalam vowel half-u" }, unicodeslot=0xD4D, @@ -30404,6 +30955,13 @@ characters.data={ linebreak="sa", unicodeslot=0xECD, }, + [0xECE]={ + category="mn", + description="LAO YAMAKKAN", + direction="nsm", + linebreak="sa", + unicodeslot=0xECE, + }, [0xED0]={ category="nd", description="LAO DIGIT ZERO", @@ -32034,9 +32592,7 @@ characters.data={ indic="c", linebreak="sa", unicodeslot=0x1000, - variants={ - [0xFE00]="dotted form", - }, + variants=variants_dotted, }, [0x1001]={ category="lo", @@ -32053,9 +32609,7 @@ characters.data={ indic="c", linebreak="sa", unicodeslot=0x1002, - variants={ - [0xFE00]="dotted form", - }, + variants=variants_dotted, }, [0x1003]={ category="lo", @@ -32072,9 +32626,7 @@ characters.data={ indic="c", linebreak="sa", unicodeslot=0x1004, - variants={ - [0xFE00]="dotted form", - }, + variants=variants_dotted, }, [0x1005]={ category="lo", @@ -32171,9 +32723,7 @@ characters.data={ indic="c", linebreak="sa", unicodeslot=0x1010, - variants={ - [0xFE00]="dotted form", - }, + variants=variants_dotted, }, [0x1011]={ category="lo", @@ -32182,9 +32732,7 @@ characters.data={ indic="c", linebreak="sa", unicodeslot=0x1011, - variants={ - [0xFE00]="dotted form", - }, + variants=variants_dotted, }, [0x1012]={ category="lo", @@ -32217,9 +32765,7 @@ characters.data={ indic="c", linebreak="sa", unicodeslot=0x1015, - variants={ - [0xFE00]="dotted form", - }, + variants=variants_dotted, }, [0x1016]={ category="lo", @@ -32252,9 +32798,7 @@ characters.data={ indic="c", linebreak="sa", unicodeslot=0x1019, - variants={ - [0xFE00]="dotted form", - }, + variants=variants_dotted, }, [0x101A]={ category="lo", @@ -32263,9 +32807,7 @@ characters.data={ indic="c", linebreak="sa", unicodeslot=0x101A, - variants={ - [0xFE00]="dotted form", - }, + variants=variants_dotted, }, [0x101B]={ category="lo", @@ -32282,9 +32824,7 @@ characters.data={ indic="c", linebreak="sa", unicodeslot=0x101C, - variants={ - [0xFE00]="dotted form", - }, + variants=variants_dotted, }, [0x101D]={ category="lo", @@ -32293,9 +32833,7 @@ characters.data={ indic="c", linebreak="sa", unicodeslot=0x101D, - variants={ - [0xFE00]="dotted form", - }, + variants=variants_dotted, }, [0x101E]={ category="lo", @@ -32336,9 +32874,7 @@ characters.data={ indic="i", linebreak="sa", unicodeslot=0x1022, - variants={ - [0xFE00]="dotted form", - }, + variants=variants_dotted, }, [0x1023]={ category="lo", @@ -32467,9 +33003,7 @@ characters.data={ indicmark="l", linebreak="sa", unicodeslot=0x1031, - variants={ - [0xFE00]="dotted form", - }, + variants=variants_dotted, }, [0x1032]={ category="mn", @@ -33051,9 +33585,7 @@ characters.data={ indic="c", linebreak="sa", unicodeslot=0x1075, - variants={ - [0xFE00]="dotted form", - }, + variants=variants_dotted, }, [0x1076]={ category="lo", @@ -33078,9 +33610,7 @@ characters.data={ indic="c", linebreak="sa", unicodeslot=0x1078, - variants={ - [0xFE00]="dotted form", - }, + variants=variants_dotted, }, [0x1079]={ category="lo", @@ -33097,9 +33627,7 @@ characters.data={ indic="c", linebreak="sa", unicodeslot=0x107A, - variants={ - [0xFE00]="dotted form", - }, + variants=variants_dotted, }, [0x107B]={ category="lo", @@ -33148,9 +33676,7 @@ characters.data={ indic="c", linebreak="sa", unicodeslot=0x1080, - variants={ - [0xFE00]="dotted form", - }, + variants=variants_dotted, }, [0x1081]={ category="lo", @@ -33726,6 +34252,7 @@ characters.data={ category="lu", description="GEORGIAN CAPITAL LETTER YN", direction="l", + lccode=0x2D27, linebreak="al", unicodeslot=0x10C7, }, @@ -33733,6 +34260,7 @@ characters.data={ category="lu", description="GEORGIAN CAPITAL LETTER AEN", direction="l", + lccode=0x2D2D, linebreak="al", unicodeslot=0x10CD, }, @@ -39259,6 +39787,7 @@ characters.data={ description="CHEROKEE SMALL LETTER YE", direction="l", linebreak="al", + uccode=0x13F0, unicodeslot=0x13F8, }, [0x13F9]={ @@ -39266,6 +39795,7 @@ characters.data={ description="CHEROKEE SMALL LETTER YI", direction="l", linebreak="al", + uccode=0x13F1, unicodeslot=0x13F9, }, [0x13FA]={ @@ -39273,6 +39803,7 @@ characters.data={ description="CHEROKEE SMALL LETTER YO", direction="l", linebreak="al", + uccode=0x13F2, unicodeslot=0x13FA, }, [0x13FB]={ @@ -39280,6 +39811,7 @@ characters.data={ description="CHEROKEE SMALL LETTER YU", direction="l", linebreak="al", + uccode=0x13F3, unicodeslot=0x13FB, }, [0x13FC]={ @@ -39287,6 +39819,7 @@ characters.data={ description="CHEROKEE SMALL LETTER YV", direction="l", linebreak="al", + uccode=0x13F4, unicodeslot=0x13FC, }, [0x13FD]={ @@ -39294,6 +39827,7 @@ characters.data={ description="CHEROKEE SMALL LETTER MV", direction="l", linebreak="al", + uccode=0x13F5, unicodeslot=0x13FD, }, [0x1400]={ @@ -44695,6 +45229,17 @@ characters.data={ linebreak="al", unicodeslot=0x170C, }, + [0x170D]={ + category="lo", + comment="check indic", + description="TAGALOG LETTER RA", + direction="l", + indic="c", + indicclass="ra", + indicorder="am", + linebreak="al", + unicodeslot=0x170D, + }, [0x170E]={ category="lo", description="TAGALOG LETTER LA", @@ -44745,6 +45290,21 @@ characters.data={ linebreak="cm", unicodeslot=0x1714, }, + [0x1715]={ + category="mc", + combining=0x9, + description="TAGALOG SIGN PAMUDPOD", + direction="l", + linebreak="cm", + unicodeslot=0x1715, + }, + [0x171F]={ + category="lo", + description="TAGALOG LETTER ARCHAIC RA", + direction="l", + linebreak="al", + unicodeslot=0x171F, + }, [0x1720]={ category="lo", description="HANUNOO LETTER A", @@ -44889,7 +45449,7 @@ characters.data={ category="mn", combining=0x9, description="HANUNOO SIGN PAMUDPOD", - direction="nsm", + direction="l", linebreak="cm", unicodeslot=0x1734, }, @@ -46100,6 +46660,13 @@ characters.data={ mongolian="nj", unicodeslot=0x180E, }, + [0x180F]={ + category="mn", + description="MONGOLIAN FREE VARIATION SELECTOR FOUR", + direction="nsm", + linebreak="cm", + unicodeslot=0x180F, + }, [0x1810]={ category="nd", description="MONGOLIAN DIGIT ZERO", @@ -50773,6 +51340,118 @@ characters.data={ linebreak="cm", unicodeslot=0x1AC0, }, + [0x1AC1]={ + category="mn", + combining=0xE6, + description="COMBINING LEFT PARENTHESIS ABOVE LEFT", + direction="nsm", + linebreak="cm", + unicodeslot=0x1AC1, + }, + [0x1AC2]={ + category="mn", + combining=0xE6, + description="COMBINING RIGHT PARENTHESIS ABOVE RIGHT", + direction="nsm", + linebreak="cm", + unicodeslot=0x1AC2, + }, + [0x1AC3]={ + category="mn", + combining=0xDC, + description="COMBINING LEFT PARENTHESIS BELOW LEFT", + direction="nsm", + linebreak="cm", + unicodeslot=0x1AC3, + }, + [0x1AC4]={ + category="mn", + combining=0xDC, + description="COMBINING RIGHT PARENTHESIS BELOW RIGHT", + direction="nsm", + linebreak="cm", + unicodeslot=0x1AC4, + }, + [0x1AC5]={ + category="mn", + combining=0xE6, + description="COMBINING SQUARE BRACKETS ABOVE", + direction="nsm", + linebreak="cm", + unicodeslot=0x1AC5, + }, + [0x1AC6]={ + category="mn", + combining=0xE6, + description="COMBINING NUMBER SIGN ABOVE", + direction="nsm", + linebreak="cm", + unicodeslot=0x1AC6, + }, + [0x1AC7]={ + category="mn", + combining=0xE6, + description="COMBINING INVERTED DOUBLE ARCH ABOVE", + direction="nsm", + linebreak="cm", + unicodeslot=0x1AC7, + }, + [0x1AC8]={ + category="mn", + combining=0xE6, + description="COMBINING PLUS SIGN ABOVE", + direction="nsm", + linebreak="cm", + unicodeslot=0x1AC8, + }, + [0x1AC9]={ + category="mn", + combining=0xE6, + description="COMBINING DOUBLE PLUS SIGN ABOVE", + direction="nsm", + linebreak="cm", + unicodeslot=0x1AC9, + }, + [0x1ACA]={ + category="mn", + combining=0xDC, + description="COMBINING DOUBLE PLUS SIGN BELOW", + direction="nsm", + linebreak="cm", + unicodeslot=0x1ACA, + }, + [0x1ACB]={ + category="mn", + combining=0xE6, + description="COMBINING TRIPLE ACUTE ACCENT", + direction="nsm", + linebreak="cm", + unicodeslot=0x1ACB, + }, + [0x1ACC]={ + category="mn", + combining=0xE6, + description="COMBINING LATIN SMALL LETTER INSULAR G", + direction="nsm", + linebreak="cm", + unicodeslot=0x1ACC, + }, + [0x1ACD]={ + category="mn", + combining=0xE6, + description="COMBINING LATIN SMALL LETTER INSULAR R", + direction="nsm", + linebreak="cm", + unicodeslot=0x1ACD, + }, + [0x1ACE]={ + category="mn", + combining=0xE6, + description="COMBINING LATIN SMALL LETTER INSULAR T", + direction="nsm", + linebreak="cm", + unicodeslot=0x1ACE, + }, [0x1B00]={ category="mn", description="BALINESE SIGN ULU RICEM", @@ -51318,6 +51997,13 @@ characters.data={ linebreak="al", unicodeslot=0x1B4B, }, + [0x1B4C]={ + category="lo", + description="BALINESE LETTER ARCHAIC JNYA", + direction="l", + linebreak="al", + unicodeslot=0x1B4C, + }, [0x1B50]={ category="nd", description="BALINESE DIGIT ZERO", @@ -51642,6 +52328,20 @@ characters.data={ linebreak="al", unicodeslot=0x1B7C, }, + [0x1B7D]={ + category="po", + description="BALINESE PANTI LANTANG", + direction="l", + linebreak="ba", + unicodeslot=0x1B7D, + }, + [0x1B7E]={ + category="po", + description="BALINESE PAMADA LANTANG", + direction="l", + linebreak="ba", + unicodeslot=0x1B7E, + }, [0x1B80]={ category="mn", description="SUNDANESE SIGN PANYECEK", @@ -53347,6 +54047,7 @@ characters.data={ description="CYRILLIC SMALL LETTER ROUNDED VE", direction="l", linebreak="al", + uccode=0x432, unicodeslot=0x1C80, }, [0x1C81]={ @@ -53354,6 +54055,7 @@ characters.data={ description="CYRILLIC SMALL LETTER LONG-LEGGED DE", direction="l", linebreak="al", + uccode=0x434, unicodeslot=0x1C81, }, [0x1C82]={ @@ -53361,6 +54063,7 @@ characters.data={ description="CYRILLIC SMALL LETTER NARROW O", direction="l", linebreak="al", + uccode=0x43E, unicodeslot=0x1C82, }, [0x1C83]={ @@ -53368,6 +54071,7 @@ characters.data={ description="CYRILLIC SMALL LETTER WIDE ES", direction="l", linebreak="al", + uccode=0x441, unicodeslot=0x1C83, }, [0x1C84]={ @@ -53375,6 +54079,7 @@ characters.data={ description="CYRILLIC SMALL LETTER TALL TE", direction="l", linebreak="al", + uccode=0x442, unicodeslot=0x1C84, }, [0x1C85]={ @@ -53382,6 +54087,7 @@ characters.data={ description="CYRILLIC SMALL LETTER THREE-LEGGED TE", direction="l", linebreak="al", + uccode=0x442, unicodeslot=0x1C85, }, [0x1C86]={ @@ -53389,6 +54095,7 @@ characters.data={ description="CYRILLIC SMALL LETTER TALL HARD SIGN", direction="l", linebreak="al", + uccode=0x44A, unicodeslot=0x1C86, }, [0x1C87]={ @@ -53396,6 +54103,7 @@ characters.data={ description="CYRILLIC SMALL LETTER TALL YAT", direction="l", linebreak="al", + uccode=0x463, unicodeslot=0x1C87, }, [0x1C88]={ @@ -53403,12 +54111,14 @@ characters.data={ description="CYRILLIC SMALL LETTER UNBLENDED UK", direction="l", linebreak="al", + uccode=0xA64B, unicodeslot=0x1C88, }, [0x1C90]={ category="lu", description="GEORGIAN MTAVRULI CAPITAL LETTER AN", direction="l", + lccode=0x10D0, linebreak="al", unicodeslot=0x1C90, }, @@ -53416,6 +54126,7 @@ characters.data={ category="lu", description="GEORGIAN MTAVRULI CAPITAL LETTER BAN", direction="l", + lccode=0x10D1, linebreak="al", unicodeslot=0x1C91, }, @@ -53423,6 +54134,7 @@ characters.data={ category="lu", description="GEORGIAN MTAVRULI CAPITAL LETTER GAN", direction="l", + lccode=0x10D2, linebreak="al", unicodeslot=0x1C92, }, @@ -53430,6 +54142,7 @@ characters.data={ category="lu", description="GEORGIAN MTAVRULI CAPITAL LETTER DON", direction="l", + lccode=0x10D3, linebreak="al", unicodeslot=0x1C93, }, @@ -53437,6 +54150,7 @@ characters.data={ category="lu", description="GEORGIAN MTAVRULI CAPITAL LETTER EN", direction="l", + lccode=0x10D4, linebreak="al", unicodeslot=0x1C94, }, @@ -53444,6 +54158,7 @@ characters.data={ category="lu", description="GEORGIAN MTAVRULI CAPITAL LETTER VIN", direction="l", + lccode=0x10D5, linebreak="al", unicodeslot=0x1C95, }, @@ -53451,6 +54166,7 @@ characters.data={ category="lu", description="GEORGIAN MTAVRULI CAPITAL LETTER ZEN", direction="l", + lccode=0x10D6, linebreak="al", unicodeslot=0x1C96, }, @@ -53458,6 +54174,7 @@ characters.data={ category="lu", description="GEORGIAN MTAVRULI CAPITAL LETTER TAN", direction="l", + lccode=0x10D7, linebreak="al", unicodeslot=0x1C97, }, @@ -53465,6 +54182,7 @@ characters.data={ category="lu", description="GEORGIAN MTAVRULI CAPITAL LETTER IN", direction="l", + lccode=0x10D8, linebreak="al", unicodeslot=0x1C98, }, @@ -53472,6 +54190,7 @@ characters.data={ category="lu", description="GEORGIAN MTAVRULI CAPITAL LETTER KAN", direction="l", + lccode=0x10D9, linebreak="al", unicodeslot=0x1C99, }, @@ -53479,6 +54198,7 @@ characters.data={ category="lu", description="GEORGIAN MTAVRULI CAPITAL LETTER LAS", direction="l", + lccode=0x10DA, linebreak="al", unicodeslot=0x1C9A, }, @@ -53486,6 +54206,7 @@ characters.data={ category="lu", description="GEORGIAN MTAVRULI CAPITAL LETTER MAN", direction="l", + lccode=0x10DB, linebreak="al", unicodeslot=0x1C9B, }, @@ -53493,6 +54214,7 @@ characters.data={ category="lu", description="GEORGIAN MTAVRULI CAPITAL LETTER NAR", direction="l", + lccode=0x10DC, linebreak="al", unicodeslot=0x1C9C, }, @@ -53500,6 +54222,7 @@ characters.data={ category="lu", description="GEORGIAN MTAVRULI CAPITAL LETTER ON", direction="l", + lccode=0x10DD, linebreak="al", unicodeslot=0x1C9D, }, @@ -53507,6 +54230,7 @@ characters.data={ category="lu", description="GEORGIAN MTAVRULI CAPITAL LETTER PAR", direction="l", + lccode=0x10DE, linebreak="al", unicodeslot=0x1C9E, }, @@ -53514,6 +54238,7 @@ characters.data={ category="lu", description="GEORGIAN MTAVRULI CAPITAL LETTER ZHAR", direction="l", + lccode=0x10DF, linebreak="al", unicodeslot=0x1C9F, }, @@ -53521,6 +54246,7 @@ characters.data={ category="lu", description="GEORGIAN MTAVRULI CAPITAL LETTER RAE", direction="l", + lccode=0x10E0, linebreak="al", unicodeslot=0x1CA0, }, @@ -53528,6 +54254,7 @@ characters.data={ category="lu", description="GEORGIAN MTAVRULI CAPITAL LETTER SAN", direction="l", + lccode=0x10E1, linebreak="al", unicodeslot=0x1CA1, }, @@ -53535,6 +54262,7 @@ characters.data={ category="lu", description="GEORGIAN MTAVRULI CAPITAL LETTER TAR", direction="l", + lccode=0x10E2, linebreak="al", unicodeslot=0x1CA2, }, @@ -53542,6 +54270,7 @@ characters.data={ category="lu", description="GEORGIAN MTAVRULI CAPITAL LETTER UN", direction="l", + lccode=0x10E3, linebreak="al", unicodeslot=0x1CA3, }, @@ -53549,6 +54278,7 @@ characters.data={ category="lu", description="GEORGIAN MTAVRULI CAPITAL LETTER PHAR", direction="l", + lccode=0x10E4, linebreak="al", unicodeslot=0x1CA4, }, @@ -53556,6 +54286,7 @@ characters.data={ category="lu", description="GEORGIAN MTAVRULI CAPITAL LETTER KHAR", direction="l", + lccode=0x10E5, linebreak="al", unicodeslot=0x1CA5, }, @@ -53563,6 +54294,7 @@ characters.data={ category="lu", description="GEORGIAN MTAVRULI CAPITAL LETTER GHAN", direction="l", + lccode=0x10E6, linebreak="al", unicodeslot=0x1CA6, }, @@ -53570,6 +54302,7 @@ characters.data={ category="lu", description="GEORGIAN MTAVRULI CAPITAL LETTER QAR", direction="l", + lccode=0x10E7, linebreak="al", unicodeslot=0x1CA7, }, @@ -53577,6 +54310,7 @@ characters.data={ category="lu", description="GEORGIAN MTAVRULI CAPITAL LETTER SHIN", direction="l", + lccode=0x10E8, linebreak="al", unicodeslot=0x1CA8, }, @@ -53584,6 +54318,7 @@ characters.data={ category="lu", description="GEORGIAN MTAVRULI CAPITAL LETTER CHIN", direction="l", + lccode=0x10E9, linebreak="al", unicodeslot=0x1CA9, }, @@ -53591,6 +54326,7 @@ characters.data={ category="lu", description="GEORGIAN MTAVRULI CAPITAL LETTER CAN", direction="l", + lccode=0x10EA, linebreak="al", unicodeslot=0x1CAA, }, @@ -53598,6 +54334,7 @@ characters.data={ category="lu", description="GEORGIAN MTAVRULI CAPITAL LETTER JIL", direction="l", + lccode=0x10EB, linebreak="al", unicodeslot=0x1CAB, }, @@ -53605,6 +54342,7 @@ characters.data={ category="lu", description="GEORGIAN MTAVRULI CAPITAL LETTER CIL", direction="l", + lccode=0x10EC, linebreak="al", unicodeslot=0x1CAC, }, @@ -53612,6 +54350,7 @@ characters.data={ category="lu", description="GEORGIAN MTAVRULI CAPITAL LETTER CHAR", direction="l", + lccode=0x10ED, linebreak="al", unicodeslot=0x1CAD, }, @@ -53619,6 +54358,7 @@ characters.data={ category="lu", description="GEORGIAN MTAVRULI CAPITAL LETTER XAN", direction="l", + lccode=0x10EE, linebreak="al", unicodeslot=0x1CAE, }, @@ -53626,6 +54366,7 @@ characters.data={ category="lu", description="GEORGIAN MTAVRULI CAPITAL LETTER JHAN", direction="l", + lccode=0x10EF, linebreak="al", unicodeslot=0x1CAF, }, @@ -53633,6 +54374,7 @@ characters.data={ category="lu", description="GEORGIAN MTAVRULI CAPITAL LETTER HAE", direction="l", + lccode=0x10F0, linebreak="al", unicodeslot=0x1CB0, }, @@ -53640,6 +54382,7 @@ characters.data={ category="lu", description="GEORGIAN MTAVRULI CAPITAL LETTER HE", direction="l", + lccode=0x10F1, linebreak="al", unicodeslot=0x1CB1, }, @@ -53647,6 +54390,7 @@ characters.data={ category="lu", description="GEORGIAN MTAVRULI CAPITAL LETTER HIE", direction="l", + lccode=0x10F2, linebreak="al", unicodeslot=0x1CB2, }, @@ -53654,6 +54398,7 @@ characters.data={ category="lu", description="GEORGIAN MTAVRULI CAPITAL LETTER WE", direction="l", + lccode=0x10F3, linebreak="al", unicodeslot=0x1CB3, }, @@ -53661,6 +54406,7 @@ characters.data={ category="lu", description="GEORGIAN MTAVRULI CAPITAL LETTER HAR", direction="l", + lccode=0x10F4, linebreak="al", unicodeslot=0x1CB4, }, @@ -53668,6 +54414,7 @@ characters.data={ category="lu", description="GEORGIAN MTAVRULI CAPITAL LETTER HOE", direction="l", + lccode=0x10F5, linebreak="al", unicodeslot=0x1CB5, }, @@ -53675,6 +54422,7 @@ characters.data={ category="lu", description="GEORGIAN MTAVRULI CAPITAL LETTER FI", direction="l", + lccode=0x10F6, linebreak="al", unicodeslot=0x1CB6, }, @@ -53682,6 +54430,7 @@ characters.data={ category="lu", description="GEORGIAN MTAVRULI CAPITAL LETTER YN", direction="l", + lccode=0x10F7, linebreak="al", unicodeslot=0x1CB7, }, @@ -53689,6 +54438,7 @@ characters.data={ category="lu", description="GEORGIAN MTAVRULI CAPITAL LETTER ELIFI", direction="l", + lccode=0x10F8, linebreak="al", unicodeslot=0x1CB8, }, @@ -53696,6 +54446,7 @@ characters.data={ category="lu", description="GEORGIAN MTAVRULI CAPITAL LETTER TURNED GAN", direction="l", + lccode=0x10F9, linebreak="al", unicodeslot=0x1CB9, }, @@ -53703,6 +54454,7 @@ characters.data={ category="lu", description="GEORGIAN MTAVRULI CAPITAL LETTER AIN", direction="l", + lccode=0x10FA, linebreak="al", unicodeslot=0x1CBA, }, @@ -53710,6 +54462,7 @@ characters.data={ category="lu", description="GEORGIAN MTAVRULI CAPITAL LETTER AEN", direction="l", + lccode=0x10FD, linebreak="al", unicodeslot=0x1CBD, }, @@ -53717,6 +54470,7 @@ characters.data={ category="lu", description="GEORGIAN MTAVRULI CAPITAL LETTER HARD SIGN", direction="l", + lccode=0x10FE, linebreak="al", unicodeslot=0x1CBE, }, @@ -53724,6 +54478,7 @@ characters.data={ category="lu", description="GEORGIAN MTAVRULI CAPITAL LETTER LABIAL SIGN", direction="l", + lccode=0x10FF, linebreak="al", unicodeslot=0x1CBF, }, @@ -55706,7 +56461,7 @@ characters.data={ combining=0xEA, description="COMBINING DOUBLE CIRCUMFLEX ABOVE", direction="nsm", - linebreak="cm", + linebreak="gl", unicodeslot=0x1DCD, }, [0x1DCE]={ @@ -56061,6 +56816,14 @@ characters.data={ linebreak="cm", unicodeslot=0x1DF9, }, + [0x1DFA]={ + category="mn", + combining=0xDA, + description="COMBINING DOT BELOW LEFT", + direction="nsm", + linebreak="cm", + unicodeslot=0x1DFA, + }, [0x1DFB]={ category="mn", combining=0xE6, @@ -56074,7 +56837,7 @@ characters.data={ combining=0xE9, description="COMBINING DOUBLE INVERTED BREVE BELOW", direction="nsm", - linebreak="cm", + linebreak="gl", unicodeslot=0x1DFC, }, [0x1DFD]={ @@ -57759,6 +58522,7 @@ characters.data={ linebreak="al", shcode=0x68, specials={ "char", 0x68, 0x331 }, + uccode={ 0x68, 0x331 }, unicodeslot=0x1E96, }, [0x1E97]={ @@ -57769,6 +58533,7 @@ characters.data={ linebreak="al", shcode=0x74, specials={ "char", 0x74, 0x308 }, + uccode={ 0x74, 0x308 }, unicodeslot=0x1E97, }, [0x1E98]={ @@ -57779,6 +58544,7 @@ characters.data={ linebreak="al", shcode=0x77, specials={ "char", 0x77, 0x30A }, + uccode={ 0x77, 0x30A }, unicodeslot=0x1E98, }, [0x1E99]={ @@ -57789,6 +58555,7 @@ characters.data={ linebreak="al", shcode=0x79, specials={ "char", 0x79, 0x30A }, + uccode={ 0x79, 0x30A }, unicodeslot=0x1E99, }, [0x1E9A]={ @@ -57799,6 +58566,7 @@ characters.data={ linebreak="al", shcode=0x61, specials={ "compat", 0x61, 0x2BE }, + uccode={ 0x61, 0x2BE }, unicodeslot=0x1E9A, }, [0x1E9B]={ @@ -57808,7 +58576,7 @@ characters.data={ direction="l", linebreak="al", specials={ "char", 0x17F, 0x307 }, - uccode=0x1E60, + uccode=0x1E61, unicodeslot=0x1E9B, }, [0x1E9C]={ @@ -58923,6 +59691,7 @@ characters.data={ category="lu", description="LATIN CAPITAL LETTER MIDDLE-WELSH LL", direction="l", + lccode=0x1EFB, linebreak="al", unicodeslot=0x1EFA, }, @@ -58937,6 +59706,7 @@ characters.data={ category="lu", description="LATIN CAPITAL LETTER MIDDLE-WELSH V", direction="l", + lccode=0x1EFD, linebreak="al", unicodeslot=0x1EFC, }, @@ -58951,6 +59721,7 @@ characters.data={ category="lu", description="LATIN CAPITAL LETTER Y WITH LOOP", direction="l", + lccode=0x1EFF, linebreak="al", unicodeslot=0x1EFE, }, @@ -59761,6 +60532,7 @@ characters.data={ linebreak="al", shcode=0x3C5, specials={ "char", 0x3C5, 0x313 }, + uccode={ 0x3C5, 0x313 }, unicodeslot=0x1F50, }, [0x1F51]={ @@ -59782,6 +60554,7 @@ characters.data={ linebreak="al", shcode=0x3C5, specials={ "char", 0x1F50, 0x300 }, + uccode={ 0x3C5, 0x313, 0x300 }, unicodeslot=0x1F52, }, [0x1F53]={ @@ -59803,6 +60576,7 @@ characters.data={ linebreak="al", shcode=0x3C5, specials={ "char", 0x1F50, 0x301 }, + uccode={ 0x3C5, 0x313, 0x301 }, unicodeslot=0x1F54, }, [0x1F55]={ @@ -59824,6 +60598,7 @@ characters.data={ linebreak="al", shcode=0x3C5, specials={ "char", 0x1F50, 0x342 }, + uccode={ 0x3C5, 0x313, 0x342 }, unicodeslot=0x1F56, }, [0x1F57]={ @@ -60219,7 +60994,7 @@ characters.data={ linebreak="al", shcode=0x3B1, specials={ "char", 0x1F00, 0x345 }, - uccode=0x1F88, + uccode={ 0x1F00, 0x3B9 }, unicodeslot=0x1F80, }, [0x1F81]={ @@ -60230,7 +61005,7 @@ characters.data={ linebreak="al", shcode=0x3B1, specials={ "char", 0x1F01, 0x345 }, - uccode=0x1F89, + uccode={ 0x1F01, 0x3B9 }, unicodeslot=0x1F81, }, [0x1F82]={ @@ -60241,7 +61016,7 @@ characters.data={ linebreak="al", shcode=0x3B1, specials={ "char", 0x1F02, 0x345 }, - uccode=0x1F8A, + uccode={ 0x1F02, 0x3B9 }, unicodeslot=0x1F82, }, [0x1F83]={ @@ -60252,7 +61027,7 @@ characters.data={ linebreak="al", shcode=0x3B1, specials={ "char", 0x1F03, 0x345 }, - uccode=0x1F8B, + uccode={ 0x1F03, 0x3B9 }, unicodeslot=0x1F83, }, [0x1F84]={ @@ -60263,7 +61038,7 @@ characters.data={ linebreak="al", shcode=0x3B1, specials={ "char", 0x1F04, 0x345 }, - uccode=0x1F8C, + uccode={ 0x1F04, 0x3B9 }, unicodeslot=0x1F84, }, [0x1F85]={ @@ -60274,7 +61049,7 @@ characters.data={ linebreak="al", shcode=0x3B1, specials={ "char", 0x1F05, 0x345 }, - uccode=0x1F8D, + uccode={ 0x1F05, 0x3B9 }, unicodeslot=0x1F85, }, [0x1F86]={ @@ -60285,7 +61060,7 @@ characters.data={ linebreak="al", shcode=0x3B1, specials={ "char", 0x1F06, 0x345 }, - uccode=0x1F8E, + uccode={ 0x1F06, 0x3B9 }, unicodeslot=0x1F86, }, [0x1F87]={ @@ -60296,7 +61071,7 @@ characters.data={ linebreak="al", shcode=0x3B1, specials={ "char", 0x1F07, 0x345 }, - uccode=0x1F8F, + uccode={ 0x1F07, 0x3B9 }, unicodeslot=0x1F87, }, [0x1F88]={ @@ -60395,7 +61170,7 @@ characters.data={ linebreak="al", shcode=0x3B7, specials={ "char", 0x1F20, 0x345 }, - uccode=0x1F98, + uccode={ 0x1F20, 0x3B9 }, unicodeslot=0x1F90, }, [0x1F91]={ @@ -60406,7 +61181,7 @@ characters.data={ linebreak="al", shcode=0x3B7, specials={ "char", 0x1F21, 0x345 }, - uccode=0x1F99, + uccode={ 0x1F21, 0x3B9 }, unicodeslot=0x1F91, }, [0x1F92]={ @@ -60417,7 +61192,7 @@ characters.data={ linebreak="al", shcode=0x3B7, specials={ "char", 0x1F22, 0x345 }, - uccode=0x1F9A, + uccode={ 0x1F22, 0x3B9 }, unicodeslot=0x1F92, }, [0x1F93]={ @@ -60428,7 +61203,7 @@ characters.data={ linebreak="al", shcode=0x3B7, specials={ "char", 0x1F23, 0x345 }, - uccode=0x1F9B, + uccode={ 0x1F23, 0x3B9 }, unicodeslot=0x1F93, }, [0x1F94]={ @@ -60439,7 +61214,7 @@ characters.data={ linebreak="al", shcode=0x3B7, specials={ "char", 0x1F24, 0x345 }, - uccode=0x1F9C, + uccode={ 0x1F24, 0x3B9 }, unicodeslot=0x1F94, }, [0x1F95]={ @@ -60450,7 +61225,7 @@ characters.data={ linebreak="al", shcode=0x3B7, specials={ "char", 0x1F25, 0x345 }, - uccode=0x1F9D, + uccode={ 0x1F25, 0x3B9 }, unicodeslot=0x1F95, }, [0x1F96]={ @@ -60461,7 +61236,7 @@ characters.data={ linebreak="al", shcode=0x3B7, specials={ "char", 0x1F26, 0x345 }, - uccode=0x1F9E, + uccode={ 0x1F26, 0x3B9 }, unicodeslot=0x1F96, }, [0x1F97]={ @@ -60472,7 +61247,7 @@ characters.data={ linebreak="al", shcode=0x3B7, specials={ "char", 0x1F27, 0x345 }, - uccode=0x1F9F, + uccode={ 0x1F27, 0x3B9 }, unicodeslot=0x1F97, }, [0x1F98]={ @@ -60571,7 +61346,7 @@ characters.data={ linebreak="al", shcode=0x3C9, specials={ "char", 0x1F60, 0x345 }, - uccode=0x1FA8, + uccode={ 0x1F60, 0x3B9 }, unicodeslot=0x1FA0, }, [0x1FA1]={ @@ -60582,7 +61357,7 @@ characters.data={ linebreak="al", shcode=0x3C9, specials={ "char", 0x1F61, 0x345 }, - uccode=0x1FA9, + uccode={ 0x1F61, 0x3B9 }, unicodeslot=0x1FA1, }, [0x1FA2]={ @@ -60593,7 +61368,7 @@ characters.data={ linebreak="al", shcode=0x3C9, specials={ "char", 0x1F62, 0x345 }, - uccode=0x1FAA, + uccode={ 0x1F62, 0x3B9 }, unicodeslot=0x1FA2, }, [0x1FA3]={ @@ -60604,7 +61379,7 @@ characters.data={ linebreak="al", shcode=0x3C9, specials={ "char", 0x1F63, 0x345 }, - uccode=0x1FAB, + uccode={ 0x1F63, 0x3B9 }, unicodeslot=0x1FA3, }, [0x1FA4]={ @@ -60615,7 +61390,7 @@ characters.data={ linebreak="al", shcode=0x3C9, specials={ "char", 0x1F64, 0x345 }, - uccode=0x1FAC, + uccode={ 0x1F64, 0x3B9 }, unicodeslot=0x1FA4, }, [0x1FA5]={ @@ -60626,7 +61401,7 @@ characters.data={ linebreak="al", shcode=0x3C9, specials={ "char", 0x1F65, 0x345 }, - uccode=0x1FAD, + uccode={ 0x1F65, 0x3B9 }, unicodeslot=0x1FA5, }, [0x1FA6]={ @@ -60637,7 +61412,7 @@ characters.data={ linebreak="al", shcode=0x3C9, specials={ "char", 0x1F66, 0x345 }, - uccode=0x1FAE, + uccode={ 0x1F66, 0x3B9 }, unicodeslot=0x1FA6, }, [0x1FA7]={ @@ -60648,7 +61423,7 @@ characters.data={ linebreak="al", shcode=0x3C9, specials={ "char", 0x1F67, 0x345 }, - uccode=0x1FAF, + uccode={ 0x1F67, 0x3B9 }, unicodeslot=0x1FA7, }, [0x1FA8]={ @@ -60769,6 +61544,7 @@ characters.data={ linebreak="al", shcode=0x3B1, specials={ "char", 0x1F70, 0x345 }, + uccode={ 0x1F70, 0x3B9 }, unicodeslot=0x1FB2, }, [0x1FB3]={ @@ -60779,7 +61555,7 @@ characters.data={ linebreak="al", shcode=0x3B1, specials={ "char", 0x3B1, 0x345 }, - uccode=0x1FBC, + uccode={ 0x3B1, 0x3B9 }, unicodeslot=0x1FB3, }, [0x1FB4]={ @@ -60790,6 +61566,7 @@ characters.data={ linebreak="al", shcode=0x3B1, specials={ "char", 0x3AC, 0x345 }, + uccode={ 0x3AC, 0x3B9 }, unicodeslot=0x1FB4, }, [0x1FB6]={ @@ -60800,6 +61577,7 @@ characters.data={ linebreak="al", shcode=0x3B1, specials={ "char", 0x3B1, 0x342 }, + uccode={ 0x3B1, 0x342 }, unicodeslot=0x1FB6, }, [0x1FB7]={ @@ -60810,6 +61588,7 @@ characters.data={ linebreak="al", shcode=0x3B1, specials={ "char", 0x1FB6, 0x345 }, + uccode={ 0x3B1, 0x342, 0x3B9 }, unicodeslot=0x1FB7, }, [0x1FB8]={ @@ -60883,7 +61662,7 @@ characters.data={ direction="l", linebreak="al", specials={ "char", 0x3B9 }, - uccode=0x399, + uccode=0x3B9, unicodeslot=0x1FBE, }, [0x1FBF]={ @@ -60921,6 +61700,7 @@ characters.data={ linebreak="al", shcode=0x3B7, specials={ "char", 0x1F74, 0x345 }, + uccode={ 0x1F74, 0x3B9 }, unicodeslot=0x1FC2, }, [0x1FC3]={ @@ -60931,7 +61711,7 @@ characters.data={ linebreak="al", shcode=0x3B7, specials={ "char", 0x3B7, 0x345 }, - uccode=0x1FCC, + uccode={ 0x3B7, 0x3B9 }, unicodeslot=0x1FC3, }, [0x1FC4]={ @@ -60942,6 +61722,7 @@ characters.data={ linebreak="al", shcode=0x3B7, specials={ "char", 0x3AE, 0x345 }, + uccode={ 0x3AE, 0x3B9 }, unicodeslot=0x1FC4, }, [0x1FC6]={ @@ -60952,6 +61733,7 @@ characters.data={ linebreak="al", shcode=0x3B7, specials={ "char", 0x3B7, 0x342 }, + uccode={ 0x3B7, 0x342 }, unicodeslot=0x1FC6, }, [0x1FC7]={ @@ -60962,6 +61744,7 @@ characters.data={ linebreak="al", shcode=0x3B7, specials={ "char", 0x1FC6, 0x345 }, + uccode={ 0x3B7, 0x342, 0x3B9 }, unicodeslot=0x1FC7, }, [0x1FC8]={ @@ -61076,6 +61859,7 @@ characters.data={ linebreak="al", shcode=0x3B9, specials={ "char", 0x3CA, 0x300 }, + uccode={ 0x3B9, 0x308, 0x300 }, unicodeslot=0x1FD2, }, [0x1FD3]={ @@ -61086,6 +61870,7 @@ characters.data={ linebreak="al", shcode=0x3B9, specials={ "char", 0x390 }, + uccode={ 0x3B9, 0x308, 0x301 }, unicodeslot=0x1FD3, }, [0x1FD6]={ @@ -61096,6 +61881,7 @@ characters.data={ linebreak="al", shcode=0x3B9, specials={ "char", 0x3B9, 0x342 }, + uccode={ 0x3B9, 0x342 }, unicodeslot=0x1FD6, }, [0x1FD7]={ @@ -61106,6 +61892,7 @@ characters.data={ linebreak="al", shcode=0x3B9, specials={ "char", 0x3CA, 0x342 }, + uccode={ 0x3B9, 0x308, 0x342 }, unicodeslot=0x1FD7, }, [0x1FD8]={ @@ -61209,6 +61996,7 @@ characters.data={ linebreak="al", shcode=0x3C5, specials={ "char", 0x3CB, 0x300 }, + uccode={ 0x3C5, 0x308, 0x300 }, unicodeslot=0x1FE2, }, [0x1FE3]={ @@ -61219,6 +62007,7 @@ characters.data={ linebreak="al", shcode=0x3C5, specials={ "char", 0x3B0 }, + uccode={ 0x3C5, 0x308, 0x301 }, unicodeslot=0x1FE3, }, [0x1FE4]={ @@ -61229,6 +62018,7 @@ characters.data={ linebreak="al", shcode=0x3C1, specials={ "char", 0x3C1, 0x313 }, + uccode={ 0x3C1, 0x313 }, unicodeslot=0x1FE4, }, [0x1FE5]={ @@ -61250,6 +62040,7 @@ characters.data={ linebreak="al", shcode=0x3C5, specials={ "char", 0x3C5, 0x342 }, + uccode={ 0x3C5, 0x342 }, unicodeslot=0x1FE6, }, [0x1FE7]={ @@ -61260,6 +62051,7 @@ characters.data={ linebreak="al", shcode=0x3C5, specials={ "char", 0x3CB, 0x342 }, + uccode={ 0x3C5, 0x308, 0x342 }, unicodeslot=0x1FE7, }, [0x1FE8]={ @@ -61352,6 +62144,7 @@ characters.data={ linebreak="al", shcode=0x3C9, specials={ "char", 0x1F7C, 0x345 }, + uccode={ 0x1F7C, 0x3B9 }, unicodeslot=0x1FF2, }, [0x1FF3]={ @@ -61362,7 +62155,7 @@ characters.data={ linebreak="al", shcode=0x3C9, specials={ "char", 0x3C9, 0x345 }, - uccode=0x1FFC, + uccode={ 0x3C9, 0x3B9 }, unicodeslot=0x1FF3, }, [0x1FF4]={ @@ -61373,6 +62166,7 @@ characters.data={ linebreak="al", shcode=0x3C9, specials={ "char", 0x3CE, 0x345 }, + uccode={ 0x3CE, 0x3B9 }, unicodeslot=0x1FF4, }, [0x1FF6]={ @@ -61383,6 +62177,7 @@ characters.data={ linebreak="al", shcode=0x3C9, specials={ "char", 0x3C9, 0x342 }, + uccode={ 0x3C9, 0x342 }, unicodeslot=0x1FF6, }, [0x1FF7]={ @@ -61393,6 +62188,7 @@ characters.data={ linebreak="al", shcode=0x3C9, specials={ "char", 0x1FF6, 0x345 }, + uccode={ 0x3C9, 0x342, 0x3B9 }, unicodeslot=0x1FF7, }, [0x1FF8]={ @@ -61647,7 +62443,8 @@ characters.data={ [0x2012]={ adobename="figuredash", category="pd", - contextname="textminus", + contextname="figuredash", + contextspec={ "textminus" }, description="FIGURE DASH", direction="on", linebreak="ba", @@ -61701,7 +62498,7 @@ characters.data={ name="Vert", }, { - class="nothing", + class="ordinary", name="Arrowvert", }, { @@ -61709,6 +62506,10 @@ characters.data={ name="lVert", }, { + class="middle", + name="mVert", + }, + { class="close", name="rVert", }, @@ -61824,7 +62625,7 @@ characters.data={ name="dagger", }, { - class="box", + class="ordinary", name="dag", }, }, @@ -61845,7 +62646,7 @@ characters.data={ name="ddagger", }, { - class="box", + class="ordinary", name="ddag", }, }, @@ -61902,11 +62703,11 @@ characters.data={ linebreak="in", mathspec={ { - class="inner", + class="ellipsis", name="ldots", }, { - class="inner", + class="ellipsis", name="dots", }, }, @@ -62016,7 +62817,7 @@ characters.data={ description="PRIME", direction="et", linebreak="po", - mathclass="nothing", + mathclass="prime", mathname="prime", synonyms={ "feet", "minutes" }, unicodeslot=0x2032, @@ -62028,7 +62829,7 @@ characters.data={ description="DOUBLE PRIME", direction="et", linebreak="po", - mathclass="nothing", + mathclass="prime", mathname="doubleprime", specials={ "compat", 0x2032, 0x2032 }, synonyms={ "inches", "seconds" }, @@ -62039,7 +62840,7 @@ characters.data={ description="TRIPLE PRIME", direction="et", linebreak="po", - mathclass="nothing", + mathclass="prime", mathname="tripleprime", specials={ "compat", 0x2032, 0x2032, 0x2032 }, unicodeslot=0x2034, @@ -62051,7 +62852,7 @@ characters.data={ description="REVERSED PRIME", direction="on", linebreak="po", - mathclass="nothing", + mathclass="prime", mathname="reversedprime", unicodeslot=0x2035, }, @@ -62060,7 +62861,7 @@ characters.data={ description="REVERSED DOUBLE PRIME", direction="on", linebreak="po", - mathclass="nothing", + mathclass="prime", mathname="reverseddoubleprime", specials={ "compat", 0x2035, 0x2035 }, unicodeslot=0x2036, @@ -62070,7 +62871,7 @@ characters.data={ description="REVERSED TRIPLE PRIME", direction="on", linebreak="po", - mathclass="nothing", + mathclass="prime", mathname="reversedtripleprime", specials={ "compat", 0x2035, 0x2035, 0x2035 }, unicodeslot=0x2037, @@ -62203,16 +63004,6 @@ characters.data={ description="FRACTION SLASH", direction="cs", linebreak="is", - mathspec={ - { - class="ordinary", - name="slash", - }, - { - class="close", - name="solidus", - }, - }, synonyms={ "solidus" }, unicodeslot=0x2044, }, @@ -62354,8 +63145,8 @@ characters.data={ category="po", description="QUADRUPLE PRIME", direction="on", - linebreak="al", - mathclass="nothing", + linebreak="po", + mathclass="prime", mathname="quadrupleprime", specials={ "compat", 0x2032, 0x2032, 0x2032, 0x2032 }, unicodeslot=0x2057, @@ -62431,34 +63222,43 @@ characters.data={ }, [0x2061]={ category="cf", - comment="maybe: nulloperator", + comment="ordinary", description="FUNCTION APPLICATION", direction="bn", linebreak="al", + mathclass="ghost", + mathname="applyfunction", unicodeslot=0x2061, }, [0x2062]={ category="cf", + comment="binary", description="INVISIBLE TIMES", direction="bn", linebreak="al", + mathclass="ghost", + mathname="invisibletimes", unicodeslot=0x2062, }, [0x2063]={ category="cf", + comment="punctuation", description="INVISIBLE SEPARATOR", direction="bn", linebreak="al", - mathclass="binary", - mathname="invisibletimes", + mathclass="ghost", + mathname="invisiblecomma", synonyms={ "invisible comma" }, unicodeslot=0x2063, }, [0x2064]={ category="cf", + comment="binary", description="INVISIBLE PLUS", direction="bn", linebreak="al", + mathclass="ghost", + mathname="invisibleplus", unicodeslot=0x2064, }, [0x2066]={ @@ -63173,6 +63973,13 @@ characters.data={ linebreak="pr", unicodeslot=0x20BF, }, + [0x20C0]={ + category="sc", + description="SOM SIGN", + direction="et", + linebreak="po", + unicodeslot=0x20C0, + }, [0x20D0]={ category="mn", combining=0xE6, @@ -63238,6 +64045,7 @@ characters.data={ linebreak="cm", mathclass="topaccent", mathname="vec", + mathstretch="h", synonyms={ "vector" }, unicodeslot=0x20D7, }, @@ -63305,7 +64113,7 @@ characters.data={ description="COMBINING ENCLOSING SQUARE", direction="nsm", linebreak="cm", - mathclass="default", + mathclass="ordinary", mathname="bigsquare", unicodeslot=0x20DE, }, @@ -63314,7 +64122,7 @@ characters.data={ description="COMBINING ENCLOSING DIAMOND", direction="nsm", linebreak="cm", - mathclass="default", + mathclass="ordinary", mathname="bigdiamond", unicodeslot=0x20DF, }, @@ -63479,7 +64287,7 @@ characters.data={ description="DOUBLE-STRUCK CAPITAL C", direction="l", linebreak="al", - mathclass="variable", + mathgroup="constant set", mathname="complexes", specials={ "font", 0x43 }, synonyms={ "complex numbers", "the set of complex numbers" }, @@ -63528,7 +64336,6 @@ characters.data={ description="EULER CONSTANT", direction="l", linebreak="al", - mathclass="variable", mathname="Eulerconst", specials={ "compat", 0x190 }, unicodeslot=0x2107, @@ -63567,6 +64374,7 @@ characters.data={ linebreak="al", specials={ "font", 0x48 }, unicodeslot=0x210B, + variants=variants_style, visual="it", }, [0x210C]={ @@ -63591,7 +64399,6 @@ characters.data={ description="PLANCK CONSTANT", direction="l", linebreak="al", - mathclass="variable", mathname="Plankconst", specials={ "font", 0x68 }, unicodeslot=0x210E, @@ -63603,7 +64410,7 @@ characters.data={ linebreak="al", mathspec={ { - class="variable", + class="ordinary", name="hslash", }, { @@ -63621,6 +64428,7 @@ characters.data={ linebreak="al", specials={ "font", 0x49 }, unicodeslot=0x2110, + variants=variants_style, visual="it", }, [0x2111]={ @@ -63629,7 +64437,6 @@ characters.data={ description="BLACK-LETTER CAPITAL I", direction="l", linebreak="al", - mathclass="default", mathname="Im", specials={ "font", 0x49 }, synonyms={ "imaginary part" }, @@ -63643,6 +64450,7 @@ characters.data={ specials={ "font", 0x4C }, synonyms={ "laplace transform" }, unicodeslot=0x2112, + variants=variants_style, visual="it", }, [0x2113]={ @@ -63653,7 +64461,7 @@ characters.data={ description="SCRIPT SMALL L", direction="l", linebreak="ai", - mathclass="default", + mathclass="ordinary", mathname="ell", specials={ "font", 0x6C }, synonyms={ "liter" }, @@ -63672,7 +64480,7 @@ characters.data={ description="DOUBLE-STRUCK CAPITAL N", direction="l", linebreak="al", - mathclass="variable", + mathgroup="constant set", mathname="naturalnumbers", specials={ "font", 0x4E }, synonyms={ "natural number" }, @@ -63704,7 +64512,6 @@ characters.data={ description="SCRIPT CAPITAL P", direction="on", linebreak="al", - mathclass="default", mathname="wp", synonyms={ "weierstrass elliptic function" }, unicodeslot=0x2118, @@ -63714,7 +64521,7 @@ characters.data={ description="DOUBLE-STRUCK CAPITAL P", direction="l", linebreak="al", - mathclass="variable", + mathgroup="constant set", mathname="primes", specials={ "font", 0x50 }, unicodeslot=0x2119, @@ -63724,7 +64531,7 @@ characters.data={ description="DOUBLE-STRUCK CAPITAL Q", direction="l", linebreak="al", - mathclass="variable", + mathgroup="constant set", mathname="rationals", specials={ "font", 0x51 }, synonyms={ "rational numbers", "the set of rational numbers" }, @@ -63738,6 +64545,7 @@ characters.data={ specials={ "font", 0x52 }, synonyms={ "riemann integral" }, unicodeslot=0x211B, + variants=variants_style, visual="it", }, [0x211C]={ @@ -63746,7 +64554,6 @@ characters.data={ description="BLACK-LETTER CAPITAL R", direction="l", linebreak="al", - mathclass="default", mathname="Re", specials={ "font", 0x52 }, synonyms={ "real part" }, @@ -63757,7 +64564,7 @@ characters.data={ description="DOUBLE-STRUCK CAPITAL R", direction="l", linebreak="al", - mathclass="variable", + mathgroup="constant set", mathname="reals", specials={ "font", 0x52 }, synonyms={ "real numbers", "the set of real numbers" }, @@ -63821,7 +64628,7 @@ characters.data={ description="DOUBLE-STRUCK CAPITAL Z", direction="l", linebreak="al", - mathclass="variable", + mathgroup="constant set", mathname="integers", specials={ "font", 0x5A }, synonyms={ "integers", "the set of integers" }, @@ -63844,7 +64651,6 @@ characters.data={ direction="l", lccode=0x3C9, linebreak="al", - mathclass="variable", mathname="ohm", specials={ "char", 0x3A9 }, unicodeslot=0x2126, @@ -63855,7 +64661,6 @@ characters.data={ description="INVERTED OHM SIGN", direction="on", linebreak="al", - mathclass="variable", mathname="mho", synonyms={ "mho" }, unicodeslot=0x2127, @@ -63873,7 +64678,6 @@ characters.data={ description="TURNED GREEK SMALL LETTER IOTA", direction="on", linebreak="al", - mathclass="variable", mathname="turnediota", synonyms={ "unique element" }, unicodeslot=0x2129, @@ -63897,7 +64701,6 @@ characters.data={ direction="l", lccode=0xE5, linebreak="ai", - mathclass="variable", mathname="Angstrom", specials={ "char", 0xC5 }, unicodeslot=0x212B, @@ -63910,6 +64713,7 @@ characters.data={ specials={ "font", 0x42 }, synonyms={ "bernoulli function" }, unicodeslot=0x212C, + variants=variants_style, visual="it", }, [0x212D]={ @@ -63946,6 +64750,7 @@ characters.data={ specials={ "font", 0x45 }, synonyms={ "electromotive force", "emf" }, unicodeslot=0x2130, + variants=variants_style, visual="it", }, [0x2131]={ @@ -63956,6 +64761,7 @@ characters.data={ specials={ "font", 0x46 }, synonyms={ "fourier transform" }, unicodeslot=0x2131, + variants=variants_style, visual="it", }, [0x2132]={ @@ -63977,6 +64783,7 @@ characters.data={ specials={ "font", 0x4D }, synonyms={ "german mark pre-wwii", "m-matrix" }, unicodeslot=0x2133, + variants=variants_style, visual="it", }, [0x2134]={ @@ -63995,7 +64802,7 @@ characters.data={ description="ALEF SYMBOL", direction="l", linebreak="al", - mathclass="default", + mathclass="ordinary", mathname="aleph", specials={ "compat", 0x5D0 }, synonyms={ "first transfinite cardinal", "first transfinite cardinal countable" }, @@ -64006,7 +64813,7 @@ characters.data={ description="BET SYMBOL", direction="l", linebreak="al", - mathclass="default", + mathclass="ordinary", mathname="beth", specials={ "compat", 0x5D1 }, synonyms={ "second transfinite cardinal", "second transfinite cardinal continuum" }, @@ -64017,7 +64824,7 @@ characters.data={ description="GIMEL SYMBOL", direction="l", linebreak="al", - mathclass="default", + mathclass="ordinary", mathname="gimel", specials={ "compat", 0x5D2 }, synonyms={ "third transfinite cardinal" }, @@ -64028,7 +64835,7 @@ characters.data={ description="DALET SYMBOL", direction="l", linebreak="al", - mathclass="default", + mathclass="ordinary", mathname="daleth", specials={ "compat", 0x5D3 }, synonyms={ "fourth transfinite cardinal" }, @@ -64140,7 +64947,7 @@ characters.data={ description="DOUBLE-STRUCK ITALIC CAPITAL D", direction="l", linebreak="al", - mathclass="nothing", + mathclass="differential", mathname="differentialD", specials={ "font", 0x44 }, unicodeslot=0x2145, @@ -64150,7 +64957,7 @@ characters.data={ description="DOUBLE-STRUCK ITALIC SMALL D", direction="l", linebreak="al", - mathclass="nothing", + mathclass="differential", mathname="differentiald", specials={ "font", 0x64 }, unicodeslot=0x2146, @@ -64160,7 +64967,7 @@ characters.data={ description="DOUBLE-STRUCK ITALIC SMALL E", direction="l", linebreak="al", - mathclass="nothing", + mathclass="exponential", mathname="exponentiale", specials={ "font", 0x65 }, unicodeslot=0x2147, @@ -64170,7 +64977,7 @@ characters.data={ description="DOUBLE-STRUCK ITALIC SMALL I", direction="l", linebreak="al", - mathclass="nothing", + mathclass="ordinary", mathname="imaginaryi", specials={ "font", 0x69 }, unicodeslot=0x2148, @@ -64180,7 +64987,7 @@ characters.data={ description="DOUBLE-STRUCK ITALIC SMALL J", direction="l", linebreak="al", - mathclass="nothing", + mathclass="ordinary", mathname="imaginaryj", specials={ "font", 0x6A }, unicodeslot=0x2149, @@ -66142,7 +66949,7 @@ characters.data={ description="PARTIAL DIFFERENTIAL", direction="on", linebreak="ai", - mathclass="default", + mathclass="differential", mathname="partial", unicodeslot=0x2202, }, @@ -66174,7 +66981,8 @@ characters.data={ description="EMPTY SET", direction="on", linebreak="al", - mathclass="default", + mathclass="ordinary", + mathgroup="constant set", mathname="emptyset", synonyms={ "null set" }, unicodeslot=0x2205, @@ -66188,6 +66996,8 @@ characters.data={ description="INCREMENT", direction="on", linebreak="al", + mathclass="differential", + mathname="laplace", synonyms={ "forward difference", "laplace operator" }, unicodeslot=0x2206, }, @@ -66198,7 +67008,7 @@ characters.data={ description="NABLA", direction="on", linebreak="ai", - mathclass="default", + mathclass="ordinary", mathname="nabla", synonyms={ "backward difference", "del" }, unicodeslot=0x2207, @@ -66339,6 +67149,7 @@ characters.data={ description="MINUS SIGN", direction="es", linebreak="pr", + mathgroup="binary arithmetic", mathspec={ { class="binary", @@ -66346,6 +67157,7 @@ characters.data={ }, { class="relation", + comment="useless", name="relbar", }, }, @@ -66354,6 +67166,7 @@ characters.data={ [0x2213]={ adobename="minusplus", category="sm", + contextname="textmp", description="MINUS-OR-PLUS SIGN", direction="et", linebreak="pr", @@ -66480,7 +67293,7 @@ characters.data={ description="INFINITY", direction="on", linebreak="ai", - mathclass="default", + mathclass="ordinary", mathname="infty", unicodeslot=0x221E, }, @@ -66536,8 +67349,17 @@ characters.data={ description="DIVIDES", direction="on", linebreak="ai", - mathclass="binary", - mathname="divides", + mathspec={ + { + -- class="binary", + class="ordinary", + name="divides", + }, + { + class="relation", + name="mid", + }, + }, synonyms={ "apl stile", "such that" }, unicodeslot=0x2223, }, @@ -66548,7 +67370,8 @@ characters.data={ linebreak="al", mathspec={ { - class="binary", + -- class="binary", + class="ordinary", name="ndivides", }, { @@ -66670,7 +67493,7 @@ characters.data={ name="int", }, { - class="nothing", + class="ordinary", name="intop", }, }, @@ -66690,7 +67513,7 @@ characters.data={ name="iint", }, { - class="nothing", + class="ordinary", name="iintop", }, }, @@ -66709,7 +67532,7 @@ characters.data={ name="iiint", }, { - class="nothing", + class="ordinary", name="iiintop", }, }, @@ -67294,6 +68117,7 @@ characters.data={ description="LESS-THAN OR EQUAL TO", direction="on", linebreak="ai", + mathgroup="nary relation", mathlist={ 0x3C, 0x3D }, mathspec={ { @@ -67315,6 +68139,7 @@ characters.data={ description="GREATER-THAN OR EQUAL TO", direction="on", linebreak="ai", + mathgroup="nary relation", mathlist={ 0x3E, 0x3D }, mathspec={ { @@ -68041,7 +68866,7 @@ characters.data={ description="DOWN TACK", direction="on", linebreak="al", - mathclass="default", + mathclass="ordinary", mathname="top", synonyms={ "top" }, unicodeslot=0x22A4, @@ -68055,7 +68880,7 @@ characters.data={ linebreak="ai", mathspec={ { - class="default", + class="ordinary", name="bot", }, { @@ -68820,7 +69645,7 @@ characters.data={ description="VERTICAL ELLIPSIS", direction="on", linebreak="al", - mathclass="inner", + mathclass="ellipsis", mathname="vdots", unicodeslot=0x22EE, }, @@ -68829,7 +69654,7 @@ characters.data={ description="MIDLINE HORIZONTAL ELLIPSIS", direction="on", linebreak="in", - mathclass="inner", + mathclass="ellipsis", mathname="cdots", unicodeslot=0x22EF, }, @@ -68838,7 +69663,7 @@ characters.data={ description="UP RIGHT DIAGONAL ELLIPSIS", direction="on", linebreak="al", - mathclass="inner", + mathclass="ellipsis", mathname="udots", mirror=0x22F1, unicodeslot=0x22F0, @@ -68848,7 +69673,7 @@ characters.data={ description="DOWN RIGHT DIAGONAL ELLIPSIS", direction="on", linebreak="al", - mathclass="inner", + mathclass="ellipsis", mathname="ddots", mirror=0x22F0, unicodeslot=0x22F1, @@ -68968,11 +69793,11 @@ characters.data={ linebreak="al", mathspec={ { - class="ord", + class="ordinary", name="varnothing", }, { - class="ord", + class="ordinary", name="diameter", }, }, @@ -75745,7 +76570,7 @@ characters.data={ description="BLACK SPADE SUIT", direction="on", linebreak="ai", - mathclass="default", + mathclass="ordinary", mathname="spadesuit", unicodeslot=0x2660, variants=variants_emoji, @@ -75757,7 +76582,7 @@ characters.data={ description="WHITE HEART SUIT", direction="on", linebreak="ai", - mathclass="default", + mathclass="ordinary", mathname="heartsuit", unicodeslot=0x2661, }, @@ -75767,7 +76592,7 @@ characters.data={ description="WHITE DIAMOND SUIT", direction="on", linebreak="al", - mathclass="default", + mathclass="ordinary", mathname="diamondsuit", unicodeslot=0x2662, }, @@ -75778,7 +76603,7 @@ characters.data={ description="BLACK CLUB SUIT", direction="on", linebreak="ai", - mathclass="default", + mathclass="ordinary", mathname="clubsuit", synonyms={ "shamrock" }, unicodeslot=0x2663, @@ -75880,7 +76705,7 @@ characters.data={ description="MUSIC FLAT SIGN", direction="on", linebreak="ai", - mathclass="default", + mathclass="ordinary", mathname="flat", unicodeslot=0x266D, }, @@ -75889,7 +76714,7 @@ characters.data={ description="MUSIC NATURAL SIGN", direction="on", linebreak="al", - mathclass="default", + mathclass="ordinary", mathname="natural", unicodeslot=0x266E, }, @@ -75900,7 +76725,7 @@ characters.data={ description="MUSIC SHARP SIGN", direction="on", linebreak="ai", - mathclass="default", + mathclass="ordinary", mathname="sharp", synonyms={ "infix bag count" }, unicodeslot=0x266F, @@ -77201,7 +78026,7 @@ characters.data={ description="CHECK MARK", direction="on", linebreak="al", - mathclass="nothing", + mathclass="ordinary", mathname="checkmark", unicodeslot=0x2713, }, @@ -77297,7 +78122,7 @@ characters.data={ description="MALTESE CROSS", direction="on", linebreak="al", - mathclass="nothing", + mathclass="ordinary", mathname="maltese", unicodeslot=0x2720, }, @@ -82936,7 +83761,7 @@ characters.data={ name="iiiint", }, { - class="nothing", + class="ordinary", name="iiiintop", }, }, @@ -87051,6 +87876,14 @@ characters.data={ linebreak="al", unicodeslot=0x2C2E, }, + [0x2C2F]={ + category="lu", + description="GLAGOLITIC CAPITAL LETTER CAUDATE CHRIVI", + direction="l", + lccode=0x2C5F, + linebreak="al", + unicodeslot=0x2C2F, + }, [0x2C30]={ category="ll", description="GLAGOLITIC SMALL LETTER AZU", @@ -87427,6 +88260,13 @@ characters.data={ uccode=0x2C2E, unicodeslot=0x2C5E, }, + [0x2C5F]={ + category="ll", + description="GLAGOLITIC SMALL LETTER CAUDATE CHRIVI", + direction="l", + linebreak="al", + unicodeslot=0x2C5F, + }, [0x2C60]={ category="lu", description="LATIN CAPITAL LETTER L WITH DOUBLE BAR", @@ -87550,6 +88390,7 @@ characters.data={ category="lu", description="LATIN CAPITAL LETTER ALPHA", direction="l", + lccode=0x251, linebreak="al", unicodeslot=0x2C6D, }, @@ -87557,6 +88398,7 @@ characters.data={ category="lu", description="LATIN CAPITAL LETTER M WITH HOOK", direction="l", + lccode=0x271, linebreak="al", specials={ "with", 0x4D, 0x1FA9D }, unicodeslot=0x2C6E, @@ -87565,6 +88407,7 @@ characters.data={ category="lu", description="LATIN CAPITAL LETTER TURNED A", direction="l", + lccode=0x250, linebreak="al", unicodeslot=0x2C6F, }, @@ -87572,6 +88415,7 @@ characters.data={ category="lu", description="LATIN CAPITAL LETTER TURNED ALPHA", direction="l", + lccode=0x252, linebreak="al", unicodeslot=0x2C70, }, @@ -87586,6 +88430,7 @@ characters.data={ category="lu", description="LATIN CAPITAL LETTER W WITH HOOK", direction="l", + lccode=0x2C73, linebreak="al", specials={ "with", 0x57, 0x1FA9D }, unicodeslot=0x2C72, @@ -87677,6 +88522,7 @@ characters.data={ category="lu", description="LATIN CAPITAL LETTER S WITH SWASH TAIL", direction="l", + lccode=0x23F, linebreak="al", unicodeslot=0x2C7E, }, @@ -87684,6 +88530,7 @@ characters.data={ category="lu", description="LATIN CAPITAL LETTER Z WITH SWASH TAIL", direction="l", + lccode=0x240, linebreak="al", unicodeslot=0x2C7F, }, @@ -88540,6 +89387,7 @@ characters.data={ category="lu", description="COPTIC CAPITAL LETTER CRYPTOGRAMMIC SHEI", direction="l", + lccode=0x2CEC, linebreak="al", unicodeslot=0x2CEB, }, @@ -88554,6 +89402,7 @@ characters.data={ category="lu", description="COPTIC CAPITAL LETTER CRYPTOGRAMMIC GANGIA", direction="l", + lccode=0x2CEE, linebreak="al", unicodeslot=0x2CED, }, @@ -88592,6 +89441,7 @@ characters.data={ category="lu", description="COPTIC CAPITAL LETTER BOHAIRIC KHEI", direction="l", + lccode=0x2CF3, linebreak="al", unicodeslot=0x2CF2, }, @@ -90796,6 +91646,91 @@ characters.data={ linebreak="al", unicodeslot=0x2E52, }, + [0x2E53]={ + category="po", + description="MEDIEVAL EXCLAMATION MARK", + direction="on", + linebreak="ex", + unicodeslot=0x2E53, + }, + [0x2E54]={ + category="po", + description="MEDIEVAL QUESTION MARK", + direction="on", + linebreak="ex", + unicodeslot=0x2E54, + }, + [0x2E55]={ + category="ps", + description="LEFT SQUARE BRACKET WITH STROKE", + direction="on", + linebreak="op", + mirror=0x2E56, + unicodeslot=0x2E55, + }, + [0x2E56]={ + category="pe", + description="RIGHT SQUARE BRACKET WITH STROKE", + direction="on", + linebreak="cl", + mirror=0x2E55, + unicodeslot=0x2E56, + }, + [0x2E57]={ + category="ps", + description="LEFT SQUARE BRACKET WITH DOUBLE STROKE", + direction="on", + linebreak="op", + mirror=0x2E58, + unicodeslot=0x2E57, + }, + [0x2E58]={ + category="pe", + description="RIGHT SQUARE BRACKET WITH DOUBLE STROKE", + direction="on", + linebreak="cl", + mirror=0x2E57, + unicodeslot=0x2E58, + }, + [0x2E59]={ + category="ps", + description="TOP HALF LEFT PARENTHESIS", + direction="on", + linebreak="op", + mirror=0x2E5A, + unicodeslot=0x2E59, + }, + [0x2E5A]={ + category="pe", + description="TOP HALF RIGHT PARENTHESIS", + direction="on", + linebreak="cl", + mirror=0x2E59, + unicodeslot=0x2E5A, + }, + [0x2E5B]={ + category="ps", + description="BOTTOM HALF LEFT PARENTHESIS", + direction="on", + linebreak="op", + mirror=0x2E5C, + unicodeslot=0x2E5B, + }, + [0x2E5C]={ + category="pe", + description="BOTTOM HALF RIGHT PARENTHESIS", + direction="on", + linebreak="cl", + mirror=0x2E5B, + unicodeslot=0x2E5C, + }, + [0x2E5D]={ + category="pd", + description="OBLIQUE HYPHEN", + direction="on", + linebreak="ba", + unicodeslot=0x2E5D, + }, [0x2E80]={ category="so", cjkwd="w", @@ -116276,6 +117211,7 @@ characters.data={ category="lu", description="CYRILLIC CAPITAL LETTER ZEMLYA", direction="l", + lccode=0xA641, linebreak="al", unicodeslot=0xA640, }, @@ -116290,6 +117226,7 @@ characters.data={ category="lu", description="CYRILLIC CAPITAL LETTER DZELO", direction="l", + lccode=0xA643, linebreak="al", unicodeslot=0xA642, }, @@ -116304,6 +117241,7 @@ characters.data={ category="lu", description="CYRILLIC CAPITAL LETTER REVERSED DZE", direction="l", + lccode=0xA645, linebreak="al", unicodeslot=0xA644, }, @@ -116318,6 +117256,7 @@ characters.data={ category="lu", description="CYRILLIC CAPITAL LETTER IOTA", direction="l", + lccode=0xA647, linebreak="al", unicodeslot=0xA646, }, @@ -116332,6 +117271,7 @@ characters.data={ category="lu", description="CYRILLIC CAPITAL LETTER DJERV", direction="l", + lccode=0xA649, linebreak="al", unicodeslot=0xA648, }, @@ -116346,6 +117286,7 @@ characters.data={ category="lu", description="CYRILLIC CAPITAL LETTER MONOGRAPH UK", direction="l", + lccode=0xA64B, linebreak="al", unicodeslot=0xA64A, }, @@ -116360,6 +117301,7 @@ characters.data={ category="lu", description="CYRILLIC CAPITAL LETTER BROAD OMEGA", direction="l", + lccode=0xA64D, linebreak="al", unicodeslot=0xA64C, }, @@ -116374,6 +117316,7 @@ characters.data={ category="lu", description="CYRILLIC CAPITAL LETTER NEUTRAL YER", direction="l", + lccode=0xA64F, linebreak="al", unicodeslot=0xA64E, }, @@ -116388,6 +117331,7 @@ characters.data={ category="lu", description="CYRILLIC CAPITAL LETTER YERU WITH BACK YER", direction="l", + lccode=0xA651, linebreak="al", unicodeslot=0xA650, }, @@ -116402,6 +117346,7 @@ characters.data={ category="lu", description="CYRILLIC CAPITAL LETTER IOTIFIED YAT", direction="l", + lccode=0xA653, linebreak="al", unicodeslot=0xA652, }, @@ -116416,6 +117361,7 @@ characters.data={ category="lu", description="CYRILLIC CAPITAL LETTER REVERSED YU", direction="l", + lccode=0xA655, linebreak="al", unicodeslot=0xA654, }, @@ -116430,6 +117376,7 @@ characters.data={ category="lu", description="CYRILLIC CAPITAL LETTER IOTIFIED A", direction="l", + lccode=0xA657, linebreak="al", unicodeslot=0xA656, }, @@ -116444,6 +117391,7 @@ characters.data={ category="lu", description="CYRILLIC CAPITAL LETTER CLOSED LITTLE YUS", direction="l", + lccode=0xA659, linebreak="al", unicodeslot=0xA658, }, @@ -116458,6 +117406,7 @@ characters.data={ category="lu", description="CYRILLIC CAPITAL LETTER BLENDED YUS", direction="l", + lccode=0xA65B, linebreak="al", unicodeslot=0xA65A, }, @@ -116472,6 +117421,7 @@ characters.data={ category="lu", description="CYRILLIC CAPITAL LETTER IOTIFIED CLOSED LITTLE YUS", direction="l", + lccode=0xA65D, linebreak="al", unicodeslot=0xA65C, }, @@ -116486,6 +117436,7 @@ characters.data={ category="lu", description="CYRILLIC CAPITAL LETTER YN", direction="l", + lccode=0xA65F, linebreak="al", unicodeslot=0xA65E, }, @@ -116500,6 +117451,7 @@ characters.data={ category="lu", description="CYRILLIC CAPITAL LETTER REVERSED TSE", direction="l", + lccode=0xA661, linebreak="al", unicodeslot=0xA660, }, @@ -116514,6 +117466,7 @@ characters.data={ category="lu", description="CYRILLIC CAPITAL LETTER SOFT DE", direction="l", + lccode=0xA663, linebreak="al", unicodeslot=0xA662, }, @@ -116528,6 +117481,7 @@ characters.data={ category="lu", description="CYRILLIC CAPITAL LETTER SOFT EL", direction="l", + lccode=0xA665, linebreak="al", unicodeslot=0xA664, }, @@ -116542,6 +117496,7 @@ characters.data={ category="lu", description="CYRILLIC CAPITAL LETTER SOFT EM", direction="l", + lccode=0xA667, linebreak="al", unicodeslot=0xA666, }, @@ -116556,6 +117511,7 @@ characters.data={ category="lu", description="CYRILLIC CAPITAL LETTER MONOCULAR O", direction="l", + lccode=0xA669, linebreak="al", unicodeslot=0xA668, }, @@ -116570,6 +117526,7 @@ characters.data={ category="lu", description="CYRILLIC CAPITAL LETTER BINOCULAR O", direction="l", + lccode=0xA66B, linebreak="al", unicodeslot=0xA66A, }, @@ -116584,6 +117541,7 @@ characters.data={ category="lu", description="CYRILLIC CAPITAL LETTER DOUBLE MONOCULAR O", direction="l", + lccode=0xA66D, linebreak="al", unicodeslot=0xA66C, }, @@ -116735,6 +117693,7 @@ characters.data={ category="lu", description="CYRILLIC CAPITAL LETTER DWE", direction="l", + lccode=0xA681, linebreak="al", unicodeslot=0xA680, }, @@ -116749,6 +117708,7 @@ characters.data={ category="lu", description="CYRILLIC CAPITAL LETTER DZWE", direction="l", + lccode=0xA683, linebreak="al", unicodeslot=0xA682, }, @@ -116763,6 +117723,7 @@ characters.data={ category="lu", description="CYRILLIC CAPITAL LETTER ZHWE", direction="l", + lccode=0xA685, linebreak="al", unicodeslot=0xA684, }, @@ -116777,6 +117738,7 @@ characters.data={ category="lu", description="CYRILLIC CAPITAL LETTER CCHE", direction="l", + lccode=0xA687, linebreak="al", unicodeslot=0xA686, }, @@ -116791,6 +117753,7 @@ characters.data={ category="lu", description="CYRILLIC CAPITAL LETTER DZZE", direction="l", + lccode=0xA689, linebreak="al", unicodeslot=0xA688, }, @@ -116805,6 +117768,7 @@ characters.data={ category="lu", description="CYRILLIC CAPITAL LETTER TE WITH MIDDLE HOOK", direction="l", + lccode=0xA68B, linebreak="al", unicodeslot=0xA68A, }, @@ -116819,6 +117783,7 @@ characters.data={ category="lu", description="CYRILLIC CAPITAL LETTER TWE", direction="l", + lccode=0xA68D, linebreak="al", unicodeslot=0xA68C, }, @@ -116833,6 +117798,7 @@ characters.data={ category="lu", description="CYRILLIC CAPITAL LETTER TSWE", direction="l", + lccode=0xA68F, linebreak="al", unicodeslot=0xA68E, }, @@ -116847,6 +117813,7 @@ characters.data={ category="lu", description="CYRILLIC CAPITAL LETTER TSSE", direction="l", + lccode=0xA691, linebreak="al", unicodeslot=0xA690, }, @@ -116861,6 +117828,7 @@ characters.data={ category="lu", description="CYRILLIC CAPITAL LETTER TCHE", direction="l", + lccode=0xA693, linebreak="al", unicodeslot=0xA692, }, @@ -116875,6 +117843,7 @@ characters.data={ category="lu", description="CYRILLIC CAPITAL LETTER HWE", direction="l", + lccode=0xA695, linebreak="al", unicodeslot=0xA694, }, @@ -116889,6 +117858,7 @@ characters.data={ category="lu", description="CYRILLIC CAPITAL LETTER SHWE", direction="l", + lccode=0xA697, linebreak="al", unicodeslot=0xA696, }, @@ -116903,6 +117873,7 @@ characters.data={ category="lu", description="CYRILLIC CAPITAL LETTER DOUBLE O", direction="l", + lccode=0xA699, linebreak="al", unicodeslot=0xA698, }, @@ -116917,6 +117888,7 @@ characters.data={ category="lu", description="CYRILLIC CAPITAL LETTER CROSSED O", direction="l", + lccode=0xA69B, linebreak="al", unicodeslot=0xA69A, }, @@ -117819,6 +118791,7 @@ characters.data={ category="lu", description="LATIN CAPITAL LETTER EGYPTOLOGICAL ALEF", direction="l", + lccode=0xA723, linebreak="al", unicodeslot=0xA722, }, @@ -117833,6 +118806,7 @@ characters.data={ category="lu", description="LATIN CAPITAL LETTER EGYPTOLOGICAL AIN", direction="l", + lccode=0xA725, linebreak="al", unicodeslot=0xA724, }, @@ -117847,6 +118821,7 @@ characters.data={ category="lu", description="LATIN CAPITAL LETTER HENG", direction="l", + lccode=0xA727, linebreak="al", unicodeslot=0xA726, }, @@ -117861,6 +118836,7 @@ characters.data={ category="lu", description="LATIN CAPITAL LETTER TZ", direction="l", + lccode=0xA729, linebreak="al", unicodeslot=0xA728, }, @@ -117875,6 +118851,7 @@ characters.data={ category="lu", description="LATIN CAPITAL LETTER TRESILLO", direction="l", + lccode=0xA72B, linebreak="al", unicodeslot=0xA72A, }, @@ -117889,6 +118866,7 @@ characters.data={ category="lu", description="LATIN CAPITAL LETTER CUATRILLO", direction="l", + lccode=0xA72D, linebreak="al", unicodeslot=0xA72C, }, @@ -117903,6 +118881,7 @@ characters.data={ category="lu", description="LATIN CAPITAL LETTER CUATRILLO WITH COMMA", direction="l", + lccode=0xA72F, linebreak="al", specials={ "with", 0xA72C, 0x2C }, unicodeslot=0xA72E, @@ -117933,6 +118912,7 @@ characters.data={ category="lu", description="LATIN CAPITAL LETTER AA", direction="l", + lccode=0xA733, linebreak="al", unicodeslot=0xA732, }, @@ -117947,6 +118927,7 @@ characters.data={ category="lu", description="LATIN CAPITAL LETTER AO", direction="l", + lccode=0xA735, linebreak="al", unicodeslot=0xA734, }, @@ -117961,6 +118942,7 @@ characters.data={ category="lu", description="LATIN CAPITAL LETTER AU", direction="l", + lccode=0xA737, linebreak="al", unicodeslot=0xA736, }, @@ -117975,6 +118957,7 @@ characters.data={ category="lu", description="LATIN CAPITAL LETTER AV", direction="l", + lccode=0xA739, linebreak="al", unicodeslot=0xA738, }, @@ -117989,6 +118972,7 @@ characters.data={ category="lu", description="LATIN CAPITAL LETTER AV WITH HORIZONTAL BAR", direction="l", + lccode=0xA73B, linebreak="al", specials={ "with", 0xA738, 0x2015 }, unicodeslot=0xA73A, @@ -118005,6 +118989,7 @@ characters.data={ category="lu", description="LATIN CAPITAL LETTER AY", direction="l", + lccode=0xA73D, linebreak="al", unicodeslot=0xA73C, }, @@ -118019,6 +119004,7 @@ characters.data={ category="lu", description="LATIN CAPITAL LETTER REVERSED C WITH DOT", direction="l", + lccode=0xA73F, linebreak="al", unicodeslot=0xA73E, }, @@ -118033,6 +119019,7 @@ characters.data={ category="lu", description="LATIN CAPITAL LETTER K WITH STROKE", direction="l", + lccode=0xA741, linebreak="al", specials={ "with", 0x4B, 0x2F }, unicodeslot=0xA740, @@ -118049,6 +119036,7 @@ characters.data={ category="lu", description="LATIN CAPITAL LETTER K WITH DIAGONAL STROKE", direction="l", + lccode=0xA743, linebreak="al", unicodeslot=0xA742, }, @@ -118063,6 +119051,7 @@ characters.data={ category="lu", description="LATIN CAPITAL LETTER K WITH STROKE AND DIAGONAL STROKE", direction="l", + lccode=0xA745, linebreak="al", unicodeslot=0xA744, }, @@ -118077,6 +119066,7 @@ characters.data={ category="lu", description="LATIN CAPITAL LETTER BROKEN L", direction="l", + lccode=0xA747, linebreak="al", unicodeslot=0xA746, }, @@ -118091,6 +119081,7 @@ characters.data={ category="lu", description="LATIN CAPITAL LETTER L WITH HIGH STROKE", direction="l", + lccode=0xA749, linebreak="al", unicodeslot=0xA748, }, @@ -118105,6 +119096,7 @@ characters.data={ category="lu", description="LATIN CAPITAL LETTER O WITH LONG STROKE OVERLAY", direction="l", + lccode=0xA74B, linebreak="al", unicodeslot=0xA74A, }, @@ -118119,6 +119111,7 @@ characters.data={ category="lu", description="LATIN CAPITAL LETTER O WITH LOOP", direction="l", + lccode=0xA74D, linebreak="al", unicodeslot=0xA74C, }, @@ -118133,6 +119126,7 @@ characters.data={ category="lu", description="LATIN CAPITAL LETTER OO", direction="l", + lccode=0xA74F, linebreak="al", unicodeslot=0xA74E, }, @@ -118147,6 +119141,7 @@ characters.data={ category="lu", description="LATIN CAPITAL LETTER P WITH STROKE THROUGH DESCENDER", direction="l", + lccode=0xA751, linebreak="al", unicodeslot=0xA750, }, @@ -118161,6 +119156,7 @@ characters.data={ category="lu", description="LATIN CAPITAL LETTER P WITH FLOURISH", direction="l", + lccode=0xA753, linebreak="al", unicodeslot=0xA752, }, @@ -118175,6 +119171,7 @@ characters.data={ category="lu", description="LATIN CAPITAL LETTER P WITH SQUIRREL TAIL", direction="l", + lccode=0xA755, linebreak="al", unicodeslot=0xA754, }, @@ -118189,6 +119186,7 @@ characters.data={ category="lu", description="LATIN CAPITAL LETTER Q WITH STROKE THROUGH DESCENDER", direction="l", + lccode=0xA757, linebreak="al", unicodeslot=0xA756, }, @@ -118203,6 +119201,7 @@ characters.data={ category="lu", description="LATIN CAPITAL LETTER Q WITH DIAGONAL STROKE", direction="l", + lccode=0xA759, linebreak="al", unicodeslot=0xA758, }, @@ -118217,6 +119216,7 @@ characters.data={ category="lu", description="LATIN CAPITAL LETTER R ROTUNDA", direction="l", + lccode=0xA75B, linebreak="al", unicodeslot=0xA75A, }, @@ -118231,6 +119231,7 @@ characters.data={ category="lu", description="LATIN CAPITAL LETTER RUM ROTUNDA", direction="l", + lccode=0xA75D, linebreak="al", unicodeslot=0xA75C, }, @@ -118245,6 +119246,7 @@ characters.data={ category="lu", description="LATIN CAPITAL LETTER V WITH DIAGONAL STROKE", direction="l", + lccode=0xA75F, linebreak="al", unicodeslot=0xA75E, }, @@ -118259,6 +119261,7 @@ characters.data={ category="lu", description="LATIN CAPITAL LETTER VY", direction="l", + lccode=0xA761, linebreak="al", unicodeslot=0xA760, }, @@ -118273,6 +119276,7 @@ characters.data={ category="lu", description="LATIN CAPITAL LETTER VISIGOTHIC Z", direction="l", + lccode=0xA763, linebreak="al", unicodeslot=0xA762, }, @@ -118287,6 +119291,7 @@ characters.data={ category="lu", description="LATIN CAPITAL LETTER THORN WITH STROKE", direction="l", + lccode=0xA765, linebreak="al", specials={ "with", 0xDE, 0x2F }, unicodeslot=0xA764, @@ -118303,6 +119308,7 @@ characters.data={ category="lu", description="LATIN CAPITAL LETTER THORN WITH STROKE THROUGH DESCENDER", direction="l", + lccode=0xA767, linebreak="al", unicodeslot=0xA766, }, @@ -118317,6 +119323,7 @@ characters.data={ category="lu", description="LATIN CAPITAL LETTER VEND", direction="l", + lccode=0xA769, linebreak="al", unicodeslot=0xA768, }, @@ -118331,6 +119338,7 @@ characters.data={ category="lu", description="LATIN CAPITAL LETTER ET", direction="l", + lccode=0xA76B, linebreak="al", unicodeslot=0xA76A, }, @@ -118345,6 +119353,7 @@ characters.data={ category="lu", description="LATIN CAPITAL LETTER IS", direction="l", + lccode=0xA76D, linebreak="al", unicodeslot=0xA76C, }, @@ -118359,6 +119368,7 @@ characters.data={ category="lu", description="LATIN CAPITAL LETTER CON", direction="l", + lccode=0xA76F, linebreak="al", unicodeslot=0xA76E, }, @@ -118437,6 +119447,7 @@ characters.data={ category="lu", description="LATIN CAPITAL LETTER INSULAR D", direction="l", + lccode=0xA77A, linebreak="al", unicodeslot=0xA779, }, @@ -118451,6 +119462,7 @@ characters.data={ category="lu", description="LATIN CAPITAL LETTER INSULAR F", direction="l", + lccode=0xA77C, linebreak="al", unicodeslot=0xA77B, }, @@ -118465,6 +119477,7 @@ characters.data={ category="lu", description="LATIN CAPITAL LETTER INSULAR G", direction="l", + lccode=0x1D79, linebreak="al", unicodeslot=0xA77D, }, @@ -118472,6 +119485,7 @@ characters.data={ category="lu", description="LATIN CAPITAL LETTER TURNED INSULAR G", direction="l", + lccode=0xA77F, linebreak="al", unicodeslot=0xA77E, }, @@ -118486,6 +119500,7 @@ characters.data={ category="lu", description="LATIN CAPITAL LETTER TURNED L", direction="l", + lccode=0xA781, linebreak="al", unicodeslot=0xA780, }, @@ -118500,6 +119515,7 @@ characters.data={ category="lu", description="LATIN CAPITAL LETTER INSULAR R", direction="l", + lccode=0xA783, linebreak="al", unicodeslot=0xA782, }, @@ -118514,6 +119530,7 @@ characters.data={ category="lu", description="LATIN CAPITAL LETTER INSULAR S", direction="l", + lccode=0xA785, linebreak="al", unicodeslot=0xA784, }, @@ -118528,6 +119545,7 @@ characters.data={ category="lu", description="LATIN CAPITAL LETTER INSULAR T", direction="l", + lccode=0xA787, linebreak="al", unicodeslot=0xA786, }, @@ -118563,6 +119581,7 @@ characters.data={ category="lu", description="LATIN CAPITAL LETTER SALTILLO", direction="l", + lccode=0xA78C, linebreak="al", unicodeslot=0xA78B, }, @@ -118577,6 +119596,7 @@ characters.data={ category="lu", description="LATIN CAPITAL LETTER TURNED H", direction="l", + lccode=0x265, linebreak="al", unicodeslot=0xA78D, }, @@ -118598,6 +119618,7 @@ characters.data={ category="lu", description="LATIN CAPITAL LETTER N WITH DESCENDER", direction="l", + lccode=0xA791, linebreak="al", unicodeslot=0xA790, }, @@ -118612,6 +119633,7 @@ characters.data={ category="lu", description="LATIN CAPITAL LETTER C WITH BAR", direction="l", + lccode=0xA793, linebreak="al", unicodeslot=0xA792, }, @@ -118640,6 +119662,7 @@ characters.data={ category="lu", description="LATIN CAPITAL LETTER B WITH FLOURISH", direction="l", + lccode=0xA797, linebreak="al", unicodeslot=0xA796, }, @@ -118654,6 +119677,7 @@ characters.data={ category="lu", description="LATIN CAPITAL LETTER F WITH STROKE", direction="l", + lccode=0xA799, linebreak="al", specials={ "with", 0x46, 0x2F }, unicodeslot=0xA798, @@ -118670,6 +119694,7 @@ characters.data={ category="lu", description="LATIN CAPITAL LETTER VOLAPUK AE", direction="l", + lccode=0xA79B, linebreak="al", unicodeslot=0xA79A, }, @@ -118684,6 +119709,7 @@ characters.data={ category="lu", description="LATIN CAPITAL LETTER VOLAPUK OE", direction="l", + lccode=0xA79D, linebreak="al", unicodeslot=0xA79C, }, @@ -118698,6 +119724,7 @@ characters.data={ category="lu", description="LATIN CAPITAL LETTER VOLAPUK UE", direction="l", + lccode=0xA79F, linebreak="al", unicodeslot=0xA79E, }, @@ -118712,6 +119739,7 @@ characters.data={ category="lu", description="LATIN CAPITAL LETTER G WITH OBLIQUE STROKE", direction="l", + lccode=0xA7A1, linebreak="al", unicodeslot=0xA7A0, }, @@ -118726,6 +119754,7 @@ characters.data={ category="lu", description="LATIN CAPITAL LETTER K WITH OBLIQUE STROKE", direction="l", + lccode=0xA7A3, linebreak="al", unicodeslot=0xA7A2, }, @@ -118740,6 +119769,7 @@ characters.data={ category="lu", description="LATIN CAPITAL LETTER N WITH OBLIQUE STROKE", direction="l", + lccode=0xA7A5, linebreak="al", unicodeslot=0xA7A4, }, @@ -118754,6 +119784,7 @@ characters.data={ category="lu", description="LATIN CAPITAL LETTER R WITH OBLIQUE STROKE", direction="l", + lccode=0xA7A7, linebreak="al", unicodeslot=0xA7A6, }, @@ -118768,6 +119799,7 @@ characters.data={ category="lu", description="LATIN CAPITAL LETTER S WITH OBLIQUE STROKE", direction="l", + lccode=0xA7A9, linebreak="al", unicodeslot=0xA7A8, }, @@ -118782,6 +119814,7 @@ characters.data={ category="lu", description="LATIN CAPITAL LETTER H WITH HOOK", direction="l", + lccode=0x266, linebreak="al", specials={ "with", 0x48, 0x1FA9D }, unicodeslot=0xA7AA, @@ -118790,6 +119823,7 @@ characters.data={ category="lu", description="LATIN CAPITAL LETTER REVERSED OPEN E", direction="l", + lccode=0x25C, linebreak="al", unicodeslot=0xA7AB, }, @@ -118797,6 +119831,7 @@ characters.data={ category="lu", description="LATIN CAPITAL LETTER SCRIPT G", direction="l", + lccode=0x261, linebreak="al", unicodeslot=0xA7AC, }, @@ -118804,6 +119839,7 @@ characters.data={ category="lu", description="LATIN CAPITAL LETTER L WITH BELT", direction="l", + lccode=0x26C, linebreak="al", unicodeslot=0xA7AD, }, @@ -118811,6 +119847,7 @@ characters.data={ category="lu", description="LATIN CAPITAL LETTER SMALL CAPITAL I", direction="l", + lccode=0x26A, linebreak="al", unicodeslot=0xA7AE, }, @@ -118825,6 +119862,7 @@ characters.data={ category="lu", description="LATIN CAPITAL LETTER TURNED K", direction="l", + lccode=0x29E, linebreak="al", unicodeslot=0xA7B0, }, @@ -118832,6 +119870,7 @@ characters.data={ category="lu", description="LATIN CAPITAL LETTER TURNED T", direction="l", + lccode=0x287, linebreak="al", unicodeslot=0xA7B1, }, @@ -118839,6 +119878,7 @@ characters.data={ category="lu", description="LATIN CAPITAL LETTER J WITH CROSSED-TAIL", direction="l", + lccode=0x29D, linebreak="al", unicodeslot=0xA7B2, }, @@ -118846,6 +119886,7 @@ characters.data={ category="lu", description="LATIN CAPITAL LETTER CHI", direction="l", + lccode=0xAB53, linebreak="al", unicodeslot=0xA7B3, }, @@ -118853,6 +119894,7 @@ characters.data={ category="lu", description="LATIN CAPITAL LETTER BETA", direction="l", + lccode=0xA7B5, linebreak="al", unicodeslot=0xA7B4, }, @@ -118867,6 +119909,7 @@ characters.data={ category="lu", description="LATIN CAPITAL LETTER OMEGA", direction="l", + lccode=0xA7B7, linebreak="al", unicodeslot=0xA7B6, }, @@ -118881,6 +119924,7 @@ characters.data={ category="lu", description="LATIN CAPITAL LETTER U WITH STROKE", direction="l", + lccode=0xA7B9, linebreak="al", specials={ "with", 0x55, 0x2F }, unicodeslot=0xA7B8, @@ -118897,6 +119941,7 @@ characters.data={ category="lu", description="LATIN CAPITAL LETTER GLOTTAL A", direction="l", + lccode=0xA7BB, linebreak="al", unicodeslot=0xA7BA, }, @@ -118911,6 +119956,7 @@ characters.data={ category="lu", description="LATIN CAPITAL LETTER GLOTTAL I", direction="l", + lccode=0xA7BD, linebreak="al", unicodeslot=0xA7BC, }, @@ -118925,6 +119971,7 @@ characters.data={ category="lu", description="LATIN CAPITAL LETTER GLOTTAL U", direction="l", + lccode=0xA7BF, linebreak="al", unicodeslot=0xA7BE, }, @@ -118935,10 +119982,26 @@ characters.data={ linebreak="al", unicodeslot=0xA7BF, }, + [0xA7C0]={ + category="lu", + description="LATIN CAPITAL LETTER OLD POLISH O", + direction="l", + lccode=0xA7C1, + linebreak="al", + unicodeslot=0xA7C0, + }, + [0xA7C1]={ + category="ll", + description="LATIN SMALL LETTER OLD POLISH O", + direction="l", + linebreak="al", + unicodeslot=0xA7C1, + }, [0xA7C2]={ category="lu", description="LATIN CAPITAL LETTER ANGLICANA W", direction="l", + lccode=0xA7C3, linebreak="al", unicodeslot=0xA7C2, }, @@ -118953,6 +120016,7 @@ characters.data={ category="lu", description="LATIN CAPITAL LETTER C WITH PALATAL HOOK", direction="l", + lccode=0xA794, linebreak="al", unicodeslot=0xA7C4, }, @@ -118960,6 +120024,7 @@ characters.data={ category="lu", description="LATIN CAPITAL LETTER S WITH HOOK", direction="l", + lccode=0x282, linebreak="al", specials={ "with", 0x53, 0x1FA9D }, unicodeslot=0xA7C5, @@ -118968,6 +120033,7 @@ characters.data={ category="lu", description="LATIN CAPITAL LETTER Z WITH PALATAL HOOK", direction="l", + lccode=0x1D8E, linebreak="al", unicodeslot=0xA7C6, }, @@ -118975,6 +120041,7 @@ characters.data={ category="lu", description="LATIN CAPITAL LETTER D WITH SHORT STROKE OVERLAY", direction="l", + lccode=0xA7C8, linebreak="al", unicodeslot=0xA7C7, }, @@ -118989,6 +120056,7 @@ characters.data={ category="lu", description="LATIN CAPITAL LETTER S WITH SHORT STROKE OVERLAY", direction="l", + lccode=0xA7CA, linebreak="al", unicodeslot=0xA7C9, }, @@ -118999,10 +120067,94 @@ characters.data={ linebreak="al", unicodeslot=0xA7CA, }, + [0xA7D0]={ + category="lu", + description="LATIN CAPITAL LETTER CLOSED INSULAR G", + direction="l", + lccode=0xA7D1, + linebreak="al", + unicodeslot=0xA7D0, + }, + [0xA7D1]={ + category="ll", + description="LATIN SMALL LETTER CLOSED INSULAR G", + direction="l", + linebreak="al", + unicodeslot=0xA7D1, + }, + [0xA7D3]={ + category="ll", + description="LATIN SMALL LETTER DOUBLE THORN", + direction="l", + linebreak="al", + unicodeslot=0xA7D3, + }, + [0xA7D5]={ + category="ll", + description="LATIN SMALL LETTER DOUBLE WYNN", + direction="l", + linebreak="al", + unicodeslot=0xA7D5, + }, + [0xA7D6]={ + category="lu", + description="LATIN CAPITAL LETTER MIDDLE SCOTS S", + direction="l", + lccode=0xA7D7, + linebreak="al", + unicodeslot=0xA7D6, + }, + [0xA7D7]={ + category="ll", + description="LATIN SMALL LETTER MIDDLE SCOTS S", + direction="l", + linebreak="al", + unicodeslot=0xA7D7, + }, + [0xA7D8]={ + category="lu", + description="LATIN CAPITAL LETTER SIGMOID S", + direction="l", + lccode=0xA7D9, + linebreak="al", + unicodeslot=0xA7D8, + }, + [0xA7D9]={ + category="ll", + description="LATIN SMALL LETTER SIGMOID S", + direction="l", + linebreak="al", + unicodeslot=0xA7D9, + }, + [0xA7F2]={ + category="lm", + description="MODIFIER LETTER CAPITAL C", + direction="l", + linebreak="al", + specials={ "super", 0x43 }, + unicodeslot=0xA7F2, + }, + [0xA7F3]={ + category="lm", + description="MODIFIER LETTER CAPITAL F", + direction="l", + linebreak="al", + specials={ "super", 0x46 }, + unicodeslot=0xA7F3, + }, + [0xA7F4]={ + category="lm", + description="MODIFIER LETTER CAPITAL Q", + direction="l", + linebreak="al", + specials={ "super", 0x51 }, + unicodeslot=0xA7F4, + }, [0xA7F5]={ category="lu", description="LATIN CAPITAL LETTER REVERSED HALF H", direction="l", + lccode=0xA7F6, linebreak="al", unicodeslot=0xA7F5, }, @@ -123087,9 +124239,7 @@ characters.data={ indic="c", linebreak="sa", unicodeslot=0xAA60, - variants={ - [0xFE00]="dotted form", - }, + variants=variants_dotted, }, [0xAA61]={ category="lo", @@ -123098,9 +124248,7 @@ characters.data={ indic="c", linebreak="sa", unicodeslot=0xAA61, - variants={ - [0xFE00]="dotted form", - }, + variants=variants_dotted, }, [0xAA62]={ category="lo", @@ -123109,9 +124257,7 @@ characters.data={ indic="c", linebreak="sa", unicodeslot=0xAA62, - variants={ - [0xFE00]="dotted form", - }, + variants=variants_dotted, }, [0xAA63]={ category="lo", @@ -123120,9 +124266,7 @@ characters.data={ indic="c", linebreak="sa", unicodeslot=0xAA63, - variants={ - [0xFE00]="dotted form", - }, + variants=variants_dotted, }, [0xAA64]={ category="lo", @@ -123131,9 +124275,7 @@ characters.data={ indic="c", linebreak="sa", unicodeslot=0xAA64, - variants={ - [0xFE00]="dotted form", - }, + variants=variants_dotted, }, [0xAA65]={ category="lo", @@ -123142,9 +124284,7 @@ characters.data={ indic="c", linebreak="sa", unicodeslot=0xAA65, - variants={ - [0xFE00]="dotted form", - }, + variants=variants_dotted, }, [0xAA66]={ category="lo", @@ -123153,9 +124293,7 @@ characters.data={ indic="c", linebreak="sa", unicodeslot=0xAA66, - variants={ - [0xFE00]="dotted form", - }, + variants=variants_dotted, }, [0xAA67]={ category="lo", @@ -123195,9 +124333,7 @@ characters.data={ direction="l", linebreak="sa", unicodeslot=0xAA6B, - variants={ - [0xFE00]="dotted form", - }, + variants=variants_dotted, }, [0xAA6C]={ category="lo", @@ -123206,9 +124342,7 @@ characters.data={ indic="c", linebreak="sa", unicodeslot=0xAA6C, - variants={ - [0xFE00]="dotted form", - }, + variants=variants_dotted, }, [0xAA6D]={ category="lo", @@ -123233,9 +124367,7 @@ characters.data={ indic="c", linebreak="sa", unicodeslot=0xAA6F, - variants={ - [0xFE00]="dotted form", - }, + variants=variants_dotted, }, [0xAA70]={ category="lm", @@ -123324,9 +124456,7 @@ characters.data={ indic="c", linebreak="sa", unicodeslot=0xAA7A, - variants={ - [0xFE00]="dotted form", - }, + variants=variants_dotted, }, [0xAA7B]={ category="mc", @@ -124706,6 +125836,7 @@ characters.data={ description="CHEROKEE SMALL LETTER A", direction="l", linebreak="al", + uccode=0x13A0, unicodeslot=0xAB70, }, [0xAB71]={ @@ -124713,6 +125844,7 @@ characters.data={ description="CHEROKEE SMALL LETTER E", direction="l", linebreak="al", + uccode=0x13A1, unicodeslot=0xAB71, }, [0xAB72]={ @@ -124720,6 +125852,7 @@ characters.data={ description="CHEROKEE SMALL LETTER I", direction="l", linebreak="al", + uccode=0x13A2, unicodeslot=0xAB72, }, [0xAB73]={ @@ -124727,6 +125860,7 @@ characters.data={ description="CHEROKEE SMALL LETTER O", direction="l", linebreak="al", + uccode=0x13A3, unicodeslot=0xAB73, }, [0xAB74]={ @@ -124734,6 +125868,7 @@ characters.data={ description="CHEROKEE SMALL LETTER U", direction="l", linebreak="al", + uccode=0x13A4, unicodeslot=0xAB74, }, [0xAB75]={ @@ -124741,6 +125876,7 @@ characters.data={ description="CHEROKEE SMALL LETTER V", direction="l", linebreak="al", + uccode=0x13A5, unicodeslot=0xAB75, }, [0xAB76]={ @@ -124748,6 +125884,7 @@ characters.data={ description="CHEROKEE SMALL LETTER GA", direction="l", linebreak="al", + uccode=0x13A6, unicodeslot=0xAB76, }, [0xAB77]={ @@ -124755,6 +125892,7 @@ characters.data={ description="CHEROKEE SMALL LETTER KA", direction="l", linebreak="al", + uccode=0x13A7, unicodeslot=0xAB77, }, [0xAB78]={ @@ -124762,6 +125900,7 @@ characters.data={ description="CHEROKEE SMALL LETTER GE", direction="l", linebreak="al", + uccode=0x13A8, unicodeslot=0xAB78, }, [0xAB79]={ @@ -124769,6 +125908,7 @@ characters.data={ description="CHEROKEE SMALL LETTER GI", direction="l", linebreak="al", + uccode=0x13A9, unicodeslot=0xAB79, }, [0xAB7A]={ @@ -124776,6 +125916,7 @@ characters.data={ description="CHEROKEE SMALL LETTER GO", direction="l", linebreak="al", + uccode=0x13AA, unicodeslot=0xAB7A, }, [0xAB7B]={ @@ -124783,6 +125924,7 @@ characters.data={ description="CHEROKEE SMALL LETTER GU", direction="l", linebreak="al", + uccode=0x13AB, unicodeslot=0xAB7B, }, [0xAB7C]={ @@ -124790,6 +125932,7 @@ characters.data={ description="CHEROKEE SMALL LETTER GV", direction="l", linebreak="al", + uccode=0x13AC, unicodeslot=0xAB7C, }, [0xAB7D]={ @@ -124797,6 +125940,7 @@ characters.data={ description="CHEROKEE SMALL LETTER HA", direction="l", linebreak="al", + uccode=0x13AD, unicodeslot=0xAB7D, }, [0xAB7E]={ @@ -124804,6 +125948,7 @@ characters.data={ description="CHEROKEE SMALL LETTER HE", direction="l", linebreak="al", + uccode=0x13AE, unicodeslot=0xAB7E, }, [0xAB7F]={ @@ -124811,6 +125956,7 @@ characters.data={ description="CHEROKEE SMALL LETTER HI", direction="l", linebreak="al", + uccode=0x13AF, unicodeslot=0xAB7F, }, [0xAB80]={ @@ -124818,6 +125964,7 @@ characters.data={ description="CHEROKEE SMALL LETTER HO", direction="l", linebreak="al", + uccode=0x13B0, unicodeslot=0xAB80, }, [0xAB81]={ @@ -124825,6 +125972,7 @@ characters.data={ description="CHEROKEE SMALL LETTER HU", direction="l", linebreak="al", + uccode=0x13B1, unicodeslot=0xAB81, }, [0xAB82]={ @@ -124832,6 +125980,7 @@ characters.data={ description="CHEROKEE SMALL LETTER HV", direction="l", linebreak="al", + uccode=0x13B2, unicodeslot=0xAB82, }, [0xAB83]={ @@ -124839,6 +125988,7 @@ characters.data={ description="CHEROKEE SMALL LETTER LA", direction="l", linebreak="al", + uccode=0x13B3, unicodeslot=0xAB83, }, [0xAB84]={ @@ -124846,6 +125996,7 @@ characters.data={ description="CHEROKEE SMALL LETTER LE", direction="l", linebreak="al", + uccode=0x13B4, unicodeslot=0xAB84, }, [0xAB85]={ @@ -124853,6 +126004,7 @@ characters.data={ description="CHEROKEE SMALL LETTER LI", direction="l", linebreak="al", + uccode=0x13B5, unicodeslot=0xAB85, }, [0xAB86]={ @@ -124860,6 +126012,7 @@ characters.data={ description="CHEROKEE SMALL LETTER LO", direction="l", linebreak="al", + uccode=0x13B6, unicodeslot=0xAB86, }, [0xAB87]={ @@ -124867,6 +126020,7 @@ characters.data={ description="CHEROKEE SMALL LETTER LU", direction="l", linebreak="al", + uccode=0x13B7, unicodeslot=0xAB87, }, [0xAB88]={ @@ -124874,6 +126028,7 @@ characters.data={ description="CHEROKEE SMALL LETTER LV", direction="l", linebreak="al", + uccode=0x13B8, unicodeslot=0xAB88, }, [0xAB89]={ @@ -124881,6 +126036,7 @@ characters.data={ description="CHEROKEE SMALL LETTER MA", direction="l", linebreak="al", + uccode=0x13B9, unicodeslot=0xAB89, }, [0xAB8A]={ @@ -124888,6 +126044,7 @@ characters.data={ description="CHEROKEE SMALL LETTER ME", direction="l", linebreak="al", + uccode=0x13BA, unicodeslot=0xAB8A, }, [0xAB8B]={ @@ -124895,6 +126052,7 @@ characters.data={ description="CHEROKEE SMALL LETTER MI", direction="l", linebreak="al", + uccode=0x13BB, unicodeslot=0xAB8B, }, [0xAB8C]={ @@ -124902,6 +126060,7 @@ characters.data={ description="CHEROKEE SMALL LETTER MO", direction="l", linebreak="al", + uccode=0x13BC, unicodeslot=0xAB8C, }, [0xAB8D]={ @@ -124909,6 +126068,7 @@ characters.data={ description="CHEROKEE SMALL LETTER MU", direction="l", linebreak="al", + uccode=0x13BD, unicodeslot=0xAB8D, }, [0xAB8E]={ @@ -124916,6 +126076,7 @@ characters.data={ description="CHEROKEE SMALL LETTER NA", direction="l", linebreak="al", + uccode=0x13BE, unicodeslot=0xAB8E, }, [0xAB8F]={ @@ -124923,6 +126084,7 @@ characters.data={ description="CHEROKEE SMALL LETTER HNA", direction="l", linebreak="al", + uccode=0x13BF, unicodeslot=0xAB8F, }, [0xAB90]={ @@ -124930,6 +126092,7 @@ characters.data={ description="CHEROKEE SMALL LETTER NAH", direction="l", linebreak="al", + uccode=0x13C0, unicodeslot=0xAB90, }, [0xAB91]={ @@ -124937,6 +126100,7 @@ characters.data={ description="CHEROKEE SMALL LETTER NE", direction="l", linebreak="al", + uccode=0x13C1, unicodeslot=0xAB91, }, [0xAB92]={ @@ -124944,6 +126108,7 @@ characters.data={ description="CHEROKEE SMALL LETTER NI", direction="l", linebreak="al", + uccode=0x13C2, unicodeslot=0xAB92, }, [0xAB93]={ @@ -124951,6 +126116,7 @@ characters.data={ description="CHEROKEE SMALL LETTER NO", direction="l", linebreak="al", + uccode=0x13C3, unicodeslot=0xAB93, }, [0xAB94]={ @@ -124958,6 +126124,7 @@ characters.data={ description="CHEROKEE SMALL LETTER NU", direction="l", linebreak="al", + uccode=0x13C4, unicodeslot=0xAB94, }, [0xAB95]={ @@ -124965,6 +126132,7 @@ characters.data={ description="CHEROKEE SMALL LETTER NV", direction="l", linebreak="al", + uccode=0x13C5, unicodeslot=0xAB95, }, [0xAB96]={ @@ -124972,6 +126140,7 @@ characters.data={ description="CHEROKEE SMALL LETTER QUA", direction="l", linebreak="al", + uccode=0x13C6, unicodeslot=0xAB96, }, [0xAB97]={ @@ -124979,6 +126148,7 @@ characters.data={ description="CHEROKEE SMALL LETTER QUE", direction="l", linebreak="al", + uccode=0x13C7, unicodeslot=0xAB97, }, [0xAB98]={ @@ -124986,6 +126156,7 @@ characters.data={ description="CHEROKEE SMALL LETTER QUI", direction="l", linebreak="al", + uccode=0x13C8, unicodeslot=0xAB98, }, [0xAB99]={ @@ -124993,6 +126164,7 @@ characters.data={ description="CHEROKEE SMALL LETTER QUO", direction="l", linebreak="al", + uccode=0x13C9, unicodeslot=0xAB99, }, [0xAB9A]={ @@ -125000,6 +126172,7 @@ characters.data={ description="CHEROKEE SMALL LETTER QUU", direction="l", linebreak="al", + uccode=0x13CA, unicodeslot=0xAB9A, }, [0xAB9B]={ @@ -125007,6 +126180,7 @@ characters.data={ description="CHEROKEE SMALL LETTER QUV", direction="l", linebreak="al", + uccode=0x13CB, unicodeslot=0xAB9B, }, [0xAB9C]={ @@ -125014,6 +126188,7 @@ characters.data={ description="CHEROKEE SMALL LETTER SA", direction="l", linebreak="al", + uccode=0x13CC, unicodeslot=0xAB9C, }, [0xAB9D]={ @@ -125021,6 +126196,7 @@ characters.data={ description="CHEROKEE SMALL LETTER S", direction="l", linebreak="al", + uccode=0x13CD, unicodeslot=0xAB9D, }, [0xAB9E]={ @@ -125028,6 +126204,7 @@ characters.data={ description="CHEROKEE SMALL LETTER SE", direction="l", linebreak="al", + uccode=0x13CE, unicodeslot=0xAB9E, }, [0xAB9F]={ @@ -125035,6 +126212,7 @@ characters.data={ description="CHEROKEE SMALL LETTER SI", direction="l", linebreak="al", + uccode=0x13CF, unicodeslot=0xAB9F, }, [0xABA0]={ @@ -125042,6 +126220,7 @@ characters.data={ description="CHEROKEE SMALL LETTER SO", direction="l", linebreak="al", + uccode=0x13D0, unicodeslot=0xABA0, }, [0xABA1]={ @@ -125049,6 +126228,7 @@ characters.data={ description="CHEROKEE SMALL LETTER SU", direction="l", linebreak="al", + uccode=0x13D1, unicodeslot=0xABA1, }, [0xABA2]={ @@ -125056,6 +126236,7 @@ characters.data={ description="CHEROKEE SMALL LETTER SV", direction="l", linebreak="al", + uccode=0x13D2, unicodeslot=0xABA2, }, [0xABA3]={ @@ -125063,6 +126244,7 @@ characters.data={ description="CHEROKEE SMALL LETTER DA", direction="l", linebreak="al", + uccode=0x13D3, unicodeslot=0xABA3, }, [0xABA4]={ @@ -125070,6 +126252,7 @@ characters.data={ description="CHEROKEE SMALL LETTER TA", direction="l", linebreak="al", + uccode=0x13D4, unicodeslot=0xABA4, }, [0xABA5]={ @@ -125077,6 +126260,7 @@ characters.data={ description="CHEROKEE SMALL LETTER DE", direction="l", linebreak="al", + uccode=0x13D5, unicodeslot=0xABA5, }, [0xABA6]={ @@ -125084,6 +126268,7 @@ characters.data={ description="CHEROKEE SMALL LETTER TE", direction="l", linebreak="al", + uccode=0x13D6, unicodeslot=0xABA6, }, [0xABA7]={ @@ -125091,6 +126276,7 @@ characters.data={ description="CHEROKEE SMALL LETTER DI", direction="l", linebreak="al", + uccode=0x13D7, unicodeslot=0xABA7, }, [0xABA8]={ @@ -125098,6 +126284,7 @@ characters.data={ description="CHEROKEE SMALL LETTER TI", direction="l", linebreak="al", + uccode=0x13D8, unicodeslot=0xABA8, }, [0xABA9]={ @@ -125105,6 +126292,7 @@ characters.data={ description="CHEROKEE SMALL LETTER DO", direction="l", linebreak="al", + uccode=0x13D9, unicodeslot=0xABA9, }, [0xABAA]={ @@ -125112,6 +126300,7 @@ characters.data={ description="CHEROKEE SMALL LETTER DU", direction="l", linebreak="al", + uccode=0x13DA, unicodeslot=0xABAA, }, [0xABAB]={ @@ -125119,6 +126308,7 @@ characters.data={ description="CHEROKEE SMALL LETTER DV", direction="l", linebreak="al", + uccode=0x13DB, unicodeslot=0xABAB, }, [0xABAC]={ @@ -125126,6 +126316,7 @@ characters.data={ description="CHEROKEE SMALL LETTER DLA", direction="l", linebreak="al", + uccode=0x13DC, unicodeslot=0xABAC, }, [0xABAD]={ @@ -125133,6 +126324,7 @@ characters.data={ description="CHEROKEE SMALL LETTER TLA", direction="l", linebreak="al", + uccode=0x13DD, unicodeslot=0xABAD, }, [0xABAE]={ @@ -125140,6 +126332,7 @@ characters.data={ description="CHEROKEE SMALL LETTER TLE", direction="l", linebreak="al", + uccode=0x13DE, unicodeslot=0xABAE, }, [0xABAF]={ @@ -125147,6 +126340,7 @@ characters.data={ description="CHEROKEE SMALL LETTER TLI", direction="l", linebreak="al", + uccode=0x13DF, unicodeslot=0xABAF, }, [0xABB0]={ @@ -125154,6 +126348,7 @@ characters.data={ description="CHEROKEE SMALL LETTER TLO", direction="l", linebreak="al", + uccode=0x13E0, unicodeslot=0xABB0, }, [0xABB1]={ @@ -125161,6 +126356,7 @@ characters.data={ description="CHEROKEE SMALL LETTER TLU", direction="l", linebreak="al", + uccode=0x13E1, unicodeslot=0xABB1, }, [0xABB2]={ @@ -125168,6 +126364,7 @@ characters.data={ description="CHEROKEE SMALL LETTER TLV", direction="l", linebreak="al", + uccode=0x13E2, unicodeslot=0xABB2, }, [0xABB3]={ @@ -125175,6 +126372,7 @@ characters.data={ description="CHEROKEE SMALL LETTER TSA", direction="l", linebreak="al", + uccode=0x13E3, unicodeslot=0xABB3, }, [0xABB4]={ @@ -125182,6 +126380,7 @@ characters.data={ description="CHEROKEE SMALL LETTER TSE", direction="l", linebreak="al", + uccode=0x13E4, unicodeslot=0xABB4, }, [0xABB5]={ @@ -125189,6 +126388,7 @@ characters.data={ description="CHEROKEE SMALL LETTER TSI", direction="l", linebreak="al", + uccode=0x13E5, unicodeslot=0xABB5, }, [0xABB6]={ @@ -125196,6 +126396,7 @@ characters.data={ description="CHEROKEE SMALL LETTER TSO", direction="l", linebreak="al", + uccode=0x13E6, unicodeslot=0xABB6, }, [0xABB7]={ @@ -125203,6 +126404,7 @@ characters.data={ description="CHEROKEE SMALL LETTER TSU", direction="l", linebreak="al", + uccode=0x13E7, unicodeslot=0xABB7, }, [0xABB8]={ @@ -125210,6 +126412,7 @@ characters.data={ description="CHEROKEE SMALL LETTER TSV", direction="l", linebreak="al", + uccode=0x13E8, unicodeslot=0xABB8, }, [0xABB9]={ @@ -125217,6 +126420,7 @@ characters.data={ description="CHEROKEE SMALL LETTER WA", direction="l", linebreak="al", + uccode=0x13E9, unicodeslot=0xABB9, }, [0xABBA]={ @@ -125224,6 +126428,7 @@ characters.data={ description="CHEROKEE SMALL LETTER WE", direction="l", linebreak="al", + uccode=0x13EA, unicodeslot=0xABBA, }, [0xABBB]={ @@ -125231,6 +126436,7 @@ characters.data={ description="CHEROKEE SMALL LETTER WI", direction="l", linebreak="al", + uccode=0x13EB, unicodeslot=0xABBB, }, [0xABBC]={ @@ -125238,6 +126444,7 @@ characters.data={ description="CHEROKEE SMALL LETTER WO", direction="l", linebreak="al", + uccode=0x13EC, unicodeslot=0xABBC, }, [0xABBD]={ @@ -125245,6 +126452,7 @@ characters.data={ description="CHEROKEE SMALL LETTER WU", direction="l", linebreak="al", + uccode=0x13ED, unicodeslot=0xABBD, }, [0xABBE]={ @@ -125252,6 +126460,7 @@ characters.data={ description="CHEROKEE SMALL LETTER WV", direction="l", linebreak="al", + uccode=0x13EE, unicodeslot=0xABBE, }, [0xABBF]={ @@ -125259,6 +126468,7 @@ characters.data={ description="CHEROKEE SMALL LETTER YA", direction="l", linebreak="al", + uccode=0x13EF, unicodeslot=0xABBF, }, [0xABC0]={ @@ -130459,6 +131669,7 @@ characters.data={ direction="l", linebreak="al", specials={ "compat", 0x66, 0x66 }, + uccode={ 0x66, 0x66 }, unicodeslot=0xFB00, }, [0xFB01]={ @@ -130470,6 +131681,7 @@ characters.data={ linebreak="al", shcode={ 0x66, 0x69 }, specials={ "compat", 0x66, 0x69 }, + uccode={ 0x66, 0x69 }, unicodeslot=0xFB01, }, [0xFB02]={ @@ -130481,6 +131693,7 @@ characters.data={ linebreak="al", shcode={ 0x66, 0x6C }, specials={ "compat", 0x66, 0x6C }, + uccode={ 0x66, 0x6C }, unicodeslot=0xFB02, }, [0xFB03]={ @@ -130492,6 +131705,7 @@ characters.data={ linebreak="al", shcode={ 0x66, 0x69 }, specials={ "compat", 0x66, 0x66, 0x69 }, + uccode={ 0x66, 0x66, 0x69 }, unicodeslot=0xFB03, }, [0xFB04]={ @@ -130503,6 +131717,7 @@ characters.data={ linebreak="al", shcode={ 0x66, 0x6C }, specials={ "compat", 0x66, 0x66, 0x6C }, + uccode={ 0x66, 0x66, 0x6C }, unicodeslot=0xFB04, }, [0xFB05]={ @@ -130511,6 +131726,7 @@ characters.data={ direction="l", linebreak="al", specials={ "compat", 0x17F, 0x74 }, + uccode={ 0x73, 0x74 }, unicodeslot=0xFB05, }, [0xFB06]={ @@ -130521,6 +131737,7 @@ characters.data={ linebreak="al", shcode={ 0x73, 0x74 }, specials={ "compat", 0x73, 0x74 }, + uccode={ 0x73, 0x74 }, unicodeslot=0xFB06, }, [0xFB13]={ @@ -130529,6 +131746,7 @@ characters.data={ direction="l", linebreak="al", specials={ "compat", 0x574, 0x576 }, + uccode={ 0x574, 0x576 }, unicodeslot=0xFB13, }, [0xFB14]={ @@ -130537,6 +131755,7 @@ characters.data={ direction="l", linebreak="al", specials={ "compat", 0x574, 0x565 }, + uccode={ 0x574, 0x565 }, unicodeslot=0xFB14, }, [0xFB15]={ @@ -130545,6 +131764,7 @@ characters.data={ direction="l", linebreak="al", specials={ "compat", 0x574, 0x56B }, + uccode={ 0x574, 0x56B }, unicodeslot=0xFB15, }, [0xFB16]={ @@ -130553,6 +131773,7 @@ characters.data={ direction="l", linebreak="al", specials={ "compat", 0x57E, 0x576 }, + uccode={ 0x57E, 0x576 }, unicodeslot=0xFB16, }, [0xFB17]={ @@ -130561,6 +131782,7 @@ characters.data={ direction="l", linebreak="al", specials={ "compat", 0x574, 0x56D }, + uccode={ 0x574, 0x56D }, unicodeslot=0xFB17, }, [0xFB1D]={ @@ -131920,6 +133142,13 @@ characters.data={ linebreak="al", unicodeslot=0xFBC1, }, + [0xFBC2]={ + category="sk", + description="ARABIC SYMBOL WASLA ABOVE", + direction="al", + linebreak="al", + unicodeslot=0xFBC2, + }, [0xFBD3]={ category="lo", description="ARABIC LETTER NG ISOLATED FORM", @@ -134872,6 +136101,118 @@ characters.data={ linebreak="op", unicodeslot=0xFD3F, }, + [0xFD40]={ + category="so", + description="ARABIC LIGATURE RAHIMAHU ALLAAH", + direction="on", + linebreak="al", + unicodeslot=0xFD40, + }, + [0xFD41]={ + category="so", + description="ARABIC LIGATURE RADI ALLAAHU ANH", + direction="on", + linebreak="al", + unicodeslot=0xFD41, + }, + [0xFD42]={ + category="so", + description="ARABIC LIGATURE RADI ALLAAHU ANHAA", + direction="on", + linebreak="al", + unicodeslot=0xFD42, + }, + [0xFD43]={ + category="so", + description="ARABIC LIGATURE RADI ALLAAHU ANHUM", + direction="on", + linebreak="al", + unicodeslot=0xFD43, + }, + [0xFD44]={ + category="so", + description="ARABIC LIGATURE RADI ALLAAHU ANHUMAA", + direction="on", + linebreak="al", + unicodeslot=0xFD44, + }, + [0xFD45]={ + category="so", + description="ARABIC LIGATURE RADI ALLAAHU ANHUNNA", + direction="on", + linebreak="al", + unicodeslot=0xFD45, + }, + [0xFD46]={ + category="so", + description="ARABIC LIGATURE SALLALLAAHU ALAYHI WA-AALIH", + direction="on", + linebreak="al", + unicodeslot=0xFD46, + }, + [0xFD47]={ + category="so", + description="ARABIC LIGATURE ALAYHI AS-SALAAM", + direction="on", + linebreak="al", + unicodeslot=0xFD47, + }, + [0xFD48]={ + category="so", + description="ARABIC LIGATURE ALAYHIM AS-SALAAM", + direction="on", + linebreak="al", + unicodeslot=0xFD48, + }, + [0xFD49]={ + category="so", + description="ARABIC LIGATURE ALAYHIMAA AS-SALAAM", + direction="on", + linebreak="al", + unicodeslot=0xFD49, + }, + [0xFD4A]={ + category="so", + description="ARABIC LIGATURE ALAYHI AS-SALAATU WAS-SALAAM", + direction="on", + linebreak="al", + unicodeslot=0xFD4A, + }, + [0xFD4B]={ + category="so", + description="ARABIC LIGATURE QUDDISA SIRRAH", + direction="on", + linebreak="al", + unicodeslot=0xFD4B, + }, + [0xFD4C]={ + category="so", + description="ARABIC LIGATURE SALLALLAHU ALAYHI WAAALIHEE WA-SALLAM", + direction="on", + linebreak="al", + unicodeslot=0xFD4C, + }, + [0xFD4D]={ + category="so", + description="ARABIC LIGATURE ALAYHAA AS-SALAAM", + direction="on", + linebreak="al", + unicodeslot=0xFD4D, + }, + [0xFD4E]={ + category="so", + description="ARABIC LIGATURE TABAARAKA WA-TAAALAA", + direction="on", + linebreak="al", + unicodeslot=0xFD4E, + }, + [0xFD4F]={ + category="so", + description="ARABIC LIGATURE RAHIMAHUM ALLAAH", + direction="on", + linebreak="al", + unicodeslot=0xFD4F, + }, [0xFD50]={ category="lo", description="ARABIC LIGATURE TEH WITH JEEM WITH MEEM INITIAL FORM", @@ -135817,6 +137158,13 @@ characters.data={ specials={ "final", 0x646, 0x62C, 0x64A }, unicodeslot=0xFDC7, }, + [0xFDCF]={ + category="so", + description="ARABIC LIGATURE SALAAMUHU ALAYNAA", + direction="on", + linebreak="al", + unicodeslot=0xFDCF, + }, [0xFDF0]={ category="lo", contextname="arabicsalla", @@ -135945,6 +137293,20 @@ characters.data={ linebreak="al", unicodeslot=0xFDFD, }, + [0xFDFE]={ + category="so", + description="ARABIC LIGATURE SUBHAANAHU WA TAAALAA", + direction="on", + linebreak="al", + unicodeslot=0xFDFE, + }, + [0xFDFF]={ + category="so", + description="ARABIC LIGATURE AZZA WA JALL", + direction="on", + linebreak="al", + unicodeslot=0xFDFF, + }, [0xFE00]={ description="VARIATION SELECTOR-0x0001", synonyms={ "vs1" }, @@ -136038,6 +137400,7 @@ characters.data={ description="PRESENTATION FORM FOR VERTICAL HORIZONTAL ELLIPSIS", direction="on", linebreak="in", + mathclass="ellipsis", specials={ "vertical", 0x2026 }, unicodeslot=0xFE19, }, @@ -146536,6 +147899,7 @@ characters.data={ category="lu", description="OSAGE CAPITAL LETTER A", direction="l", + lccode=0x104D8, linebreak="al", unicodeslot=0x104B0, }, @@ -146543,6 +147907,7 @@ characters.data={ category="lu", description="OSAGE CAPITAL LETTER AI", direction="l", + lccode=0x104D9, linebreak="al", unicodeslot=0x104B1, }, @@ -146550,6 +147915,7 @@ characters.data={ category="lu", description="OSAGE CAPITAL LETTER AIN", direction="l", + lccode=0x104DA, linebreak="al", unicodeslot=0x104B2, }, @@ -146557,6 +147923,7 @@ characters.data={ category="lu", description="OSAGE CAPITAL LETTER AH", direction="l", + lccode=0x104DB, linebreak="al", unicodeslot=0x104B3, }, @@ -146564,6 +147931,7 @@ characters.data={ category="lu", description="OSAGE CAPITAL LETTER BRA", direction="l", + lccode=0x104DC, linebreak="al", unicodeslot=0x104B4, }, @@ -146571,6 +147939,7 @@ characters.data={ category="lu", description="OSAGE CAPITAL LETTER CHA", direction="l", + lccode=0x104DD, linebreak="al", unicodeslot=0x104B5, }, @@ -146578,6 +147947,7 @@ characters.data={ category="lu", description="OSAGE CAPITAL LETTER EHCHA", direction="l", + lccode=0x104DE, linebreak="al", unicodeslot=0x104B6, }, @@ -146585,6 +147955,7 @@ characters.data={ category="lu", description="OSAGE CAPITAL LETTER E", direction="l", + lccode=0x104DF, linebreak="al", unicodeslot=0x104B7, }, @@ -146592,6 +147963,7 @@ characters.data={ category="lu", description="OSAGE CAPITAL LETTER EIN", direction="l", + lccode=0x104E0, linebreak="al", unicodeslot=0x104B8, }, @@ -146599,6 +147971,7 @@ characters.data={ category="lu", description="OSAGE CAPITAL LETTER HA", direction="l", + lccode=0x104E1, linebreak="al", unicodeslot=0x104B9, }, @@ -146606,6 +147979,7 @@ characters.data={ category="lu", description="OSAGE CAPITAL LETTER HYA", direction="l", + lccode=0x104E2, linebreak="al", unicodeslot=0x104BA, }, @@ -146613,6 +147987,7 @@ characters.data={ category="lu", description="OSAGE CAPITAL LETTER I", direction="l", + lccode=0x104E3, linebreak="al", unicodeslot=0x104BB, }, @@ -146620,6 +147995,7 @@ characters.data={ category="lu", description="OSAGE CAPITAL LETTER KA", direction="l", + lccode=0x104E4, linebreak="al", unicodeslot=0x104BC, }, @@ -146627,6 +148003,7 @@ characters.data={ category="lu", description="OSAGE CAPITAL LETTER EHKA", direction="l", + lccode=0x104E5, linebreak="al", unicodeslot=0x104BD, }, @@ -146634,6 +148011,7 @@ characters.data={ category="lu", description="OSAGE CAPITAL LETTER KYA", direction="l", + lccode=0x104E6, linebreak="al", unicodeslot=0x104BE, }, @@ -146641,6 +148019,7 @@ characters.data={ category="lu", description="OSAGE CAPITAL LETTER LA", direction="l", + lccode=0x104E7, linebreak="al", unicodeslot=0x104BF, }, @@ -146648,6 +148027,7 @@ characters.data={ category="lu", description="OSAGE CAPITAL LETTER MA", direction="l", + lccode=0x104E8, linebreak="al", unicodeslot=0x104C0, }, @@ -146655,6 +148035,7 @@ characters.data={ category="lu", description="OSAGE CAPITAL LETTER NA", direction="l", + lccode=0x104E9, linebreak="al", unicodeslot=0x104C1, }, @@ -146662,6 +148043,7 @@ characters.data={ category="lu", description="OSAGE CAPITAL LETTER O", direction="l", + lccode=0x104EA, linebreak="al", unicodeslot=0x104C2, }, @@ -146669,6 +148051,7 @@ characters.data={ category="lu", description="OSAGE CAPITAL LETTER OIN", direction="l", + lccode=0x104EB, linebreak="al", unicodeslot=0x104C3, }, @@ -146676,6 +148059,7 @@ characters.data={ category="lu", description="OSAGE CAPITAL LETTER PA", direction="l", + lccode=0x104EC, linebreak="al", unicodeslot=0x104C4, }, @@ -146683,6 +148067,7 @@ characters.data={ category="lu", description="OSAGE CAPITAL LETTER EHPA", direction="l", + lccode=0x104ED, linebreak="al", unicodeslot=0x104C5, }, @@ -146690,6 +148075,7 @@ characters.data={ category="lu", description="OSAGE CAPITAL LETTER SA", direction="l", + lccode=0x104EE, linebreak="al", unicodeslot=0x104C6, }, @@ -146697,6 +148083,7 @@ characters.data={ category="lu", description="OSAGE CAPITAL LETTER SHA", direction="l", + lccode=0x104EF, linebreak="al", unicodeslot=0x104C7, }, @@ -146704,6 +148091,7 @@ characters.data={ category="lu", description="OSAGE CAPITAL LETTER TA", direction="l", + lccode=0x104F0, linebreak="al", unicodeslot=0x104C8, }, @@ -146711,6 +148099,7 @@ characters.data={ category="lu", description="OSAGE CAPITAL LETTER EHTA", direction="l", + lccode=0x104F1, linebreak="al", unicodeslot=0x104C9, }, @@ -146718,6 +148107,7 @@ characters.data={ category="lu", description="OSAGE CAPITAL LETTER TSA", direction="l", + lccode=0x104F2, linebreak="al", unicodeslot=0x104CA, }, @@ -146725,6 +148115,7 @@ characters.data={ category="lu", description="OSAGE CAPITAL LETTER EHTSA", direction="l", + lccode=0x104F3, linebreak="al", unicodeslot=0x104CB, }, @@ -146732,6 +148123,7 @@ characters.data={ category="lu", description="OSAGE CAPITAL LETTER TSHA", direction="l", + lccode=0x104F4, linebreak="al", unicodeslot=0x104CC, }, @@ -146739,6 +148131,7 @@ characters.data={ category="lu", description="OSAGE CAPITAL LETTER DHA", direction="l", + lccode=0x104F5, linebreak="al", unicodeslot=0x104CD, }, @@ -146746,6 +148139,7 @@ characters.data={ category="lu", description="OSAGE CAPITAL LETTER U", direction="l", + lccode=0x104F6, linebreak="al", unicodeslot=0x104CE, }, @@ -146753,6 +148147,7 @@ characters.data={ category="lu", description="OSAGE CAPITAL LETTER WA", direction="l", + lccode=0x104F7, linebreak="al", unicodeslot=0x104CF, }, @@ -146760,6 +148155,7 @@ characters.data={ category="lu", description="OSAGE CAPITAL LETTER KHA", direction="l", + lccode=0x104F8, linebreak="al", unicodeslot=0x104D0, }, @@ -146767,6 +148163,7 @@ characters.data={ category="lu", description="OSAGE CAPITAL LETTER GHA", direction="l", + lccode=0x104F9, linebreak="al", unicodeslot=0x104D1, }, @@ -146774,6 +148171,7 @@ characters.data={ category="lu", description="OSAGE CAPITAL LETTER ZA", direction="l", + lccode=0x104FA, linebreak="al", unicodeslot=0x104D2, }, @@ -146781,6 +148179,7 @@ characters.data={ category="lu", description="OSAGE CAPITAL LETTER ZHA", direction="l", + lccode=0x104FB, linebreak="al", unicodeslot=0x104D3, }, @@ -147687,6 +149086,531 @@ characters.data={ linebreak="al", unicodeslot=0x1056F, }, + [0x10570]={ + category="lu", + description="VITHKUQI CAPITAL LETTER A", + direction="l", + lccode=0x10597, + linebreak="al", + unicodeslot=0x10570, + }, + [0x10571]={ + category="lu", + description="VITHKUQI CAPITAL LETTER BBE", + direction="l", + lccode=0x10598, + linebreak="al", + unicodeslot=0x10571, + }, + [0x10572]={ + category="lu", + description="VITHKUQI CAPITAL LETTER BE", + direction="l", + lccode=0x10599, + linebreak="al", + unicodeslot=0x10572, + }, + [0x10573]={ + category="lu", + description="VITHKUQI CAPITAL LETTER CE", + direction="l", + lccode=0x1059A, + linebreak="al", + unicodeslot=0x10573, + }, + [0x10574]={ + category="lu", + description="VITHKUQI CAPITAL LETTER CHE", + direction="l", + lccode=0x1059B, + linebreak="al", + unicodeslot=0x10574, + }, + [0x10575]={ + category="lu", + description="VITHKUQI CAPITAL LETTER DE", + direction="l", + lccode=0x1059C, + linebreak="al", + unicodeslot=0x10575, + }, + [0x10576]={ + category="lu", + description="VITHKUQI CAPITAL LETTER DHE", + direction="l", + lccode=0x1059D, + linebreak="al", + unicodeslot=0x10576, + }, + [0x10577]={ + category="lu", + description="VITHKUQI CAPITAL LETTER EI", + direction="l", + lccode=0x1059E, + linebreak="al", + unicodeslot=0x10577, + }, + [0x10578]={ + category="lu", + description="VITHKUQI CAPITAL LETTER E", + direction="l", + lccode=0x1059F, + linebreak="al", + unicodeslot=0x10578, + }, + [0x10579]={ + category="lu", + description="VITHKUQI CAPITAL LETTER FE", + direction="l", + lccode=0x105A0, + linebreak="al", + unicodeslot=0x10579, + }, + [0x1057A]={ + category="lu", + description="VITHKUQI CAPITAL LETTER GA", + direction="l", + lccode=0x105A1, + linebreak="al", + unicodeslot=0x1057A, + }, + [0x1057C]={ + category="lu", + description="VITHKUQI CAPITAL LETTER HA", + direction="l", + lccode=0x105A3, + linebreak="al", + unicodeslot=0x1057C, + }, + [0x1057D]={ + category="lu", + description="VITHKUQI CAPITAL LETTER HHA", + direction="l", + lccode=0x105A4, + linebreak="al", + unicodeslot=0x1057D, + }, + [0x1057E]={ + category="lu", + description="VITHKUQI CAPITAL LETTER I", + direction="l", + lccode=0x105A5, + linebreak="al", + unicodeslot=0x1057E, + }, + [0x1057F]={ + category="lu", + description="VITHKUQI CAPITAL LETTER IJE", + direction="l", + lccode=0x105A6, + linebreak="al", + unicodeslot=0x1057F, + }, + [0x10580]={ + category="lu", + description="VITHKUQI CAPITAL LETTER JE", + direction="l", + lccode=0x105A7, + linebreak="al", + unicodeslot=0x10580, + }, + [0x10581]={ + category="lu", + description="VITHKUQI CAPITAL LETTER KA", + direction="l", + lccode=0x105A8, + linebreak="al", + unicodeslot=0x10581, + }, + [0x10582]={ + category="lu", + description="VITHKUQI CAPITAL LETTER LA", + direction="l", + lccode=0x105A9, + linebreak="al", + unicodeslot=0x10582, + }, + [0x10583]={ + category="lu", + description="VITHKUQI CAPITAL LETTER LLA", + direction="l", + lccode=0x105AA, + linebreak="al", + unicodeslot=0x10583, + }, + [0x10584]={ + category="lu", + description="VITHKUQI CAPITAL LETTER ME", + direction="l", + lccode=0x105AB, + linebreak="al", + unicodeslot=0x10584, + }, + [0x10585]={ + category="lu", + description="VITHKUQI CAPITAL LETTER NE", + direction="l", + lccode=0x105AC, + linebreak="al", + unicodeslot=0x10585, + }, + [0x10586]={ + category="lu", + description="VITHKUQI CAPITAL LETTER NJE", + direction="l", + lccode=0x105AD, + linebreak="al", + unicodeslot=0x10586, + }, + [0x10587]={ + category="lu", + description="VITHKUQI CAPITAL LETTER O", + direction="l", + lccode=0x105AE, + linebreak="al", + unicodeslot=0x10587, + }, + [0x10588]={ + category="lu", + description="VITHKUQI CAPITAL LETTER PE", + direction="l", + lccode=0x105AF, + linebreak="al", + unicodeslot=0x10588, + }, + [0x10589]={ + category="lu", + description="VITHKUQI CAPITAL LETTER QA", + direction="l", + lccode=0x105B0, + linebreak="al", + unicodeslot=0x10589, + }, + [0x1058A]={ + category="lu", + description="VITHKUQI CAPITAL LETTER RE", + direction="l", + lccode=0x105B1, + linebreak="al", + unicodeslot=0x1058A, + }, + [0x1058C]={ + category="lu", + description="VITHKUQI CAPITAL LETTER SE", + direction="l", + lccode=0x105B3, + linebreak="al", + unicodeslot=0x1058C, + }, + [0x1058D]={ + category="lu", + description="VITHKUQI CAPITAL LETTER SHE", + direction="l", + lccode=0x105B4, + linebreak="al", + unicodeslot=0x1058D, + }, + [0x1058E]={ + category="lu", + description="VITHKUQI CAPITAL LETTER TE", + direction="l", + lccode=0x105B5, + linebreak="al", + unicodeslot=0x1058E, + }, + [0x1058F]={ + category="lu", + description="VITHKUQI CAPITAL LETTER THE", + direction="l", + lccode=0x105B6, + linebreak="al", + unicodeslot=0x1058F, + }, + [0x10590]={ + category="lu", + description="VITHKUQI CAPITAL LETTER U", + direction="l", + lccode=0x105B7, + linebreak="al", + unicodeslot=0x10590, + }, + [0x10591]={ + category="lu", + description="VITHKUQI CAPITAL LETTER VE", + direction="l", + lccode=0x105B8, + linebreak="al", + unicodeslot=0x10591, + }, + [0x10592]={ + category="lu", + description="VITHKUQI CAPITAL LETTER XE", + direction="l", + lccode=0x105B9, + linebreak="al", + unicodeslot=0x10592, + }, + [0x10594]={ + category="lu", + description="VITHKUQI CAPITAL LETTER Y", + direction="l", + lccode=0x105BB, + linebreak="al", + unicodeslot=0x10594, + }, + [0x10595]={ + category="lu", + description="VITHKUQI CAPITAL LETTER ZE", + direction="l", + lccode=0x105BC, + linebreak="al", + unicodeslot=0x10595, + }, + [0x10597]={ + category="ll", + description="VITHKUQI SMALL LETTER A", + direction="l", + linebreak="al", + unicodeslot=0x10597, + }, + [0x10598]={ + category="ll", + description="VITHKUQI SMALL LETTER BBE", + direction="l", + linebreak="al", + unicodeslot=0x10598, + }, + [0x10599]={ + category="ll", + description="VITHKUQI SMALL LETTER BE", + direction="l", + linebreak="al", + unicodeslot=0x10599, + }, + [0x1059A]={ + category="ll", + description="VITHKUQI SMALL LETTER CE", + direction="l", + linebreak="al", + unicodeslot=0x1059A, + }, + [0x1059B]={ + category="ll", + description="VITHKUQI SMALL LETTER CHE", + direction="l", + linebreak="al", + unicodeslot=0x1059B, + }, + [0x1059C]={ + category="ll", + description="VITHKUQI SMALL LETTER DE", + direction="l", + linebreak="al", + unicodeslot=0x1059C, + }, + [0x1059D]={ + category="ll", + description="VITHKUQI SMALL LETTER DHE", + direction="l", + linebreak="al", + unicodeslot=0x1059D, + }, + [0x1059E]={ + category="ll", + description="VITHKUQI SMALL LETTER EI", + direction="l", + linebreak="al", + unicodeslot=0x1059E, + }, + [0x1059F]={ + category="ll", + description="VITHKUQI SMALL LETTER E", + direction="l", + linebreak="al", + unicodeslot=0x1059F, + }, + [0x105A0]={ + category="ll", + description="VITHKUQI SMALL LETTER FE", + direction="l", + linebreak="al", + unicodeslot=0x105A0, + }, + [0x105A1]={ + category="ll", + description="VITHKUQI SMALL LETTER GA", + direction="l", + linebreak="al", + unicodeslot=0x105A1, + }, + [0x105A3]={ + category="ll", + description="VITHKUQI SMALL LETTER HA", + direction="l", + linebreak="al", + unicodeslot=0x105A3, + }, + [0x105A4]={ + category="ll", + description="VITHKUQI SMALL LETTER HHA", + direction="l", + linebreak="al", + unicodeslot=0x105A4, + }, + [0x105A5]={ + category="ll", + description="VITHKUQI SMALL LETTER I", + direction="l", + linebreak="al", + unicodeslot=0x105A5, + }, + [0x105A6]={ + category="ll", + description="VITHKUQI SMALL LETTER IJE", + direction="l", + linebreak="al", + unicodeslot=0x105A6, + }, + [0x105A7]={ + category="ll", + description="VITHKUQI SMALL LETTER JE", + direction="l", + linebreak="al", + unicodeslot=0x105A7, + }, + [0x105A8]={ + category="ll", + description="VITHKUQI SMALL LETTER KA", + direction="l", + linebreak="al", + unicodeslot=0x105A8, + }, + [0x105A9]={ + category="ll", + description="VITHKUQI SMALL LETTER LA", + direction="l", + linebreak="al", + unicodeslot=0x105A9, + }, + [0x105AA]={ + category="ll", + description="VITHKUQI SMALL LETTER LLA", + direction="l", + linebreak="al", + unicodeslot=0x105AA, + }, + [0x105AB]={ + category="ll", + description="VITHKUQI SMALL LETTER ME", + direction="l", + linebreak="al", + unicodeslot=0x105AB, + }, + [0x105AC]={ + category="ll", + description="VITHKUQI SMALL LETTER NE", + direction="l", + linebreak="al", + unicodeslot=0x105AC, + }, + [0x105AD]={ + category="ll", + description="VITHKUQI SMALL LETTER NJE", + direction="l", + linebreak="al", + unicodeslot=0x105AD, + }, + [0x105AE]={ + category="ll", + description="VITHKUQI SMALL LETTER O", + direction="l", + linebreak="al", + unicodeslot=0x105AE, + }, + [0x105AF]={ + category="ll", + description="VITHKUQI SMALL LETTER PE", + direction="l", + linebreak="al", + unicodeslot=0x105AF, + }, + [0x105B0]={ + category="ll", + description="VITHKUQI SMALL LETTER QA", + direction="l", + linebreak="al", + unicodeslot=0x105B0, + }, + [0x105B1]={ + category="ll", + description="VITHKUQI SMALL LETTER RE", + direction="l", + linebreak="al", + unicodeslot=0x105B1, + }, + [0x105B3]={ + category="ll", + description="VITHKUQI SMALL LETTER SE", + direction="l", + linebreak="al", + unicodeslot=0x105B3, + }, + [0x105B4]={ + category="ll", + description="VITHKUQI SMALL LETTER SHE", + direction="l", + linebreak="al", + unicodeslot=0x105B4, + }, + [0x105B5]={ + category="ll", + description="VITHKUQI SMALL LETTER TE", + direction="l", + linebreak="al", + unicodeslot=0x105B5, + }, + [0x105B6]={ + category="ll", + description="VITHKUQI SMALL LETTER THE", + direction="l", + linebreak="al", + unicodeslot=0x105B6, + }, + [0x105B7]={ + category="ll", + description="VITHKUQI SMALL LETTER U", + direction="l", + linebreak="al", + unicodeslot=0x105B7, + }, + [0x105B8]={ + category="ll", + description="VITHKUQI SMALL LETTER VE", + direction="l", + linebreak="al", + unicodeslot=0x105B8, + }, + [0x105B9]={ + category="ll", + description="VITHKUQI SMALL LETTER XE", + direction="l", + linebreak="al", + unicodeslot=0x105B9, + }, + [0x105BB]={ + category="ll", + description="VITHKUQI SMALL LETTER Y", + direction="l", + linebreak="al", + unicodeslot=0x105BB, + }, + [0x105BC]={ + category="ll", + description="VITHKUQI SMALL LETTER ZE", + direction="l", + linebreak="al", + unicodeslot=0x105BC, + }, [0x10600]={ category="lo", description="LINEAR A SIGN AB001", @@ -150074,6 +151998,461 @@ characters.data={ linebreak="al", unicodeslot=0x10767, }, + [0x10780]={ + category="lm", + description="MODIFIER LETTER SMALL CAPITAL AA", + direction="l", + linebreak="al", + unicodeslot=0x10780, + }, + [0x10781]={ + category="lm", + description="MODIFIER LETTER SUPERSCRIPT TRIANGULAR COLON", + direction="l", + linebreak="al", + specials={ "super", 0x2D0 }, + unicodeslot=0x10781, + }, + [0x10782]={ + category="lm", + description="MODIFIER LETTER SUPERSCRIPT HALF TRIANGULAR COLON", + direction="l", + linebreak="al", + specials={ "super", 0x2D1 }, + unicodeslot=0x10782, + }, + [0x10783]={ + category="lm", + description="MODIFIER LETTER SMALL AE", + direction="l", + linebreak="al", + specials={ "super", 0xE6 }, + unicodeslot=0x10783, + }, + [0x10784]={ + category="lm", + description="MODIFIER LETTER SMALL CAPITAL B", + direction="l", + linebreak="al", + specials={ "super", 0x299 }, + unicodeslot=0x10784, + }, + [0x10785]={ + category="lm", + description="MODIFIER LETTER SMALL B WITH HOOK", + direction="l", + linebreak="al", + specials={ "super", 0x253 }, + unicodeslot=0x10785, + }, + [0x10787]={ + category="lm", + description="MODIFIER LETTER SMALL DZ DIGRAPH", + direction="l", + linebreak="al", + specials={ "super", 0x2A3 }, + unicodeslot=0x10787, + }, + [0x10788]={ + category="lm", + description="MODIFIER LETTER SMALL DZ DIGRAPH WITH RETROFLEX HOOK", + direction="l", + linebreak="al", + specials={ "super", 0xAB66 }, + unicodeslot=0x10788, + }, + [0x10789]={ + category="lm", + description="MODIFIER LETTER SMALL DZ DIGRAPH WITH CURL", + direction="l", + linebreak="al", + specials={ "super", 0x2A5 }, + unicodeslot=0x10789, + }, + [0x1078A]={ + category="lm", + description="MODIFIER LETTER SMALL DEZH DIGRAPH", + direction="l", + linebreak="al", + specials={ "super", 0x2A4 }, + unicodeslot=0x1078A, + }, + [0x1078B]={ + category="lm", + description="MODIFIER LETTER SMALL D WITH TAIL", + direction="l", + linebreak="al", + specials={ "super", 0x256 }, + unicodeslot=0x1078B, + }, + [0x1078C]={ + category="lm", + description="MODIFIER LETTER SMALL D WITH HOOK", + direction="l", + linebreak="al", + specials={ "super", 0x257 }, + unicodeslot=0x1078C, + }, + [0x1078D]={ + category="lm", + description="MODIFIER LETTER SMALL D WITH HOOK AND TAIL", + direction="l", + linebreak="al", + specials={ "super", 0x1D91 }, + unicodeslot=0x1078D, + }, + [0x1078E]={ + category="lm", + description="MODIFIER LETTER SMALL REVERSED E", + direction="l", + linebreak="al", + specials={ "super", 0x258 }, + unicodeslot=0x1078E, + }, + [0x1078F]={ + category="lm", + description="MODIFIER LETTER SMALL CLOSED REVERSED OPEN E", + direction="l", + linebreak="al", + specials={ "super", 0x25E }, + unicodeslot=0x1078F, + }, + [0x10790]={ + category="lm", + description="MODIFIER LETTER SMALL FENG DIGRAPH", + direction="l", + linebreak="al", + specials={ "super", 0x2A9 }, + unicodeslot=0x10790, + }, + [0x10791]={ + category="lm", + description="MODIFIER LETTER SMALL RAMS HORN", + direction="l", + linebreak="al", + specials={ "super", 0x264 }, + unicodeslot=0x10791, + }, + [0x10792]={ + category="lm", + description="MODIFIER LETTER SMALL CAPITAL G", + direction="l", + linebreak="al", + specials={ "super", 0x262 }, + unicodeslot=0x10792, + }, + [0x10793]={ + category="lm", + description="MODIFIER LETTER SMALL G WITH HOOK", + direction="l", + linebreak="al", + specials={ "super", 0x260 }, + unicodeslot=0x10793, + }, + [0x10794]={ + category="lm", + description="MODIFIER LETTER SMALL CAPITAL G WITH HOOK", + direction="l", + linebreak="al", + specials={ "super", 0x29B }, + unicodeslot=0x10794, + }, + [0x10795]={ + category="lm", + description="MODIFIER LETTER SMALL H WITH STROKE", + direction="l", + linebreak="al", + specials={ "super", 0x127 }, + unicodeslot=0x10795, + }, + [0x10796]={ + category="lm", + description="MODIFIER LETTER SMALL CAPITAL H", + direction="l", + linebreak="al", + specials={ "super", 0x29C }, + unicodeslot=0x10796, + }, + [0x10797]={ + category="lm", + description="MODIFIER LETTER SMALL HENG WITH HOOK", + direction="l", + linebreak="al", + specials={ "super", 0x267 }, + unicodeslot=0x10797, + }, + [0x10798]={ + category="lm", + description="MODIFIER LETTER SMALL DOTLESS J WITH STROKE AND HOOK", + direction="l", + linebreak="al", + specials={ "super", 0x284 }, + unicodeslot=0x10798, + }, + [0x10799]={ + category="lm", + description="MODIFIER LETTER SMALL LS DIGRAPH", + direction="l", + linebreak="al", + specials={ "super", 0x2AA }, + unicodeslot=0x10799, + }, + [0x1079A]={ + category="lm", + description="MODIFIER LETTER SMALL LZ DIGRAPH", + direction="l", + linebreak="al", + specials={ "super", 0x2AB }, + unicodeslot=0x1079A, + }, + [0x1079B]={ + category="lm", + description="MODIFIER LETTER SMALL L WITH BELT", + direction="l", + linebreak="al", + specials={ "super", 0x26C }, + unicodeslot=0x1079B, + }, + [0x1079C]={ + category="lm", + description="MODIFIER LETTER SMALL CAPITAL L WITH BELT", + direction="l", + linebreak="al", + specials={ "super", 0x1DF04 }, + unicodeslot=0x1079C, + }, + [0x1079D]={ + category="lm", + description="MODIFIER LETTER SMALL L WITH RETROFLEX HOOK AND BELT", + direction="l", + linebreak="al", + specials={ "super", 0xA78E }, + unicodeslot=0x1079D, + }, + [0x1079E]={ + category="lm", + description="MODIFIER LETTER SMALL LEZH", + direction="l", + linebreak="al", + specials={ "super", 0x26E }, + unicodeslot=0x1079E, + }, + [0x1079F]={ + category="lm", + description="MODIFIER LETTER SMALL LEZH WITH RETROFLEX HOOK", + direction="l", + linebreak="al", + specials={ "super", 0x1DF05 }, + unicodeslot=0x1079F, + }, + [0x107A0]={ + category="lm", + description="MODIFIER LETTER SMALL TURNED Y", + direction="l", + linebreak="al", + specials={ "super", 0x28E }, + unicodeslot=0x107A0, + }, + [0x107A1]={ + category="lm", + description="MODIFIER LETTER SMALL TURNED Y WITH BELT", + direction="l", + linebreak="al", + specials={ "super", 0x1DF06 }, + unicodeslot=0x107A1, + }, + [0x107A2]={ + category="lm", + description="MODIFIER LETTER SMALL O WITH STROKE", + direction="l", + linebreak="al", + specials={ "super", 0xF8 }, + unicodeslot=0x107A2, + }, + [0x107A3]={ + category="lm", + description="MODIFIER LETTER SMALL CAPITAL OE", + direction="l", + linebreak="al", + specials={ "super", 0x276 }, + unicodeslot=0x107A3, + }, + [0x107A4]={ + category="lm", + description="MODIFIER LETTER SMALL CLOSED OMEGA", + direction="l", + linebreak="al", + specials={ "super", 0x277 }, + unicodeslot=0x107A4, + }, + [0x107A5]={ + category="lm", + description="MODIFIER LETTER SMALL Q", + direction="l", + linebreak="al", + specials={ "super", 0x71 }, + unicodeslot=0x107A5, + }, + [0x107A6]={ + category="lm", + description="MODIFIER LETTER SMALL TURNED R WITH LONG LEG", + direction="l", + linebreak="al", + specials={ "super", 0x27A }, + unicodeslot=0x107A6, + }, + [0x107A7]={ + category="lm", + description="MODIFIER LETTER SMALL TURNED R WITH LONG LEG AND RETROFLEX HOOK", + direction="l", + linebreak="al", + specials={ "super", 0x1DF08 }, + unicodeslot=0x107A7, + }, + [0x107A8]={ + category="lm", + description="MODIFIER LETTER SMALL R WITH TAIL", + direction="l", + linebreak="al", + specials={ "super", 0x27D }, + unicodeslot=0x107A8, + }, + [0x107A9]={ + category="lm", + description="MODIFIER LETTER SMALL R WITH FISHHOOK", + direction="l", + linebreak="al", + specials={ "super", 0x27E }, + unicodeslot=0x107A9, + }, + [0x107AA]={ + category="lm", + description="MODIFIER LETTER SMALL CAPITAL R", + direction="l", + linebreak="al", + specials={ "super", 0x280 }, + unicodeslot=0x107AA, + }, + [0x107AB]={ + category="lm", + description="MODIFIER LETTER SMALL TC DIGRAPH WITH CURL", + direction="l", + linebreak="al", + specials={ "super", 0x2A8 }, + unicodeslot=0x107AB, + }, + [0x107AC]={ + category="lm", + description="MODIFIER LETTER SMALL TS DIGRAPH", + direction="l", + linebreak="al", + specials={ "super", 0x2A6 }, + unicodeslot=0x107AC, + }, + [0x107AD]={ + category="lm", + description="MODIFIER LETTER SMALL TS DIGRAPH WITH RETROFLEX HOOK", + direction="l", + linebreak="al", + specials={ "super", 0xAB67 }, + unicodeslot=0x107AD, + }, + [0x107AE]={ + category="lm", + description="MODIFIER LETTER SMALL TESH DIGRAPH", + direction="l", + linebreak="al", + specials={ "super", 0x2A7 }, + unicodeslot=0x107AE, + }, + [0x107AF]={ + category="lm", + description="MODIFIER LETTER SMALL T WITH RETROFLEX HOOK", + direction="l", + linebreak="al", + specials={ "super", 0x288 }, + unicodeslot=0x107AF, + }, + [0x107B0]={ + category="lm", + description="MODIFIER LETTER SMALL V WITH RIGHT HOOK", + direction="l", + linebreak="al", + specials={ "super", 0x2C71 }, + unicodeslot=0x107B0, + }, + [0x107B2]={ + category="lm", + description="MODIFIER LETTER SMALL CAPITAL Y", + direction="l", + linebreak="al", + specials={ "super", 0x28F }, + unicodeslot=0x107B2, + }, + [0x107B3]={ + category="lm", + description="MODIFIER LETTER GLOTTAL STOP WITH STROKE", + direction="l", + linebreak="al", + specials={ "super", 0x2A1 }, + unicodeslot=0x107B3, + }, + [0x107B4]={ + category="lm", + description="MODIFIER LETTER REVERSED GLOTTAL STOP WITH STROKE", + direction="l", + linebreak="al", + specials={ "super", 0x2A2 }, + unicodeslot=0x107B4, + }, + [0x107B5]={ + category="lm", + description="MODIFIER LETTER BILABIAL CLICK", + direction="l", + linebreak="al", + specials={ "super", 0x298 }, + unicodeslot=0x107B5, + }, + [0x107B6]={ + category="lm", + description="MODIFIER LETTER DENTAL CLICK", + direction="l", + linebreak="al", + specials={ "super", 0x1C0 }, + unicodeslot=0x107B6, + }, + [0x107B7]={ + category="lm", + description="MODIFIER LETTER LATERAL CLICK", + direction="l", + linebreak="al", + specials={ "super", 0x1C1 }, + unicodeslot=0x107B7, + }, + [0x107B8]={ + category="lm", + description="MODIFIER LETTER ALVEOLAR CLICK", + direction="l", + linebreak="al", + specials={ "super", 0x1C2 }, + unicodeslot=0x107B8, + }, + [0x107B9]={ + category="lm", + description="MODIFIER LETTER RETROFLEX CLICK WITH RETROFLEX HOOK", + direction="l", + linebreak="al", + specials={ "super", 0x1DF0A }, + unicodeslot=0x107B9, + }, + [0x107BA]={ + category="lm", + description="MODIFIER LETTER SMALL S WITH CURL", + direction="l", + linebreak="al", + specials={ "super", 0x1DF1E }, + unicodeslot=0x107BA, + }, [0x10800]={ category="lo", description="CYPRIOT SYLLABLE A", @@ -155523,6 +157902,7 @@ characters.data={ category="lu", description="OLD HUNGARIAN CAPITAL LETTER A", direction="r", + lccode=0x10CC0, linebreak="al", unicodeslot=0x10C80, }, @@ -155530,6 +157910,7 @@ characters.data={ category="lu", description="OLD HUNGARIAN CAPITAL LETTER AA", direction="r", + lccode=0x10CC1, linebreak="al", unicodeslot=0x10C81, }, @@ -155537,6 +157918,7 @@ characters.data={ category="lu", description="OLD HUNGARIAN CAPITAL LETTER EB", direction="r", + lccode=0x10CC2, linebreak="al", unicodeslot=0x10C82, }, @@ -155544,6 +157926,7 @@ characters.data={ category="lu", description="OLD HUNGARIAN CAPITAL LETTER AMB", direction="r", + lccode=0x10CC3, linebreak="al", unicodeslot=0x10C83, }, @@ -155551,6 +157934,7 @@ characters.data={ category="lu", description="OLD HUNGARIAN CAPITAL LETTER EC", direction="r", + lccode=0x10CC4, linebreak="al", unicodeslot=0x10C84, }, @@ -155558,6 +157942,7 @@ characters.data={ category="lu", description="OLD HUNGARIAN CAPITAL LETTER ENC", direction="r", + lccode=0x10CC5, linebreak="al", unicodeslot=0x10C85, }, @@ -155565,6 +157950,7 @@ characters.data={ category="lu", description="OLD HUNGARIAN CAPITAL LETTER ECS", direction="r", + lccode=0x10CC6, linebreak="al", unicodeslot=0x10C86, }, @@ -155572,6 +157958,7 @@ characters.data={ category="lu", description="OLD HUNGARIAN CAPITAL LETTER ED", direction="r", + lccode=0x10CC7, linebreak="al", unicodeslot=0x10C87, }, @@ -155579,6 +157966,7 @@ characters.data={ category="lu", description="OLD HUNGARIAN CAPITAL LETTER AND", direction="r", + lccode=0x10CC8, linebreak="al", unicodeslot=0x10C88, }, @@ -155586,6 +157974,7 @@ characters.data={ category="lu", description="OLD HUNGARIAN CAPITAL LETTER E", direction="r", + lccode=0x10CC9, linebreak="al", unicodeslot=0x10C89, }, @@ -155593,6 +157982,7 @@ characters.data={ category="lu", description="OLD HUNGARIAN CAPITAL LETTER CLOSE E", direction="r", + lccode=0x10CCA, linebreak="al", unicodeslot=0x10C8A, }, @@ -155600,6 +157990,7 @@ characters.data={ category="lu", description="OLD HUNGARIAN CAPITAL LETTER EE", direction="r", + lccode=0x10CCB, linebreak="al", unicodeslot=0x10C8B, }, @@ -155607,6 +157998,7 @@ characters.data={ category="lu", description="OLD HUNGARIAN CAPITAL LETTER EF", direction="r", + lccode=0x10CCC, linebreak="al", unicodeslot=0x10C8C, }, @@ -155614,6 +158006,7 @@ characters.data={ category="lu", description="OLD HUNGARIAN CAPITAL LETTER EG", direction="r", + lccode=0x10CCD, linebreak="al", unicodeslot=0x10C8D, }, @@ -155621,6 +158014,7 @@ characters.data={ category="lu", description="OLD HUNGARIAN CAPITAL LETTER EGY", direction="r", + lccode=0x10CCE, linebreak="al", unicodeslot=0x10C8E, }, @@ -155628,6 +158022,7 @@ characters.data={ category="lu", description="OLD HUNGARIAN CAPITAL LETTER EH", direction="r", + lccode=0x10CCF, linebreak="al", unicodeslot=0x10C8F, }, @@ -155635,6 +158030,7 @@ characters.data={ category="lu", description="OLD HUNGARIAN CAPITAL LETTER I", direction="r", + lccode=0x10CD0, linebreak="al", unicodeslot=0x10C90, }, @@ -155642,6 +158038,7 @@ characters.data={ category="lu", description="OLD HUNGARIAN CAPITAL LETTER II", direction="r", + lccode=0x10CD1, linebreak="al", unicodeslot=0x10C91, }, @@ -155649,6 +158046,7 @@ characters.data={ category="lu", description="OLD HUNGARIAN CAPITAL LETTER EJ", direction="r", + lccode=0x10CD2, linebreak="al", unicodeslot=0x10C92, }, @@ -155656,6 +158054,7 @@ characters.data={ category="lu", description="OLD HUNGARIAN CAPITAL LETTER EK", direction="r", + lccode=0x10CD3, linebreak="al", unicodeslot=0x10C93, }, @@ -155663,6 +158062,7 @@ characters.data={ category="lu", description="OLD HUNGARIAN CAPITAL LETTER AK", direction="r", + lccode=0x10CD4, linebreak="al", unicodeslot=0x10C94, }, @@ -155670,6 +158070,7 @@ characters.data={ category="lu", description="OLD HUNGARIAN CAPITAL LETTER UNK", direction="r", + lccode=0x10CD5, linebreak="al", unicodeslot=0x10C95, }, @@ -155677,6 +158078,7 @@ characters.data={ category="lu", description="OLD HUNGARIAN CAPITAL LETTER EL", direction="r", + lccode=0x10CD6, linebreak="al", unicodeslot=0x10C96, }, @@ -155684,6 +158086,7 @@ characters.data={ category="lu", description="OLD HUNGARIAN CAPITAL LETTER ELY", direction="r", + lccode=0x10CD7, linebreak="al", unicodeslot=0x10C97, }, @@ -155691,6 +158094,7 @@ characters.data={ category="lu", description="OLD HUNGARIAN CAPITAL LETTER EM", direction="r", + lccode=0x10CD8, linebreak="al", unicodeslot=0x10C98, }, @@ -155698,6 +158102,7 @@ characters.data={ category="lu", description="OLD HUNGARIAN CAPITAL LETTER EN", direction="r", + lccode=0x10CD9, linebreak="al", unicodeslot=0x10C99, }, @@ -155705,6 +158110,7 @@ characters.data={ category="lu", description="OLD HUNGARIAN CAPITAL LETTER ENY", direction="r", + lccode=0x10CDA, linebreak="al", unicodeslot=0x10C9A, }, @@ -155712,6 +158118,7 @@ characters.data={ category="lu", description="OLD HUNGARIAN CAPITAL LETTER O", direction="r", + lccode=0x10CDB, linebreak="al", unicodeslot=0x10C9B, }, @@ -155719,6 +158126,7 @@ characters.data={ category="lu", description="OLD HUNGARIAN CAPITAL LETTER OO", direction="r", + lccode=0x10CDC, linebreak="al", unicodeslot=0x10C9C, }, @@ -155726,6 +158134,7 @@ characters.data={ category="lu", description="OLD HUNGARIAN CAPITAL LETTER NIKOLSBURG OE", direction="r", + lccode=0x10CDD, linebreak="al", unicodeslot=0x10C9D, }, @@ -155733,6 +158142,7 @@ characters.data={ category="lu", description="OLD HUNGARIAN CAPITAL LETTER RUDIMENTA OE", direction="r", + lccode=0x10CDE, linebreak="al", unicodeslot=0x10C9E, }, @@ -155740,6 +158150,7 @@ characters.data={ category="lu", description="OLD HUNGARIAN CAPITAL LETTER OEE", direction="r", + lccode=0x10CDF, linebreak="al", unicodeslot=0x10C9F, }, @@ -155747,6 +158158,7 @@ characters.data={ category="lu", description="OLD HUNGARIAN CAPITAL LETTER EP", direction="r", + lccode=0x10CE0, linebreak="al", unicodeslot=0x10CA0, }, @@ -155754,6 +158166,7 @@ characters.data={ category="lu", description="OLD HUNGARIAN CAPITAL LETTER EMP", direction="r", + lccode=0x10CE1, linebreak="al", unicodeslot=0x10CA1, }, @@ -155761,6 +158174,7 @@ characters.data={ category="lu", description="OLD HUNGARIAN CAPITAL LETTER ER", direction="r", + lccode=0x10CE2, linebreak="al", unicodeslot=0x10CA2, }, @@ -155768,6 +158182,7 @@ characters.data={ category="lu", description="OLD HUNGARIAN CAPITAL LETTER SHORT ER", direction="r", + lccode=0x10CE3, linebreak="al", unicodeslot=0x10CA3, }, @@ -155775,6 +158190,7 @@ characters.data={ category="lu", description="OLD HUNGARIAN CAPITAL LETTER ES", direction="r", + lccode=0x10CE4, linebreak="al", unicodeslot=0x10CA4, }, @@ -155782,6 +158198,7 @@ characters.data={ category="lu", description="OLD HUNGARIAN CAPITAL LETTER ESZ", direction="r", + lccode=0x10CE5, linebreak="al", unicodeslot=0x10CA5, }, @@ -155789,6 +158206,7 @@ characters.data={ category="lu", description="OLD HUNGARIAN CAPITAL LETTER ET", direction="r", + lccode=0x10CE6, linebreak="al", unicodeslot=0x10CA6, }, @@ -155796,6 +158214,7 @@ characters.data={ category="lu", description="OLD HUNGARIAN CAPITAL LETTER ENT", direction="r", + lccode=0x10CE7, linebreak="al", unicodeslot=0x10CA7, }, @@ -155803,6 +158222,7 @@ characters.data={ category="lu", description="OLD HUNGARIAN CAPITAL LETTER ETY", direction="r", + lccode=0x10CE8, linebreak="al", unicodeslot=0x10CA8, }, @@ -155810,6 +158230,7 @@ characters.data={ category="lu", description="OLD HUNGARIAN CAPITAL LETTER ECH", direction="r", + lccode=0x10CE9, linebreak="al", unicodeslot=0x10CA9, }, @@ -155817,6 +158238,7 @@ characters.data={ category="lu", description="OLD HUNGARIAN CAPITAL LETTER U", direction="r", + lccode=0x10CEA, linebreak="al", unicodeslot=0x10CAA, }, @@ -155824,6 +158246,7 @@ characters.data={ category="lu", description="OLD HUNGARIAN CAPITAL LETTER UU", direction="r", + lccode=0x10CEB, linebreak="al", unicodeslot=0x10CAB, }, @@ -155831,6 +158254,7 @@ characters.data={ category="lu", description="OLD HUNGARIAN CAPITAL LETTER NIKOLSBURG UE", direction="r", + lccode=0x10CEC, linebreak="al", unicodeslot=0x10CAC, }, @@ -155838,6 +158262,7 @@ characters.data={ category="lu", description="OLD HUNGARIAN CAPITAL LETTER RUDIMENTA UE", direction="r", + lccode=0x10CED, linebreak="al", unicodeslot=0x10CAD, }, @@ -155845,6 +158270,7 @@ characters.data={ category="lu", description="OLD HUNGARIAN CAPITAL LETTER EV", direction="r", + lccode=0x10CEE, linebreak="al", unicodeslot=0x10CAE, }, @@ -155852,6 +158278,7 @@ characters.data={ category="lu", description="OLD HUNGARIAN CAPITAL LETTER EZ", direction="r", + lccode=0x10CEF, linebreak="al", unicodeslot=0x10CAF, }, @@ -155859,6 +158286,7 @@ characters.data={ category="lu", description="OLD HUNGARIAN CAPITAL LETTER EZS", direction="r", + lccode=0x10CF0, linebreak="al", unicodeslot=0x10CB0, }, @@ -155866,6 +158294,7 @@ characters.data={ category="lu", description="OLD HUNGARIAN CAPITAL LETTER ENT-SHAPED SIGN", direction="r", + lccode=0x10CF1, linebreak="al", unicodeslot=0x10CB1, }, @@ -155873,6 +158302,7 @@ characters.data={ category="lu", description="OLD HUNGARIAN CAPITAL LETTER US", direction="r", + lccode=0x10CF2, linebreak="al", unicodeslot=0x10CB2, }, @@ -157213,6 +159643,30 @@ characters.data={ linebreak="al", unicodeslot=0x10EB1, }, + [0x10EFD]={ + category="mn", + combining=0xDC, + description="ARABIC SMALL LOW WORD SAKTA", + direction="nsm", + linebreak="cm", + unicodeslot=0x10EFD, + }, + [0x10EFE]={ + category="mn", + combining=0xDC, + description="ARABIC SMALL LOW WORD QASR", + direction="nsm", + linebreak="cm", + unicodeslot=0x10EFE, + }, + [0x10EFF]={ + category="mn", + combining=0xDC, + description="ARABIC SMALL LOW WORD MADDA", + direction="nsm", + linebreak="cm", + unicodeslot=0x10EFF, + }, [0x10F00]={ category="lo", description="OLD SOGDIAN LETTER ALEPH", @@ -157824,6 +160278,210 @@ characters.data={ linebreak="al", unicodeslot=0x10F59, }, + [0x10F70]={ + arabic="d", + category="lo", + description="OLD UYGHUR LETTER ALEPH", + direction="r", + linebreak="al", + unicodeslot=0x10F70, + }, + [0x10F71]={ + arabic="d", + category="lo", + description="OLD UYGHUR LETTER BETH", + direction="r", + linebreak="al", + unicodeslot=0x10F71, + }, + [0x10F72]={ + arabic="d", + category="lo", + description="OLD UYGHUR LETTER GIMEL-HETH", + direction="r", + linebreak="al", + unicodeslot=0x10F72, + }, + [0x10F73]={ + arabic="d", + category="lo", + description="OLD UYGHUR LETTER WAW", + direction="r", + linebreak="al", + unicodeslot=0x10F73, + }, + [0x10F74]={ + arabic="r", + category="lo", + description="OLD UYGHUR LETTER ZAYIN", + direction="r", + linebreak="al", + unicodeslot=0x10F74, + }, + [0x10F75]={ + arabic="r", + category="lo", + description="OLD UYGHUR LETTER FINAL HETH", + direction="r", + linebreak="al", + unicodeslot=0x10F75, + }, + [0x10F76]={ + arabic="d", + category="lo", + description="OLD UYGHUR LETTER YODH", + direction="r", + linebreak="al", + unicodeslot=0x10F76, + }, + [0x10F77]={ + arabic="d", + category="lo", + description="OLD UYGHUR LETTER KAPH", + direction="r", + linebreak="al", + unicodeslot=0x10F77, + }, + [0x10F78]={ + arabic="d", + category="lo", + description="OLD UYGHUR LETTER LAMEDH", + direction="r", + linebreak="al", + unicodeslot=0x10F78, + }, + [0x10F79]={ + arabic="d", + category="lo", + description="OLD UYGHUR LETTER MEM", + direction="r", + linebreak="al", + unicodeslot=0x10F79, + }, + [0x10F7A]={ + arabic="d", + category="lo", + description="OLD UYGHUR LETTER NUN", + direction="r", + linebreak="al", + unicodeslot=0x10F7A, + }, + [0x10F7B]={ + arabic="d", + category="lo", + description="OLD UYGHUR LETTER SAMEKH", + direction="r", + linebreak="al", + unicodeslot=0x10F7B, + }, + [0x10F7C]={ + arabic="d", + category="lo", + description="OLD UYGHUR LETTER PE", + direction="r", + linebreak="al", + unicodeslot=0x10F7C, + }, + [0x10F7D]={ + arabic="d", + category="lo", + description="OLD UYGHUR LETTER SADHE", + direction="r", + linebreak="al", + unicodeslot=0x10F7D, + }, + [0x10F7E]={ + arabic="d", + category="lo", + description="OLD UYGHUR LETTER RESH", + direction="r", + linebreak="al", + unicodeslot=0x10F7E, + }, + [0x10F7F]={ + arabic="d", + category="lo", + description="OLD UYGHUR LETTER SHIN", + direction="r", + linebreak="al", + unicodeslot=0x10F7F, + }, + [0x10F80]={ + arabic="d", + category="lo", + description="OLD UYGHUR LETTER TAW", + direction="r", + linebreak="al", + unicodeslot=0x10F80, + }, + [0x10F81]={ + arabic="d", + category="lo", + description="OLD UYGHUR LETTER LESH", + direction="r", + linebreak="al", + unicodeslot=0x10F81, + }, + [0x10F82]={ + category="mn", + combining=0xE6, + description="OLD UYGHUR COMBINING DOT ABOVE", + direction="nsm", + linebreak="cm", + unicodeslot=0x10F82, + }, + [0x10F83]={ + category="mn", + combining=0xDC, + description="OLD UYGHUR COMBINING DOT BELOW", + direction="nsm", + linebreak="cm", + unicodeslot=0x10F83, + }, + [0x10F84]={ + category="mn", + combining=0xE6, + description="OLD UYGHUR COMBINING TWO DOTS ABOVE", + direction="nsm", + linebreak="cm", + unicodeslot=0x10F84, + }, + [0x10F85]={ + category="mn", + combining=0xDC, + description="OLD UYGHUR COMBINING TWO DOTS BELOW", + direction="nsm", + linebreak="cm", + unicodeslot=0x10F85, + }, + [0x10F86]={ + category="po", + description="OLD UYGHUR PUNCTUATION BAR", + direction="r", + linebreak="al", + unicodeslot=0x10F86, + }, + [0x10F87]={ + category="po", + description="OLD UYGHUR PUNCTUATION TWO BARS", + direction="r", + linebreak="al", + unicodeslot=0x10F87, + }, + [0x10F88]={ + category="po", + description="OLD UYGHUR PUNCTUATION TWO DOTS", + direction="r", + linebreak="al", + unicodeslot=0x10F88, + }, + [0x10F89]={ + category="po", + description="OLD UYGHUR PUNCTUATION FOUR DOTS", + direction="r", + linebreak="al", + unicodeslot=0x10F89, + }, [0x10FB0]={ arabic="d", category="lo", @@ -158966,6 +161624,49 @@ characters.data={ linebreak="nu", unicodeslot=0x1106F, }, + [0x11070]={ + category="mn", + combining=0x9, + description="BRAHMI SIGN OLD TAMIL VIRAMA", + direction="nsm", + linebreak="cm", + unicodeslot=0x11070, + }, + [0x11071]={ + category="lo", + description="BRAHMI LETTER OLD TAMIL SHORT E", + direction="l", + linebreak="al", + unicodeslot=0x11071, + }, + [0x11072]={ + category="lo", + description="BRAHMI LETTER OLD TAMIL SHORT O", + direction="l", + linebreak="al", + unicodeslot=0x11072, + }, + [0x11073]={ + category="mn", + description="BRAHMI VOWEL SIGN OLD TAMIL SHORT E", + direction="nsm", + linebreak="cm", + unicodeslot=0x11073, + }, + [0x11074]={ + category="mn", + description="BRAHMI VOWEL SIGN OLD TAMIL SHORT O", + direction="nsm", + linebreak="cm", + unicodeslot=0x11074, + }, + [0x11075]={ + category="lo", + description="BRAHMI LETTER OLD TAMIL LLA", + direction="l", + linebreak="al", + unicodeslot=0x11075, + }, [0x1107F]={ category="mn", combining=0x9, @@ -159442,6 +162143,13 @@ characters.data={ linebreak="ba", unicodeslot=0x110C1, }, + [0x110C2]={ + category="mn", + description="KAITHI VOWEL SIGN VOCALIC R", + direction="nsm", + linebreak="cm", + unicodeslot=0x110C2, + }, [0x110CD]={ arabic="u", category="cf", @@ -161723,6 +164431,27 @@ characters.data={ linebreak="cm", unicodeslot=0x1123E, }, + [0x1123F]={ + category="lo", + description="KHOJKI LETTER QA", + direction="l", + linebreak="al", + unicodeslot=0x1123F, + }, + [0x11240]={ + category="lo", + description="KHOJKI LETTER SHORT I", + direction="l", + linebreak="al", + unicodeslot=0x11240, + }, + [0x11241]={ + category="mn", + description="KHOJKI VOWEL SIGN VOCALIC R", + direction="nsm", + linebreak="cm", + unicodeslot=0x11241, + }, [0x11280]={ category="lo", description="MULTANI LETTER A", @@ -166061,6 +168790,13 @@ characters.data={ linebreak="al", unicodeslot=0x116B8, }, + [0x116B9]={ + category="po", + description="TAKRI ABBREVIATION SIGN", + direction="l", + linebreak="al", + unicodeslot=0x116B9, + }, [0x116C0]={ category="nd", description="TAKRI DIGIT ZERO", @@ -166538,6 +169274,55 @@ characters.data={ linebreak="sa", unicodeslot=0x1173F, }, + [0x11740]={ + category="lo", + description="AHOM LETTER CA", + direction="l", + linebreak="sa", + unicodeslot=0x11740, + }, + [0x11741]={ + category="lo", + description="AHOM LETTER TTA", + direction="l", + linebreak="sa", + unicodeslot=0x11741, + }, + [0x11742]={ + category="lo", + description="AHOM LETTER TTHA", + direction="l", + linebreak="sa", + unicodeslot=0x11742, + }, + [0x11743]={ + category="lo", + description="AHOM LETTER DDA", + direction="l", + linebreak="sa", + unicodeslot=0x11743, + }, + [0x11744]={ + category="lo", + description="AHOM LETTER DDHA", + direction="l", + linebreak="sa", + unicodeslot=0x11744, + }, + [0x11745]={ + category="lo", + description="AHOM LETTER NNA", + direction="l", + linebreak="sa", + unicodeslot=0x11745, + }, + [0x11746]={ + category="lo", + description="AHOM LETTER LLA", + direction="l", + linebreak="sa", + unicodeslot=0x11746, + }, [0x11800]={ category="lo", description="DOGRA LETTER A", @@ -166964,6 +169749,7 @@ characters.data={ category="lu", description="WARANG CITI CAPITAL LETTER NGAA", direction="l", + lccode=0x118C0, linebreak="al", unicodeslot=0x118A0, }, @@ -166971,6 +169757,7 @@ characters.data={ category="lu", description="WARANG CITI CAPITAL LETTER A", direction="l", + lccode=0x118C1, linebreak="al", unicodeslot=0x118A1, }, @@ -166978,6 +169765,7 @@ characters.data={ category="lu", description="WARANG CITI CAPITAL LETTER WI", direction="l", + lccode=0x118C2, linebreak="al", unicodeslot=0x118A2, }, @@ -166985,6 +169773,7 @@ characters.data={ category="lu", description="WARANG CITI CAPITAL LETTER YU", direction="l", + lccode=0x118C3, linebreak="al", unicodeslot=0x118A3, }, @@ -166992,6 +169781,7 @@ characters.data={ category="lu", description="WARANG CITI CAPITAL LETTER YA", direction="l", + lccode=0x118C4, linebreak="al", unicodeslot=0x118A4, }, @@ -166999,6 +169789,7 @@ characters.data={ category="lu", description="WARANG CITI CAPITAL LETTER YO", direction="l", + lccode=0x118C5, linebreak="al", unicodeslot=0x118A5, }, @@ -167006,6 +169797,7 @@ characters.data={ category="lu", description="WARANG CITI CAPITAL LETTER II", direction="l", + lccode=0x118C6, linebreak="al", unicodeslot=0x118A6, }, @@ -167013,6 +169805,7 @@ characters.data={ category="lu", description="WARANG CITI CAPITAL LETTER UU", direction="l", + lccode=0x118C7, linebreak="al", unicodeslot=0x118A7, }, @@ -167020,6 +169813,7 @@ characters.data={ category="lu", description="WARANG CITI CAPITAL LETTER E", direction="l", + lccode=0x118C8, linebreak="al", unicodeslot=0x118A8, }, @@ -167027,6 +169821,7 @@ characters.data={ category="lu", description="WARANG CITI CAPITAL LETTER O", direction="l", + lccode=0x118C9, linebreak="al", unicodeslot=0x118A9, }, @@ -167034,6 +169829,7 @@ characters.data={ category="lu", description="WARANG CITI CAPITAL LETTER ANG", direction="l", + lccode=0x118CA, linebreak="al", unicodeslot=0x118AA, }, @@ -167041,6 +169837,7 @@ characters.data={ category="lu", description="WARANG CITI CAPITAL LETTER GA", direction="l", + lccode=0x118CB, linebreak="al", unicodeslot=0x118AB, }, @@ -167048,6 +169845,7 @@ characters.data={ category="lu", description="WARANG CITI CAPITAL LETTER KO", direction="l", + lccode=0x118CC, linebreak="al", unicodeslot=0x118AC, }, @@ -167055,6 +169853,7 @@ characters.data={ category="lu", description="WARANG CITI CAPITAL LETTER ENY", direction="l", + lccode=0x118CD, linebreak="al", unicodeslot=0x118AD, }, @@ -167062,6 +169861,7 @@ characters.data={ category="lu", description="WARANG CITI CAPITAL LETTER YUJ", direction="l", + lccode=0x118CE, linebreak="al", unicodeslot=0x118AE, }, @@ -167069,6 +169869,7 @@ characters.data={ category="lu", description="WARANG CITI CAPITAL LETTER UC", direction="l", + lccode=0x118CF, linebreak="al", unicodeslot=0x118AF, }, @@ -167076,6 +169877,7 @@ characters.data={ category="lu", description="WARANG CITI CAPITAL LETTER ENN", direction="l", + lccode=0x118D0, linebreak="al", unicodeslot=0x118B0, }, @@ -167083,6 +169885,7 @@ characters.data={ category="lu", description="WARANG CITI CAPITAL LETTER ODD", direction="l", + lccode=0x118D1, linebreak="al", unicodeslot=0x118B1, }, @@ -167090,6 +169893,7 @@ characters.data={ category="lu", description="WARANG CITI CAPITAL LETTER TTE", direction="l", + lccode=0x118D2, linebreak="al", unicodeslot=0x118B2, }, @@ -167097,6 +169901,7 @@ characters.data={ category="lu", description="WARANG CITI CAPITAL LETTER NUNG", direction="l", + lccode=0x118D3, linebreak="al", unicodeslot=0x118B3, }, @@ -167104,6 +169909,7 @@ characters.data={ category="lu", description="WARANG CITI CAPITAL LETTER DA", direction="l", + lccode=0x118D4, linebreak="al", unicodeslot=0x118B4, }, @@ -167111,6 +169917,7 @@ characters.data={ category="lu", description="WARANG CITI CAPITAL LETTER AT", direction="l", + lccode=0x118D5, linebreak="al", unicodeslot=0x118B5, }, @@ -167118,6 +169925,7 @@ characters.data={ category="lu", description="WARANG CITI CAPITAL LETTER AM", direction="l", + lccode=0x118D6, linebreak="al", unicodeslot=0x118B6, }, @@ -167125,6 +169933,7 @@ characters.data={ category="lu", description="WARANG CITI CAPITAL LETTER BU", direction="l", + lccode=0x118D7, linebreak="al", unicodeslot=0x118B7, }, @@ -167132,6 +169941,7 @@ characters.data={ category="lu", description="WARANG CITI CAPITAL LETTER PU", direction="l", + lccode=0x118D8, linebreak="al", unicodeslot=0x118B8, }, @@ -167139,6 +169949,7 @@ characters.data={ category="lu", description="WARANG CITI CAPITAL LETTER HIYO", direction="l", + lccode=0x118D9, linebreak="al", unicodeslot=0x118B9, }, @@ -167146,6 +169957,7 @@ characters.data={ category="lu", description="WARANG CITI CAPITAL LETTER HOLO", direction="l", + lccode=0x118DA, linebreak="al", unicodeslot=0x118BA, }, @@ -167153,6 +169965,7 @@ characters.data={ category="lu", description="WARANG CITI CAPITAL LETTER HORR", direction="l", + lccode=0x118DB, linebreak="al", unicodeslot=0x118BB, }, @@ -167160,6 +169973,7 @@ characters.data={ category="lu", description="WARANG CITI CAPITAL LETTER HAR", direction="l", + lccode=0x118DC, linebreak="al", unicodeslot=0x118BC, }, @@ -167167,6 +169981,7 @@ characters.data={ category="lu", description="WARANG CITI CAPITAL LETTER SSUU", direction="l", + lccode=0x118DD, linebreak="al", unicodeslot=0x118BD, }, @@ -167174,6 +169989,7 @@ characters.data={ category="lu", description="WARANG CITI CAPITAL LETTER SII", direction="l", + lccode=0x118DE, linebreak="al", unicodeslot=0x118BE, }, @@ -167181,6 +169997,7 @@ characters.data={ category="lu", description="WARANG CITI CAPITAL LETTER VIYO", direction="l", + lccode=0x118DF, linebreak="al", unicodeslot=0x118BF, }, @@ -169600,6 +172417,118 @@ characters.data={ linebreak="ba", unicodeslot=0x11AA2, }, + [0x11AB0]={ + category="lo", + description="CANADIAN SYLLABICS NATTILIK HI", + direction="l", + linebreak="al", + unicodeslot=0x11AB0, + }, + [0x11AB1]={ + category="lo", + description="CANADIAN SYLLABICS NATTILIK HII", + direction="l", + linebreak="al", + unicodeslot=0x11AB1, + }, + [0x11AB2]={ + category="lo", + description="CANADIAN SYLLABICS NATTILIK HO", + direction="l", + linebreak="al", + unicodeslot=0x11AB2, + }, + [0x11AB3]={ + category="lo", + description="CANADIAN SYLLABICS NATTILIK HOO", + direction="l", + linebreak="al", + unicodeslot=0x11AB3, + }, + [0x11AB4]={ + category="lo", + description="CANADIAN SYLLABICS NATTILIK HA", + direction="l", + linebreak="al", + unicodeslot=0x11AB4, + }, + [0x11AB5]={ + category="lo", + description="CANADIAN SYLLABICS NATTILIK HAA", + direction="l", + linebreak="al", + unicodeslot=0x11AB5, + }, + [0x11AB6]={ + category="lo", + description="CANADIAN SYLLABICS NATTILIK SHRI", + direction="l", + linebreak="al", + unicodeslot=0x11AB6, + }, + [0x11AB7]={ + category="lo", + description="CANADIAN SYLLABICS NATTILIK SHRII", + direction="l", + linebreak="al", + unicodeslot=0x11AB7, + }, + [0x11AB8]={ + category="lo", + description="CANADIAN SYLLABICS NATTILIK SHRO", + direction="l", + linebreak="al", + unicodeslot=0x11AB8, + }, + [0x11AB9]={ + category="lo", + description="CANADIAN SYLLABICS NATTILIK SHROO", + direction="l", + linebreak="al", + unicodeslot=0x11AB9, + }, + [0x11ABA]={ + category="lo", + description="CANADIAN SYLLABICS NATTILIK SHRA", + direction="l", + linebreak="al", + unicodeslot=0x11ABA, + }, + [0x11ABB]={ + category="lo", + description="CANADIAN SYLLABICS NATTILIK SHRAA", + direction="l", + linebreak="al", + unicodeslot=0x11ABB, + }, + [0x11ABC]={ + category="lo", + description="CANADIAN SYLLABICS SPE", + direction="l", + linebreak="al", + unicodeslot=0x11ABC, + }, + [0x11ABD]={ + category="lo", + description="CANADIAN SYLLABICS SPI", + direction="l", + linebreak="al", + unicodeslot=0x11ABD, + }, + [0x11ABE]={ + category="lo", + description="CANADIAN SYLLABICS SPO", + direction="l", + linebreak="al", + unicodeslot=0x11ABE, + }, + [0x11ABF]={ + category="lo", + description="CANADIAN SYLLABICS SPA", + direction="l", + linebreak="al", + unicodeslot=0x11ABF, + }, [0x11AC0]={ category="lo", description="PAU CIN HAU LETTER PA", @@ -169999,6 +172928,76 @@ characters.data={ linebreak="al", unicodeslot=0x11AF8, }, + [0x11B00]={ + category="po", + description="DEVANAGARI HEAD MARK", + direction="l", + linebreak="bb", + unicodeslot=0x11B00, + }, + [0x11B01]={ + category="po", + description="DEVANAGARI HEAD MARK WITH HEADSTROKE", + direction="l", + linebreak="bb", + unicodeslot=0x11B01, + }, + [0x11B02]={ + category="po", + description="DEVANAGARI SIGN BHALE", + direction="l", + linebreak="bb", + unicodeslot=0x11B02, + }, + [0x11B03]={ + category="po", + description="DEVANAGARI SIGN BHALE WITH HOOK", + direction="l", + linebreak="bb", + unicodeslot=0x11B03, + }, + [0x11B04]={ + category="po", + description="DEVANAGARI SIGN EXTENDED BHALE", + direction="l", + linebreak="bb", + unicodeslot=0x11B04, + }, + [0x11B05]={ + category="po", + description="DEVANAGARI SIGN EXTENDED BHALE WITH HOOK", + direction="l", + linebreak="bb", + unicodeslot=0x11B05, + }, + [0x11B06]={ + category="po", + description="DEVANAGARI SIGN WESTERN FIVE-LIKE BHALE", + direction="l", + linebreak="bb", + unicodeslot=0x11B06, + }, + [0x11B07]={ + category="po", + description="DEVANAGARI SIGN WESTERN NINE-LIKE BHALE", + direction="l", + linebreak="bb", + unicodeslot=0x11B07, + }, + [0x11B08]={ + category="po", + description="DEVANAGARI SIGN REVERSED NINE-LIKE BHALE", + direction="l", + linebreak="bb", + unicodeslot=0x11B08, + }, + [0x11B09]={ + category="po", + description="DEVANAGARI SIGN MINDU", + direction="l", + linebreak="bb", + unicodeslot=0x11B09, + }, [0x11C00]={ category="lo", description="BHAIKSUKI LETTER A", @@ -172300,6 +175299,610 @@ characters.data={ linebreak="al", unicodeslot=0x11EF8, }, + [0x11F00]={ + category="mn", + description="KAWI SIGN CANDRABINDU", + direction="nsm", + linebreak="cm", + unicodeslot=0x11F00, + }, + [0x11F01]={ + category="mn", + description="KAWI SIGN ANUSVARA", + direction="nsm", + linebreak="cm", + unicodeslot=0x11F01, + }, + [0x11F02]={ + category="lo", + description="KAWI SIGN REPHA", + direction="l", + linebreak="al", + unicodeslot=0x11F02, + }, + [0x11F03]={ + category="mc", + description="KAWI SIGN VISARGA", + direction="l", + linebreak="cm", + unicodeslot=0x11F03, + }, + [0x11F04]={ + category="lo", + description="KAWI LETTER A", + direction="l", + linebreak="al", + unicodeslot=0x11F04, + }, + [0x11F05]={ + category="lo", + description="KAWI LETTER AA", + direction="l", + linebreak="al", + unicodeslot=0x11F05, + }, + [0x11F06]={ + category="lo", + description="KAWI LETTER I", + direction="l", + linebreak="al", + unicodeslot=0x11F06, + }, + [0x11F07]={ + category="lo", + description="KAWI LETTER II", + direction="l", + linebreak="al", + unicodeslot=0x11F07, + }, + [0x11F08]={ + category="lo", + description="KAWI LETTER U", + direction="l", + linebreak="al", + unicodeslot=0x11F08, + }, + [0x11F09]={ + category="lo", + description="KAWI LETTER UU", + direction="l", + linebreak="al", + unicodeslot=0x11F09, + }, + [0x11F0A]={ + category="lo", + description="KAWI LETTER VOCALIC R", + direction="l", + linebreak="al", + unicodeslot=0x11F0A, + }, + [0x11F0B]={ + category="lo", + description="KAWI LETTER VOCALIC RR", + direction="l", + linebreak="al", + unicodeslot=0x11F0B, + }, + [0x11F0C]={ + category="lo", + description="KAWI LETTER VOCALIC L", + direction="l", + linebreak="al", + unicodeslot=0x11F0C, + }, + [0x11F0D]={ + category="lo", + description="KAWI LETTER VOCALIC LL", + direction="l", + linebreak="al", + unicodeslot=0x11F0D, + }, + [0x11F0E]={ + category="lo", + description="KAWI LETTER E", + direction="l", + linebreak="al", + unicodeslot=0x11F0E, + }, + [0x11F0F]={ + category="lo", + description="KAWI LETTER AI", + direction="l", + linebreak="al", + unicodeslot=0x11F0F, + }, + [0x11F10]={ + category="lo", + description="KAWI LETTER O", + direction="l", + linebreak="al", + unicodeslot=0x11F10, + }, + [0x11F12]={ + category="lo", + description="KAWI LETTER KA", + direction="l", + linebreak="al", + unicodeslot=0x11F12, + }, + [0x11F13]={ + category="lo", + description="KAWI LETTER KHA", + direction="l", + linebreak="al", + unicodeslot=0x11F13, + }, + [0x11F14]={ + category="lo", + description="KAWI LETTER GA", + direction="l", + linebreak="al", + unicodeslot=0x11F14, + }, + [0x11F15]={ + category="lo", + description="KAWI LETTER GHA", + direction="l", + linebreak="al", + unicodeslot=0x11F15, + }, + [0x11F16]={ + category="lo", + description="KAWI LETTER NGA", + direction="l", + linebreak="al", + unicodeslot=0x11F16, + }, + [0x11F17]={ + category="lo", + description="KAWI LETTER CA", + direction="l", + linebreak="al", + unicodeslot=0x11F17, + }, + [0x11F18]={ + category="lo", + description="KAWI LETTER CHA", + direction="l", + linebreak="al", + unicodeslot=0x11F18, + }, + [0x11F19]={ + category="lo", + description="KAWI LETTER JA", + direction="l", + linebreak="al", + unicodeslot=0x11F19, + }, + [0x11F1A]={ + category="lo", + description="KAWI LETTER JHA", + direction="l", + linebreak="al", + unicodeslot=0x11F1A, + }, + [0x11F1B]={ + category="lo", + description="KAWI LETTER NYA", + direction="l", + linebreak="al", + unicodeslot=0x11F1B, + }, + [0x11F1C]={ + category="lo", + description="KAWI LETTER TTA", + direction="l", + linebreak="al", + unicodeslot=0x11F1C, + }, + [0x11F1D]={ + category="lo", + description="KAWI LETTER TTHA", + direction="l", + linebreak="al", + unicodeslot=0x11F1D, + }, + [0x11F1E]={ + category="lo", + description="KAWI LETTER DDA", + direction="l", + linebreak="al", + unicodeslot=0x11F1E, + }, + [0x11F1F]={ + category="lo", + description="KAWI LETTER DDHA", + direction="l", + linebreak="al", + unicodeslot=0x11F1F, + }, + [0x11F20]={ + category="lo", + description="KAWI LETTER NNA", + direction="l", + linebreak="al", + unicodeslot=0x11F20, + }, + [0x11F21]={ + category="lo", + description="KAWI LETTER TA", + direction="l", + linebreak="al", + unicodeslot=0x11F21, + }, + [0x11F22]={ + category="lo", + description="KAWI LETTER THA", + direction="l", + linebreak="al", + unicodeslot=0x11F22, + }, + [0x11F23]={ + category="lo", + description="KAWI LETTER DA", + direction="l", + linebreak="al", + unicodeslot=0x11F23, + }, + [0x11F24]={ + category="lo", + description="KAWI LETTER DHA", + direction="l", + linebreak="al", + unicodeslot=0x11F24, + }, + [0x11F25]={ + category="lo", + description="KAWI LETTER NA", + direction="l", + linebreak="al", + unicodeslot=0x11F25, + }, + [0x11F26]={ + category="lo", + description="KAWI LETTER PA", + direction="l", + linebreak="al", + unicodeslot=0x11F26, + }, + [0x11F27]={ + category="lo", + description="KAWI LETTER PHA", + direction="l", + linebreak="al", + unicodeslot=0x11F27, + }, + [0x11F28]={ + category="lo", + description="KAWI LETTER BA", + direction="l", + linebreak="al", + unicodeslot=0x11F28, + }, + [0x11F29]={ + category="lo", + description="KAWI LETTER BHA", + direction="l", + linebreak="al", + unicodeslot=0x11F29, + }, + [0x11F2A]={ + category="lo", + description="KAWI LETTER MA", + direction="l", + linebreak="al", + unicodeslot=0x11F2A, + }, + [0x11F2B]={ + category="lo", + description="KAWI LETTER YA", + direction="l", + linebreak="al", + unicodeslot=0x11F2B, + }, + [0x11F2C]={ + category="lo", + description="KAWI LETTER RA", + direction="l", + linebreak="al", + unicodeslot=0x11F2C, + }, + [0x11F2D]={ + category="lo", + description="KAWI LETTER LA", + direction="l", + linebreak="al", + unicodeslot=0x11F2D, + }, + [0x11F2E]={ + category="lo", + description="KAWI LETTER WA", + direction="l", + linebreak="al", + unicodeslot=0x11F2E, + }, + [0x11F2F]={ + category="lo", + description="KAWI LETTER SHA", + direction="l", + linebreak="al", + unicodeslot=0x11F2F, + }, + [0x11F30]={ + category="lo", + description="KAWI LETTER SSA", + direction="l", + linebreak="al", + unicodeslot=0x11F30, + }, + [0x11F31]={ + category="lo", + description="KAWI LETTER SA", + direction="l", + linebreak="al", + unicodeslot=0x11F31, + }, + [0x11F32]={ + category="lo", + description="KAWI LETTER HA", + direction="l", + linebreak="al", + unicodeslot=0x11F32, + }, + [0x11F33]={ + category="lo", + description="KAWI LETTER JNYA", + direction="l", + linebreak="al", + unicodeslot=0x11F33, + }, + [0x11F34]={ + category="mc", + description="KAWI VOWEL SIGN AA", + direction="l", + linebreak="cm", + unicodeslot=0x11F34, + }, + [0x11F35]={ + category="mc", + description="KAWI VOWEL SIGN ALTERNATE AA", + direction="l", + linebreak="cm", + unicodeslot=0x11F35, + }, + [0x11F36]={ + category="mn", + description="KAWI VOWEL SIGN I", + direction="nsm", + linebreak="cm", + unicodeslot=0x11F36, + }, + [0x11F37]={ + category="mn", + description="KAWI VOWEL SIGN II", + direction="nsm", + linebreak="cm", + unicodeslot=0x11F37, + }, + [0x11F38]={ + category="mn", + description="KAWI VOWEL SIGN U", + direction="nsm", + linebreak="cm", + unicodeslot=0x11F38, + }, + [0x11F39]={ + category="mn", + description="KAWI VOWEL SIGN UU", + direction="nsm", + linebreak="cm", + unicodeslot=0x11F39, + }, + [0x11F3A]={ + category="mn", + description="KAWI VOWEL SIGN VOCALIC R", + direction="nsm", + linebreak="cm", + unicodeslot=0x11F3A, + }, + [0x11F3E]={ + category="mc", + description="KAWI VOWEL SIGN E", + direction="l", + linebreak="cm", + unicodeslot=0x11F3E, + }, + [0x11F3F]={ + category="mc", + description="KAWI VOWEL SIGN AI", + direction="l", + linebreak="cm", + unicodeslot=0x11F3F, + }, + [0x11F40]={ + category="mn", + description="KAWI VOWEL SIGN EU", + direction="nsm", + linebreak="cm", + unicodeslot=0x11F40, + }, + [0x11F41]={ + category="mc", + combining=0x9, + description="KAWI SIGN KILLER", + direction="l", + linebreak="cm", + unicodeslot=0x11F41, + }, + [0x11F42]={ + category="mn", + combining=0x9, + description="KAWI CONJOINER", + direction="nsm", + linebreak="cm", + unicodeslot=0x11F42, + }, + [0x11F43]={ + category="po", + description="KAWI DANDA", + direction="l", + linebreak="ba", + unicodeslot=0x11F43, + }, + [0x11F44]={ + category="po", + description="KAWI DOUBLE DANDA", + direction="l", + linebreak="ba", + unicodeslot=0x11F44, + }, + [0x11F45]={ + category="po", + description="KAWI PUNCTUATION SECTION MARKER", + direction="l", + linebreak="id", + unicodeslot=0x11F45, + }, + [0x11F46]={ + category="po", + description="KAWI PUNCTUATION ALTERNATE SECTION MARKER", + direction="l", + linebreak="id", + unicodeslot=0x11F46, + }, + [0x11F47]={ + category="po", + description="KAWI PUNCTUATION FLOWER", + direction="l", + linebreak="id", + unicodeslot=0x11F47, + }, + [0x11F48]={ + category="po", + description="KAWI PUNCTUATION SPACE FILLER", + direction="l", + linebreak="id", + unicodeslot=0x11F48, + }, + [0x11F49]={ + category="po", + description="KAWI PUNCTUATION DOT", + direction="l", + linebreak="id", + unicodeslot=0x11F49, + }, + [0x11F4A]={ + category="po", + description="KAWI PUNCTUATION DOUBLE DOT", + direction="l", + linebreak="id", + unicodeslot=0x11F4A, + }, + [0x11F4B]={ + category="po", + description="KAWI PUNCTUATION TRIPLE DOT", + direction="l", + linebreak="id", + unicodeslot=0x11F4B, + }, + [0x11F4C]={ + category="po", + description="KAWI PUNCTUATION CIRCLE", + direction="l", + linebreak="id", + unicodeslot=0x11F4C, + }, + [0x11F4D]={ + category="po", + description="KAWI PUNCTUATION FILLED CIRCLE", + direction="l", + linebreak="id", + unicodeslot=0x11F4D, + }, + [0x11F4E]={ + category="po", + description="KAWI PUNCTUATION SPIRAL", + direction="l", + linebreak="id", + unicodeslot=0x11F4E, + }, + [0x11F4F]={ + category="po", + description="KAWI PUNCTUATION CLOSING SPIRAL", + direction="l", + linebreak="id", + unicodeslot=0x11F4F, + }, + [0x11F50]={ + category="nd", + description="KAWI DIGIT ZERO", + direction="l", + linebreak="nu", + unicodeslot=0x11F50, + }, + [0x11F51]={ + category="nd", + description="KAWI DIGIT ONE", + direction="l", + linebreak="nu", + unicodeslot=0x11F51, + }, + [0x11F52]={ + category="nd", + description="KAWI DIGIT TWO", + direction="l", + linebreak="nu", + unicodeslot=0x11F52, + }, + [0x11F53]={ + category="nd", + description="KAWI DIGIT THREE", + direction="l", + linebreak="nu", + unicodeslot=0x11F53, + }, + [0x11F54]={ + category="nd", + description="KAWI DIGIT FOUR", + direction="l", + linebreak="nu", + unicodeslot=0x11F54, + }, + [0x11F55]={ + category="nd", + description="KAWI DIGIT FIVE", + direction="l", + linebreak="nu", + unicodeslot=0x11F55, + }, + [0x11F56]={ + category="nd", + description="KAWI DIGIT SIX", + direction="l", + linebreak="nu", + unicodeslot=0x11F56, + }, + [0x11F57]={ + category="nd", + description="KAWI DIGIT SEVEN", + direction="l", + linebreak="nu", + unicodeslot=0x11F57, + }, + [0x11F58]={ + category="nd", + description="KAWI DIGIT EIGHT", + direction="l", + linebreak="nu", + unicodeslot=0x11F58, + }, + [0x11F59]={ + category="nd", + description="KAWI DIGIT NINE", + direction="l", + linebreak="nu", + unicodeslot=0x11F59, + }, [0x11FB0]={ category="lo", description="LISU LETTER YHA", @@ -181304,6 +184907,699 @@ characters.data={ linebreak="al", unicodeslot=0x12543, }, + [0x12F90]={ + category="lo", + description="CYPRO-MINOAN SIGN CM001", + direction="l", + linebreak="al", + unicodeslot=0x12F90, + }, + [0x12F91]={ + category="lo", + description="CYPRO-MINOAN SIGN CM002", + direction="l", + linebreak="al", + unicodeslot=0x12F91, + }, + [0x12F92]={ + category="lo", + description="CYPRO-MINOAN SIGN CM004", + direction="l", + linebreak="al", + unicodeslot=0x12F92, + }, + [0x12F93]={ + category="lo", + description="CYPRO-MINOAN SIGN CM005", + direction="l", + linebreak="al", + unicodeslot=0x12F93, + }, + [0x12F94]={ + category="lo", + description="CYPRO-MINOAN SIGN CM006", + direction="l", + linebreak="al", + unicodeslot=0x12F94, + }, + [0x12F95]={ + category="lo", + description="CYPRO-MINOAN SIGN CM007", + direction="l", + linebreak="al", + unicodeslot=0x12F95, + }, + [0x12F96]={ + category="lo", + description="CYPRO-MINOAN SIGN CM008", + direction="l", + linebreak="al", + unicodeslot=0x12F96, + }, + [0x12F97]={ + category="lo", + description="CYPRO-MINOAN SIGN CM009", + direction="l", + linebreak="al", + unicodeslot=0x12F97, + }, + [0x12F98]={ + category="lo", + description="CYPRO-MINOAN SIGN CM010", + direction="l", + linebreak="al", + unicodeslot=0x12F98, + }, + [0x12F99]={ + category="lo", + description="CYPRO-MINOAN SIGN CM011", + direction="l", + linebreak="al", + unicodeslot=0x12F99, + }, + [0x12F9A]={ + category="lo", + description="CYPRO-MINOAN SIGN CM012", + direction="l", + linebreak="al", + unicodeslot=0x12F9A, + }, + [0x12F9B]={ + category="lo", + description="CYPRO-MINOAN SIGN CM012B", + direction="l", + linebreak="al", + unicodeslot=0x12F9B, + }, + [0x12F9C]={ + category="lo", + description="CYPRO-MINOAN SIGN CM013", + direction="l", + linebreak="al", + unicodeslot=0x12F9C, + }, + [0x12F9D]={ + category="lo", + description="CYPRO-MINOAN SIGN CM015", + direction="l", + linebreak="al", + unicodeslot=0x12F9D, + }, + [0x12F9E]={ + category="lo", + description="CYPRO-MINOAN SIGN CM017", + direction="l", + linebreak="al", + unicodeslot=0x12F9E, + }, + [0x12F9F]={ + category="lo", + description="CYPRO-MINOAN SIGN CM019", + direction="l", + linebreak="al", + unicodeslot=0x12F9F, + }, + [0x12FA0]={ + category="lo", + description="CYPRO-MINOAN SIGN CM021", + direction="l", + linebreak="al", + unicodeslot=0x12FA0, + }, + [0x12FA1]={ + category="lo", + description="CYPRO-MINOAN SIGN CM023", + direction="l", + linebreak="al", + unicodeslot=0x12FA1, + }, + [0x12FA2]={ + category="lo", + description="CYPRO-MINOAN SIGN CM024", + direction="l", + linebreak="al", + unicodeslot=0x12FA2, + }, + [0x12FA3]={ + category="lo", + description="CYPRO-MINOAN SIGN CM025", + direction="l", + linebreak="al", + unicodeslot=0x12FA3, + }, + [0x12FA4]={ + category="lo", + description="CYPRO-MINOAN SIGN CM026", + direction="l", + linebreak="al", + unicodeslot=0x12FA4, + }, + [0x12FA5]={ + category="lo", + description="CYPRO-MINOAN SIGN CM027", + direction="l", + linebreak="al", + unicodeslot=0x12FA5, + }, + [0x12FA6]={ + category="lo", + description="CYPRO-MINOAN SIGN CM028", + direction="l", + linebreak="al", + unicodeslot=0x12FA6, + }, + [0x12FA7]={ + category="lo", + description="CYPRO-MINOAN SIGN CM029", + direction="l", + linebreak="al", + unicodeslot=0x12FA7, + }, + [0x12FA8]={ + category="lo", + description="CYPRO-MINOAN SIGN CM030", + direction="l", + linebreak="al", + unicodeslot=0x12FA8, + }, + [0x12FA9]={ + category="lo", + description="CYPRO-MINOAN SIGN CM033", + direction="l", + linebreak="al", + unicodeslot=0x12FA9, + }, + [0x12FAA]={ + category="lo", + description="CYPRO-MINOAN SIGN CM034", + direction="l", + linebreak="al", + unicodeslot=0x12FAA, + }, + [0x12FAB]={ + category="lo", + description="CYPRO-MINOAN SIGN CM035", + direction="l", + linebreak="al", + unicodeslot=0x12FAB, + }, + [0x12FAC]={ + category="lo", + description="CYPRO-MINOAN SIGN CM036", + direction="l", + linebreak="al", + unicodeslot=0x12FAC, + }, + [0x12FAD]={ + category="lo", + description="CYPRO-MINOAN SIGN CM037", + direction="l", + linebreak="al", + unicodeslot=0x12FAD, + }, + [0x12FAE]={ + category="lo", + description="CYPRO-MINOAN SIGN CM038", + direction="l", + linebreak="al", + unicodeslot=0x12FAE, + }, + [0x12FAF]={ + category="lo", + description="CYPRO-MINOAN SIGN CM039", + direction="l", + linebreak="al", + unicodeslot=0x12FAF, + }, + [0x12FB0]={ + category="lo", + description="CYPRO-MINOAN SIGN CM040", + direction="l", + linebreak="al", + unicodeslot=0x12FB0, + }, + [0x12FB1]={ + category="lo", + description="CYPRO-MINOAN SIGN CM041", + direction="l", + linebreak="al", + unicodeslot=0x12FB1, + }, + [0x12FB2]={ + category="lo", + description="CYPRO-MINOAN SIGN CM044", + direction="l", + linebreak="al", + unicodeslot=0x12FB2, + }, + [0x12FB3]={ + category="lo", + description="CYPRO-MINOAN SIGN CM046", + direction="l", + linebreak="al", + unicodeslot=0x12FB3, + }, + [0x12FB4]={ + category="lo", + description="CYPRO-MINOAN SIGN CM047", + direction="l", + linebreak="al", + unicodeslot=0x12FB4, + }, + [0x12FB5]={ + category="lo", + description="CYPRO-MINOAN SIGN CM049", + direction="l", + linebreak="al", + unicodeslot=0x12FB5, + }, + [0x12FB6]={ + category="lo", + description="CYPRO-MINOAN SIGN CM050", + direction="l", + linebreak="al", + unicodeslot=0x12FB6, + }, + [0x12FB7]={ + category="lo", + description="CYPRO-MINOAN SIGN CM051", + direction="l", + linebreak="al", + unicodeslot=0x12FB7, + }, + [0x12FB8]={ + category="lo", + description="CYPRO-MINOAN SIGN CM052", + direction="l", + linebreak="al", + unicodeslot=0x12FB8, + }, + [0x12FB9]={ + category="lo", + description="CYPRO-MINOAN SIGN CM053", + direction="l", + linebreak="al", + unicodeslot=0x12FB9, + }, + [0x12FBA]={ + category="lo", + description="CYPRO-MINOAN SIGN CM054", + direction="l", + linebreak="al", + unicodeslot=0x12FBA, + }, + [0x12FBB]={ + category="lo", + description="CYPRO-MINOAN SIGN CM055", + direction="l", + linebreak="al", + unicodeslot=0x12FBB, + }, + [0x12FBC]={ + category="lo", + description="CYPRO-MINOAN SIGN CM056", + direction="l", + linebreak="al", + unicodeslot=0x12FBC, + }, + [0x12FBD]={ + category="lo", + description="CYPRO-MINOAN SIGN CM058", + direction="l", + linebreak="al", + unicodeslot=0x12FBD, + }, + [0x12FBE]={ + category="lo", + description="CYPRO-MINOAN SIGN CM059", + direction="l", + linebreak="al", + unicodeslot=0x12FBE, + }, + [0x12FBF]={ + category="lo", + description="CYPRO-MINOAN SIGN CM060", + direction="l", + linebreak="al", + unicodeslot=0x12FBF, + }, + [0x12FC0]={ + category="lo", + description="CYPRO-MINOAN SIGN CM061", + direction="l", + linebreak="al", + unicodeslot=0x12FC0, + }, + [0x12FC1]={ + category="lo", + description="CYPRO-MINOAN SIGN CM062", + direction="l", + linebreak="al", + unicodeslot=0x12FC1, + }, + [0x12FC2]={ + category="lo", + description="CYPRO-MINOAN SIGN CM063", + direction="l", + linebreak="al", + unicodeslot=0x12FC2, + }, + [0x12FC3]={ + category="lo", + description="CYPRO-MINOAN SIGN CM064", + direction="l", + linebreak="al", + unicodeslot=0x12FC3, + }, + [0x12FC4]={ + category="lo", + description="CYPRO-MINOAN SIGN CM066", + direction="l", + linebreak="al", + unicodeslot=0x12FC4, + }, + [0x12FC5]={ + category="lo", + description="CYPRO-MINOAN SIGN CM067", + direction="l", + linebreak="al", + unicodeslot=0x12FC5, + }, + [0x12FC6]={ + category="lo", + description="CYPRO-MINOAN SIGN CM068", + direction="l", + linebreak="al", + unicodeslot=0x12FC6, + }, + [0x12FC7]={ + category="lo", + description="CYPRO-MINOAN SIGN CM069", + direction="l", + linebreak="al", + unicodeslot=0x12FC7, + }, + [0x12FC8]={ + category="lo", + description="CYPRO-MINOAN SIGN CM070", + direction="l", + linebreak="al", + unicodeslot=0x12FC8, + }, + [0x12FC9]={ + category="lo", + description="CYPRO-MINOAN SIGN CM071", + direction="l", + linebreak="al", + unicodeslot=0x12FC9, + }, + [0x12FCA]={ + category="lo", + description="CYPRO-MINOAN SIGN CM072", + direction="l", + linebreak="al", + unicodeslot=0x12FCA, + }, + [0x12FCB]={ + category="lo", + description="CYPRO-MINOAN SIGN CM073", + direction="l", + linebreak="al", + unicodeslot=0x12FCB, + }, + [0x12FCC]={ + category="lo", + description="CYPRO-MINOAN SIGN CM074", + direction="l", + linebreak="al", + unicodeslot=0x12FCC, + }, + [0x12FCD]={ + category="lo", + description="CYPRO-MINOAN SIGN CM075", + direction="l", + linebreak="al", + unicodeslot=0x12FCD, + }, + [0x12FCE]={ + category="lo", + description="CYPRO-MINOAN SIGN CM075B", + direction="l", + linebreak="al", + unicodeslot=0x12FCE, + }, + [0x12FCF]={ + category="lo", + description="CYPRO-MINOAN SIGN CM076", + direction="l", + linebreak="al", + unicodeslot=0x12FCF, + }, + [0x12FD0]={ + category="lo", + description="CYPRO-MINOAN SIGN CM078", + direction="l", + linebreak="al", + unicodeslot=0x12FD0, + }, + [0x12FD1]={ + category="lo", + description="CYPRO-MINOAN SIGN CM079", + direction="l", + linebreak="al", + unicodeslot=0x12FD1, + }, + [0x12FD2]={ + category="lo", + description="CYPRO-MINOAN SIGN CM080", + direction="l", + linebreak="al", + unicodeslot=0x12FD2, + }, + [0x12FD3]={ + category="lo", + description="CYPRO-MINOAN SIGN CM081", + direction="l", + linebreak="al", + unicodeslot=0x12FD3, + }, + [0x12FD4]={ + category="lo", + description="CYPRO-MINOAN SIGN CM082", + direction="l", + linebreak="al", + unicodeslot=0x12FD4, + }, + [0x12FD5]={ + category="lo", + description="CYPRO-MINOAN SIGN CM083", + direction="l", + linebreak="al", + unicodeslot=0x12FD5, + }, + [0x12FD6]={ + category="lo", + description="CYPRO-MINOAN SIGN CM084", + direction="l", + linebreak="al", + unicodeslot=0x12FD6, + }, + [0x12FD7]={ + category="lo", + description="CYPRO-MINOAN SIGN CM085", + direction="l", + linebreak="al", + unicodeslot=0x12FD7, + }, + [0x12FD8]={ + category="lo", + description="CYPRO-MINOAN SIGN CM086", + direction="l", + linebreak="al", + unicodeslot=0x12FD8, + }, + [0x12FD9]={ + category="lo", + description="CYPRO-MINOAN SIGN CM087", + direction="l", + linebreak="al", + unicodeslot=0x12FD9, + }, + [0x12FDA]={ + category="lo", + description="CYPRO-MINOAN SIGN CM088", + direction="l", + linebreak="al", + unicodeslot=0x12FDA, + }, + [0x12FDB]={ + category="lo", + description="CYPRO-MINOAN SIGN CM089", + direction="l", + linebreak="al", + unicodeslot=0x12FDB, + }, + [0x12FDC]={ + category="lo", + description="CYPRO-MINOAN SIGN CM090", + direction="l", + linebreak="al", + unicodeslot=0x12FDC, + }, + [0x12FDD]={ + category="lo", + description="CYPRO-MINOAN SIGN CM091", + direction="l", + linebreak="al", + unicodeslot=0x12FDD, + }, + [0x12FDE]={ + category="lo", + description="CYPRO-MINOAN SIGN CM092", + direction="l", + linebreak="al", + unicodeslot=0x12FDE, + }, + [0x12FDF]={ + category="lo", + description="CYPRO-MINOAN SIGN CM094", + direction="l", + linebreak="al", + unicodeslot=0x12FDF, + }, + [0x12FE0]={ + category="lo", + description="CYPRO-MINOAN SIGN CM095", + direction="l", + linebreak="al", + unicodeslot=0x12FE0, + }, + [0x12FE1]={ + category="lo", + description="CYPRO-MINOAN SIGN CM096", + direction="l", + linebreak="al", + unicodeslot=0x12FE1, + }, + [0x12FE2]={ + category="lo", + description="CYPRO-MINOAN SIGN CM097", + direction="l", + linebreak="al", + unicodeslot=0x12FE2, + }, + [0x12FE3]={ + category="lo", + description="CYPRO-MINOAN SIGN CM098", + direction="l", + linebreak="al", + unicodeslot=0x12FE3, + }, + [0x12FE4]={ + category="lo", + description="CYPRO-MINOAN SIGN CM099", + direction="l", + linebreak="al", + unicodeslot=0x12FE4, + }, + [0x12FE5]={ + category="lo", + description="CYPRO-MINOAN SIGN CM100", + direction="l", + linebreak="al", + unicodeslot=0x12FE5, + }, + [0x12FE6]={ + category="lo", + description="CYPRO-MINOAN SIGN CM101", + direction="l", + linebreak="al", + unicodeslot=0x12FE6, + }, + [0x12FE7]={ + category="lo", + description="CYPRO-MINOAN SIGN CM102", + direction="l", + linebreak="al", + unicodeslot=0x12FE7, + }, + [0x12FE8]={ + category="lo", + description="CYPRO-MINOAN SIGN CM103", + direction="l", + linebreak="al", + unicodeslot=0x12FE8, + }, + [0x12FE9]={ + category="lo", + description="CYPRO-MINOAN SIGN CM104", + direction="l", + linebreak="al", + unicodeslot=0x12FE9, + }, + [0x12FEA]={ + category="lo", + description="CYPRO-MINOAN SIGN CM105", + direction="l", + linebreak="al", + unicodeslot=0x12FEA, + }, + [0x12FEB]={ + category="lo", + description="CYPRO-MINOAN SIGN CM107", + direction="l", + linebreak="al", + unicodeslot=0x12FEB, + }, + [0x12FEC]={ + category="lo", + description="CYPRO-MINOAN SIGN CM108", + direction="l", + linebreak="al", + unicodeslot=0x12FEC, + }, + [0x12FED]={ + category="lo", + description="CYPRO-MINOAN SIGN CM109", + direction="l", + linebreak="al", + unicodeslot=0x12FED, + }, + [0x12FEE]={ + category="lo", + description="CYPRO-MINOAN SIGN CM110", + direction="l", + linebreak="al", + unicodeslot=0x12FEE, + }, + [0x12FEF]={ + category="lo", + description="CYPRO-MINOAN SIGN CM112", + direction="l", + linebreak="al", + unicodeslot=0x12FEF, + }, + [0x12FF0]={ + category="lo", + description="CYPRO-MINOAN SIGN CM114", + direction="l", + linebreak="al", + unicodeslot=0x12FF0, + }, + [0x12FF1]={ + category="po", + description="CYPRO-MINOAN SIGN CM301", + direction="l", + linebreak="al", + unicodeslot=0x12FF1, + }, + [0x12FF2]={ + category="po", + description="CYPRO-MINOAN SIGN CM302", + direction="l", + linebreak="al", + unicodeslot=0x12FF2, + }, [0x13000]={ category="lo", description="EGYPTIAN HIEROGLYPH A001", @@ -182325,6 +186621,7 @@ characters.data={ direction="l", linebreak="al", unicodeslot=0x13091, + variants=variants_90, }, [0x13092]={ category="lo", @@ -182332,6 +186629,7 @@ characters.data={ direction="l", linebreak="al", unicodeslot=0x13092, + variants=variants_90, }, [0x13093]={ category="lo", @@ -182339,6 +186637,7 @@ characters.data={ direction="l", linebreak="al", unicodeslot=0x13093, + variants=variants_180, }, [0x13094]={ category="lo", @@ -182493,6 +186792,7 @@ characters.data={ direction="l", linebreak="al", unicodeslot=0x130A9, + variants=variants_180, }, [0x130AA]={ category="lo", @@ -183207,6 +187507,7 @@ characters.data={ direction="l", linebreak="al", unicodeslot=0x1310F, + variants=variants_90, }, [0x13110]={ category="lo", @@ -183263,6 +187564,7 @@ characters.data={ direction="l", linebreak="al", unicodeslot=0x13117, + variants=variants_270, }, [0x13118]={ category="lo", @@ -183298,6 +187600,7 @@ characters.data={ direction="l", linebreak="al", unicodeslot=0x1311C, + variants=variants_90, }, [0x1311D]={ category="lo", @@ -183333,6 +187636,7 @@ characters.data={ direction="l", linebreak="al", unicodeslot=0x13121, + variants=variants_90, }, [0x13122]={ category="lo", @@ -183375,6 +187679,7 @@ characters.data={ direction="l", linebreak="al", unicodeslot=0x13127, + variants=variants_90, }, [0x13128]={ category="lo", @@ -183501,6 +187806,7 @@ characters.data={ direction="l", linebreak="al", unicodeslot=0x13139, + variants=variants_90_270, }, [0x1313A]={ category="lo", @@ -184019,6 +188325,7 @@ characters.data={ direction="l", linebreak="al", unicodeslot=0x13183, + variants=variants_270, }, [0x13184]={ category="lo", @@ -184047,6 +188354,7 @@ characters.data={ direction="l", linebreak="al", unicodeslot=0x13187, + variants=variants_180, }, [0x13188]={ category="lo", @@ -184222,6 +188530,7 @@ characters.data={ direction="l", linebreak="al", unicodeslot=0x131A0, + variants=variants_90_270, }, [0x131A1]={ category="lo", @@ -184341,6 +188650,7 @@ characters.data={ direction="l", linebreak="al", unicodeslot=0x131B1, + variants=variants_90_180, }, [0x131B2]={ category="lo", @@ -184390,6 +188700,7 @@ characters.data={ direction="l", linebreak="al", unicodeslot=0x131B8, + variants=variants_90, }, [0x131B9]={ category="lo", @@ -184397,6 +188708,7 @@ characters.data={ direction="l", linebreak="al", unicodeslot=0x131B9, + variants=variants_90, }, [0x131BA]={ category="lo", @@ -184404,6 +188716,7 @@ characters.data={ direction="l", linebreak="al", unicodeslot=0x131BA, + variants=variants_270, }, [0x131BB]={ category="lo", @@ -184523,6 +188836,7 @@ characters.data={ direction="l", linebreak="al", unicodeslot=0x131CB, + variants=variants_90, }, [0x131CC]={ category="lo", @@ -184768,6 +189082,7 @@ characters.data={ direction="l", linebreak="al", unicodeslot=0x131EE, + variants=variants_180_270, }, [0x131EF]={ category="lo", @@ -184838,6 +189153,7 @@ characters.data={ direction="l", linebreak="al", unicodeslot=0x131F8, + variants=variants_180, }, [0x131F9]={ category="lo", @@ -184845,6 +189161,7 @@ characters.data={ direction="l", linebreak="al", unicodeslot=0x131F9, + variants=variants_90_180, }, [0x131FA]={ category="lo", @@ -184852,6 +189169,7 @@ characters.data={ direction="l", linebreak="al", unicodeslot=0x131FA, + variants=variants_90_180, }, [0x131FB]={ category="lo", @@ -185048,6 +189366,7 @@ characters.data={ direction="l", linebreak="al", unicodeslot=0x13216, + variants=variants_270, }, [0x13217]={ category="lo", @@ -185503,6 +189822,7 @@ characters.data={ direction="l", linebreak="al", unicodeslot=0x13257, + variants=variants_180, }, [0x13258]={ category="lo", @@ -185755,6 +190075,7 @@ characters.data={ direction="l", linebreak="al", unicodeslot=0x1327B, + variants=variants_270, }, [0x1327C]={ category="lo", @@ -185783,6 +190104,7 @@ characters.data={ direction="l", linebreak="al", unicodeslot=0x1327F, + variants=variants_90_180, }, [0x13280]={ category="lo", @@ -185825,6 +190147,7 @@ characters.data={ direction="l", linebreak="al", unicodeslot=0x13285, + variants=variants_90, }, [0x13286]={ category="lo", @@ -185874,6 +190197,7 @@ characters.data={ direction="l", linebreak="al", unicodeslot=0x1328C, + variants=variants_90, }, [0x1328D]={ category="lo", @@ -186042,6 +190366,7 @@ characters.data={ direction="l", linebreak="al", unicodeslot=0x132A4, + variants=variants_180_270, }, [0x132A5]={ category="lo", @@ -186084,6 +190409,7 @@ characters.data={ direction="l", linebreak="al", unicodeslot=0x132AA, + variants=variants_90, }, [0x132AB]={ category="lo", @@ -186315,6 +190641,7 @@ characters.data={ direction="l", linebreak="al", unicodeslot=0x132CB, + variants=variants_90, }, [0x132CC]={ category="lo", @@ -186434,6 +190761,7 @@ characters.data={ direction="l", linebreak="al", unicodeslot=0x132DC, + variants=variants_90, }, [0x132DD]={ category="lo", @@ -186511,6 +190839,7 @@ characters.data={ direction="l", linebreak="al", unicodeslot=0x132E7, + variants=variants_90_270, }, [0x132E8]={ category="lo", @@ -186525,6 +190854,7 @@ characters.data={ direction="l", linebreak="al", unicodeslot=0x132E9, + variants=variants_270, }, [0x132EA]={ category="lo", @@ -186630,6 +190960,7 @@ characters.data={ direction="l", linebreak="al", unicodeslot=0x132F8, + variants=variants_270, }, [0x132F9]={ category="lo", @@ -186665,6 +190996,7 @@ characters.data={ direction="l", linebreak="al", unicodeslot=0x132FD, + variants=variants_270, }, [0x132FE]={ category="lo", @@ -186700,6 +191032,7 @@ characters.data={ direction="l", linebreak="al", unicodeslot=0x13302, + variants=variants_270, }, [0x13303]={ category="lo", @@ -186707,6 +191040,7 @@ characters.data={ direction="l", linebreak="al", unicodeslot=0x13303, + variants=variants_270, }, [0x13304]={ category="lo", @@ -186735,6 +191069,7 @@ characters.data={ direction="l", linebreak="al", unicodeslot=0x13307, + variants=variants_90, }, [0x13308]={ category="lo", @@ -186742,6 +191077,7 @@ characters.data={ direction="l", linebreak="al", unicodeslot=0x13308, + variants=variants_180, }, [0x13309]={ category="lo", @@ -186798,6 +191134,7 @@ characters.data={ direction="l", linebreak="al", unicodeslot=0x13310, + variants=variants_270, }, [0x13311]={ category="lo", @@ -186805,6 +191142,7 @@ characters.data={ direction="l", linebreak="al", unicodeslot=0x13311, + variants=variants_270, }, [0x13312]={ category="lo", @@ -186812,6 +191150,7 @@ characters.data={ direction="l", linebreak="al", unicodeslot=0x13312, + variants=variants_180_270, }, [0x13313]={ category="lo", @@ -186819,6 +191158,7 @@ characters.data={ direction="l", linebreak="al", unicodeslot=0x13313, + variants=variants_180_270, }, [0x13314]={ category="lo", @@ -186826,6 +191166,7 @@ characters.data={ direction="l", linebreak="al", unicodeslot=0x13314, + variants=variants_180_270, }, [0x13315]={ category="lo", @@ -186875,6 +191216,7 @@ characters.data={ direction="l", linebreak="al", unicodeslot=0x1331B, + variants=variants_90_180, }, [0x1331C]={ category="lo", @@ -186882,6 +191224,7 @@ characters.data={ direction="l", linebreak="al", unicodeslot=0x1331C, + variants=variants_270, }, [0x1331D]={ category="lo", @@ -186917,6 +191260,7 @@ characters.data={ direction="l", linebreak="al", unicodeslot=0x13321, + variants=variants_180_270, }, [0x13322]={ category="lo", @@ -186924,6 +191268,7 @@ characters.data={ direction="l", linebreak="al", unicodeslot=0x13322, + variants=variants_90_180, }, [0x13323]={ category="lo", @@ -187029,6 +191374,7 @@ characters.data={ direction="l", linebreak="al", unicodeslot=0x13331, + variants=variants_180_270, }, [0x13332]={ category="lo", @@ -187099,6 +191445,7 @@ characters.data={ direction="l", linebreak="al", unicodeslot=0x1333B, + variants=variants_90, }, [0x1333C]={ category="lo", @@ -187106,6 +191453,7 @@ characters.data={ direction="l", linebreak="al", unicodeslot=0x1333C, + variants=variants_90, }, [0x1333D]={ category="lo", @@ -187204,6 +191552,7 @@ characters.data={ direction="l", linebreak="al", unicodeslot=0x1334A, + variants=variants_270, }, [0x1334B]={ category="lo", @@ -187365,6 +191714,7 @@ characters.data={ direction="l", linebreak="al", unicodeslot=0x13361, + variants=variants_270, }, [0x13362]={ category="lo", @@ -187491,6 +191841,7 @@ characters.data={ direction="l", linebreak="al", unicodeslot=0x13373, + variants=variants_270, }, [0x13374]={ category="lo", @@ -187519,6 +191870,7 @@ characters.data={ direction="l", linebreak="al", unicodeslot=0x13377, + variants=variants_90, }, [0x13378]={ category="lo", @@ -187526,6 +191878,7 @@ characters.data={ direction="l", linebreak="al", unicodeslot=0x13378, + variants=variants_90, }, [0x13379]={ category="lo", @@ -187561,6 +191914,7 @@ characters.data={ direction="l", linebreak="al", unicodeslot=0x1337D, + variants=variants_270, }, [0x1337E]={ category="lo", @@ -187617,6 +191971,7 @@ characters.data={ direction="l", linebreak="al", unicodeslot=0x13385, + variants=variants_270, }, [0x13386]={ category="lo", @@ -187757,6 +192112,7 @@ characters.data={ direction="l", linebreak="al", unicodeslot=0x13399, + variants=variants_90, }, [0x1339A]={ category="lo", @@ -187764,6 +192120,7 @@ characters.data={ direction="l", linebreak="al", unicodeslot=0x1339A, + variants=variants_90, }, [0x1339B]={ category="lo", @@ -187911,6 +192268,7 @@ characters.data={ direction="l", linebreak="al", unicodeslot=0x133AF, + variants=variants_270, }, [0x133B0]={ category="lo", @@ -187918,6 +192276,7 @@ characters.data={ direction="l", linebreak="al", unicodeslot=0x133B0, + variants=variants_270, }, [0x133B1]={ category="lo", @@ -188023,6 +192382,7 @@ characters.data={ direction="l", linebreak="al", unicodeslot=0x133BF, + variants=variants_270, }, [0x133C0]={ category="lo", @@ -188163,6 +192523,7 @@ characters.data={ direction="l", linebreak="al", unicodeslot=0x133D3, + variants=variants_90, }, [0x133D4]={ category="lo", @@ -188233,6 +192594,7 @@ characters.data={ direction="l", linebreak="al", unicodeslot=0x133DD, + variants=variants_270, }, [0x133DE]={ category="lo", @@ -188380,6 +192742,7 @@ characters.data={ direction="l", linebreak="al", unicodeslot=0x133F2, + variants=variants_90, }, [0x133F3]={ category="lo", @@ -188401,6 +192764,7 @@ characters.data={ direction="l", linebreak="al", unicodeslot=0x133F5, + variants=variants_90, }, [0x133F6]={ category="lo", @@ -188408,6 +192772,7 @@ characters.data={ direction="l", linebreak="al", unicodeslot=0x133F6, + variants=variants_90, }, [0x133F7]={ category="lo", @@ -188499,6 +192864,7 @@ characters.data={ direction="l", linebreak="al", unicodeslot=0x13403, + variants=variants_90, }, [0x13404]={ category="lo", @@ -188632,6 +192998,7 @@ characters.data={ direction="l", linebreak="al", unicodeslot=0x13416, + variants=variants_90, }, [0x13417]={ category="lo", @@ -188653,6 +193020,7 @@ characters.data={ direction="l", linebreak="al", unicodeslot=0x13419, + variants=variants_90_180_270, }, [0x1341A]={ category="lo", @@ -188660,6 +193028,7 @@ characters.data={ direction="l", linebreak="al", unicodeslot=0x1341A, + variants=variants_90, }, [0x1341B]={ category="lo", @@ -188723,6 +193092,7 @@ characters.data={ direction="l", linebreak="al", unicodeslot=0x13423, + variants=variants_90, }, [0x13424]={ category="lo", @@ -188786,6 +193156,7 @@ characters.data={ direction="l", linebreak="al", unicodeslot=0x1342C, + variants=variants_270, }, [0x1342D]={ category="lo", @@ -188800,6 +193171,14 @@ characters.data={ direction="l", linebreak="al", unicodeslot=0x1342E, + variants=variants_270, + }, + [0x1342F]={ + category="lo", + description="EGYPTIAN HIEROGLYPH V011D", + direction="l", + linebreak="al", + unicodeslot=0x1342F, }, [0x13430]={ category="cf", @@ -188864,6 +193243,213 @@ characters.data={ linebreak="cl", unicodeslot=0x13438, }, + [0x13439]={ + category="cf", + description="EGYPTIAN HIEROGLYPH INSERT AT MIDDLE", + direction="l", + linebreak="gl", + unicodeslot=0x13439, + }, + [0x1343A]={ + category="cf", + description="EGYPTIAN HIEROGLYPH INSERT AT TOP", + direction="l", + linebreak="gl", + unicodeslot=0x1343A, + }, + [0x1343B]={ + category="cf", + description="EGYPTIAN HIEROGLYPH INSERT AT BOTTOM", + direction="l", + linebreak="gl", + unicodeslot=0x1343B, + }, + [0x1343C]={ + category="cf", + description="EGYPTIAN HIEROGLYPH BEGIN ENCLOSURE", + direction="l", + linebreak="op", + unicodeslot=0x1343C, + }, + [0x1343D]={ + category="cf", + description="EGYPTIAN HIEROGLYPH END ENCLOSURE", + direction="l", + linebreak="cl", + unicodeslot=0x1343D, + }, + [0x1343E]={ + category="cf", + description="EGYPTIAN HIEROGLYPH BEGIN WALLED ENCLOSURE", + direction="l", + linebreak="op", + unicodeslot=0x1343E, + }, + [0x1343F]={ + category="cf", + description="EGYPTIAN HIEROGLYPH END WALLED ENCLOSURE", + direction="l", + linebreak="cl", + unicodeslot=0x1343F, + }, + [0x13440]={ + category="mn", + description="EGYPTIAN HIEROGLYPH MIRROR HORIZONTALLY", + direction="nsm", + linebreak="cm", + unicodeslot=0x13440, + }, + [0x13441]={ + category="lo", + description="EGYPTIAN HIEROGLYPH FULL BLANK", + direction="l", + linebreak="al", + unicodeslot=0x13441, + }, + [0x13442]={ + category="lo", + description="EGYPTIAN HIEROGLYPH HALF BLANK", + direction="l", + linebreak="al", + unicodeslot=0x13442, + }, + [0x13443]={ + category="lo", + description="EGYPTIAN HIEROGLYPH LOST SIGN", + direction="l", + linebreak="al", + unicodeslot=0x13443, + variants=variants_expanded, + }, + [0x13444]={ + category="lo", + description="EGYPTIAN HIEROGLYPH HALF LOST SIGN", + direction="l", + linebreak="al", + unicodeslot=0x13444, + variants=variants_expanded, + }, + [0x13445]={ + category="lo", + description="EGYPTIAN HIEROGLYPH TALL LOST SIGN", + direction="l", + linebreak="al", + unicodeslot=0x13445, + variants=variants_expanded, + }, + [0x13446]={ + category="lo", + description="EGYPTIAN HIEROGLYPH WIDE LOST SIGN", + direction="l", + linebreak="al", + unicodeslot=0x13446, + variants=variants_expanded, + }, + [0x13447]={ + category="mn", + description="EGYPTIAN HIEROGLYPH MODIFIER DAMAGED AT TOP START", + direction="nsm", + linebreak="cm", + unicodeslot=0x13447, + }, + [0x13448]={ + category="mn", + description="EGYPTIAN HIEROGLYPH MODIFIER DAMAGED AT BOTTOM START", + direction="nsm", + linebreak="cm", + unicodeslot=0x13448, + }, + [0x13449]={ + category="mn", + description="EGYPTIAN HIEROGLYPH MODIFIER DAMAGED AT START", + direction="nsm", + linebreak="cm", + unicodeslot=0x13449, + }, + [0x1344A]={ + category="mn", + description="EGYPTIAN HIEROGLYPH MODIFIER DAMAGED AT TOP END", + direction="nsm", + linebreak="cm", + unicodeslot=0x1344A, + }, + [0x1344B]={ + category="mn", + description="EGYPTIAN HIEROGLYPH MODIFIER DAMAGED AT TOP", + direction="nsm", + linebreak="cm", + unicodeslot=0x1344B, + }, + [0x1344C]={ + category="mn", + description="EGYPTIAN HIEROGLYPH MODIFIER DAMAGED AT BOTTOM START AND TOP END", + direction="nsm", + linebreak="cm", + unicodeslot=0x1344C, + }, + [0x1344D]={ + category="mn", + description="EGYPTIAN HIEROGLYPH MODIFIER DAMAGED AT START AND TOP", + direction="nsm", + linebreak="cm", + unicodeslot=0x1344D, + }, + [0x1344E]={ + category="mn", + description="EGYPTIAN HIEROGLYPH MODIFIER DAMAGED AT BOTTOM END", + direction="nsm", + linebreak="cm", + unicodeslot=0x1344E, + }, + [0x1344F]={ + category="mn", + description="EGYPTIAN HIEROGLYPH MODIFIER DAMAGED AT TOP START AND BOTTOM END", + direction="nsm", + linebreak="cm", + unicodeslot=0x1344F, + }, + [0x13450]={ + category="mn", + description="EGYPTIAN HIEROGLYPH MODIFIER DAMAGED AT BOTTOM", + direction="nsm", + linebreak="cm", + unicodeslot=0x13450, + }, + [0x13451]={ + category="mn", + description="EGYPTIAN HIEROGLYPH MODIFIER DAMAGED AT START AND BOTTOM", + direction="nsm", + linebreak="cm", + unicodeslot=0x13451, + }, + [0x13452]={ + category="mn", + description="EGYPTIAN HIEROGLYPH MODIFIER DAMAGED AT END", + direction="nsm", + linebreak="cm", + unicodeslot=0x13452, + }, + [0x13453]={ + category="mn", + description="EGYPTIAN HIEROGLYPH MODIFIER DAMAGED AT TOP AND END", + direction="nsm", + linebreak="cm", + unicodeslot=0x13453, + }, + [0x13454]={ + category="mn", + description="EGYPTIAN HIEROGLYPH MODIFIER DAMAGED AT BOTTOM AND END", + direction="nsm", + linebreak="cm", + unicodeslot=0x13454, + }, + [0x13455]={ + category="mn", + description="EGYPTIAN HIEROGLYPH MODIFIER DAMAGED", + direction="nsm", + linebreak="cm", + unicodeslot=0x13455, + }, [0x14400]={ category="lo", description="ANATOLIAN HIEROGLYPH A001", @@ -197229,6 +201815,629 @@ characters.data={ linebreak="ba", unicodeslot=0x16A6F, }, + [0x16A70]={ + category="lo", + description="TANGSA LETTER OZ", + direction="l", + linebreak="al", + unicodeslot=0x16A70, + }, + [0x16A71]={ + category="lo", + description="TANGSA LETTER OC", + direction="l", + linebreak="al", + unicodeslot=0x16A71, + }, + [0x16A72]={ + category="lo", + description="TANGSA LETTER OQ", + direction="l", + linebreak="al", + unicodeslot=0x16A72, + }, + [0x16A73]={ + category="lo", + description="TANGSA LETTER OX", + direction="l", + linebreak="al", + unicodeslot=0x16A73, + }, + [0x16A74]={ + category="lo", + description="TANGSA LETTER AZ", + direction="l", + linebreak="al", + unicodeslot=0x16A74, + }, + [0x16A75]={ + category="lo", + description="TANGSA LETTER AC", + direction="l", + linebreak="al", + unicodeslot=0x16A75, + }, + [0x16A76]={ + category="lo", + description="TANGSA LETTER AQ", + direction="l", + linebreak="al", + unicodeslot=0x16A76, + }, + [0x16A77]={ + category="lo", + description="TANGSA LETTER AX", + direction="l", + linebreak="al", + unicodeslot=0x16A77, + }, + [0x16A78]={ + category="lo", + description="TANGSA LETTER VZ", + direction="l", + linebreak="al", + unicodeslot=0x16A78, + }, + [0x16A79]={ + category="lo", + description="TANGSA LETTER VC", + direction="l", + linebreak="al", + unicodeslot=0x16A79, + }, + [0x16A7A]={ + category="lo", + description="TANGSA LETTER VQ", + direction="l", + linebreak="al", + unicodeslot=0x16A7A, + }, + [0x16A7B]={ + category="lo", + description="TANGSA LETTER VX", + direction="l", + linebreak="al", + unicodeslot=0x16A7B, + }, + [0x16A7C]={ + category="lo", + description="TANGSA LETTER EZ", + direction="l", + linebreak="al", + unicodeslot=0x16A7C, + }, + [0x16A7D]={ + category="lo", + description="TANGSA LETTER EC", + direction="l", + linebreak="al", + unicodeslot=0x16A7D, + }, + [0x16A7E]={ + category="lo", + description="TANGSA LETTER EQ", + direction="l", + linebreak="al", + unicodeslot=0x16A7E, + }, + [0x16A7F]={ + category="lo", + description="TANGSA LETTER EX", + direction="l", + linebreak="al", + unicodeslot=0x16A7F, + }, + [0x16A80]={ + category="lo", + description="TANGSA LETTER IZ", + direction="l", + linebreak="al", + unicodeslot=0x16A80, + }, + [0x16A81]={ + category="lo", + description="TANGSA LETTER IC", + direction="l", + linebreak="al", + unicodeslot=0x16A81, + }, + [0x16A82]={ + category="lo", + description="TANGSA LETTER IQ", + direction="l", + linebreak="al", + unicodeslot=0x16A82, + }, + [0x16A83]={ + category="lo", + description="TANGSA LETTER IX", + direction="l", + linebreak="al", + unicodeslot=0x16A83, + }, + [0x16A84]={ + category="lo", + description="TANGSA LETTER UZ", + direction="l", + linebreak="al", + unicodeslot=0x16A84, + }, + [0x16A85]={ + category="lo", + description="TANGSA LETTER UC", + direction="l", + linebreak="al", + unicodeslot=0x16A85, + }, + [0x16A86]={ + category="lo", + description="TANGSA LETTER UQ", + direction="l", + linebreak="al", + unicodeslot=0x16A86, + }, + [0x16A87]={ + category="lo", + description="TANGSA LETTER UX", + direction="l", + linebreak="al", + unicodeslot=0x16A87, + }, + [0x16A88]={ + category="lo", + description="TANGSA LETTER AWZ", + direction="l", + linebreak="al", + unicodeslot=0x16A88, + }, + [0x16A89]={ + category="lo", + description="TANGSA LETTER AWC", + direction="l", + linebreak="al", + unicodeslot=0x16A89, + }, + [0x16A8A]={ + category="lo", + description="TANGSA LETTER AWQ", + direction="l", + linebreak="al", + unicodeslot=0x16A8A, + }, + [0x16A8B]={ + category="lo", + description="TANGSA LETTER AWX", + direction="l", + linebreak="al", + unicodeslot=0x16A8B, + }, + [0x16A8C]={ + category="lo", + description="TANGSA LETTER UIZ", + direction="l", + linebreak="al", + unicodeslot=0x16A8C, + }, + [0x16A8D]={ + category="lo", + description="TANGSA LETTER UIC", + direction="l", + linebreak="al", + unicodeslot=0x16A8D, + }, + [0x16A8E]={ + category="lo", + description="TANGSA LETTER UIQ", + direction="l", + linebreak="al", + unicodeslot=0x16A8E, + }, + [0x16A8F]={ + category="lo", + description="TANGSA LETTER UIX", + direction="l", + linebreak="al", + unicodeslot=0x16A8F, + }, + [0x16A90]={ + category="lo", + description="TANGSA LETTER FINAL NG", + direction="l", + linebreak="al", + unicodeslot=0x16A90, + }, + [0x16A91]={ + category="lo", + description="TANGSA LETTER LONG UEX", + direction="l", + linebreak="al", + unicodeslot=0x16A91, + }, + [0x16A92]={ + category="lo", + description="TANGSA LETTER SHORT UEZ", + direction="l", + linebreak="al", + unicodeslot=0x16A92, + }, + [0x16A93]={ + category="lo", + description="TANGSA LETTER SHORT AWX", + direction="l", + linebreak="al", + unicodeslot=0x16A93, + }, + [0x16A94]={ + category="lo", + description="TANGSA LETTER UEC", + direction="l", + linebreak="al", + unicodeslot=0x16A94, + }, + [0x16A95]={ + category="lo", + description="TANGSA LETTER UEZ", + direction="l", + linebreak="al", + unicodeslot=0x16A95, + }, + [0x16A96]={ + category="lo", + description="TANGSA LETTER UEQ", + direction="l", + linebreak="al", + unicodeslot=0x16A96, + }, + [0x16A97]={ + category="lo", + description="TANGSA LETTER UEX", + direction="l", + linebreak="al", + unicodeslot=0x16A97, + }, + [0x16A98]={ + category="lo", + description="TANGSA LETTER UIUZ", + direction="l", + linebreak="al", + unicodeslot=0x16A98, + }, + [0x16A99]={ + category="lo", + description="TANGSA LETTER UIUC", + direction="l", + linebreak="al", + unicodeslot=0x16A99, + }, + [0x16A9A]={ + category="lo", + description="TANGSA LETTER UIUQ", + direction="l", + linebreak="al", + unicodeslot=0x16A9A, + }, + [0x16A9B]={ + category="lo", + description="TANGSA LETTER UIUX", + direction="l", + linebreak="al", + unicodeslot=0x16A9B, + }, + [0x16A9C]={ + category="lo", + description="TANGSA LETTER MZ", + direction="l", + linebreak="al", + unicodeslot=0x16A9C, + }, + [0x16A9D]={ + category="lo", + description="TANGSA LETTER MC", + direction="l", + linebreak="al", + unicodeslot=0x16A9D, + }, + [0x16A9E]={ + category="lo", + description="TANGSA LETTER MQ", + direction="l", + linebreak="al", + unicodeslot=0x16A9E, + }, + [0x16A9F]={ + category="lo", + description="TANGSA LETTER MX", + direction="l", + linebreak="al", + unicodeslot=0x16A9F, + }, + [0x16AA0]={ + category="lo", + description="TANGSA LETTER KA", + direction="l", + linebreak="al", + unicodeslot=0x16AA0, + }, + [0x16AA1]={ + category="lo", + description="TANGSA LETTER KHA", + direction="l", + linebreak="al", + unicodeslot=0x16AA1, + }, + [0x16AA2]={ + category="lo", + description="TANGSA LETTER GA", + direction="l", + linebreak="al", + unicodeslot=0x16AA2, + }, + [0x16AA3]={ + category="lo", + description="TANGSA LETTER NGA", + direction="l", + linebreak="al", + unicodeslot=0x16AA3, + }, + [0x16AA4]={ + category="lo", + description="TANGSA LETTER SA", + direction="l", + linebreak="al", + unicodeslot=0x16AA4, + }, + [0x16AA5]={ + category="lo", + description="TANGSA LETTER YA", + direction="l", + linebreak="al", + unicodeslot=0x16AA5, + }, + [0x16AA6]={ + category="lo", + description="TANGSA LETTER WA", + direction="l", + linebreak="al", + unicodeslot=0x16AA6, + }, + [0x16AA7]={ + category="lo", + description="TANGSA LETTER PA", + direction="l", + linebreak="al", + unicodeslot=0x16AA7, + }, + [0x16AA8]={ + category="lo", + description="TANGSA LETTER NYA", + direction="l", + linebreak="al", + unicodeslot=0x16AA8, + }, + [0x16AA9]={ + category="lo", + description="TANGSA LETTER PHA", + direction="l", + linebreak="al", + unicodeslot=0x16AA9, + }, + [0x16AAA]={ + category="lo", + description="TANGSA LETTER BA", + direction="l", + linebreak="al", + unicodeslot=0x16AAA, + }, + [0x16AAB]={ + category="lo", + description="TANGSA LETTER MA", + direction="l", + linebreak="al", + unicodeslot=0x16AAB, + }, + [0x16AAC]={ + category="lo", + description="TANGSA LETTER NA", + direction="l", + linebreak="al", + unicodeslot=0x16AAC, + }, + [0x16AAD]={ + category="lo", + description="TANGSA LETTER HA", + direction="l", + linebreak="al", + unicodeslot=0x16AAD, + }, + [0x16AAE]={ + category="lo", + description="TANGSA LETTER LA", + direction="l", + linebreak="al", + unicodeslot=0x16AAE, + }, + [0x16AAF]={ + category="lo", + description="TANGSA LETTER HTA", + direction="l", + linebreak="al", + unicodeslot=0x16AAF, + }, + [0x16AB0]={ + category="lo", + description="TANGSA LETTER TA", + direction="l", + linebreak="al", + unicodeslot=0x16AB0, + }, + [0x16AB1]={ + category="lo", + description="TANGSA LETTER DA", + direction="l", + linebreak="al", + unicodeslot=0x16AB1, + }, + [0x16AB2]={ + category="lo", + description="TANGSA LETTER RA", + direction="l", + linebreak="al", + unicodeslot=0x16AB2, + }, + [0x16AB3]={ + category="lo", + description="TANGSA LETTER NHA", + direction="l", + linebreak="al", + unicodeslot=0x16AB3, + }, + [0x16AB4]={ + category="lo", + description="TANGSA LETTER SHA", + direction="l", + linebreak="al", + unicodeslot=0x16AB4, + }, + [0x16AB5]={ + category="lo", + description="TANGSA LETTER CA", + direction="l", + linebreak="al", + unicodeslot=0x16AB5, + }, + [0x16AB6]={ + category="lo", + description="TANGSA LETTER TSA", + direction="l", + linebreak="al", + unicodeslot=0x16AB6, + }, + [0x16AB7]={ + category="lo", + description="TANGSA LETTER GHA", + direction="l", + linebreak="al", + unicodeslot=0x16AB7, + }, + [0x16AB8]={ + category="lo", + description="TANGSA LETTER HTTA", + direction="l", + linebreak="al", + unicodeslot=0x16AB8, + }, + [0x16AB9]={ + category="lo", + description="TANGSA LETTER THA", + direction="l", + linebreak="al", + unicodeslot=0x16AB9, + }, + [0x16ABA]={ + category="lo", + description="TANGSA LETTER XA", + direction="l", + linebreak="al", + unicodeslot=0x16ABA, + }, + [0x16ABB]={ + category="lo", + description="TANGSA LETTER FA", + direction="l", + linebreak="al", + unicodeslot=0x16ABB, + }, + [0x16ABC]={ + category="lo", + description="TANGSA LETTER DHA", + direction="l", + linebreak="al", + unicodeslot=0x16ABC, + }, + [0x16ABD]={ + category="lo", + description="TANGSA LETTER CHA", + direction="l", + linebreak="al", + unicodeslot=0x16ABD, + }, + [0x16ABE]={ + category="lo", + description="TANGSA LETTER ZA", + direction="l", + linebreak="al", + unicodeslot=0x16ABE, + }, + [0x16AC0]={ + category="nd", + description="TANGSA DIGIT ZERO", + direction="l", + linebreak="nu", + unicodeslot=0x16AC0, + }, + [0x16AC1]={ + category="nd", + description="TANGSA DIGIT ONE", + direction="l", + linebreak="nu", + unicodeslot=0x16AC1, + }, + [0x16AC2]={ + category="nd", + description="TANGSA DIGIT TWO", + direction="l", + linebreak="nu", + unicodeslot=0x16AC2, + }, + [0x16AC3]={ + category="nd", + description="TANGSA DIGIT THREE", + direction="l", + linebreak="nu", + unicodeslot=0x16AC3, + }, + [0x16AC4]={ + category="nd", + description="TANGSA DIGIT FOUR", + direction="l", + linebreak="nu", + unicodeslot=0x16AC4, + }, + [0x16AC5]={ + category="nd", + description="TANGSA DIGIT FIVE", + direction="l", + linebreak="nu", + unicodeslot=0x16AC5, + }, + [0x16AC6]={ + category="nd", + description="TANGSA DIGIT SIX", + direction="l", + linebreak="nu", + unicodeslot=0x16AC6, + }, + [0x16AC7]={ + category="nd", + description="TANGSA DIGIT SEVEN", + direction="l", + linebreak="nu", + unicodeslot=0x16AC7, + }, + [0x16AC8]={ + category="nd", + description="TANGSA DIGIT EIGHT", + direction="l", + linebreak="nu", + unicodeslot=0x16AC8, + }, + [0x16AC9]={ + category="nd", + description="TANGSA DIGIT NINE", + direction="l", + linebreak="nu", + unicodeslot=0x16AC9, + }, [0x16AD0]={ category="lo", description="BASSA VAH LETTER ENNI", @@ -198386,6 +203595,7 @@ characters.data={ category="lu", description="MEDEFAIDRIN CAPITAL LETTER M", direction="l", + lccode=0x16E60, linebreak="al", unicodeslot=0x16E40, }, @@ -198393,6 +203603,7 @@ characters.data={ category="lu", description="MEDEFAIDRIN CAPITAL LETTER S", direction="l", + lccode=0x16E61, linebreak="al", unicodeslot=0x16E41, }, @@ -198400,6 +203611,7 @@ characters.data={ category="lu", description="MEDEFAIDRIN CAPITAL LETTER V", direction="l", + lccode=0x16E62, linebreak="al", unicodeslot=0x16E42, }, @@ -198407,6 +203619,7 @@ characters.data={ category="lu", description="MEDEFAIDRIN CAPITAL LETTER W", direction="l", + lccode=0x16E63, linebreak="al", unicodeslot=0x16E43, }, @@ -198414,6 +203627,7 @@ characters.data={ category="lu", description="MEDEFAIDRIN CAPITAL LETTER ATIU", direction="l", + lccode=0x16E64, linebreak="al", unicodeslot=0x16E44, }, @@ -198421,6 +203635,7 @@ characters.data={ category="lu", description="MEDEFAIDRIN CAPITAL LETTER Z", direction="l", + lccode=0x16E65, linebreak="al", unicodeslot=0x16E45, }, @@ -198428,6 +203643,7 @@ characters.data={ category="lu", description="MEDEFAIDRIN CAPITAL LETTER KP", direction="l", + lccode=0x16E66, linebreak="al", unicodeslot=0x16E46, }, @@ -198435,6 +203651,7 @@ characters.data={ category="lu", description="MEDEFAIDRIN CAPITAL LETTER P", direction="l", + lccode=0x16E67, linebreak="al", unicodeslot=0x16E47, }, @@ -198442,6 +203659,7 @@ characters.data={ category="lu", description="MEDEFAIDRIN CAPITAL LETTER T", direction="l", + lccode=0x16E68, linebreak="al", unicodeslot=0x16E48, }, @@ -198449,6 +203667,7 @@ characters.data={ category="lu", description="MEDEFAIDRIN CAPITAL LETTER G", direction="l", + lccode=0x16E69, linebreak="al", unicodeslot=0x16E49, }, @@ -198456,6 +203675,7 @@ characters.data={ category="lu", description="MEDEFAIDRIN CAPITAL LETTER F", direction="l", + lccode=0x16E6A, linebreak="al", unicodeslot=0x16E4A, }, @@ -198463,6 +203683,7 @@ characters.data={ category="lu", description="MEDEFAIDRIN CAPITAL LETTER I", direction="l", + lccode=0x16E6B, linebreak="al", unicodeslot=0x16E4B, }, @@ -198470,6 +203691,7 @@ characters.data={ category="lu", description="MEDEFAIDRIN CAPITAL LETTER K", direction="l", + lccode=0x16E6C, linebreak="al", unicodeslot=0x16E4C, }, @@ -198477,6 +203699,7 @@ characters.data={ category="lu", description="MEDEFAIDRIN CAPITAL LETTER A", direction="l", + lccode=0x16E6D, linebreak="al", unicodeslot=0x16E4D, }, @@ -198484,6 +203707,7 @@ characters.data={ category="lu", description="MEDEFAIDRIN CAPITAL LETTER J", direction="l", + lccode=0x16E6E, linebreak="al", unicodeslot=0x16E4E, }, @@ -198491,6 +203715,7 @@ characters.data={ category="lu", description="MEDEFAIDRIN CAPITAL LETTER E", direction="l", + lccode=0x16E6F, linebreak="al", unicodeslot=0x16E4F, }, @@ -198498,6 +203723,7 @@ characters.data={ category="lu", description="MEDEFAIDRIN CAPITAL LETTER B", direction="l", + lccode=0x16E70, linebreak="al", unicodeslot=0x16E50, }, @@ -198505,6 +203731,7 @@ characters.data={ category="lu", description="MEDEFAIDRIN CAPITAL LETTER C", direction="l", + lccode=0x16E71, linebreak="al", unicodeslot=0x16E51, }, @@ -198512,6 +203739,7 @@ characters.data={ category="lu", description="MEDEFAIDRIN CAPITAL LETTER U", direction="l", + lccode=0x16E72, linebreak="al", unicodeslot=0x16E52, }, @@ -198519,6 +203747,7 @@ characters.data={ category="lu", description="MEDEFAIDRIN CAPITAL LETTER YU", direction="l", + lccode=0x16E73, linebreak="al", unicodeslot=0x16E53, }, @@ -198526,6 +203755,7 @@ characters.data={ category="lu", description="MEDEFAIDRIN CAPITAL LETTER L", direction="l", + lccode=0x16E74, linebreak="al", unicodeslot=0x16E54, }, @@ -198533,6 +203763,7 @@ characters.data={ category="lu", description="MEDEFAIDRIN CAPITAL LETTER Q", direction="l", + lccode=0x16E75, linebreak="al", unicodeslot=0x16E55, }, @@ -198540,6 +203771,7 @@ characters.data={ category="lu", description="MEDEFAIDRIN CAPITAL LETTER HP", direction="l", + lccode=0x16E76, linebreak="al", unicodeslot=0x16E56, }, @@ -198547,6 +203779,7 @@ characters.data={ category="lu", description="MEDEFAIDRIN CAPITAL LETTER NY", direction="l", + lccode=0x16E77, linebreak="al", unicodeslot=0x16E57, }, @@ -198554,6 +203787,7 @@ characters.data={ category="lu", description="MEDEFAIDRIN CAPITAL LETTER X", direction="l", + lccode=0x16E78, linebreak="al", unicodeslot=0x16E58, }, @@ -198561,6 +203795,7 @@ characters.data={ category="lu", description="MEDEFAIDRIN CAPITAL LETTER D", direction="l", + lccode=0x16E79, linebreak="al", unicodeslot=0x16E59, }, @@ -198568,6 +203803,7 @@ characters.data={ category="lu", description="MEDEFAIDRIN CAPITAL LETTER OE", direction="l", + lccode=0x16E7A, linebreak="al", unicodeslot=0x16E5A, }, @@ -198575,6 +203811,7 @@ characters.data={ category="lu", description="MEDEFAIDRIN CAPITAL LETTER N", direction="l", + lccode=0x16E7B, linebreak="al", unicodeslot=0x16E5B, }, @@ -198582,6 +203819,7 @@ characters.data={ category="lu", description="MEDEFAIDRIN CAPITAL LETTER R", direction="l", + lccode=0x16E7C, linebreak="al", unicodeslot=0x16E5C, }, @@ -198589,6 +203827,7 @@ characters.data={ category="lu", description="MEDEFAIDRIN CAPITAL LETTER O", direction="l", + lccode=0x16E7D, linebreak="al", unicodeslot=0x16E5D, }, @@ -198596,6 +203835,7 @@ characters.data={ category="lu", description="MEDEFAIDRIN CAPITAL LETTER AI", direction="l", + lccode=0x16E7E, linebreak="al", unicodeslot=0x16E5E, }, @@ -198603,6 +203843,7 @@ characters.data={ category="lu", description="MEDEFAIDRIN CAPITAL LETTER Y", direction="l", + lccode=0x16E7F, linebreak="al", unicodeslot=0x16E5F, }, @@ -210024,6 +215265,110 @@ characters.data={ linebreak="al", unicodeslot=0x18CD5, }, + [0x1AFF0]={ + category="lm", + cjkwd="w", + description="KATAKANA LETTER MINNAN TONE-2", + direction="l", + linebreak="al", + unicodeslot=0x1AFF0, + }, + [0x1AFF1]={ + category="lm", + cjkwd="w", + description="KATAKANA LETTER MINNAN TONE-3", + direction="l", + linebreak="al", + unicodeslot=0x1AFF1, + }, + [0x1AFF2]={ + category="lm", + cjkwd="w", + description="KATAKANA LETTER MINNAN TONE-4", + direction="l", + linebreak="al", + unicodeslot=0x1AFF2, + }, + [0x1AFF3]={ + category="lm", + cjkwd="w", + description="KATAKANA LETTER MINNAN TONE-5", + direction="l", + linebreak="al", + unicodeslot=0x1AFF3, + }, + [0x1AFF5]={ + category="lm", + cjkwd="w", + description="KATAKANA LETTER MINNAN TONE-7", + direction="l", + linebreak="al", + unicodeslot=0x1AFF5, + }, + [0x1AFF6]={ + category="lm", + cjkwd="w", + description="KATAKANA LETTER MINNAN TONE-8", + direction="l", + linebreak="al", + unicodeslot=0x1AFF6, + }, + [0x1AFF7]={ + category="lm", + cjkwd="w", + description="KATAKANA LETTER MINNAN NASALIZED TONE-1", + direction="l", + linebreak="al", + unicodeslot=0x1AFF7, + }, + [0x1AFF8]={ + category="lm", + cjkwd="w", + description="KATAKANA LETTER MINNAN NASALIZED TONE-2", + direction="l", + linebreak="al", + unicodeslot=0x1AFF8, + }, + [0x1AFF9]={ + category="lm", + cjkwd="w", + description="KATAKANA LETTER MINNAN NASALIZED TONE-3", + direction="l", + linebreak="al", + unicodeslot=0x1AFF9, + }, + [0x1AFFA]={ + category="lm", + cjkwd="w", + description="KATAKANA LETTER MINNAN NASALIZED TONE-4", + direction="l", + linebreak="al", + unicodeslot=0x1AFFA, + }, + [0x1AFFB]={ + category="lm", + cjkwd="w", + description="KATAKANA LETTER MINNAN NASALIZED TONE-5", + direction="l", + linebreak="al", + unicodeslot=0x1AFFB, + }, + [0x1AFFD]={ + category="lm", + cjkwd="w", + description="KATAKANA LETTER MINNAN NASALIZED TONE-7", + direction="l", + linebreak="al", + unicodeslot=0x1AFFD, + }, + [0x1AFFE]={ + category="lm", + cjkwd="w", + description="KATAKANA LETTER MINNAN NASALIZED TONE-8", + direction="l", + linebreak="al", + unicodeslot=0x1AFFE, + }, [0x1B000]={ category="lo", cjkwd="w", @@ -212320,6 +217665,46 @@ characters.data={ linebreak="id", unicodeslot=0x1B11E, }, + [0x1B11F]={ + category="lo", + cjkwd="w", + description="HIRAGANA LETTER ARCHAIC WU", + direction="l", + linebreak="id", + unicodeslot=0x1B11F, + }, + [0x1B120]={ + category="lo", + cjkwd="w", + description="KATAKANA LETTER ARCHAIC YI", + direction="l", + linebreak="id", + unicodeslot=0x1B120, + }, + [0x1B121]={ + category="lo", + cjkwd="w", + description="KATAKANA LETTER ARCHAIC YE", + direction="l", + linebreak="id", + unicodeslot=0x1B121, + }, + [0x1B122]={ + category="lo", + cjkwd="w", + description="KATAKANA LETTER ARCHAIC WU", + direction="l", + linebreak="id", + unicodeslot=0x1B122, + }, + [0x1B132]={ + category="lo", + cjkwd="w", + description="HIRAGANA LETTER SMALL KO", + direction="l", + linebreak="cj", + unicodeslot=0x1B132, + }, [0x1B150]={ category="lo", cjkwd="w", @@ -212344,6 +217729,14 @@ characters.data={ linebreak="cj", unicodeslot=0x1B152, }, + [0x1B155]={ + category="lo", + cjkwd="w", + description="KATAKANA LETTER SMALL KO", + direction="l", + linebreak="cj", + unicodeslot=0x1B155, + }, [0x1B164]={ category="lo", cjkwd="w", @@ -216574,6 +221967,1301 @@ characters.data={ linebreak="cm", unicodeslot=0x1BCA3, }, + [0x1CF00]={ + category="mn", + description="ZNAMENNY COMBINING MARK GORAZDO NIZKO S KRYZHEM ON LEFT", + direction="nsm", + linebreak="cm", + unicodeslot=0x1CF00, + }, + [0x1CF01]={ + category="mn", + description="ZNAMENNY COMBINING MARK NIZKO S KRYZHEM ON LEFT", + direction="nsm", + linebreak="cm", + unicodeslot=0x1CF01, + }, + [0x1CF02]={ + category="mn", + description="ZNAMENNY COMBINING MARK TSATA ON LEFT", + direction="nsm", + linebreak="cm", + unicodeslot=0x1CF02, + }, + [0x1CF03]={ + category="mn", + description="ZNAMENNY COMBINING MARK GORAZDO NIZKO ON LEFT", + direction="nsm", + linebreak="cm", + unicodeslot=0x1CF03, + }, + [0x1CF04]={ + category="mn", + description="ZNAMENNY COMBINING MARK NIZKO ON LEFT", + direction="nsm", + linebreak="cm", + unicodeslot=0x1CF04, + }, + [0x1CF05]={ + category="mn", + description="ZNAMENNY COMBINING MARK SREDNE ON LEFT", + direction="nsm", + linebreak="cm", + unicodeslot=0x1CF05, + }, + [0x1CF06]={ + category="mn", + description="ZNAMENNY COMBINING MARK MALO POVYSHE ON LEFT", + direction="nsm", + linebreak="cm", + unicodeslot=0x1CF06, + }, + [0x1CF07]={ + category="mn", + description="ZNAMENNY COMBINING MARK POVYSHE ON LEFT", + direction="nsm", + linebreak="cm", + unicodeslot=0x1CF07, + }, + [0x1CF08]={ + category="mn", + description="ZNAMENNY COMBINING MARK VYSOKO ON LEFT", + direction="nsm", + linebreak="cm", + unicodeslot=0x1CF08, + }, + [0x1CF09]={ + category="mn", + description="ZNAMENNY COMBINING MARK MALO POVYSHE S KHOKHLOM ON LEFT", + direction="nsm", + linebreak="cm", + unicodeslot=0x1CF09, + }, + [0x1CF0A]={ + category="mn", + description="ZNAMENNY COMBINING MARK POVYSHE S KHOKHLOM ON LEFT", + direction="nsm", + linebreak="cm", + unicodeslot=0x1CF0A, + }, + [0x1CF0B]={ + category="mn", + description="ZNAMENNY COMBINING MARK VYSOKO S KHOKHLOM ON LEFT", + direction="nsm", + linebreak="cm", + unicodeslot=0x1CF0B, + }, + [0x1CF0C]={ + category="mn", + description="ZNAMENNY COMBINING MARK GORAZDO NIZKO S KRYZHEM ON RIGHT", + direction="nsm", + linebreak="cm", + unicodeslot=0x1CF0C, + }, + [0x1CF0D]={ + category="mn", + description="ZNAMENNY COMBINING MARK NIZKO S KRYZHEM ON RIGHT", + direction="nsm", + linebreak="cm", + unicodeslot=0x1CF0D, + }, + [0x1CF0E]={ + category="mn", + description="ZNAMENNY COMBINING MARK TSATA ON RIGHT", + direction="nsm", + linebreak="cm", + unicodeslot=0x1CF0E, + }, + [0x1CF0F]={ + category="mn", + description="ZNAMENNY COMBINING MARK GORAZDO NIZKO ON RIGHT", + direction="nsm", + linebreak="cm", + unicodeslot=0x1CF0F, + }, + [0x1CF10]={ + category="mn", + description="ZNAMENNY COMBINING MARK NIZKO ON RIGHT", + direction="nsm", + linebreak="cm", + unicodeslot=0x1CF10, + }, + [0x1CF11]={ + category="mn", + description="ZNAMENNY COMBINING MARK SREDNE ON RIGHT", + direction="nsm", + linebreak="cm", + unicodeslot=0x1CF11, + }, + [0x1CF12]={ + category="mn", + description="ZNAMENNY COMBINING MARK MALO POVYSHE ON RIGHT", + direction="nsm", + linebreak="cm", + unicodeslot=0x1CF12, + }, + [0x1CF13]={ + category="mn", + description="ZNAMENNY COMBINING MARK POVYSHE ON RIGHT", + direction="nsm", + linebreak="cm", + unicodeslot=0x1CF13, + }, + [0x1CF14]={ + category="mn", + description="ZNAMENNY COMBINING MARK VYSOKO ON RIGHT", + direction="nsm", + linebreak="cm", + unicodeslot=0x1CF14, + }, + [0x1CF15]={ + category="mn", + description="ZNAMENNY COMBINING MARK MALO POVYSHE S KHOKHLOM ON RIGHT", + direction="nsm", + linebreak="cm", + unicodeslot=0x1CF15, + }, + [0x1CF16]={ + category="mn", + description="ZNAMENNY COMBINING MARK POVYSHE S KHOKHLOM ON RIGHT", + direction="nsm", + linebreak="cm", + unicodeslot=0x1CF16, + }, + [0x1CF17]={ + category="mn", + description="ZNAMENNY COMBINING MARK VYSOKO S KHOKHLOM ON RIGHT", + direction="nsm", + linebreak="cm", + unicodeslot=0x1CF17, + }, + [0x1CF18]={ + category="mn", + description="ZNAMENNY COMBINING MARK TSATA S KRYZHEM", + direction="nsm", + linebreak="cm", + unicodeslot=0x1CF18, + }, + [0x1CF19]={ + category="mn", + description="ZNAMENNY COMBINING MARK MALO POVYSHE S KRYZHEM", + direction="nsm", + linebreak="cm", + unicodeslot=0x1CF19, + }, + [0x1CF1A]={ + category="mn", + description="ZNAMENNY COMBINING MARK STRANNO MALO POVYSHE", + direction="nsm", + linebreak="cm", + unicodeslot=0x1CF1A, + }, + [0x1CF1B]={ + category="mn", + description="ZNAMENNY COMBINING MARK POVYSHE S KRYZHEM", + direction="nsm", + linebreak="cm", + unicodeslot=0x1CF1B, + }, + [0x1CF1C]={ + category="mn", + description="ZNAMENNY COMBINING MARK POVYSHE STRANNO", + direction="nsm", + linebreak="cm", + unicodeslot=0x1CF1C, + }, + [0x1CF1D]={ + category="mn", + description="ZNAMENNY COMBINING MARK VYSOKO S KRYZHEM", + direction="nsm", + linebreak="cm", + unicodeslot=0x1CF1D, + }, + [0x1CF1E]={ + category="mn", + description="ZNAMENNY COMBINING MARK MALO POVYSHE STRANNO", + direction="nsm", + linebreak="cm", + unicodeslot=0x1CF1E, + }, + [0x1CF1F]={ + category="mn", + description="ZNAMENNY COMBINING MARK GORAZDO VYSOKO", + direction="nsm", + linebreak="cm", + unicodeslot=0x1CF1F, + }, + [0x1CF20]={ + category="mn", + description="ZNAMENNY COMBINING MARK ZELO", + direction="nsm", + linebreak="cm", + unicodeslot=0x1CF20, + }, + [0x1CF21]={ + category="mn", + description="ZNAMENNY COMBINING MARK ON", + direction="nsm", + linebreak="cm", + unicodeslot=0x1CF21, + }, + [0x1CF22]={ + category="mn", + description="ZNAMENNY COMBINING MARK RAVNO", + direction="nsm", + linebreak="cm", + unicodeslot=0x1CF22, + }, + [0x1CF23]={ + category="mn", + description="ZNAMENNY COMBINING MARK TIKHAYA", + direction="nsm", + linebreak="cm", + unicodeslot=0x1CF23, + }, + [0x1CF24]={ + category="mn", + description="ZNAMENNY COMBINING MARK BORZAYA", + direction="nsm", + linebreak="cm", + unicodeslot=0x1CF24, + }, + [0x1CF25]={ + category="mn", + description="ZNAMENNY COMBINING MARK UDARKA", + direction="nsm", + linebreak="cm", + unicodeslot=0x1CF25, + }, + [0x1CF26]={ + category="mn", + description="ZNAMENNY COMBINING MARK PODVERTKA", + direction="nsm", + linebreak="cm", + unicodeslot=0x1CF26, + }, + [0x1CF27]={ + category="mn", + description="ZNAMENNY COMBINING MARK LOMKA", + direction="nsm", + linebreak="cm", + unicodeslot=0x1CF27, + }, + [0x1CF28]={ + category="mn", + description="ZNAMENNY COMBINING MARK KUPNAYA", + direction="nsm", + linebreak="cm", + unicodeslot=0x1CF28, + }, + [0x1CF29]={ + category="mn", + description="ZNAMENNY COMBINING MARK KACHKA", + direction="nsm", + linebreak="cm", + unicodeslot=0x1CF29, + }, + [0x1CF2A]={ + category="mn", + description="ZNAMENNY COMBINING MARK ZEVOK", + direction="nsm", + linebreak="cm", + unicodeslot=0x1CF2A, + }, + [0x1CF2B]={ + category="mn", + description="ZNAMENNY COMBINING MARK SKOBA", + direction="nsm", + linebreak="cm", + unicodeslot=0x1CF2B, + }, + [0x1CF2C]={ + category="mn", + description="ZNAMENNY COMBINING MARK RAZSEKA", + direction="nsm", + linebreak="cm", + unicodeslot=0x1CF2C, + }, + [0x1CF2D]={ + category="mn", + description="ZNAMENNY COMBINING MARK KRYZH ON LEFT", + direction="nsm", + linebreak="cm", + unicodeslot=0x1CF2D, + }, + [0x1CF30]={ + category="mn", + description="ZNAMENNY COMBINING TONAL RANGE MARK MRACHNO", + direction="nsm", + linebreak="cm", + unicodeslot=0x1CF30, + }, + [0x1CF31]={ + category="mn", + description="ZNAMENNY COMBINING TONAL RANGE MARK SVETLO", + direction="nsm", + linebreak="cm", + unicodeslot=0x1CF31, + }, + [0x1CF32]={ + category="mn", + description="ZNAMENNY COMBINING TONAL RANGE MARK TRESVETLO", + direction="nsm", + linebreak="cm", + unicodeslot=0x1CF32, + }, + [0x1CF33]={ + category="mn", + description="ZNAMENNY COMBINING MARK ZADERZHKA", + direction="nsm", + linebreak="cm", + unicodeslot=0x1CF33, + }, + [0x1CF34]={ + category="mn", + description="ZNAMENNY COMBINING MARK DEMESTVENNY ZADERZHKA", + direction="nsm", + linebreak="cm", + unicodeslot=0x1CF34, + }, + [0x1CF35]={ + category="mn", + description="ZNAMENNY COMBINING MARK OTSECHKA", + direction="nsm", + linebreak="cm", + unicodeslot=0x1CF35, + }, + [0x1CF36]={ + category="mn", + description="ZNAMENNY COMBINING MARK PODCHASHIE", + direction="nsm", + linebreak="cm", + unicodeslot=0x1CF36, + }, + [0x1CF37]={ + category="mn", + description="ZNAMENNY COMBINING MARK PODCHASHIE WITH VERTICAL STROKE", + direction="nsm", + linebreak="cm", + unicodeslot=0x1CF37, + }, + [0x1CF38]={ + category="mn", + description="ZNAMENNY COMBINING MARK CHASHKA", + direction="nsm", + linebreak="cm", + unicodeslot=0x1CF38, + }, + [0x1CF39]={ + category="mn", + description="ZNAMENNY COMBINING MARK CHASHKA POLNAYA", + direction="nsm", + linebreak="cm", + unicodeslot=0x1CF39, + }, + [0x1CF3A]={ + category="mn", + description="ZNAMENNY COMBINING MARK OBLACHKO", + direction="nsm", + linebreak="cm", + unicodeslot=0x1CF3A, + }, + [0x1CF3B]={ + category="mn", + description="ZNAMENNY COMBINING MARK SOROCHYA NOZHKA", + direction="nsm", + linebreak="cm", + unicodeslot=0x1CF3B, + }, + [0x1CF3C]={ + category="mn", + description="ZNAMENNY COMBINING MARK TOCHKA", + direction="nsm", + linebreak="cm", + unicodeslot=0x1CF3C, + }, + [0x1CF3D]={ + category="mn", + description="ZNAMENNY COMBINING MARK DVOETOCHIE", + direction="nsm", + linebreak="cm", + unicodeslot=0x1CF3D, + }, + [0x1CF3E]={ + category="mn", + description="ZNAMENNY COMBINING ATTACHING VERTICAL OMET", + direction="nsm", + linebreak="cm", + unicodeslot=0x1CF3E, + }, + [0x1CF3F]={ + category="mn", + description="ZNAMENNY COMBINING MARK CURVED OMET", + direction="nsm", + linebreak="cm", + unicodeslot=0x1CF3F, + }, + [0x1CF40]={ + category="mn", + description="ZNAMENNY COMBINING MARK KRYZH", + direction="nsm", + linebreak="cm", + unicodeslot=0x1CF40, + }, + [0x1CF41]={ + category="mn", + description="ZNAMENNY COMBINING LOWER TONAL RANGE INDICATOR", + direction="nsm", + linebreak="cm", + unicodeslot=0x1CF41, + }, + [0x1CF42]={ + category="mn", + description="ZNAMENNY PRIZNAK MODIFIER LEVEL-2", + direction="nsm", + linebreak="cm", + unicodeslot=0x1CF42, + }, + [0x1CF43]={ + category="mn", + description="ZNAMENNY PRIZNAK MODIFIER LEVEL-3", + direction="nsm", + linebreak="cm", + unicodeslot=0x1CF43, + }, + [0x1CF44]={ + category="mn", + description="ZNAMENNY PRIZNAK MODIFIER DIRECTION FLIP", + direction="nsm", + linebreak="cm", + unicodeslot=0x1CF44, + }, + [0x1CF45]={ + category="mn", + description="ZNAMENNY PRIZNAK MODIFIER KRYZH", + direction="nsm", + linebreak="cm", + unicodeslot=0x1CF45, + }, + [0x1CF46]={ + category="mn", + description="ZNAMENNY PRIZNAK MODIFIER ROG", + direction="nsm", + linebreak="cm", + unicodeslot=0x1CF46, + }, + [0x1CF50]={ + category="so", + description="ZNAMENNY NEUME KRYUK", + direction="l", + linebreak="al", + unicodeslot=0x1CF50, + }, + [0x1CF51]={ + category="so", + description="ZNAMENNY NEUME KRYUK TIKHY", + direction="l", + linebreak="al", + unicodeslot=0x1CF51, + }, + [0x1CF52]={ + category="so", + description="ZNAMENNY NEUME PARAKLIT", + direction="l", + linebreak="al", + unicodeslot=0x1CF52, + }, + [0x1CF53]={ + category="so", + description="ZNAMENNY NEUME DVA V CHELNU", + direction="l", + linebreak="al", + unicodeslot=0x1CF53, + }, + [0x1CF54]={ + category="so", + description="ZNAMENNY NEUME KLYUCH", + direction="l", + linebreak="al", + unicodeslot=0x1CF54, + }, + [0x1CF55]={ + category="so", + description="ZNAMENNY NEUME ZANOZHEK", + direction="l", + linebreak="al", + unicodeslot=0x1CF55, + }, + [0x1CF56]={ + category="so", + description="ZNAMENNY NEUME STOPITSA", + direction="l", + linebreak="al", + unicodeslot=0x1CF56, + }, + [0x1CF57]={ + category="so", + description="ZNAMENNY NEUME STOPITSA S OCHKOM", + direction="l", + linebreak="al", + unicodeslot=0x1CF57, + }, + [0x1CF58]={ + category="so", + description="ZNAMENNY NEUME PEREVODKA", + direction="l", + linebreak="al", + unicodeslot=0x1CF58, + }, + [0x1CF59]={ + category="so", + description="ZNAMENNY NEUME PEREVODKA NEPOSTOYANNAYA", + direction="l", + linebreak="al", + unicodeslot=0x1CF59, + }, + [0x1CF5A]={ + category="so", + description="ZNAMENNY NEUME STOPITSA WITH SOROCHYA NOZHKA", + direction="l", + linebreak="al", + unicodeslot=0x1CF5A, + }, + [0x1CF5B]={ + category="so", + description="ZNAMENNY NEUME CHELYUSTKA", + direction="l", + linebreak="al", + unicodeslot=0x1CF5B, + }, + [0x1CF5C]={ + category="so", + description="ZNAMENNY NEUME PALKA", + direction="l", + linebreak="al", + unicodeslot=0x1CF5C, + }, + [0x1CF5D]={ + category="so", + description="ZNAMENNY NEUME ZAPYATAYA", + direction="l", + linebreak="al", + unicodeslot=0x1CF5D, + }, + [0x1CF5E]={ + category="so", + description="ZNAMENNY NEUME GOLUBCHIK BORZY", + direction="l", + linebreak="al", + unicodeslot=0x1CF5E, + }, + [0x1CF5F]={ + category="so", + description="ZNAMENNY NEUME GOLUBCHIK TIKHY", + direction="l", + linebreak="al", + unicodeslot=0x1CF5F, + }, + [0x1CF60]={ + category="so", + description="ZNAMENNY NEUME GOLUBCHIK MRACHNY", + direction="l", + linebreak="al", + unicodeslot=0x1CF60, + }, + [0x1CF61]={ + category="so", + description="ZNAMENNY NEUME GOLUBCHIK SVETLY", + direction="l", + linebreak="al", + unicodeslot=0x1CF61, + }, + [0x1CF62]={ + category="so", + description="ZNAMENNY NEUME GOLUBCHIK TRESVETLY", + direction="l", + linebreak="al", + unicodeslot=0x1CF62, + }, + [0x1CF63]={ + category="so", + description="ZNAMENNY NEUME VRAKHIYA PROSTAYA", + direction="l", + linebreak="al", + unicodeslot=0x1CF63, + }, + [0x1CF64]={ + category="so", + description="ZNAMENNY NEUME VRAKHIYA MRACHNAYA", + direction="l", + linebreak="al", + unicodeslot=0x1CF64, + }, + [0x1CF65]={ + category="so", + description="ZNAMENNY NEUME VRAKHIYA SVETLAYA", + direction="l", + linebreak="al", + unicodeslot=0x1CF65, + }, + [0x1CF66]={ + category="so", + description="ZNAMENNY NEUME VRAKHIYA TRESVETLAYA", + direction="l", + linebreak="al", + unicodeslot=0x1CF66, + }, + [0x1CF67]={ + category="so", + description="ZNAMENNY NEUME VRAKHIYA KLYUCHEVAYA PROSTAYA", + direction="l", + linebreak="al", + unicodeslot=0x1CF67, + }, + [0x1CF68]={ + category="so", + description="ZNAMENNY NEUME VRAKHIYA KLYUCHEVAYA MRACHNAYA", + direction="l", + linebreak="al", + unicodeslot=0x1CF68, + }, + [0x1CF69]={ + category="so", + description="ZNAMENNY NEUME VRAKHIYA KLYUCHEVAYA SVETLAYA", + direction="l", + linebreak="al", + unicodeslot=0x1CF69, + }, + [0x1CF6A]={ + category="so", + description="ZNAMENNY NEUME VRAKHIYA KLYUCHEVAYA TRESVETLAYA", + direction="l", + linebreak="al", + unicodeslot=0x1CF6A, + }, + [0x1CF6B]={ + category="so", + description="ZNAMENNY NEUME DOUBLE ZAPYATAYA", + direction="l", + linebreak="al", + unicodeslot=0x1CF6B, + }, + [0x1CF6C]={ + category="so", + description="ZNAMENNY NEUME REVERSED CHELYUSTKA", + direction="l", + linebreak="al", + unicodeslot=0x1CF6C, + }, + [0x1CF6D]={ + category="so", + description="ZNAMENNY NEUME DERBITSA", + direction="l", + linebreak="al", + unicodeslot=0x1CF6D, + }, + [0x1CF6E]={ + category="so", + description="ZNAMENNY NEUME KHAMILO", + direction="l", + linebreak="al", + unicodeslot=0x1CF6E, + }, + [0x1CF6F]={ + category="so", + description="ZNAMENNY NEUME CHASHKA", + direction="l", + linebreak="al", + unicodeslot=0x1CF6F, + }, + [0x1CF70]={ + category="so", + description="ZNAMENNY NEUME PODCHASHIE", + direction="l", + linebreak="al", + unicodeslot=0x1CF70, + }, + [0x1CF71]={ + category="so", + description="ZNAMENNY NEUME SKAMEYTSA MRACHNAYA", + direction="l", + linebreak="al", + unicodeslot=0x1CF71, + }, + [0x1CF72]={ + category="so", + description="ZNAMENNY NEUME SKAMEYTSA SVETLAYA", + direction="l", + linebreak="al", + unicodeslot=0x1CF72, + }, + [0x1CF73]={ + category="so", + description="ZNAMENNY NEUME SKAMEYTSA TRESVETLAYA", + direction="l", + linebreak="al", + unicodeslot=0x1CF73, + }, + [0x1CF74]={ + category="so", + description="ZNAMENNY NEUME SKAMEYTSA TIKHAYA", + direction="l", + linebreak="al", + unicodeslot=0x1CF74, + }, + [0x1CF75]={ + category="so", + description="ZNAMENNY NEUME DEMESTVENNY KLYUCH", + direction="l", + linebreak="al", + unicodeslot=0x1CF75, + }, + [0x1CF76]={ + category="so", + description="ZNAMENNY NEUME SKAMEYTSA KLYUCHEVAYA SVETLAYA", + direction="l", + linebreak="al", + unicodeslot=0x1CF76, + }, + [0x1CF77]={ + category="so", + description="ZNAMENNY NEUME SKAMEYTSA KLYUCHENEPOSTOYANNAYA", + direction="l", + linebreak="al", + unicodeslot=0x1CF77, + }, + [0x1CF78]={ + category="so", + description="ZNAMENNY NEUME SKAMEYTSA KLYUCHEVAYA TIKHAYA", + direction="l", + linebreak="al", + unicodeslot=0x1CF78, + }, + [0x1CF79]={ + category="so", + description="ZNAMENNY NEUME SKAMEYTSA DVOECHELNAYA PROSTAYA", + direction="l", + linebreak="al", + unicodeslot=0x1CF79, + }, + [0x1CF7A]={ + category="so", + description="ZNAMENNY NEUME SKAMEYTSA DVOECHELNAYA SVETLAYA", + direction="l", + linebreak="al", + unicodeslot=0x1CF7A, + }, + [0x1CF7B]={ + category="so", + description="ZNAMENNY NEUME SKAMEYTSA DVOECHELNAYA NEPOSTOYANNAYA", + direction="l", + linebreak="al", + unicodeslot=0x1CF7B, + }, + [0x1CF7C]={ + category="so", + description="ZNAMENNY NEUME SKAMEYTSA DVOECHELNAYA KLYUCHEVAYA", + direction="l", + linebreak="al", + unicodeslot=0x1CF7C, + }, + [0x1CF7D]={ + category="so", + description="ZNAMENNY NEUME SLOZHITIE", + direction="l", + linebreak="al", + unicodeslot=0x1CF7D, + }, + [0x1CF7E]={ + category="so", + description="ZNAMENNY NEUME SLOZHITIE S ZAPYATOY", + direction="l", + linebreak="al", + unicodeslot=0x1CF7E, + }, + [0x1CF7F]={ + category="so", + description="ZNAMENNY NEUME SLOZHITIE ZAKRYTOE", + direction="l", + linebreak="al", + unicodeslot=0x1CF7F, + }, + [0x1CF80]={ + category="so", + description="ZNAMENNY NEUME SLOZHITIE S KRYZHEM", + direction="l", + linebreak="al", + unicodeslot=0x1CF80, + }, + [0x1CF81]={ + category="so", + description="ZNAMENNY NEUME KRYZH", + direction="l", + linebreak="al", + unicodeslot=0x1CF81, + }, + [0x1CF82]={ + category="so", + description="ZNAMENNY NEUME ROG", + direction="l", + linebreak="al", + unicodeslot=0x1CF82, + }, + [0x1CF83]={ + category="so", + description="ZNAMENNY NEUME FITA", + direction="l", + linebreak="al", + unicodeslot=0x1CF83, + }, + [0x1CF84]={ + category="so", + description="ZNAMENNY NEUME KOBYLA", + direction="l", + linebreak="al", + unicodeslot=0x1CF84, + }, + [0x1CF85]={ + category="so", + description="ZNAMENNY NEUME ZMEYTSA", + direction="l", + linebreak="al", + unicodeslot=0x1CF85, + }, + [0x1CF86]={ + category="so", + description="ZNAMENNY NEUME STATYA", + direction="l", + linebreak="al", + unicodeslot=0x1CF86, + }, + [0x1CF87]={ + category="so", + description="ZNAMENNY NEUME STATYA S ZAPYATOY", + direction="l", + linebreak="al", + unicodeslot=0x1CF87, + }, + [0x1CF88]={ + category="so", + description="ZNAMENNY NEUME STATYA S KRYZHEM", + direction="l", + linebreak="al", + unicodeslot=0x1CF88, + }, + [0x1CF89]={ + category="so", + description="ZNAMENNY NEUME STATYA S ZAPYATOY I KRYZHEM", + direction="l", + linebreak="al", + unicodeslot=0x1CF89, + }, + [0x1CF8A]={ + category="so", + description="ZNAMENNY NEUME STATYA S KRYZHEM I ZAPYATOY", + direction="l", + linebreak="al", + unicodeslot=0x1CF8A, + }, + [0x1CF8B]={ + category="so", + description="ZNAMENNY NEUME STATYA ZAKRYTAYA", + direction="l", + linebreak="al", + unicodeslot=0x1CF8B, + }, + [0x1CF8C]={ + category="so", + description="ZNAMENNY NEUME STATYA ZAKRYTAYA S ZAPYATOY", + direction="l", + linebreak="al", + unicodeslot=0x1CF8C, + }, + [0x1CF8D]={ + category="so", + description="ZNAMENNY NEUME STATYA S ROGOM", + direction="l", + linebreak="al", + unicodeslot=0x1CF8D, + }, + [0x1CF8E]={ + category="so", + description="ZNAMENNY NEUME STATYA S DVUMYA ZAPYATYMI", + direction="l", + linebreak="al", + unicodeslot=0x1CF8E, + }, + [0x1CF8F]={ + category="so", + description="ZNAMENNY NEUME STATYA S ZAPYATOY I PODCHASHIEM", + direction="l", + linebreak="al", + unicodeslot=0x1CF8F, + }, + [0x1CF90]={ + category="so", + description="ZNAMENNY NEUME POLKULIZMY", + direction="l", + linebreak="al", + unicodeslot=0x1CF90, + }, + [0x1CF91]={ + category="so", + description="ZNAMENNY NEUME STATYA NEPOSTOYANNAYA", + direction="l", + linebreak="al", + unicodeslot=0x1CF91, + }, + [0x1CF92]={ + category="so", + description="ZNAMENNY NEUME STRELA PROSTAYA", + direction="l", + linebreak="al", + unicodeslot=0x1CF92, + }, + [0x1CF93]={ + category="so", + description="ZNAMENNY NEUME STRELA MRACHNOTIKHAYA", + direction="l", + linebreak="al", + unicodeslot=0x1CF93, + }, + [0x1CF94]={ + category="so", + description="ZNAMENNY NEUME STRELA KRYZHEVAYA", + direction="l", + linebreak="al", + unicodeslot=0x1CF94, + }, + [0x1CF95]={ + category="so", + description="ZNAMENNY NEUME STRELA POLUPOVODNAYA", + direction="l", + linebreak="al", + unicodeslot=0x1CF95, + }, + [0x1CF96]={ + category="so", + description="ZNAMENNY NEUME STRELA POVODNAYA", + direction="l", + linebreak="al", + unicodeslot=0x1CF96, + }, + [0x1CF97]={ + category="so", + description="ZNAMENNY NEUME STRELA NEPOSTOYANNAYA", + direction="l", + linebreak="al", + unicodeslot=0x1CF97, + }, + [0x1CF98]={ + category="so", + description="ZNAMENNY NEUME STRELA KLYUCHEPOVODNAYA", + direction="l", + linebreak="al", + unicodeslot=0x1CF98, + }, + [0x1CF99]={ + category="so", + description="ZNAMENNY NEUME STRELA KLYUCHENEPOSTOYANNAYA", + direction="l", + linebreak="al", + unicodeslot=0x1CF99, + }, + [0x1CF9A]={ + category="so", + description="ZNAMENNY NEUME STRELA TIKHAYA PUTNAYA", + direction="l", + linebreak="al", + unicodeslot=0x1CF9A, + }, + [0x1CF9B]={ + category="so", + description="ZNAMENNY NEUME STRELA DVOECHELNAYA", + direction="l", + linebreak="al", + unicodeslot=0x1CF9B, + }, + [0x1CF9C]={ + category="so", + description="ZNAMENNY NEUME STRELA DVOECHELNOKRYZHEVAYA", + direction="l", + linebreak="al", + unicodeslot=0x1CF9C, + }, + [0x1CF9D]={ + category="so", + description="ZNAMENNY NEUME STRELA DVOECHELNOPOVODNAYA", + direction="l", + linebreak="al", + unicodeslot=0x1CF9D, + }, + [0x1CF9E]={ + category="so", + description="ZNAMENNY NEUME STRELA DVOECHELNAYA KLYUCHEVAYA", + direction="l", + linebreak="al", + unicodeslot=0x1CF9E, + }, + [0x1CF9F]={ + category="so", + description="ZNAMENNY NEUME STRELA DVOECHELNOPOVODNAYA KLYUCHEVAYA", + direction="l", + linebreak="al", + unicodeslot=0x1CF9F, + }, + [0x1CFA0]={ + category="so", + description="ZNAMENNY NEUME STRELA GROMNAYA WITH SINGLE ZAPYATAYA", + direction="l", + linebreak="al", + unicodeslot=0x1CFA0, + }, + [0x1CFA1]={ + category="so", + description="ZNAMENNY NEUME STRELA GROMOPOVODNAYA WITH SINGLE ZAPYATAYA", + direction="l", + linebreak="al", + unicodeslot=0x1CFA1, + }, + [0x1CFA2]={ + category="so", + description="ZNAMENNY NEUME STRELA GROMNAYA", + direction="l", + linebreak="al", + unicodeslot=0x1CFA2, + }, + [0x1CFA3]={ + category="so", + description="ZNAMENNY NEUME STRELA GROMOPOVODNAYA", + direction="l", + linebreak="al", + unicodeslot=0x1CFA3, + }, + [0x1CFA4]={ + category="so", + description="ZNAMENNY NEUME STRELA GROMOPOVODNAYA WITH DOUBLE ZAPYATAYA", + direction="l", + linebreak="al", + unicodeslot=0x1CFA4, + }, + [0x1CFA5]={ + category="so", + description="ZNAMENNY NEUME STRELA GROMOKRYZHEVAYA", + direction="l", + linebreak="al", + unicodeslot=0x1CFA5, + }, + [0x1CFA6]={ + category="so", + description="ZNAMENNY NEUME STRELA GROMOKRYZHEVAYA POVODNAYA", + direction="l", + linebreak="al", + unicodeslot=0x1CFA6, + }, + [0x1CFA7]={ + category="so", + description="ZNAMENNY NEUME MECHIK", + direction="l", + linebreak="al", + unicodeslot=0x1CFA7, + }, + [0x1CFA8]={ + category="so", + description="ZNAMENNY NEUME MECHIK POVODNY", + direction="l", + linebreak="al", + unicodeslot=0x1CFA8, + }, + [0x1CFA9]={ + category="so", + description="ZNAMENNY NEUME MECHIK KLYUCHEVOY", + direction="l", + linebreak="al", + unicodeslot=0x1CFA9, + }, + [0x1CFAA]={ + category="so", + description="ZNAMENNY NEUME MECHIK KLYUCHEPOVODNY", + direction="l", + linebreak="al", + unicodeslot=0x1CFAA, + }, + [0x1CFAB]={ + category="so", + description="ZNAMENNY NEUME MECHIK KLYUCHENEPOSTOYANNY", + direction="l", + linebreak="al", + unicodeslot=0x1CFAB, + }, + [0x1CFAC]={ + category="so", + description="ZNAMENNY NEUME STRELA TRYASOGLASNAYA", + direction="l", + linebreak="al", + unicodeslot=0x1CFAC, + }, + [0x1CFAD]={ + category="so", + description="ZNAMENNY NEUME STRELA TRYASOPOVODNAYA", + direction="l", + linebreak="al", + unicodeslot=0x1CFAD, + }, + [0x1CFAE]={ + category="so", + description="ZNAMENNY NEUME STRELA TRYASOSTRELNAYA", + direction="l", + linebreak="al", + unicodeslot=0x1CFAE, + }, + [0x1CFAF]={ + category="so", + description="ZNAMENNY NEUME OSOKA", + direction="l", + linebreak="al", + unicodeslot=0x1CFAF, + }, + [0x1CFB0]={ + category="so", + description="ZNAMENNY NEUME OSOKA SVETLAYA", + direction="l", + linebreak="al", + unicodeslot=0x1CFB0, + }, + [0x1CFB1]={ + category="so", + description="ZNAMENNY NEUME OSOKA TRESVETLAYA", + direction="l", + linebreak="al", + unicodeslot=0x1CFB1, + }, + [0x1CFB2]={ + category="so", + description="ZNAMENNY NEUME OSOKA KRYUKOVAYA SVETLAYA", + direction="l", + linebreak="al", + unicodeslot=0x1CFB2, + }, + [0x1CFB3]={ + category="so", + description="ZNAMENNY NEUME OSOKA KLYUCHEVAYA SVETLAYA", + direction="l", + linebreak="al", + unicodeslot=0x1CFB3, + }, + [0x1CFB4]={ + category="so", + description="ZNAMENNY NEUME OSOKA KLYUCHEVAYA NEPOSTOYANNAYA", + direction="l", + linebreak="al", + unicodeslot=0x1CFB4, + }, + [0x1CFB5]={ + category="so", + description="ZNAMENNY NEUME STRELA KRYUKOVAYA", + direction="l", + linebreak="al", + unicodeslot=0x1CFB5, + }, + [0x1CFB6]={ + category="so", + description="ZNAMENNY NEUME STRELA KRYUKOVAYA POVODNAYA", + direction="l", + linebreak="al", + unicodeslot=0x1CFB6, + }, + [0x1CFB7]={ + category="so", + description="ZNAMENNY NEUME STRELA KRYUKOVAYA GROMNAYA WITH SINGLE ZAPYATAYA", + direction="l", + linebreak="al", + unicodeslot=0x1CFB7, + }, + [0x1CFB8]={ + category="so", + description="ZNAMENNY NEUME STRELA KRYUKOVAYA GROMOPOVODNAYA WITH SINGLE ZAPYATAYA", + direction="l", + linebreak="al", + unicodeslot=0x1CFB8, + }, + [0x1CFB9]={ + category="so", + description="ZNAMENNY NEUME STRELA KRYUKOVAYA GROMNAYA", + direction="l", + linebreak="al", + unicodeslot=0x1CFB9, + }, + [0x1CFBA]={ + category="so", + description="ZNAMENNY NEUME STRELA KRYUKOVAYA GROMOPOVODNAYA", + direction="l", + linebreak="al", + unicodeslot=0x1CFBA, + }, + [0x1CFBB]={ + category="so", + description="ZNAMENNY NEUME STRELA KRYUKOVAYA GROMOPOVODNAYA WITH DOUBLE ZAPYATAYA", + direction="l", + linebreak="al", + unicodeslot=0x1CFBB, + }, + [0x1CFBC]={ + category="so", + description="ZNAMENNY NEUME STRELA KRYUKOVAYA GROMOKRYZHEVAYA", + direction="l", + linebreak="al", + unicodeslot=0x1CFBC, + }, + [0x1CFBD]={ + category="so", + description="ZNAMENNY NEUME STRELA KRYUKOVAYA GROMOKRYZHEVAYA POVODNAYA", + direction="l", + linebreak="al", + unicodeslot=0x1CFBD, + }, + [0x1CFBE]={ + category="so", + description="ZNAMENNY NEUME STRELA KRYUKOVAYA TRYASKA", + direction="l", + linebreak="al", + unicodeslot=0x1CFBE, + }, + [0x1CFBF]={ + category="so", + description="ZNAMENNY NEUME KUFISMA", + direction="l", + linebreak="al", + unicodeslot=0x1CFBF, + }, + [0x1CFC0]={ + category="so", + description="ZNAMENNY NEUME OBLAKO", + direction="l", + linebreak="al", + unicodeslot=0x1CFC0, + }, + [0x1CFC1]={ + category="so", + description="ZNAMENNY NEUME DUDA", + direction="l", + linebreak="al", + unicodeslot=0x1CFC1, + }, + [0x1CFC2]={ + category="so", + description="ZNAMENNY NEUME NEMKA", + direction="l", + linebreak="al", + unicodeslot=0x1CFC2, + }, + [0x1CFC3]={ + category="so", + description="ZNAMENNY NEUME PAUK", + direction="l", + linebreak="al", + unicodeslot=0x1CFC3, + }, [0x1D000]={ category="so", description="BYZANTINE MUSICAL SYMBOL PSILI", @@ -219958,6 +226646,20 @@ characters.data={ linebreak="al", unicodeslot=0x1D1E8, }, + [0x1D1E9]={ + category="so", + description="MUSICAL SYMBOL SORI", + direction="on", + linebreak="al", + unicodeslot=0x1D1E9, + }, + [0x1D1EA]={ + category="so", + description="MUSICAL SYMBOL KORON", + direction="on", + linebreak="al", + unicodeslot=0x1D1EA, + }, [0x1D200]={ category="so", description="GREEK VOCAL NOTATION SYMBOL-0x0001", @@ -220451,6 +227153,146 @@ characters.data={ linebreak="al", unicodeslot=0x1D245, }, + [0x1D2C0]={ + category="no", + description="KAKTOVIK NUMERAL ZERO", + direction="l", + linebreak="al", + unicodeslot=0x1D2C0, + }, + [0x1D2C1]={ + category="no", + description="KAKTOVIK NUMERAL ONE", + direction="l", + linebreak="al", + unicodeslot=0x1D2C1, + }, + [0x1D2C2]={ + category="no", + description="KAKTOVIK NUMERAL TWO", + direction="l", + linebreak="al", + unicodeslot=0x1D2C2, + }, + [0x1D2C3]={ + category="no", + description="KAKTOVIK NUMERAL THREE", + direction="l", + linebreak="al", + unicodeslot=0x1D2C3, + }, + [0x1D2C4]={ + category="no", + description="KAKTOVIK NUMERAL FOUR", + direction="l", + linebreak="al", + unicodeslot=0x1D2C4, + }, + [0x1D2C5]={ + category="no", + description="KAKTOVIK NUMERAL FIVE", + direction="l", + linebreak="al", + unicodeslot=0x1D2C5, + }, + [0x1D2C6]={ + category="no", + description="KAKTOVIK NUMERAL SIX", + direction="l", + linebreak="al", + unicodeslot=0x1D2C6, + }, + [0x1D2C7]={ + category="no", + description="KAKTOVIK NUMERAL SEVEN", + direction="l", + linebreak="al", + unicodeslot=0x1D2C7, + }, + [0x1D2C8]={ + category="no", + description="KAKTOVIK NUMERAL EIGHT", + direction="l", + linebreak="al", + unicodeslot=0x1D2C8, + }, + [0x1D2C9]={ + category="no", + description="KAKTOVIK NUMERAL NINE", + direction="l", + linebreak="al", + unicodeslot=0x1D2C9, + }, + [0x1D2CA]={ + category="no", + description="KAKTOVIK NUMERAL TEN", + direction="l", + linebreak="al", + unicodeslot=0x1D2CA, + }, + [0x1D2CB]={ + category="no", + description="KAKTOVIK NUMERAL ELEVEN", + direction="l", + linebreak="al", + unicodeslot=0x1D2CB, + }, + [0x1D2CC]={ + category="no", + description="KAKTOVIK NUMERAL TWELVE", + direction="l", + linebreak="al", + unicodeslot=0x1D2CC, + }, + [0x1D2CD]={ + category="no", + description="KAKTOVIK NUMERAL THIRTEEN", + direction="l", + linebreak="al", + unicodeslot=0x1D2CD, + }, + [0x1D2CE]={ + category="no", + description="KAKTOVIK NUMERAL FOURTEEN", + direction="l", + linebreak="al", + unicodeslot=0x1D2CE, + }, + [0x1D2CF]={ + category="no", + description="KAKTOVIK NUMERAL FIFTEEN", + direction="l", + linebreak="al", + unicodeslot=0x1D2CF, + }, + [0x1D2D0]={ + category="no", + description="KAKTOVIK NUMERAL SIXTEEN", + direction="l", + linebreak="al", + unicodeslot=0x1D2D0, + }, + [0x1D2D1]={ + category="no", + description="KAKTOVIK NUMERAL SEVENTEEN", + direction="l", + linebreak="al", + unicodeslot=0x1D2D1, + }, + [0x1D2D2]={ + category="no", + description="KAKTOVIK NUMERAL EIGHTEEN", + direction="l", + linebreak="al", + unicodeslot=0x1D2D2, + }, + [0x1D2D3]={ + category="no", + description="KAKTOVIK NUMERAL NINETEEN", + direction="l", + linebreak="al", + unicodeslot=0x1D2D3, + }, [0x1D2E0]={ category="no", description="MAYAN NUMERAL ZERO", @@ -221875,6 +228717,13 @@ characters.data={ description="MATHEMATICAL ITALIC CAPITAL D", direction="l", linebreak="al", + mathclass="ordinary", + mathspec={ + { + class="differential", + name="Dd", + }, + }, specials={ "font", 0x44 }, unicodeslot=0x1D437, visual="it", @@ -222109,6 +228958,13 @@ characters.data={ description="MATHEMATICAL ITALIC SMALL D", direction="l", linebreak="al", + mathclass="ordinary", + mathspec={ + { + class="differential", + name="dd", + }, + }, specials={ "font", 0x64 }, unicodeslot=0x1D451, visual="it", @@ -222118,6 +228974,13 @@ characters.data={ description="MATHEMATICAL ITALIC SMALL E", direction="l", linebreak="al", + mathclass="ordinary", + mathspec={ + { + class="exponential", + name="ee", + }, + }, specials={ "font", 0x65 }, unicodeslot=0x1D452, visual="it", @@ -222145,6 +229008,13 @@ characters.data={ description="MATHEMATICAL ITALIC SMALL I", direction="l", linebreak="al", + mathclass="ordinary", + mathspec={ + { + class="imaginary", + name="ii", + }, + }, specials={ "font", 0x69 }, unicodeslot=0x1D456, visual="it", @@ -222154,6 +229024,13 @@ characters.data={ description="MATHEMATICAL ITALIC SMALL J", direction="l", linebreak="al", + mathclass="ordinary", + mathspec={ + { + class="imaginary", + name="ji", + }, + }, specials={ "font", 0x6A }, unicodeslot=0x1D457, visual="it", @@ -222777,6 +229654,7 @@ characters.data={ linebreak="al", specials={ "font", 0x41 }, unicodeslot=0x1D49C, + variants=variants_style, visual="it", }, [0x1D49E]={ @@ -222786,6 +229664,7 @@ characters.data={ linebreak="al", specials={ "font", 0x43 }, unicodeslot=0x1D49E, + variants=variants_style, visual="it", }, [0x1D49F]={ @@ -222795,6 +229674,7 @@ characters.data={ linebreak="al", specials={ "font", 0x44 }, unicodeslot=0x1D49F, + variants=variants_style, visual="it", }, [0x1D4A2]={ @@ -222804,6 +229684,7 @@ characters.data={ linebreak="al", specials={ "font", 0x47 }, unicodeslot=0x1D4A2, + variants=variants_style, visual="it", }, [0x1D4A5]={ @@ -222813,6 +229694,7 @@ characters.data={ linebreak="al", specials={ "font", 0x4A }, unicodeslot=0x1D4A5, + variants=variants_style, visual="it", }, [0x1D4A6]={ @@ -222822,6 +229704,7 @@ characters.data={ linebreak="al", specials={ "font", 0x4B }, unicodeslot=0x1D4A6, + variants=variants_style, visual="it", }, [0x1D4A9]={ @@ -222831,6 +229714,7 @@ characters.data={ linebreak="al", specials={ "font", 0x4E }, unicodeslot=0x1D4A9, + variants=variants_style, visual="it", }, [0x1D4AA]={ @@ -222840,6 +229724,7 @@ characters.data={ linebreak="al", specials={ "font", 0x4F }, unicodeslot=0x1D4AA, + variants=variants_style, visual="it", }, [0x1D4AB]={ @@ -222850,6 +229735,7 @@ characters.data={ specials={ "font", 0x50 }, synonyms={ "power set" }, unicodeslot=0x1D4AB, + variants=variants_style, visual="it", }, [0x1D4AC]={ @@ -222859,6 +229745,7 @@ characters.data={ linebreak="al", specials={ "font", 0x51 }, unicodeslot=0x1D4AC, + variants=variants_style, visual="it", }, [0x1D4AE]={ @@ -222868,6 +229755,7 @@ characters.data={ linebreak="al", specials={ "font", 0x53 }, unicodeslot=0x1D4AE, + variants=variants_style, visual="it", }, [0x1D4AF]={ @@ -222877,6 +229765,7 @@ characters.data={ linebreak="al", specials={ "font", 0x54 }, unicodeslot=0x1D4AF, + variants=variants_style, visual="it", }, [0x1D4B0]={ @@ -222886,6 +229775,7 @@ characters.data={ linebreak="al", specials={ "font", 0x55 }, unicodeslot=0x1D4B0, + variants=variants_style, visual="it", }, [0x1D4B1]={ @@ -222895,6 +229785,7 @@ characters.data={ linebreak="al", specials={ "font", 0x56 }, unicodeslot=0x1D4B1, + variants=variants_style, visual="it", }, [0x1D4B2]={ @@ -222904,6 +229795,7 @@ characters.data={ linebreak="al", specials={ "font", 0x57 }, unicodeslot=0x1D4B2, + variants=variants_style, visual="it", }, [0x1D4B3]={ @@ -222913,6 +229805,7 @@ characters.data={ linebreak="al", specials={ "font", 0x58 }, unicodeslot=0x1D4B3, + variants=variants_style, visual="it", }, [0x1D4B4]={ @@ -222922,6 +229815,7 @@ characters.data={ linebreak="al", specials={ "font", 0x59 }, unicodeslot=0x1D4B4, + variants=variants_style, visual="it", }, [0x1D4B5]={ @@ -222931,6 +229825,7 @@ characters.data={ linebreak="al", specials={ "font", 0x5A }, unicodeslot=0x1D4B5, + variants=variants_style, visual="it", }, [0x1D4B6]={ @@ -227055,7 +233950,7 @@ characters.data={ description="MATHEMATICAL ITALIC SMALL DOTLESS I", direction="l", linebreak="al", - mathclass="default", + mathclass="ordinary", mathname="imath", specials={ "font", 0x131 }, unicodeslot=0x1D6A4, @@ -227066,7 +233961,7 @@ characters.data={ description="MATHEMATICAL ITALIC SMALL DOTLESS J", direction="l", linebreak="al", - mathclass="default", + mathclass="ordinary", mathname="jmath", specials={ "font", 0x237 }, unicodeslot=0x1D6A5, @@ -227536,6 +234431,7 @@ characters.data={ description="MATHEMATICAL BOLD PARTIAL DIFFERENTIAL", direction="on", linebreak="al", + mathclass="differential", specials={ "font", 0x2202 }, unicodeslot=0x1D6DB, visual="bf", @@ -227824,7 +234720,7 @@ characters.data={ description="MATHEMATICAL ITALIC NABLA", direction="l", linebreak="al", - mathclass="default", + mathclass="ordinary", specials={ "font", 0x2207 }, unicodeslot=0x1D6FB, visual="it", @@ -228059,6 +234955,7 @@ characters.data={ description="MATHEMATICAL ITALIC PARTIAL DIFFERENTIAL", direction="on", linebreak="al", + mathclass="differential", specials={ "font", 0x2202 }, unicodeslot=0x1D715, visual="it", @@ -228077,7 +234974,7 @@ characters.data={ description="MATHEMATICAL ITALIC THETA SYMBOL", direction="l", linebreak="al", - mathclass="default", + mathclass="ordinary", mathname="vartheta", specials={ "font", 0x3D1 }, unicodeslot=0x1D717, @@ -228088,7 +234985,7 @@ characters.data={ description="MATHEMATICAL ITALIC KAPPA SYMBOL", direction="l", linebreak="al", - mathclass="default", + mathclass="ordinary", mathname="varkappa", specials={ "font", 0x3F0 }, unicodeslot=0x1D718, @@ -228108,7 +235005,6 @@ characters.data={ description="MATHEMATICAL ITALIC RHO SYMBOL", direction="l", linebreak="al", - mathclass="variable", mathname="varrho", specials={ "font", 0x3F1 }, unicodeslot=0x1D71A, @@ -228587,6 +235483,7 @@ characters.data={ description="MATHEMATICAL BOLD ITALIC PARTIAL DIFFERENTIAL", direction="on", linebreak="al", + mathclass="differential", specials={ "font", 0x2202 }, unicodeslot=0x1D74F, visual="bi", @@ -229109,6 +236006,7 @@ characters.data={ description="MATHEMATICAL SANS-SERIF BOLD PARTIAL DIFFERENTIAL", direction="on", linebreak="al", + mathclass="differential", specials={ "font", 0x2202 }, unicodeslot=0x1D789, visual="bf", @@ -229631,6 +236529,7 @@ characters.data={ description="MATHEMATICAL SANS-SERIF BOLD ITALIC PARTIAL DIFFERENTIAL", direction="on", linebreak="al", + mathclass="differential", specials={ "font", 0x2202 }, unicodeslot=0x1D7C3, visual="bi", @@ -234831,6 +241730,265 @@ characters.data={ linebreak="cm", unicodeslot=0x1DAAF, }, + [0x1DF00]={ + category="ll", + description="LATIN SMALL LETTER FENG DIGRAPH WITH TRILL", + direction="l", + linebreak="al", + unicodeslot=0x1DF00, + }, + [0x1DF01]={ + category="ll", + description="LATIN SMALL LETTER REVERSED SCRIPT G", + direction="l", + linebreak="al", + unicodeslot=0x1DF01, + }, + [0x1DF02]={ + category="ll", + description="LATIN LETTER SMALL CAPITAL TURNED G", + direction="l", + linebreak="al", + unicodeslot=0x1DF02, + }, + [0x1DF03]={ + category="ll", + description="LATIN SMALL LETTER REVERSED K", + direction="l", + linebreak="al", + unicodeslot=0x1DF03, + }, + [0x1DF04]={ + category="ll", + description="LATIN LETTER SMALL CAPITAL L WITH BELT", + direction="l", + linebreak="al", + unicodeslot=0x1DF04, + }, + [0x1DF05]={ + category="ll", + description="LATIN SMALL LETTER LEZH WITH RETROFLEX HOOK", + direction="l", + linebreak="al", + unicodeslot=0x1DF05, + }, + [0x1DF06]={ + category="ll", + description="LATIN SMALL LETTER TURNED Y WITH BELT", + direction="l", + linebreak="al", + unicodeslot=0x1DF06, + }, + [0x1DF07]={ + category="ll", + description="LATIN SMALL LETTER REVERSED ENG", + direction="l", + linebreak="al", + unicodeslot=0x1DF07, + }, + [0x1DF08]={ + category="ll", + description="LATIN SMALL LETTER TURNED R WITH LONG LEG AND RETROFLEX HOOK", + direction="l", + linebreak="al", + unicodeslot=0x1DF08, + }, + [0x1DF09]={ + category="ll", + description="LATIN SMALL LETTER T WITH HOOK AND RETROFLEX HOOK", + direction="l", + linebreak="al", + unicodeslot=0x1DF09, + }, + [0x1DF0A]={ + category="lo", + description="LATIN LETTER RETROFLEX CLICK WITH RETROFLEX HOOK", + direction="l", + linebreak="al", + unicodeslot=0x1DF0A, + }, + [0x1DF0B]={ + category="ll", + description="LATIN SMALL LETTER ESH WITH DOUBLE BAR", + direction="l", + linebreak="al", + unicodeslot=0x1DF0B, + }, + [0x1DF0C]={ + category="ll", + description="LATIN SMALL LETTER ESH WITH DOUBLE BAR AND CURL", + direction="l", + linebreak="al", + unicodeslot=0x1DF0C, + }, + [0x1DF0D]={ + category="ll", + description="LATIN SMALL LETTER TURNED T WITH CURL", + direction="l", + linebreak="al", + unicodeslot=0x1DF0D, + }, + [0x1DF0E]={ + category="ll", + description="LATIN LETTER INVERTED GLOTTAL STOP WITH CURL", + direction="l", + linebreak="al", + unicodeslot=0x1DF0E, + }, + [0x1DF0F]={ + category="ll", + description="LATIN LETTER STRETCHED C WITH CURL", + direction="l", + linebreak="al", + unicodeslot=0x1DF0F, + }, + [0x1DF10]={ + category="ll", + description="LATIN LETTER SMALL CAPITAL TURNED K", + direction="l", + linebreak="al", + unicodeslot=0x1DF10, + }, + [0x1DF11]={ + category="ll", + description="LATIN SMALL LETTER L WITH FISHHOOK", + direction="l", + linebreak="al", + unicodeslot=0x1DF11, + }, + [0x1DF12]={ + category="ll", + description="LATIN SMALL LETTER DEZH DIGRAPH WITH PALATAL HOOK", + direction="l", + linebreak="al", + unicodeslot=0x1DF12, + }, + [0x1DF13]={ + category="ll", + description="LATIN SMALL LETTER L WITH BELT AND PALATAL HOOK", + direction="l", + linebreak="al", + unicodeslot=0x1DF13, + }, + [0x1DF14]={ + category="ll", + description="LATIN SMALL LETTER ENG WITH PALATAL HOOK", + direction="l", + linebreak="al", + unicodeslot=0x1DF14, + }, + [0x1DF15]={ + category="ll", + description="LATIN SMALL LETTER TURNED R WITH PALATAL HOOK", + direction="l", + linebreak="al", + unicodeslot=0x1DF15, + }, + [0x1DF16]={ + category="ll", + description="LATIN SMALL LETTER R WITH FISHHOOK AND PALATAL HOOK", + direction="l", + linebreak="al", + unicodeslot=0x1DF16, + }, + [0x1DF17]={ + category="ll", + description="LATIN SMALL LETTER TESH DIGRAPH WITH PALATAL HOOK", + direction="l", + linebreak="al", + unicodeslot=0x1DF17, + }, + [0x1DF18]={ + category="ll", + description="LATIN SMALL LETTER EZH WITH PALATAL HOOK", + direction="l", + linebreak="al", + unicodeslot=0x1DF18, + }, + [0x1DF19]={ + category="ll", + description="LATIN SMALL LETTER DEZH DIGRAPH WITH RETROFLEX HOOK", + direction="l", + linebreak="al", + unicodeslot=0x1DF19, + }, + [0x1DF1A]={ + category="ll", + description="LATIN SMALL LETTER I WITH STROKE AND RETROFLEX HOOK", + direction="l", + linebreak="al", + unicodeslot=0x1DF1A, + }, + [0x1DF1B]={ + category="ll", + description="LATIN SMALL LETTER O WITH RETROFLEX HOOK", + direction="l", + linebreak="al", + unicodeslot=0x1DF1B, + }, + [0x1DF1C]={ + category="ll", + description="LATIN SMALL LETTER TESH DIGRAPH WITH RETROFLEX HOOK", + direction="l", + linebreak="al", + unicodeslot=0x1DF1C, + }, + [0x1DF1D]={ + category="ll", + description="LATIN SMALL LETTER C WITH RETROFLEX HOOK", + direction="l", + linebreak="al", + unicodeslot=0x1DF1D, + }, + [0x1DF1E]={ + category="ll", + description="LATIN SMALL LETTER S WITH CURL", + direction="l", + linebreak="al", + unicodeslot=0x1DF1E, + }, + [0x1DF25]={ + category="ll", + description="LATIN SMALL LETTER D WITH MID-HEIGHT LEFT HOOK", + direction="l", + linebreak="al", + unicodeslot=0x1DF25, + }, + [0x1DF26]={ + category="ll", + description="LATIN SMALL LETTER L WITH MID-HEIGHT LEFT HOOK", + direction="l", + linebreak="al", + unicodeslot=0x1DF26, + }, + [0x1DF27]={ + category="ll", + description="LATIN SMALL LETTER N WITH MID-HEIGHT LEFT HOOK", + direction="l", + linebreak="al", + unicodeslot=0x1DF27, + }, + [0x1DF28]={ + category="ll", + description="LATIN SMALL LETTER R WITH MID-HEIGHT LEFT HOOK", + direction="l", + linebreak="al", + unicodeslot=0x1DF28, + }, + [0x1DF29]={ + category="ll", + description="LATIN SMALL LETTER S WITH MID-HEIGHT LEFT HOOK", + direction="l", + linebreak="al", + unicodeslot=0x1DF29, + }, + [0x1DF2A]={ + category="ll", + description="LATIN SMALL LETTER T WITH MID-HEIGHT LEFT HOOK", + direction="l", + linebreak="al", + unicodeslot=0x1DF2A, + }, [0x1E000]={ category="mn", combining=0xE6, @@ -235135,6 +242293,510 @@ characters.data={ linebreak="cm", unicodeslot=0x1E02A, }, + [0x1E030]={ + category="lm", + description="MODIFIER LETTER CYRILLIC SMALL A", + direction="l", + linebreak="al", + specials={ "super", 0x430 }, + unicodeslot=0x1E030, + }, + [0x1E031]={ + category="lm", + description="MODIFIER LETTER CYRILLIC SMALL BE", + direction="l", + linebreak="al", + specials={ "super", 0x431 }, + unicodeslot=0x1E031, + }, + [0x1E032]={ + category="lm", + description="MODIFIER LETTER CYRILLIC SMALL VE", + direction="l", + linebreak="al", + specials={ "super", 0x432 }, + unicodeslot=0x1E032, + }, + [0x1E033]={ + category="lm", + description="MODIFIER LETTER CYRILLIC SMALL GHE", + direction="l", + linebreak="al", + specials={ "super", 0x433 }, + unicodeslot=0x1E033, + }, + [0x1E034]={ + category="lm", + description="MODIFIER LETTER CYRILLIC SMALL DE", + direction="l", + linebreak="al", + specials={ "super", 0x434 }, + unicodeslot=0x1E034, + }, + [0x1E035]={ + category="lm", + description="MODIFIER LETTER CYRILLIC SMALL IE", + direction="l", + linebreak="al", + specials={ "super", 0x435 }, + unicodeslot=0x1E035, + }, + [0x1E036]={ + category="lm", + description="MODIFIER LETTER CYRILLIC SMALL ZHE", + direction="l", + linebreak="al", + specials={ "super", 0x436 }, + unicodeslot=0x1E036, + }, + [0x1E037]={ + category="lm", + description="MODIFIER LETTER CYRILLIC SMALL ZE", + direction="l", + linebreak="al", + specials={ "super", 0x437 }, + unicodeslot=0x1E037, + }, + [0x1E038]={ + category="lm", + description="MODIFIER LETTER CYRILLIC SMALL I", + direction="l", + linebreak="al", + specials={ "super", 0x438 }, + unicodeslot=0x1E038, + }, + [0x1E039]={ + category="lm", + description="MODIFIER LETTER CYRILLIC SMALL KA", + direction="l", + linebreak="al", + specials={ "super", 0x43A }, + unicodeslot=0x1E039, + }, + [0x1E03A]={ + category="lm", + description="MODIFIER LETTER CYRILLIC SMALL EL", + direction="l", + linebreak="al", + specials={ "super", 0x43B }, + unicodeslot=0x1E03A, + }, + [0x1E03B]={ + category="lm", + description="MODIFIER LETTER CYRILLIC SMALL EM", + direction="l", + linebreak="al", + specials={ "super", 0x43C }, + unicodeslot=0x1E03B, + }, + [0x1E03C]={ + category="lm", + description="MODIFIER LETTER CYRILLIC SMALL O", + direction="l", + linebreak="al", + specials={ "super", 0x43E }, + unicodeslot=0x1E03C, + }, + [0x1E03D]={ + category="lm", + description="MODIFIER LETTER CYRILLIC SMALL PE", + direction="l", + linebreak="al", + specials={ "super", 0x43F }, + unicodeslot=0x1E03D, + }, + [0x1E03E]={ + category="lm", + description="MODIFIER LETTER CYRILLIC SMALL ER", + direction="l", + linebreak="al", + specials={ "super", 0x440 }, + unicodeslot=0x1E03E, + }, + [0x1E03F]={ + category="lm", + description="MODIFIER LETTER CYRILLIC SMALL ES", + direction="l", + linebreak="al", + specials={ "super", 0x441 }, + unicodeslot=0x1E03F, + }, + [0x1E040]={ + category="lm", + description="MODIFIER LETTER CYRILLIC SMALL TE", + direction="l", + linebreak="al", + specials={ "super", 0x442 }, + unicodeslot=0x1E040, + }, + [0x1E041]={ + category="lm", + description="MODIFIER LETTER CYRILLIC SMALL U", + direction="l", + linebreak="al", + specials={ "super", 0x443 }, + unicodeslot=0x1E041, + }, + [0x1E042]={ + category="lm", + description="MODIFIER LETTER CYRILLIC SMALL EF", + direction="l", + linebreak="al", + specials={ "super", 0x444 }, + unicodeslot=0x1E042, + }, + [0x1E043]={ + category="lm", + description="MODIFIER LETTER CYRILLIC SMALL HA", + direction="l", + linebreak="al", + specials={ "super", 0x445 }, + unicodeslot=0x1E043, + }, + [0x1E044]={ + category="lm", + description="MODIFIER LETTER CYRILLIC SMALL TSE", + direction="l", + linebreak="al", + specials={ "super", 0x446 }, + unicodeslot=0x1E044, + }, + [0x1E045]={ + category="lm", + description="MODIFIER LETTER CYRILLIC SMALL CHE", + direction="l", + linebreak="al", + specials={ "super", 0x447 }, + unicodeslot=0x1E045, + }, + [0x1E046]={ + category="lm", + description="MODIFIER LETTER CYRILLIC SMALL SHA", + direction="l", + linebreak="al", + specials={ "super", 0x448 }, + unicodeslot=0x1E046, + }, + [0x1E047]={ + category="lm", + description="MODIFIER LETTER CYRILLIC SMALL YERU", + direction="l", + linebreak="al", + specials={ "super", 0x44B }, + unicodeslot=0x1E047, + }, + [0x1E048]={ + category="lm", + description="MODIFIER LETTER CYRILLIC SMALL E", + direction="l", + linebreak="al", + specials={ "super", 0x44D }, + unicodeslot=0x1E048, + }, + [0x1E049]={ + category="lm", + description="MODIFIER LETTER CYRILLIC SMALL YU", + direction="l", + linebreak="al", + specials={ "super", 0x44E }, + unicodeslot=0x1E049, + }, + [0x1E04A]={ + category="lm", + description="MODIFIER LETTER CYRILLIC SMALL DZZE", + direction="l", + linebreak="al", + specials={ "super", 0xA689 }, + unicodeslot=0x1E04A, + }, + [0x1E04B]={ + category="lm", + description="MODIFIER LETTER CYRILLIC SMALL SCHWA", + direction="l", + linebreak="al", + specials={ "super", 0x4D9 }, + unicodeslot=0x1E04B, + }, + [0x1E04C]={ + category="lm", + description="MODIFIER LETTER CYRILLIC SMALL BYELORUSSIAN-UKRAINIAN I", + direction="l", + linebreak="al", + specials={ "super", 0x456 }, + unicodeslot=0x1E04C, + }, + [0x1E04D]={ + category="lm", + description="MODIFIER LETTER CYRILLIC SMALL JE", + direction="l", + linebreak="al", + specials={ "super", 0x458 }, + unicodeslot=0x1E04D, + }, + [0x1E04E]={ + category="lm", + description="MODIFIER LETTER CYRILLIC SMALL BARRED O", + direction="l", + linebreak="al", + specials={ "super", 0x4E9 }, + unicodeslot=0x1E04E, + }, + [0x1E04F]={ + category="lm", + description="MODIFIER LETTER CYRILLIC SMALL STRAIGHT U", + direction="l", + linebreak="al", + specials={ "super", 0x4AF }, + unicodeslot=0x1E04F, + }, + [0x1E050]={ + category="lm", + description="MODIFIER LETTER CYRILLIC SMALL PALOCHKA", + direction="l", + linebreak="al", + specials={ "super", 0x4CF }, + unicodeslot=0x1E050, + }, + [0x1E051]={ + category="lm", + description="CYRILLIC SUBSCRIPT SMALL LETTER A", + direction="l", + linebreak="al", + specials={ "sub", 0x430 }, + unicodeslot=0x1E051, + }, + [0x1E052]={ + category="lm", + description="CYRILLIC SUBSCRIPT SMALL LETTER BE", + direction="l", + linebreak="al", + specials={ "sub", 0x431 }, + unicodeslot=0x1E052, + }, + [0x1E053]={ + category="lm", + description="CYRILLIC SUBSCRIPT SMALL LETTER VE", + direction="l", + linebreak="al", + specials={ "sub", 0x432 }, + unicodeslot=0x1E053, + }, + [0x1E054]={ + category="lm", + description="CYRILLIC SUBSCRIPT SMALL LETTER GHE", + direction="l", + linebreak="al", + specials={ "sub", 0x433 }, + unicodeslot=0x1E054, + }, + [0x1E055]={ + category="lm", + description="CYRILLIC SUBSCRIPT SMALL LETTER DE", + direction="l", + linebreak="al", + specials={ "sub", 0x434 }, + unicodeslot=0x1E055, + }, + [0x1E056]={ + category="lm", + description="CYRILLIC SUBSCRIPT SMALL LETTER IE", + direction="l", + linebreak="al", + specials={ "sub", 0x435 }, + unicodeslot=0x1E056, + }, + [0x1E057]={ + category="lm", + description="CYRILLIC SUBSCRIPT SMALL LETTER ZHE", + direction="l", + linebreak="al", + specials={ "sub", 0x436 }, + unicodeslot=0x1E057, + }, + [0x1E058]={ + category="lm", + description="CYRILLIC SUBSCRIPT SMALL LETTER ZE", + direction="l", + linebreak="al", + specials={ "sub", 0x437 }, + unicodeslot=0x1E058, + }, + [0x1E059]={ + category="lm", + description="CYRILLIC SUBSCRIPT SMALL LETTER I", + direction="l", + linebreak="al", + specials={ "sub", 0x438 }, + unicodeslot=0x1E059, + }, + [0x1E05A]={ + category="lm", + description="CYRILLIC SUBSCRIPT SMALL LETTER KA", + direction="l", + linebreak="al", + specials={ "sub", 0x43A }, + unicodeslot=0x1E05A, + }, + [0x1E05B]={ + category="lm", + description="CYRILLIC SUBSCRIPT SMALL LETTER EL", + direction="l", + linebreak="al", + specials={ "sub", 0x43B }, + unicodeslot=0x1E05B, + }, + [0x1E05C]={ + category="lm", + description="CYRILLIC SUBSCRIPT SMALL LETTER O", + direction="l", + linebreak="al", + specials={ "sub", 0x43E }, + unicodeslot=0x1E05C, + }, + [0x1E05D]={ + category="lm", + description="CYRILLIC SUBSCRIPT SMALL LETTER PE", + direction="l", + linebreak="al", + specials={ "sub", 0x43F }, + unicodeslot=0x1E05D, + }, + [0x1E05E]={ + category="lm", + description="CYRILLIC SUBSCRIPT SMALL LETTER ES", + direction="l", + linebreak="al", + specials={ "sub", 0x441 }, + unicodeslot=0x1E05E, + }, + [0x1E05F]={ + category="lm", + description="CYRILLIC SUBSCRIPT SMALL LETTER U", + direction="l", + linebreak="al", + specials={ "sub", 0x443 }, + unicodeslot=0x1E05F, + }, + [0x1E060]={ + category="lm", + description="CYRILLIC SUBSCRIPT SMALL LETTER EF", + direction="l", + linebreak="al", + specials={ "sub", 0x444 }, + unicodeslot=0x1E060, + }, + [0x1E061]={ + category="lm", + description="CYRILLIC SUBSCRIPT SMALL LETTER HA", + direction="l", + linebreak="al", + specials={ "sub", 0x445 }, + unicodeslot=0x1E061, + }, + [0x1E062]={ + category="lm", + description="CYRILLIC SUBSCRIPT SMALL LETTER TSE", + direction="l", + linebreak="al", + specials={ "sub", 0x446 }, + unicodeslot=0x1E062, + }, + [0x1E063]={ + category="lm", + description="CYRILLIC SUBSCRIPT SMALL LETTER CHE", + direction="l", + linebreak="al", + specials={ "sub", 0x447 }, + unicodeslot=0x1E063, + }, + [0x1E064]={ + category="lm", + description="CYRILLIC SUBSCRIPT SMALL LETTER SHA", + direction="l", + linebreak="al", + specials={ "sub", 0x448 }, + unicodeslot=0x1E064, + }, + [0x1E065]={ + category="lm", + description="CYRILLIC SUBSCRIPT SMALL LETTER HARD SIGN", + direction="l", + linebreak="al", + specials={ "sub", 0x44A }, + unicodeslot=0x1E065, + }, + [0x1E066]={ + category="lm", + description="CYRILLIC SUBSCRIPT SMALL LETTER YERU", + direction="l", + linebreak="al", + specials={ "sub", 0x44B }, + unicodeslot=0x1E066, + }, + [0x1E067]={ + category="lm", + description="CYRILLIC SUBSCRIPT SMALL LETTER GHE WITH UPTURN", + direction="l", + linebreak="al", + specials={ "sub", 0x491 }, + unicodeslot=0x1E067, + }, + [0x1E068]={ + category="lm", + description="CYRILLIC SUBSCRIPT SMALL LETTER BYELORUSSIAN-UKRAINIAN I", + direction="l", + linebreak="al", + specials={ "sub", 0x456 }, + unicodeslot=0x1E068, + }, + [0x1E069]={ + category="lm", + description="CYRILLIC SUBSCRIPT SMALL LETTER DZE", + direction="l", + linebreak="al", + specials={ "sub", 0x455 }, + unicodeslot=0x1E069, + }, + [0x1E06A]={ + category="lm", + description="CYRILLIC SUBSCRIPT SMALL LETTER DZHE", + direction="l", + linebreak="al", + specials={ "sub", 0x45F }, + unicodeslot=0x1E06A, + }, + [0x1E06B]={ + category="lm", + description="MODIFIER LETTER CYRILLIC SMALL ES WITH DESCENDER", + direction="l", + linebreak="al", + specials={ "super", 0x4AB }, + unicodeslot=0x1E06B, + }, + [0x1E06C]={ + category="lm", + description="MODIFIER LETTER CYRILLIC SMALL YERU WITH BACK YER", + direction="l", + linebreak="al", + specials={ "super", 0xA651 }, + unicodeslot=0x1E06C, + }, + [0x1E06D]={ + category="lm", + description="MODIFIER LETTER CYRILLIC SMALL STRAIGHT U WITH STROKE", + direction="l", + linebreak="al", + specials={ "super", 0x4B1 }, + unicodeslot=0x1E06D, + }, + [0x1E08F]={ + category="mn", + combining=0xE6, + description="COMBINING CYRILLIC SMALL LETTER BYELORUSSIAN-UKRAINIAN I", + direction="nsm", + linebreak="cm", + unicodeslot=0x1E08F, + }, [0x1E100]={ category="lo", description="NYIAKENG PUACHUE HMONG LETTER MA", @@ -235639,6 +243301,224 @@ characters.data={ linebreak="al", unicodeslot=0x1E14F, }, + [0x1E290]={ + category="lo", + description="TOTO LETTER PA", + direction="l", + linebreak="al", + unicodeslot=0x1E290, + }, + [0x1E291]={ + category="lo", + description="TOTO LETTER BA", + direction="l", + linebreak="al", + unicodeslot=0x1E291, + }, + [0x1E292]={ + category="lo", + description="TOTO LETTER TA", + direction="l", + linebreak="al", + unicodeslot=0x1E292, + }, + [0x1E293]={ + category="lo", + description="TOTO LETTER DA", + direction="l", + linebreak="al", + unicodeslot=0x1E293, + }, + [0x1E294]={ + category="lo", + description="TOTO LETTER KA", + direction="l", + linebreak="al", + unicodeslot=0x1E294, + }, + [0x1E295]={ + category="lo", + description="TOTO LETTER GA", + direction="l", + linebreak="al", + unicodeslot=0x1E295, + }, + [0x1E296]={ + category="lo", + description="TOTO LETTER MA", + direction="l", + linebreak="al", + unicodeslot=0x1E296, + }, + [0x1E297]={ + category="lo", + description="TOTO LETTER NA", + direction="l", + linebreak="al", + unicodeslot=0x1E297, + }, + [0x1E298]={ + category="lo", + description="TOTO LETTER NGA", + direction="l", + linebreak="al", + unicodeslot=0x1E298, + }, + [0x1E299]={ + category="lo", + description="TOTO LETTER SA", + direction="l", + linebreak="al", + unicodeslot=0x1E299, + }, + [0x1E29A]={ + category="lo", + description="TOTO LETTER CHA", + direction="l", + linebreak="al", + unicodeslot=0x1E29A, + }, + [0x1E29B]={ + category="lo", + description="TOTO LETTER YA", + direction="l", + linebreak="al", + unicodeslot=0x1E29B, + }, + [0x1E29C]={ + category="lo", + description="TOTO LETTER WA", + direction="l", + linebreak="al", + unicodeslot=0x1E29C, + }, + [0x1E29D]={ + category="lo", + description="TOTO LETTER JA", + direction="l", + linebreak="al", + unicodeslot=0x1E29D, + }, + [0x1E29E]={ + category="lo", + description="TOTO LETTER HA", + direction="l", + linebreak="al", + unicodeslot=0x1E29E, + }, + [0x1E29F]={ + category="lo", + description="TOTO LETTER RA", + direction="l", + linebreak="al", + unicodeslot=0x1E29F, + }, + [0x1E2A0]={ + category="lo", + description="TOTO LETTER LA", + direction="l", + linebreak="al", + unicodeslot=0x1E2A0, + }, + [0x1E2A1]={ + category="lo", + description="TOTO LETTER I", + direction="l", + linebreak="al", + unicodeslot=0x1E2A1, + }, + [0x1E2A2]={ + category="lo", + description="TOTO LETTER BREATHY I", + direction="l", + linebreak="al", + unicodeslot=0x1E2A2, + }, + [0x1E2A3]={ + category="lo", + description="TOTO LETTER IU", + direction="l", + linebreak="al", + unicodeslot=0x1E2A3, + }, + [0x1E2A4]={ + category="lo", + description="TOTO LETTER BREATHY IU", + direction="l", + linebreak="al", + unicodeslot=0x1E2A4, + }, + [0x1E2A5]={ + category="lo", + description="TOTO LETTER U", + direction="l", + linebreak="al", + unicodeslot=0x1E2A5, + }, + [0x1E2A6]={ + category="lo", + description="TOTO LETTER E", + direction="l", + linebreak="al", + unicodeslot=0x1E2A6, + }, + [0x1E2A7]={ + category="lo", + description="TOTO LETTER BREATHY E", + direction="l", + linebreak="al", + unicodeslot=0x1E2A7, + }, + [0x1E2A8]={ + category="lo", + description="TOTO LETTER EO", + direction="l", + linebreak="al", + unicodeslot=0x1E2A8, + }, + [0x1E2A9]={ + category="lo", + description="TOTO LETTER BREATHY EO", + direction="l", + linebreak="al", + unicodeslot=0x1E2A9, + }, + [0x1E2AA]={ + category="lo", + description="TOTO LETTER O", + direction="l", + linebreak="al", + unicodeslot=0x1E2AA, + }, + [0x1E2AB]={ + category="lo", + description="TOTO LETTER AE", + direction="l", + linebreak="al", + unicodeslot=0x1E2AB, + }, + [0x1E2AC]={ + category="lo", + description="TOTO LETTER BREATHY AE", + direction="l", + linebreak="al", + unicodeslot=0x1E2AC, + }, + [0x1E2AD]={ + category="lo", + description="TOTO LETTER A", + direction="l", + linebreak="al", + unicodeslot=0x1E2AD, + }, + [0x1E2AE]={ + category="mn", + combining=0xE6, + description="TOTO SIGN RISING TONE", + direction="nsm", + linebreak="cm", + unicodeslot=0x1E2AE, + }, [0x1E2C0]={ category="lo", description="WANCHO LETTER AA", @@ -236056,6 +243936,500 @@ characters.data={ linebreak="pr", unicodeslot=0x1E2FF, }, + [0x1E4D0]={ + category="lo", + description="NAG MUNDARI LETTER O", + direction="l", + linebreak="al", + unicodeslot=0x1E4D0, + }, + [0x1E4D1]={ + category="lo", + description="NAG MUNDARI LETTER OP", + direction="l", + linebreak="al", + unicodeslot=0x1E4D1, + }, + [0x1E4D2]={ + category="lo", + description="NAG MUNDARI LETTER OL", + direction="l", + linebreak="al", + unicodeslot=0x1E4D2, + }, + [0x1E4D3]={ + category="lo", + description="NAG MUNDARI LETTER OY", + direction="l", + linebreak="al", + unicodeslot=0x1E4D3, + }, + [0x1E4D4]={ + category="lo", + description="NAG MUNDARI LETTER ONG", + direction="l", + linebreak="al", + unicodeslot=0x1E4D4, + }, + [0x1E4D5]={ + category="lo", + description="NAG MUNDARI LETTER A", + direction="l", + linebreak="al", + unicodeslot=0x1E4D5, + }, + [0x1E4D6]={ + category="lo", + description="NAG MUNDARI LETTER AJ", + direction="l", + linebreak="al", + unicodeslot=0x1E4D6, + }, + [0x1E4D7]={ + category="lo", + description="NAG MUNDARI LETTER AB", + direction="l", + linebreak="al", + unicodeslot=0x1E4D7, + }, + [0x1E4D8]={ + category="lo", + description="NAG MUNDARI LETTER ANY", + direction="l", + linebreak="al", + unicodeslot=0x1E4D8, + }, + [0x1E4D9]={ + category="lo", + description="NAG MUNDARI LETTER AH", + direction="l", + linebreak="al", + unicodeslot=0x1E4D9, + }, + [0x1E4DA]={ + category="lo", + description="NAG MUNDARI LETTER I", + direction="l", + linebreak="al", + unicodeslot=0x1E4DA, + }, + [0x1E4DB]={ + category="lo", + description="NAG MUNDARI LETTER IS", + direction="l", + linebreak="al", + unicodeslot=0x1E4DB, + }, + [0x1E4DC]={ + category="lo", + description="NAG MUNDARI LETTER IDD", + direction="l", + linebreak="al", + unicodeslot=0x1E4DC, + }, + [0x1E4DD]={ + category="lo", + description="NAG MUNDARI LETTER IT", + direction="l", + linebreak="al", + unicodeslot=0x1E4DD, + }, + [0x1E4DE]={ + category="lo", + description="NAG MUNDARI LETTER IH", + direction="l", + linebreak="al", + unicodeslot=0x1E4DE, + }, + [0x1E4DF]={ + category="lo", + description="NAG MUNDARI LETTER U", + direction="l", + linebreak="al", + unicodeslot=0x1E4DF, + }, + [0x1E4E0]={ + category="lo", + description="NAG MUNDARI LETTER UC", + direction="l", + linebreak="al", + unicodeslot=0x1E4E0, + }, + [0x1E4E1]={ + category="lo", + description="NAG MUNDARI LETTER UD", + direction="l", + linebreak="al", + unicodeslot=0x1E4E1, + }, + [0x1E4E2]={ + category="lo", + description="NAG MUNDARI LETTER UK", + direction="l", + linebreak="al", + unicodeslot=0x1E4E2, + }, + [0x1E4E3]={ + category="lo", + description="NAG MUNDARI LETTER UR", + direction="l", + linebreak="al", + unicodeslot=0x1E4E3, + }, + [0x1E4E4]={ + category="lo", + description="NAG MUNDARI LETTER E", + direction="l", + linebreak="al", + unicodeslot=0x1E4E4, + }, + [0x1E4E5]={ + category="lo", + description="NAG MUNDARI LETTER ENN", + direction="l", + linebreak="al", + unicodeslot=0x1E4E5, + }, + [0x1E4E6]={ + category="lo", + description="NAG MUNDARI LETTER EG", + direction="l", + linebreak="al", + unicodeslot=0x1E4E6, + }, + [0x1E4E7]={ + category="lo", + description="NAG MUNDARI LETTER EM", + direction="l", + linebreak="al", + unicodeslot=0x1E4E7, + }, + [0x1E4E8]={ + category="lo", + description="NAG MUNDARI LETTER EN", + direction="l", + linebreak="al", + unicodeslot=0x1E4E8, + }, + [0x1E4E9]={ + category="lo", + description="NAG MUNDARI LETTER ETT", + direction="l", + linebreak="al", + unicodeslot=0x1E4E9, + }, + [0x1E4EA]={ + category="lo", + description="NAG MUNDARI LETTER ELL", + direction="l", + linebreak="al", + unicodeslot=0x1E4EA, + }, + [0x1E4EB]={ + category="lm", + description="NAG MUNDARI SIGN OJOD", + direction="l", + linebreak="al", + unicodeslot=0x1E4EB, + }, + [0x1E4EC]={ + category="mn", + combining=0xE8, + description="NAG MUNDARI SIGN MUHOR", + direction="nsm", + linebreak="cm", + unicodeslot=0x1E4EC, + }, + [0x1E4ED]={ + category="mn", + combining=0xE8, + description="NAG MUNDARI SIGN TOYOR", + direction="nsm", + linebreak="cm", + unicodeslot=0x1E4ED, + }, + [0x1E4EE]={ + category="mn", + combining=0xDC, + description="NAG MUNDARI SIGN IKIR", + direction="nsm", + linebreak="cm", + unicodeslot=0x1E4EE, + }, + [0x1E4EF]={ + category="mn", + combining=0xE6, + description="NAG MUNDARI SIGN SUTUH", + direction="nsm", + linebreak="cm", + unicodeslot=0x1E4EF, + }, + [0x1E4F0]={ + category="nd", + description="NAG MUNDARI DIGIT ZERO", + direction="l", + linebreak="nu", + unicodeslot=0x1E4F0, + }, + [0x1E4F1]={ + category="nd", + description="NAG MUNDARI DIGIT ONE", + direction="l", + linebreak="nu", + unicodeslot=0x1E4F1, + }, + [0x1E4F2]={ + category="nd", + description="NAG MUNDARI DIGIT TWO", + direction="l", + linebreak="nu", + unicodeslot=0x1E4F2, + }, + [0x1E4F3]={ + category="nd", + description="NAG MUNDARI DIGIT THREE", + direction="l", + linebreak="nu", + unicodeslot=0x1E4F3, + }, + [0x1E4F4]={ + category="nd", + description="NAG MUNDARI DIGIT FOUR", + direction="l", + linebreak="nu", + unicodeslot=0x1E4F4, + }, + [0x1E4F5]={ + category="nd", + description="NAG MUNDARI DIGIT FIVE", + direction="l", + linebreak="nu", + unicodeslot=0x1E4F5, + }, + [0x1E4F6]={ + category="nd", + description="NAG MUNDARI DIGIT SIX", + direction="l", + linebreak="nu", + unicodeslot=0x1E4F6, + }, + [0x1E4F7]={ + category="nd", + description="NAG MUNDARI DIGIT SEVEN", + direction="l", + linebreak="nu", + unicodeslot=0x1E4F7, + }, + [0x1E4F8]={ + category="nd", + description="NAG MUNDARI DIGIT EIGHT", + direction="l", + linebreak="nu", + unicodeslot=0x1E4F8, + }, + [0x1E4F9]={ + category="nd", + description="NAG MUNDARI DIGIT NINE", + direction="l", + linebreak="nu", + unicodeslot=0x1E4F9, + }, + [0x1E7E0]={ + category="lo", + description="ETHIOPIC SYLLABLE HHYA", + direction="l", + linebreak="al", + unicodeslot=0x1E7E0, + }, + [0x1E7E1]={ + category="lo", + description="ETHIOPIC SYLLABLE HHYU", + direction="l", + linebreak="al", + unicodeslot=0x1E7E1, + }, + [0x1E7E2]={ + category="lo", + description="ETHIOPIC SYLLABLE HHYI", + direction="l", + linebreak="al", + unicodeslot=0x1E7E2, + }, + [0x1E7E3]={ + category="lo", + description="ETHIOPIC SYLLABLE HHYAA", + direction="l", + linebreak="al", + unicodeslot=0x1E7E3, + }, + [0x1E7E4]={ + category="lo", + description="ETHIOPIC SYLLABLE HHYEE", + direction="l", + linebreak="al", + unicodeslot=0x1E7E4, + }, + [0x1E7E5]={ + category="lo", + description="ETHIOPIC SYLLABLE HHYE", + direction="l", + linebreak="al", + unicodeslot=0x1E7E5, + }, + [0x1E7E6]={ + category="lo", + description="ETHIOPIC SYLLABLE HHYO", + direction="l", + linebreak="al", + unicodeslot=0x1E7E6, + }, + [0x1E7E8]={ + category="lo", + description="ETHIOPIC SYLLABLE GURAGE HHWA", + direction="l", + linebreak="al", + unicodeslot=0x1E7E8, + }, + [0x1E7E9]={ + category="lo", + description="ETHIOPIC SYLLABLE HHWI", + direction="l", + linebreak="al", + unicodeslot=0x1E7E9, + }, + [0x1E7EA]={ + category="lo", + description="ETHIOPIC SYLLABLE HHWEE", + direction="l", + linebreak="al", + unicodeslot=0x1E7EA, + }, + [0x1E7EB]={ + category="lo", + description="ETHIOPIC SYLLABLE HHWE", + direction="l", + linebreak="al", + unicodeslot=0x1E7EB, + }, + [0x1E7ED]={ + category="lo", + description="ETHIOPIC SYLLABLE GURAGE MWI", + direction="l", + linebreak="al", + unicodeslot=0x1E7ED, + }, + [0x1E7EE]={ + category="lo", + description="ETHIOPIC SYLLABLE GURAGE MWEE", + direction="l", + linebreak="al", + unicodeslot=0x1E7EE, + }, + [0x1E7F0]={ + category="lo", + description="ETHIOPIC SYLLABLE GURAGE QWI", + direction="l", + linebreak="al", + unicodeslot=0x1E7F0, + }, + [0x1E7F1]={ + category="lo", + description="ETHIOPIC SYLLABLE GURAGE QWEE", + direction="l", + linebreak="al", + unicodeslot=0x1E7F1, + }, + [0x1E7F2]={ + category="lo", + description="ETHIOPIC SYLLABLE GURAGE QWE", + direction="l", + linebreak="al", + unicodeslot=0x1E7F2, + }, + [0x1E7F3]={ + category="lo", + description="ETHIOPIC SYLLABLE GURAGE BWI", + direction="l", + linebreak="al", + unicodeslot=0x1E7F3, + }, + [0x1E7F4]={ + category="lo", + description="ETHIOPIC SYLLABLE GURAGE BWEE", + direction="l", + linebreak="al", + unicodeslot=0x1E7F4, + }, + [0x1E7F5]={ + category="lo", + description="ETHIOPIC SYLLABLE GURAGE KWI", + direction="l", + linebreak="al", + unicodeslot=0x1E7F5, + }, + [0x1E7F6]={ + category="lo", + description="ETHIOPIC SYLLABLE GURAGE KWEE", + direction="l", + linebreak="al", + unicodeslot=0x1E7F6, + }, + [0x1E7F7]={ + category="lo", + description="ETHIOPIC SYLLABLE GURAGE KWE", + direction="l", + linebreak="al", + unicodeslot=0x1E7F7, + }, + [0x1E7F8]={ + category="lo", + description="ETHIOPIC SYLLABLE GURAGE GWI", + direction="l", + linebreak="al", + unicodeslot=0x1E7F8, + }, + [0x1E7F9]={ + category="lo", + description="ETHIOPIC SYLLABLE GURAGE GWEE", + direction="l", + linebreak="al", + unicodeslot=0x1E7F9, + }, + [0x1E7FA]={ + category="lo", + description="ETHIOPIC SYLLABLE GURAGE GWE", + direction="l", + linebreak="al", + unicodeslot=0x1E7FA, + }, + [0x1E7FB]={ + category="lo", + description="ETHIOPIC SYLLABLE GURAGE FWI", + direction="l", + linebreak="al", + unicodeslot=0x1E7FB, + }, + [0x1E7FC]={ + category="lo", + description="ETHIOPIC SYLLABLE GURAGE FWEE", + direction="l", + linebreak="al", + unicodeslot=0x1E7FC, + }, + [0x1E7FD]={ + category="lo", + description="ETHIOPIC SYLLABLE GURAGE PWI", + direction="l", + linebreak="al", + unicodeslot=0x1E7FD, + }, + [0x1E7FE]={ + category="lo", + description="ETHIOPIC SYLLABLE GURAGE PWEE", + direction="l", + linebreak="al", + unicodeslot=0x1E7FE, + }, [0x1E800]={ category="lo", description="MENDE KIKAKUI SYLLABLE M001 KI", @@ -237559,6 +245933,7 @@ characters.data={ category="lu", description="ADLAM CAPITAL LETTER ALIF", direction="r", + lccode=0x1E922, linebreak="al", unicodeslot=0x1E900, }, @@ -237567,6 +245942,7 @@ characters.data={ category="lu", description="ADLAM CAPITAL LETTER DAALI", direction="r", + lccode=0x1E923, linebreak="al", unicodeslot=0x1E901, }, @@ -237575,6 +245951,7 @@ characters.data={ category="lu", description="ADLAM CAPITAL LETTER LAAM", direction="r", + lccode=0x1E924, linebreak="al", unicodeslot=0x1E902, }, @@ -237583,6 +245960,7 @@ characters.data={ category="lu", description="ADLAM CAPITAL LETTER MIIM", direction="r", + lccode=0x1E925, linebreak="al", unicodeslot=0x1E903, }, @@ -237591,6 +245969,7 @@ characters.data={ category="lu", description="ADLAM CAPITAL LETTER BA", direction="r", + lccode=0x1E926, linebreak="al", unicodeslot=0x1E904, }, @@ -237599,6 +245978,7 @@ characters.data={ category="lu", description="ADLAM CAPITAL LETTER SINNYIIYHE", direction="r", + lccode=0x1E927, linebreak="al", unicodeslot=0x1E905, }, @@ -237607,6 +245987,7 @@ characters.data={ category="lu", description="ADLAM CAPITAL LETTER PE", direction="r", + lccode=0x1E928, linebreak="al", unicodeslot=0x1E906, }, @@ -237615,6 +245996,7 @@ characters.data={ category="lu", description="ADLAM CAPITAL LETTER BHE", direction="r", + lccode=0x1E929, linebreak="al", unicodeslot=0x1E907, }, @@ -237623,6 +246005,7 @@ characters.data={ category="lu", description="ADLAM CAPITAL LETTER RA", direction="r", + lccode=0x1E92A, linebreak="al", unicodeslot=0x1E908, }, @@ -237631,6 +246014,7 @@ characters.data={ category="lu", description="ADLAM CAPITAL LETTER E", direction="r", + lccode=0x1E92B, linebreak="al", unicodeslot=0x1E909, }, @@ -237639,6 +246023,7 @@ characters.data={ category="lu", description="ADLAM CAPITAL LETTER FA", direction="r", + lccode=0x1E92C, linebreak="al", unicodeslot=0x1E90A, }, @@ -237647,6 +246032,7 @@ characters.data={ category="lu", description="ADLAM CAPITAL LETTER I", direction="r", + lccode=0x1E92D, linebreak="al", unicodeslot=0x1E90B, }, @@ -237655,6 +246041,7 @@ characters.data={ category="lu", description="ADLAM CAPITAL LETTER O", direction="r", + lccode=0x1E92E, linebreak="al", unicodeslot=0x1E90C, }, @@ -237663,6 +246050,7 @@ characters.data={ category="lu", description="ADLAM CAPITAL LETTER DHA", direction="r", + lccode=0x1E92F, linebreak="al", unicodeslot=0x1E90D, }, @@ -237671,6 +246059,7 @@ characters.data={ category="lu", description="ADLAM CAPITAL LETTER YHE", direction="r", + lccode=0x1E930, linebreak="al", unicodeslot=0x1E90E, }, @@ -237679,6 +246068,7 @@ characters.data={ category="lu", description="ADLAM CAPITAL LETTER WAW", direction="r", + lccode=0x1E931, linebreak="al", unicodeslot=0x1E90F, }, @@ -237687,6 +246077,7 @@ characters.data={ category="lu", description="ADLAM CAPITAL LETTER NUN", direction="r", + lccode=0x1E932, linebreak="al", unicodeslot=0x1E910, }, @@ -237695,6 +246086,7 @@ characters.data={ category="lu", description="ADLAM CAPITAL LETTER KAF", direction="r", + lccode=0x1E933, linebreak="al", unicodeslot=0x1E911, }, @@ -237703,6 +246095,7 @@ characters.data={ category="lu", description="ADLAM CAPITAL LETTER YA", direction="r", + lccode=0x1E934, linebreak="al", unicodeslot=0x1E912, }, @@ -237711,6 +246104,7 @@ characters.data={ category="lu", description="ADLAM CAPITAL LETTER U", direction="r", + lccode=0x1E935, linebreak="al", unicodeslot=0x1E913, }, @@ -237719,6 +246113,7 @@ characters.data={ category="lu", description="ADLAM CAPITAL LETTER JIIM", direction="r", + lccode=0x1E936, linebreak="al", unicodeslot=0x1E914, }, @@ -237727,6 +246122,7 @@ characters.data={ category="lu", description="ADLAM CAPITAL LETTER CHI", direction="r", + lccode=0x1E937, linebreak="al", unicodeslot=0x1E915, }, @@ -237735,6 +246131,7 @@ characters.data={ category="lu", description="ADLAM CAPITAL LETTER HA", direction="r", + lccode=0x1E938, linebreak="al", unicodeslot=0x1E916, }, @@ -237743,6 +246140,7 @@ characters.data={ category="lu", description="ADLAM CAPITAL LETTER QAAF", direction="r", + lccode=0x1E939, linebreak="al", unicodeslot=0x1E917, }, @@ -237751,6 +246149,7 @@ characters.data={ category="lu", description="ADLAM CAPITAL LETTER GA", direction="r", + lccode=0x1E93A, linebreak="al", unicodeslot=0x1E918, }, @@ -237759,6 +246158,7 @@ characters.data={ category="lu", description="ADLAM CAPITAL LETTER NYA", direction="r", + lccode=0x1E93B, linebreak="al", unicodeslot=0x1E919, }, @@ -237767,6 +246167,7 @@ characters.data={ category="lu", description="ADLAM CAPITAL LETTER TU", direction="r", + lccode=0x1E93C, linebreak="al", unicodeslot=0x1E91A, }, @@ -237775,6 +246176,7 @@ characters.data={ category="lu", description="ADLAM CAPITAL LETTER NHA", direction="r", + lccode=0x1E93D, linebreak="al", unicodeslot=0x1E91B, }, @@ -237783,6 +246185,7 @@ characters.data={ category="lu", description="ADLAM CAPITAL LETTER VA", direction="r", + lccode=0x1E93E, linebreak="al", unicodeslot=0x1E91C, }, @@ -237791,6 +246194,7 @@ characters.data={ category="lu", description="ADLAM CAPITAL LETTER KHA", direction="r", + lccode=0x1E93F, linebreak="al", unicodeslot=0x1E91D, }, @@ -237799,6 +246203,7 @@ characters.data={ category="lu", description="ADLAM CAPITAL LETTER GBE", direction="r", + lccode=0x1E940, linebreak="al", unicodeslot=0x1E91E, }, @@ -237807,6 +246212,7 @@ characters.data={ category="lu", description="ADLAM CAPITAL LETTER ZAL", direction="r", + lccode=0x1E941, linebreak="al", unicodeslot=0x1E91F, }, @@ -237815,6 +246221,7 @@ characters.data={ category="lu", description="ADLAM CAPITAL LETTER KPO", direction="r", + lccode=0x1E942, linebreak="al", unicodeslot=0x1E920, }, @@ -237823,6 +246230,7 @@ characters.data={ category="lu", description="ADLAM CAPITAL LETTER SHA", direction="r", + lccode=0x1E943, linebreak="al", unicodeslot=0x1E921, }, @@ -251950,6 +260358,38 @@ characters.data={ linebreak="id", unicodeslot=0x1F6D7, }, + [0x1F6DC]={ + category="so", + cjkwd="w", + description="WIRELESS", + direction="on", + linebreak="id", + unicodeslot=0x1F6DC, + }, + [0x1F6DD]={ + category="so", + cjkwd="w", + description="PLAYGROUND SLIDE", + direction="on", + linebreak="id", + unicodeslot=0x1F6DD, + }, + [0x1F6DE]={ + category="so", + cjkwd="w", + description="WHEEL", + direction="on", + linebreak="id", + unicodeslot=0x1F6DE, + }, + [0x1F6DF]={ + category="so", + cjkwd="w", + description="RING BUOY", + direction="on", + linebreak="id", + unicodeslot=0x1F6DF, + }, [0x1F6E0]={ category="so", description="HAMMER AND WRENCH", @@ -252964,6 +261404,62 @@ characters.data={ linebreak="al", unicodeslot=0x1F773, }, + [0x1F774]={ + category="so", + description="LOT OF FORTUNE", + direction="on", + linebreak="id", + unicodeslot=0x1F774, + }, + [0x1F775]={ + category="so", + description="OCCULTATION", + direction="on", + linebreak="id", + unicodeslot=0x1F775, + }, + [0x1F776]={ + category="so", + description="LUNAR ECLIPSE", + direction="on", + linebreak="id", + unicodeslot=0x1F776, + }, + [0x1F77B]={ + category="so", + description="HAUMEA", + direction="on", + linebreak="id", + unicodeslot=0x1F77B, + }, + [0x1F77C]={ + category="so", + description="MAKEMAKE", + direction="on", + linebreak="id", + unicodeslot=0x1F77C, + }, + [0x1F77D]={ + category="so", + description="GONGGONG", + direction="on", + linebreak="id", + unicodeslot=0x1F77D, + }, + [0x1F77E]={ + category="so", + description="QUAOAR", + direction="on", + linebreak="id", + unicodeslot=0x1F77E, + }, + [0x1F77F]={ + category="so", + description="ORCUS", + direction="on", + linebreak="id", + unicodeslot=0x1F77F, + }, [0x1F780]={ category="so", description="BLACK LEFT-POINTING ISOSCELES RIGHT TRIANGLE", @@ -253588,6 +262084,13 @@ characters.data={ linebreak="id", unicodeslot=0x1F7D8, }, + [0x1F7D9]={ + category="so", + description="NINE POINTED WHITE STAR", + direction="on", + linebreak="id", + unicodeslot=0x1F7D9, + }, [0x1F7E0]={ category="so", cjkwd="w", @@ -253684,6 +262187,14 @@ characters.data={ linebreak="id", unicodeslot=0x1F7EB, }, + [0x1F7F0]={ + category="so", + cjkwd="w", + description="HEAVY EQUALS SIGN", + direction="on", + linebreak="id", + unicodeslot=0x1F7F0, + }, [0x1F800]={ category="so", description="LEFTWARDS ARROW WITH SMALL TRIANGLE ARROWHEAD", @@ -255696,6 +264207,14 @@ characters.data={ synonyms={ "face with groucho glasses" }, unicodeslot=0x1F978, }, + [0x1F979]={ + category="so", + cjkwd="w", + description="FACE HOLDING BACK TEARS", + direction="on", + linebreak="id", + unicodeslot=0x1F979, + }, [0x1F97A]={ category="so", cjkwd="w", @@ -256353,6 +264872,14 @@ characters.data={ linebreak="id", unicodeslot=0x1F9CB, }, + [0x1F9CC]={ + category="so", + cjkwd="w", + description="TROLL", + direction="on", + linebreak="id", + unicodeslot=0x1F9CC, + }, [0x1F9CD]={ category="so", cjkwd="w", @@ -257487,6 +266014,30 @@ characters.data={ linebreak="id", unicodeslot=0x1FA74, }, + [0x1FA75]={ + category="so", + cjkwd="w", + description="LIGHT BLUE HEART", + direction="on", + linebreak="id", + unicodeslot=0x1FA75, + }, + [0x1FA76]={ + category="so", + cjkwd="w", + description="GREY HEART", + direction="on", + linebreak="id", + unicodeslot=0x1FA76, + }, + [0x1FA77]={ + category="so", + cjkwd="w", + description="PINK HEART", + direction="on", + linebreak="id", + unicodeslot=0x1FA77, + }, [0x1FA78]={ category="so", cjkwd="w", @@ -257511,6 +266062,22 @@ characters.data={ linebreak="id", unicodeslot=0x1FA7A, }, + [0x1FA7B]={ + category="so", + cjkwd="w", + description="X-RAY", + direction="on", + linebreak="id", + unicodeslot=0x1FA7B, + }, + [0x1FA7C]={ + category="so", + cjkwd="w", + description="CRUTCH", + direction="on", + linebreak="id", + unicodeslot=0x1FA7C, + }, [0x1FA80]={ category="so", cjkwd="w", @@ -257567,6 +266134,22 @@ characters.data={ linebreak="id", unicodeslot=0x1FA86, }, + [0x1FA87]={ + category="so", + cjkwd="w", + description="MARACAS", + direction="on", + linebreak="id", + unicodeslot=0x1FA87, + }, + [0x1FA88]={ + category="so", + cjkwd="w", + description="FLUTE", + direction="on", + linebreak="id", + unicodeslot=0x1FA88, + }, [0x1FA90]={ category="so", cjkwd="w", @@ -257767,6 +266350,62 @@ characters.data={ linebreak="id", unicodeslot=0x1FAA8, }, + [0x1FAA9]={ + category="so", + cjkwd="w", + description="MIRROR BALL", + direction="on", + linebreak="id", + unicodeslot=0x1FAA9, + }, + [0x1FAAA]={ + category="so", + cjkwd="w", + description="IDENTIFICATION CARD", + direction="on", + linebreak="id", + unicodeslot=0x1FAAA, + }, + [0x1FAAB]={ + category="so", + cjkwd="w", + description="LOW BATTERY", + direction="on", + linebreak="id", + unicodeslot=0x1FAAB, + }, + [0x1FAAC]={ + category="so", + cjkwd="w", + description="HAMSA", + direction="on", + linebreak="id", + unicodeslot=0x1FAAC, + }, + [0x1FAAD]={ + category="so", + cjkwd="w", + description="FOLDING HAND FAN", + direction="on", + linebreak="id", + unicodeslot=0x1FAAD, + }, + [0x1FAAE]={ + category="so", + cjkwd="w", + description="HAIR PICK", + direction="on", + linebreak="id", + unicodeslot=0x1FAAE, + }, + [0x1FAAF]={ + category="so", + cjkwd="w", + description="KHANDA", + direction="on", + linebreak="id", + unicodeslot=0x1FAAF, + }, [0x1FAB0]={ category="so", cjkwd="w", @@ -257823,6 +266462,70 @@ characters.data={ linebreak="id", unicodeslot=0x1FAB6, }, + [0x1FAB7]={ + category="so", + cjkwd="w", + description="LOTUS", + direction="on", + linebreak="id", + unicodeslot=0x1FAB7, + }, + [0x1FAB8]={ + category="so", + cjkwd="w", + description="CORAL", + direction="on", + linebreak="id", + unicodeslot=0x1FAB8, + }, + [0x1FAB9]={ + category="so", + cjkwd="w", + description="EMPTY NEST", + direction="on", + linebreak="id", + unicodeslot=0x1FAB9, + }, + [0x1FABA]={ + category="so", + cjkwd="w", + description="NEST WITH EGGS", + direction="on", + linebreak="id", + unicodeslot=0x1FABA, + }, + [0x1FABB]={ + category="so", + cjkwd="w", + description="HYACINTH", + direction="on", + linebreak="id", + unicodeslot=0x1FABB, + }, + [0x1FABC]={ + category="so", + cjkwd="w", + description="JELLYFISH", + direction="on", + linebreak="id", + unicodeslot=0x1FABC, + }, + [0x1FABD]={ + category="so", + cjkwd="w", + description="WING", + direction="on", + linebreak="id", + unicodeslot=0x1FABD, + }, + [0x1FABF]={ + category="so", + cjkwd="w", + description="GOOSE", + direction="on", + linebreak="id", + unicodeslot=0x1FABF, + }, [0x1FAC0]={ category="so", cjkwd="w", @@ -257847,6 +266550,46 @@ characters.data={ linebreak="id", unicodeslot=0x1FAC2, }, + [0x1FAC3]={ + category="so", + cjkwd="w", + description="PREGNANT MAN", + direction="on", + linebreak="eb", + unicodeslot=0x1FAC3, + }, + [0x1FAC4]={ + category="so", + cjkwd="w", + description="PREGNANT PERSON", + direction="on", + linebreak="eb", + unicodeslot=0x1FAC4, + }, + [0x1FAC5]={ + category="so", + cjkwd="w", + description="PERSON WITH CROWN", + direction="on", + linebreak="eb", + unicodeslot=0x1FAC5, + }, + [0x1FACE]={ + category="so", + cjkwd="w", + description="MOOSE", + direction="on", + linebreak="id", + unicodeslot=0x1FACE, + }, + [0x1FACF]={ + category="so", + cjkwd="w", + description="DONKEY", + direction="on", + linebreak="id", + unicodeslot=0x1FACF, + }, [0x1FAD0]={ category="so", cjkwd="w", @@ -257903,6 +266646,190 @@ characters.data={ linebreak="id", unicodeslot=0x1FAD6, }, + [0x1FAD7]={ + category="so", + cjkwd="w", + description="POURING LIQUID", + direction="on", + linebreak="id", + unicodeslot=0x1FAD7, + }, + [0x1FAD8]={ + category="so", + cjkwd="w", + description="BEANS", + direction="on", + linebreak="id", + unicodeslot=0x1FAD8, + }, + [0x1FAD9]={ + category="so", + cjkwd="w", + description="JAR", + direction="on", + linebreak="id", + unicodeslot=0x1FAD9, + }, + [0x1FADA]={ + category="so", + cjkwd="w", + description="GINGER ROOT", + direction="on", + linebreak="id", + unicodeslot=0x1FADA, + }, + [0x1FADB]={ + category="so", + cjkwd="w", + description="PEA POD", + direction="on", + linebreak="id", + unicodeslot=0x1FADB, + }, + [0x1FAE0]={ + category="so", + cjkwd="w", + description="MELTING FACE", + direction="on", + linebreak="id", + unicodeslot=0x1FAE0, + }, + [0x1FAE1]={ + category="so", + cjkwd="w", + description="SALUTING FACE", + direction="on", + linebreak="id", + unicodeslot=0x1FAE1, + }, + [0x1FAE2]={ + category="so", + cjkwd="w", + description="FACE WITH OPEN EYES AND HAND OVER MOUTH", + direction="on", + linebreak="id", + unicodeslot=0x1FAE2, + }, + [0x1FAE3]={ + category="so", + cjkwd="w", + description="FACE WITH PEEKING EYE", + direction="on", + linebreak="id", + unicodeslot=0x1FAE3, + }, + [0x1FAE4]={ + category="so", + cjkwd="w", + description="FACE WITH DIAGONAL MOUTH", + direction="on", + linebreak="id", + unicodeslot=0x1FAE4, + }, + [0x1FAE5]={ + category="so", + cjkwd="w", + description="DOTTED LINE FACE", + direction="on", + linebreak="id", + unicodeslot=0x1FAE5, + }, + [0x1FAE6]={ + category="so", + cjkwd="w", + description="BITING LIP", + direction="on", + linebreak="id", + unicodeslot=0x1FAE6, + }, + [0x1FAE7]={ + category="so", + cjkwd="w", + description="BUBBLES", + direction="on", + linebreak="id", + unicodeslot=0x1FAE7, + }, + [0x1FAE8]={ + category="so", + cjkwd="w", + description="SHAKING FACE", + direction="on", + linebreak="id", + unicodeslot=0x1FAE8, + }, + [0x1FAF0]={ + category="so", + cjkwd="w", + description="HAND WITH INDEX FINGER AND THUMB CROSSED", + direction="on", + linebreak="eb", + unicodeslot=0x1FAF0, + }, + [0x1FAF1]={ + category="so", + cjkwd="w", + description="RIGHTWARDS HAND", + direction="on", + linebreak="eb", + unicodeslot=0x1FAF1, + }, + [0x1FAF2]={ + category="so", + cjkwd="w", + description="LEFTWARDS HAND", + direction="on", + linebreak="eb", + unicodeslot=0x1FAF2, + }, + [0x1FAF3]={ + category="so", + cjkwd="w", + description="PALM DOWN HAND", + direction="on", + linebreak="eb", + unicodeslot=0x1FAF3, + }, + [0x1FAF4]={ + category="so", + cjkwd="w", + description="PALM UP HAND", + direction="on", + linebreak="eb", + unicodeslot=0x1FAF4, + }, + [0x1FAF5]={ + category="so", + cjkwd="w", + description="INDEX POINTING AT THE VIEWER", + direction="on", + linebreak="eb", + unicodeslot=0x1FAF5, + }, + [0x1FAF6]={ + category="so", + cjkwd="w", + description="HEART HANDS", + direction="on", + linebreak="eb", + unicodeslot=0x1FAF6, + }, + [0x1FAF7]={ + category="so", + cjkwd="w", + description="LEFTWARDS PUSHING HAND", + direction="on", + linebreak="eb", + unicodeslot=0x1FAF7, + }, + [0x1FAF8]={ + category="so", + cjkwd="w", + description="RIGHTWARDS PUSHING HAND", + direction="on", + linebreak="eb", + unicodeslot=0x1FAF8, + }, [0x1FB00]={ category="so", description="BLOCK SEXTANT-1", diff --git a/Master/texmf-dist/tex/context/base/mkiv/char-fio.lua b/Master/texmf-dist/tex/context/base/mkiv/char-fio.lua index b1f652eedb0..2b0fe42cee3 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/char-fio.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/char-fio.lua @@ -38,8 +38,8 @@ disableaction(textfileactions, "characters.filters.utf.decompose") local report = logs.reporter("unicode filter") local reporting = "no" --- this is messy as for performance reasons i don't want this to happen --- per line by default +-- This is messy as for performance reasons i don't want this to happen per line by +-- default. local enforced = { ["characters.filters.utf.collapse"] = true, diff --git a/Master/texmf-dist/tex/context/base/mkiv/char-ini.lua b/Master/texmf-dist/tex/context/base/mkiv/char-ini.lua index ac31dbfc60c..db1b85cc5d1 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/char-ini.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/char-ini.lua @@ -47,9 +47,9 @@ loaded!</p> -- todo: in 'char-def.lua' assume defaults: -- --- directtions = l --- cjkwd = a --- linebreak = al +-- directions = l +-- cjkwd = a +-- linebreak = al characters = characters or { } local characters = characters @@ -66,9 +66,17 @@ end Extending the table. --ldx]]-- -if context and not characters.private then +if context and CONTEXTLMTXMODE == 0 then - require("char-prv") + if not characters.private then + + require("char-prv") + + if storage then + storage.register("characters/private", characters.private, "characters.private") + end + + end for unicode, d in next, characters.private do data[unicode] = d @@ -193,379 +201,411 @@ insert(characters.ranges,{ }) local blocks = allocate { - ["adlam"] = { first = 0x1E900, last = 0x1E95F, description = "Adlam" }, - ["aegeannumbers"] = { first = 0x10100, last = 0x1013F, description = "Aegean Numbers" }, - ["ahom"] = { first = 0x11700, last = 0x1173F, description = "Ahom" }, - ["alchemicalsymbols"] = { first = 0x1F700, last = 0x1F77F, description = "Alchemical Symbols" }, - ["alphabeticpresentationforms"] = { first = 0x0FB00, last = 0x0FB4F, otf="latn", description = "Alphabetic Presentation Forms" }, - ["anatolianhieroglyphs"] = { first = 0x14400, last = 0x1467F, description = "Anatolian Hieroglyphs" }, - ["ancientgreekmusicalnotation"] = { first = 0x1D200, last = 0x1D24F, otf="grek", description = "Ancient Greek Musical Notation" }, - ["ancientgreeknumbers"] = { first = 0x10140, last = 0x1018F, otf="grek", description = "Ancient Greek Numbers" }, - ["ancientsymbols"] = { first = 0x10190, last = 0x101CF, otf="grek", description = "Ancient Symbols" }, - ["arabic"] = { first = 0x00600, last = 0x006FF, otf="arab", description = "Arabic" }, - ["arabicextendeda"] = { first = 0x008A0, last = 0x008FF, description = "Arabic Extended-A" }, - ["arabicmathematicalalphabeticsymbols"] = { first = 0x1EE00, last = 0x1EEFF, description = "Arabic Mathematical Alphabetic Symbols" }, - ["arabicpresentationformsa"] = { first = 0x0FB50, last = 0x0FDFF, otf="arab", description = "Arabic Presentation Forms-A" }, - ["arabicpresentationformsb"] = { first = 0x0FE70, last = 0x0FEFF, otf="arab", description = "Arabic Presentation Forms-B" }, - ["arabicsupplement"] = { first = 0x00750, last = 0x0077F, otf="arab", description = "Arabic Supplement" }, - ["armenian"] = { first = 0x00530, last = 0x0058F, otf="armn", description = "Armenian" }, - ["arrows"] = { first = 0x02190, last = 0x021FF, description = "Arrows" }, - ["avestan"] = { first = 0x10B00, last = 0x10B3F, description = "Avestan" }, - ["balinese"] = { first = 0x01B00, last = 0x01B7F, otf="bali", description = "Balinese" }, - ["bamum"] = { first = 0x0A6A0, last = 0x0A6FF, description = "Bamum" }, - ["bamumsupplement"] = { first = 0x16800, last = 0x16A3F, description = "Bamum Supplement" }, - ["basiclatin"] = { first = 0x00000, last = 0x0007F, otf="latn", description = "Basic Latin" }, - ["bassavah"] = { first = 0x16AD0, last = 0x16AFF, description = "Bassa Vah" }, - ["batak"] = { first = 0x01BC0, last = 0x01BFF, description = "Batak" }, - ["bengali"] = { first = 0x00980, last = 0x009FF, otf="beng", description = "Bengali" }, - ["bhaiksuki"] = { first = 0x11C00, last = 0x11C6F, description = "Bhaiksuki" }, - ["blockelements"] = { first = 0x02580, last = 0x0259F, otf="bopo", description = "Block Elements" }, - ["bopomofo"] = { first = 0x03100, last = 0x0312F, otf="bopo", description = "Bopomofo" }, - ["bopomofoextended"] = { first = 0x031A0, last = 0x031BF, otf="bopo", description = "Bopomofo Extended" }, - ["boxdrawing"] = { first = 0x02500, last = 0x0257F, description = "Box Drawing" }, - ["brahmi"] = { first = 0x11000, last = 0x1107F, description = "Brahmi" }, - ["braillepatterns"] = { first = 0x02800, last = 0x028FF, otf="brai", description = "Braille Patterns" }, - ["buginese"] = { first = 0x01A00, last = 0x01A1F, otf="bugi", description = "Buginese" }, - ["buhid"] = { first = 0x01740, last = 0x0175F, otf="buhd", description = "Buhid" }, - ["byzantinemusicalsymbols"] = { first = 0x1D000, last = 0x1D0FF, otf="byzm", description = "Byzantine Musical Symbols" }, - ["carian"] = { first = 0x102A0, last = 0x102DF, description = "Carian" }, - ["caucasianalbanian"] = { first = 0x10530, last = 0x1056F, description = "Caucasian Albanian" }, - ["chakma"] = { first = 0x11100, last = 0x1114F, description = "Chakma" }, - ["cham"] = { first = 0x0AA00, last = 0x0AA5F, description = "Cham" }, - ["cherokee"] = { first = 0x013A0, last = 0x013FF, otf="cher", description = "Cherokee" }, - ["cherokeesupplement"] = { first = 0x0AB70, last = 0x0ABBF, description = "Cherokee Supplement" }, - ["chesssymbols"] = { first = 0x1FA00, last = 0x1FA6F, description = "Chess Symbols" }, - ["chorasmian"] = { first = 0x10FB0, last = 0x10FDF, description = "Chorasmian" }, - ["cjkcompatibility"] = { first = 0x03300, last = 0x033FF, otf="hang", description = "CJK Compatibility" }, - ["cjkcompatibilityforms"] = { first = 0x0FE30, last = 0x0FE4F, otf="hang", description = "CJK Compatibility Forms" }, - ["cjkcompatibilityideographs"] = { first = 0x0F900, last = 0x0FAFF, otf="hang", description = "CJK Compatibility Ideographs" }, - ["cjkcompatibilityideographssupplement"] = { first = 0x2F800, last = 0x2FA1F, otf="hang", description = "CJK Compatibility Ideographs Supplement" }, - ["cjkradicalssupplement"] = { first = 0x02E80, last = 0x02EFF, otf="hang", description = "CJK Radicals Supplement" }, - ["cjkstrokes"] = { first = 0x031C0, last = 0x031EF, otf="hang", description = "CJK Strokes" }, - ["cjksymbolsandpunctuation"] = { first = 0x03000, last = 0x0303F, otf="hang", description = "CJK Symbols and Punctuation" }, - ["cjkunifiedideographs"] = { first = 0x04E00, last = 0x09FFF, otf="hang", description = "CJK Unified Ideographs", catcode = "letter" }, - ["cjkunifiedideographsextensiona"] = { first = 0x03400, last = 0x04DBF, otf="hang", description = "CJK Unified Ideographs Extension A" }, - ["cjkunifiedideographsextensionb"] = { first = 0x20000, last = 0x2A6DF, otf="hang", description = "CJK Unified Ideographs Extension B" }, - ["cjkunifiedideographsextensionc"] = { first = 0x2A700, last = 0x2B73F, description = "CJK Unified Ideographs Extension C" }, - ["cjkunifiedideographsextensiond"] = { first = 0x2B740, last = 0x2B81F, description = "CJK Unified Ideographs Extension D" }, - ["cjkunifiedideographsextensione"] = { first = 0x2B820, last = 0x2CEAF, description = "CJK Unified Ideographs Extension E" }, - ["cjkunifiedideographsextensionf"] = { first = 0x2CEB0, last = 0x2EBEF, description = "CJK Unified Ideographs Extension F" }, - ["cjkunifiedideographsextensiong"] = { first = 0x30000, last = 0x3134F, description = "CJK Unified Ideographs Extension G" }, - ["combiningdiacriticalmarks"] = { first = 0x00300, last = 0x0036F, description = "Combining Diacritical Marks" }, - ["combiningdiacriticalmarksextended"] = { first = 0x01AB0, last = 0x01AFF, description = "Combining Diacritical Marks Extended" }, - ["combiningdiacriticalmarksforsymbols"] = { first = 0x020D0, last = 0x020FF, description = "Combining Diacritical Marks for Symbols" }, - ["combiningdiacriticalmarkssupplement"] = { first = 0x01DC0, last = 0x01DFF, description = "Combining Diacritical Marks Supplement" }, - ["combininghalfmarks"] = { first = 0x0FE20, last = 0x0FE2F, description = "Combining Half Marks" }, - ["commonindicnumberforms"] = { first = 0x0A830, last = 0x0A83F, description = "Common Indic Number Forms" }, - ["controlpictures"] = { first = 0x02400, last = 0x0243F, description = "Control Pictures" }, - ["coptic"] = { first = 0x02C80, last = 0x02CFF, otf="copt", description = "Coptic" }, - ["copticepactnumbers"] = { first = 0x102E0, last = 0x102FF, description = "Coptic Epact Numbers" }, - ["countingrodnumerals"] = { first = 0x1D360, last = 0x1D37F, description = "Counting Rod Numerals" }, - ["cuneiform"] = { first = 0x12000, last = 0x123FF, otf="xsux", description = "Cuneiform" }, - ["cuneiformnumbersandpunctuation"] = { first = 0x12400, last = 0x1247F, otf="xsux", description = "Cuneiform Numbers and Punctuation" }, - ["currencysymbols"] = { first = 0x020A0, last = 0x020CF, description = "Currency Symbols" }, - ["cypriotsyllabary"] = { first = 0x10800, last = 0x1083F, otf="cprt", description = "Cypriot Syllabary" }, - ["cyrillic"] = { first = 0x00400, last = 0x004FF, otf="cyrl", description = "Cyrillic" }, - ["cyrillicextendeda"] = { first = 0x02DE0, last = 0x02DFF, otf="cyrl", description = "Cyrillic Extended-A" }, - ["cyrillicextendedb"] = { first = 0x0A640, last = 0x0A69F, otf="cyrl", description = "Cyrillic Extended-B" }, - ["cyrillicextendedc"] = { first = 0x01C80, last = 0x01C8F, description = "Cyrillic Extended-C" }, - ["cyrillicsupplement"] = { first = 0x00500, last = 0x0052F, otf="cyrl", description = "Cyrillic Supplement" }, - ["deseret"] = { first = 0x10400, last = 0x1044F, otf="dsrt", description = "Deseret" }, - ["devanagari"] = { first = 0x00900, last = 0x0097F, otf="deva", description = "Devanagari" }, - ["devanagariextended"] = { first = 0x0A8E0, last = 0x0A8FF, description = "Devanagari Extended" }, - ["digitsarabicindic"] = { first = 0x00660, last = 0x00669, math = true }, - -- ["digitsbengali"] = { first = 0x009E6, last = 0x009EF, math = true }, - ["digitsbold"] = { first = 0x1D7CE, last = 0x1D7D8, math = true }, - -- ["digitsdevanagari"] = { first = 0x00966, last = 0x0096F, math = true }, - ["digitsdoublestruck"] = { first = 0x1D7D8, last = 0x1D7E2, math = true }, - -- ["digitsethiopic"] = { first = 0x01369, last = 0x01371, math = true }, - ["digitsextendedarabicindic"] = { first = 0x006F0, last = 0x006F9, math = true }, - -- ["digitsgujarati"] = { first = 0x00AE6, last = 0x00AEF, math = true }, - -- ["digitsgurmukhi"] = { first = 0x00A66, last = 0x00A6F, math = true }, - -- ["digitskannada"] = { first = 0x00CE6, last = 0x00CEF, math = true }, - -- ["digitskhmer"] = { first = 0x017E0, last = 0x017E9, math = true }, - -- ["digitslao"] = { first = 0x00ED0, last = 0x00ED9, math = true }, - ["digitslatin"] = { first = 0x00030, last = 0x00039, math = true }, - -- ["digitsmalayalam"] = { first = 0x00D66, last = 0x00D6F, math = true }, - -- ["digitsmongolian"] = { first = 0x01810, last = 0x01809, math = true }, - ["digitsmonospace"] = { first = 0x1D7F6, last = 0x1D80F, math = true }, - -- ["digitsmyanmar"] = { first = 0x01040, last = 0x01049, math = true }, - ["digitsnormal"] = { first = 0x00030, last = 0x00039, math = true }, - -- ["digitsoriya"] = { first = 0x00B66, last = 0x00B6F, math = true }, - ["digitssansserifbold"] = { first = 0x1D7EC, last = 0x1D805, math = true }, - ["digitssansserifnormal"] = { first = 0x1D7E2, last = 0x1D7EC, math = true }, - -- ["digitstamil"] = { first = 0x00030, last = 0x00039, math = true }, -- no zero - -- ["digitstelugu"] = { first = 0x00C66, last = 0x00C6F, math = true }, - -- ["digitsthai"] = { first = 0x00E50, last = 0x00E59, math = true }, - -- ["digitstibetan"] = { first = 0x00F20, last = 0x00F29, math = true }, - ["dingbats"] = { first = 0x02700, last = 0x027BF, description = "Dingbats" }, - ["divesakuru"] = { first = 0x11900, last = 0x1195F, description = "Dives Akuru" }, - ["dogra"] = { first = 0x11800, last = 0x1184F, description = "Dogra" }, - ["dominotiles"] = { first = 0x1F030, last = 0x1F09F, description = "Domino Tiles" }, - ["duployan"] = { first = 0x1BC00, last = 0x1BC9F, description = "Duployan" }, - ["earlydynasticcuneiform"] = { first = 0x12480, last = 0x1254F, description = "Early Dynastic Cuneiform" }, - ["egyptianhieroglyphformatcontrols"] = { first = 0x13430, last = 0x1343F, description = "Egyptian Hieroglyph Format Controls" }, - ["egyptianhieroglyphs"] = { first = 0x13000, last = 0x1342F, description = "Egyptian Hieroglyphs" }, - ["elbasan"] = { first = 0x10500, last = 0x1052F, description = "Elbasan" }, - ["elymaic"] = { first = 0x10FE0, last = 0x10FFF, description = "Elymaic" }, - ["emoticons"] = { first = 0x1F600, last = 0x1F64F, description = "Emoticons" }, - ["enclosedalphanumerics"] = { first = 0x02460, last = 0x024FF, description = "Enclosed Alphanumerics" }, - ["enclosedalphanumericsupplement"] = { first = 0x1F100, last = 0x1F1FF, description = "Enclosed Alphanumeric Supplement" }, - ["enclosedcjklettersandmonths"] = { first = 0x03200, last = 0x032FF, description = "Enclosed CJK Letters and Months" }, - ["enclosedideographicsupplement"] = { first = 0x1F200, last = 0x1F2FF, description = "Enclosed Ideographic Supplement" }, - ["ethiopic"] = { first = 0x01200, last = 0x0137F, otf="ethi", description = "Ethiopic" }, - ["ethiopicextended"] = { first = 0x02D80, last = 0x02DDF, otf="ethi", description = "Ethiopic Extended" }, - ["ethiopicextendeda"] = { first = 0x0AB00, last = 0x0AB2F, description = "Ethiopic Extended-A" }, - ["ethiopicsupplement"] = { first = 0x01380, last = 0x0139F, otf="ethi", description = "Ethiopic Supplement" }, - ["generalpunctuation"] = { first = 0x02000, last = 0x0206F, description = "General Punctuation" }, - ["geometricshapes"] = { first = 0x025A0, last = 0x025FF, math = true, description = "Geometric Shapes" }, - ["geometricshapesextended"] = { first = 0x1F780, last = 0x1F7FF, description = "Geometric Shapes Extended" }, - ["georgian"] = { first = 0x010A0, last = 0x010FF, otf="geor", description = "Georgian" }, - ["georgianextended"] = { first = 0x01C90, last = 0x01CBF, description = "Georgian Extended" }, - ["georgiansupplement"] = { first = 0x02D00, last = 0x02D2F, otf="geor", description = "Georgian Supplement" }, - ["glagolitic"] = { first = 0x02C00, last = 0x02C5F, otf="glag", description = "Glagolitic" }, - ["glagoliticsupplement"] = { first = 0x1E000, last = 0x1E02F, description = "Glagolitic Supplement" }, - ["gothic"] = { first = 0x10330, last = 0x1034F, otf="goth", description = "Gothic" }, - ["grantha"] = { first = 0x11300, last = 0x1137F, description = "Grantha" }, - ["greekandcoptic"] = { first = 0x00370, last = 0x003FF, otf="grek", description = "Greek and Coptic" }, - ["greekextended"] = { first = 0x01F00, last = 0x01FFF, otf="grek", description = "Greek Extended" }, - ["gujarati"] = { first = 0x00A80, last = 0x00AFF, otf="gujr", description = "Gujarati" }, - ["gunjalagondi"] = { first = 0x11D60, last = 0x11DAF, description = "Gunjala Gondi" }, - ["gurmukhi"] = { first = 0x00A00, last = 0x00A7F, otf="guru", description = "Gurmukhi" }, - ["halfwidthandfullwidthforms"] = { first = 0x0FF00, last = 0x0FFEF, description = "Halfwidth and Fullwidth Forms" }, - ["hangulcompatibilityjamo"] = { first = 0x03130, last = 0x0318F, otf="jamo", description = "Hangul Compatibility Jamo" }, - ["hanguljamo"] = { first = 0x01100, last = 0x011FF, otf="jamo", description = "Hangul Jamo" }, - ["hanguljamoextendeda"] = { first = 0x0A960, last = 0x0A97F, description = "Hangul Jamo Extended-A" }, - ["hanguljamoextendedb"] = { first = 0x0D7B0, last = 0x0D7FF, description = "Hangul Jamo Extended-B" }, - ["hangulsyllables"] = { first = 0x0AC00, last = 0x0D7AF, otf="hang", description = "Hangul Syllables" }, - ["hanifirohingya"] = { first = 0x10D00, last = 0x10D3F, description = "Hanifi Rohingya" }, - ["hanunoo"] = { first = 0x01720, last = 0x0173F, otf="hano", description = "Hanunoo" }, - ["hatran"] = { first = 0x108E0, last = 0x108FF, description = "Hatran" }, - ["hebrew"] = { first = 0x00590, last = 0x005FF, otf="hebr", description = "Hebrew" }, - ["highprivateusesurrogates"] = { first = 0x0DB80, last = 0x0DBFF, description = "High Private Use Surrogates" }, - ["highsurrogates"] = { first = 0x0D800, last = 0x0DB7F, description = "High Surrogates" }, - ["hiragana"] = { first = 0x03040, last = 0x0309F, otf="kana", description = "Hiragana" }, - ["ideographicdescriptioncharacters"] = { first = 0x02FF0, last = 0x02FFF, description = "Ideographic Description Characters" }, - ["ideographicsymbolsandpunctuation"] = { first = 0x16FE0, last = 0x16FFF, description = "Ideographic Symbols and Punctuation" }, - ["imperialaramaic"] = { first = 0x10840, last = 0x1085F, description = "Imperial Aramaic" }, - ["indicsiyaqnumbers"] = { first = 0x1EC70, last = 0x1ECBF, description = "Indic Siyaq Numbers" }, - ["inscriptionalpahlavi"] = { first = 0x10B60, last = 0x10B7F, description = "Inscriptional Pahlavi" }, - ["inscriptionalparthian"] = { first = 0x10B40, last = 0x10B5F, description = "Inscriptional Parthian" }, - ["ipaextensions"] = { first = 0x00250, last = 0x002AF, description = "IPA Extensions" }, - ["javanese"] = { first = 0x0A980, last = 0x0A9DF, description = "Javanese" }, - ["kaithi"] = { first = 0x11080, last = 0x110CF, description = "Kaithi" }, - ["kanaextendeda"] = { first = 0x1B100, last = 0x1B12F, description = "Kana Extended-A" }, - ["kanasupplement"] = { first = 0x1B000, last = 0x1B0FF, description = "Kana Supplement" }, - ["kanbun"] = { first = 0x03190, last = 0x0319F, description = "Kanbun" }, - ["kangxiradicals"] = { first = 0x02F00, last = 0x02FDF, description = "Kangxi Radicals" }, - ["kannada"] = { first = 0x00C80, last = 0x00CFF, otf="knda", description = "Kannada" }, - ["katakana"] = { first = 0x030A0, last = 0x030FF, otf="kana", description = "Katakana" }, - ["katakanaphoneticextensions"] = { first = 0x031F0, last = 0x031FF, otf="kana", description = "Katakana Phonetic Extensions" }, - ["kayahli"] = { first = 0x0A900, last = 0x0A92F, description = "Kayah Li" }, - ["kharoshthi"] = { first = 0x10A00, last = 0x10A5F, otf="khar", description = "Kharoshthi" }, - ["khitansmallscript"] = { first = 0x18B00, last = 0x18CFF, description = "Khitan Small Script" }, - ["khmer"] = { first = 0x01780, last = 0x017FF, otf="khmr", description = "Khmer" }, - ["khmersymbols"] = { first = 0x019E0, last = 0x019FF, otf="khmr", description = "Khmer Symbols" }, - ["khojki"] = { first = 0x11200, last = 0x1124F, description = "Khojki" }, - ["khudawadi"] = { first = 0x112B0, last = 0x112FF, description = "Khudawadi" }, - ["lao"] = { first = 0x00E80, last = 0x00EFF, otf="lao", description = "Lao" }, - ["latinextendeda"] = { first = 0x00100, last = 0x0017F, otf="latn", description = "Latin Extended-A" }, - ["latinextendedadditional"] = { first = 0x01E00, last = 0x01EFF, otf="latn", description = "Latin Extended Additional" }, - ["latinextendedb"] = { first = 0x00180, last = 0x0024F, otf="latn", description = "Latin Extended-B" }, - ["latinextendedc"] = { first = 0x02C60, last = 0x02C7F, otf="latn", description = "Latin Extended-C" }, - ["latinextendedd"] = { first = 0x0A720, last = 0x0A7FF, otf="latn", description = "Latin Extended-D" }, - ["latinextendede"] = { first = 0x0AB30, last = 0x0AB6F, description = "Latin Extended-E" }, - ["latinsupplement"] = { first = 0x00080, last = 0x000FF, otf="latn", description = "Latin-1 Supplement" }, - ["lepcha"] = { first = 0x01C00, last = 0x01C4F, description = "Lepcha" }, - ["letterlikesymbols"] = { first = 0x02100, last = 0x0214F, math = true, description = "Letterlike Symbols" }, - ["limbu"] = { first = 0x01900, last = 0x0194F, otf="limb", description = "Limbu" }, - ["lineara"] = { first = 0x10600, last = 0x1077F, description = "Linear A" }, - ["linearbideograms"] = { first = 0x10080, last = 0x100FF, otf="linb", description = "Linear B Ideograms" }, - ["linearbsyllabary"] = { first = 0x10000, last = 0x1007F, otf="linb", description = "Linear B Syllabary" }, - ["lisu"] = { first = 0x0A4D0, last = 0x0A4FF, description = "Lisu" }, - ["lisusupplement"] = { first = 0x11FB0, last = 0x11FBF, description = "Lisu Supplement" }, - ["lowercasebold"] = { first = 0x1D41A, last = 0x1D433, math = true }, - ["lowercaseboldfraktur"] = { first = 0x1D586, last = 0x1D59F, math = true }, - ["lowercasebolditalic"] = { first = 0x1D482, last = 0x1D49B, math = true }, - ["lowercaseboldscript"] = { first = 0x1D4EA, last = 0x1D503, math = true }, - ["lowercasedoublestruck"] = { first = 0x1D552, last = 0x1D56B, math = true }, - ["lowercasefraktur"] = { first = 0x1D51E, last = 0x1D537, math = true }, - ["lowercasegreekbold"] = { first = 0x1D6C2, last = 0x1D6DB, math = true }, - ["lowercasegreekbolditalic"] = { first = 0x1D736, last = 0x1D74F, math = true }, - ["lowercasegreekitalic"] = { first = 0x1D6FC, last = 0x1D715, math = true }, - ["lowercasegreeknormal"] = { first = 0x003B1, last = 0x003CA, math = true }, - ["lowercasegreeksansserifbold"] = { first = 0x1D770, last = 0x1D789, math = true }, - ["lowercasegreeksansserifbolditalic"] = { first = 0x1D7AA, last = 0x1D7C3, math = true }, - ["lowercaseitalic"] = { first = 0x1D44E, last = 0x1D467, math = true }, - ["lowercasemonospace"] = { first = 0x1D68A, last = 0x1D6A3, math = true }, - ["lowercasenormal"] = { first = 0x00061, last = 0x0007A, math = true }, - ["lowercasesansserifbold"] = { first = 0x1D5EE, last = 0x1D607, math = true }, - ["lowercasesansserifbolditalic"] = { first = 0x1D656, last = 0x1D66F, math = true }, - ["lowercasesansserifitalic"] = { first = 0x1D622, last = 0x1D63B, math = true }, - ["lowercasesansserifnormal"] = { first = 0x1D5BA, last = 0x1D5D3, math = true }, - ["lowercasescript"] = { first = 0x1D4B6, last = 0x1D4CF, math = true }, - ["lowsurrogates"] = { first = 0x0DC00, last = 0x0DFFF, description = "Low Surrogates" }, - ["lycian"] = { first = 0x10280, last = 0x1029F, description = "Lycian" }, - ["lydian"] = { first = 0x10920, last = 0x1093F, description = "Lydian" }, - ["mahajani"] = { first = 0x11150, last = 0x1117F, description = "Mahajani" }, - ["mahjongtiles"] = { first = 0x1F000, last = 0x1F02F, description = "Mahjong Tiles" }, - ["makasar"] = { first = 0x11EE0, last = 0x11EFF, description = "Makasar" }, - ["malayalam"] = { first = 0x00D00, last = 0x00D7F, otf="mlym", description = "Malayalam" }, - ["mandaic"] = { first = 0x00840, last = 0x0085F, otf="mand", description = "Mandaic" }, - ["manichaean"] = { first = 0x10AC0, last = 0x10AFF, description = "Manichaean" }, - ["marchen"] = { first = 0x11C70, last = 0x11CBF, description = "Marchen" }, - ["masaramgondi"] = { first = 0x11D00, last = 0x11D5F, description = "Masaram Gondi" }, - ["mathematicalalphanumericsymbols"] = { first = 0x1D400, last = 0x1D7FF, math = true, description = "Mathematical Alphanumeric Symbols" }, - ["mathematicaloperators"] = { first = 0x02200, last = 0x022FF, math = true, description = "Mathematical Operators" }, - ["mayannumerals"] = { first = 0x1D2E0, last = 0x1D2FF, description = "Mayan Numerals" }, - ["medefaidrin"] = { first = 0x16E40, last = 0x16E9F, description = "Medefaidrin" }, - ["meeteimayek"] = { first = 0x0ABC0, last = 0x0ABFF, description = "Meetei Mayek" }, - ["meeteimayekextensions"] = { first = 0x0AAE0, last = 0x0AAFF, description = "Meetei Mayek Extensions" }, - ["mendekikakui"] = { first = 0x1E800, last = 0x1E8DF, description = "Mende Kikakui" }, - ["meroiticcursive"] = { first = 0x109A0, last = 0x109FF, description = "Meroitic Cursive" }, - ["meroitichieroglyphs"] = { first = 0x10980, last = 0x1099F, description = "Meroitic Hieroglyphs" }, - ["miao"] = { first = 0x16F00, last = 0x16F9F, description = "Miao" }, - ["miscellaneousmathematicalsymbolsa"] = { first = 0x027C0, last = 0x027EF, math = true, description = "Miscellaneous Mathematical Symbols-A" }, - ["miscellaneousmathematicalsymbolsb"] = { first = 0x02980, last = 0x029FF, math = true, description = "Miscellaneous Mathematical Symbols-B" }, - ["miscellaneoussymbols"] = { first = 0x02600, last = 0x026FF, math = true, description = "Miscellaneous Symbols" }, - ["miscellaneoussymbolsandarrows"] = { first = 0x02B00, last = 0x02BFF, math = true, description = "Miscellaneous Symbols and Arrows" }, - ["miscellaneoussymbolsandpictographs"] = { first = 0x1F300, last = 0x1F5FF, description = "Miscellaneous Symbols and Pictographs" }, - ["miscellaneoustechnical"] = { first = 0x02300, last = 0x023FF, math = true, description = "Miscellaneous Technical" }, - ["modi"] = { first = 0x11600, last = 0x1165F, description = "Modi" }, - ["modifiertoneletters"] = { first = 0x0A700, last = 0x0A71F, description = "Modifier Tone Letters" }, - ["mongolian"] = { first = 0x01800, last = 0x018AF, otf="mong", description = "Mongolian" }, - ["mongoliansupplement"] = { first = 0x11660, last = 0x1167F, description = "Mongolian Supplement" }, - ["mro"] = { first = 0x16A40, last = 0x16A6F, description = "Mro" }, - ["multani"] = { first = 0x11280, last = 0x112AF, description = "Multani" }, - ["musicalsymbols"] = { first = 0x1D100, last = 0x1D1FF, otf="musc", description = "Musical Symbols" }, - ["myanmar"] = { first = 0x01000, last = 0x0109F, otf="mymr", description = "Myanmar" }, - ["myanmarextendeda"] = { first = 0x0AA60, last = 0x0AA7F, description = "Myanmar Extended-A" }, - ["myanmarextendedb"] = { first = 0x0A9E0, last = 0x0A9FF, description = "Myanmar Extended-B" }, - ["nabataean"] = { first = 0x10880, last = 0x108AF, description = "Nabataean" }, - ["nandinagari"] = { first = 0x119A0, last = 0x119FF, description = "Nandinagari" }, - ["newa"] = { first = 0x11400, last = 0x1147F, description = "Newa" }, - ["newtailue"] = { first = 0x01980, last = 0x019DF, description = "New Tai Lue" }, - ["nko"] = { first = 0x007C0, last = 0x007FF, otf="nko", description = "NKo" }, - ["numberforms"] = { first = 0x02150, last = 0x0218F, description = "Number Forms" }, - ["nushu"] = { first = 0x1B170, last = 0x1B2FF, description = "Nushu" }, - ["nyiakengpuachuehmong"] = { first = 0x1E100, last = 0x1E14F, description = "Nyiakeng Puachue Hmong" }, - ["ogham"] = { first = 0x01680, last = 0x0169F, otf="ogam", description = "Ogham" }, - ["olchiki"] = { first = 0x01C50, last = 0x01C7F, description = "Ol Chiki" }, - ["oldhungarian"] = { first = 0x10C80, last = 0x10CFF, description = "Old Hungarian" }, - ["olditalic"] = { first = 0x10300, last = 0x1032F, otf="ital", description = "Old Italic" }, - ["oldnortharabian"] = { first = 0x10A80, last = 0x10A9F, description = "Old North Arabian" }, - ["oldpermic"] = { first = 0x10350, last = 0x1037F, description = "Old Permic" }, - ["oldpersian"] = { first = 0x103A0, last = 0x103DF, otf="xpeo", description = "Old Persian" }, - ["oldsogdian"] = { first = 0x10F00, last = 0x10F2F, description = "Old Sogdian" }, - ["oldsoutharabian"] = { first = 0x10A60, last = 0x10A7F, description = "Old South Arabian" }, - ["oldturkic"] = { first = 0x10C00, last = 0x10C4F, description = "Old Turkic" }, - ["opticalcharacterrecognition"] = { first = 0x02440, last = 0x0245F, description = "Optical Character Recognition" }, - ["oriya"] = { first = 0x00B00, last = 0x00B7F, otf="orya", description = "Oriya" }, - ["ornamentaldingbats"] = { first = 0x1F650, last = 0x1F67F, description = "Ornamental Dingbats" }, - ["osage"] = { first = 0x104B0, last = 0x104FF, description = "Osage" }, - ["osmanya"] = { first = 0x10480, last = 0x104AF, otf="osma", description = "Osmanya" }, - ["ottomansiyaqnumbers"] = { first = 0x1ED00, last = 0x1ED4F, description = "Ottoman Siyaq Numbers" }, - ["pahawhhmong"] = { first = 0x16B00, last = 0x16B8F, description = "Pahawh Hmong" }, - ["palmyrene"] = { first = 0x10860, last = 0x1087F, description = "Palmyrene" }, - ["paucinhau"] = { first = 0x11AC0, last = 0x11AFF, description = "Pau Cin Hau" }, - ["phagspa"] = { first = 0x0A840, last = 0x0A87F, otf="phag", description = "Phags-pa" }, - ["phaistosdisc"] = { first = 0x101D0, last = 0x101FF, description = "Phaistos Disc" }, - ["phoenician"] = { first = 0x10900, last = 0x1091F, otf="phnx", description = "Phoenician" }, - ["phoneticextensions"] = { first = 0x01D00, last = 0x01D7F, description = "Phonetic Extensions" }, - ["phoneticextensionssupplement"] = { first = 0x01D80, last = 0x01DBF, description = "Phonetic Extensions Supplement" }, - ["playingcards"] = { first = 0x1F0A0, last = 0x1F0FF, description = "Playing Cards" }, - ["privateusearea"] = { first = 0x0E000, last = 0x0F8FF, description = "Private Use Area" }, - ["psalterpahlavi"] = { first = 0x10B80, last = 0x10BAF, description = "Psalter Pahlavi" }, - ["rejang"] = { first = 0x0A930, last = 0x0A95F, description = "Rejang" }, - ["ruminumeralsymbols"] = { first = 0x10E60, last = 0x10E7F, description = "Rumi Numeral Symbols" }, - ["runic"] = { first = 0x016A0, last = 0x016FF, otf="runr", description = "Runic" }, - ["samaritan"] = { first = 0x00800, last = 0x0083F, description = "Samaritan" }, - ["saurashtra"] = { first = 0x0A880, last = 0x0A8DF, description = "Saurashtra" }, - ["sharada"] = { first = 0x11180, last = 0x111DF, description = "Sharada" }, - ["shavian"] = { first = 0x10450, last = 0x1047F, otf="shaw", description = "Shavian" }, - ["shorthandformatcontrols"] = { first = 0x1BCA0, last = 0x1BCAF, description = "Shorthand Format Controls" }, - ["siddham"] = { first = 0x11580, last = 0x115FF, description = "Siddham" }, - ["sinhala"] = { first = 0x00D80, last = 0x00DFF, otf="sinh", description = "Sinhala" }, - ["sinhalaarchaicnumbers"] = { first = 0x111E0, last = 0x111FF, description = "Sinhala Archaic Numbers" }, - ["smallformvariants"] = { first = 0x0FE50, last = 0x0FE6F, description = "Small Form Variants" }, - ["smallkanaextension"] = { first = 0x1B130, last = 0x1B16F, description = "Small Kana Extension" }, - ["sogdian"] = { first = 0x10F30, last = 0x10F6F, description = "Sogdian" }, - ["sorasompeng"] = { first = 0x110D0, last = 0x110FF, description = "Sora Sompeng" }, - ["soyombo"] = { first = 0x11A50, last = 0x11AAF, description = "Soyombo" }, - ["spacingmodifierletters"] = { first = 0x002B0, last = 0x002FF, description = "Spacing Modifier Letters" }, - ["specials"] = { first = 0x0FFF0, last = 0x0FFFF, description = "Specials" }, - ["sundanese"] = { first = 0x01B80, last = 0x01BBF, description = "Sundanese" }, - ["sundanesesupplement"] = { first = 0x01CC0, last = 0x01CCF, description = "Sundanese Supplement" }, - ["superscriptsandsubscripts"] = { first = 0x02070, last = 0x0209F, description = "Superscripts and Subscripts" }, - ["supplementalarrowsa"] = { first = 0x027F0, last = 0x027FF, math = true, description = "Supplemental Arrows-A" }, - ["supplementalarrowsb"] = { first = 0x02900, last = 0x0297F, math = true, description = "Supplemental Arrows-B" }, - ["supplementalarrowsc"] = { first = 0x1F800, last = 0x1F8FF, math = true, description = "Supplemental Arrows-C" }, - ["supplementalmathematicaloperators"] = { first = 0x02A00, last = 0x02AFF, math = true, description = "Supplemental Mathematical Operators" }, - ["supplementalpunctuation"] = { first = 0x02E00, last = 0x02E7F, description = "Supplemental Punctuation" }, - ["supplementalsymbolsandpictographs"] = { first = 0x1F900, last = 0x1F9FF, description = "Supplemental Symbols and Pictographs" }, - ["supplementaryprivateuseareaa"] = { first = 0xF0000, last = 0xFFFFF, description = "Supplementary Private Use Area-A" }, - ["supplementaryprivateuseareab"] = { first = 0x100000,last = 0x10FFFF, description = "Supplementary Private Use Area-B" }, - ["suttonsignwriting"] = { first = 0x1D800, last = 0x1DAAF, description = "Sutton SignWriting" }, - ["sylotinagri"] = { first = 0x0A800, last = 0x0A82F, otf="sylo", description = "Syloti Nagri" }, - ["symbolsandpictographsextendeda"] = { first = 0x1FA70, last = 0x1FAFF, description = "Symbols and Pictographs Extended-A" }, - ["symbolsforlegacycomputing"] = { first = 0x1FB00, last = 0x1FBFF, description = "Symbols for Legacy Computing" }, - ["syriac"] = { first = 0x00700, last = 0x0074F, otf="syrc", description = "Syriac" }, - ["syriacsupplement"] = { first = 0x00860, last = 0x0086F, description = "Syriac Supplement" }, - ["tagalog"] = { first = 0x01700, last = 0x0171F, otf="tglg", description = "Tagalog" }, - ["tagbanwa"] = { first = 0x01760, last = 0x0177F, otf="tagb", description = "Tagbanwa" }, - ["tags"] = { first = 0xE0000, last = 0xE007F, description = "Tags" }, - ["taile"] = { first = 0x01950, last = 0x0197F, otf="tale", description = "Tai Le" }, - ["taitham"] = { first = 0x01A20, last = 0x01AAF, description = "Tai Tham" }, - ["taiviet"] = { first = 0x0AA80, last = 0x0AADF, description = "Tai Viet" }, - ["taixuanjingsymbols"] = { first = 0x1D300, last = 0x1D35F, description = "Tai Xuan Jing Symbols" }, - ["takri"] = { first = 0x11680, last = 0x116CF, description = "Takri" }, - ["tamil"] = { first = 0x00B80, last = 0x00BFF, otf="taml", description = "Tamil" }, - ["tamilsupplement"] = { first = 0x11FC0, last = 0x11FFF, description = "Tamil Supplement" }, - ["tangut"] = { first = 0x17000, last = 0x187FF, description = "Tangut" }, - ["tangutsupplement"] = { first = 0x18D00, last = 0x18D8F, description = "Tangut Supplement" }, - ["tangutcomponents"] = { first = 0x18800, last = 0x18AFF, description = "Tangut Components" }, - ["telugu"] = { first = 0x00C00, last = 0x00C7F, otf="telu", description = "Telugu" }, - ["thaana"] = { first = 0x00780, last = 0x007BF, otf="thaa", description = "Thaana" }, - ["thai"] = { first = 0x00E00, last = 0x00E7F, otf="thai", description = "Thai" }, - ["tibetan"] = { first = 0x00F00, last = 0x00FFF, otf="tibt", description = "Tibetan" }, - ["tifinagh"] = { first = 0x02D30, last = 0x02D7F, otf="tfng", description = "Tifinagh" }, - ["tirhuta"] = { first = 0x11480, last = 0x114DF, description = "Tirhuta" }, - ["transportandmapsymbols"] = { first = 0x1F680, last = 0x1F6FF, description = "Transport and Map Symbols" }, - ["ugaritic"] = { first = 0x10380, last = 0x1039F, otf="ugar", description = "Ugaritic" }, - ["unifiedcanadianaboriginalsyllabics"] = { first = 0x01400, last = 0x0167F, otf="cans", description = "Unified Canadian Aboriginal Syllabics" }, - ["unifiedcanadianaboriginalsyllabicsextended"] = { first = 0x018B0, last = 0x018FF, description = "Unified Canadian Aboriginal Syllabics Extended" }, - ["uppercasebold"] = { first = 0x1D400, last = 0x1D419, math = true }, - ["uppercaseboldfraktur"] = { first = 0x1D56C, last = 0x1D585, math = true }, - ["uppercasebolditalic"] = { first = 0x1D468, last = 0x1D481, math = true }, - ["uppercaseboldscript"] = { first = 0x1D4D0, last = 0x1D4E9, math = true }, - ["uppercasedoublestruck"] = { first = 0x1D538, last = 0x1D551, math = true }, -- gaps are filled in elsewhere - ["uppercasefraktur"] = { first = 0x1D504, last = 0x1D51D, math = true }, - ["uppercasegreekbold"] = { first = 0x1D6A8, last = 0x1D6C1, math = true }, - ["uppercasegreekbolditalic"] = { first = 0x1D71C, last = 0x1D735, math = true }, - ["uppercasegreekitalic"] = { first = 0x1D6E2, last = 0x1D6FB, math = true }, - ["uppercasegreeknormal"] = { first = 0x00391, last = 0x003AA, math = true }, - ["uppercasegreeksansserifbold"] = { first = 0x1D756, last = 0x1D76F, math = true }, - ["uppercasegreeksansserifbolditalic"] = { first = 0x1D790, last = 0x1D7A9, math = true }, - ["uppercaseitalic"] = { first = 0x1D434, last = 0x1D44D, math = true }, - ["uppercasemonospace"] = { first = 0x1D670, last = 0x1D689, math = true }, - ["uppercasenormal"] = { first = 0x00041, last = 0x0005A, math = true }, - ["uppercasesansserifbold"] = { first = 0x1D5D4, last = 0x1D5ED, math = true }, - ["uppercasesansserifbolditalic"] = { first = 0x1D63C, last = 0x1D655, math = true }, - ["uppercasesansserifitalic"] = { first = 0x1D608, last = 0x1D621, math = true }, - ["uppercasesansserifnormal"] = { first = 0x1D5A0, last = 0x1D5B9, math = true }, - ["uppercasescript"] = { first = 0x1D49C, last = 0x1D4B5, math = true }, - ["vai"] = { first = 0x0A500, last = 0x0A63F, description = "Vai" }, - ["variationselectors"] = { first = 0x0FE00, last = 0x0FE0F, description = "Variation Selectors" }, - ["variationselectorssupplement"] = { first = 0xE0100, last = 0xE01EF, description = "Variation Selectors Supplement" }, - ["vedicextensions"] = { first = 0x01CD0, last = 0x01CFF, description = "Vedic Extensions" }, - ["verticalforms"] = { first = 0x0FE10, last = 0x0FE1F, description = "Vertical Forms" }, - ["wancho"] = { first = 0x1E2C0, last = 0x1E2FF, description = "Wancho" }, - ["warangciti"] = { first = 0x118A0, last = 0x118FF, description = "Warang Citi" }, - ["yezidi"] = { first = 0x10E80, last = 0x10EBF, description = "Yezidi" }, - ["yijinghexagramsymbols"] = { first = 0x04DC0, last = 0x04DFF, otf="yi", description = "Yijing Hexagram Symbols" }, - ["yiradicals"] = { first = 0x0A490, last = 0x0A4CF, otf="yi", description = "Yi Radicals" }, - ["yisyllables"] = { first = 0x0A000, last = 0x0A48F, otf="yi", description = "Yi Syllables" }, - ["zanabazarsquare"] = { first = 0x11A00, last = 0x11A4F, description = "Zanabazar Square" }, + ["adlam"] = { first = 0x1E900, last = 0x1E95F, description = "Adlam" }, + ["aegeannumbers"] = { first = 0x10100, last = 0x1013F, description = "Aegean Numbers" }, + ["ahom"] = { first = 0x11700, last = 0x1174F, description = "Ahom" }, + ["alchemicalsymbols"] = { first = 0x1F700, last = 0x1F77F, description = "Alchemical Symbols" }, + ["alphabeticpresentationforms"] = { first = 0x0FB00, last = 0x0FB4F, otf="latn", description = "Alphabetic Presentation Forms" }, + ["anatolianhieroglyphs"] = { first = 0x14400, last = 0x1467F, description = "Anatolian Hieroglyphs" }, + ["ancientgreekmusicalnotation"] = { first = 0x1D200, last = 0x1D24F, otf="grek", description = "Ancient Greek Musical Notation" }, + ["ancientgreeknumbers"] = { first = 0x10140, last = 0x1018F, otf="grek", description = "Ancient Greek Numbers" }, + ["ancientsymbols"] = { first = 0x10190, last = 0x101CF, otf="grek", description = "Ancient Symbols" }, + ["arabic"] = { first = 0x00600, last = 0x006FF, otf="arab", description = "Arabic" }, + ["arabicextendeda"] = { first = 0x008A0, last = 0x008FF, description = "Arabic Extended-A" }, + ["arabicextendedb"] = { first = 0x00870, last = 0x0089F, description = "Arabic Extended-B" }, + ["arabicextendedc"] = { first = 0x10EC0, last = 0x10EFF, description = "Arabic Extended-C" }, + ["arabicmathematicalalphabeticsymbols"] = { first = 0x1EE00, last = 0x1EEFF, description = "Arabic Mathematical Alphabetic Symbols" }, + ["arabicpresentationformsa"] = { first = 0x0FB50, last = 0x0FDFF, otf="arab", description = "Arabic Presentation Forms-A" }, + ["arabicpresentationformsb"] = { first = 0x0FE70, last = 0x0FEFF, otf="arab", description = "Arabic Presentation Forms-B" }, + ["arabicsupplement"] = { first = 0x00750, last = 0x0077F, otf="arab", description = "Arabic Supplement" }, + ["armenian"] = { first = 0x00530, last = 0x0058F, otf="armn", description = "Armenian" }, + ["arrows"] = { first = 0x02190, last = 0x021FF, description = "Arrows" }, + ["avestan"] = { first = 0x10B00, last = 0x10B3F, description = "Avestan" }, + ["balinese"] = { first = 0x01B00, last = 0x01B7F, otf="bali", description = "Balinese" }, + ["bamum"] = { first = 0x0A6A0, last = 0x0A6FF, description = "Bamum" }, + ["bamumsupplement"] = { first = 0x16800, last = 0x16A3F, description = "Bamum Supplement" }, + ["basiclatin"] = { first = 0x00000, last = 0x0007F, otf="latn", description = "Basic Latin" }, + ["bassavah"] = { first = 0x16AD0, last = 0x16AFF, description = "Bassa Vah" }, + ["batak"] = { first = 0x01BC0, last = 0x01BFF, description = "Batak" }, + ["bengali"] = { first = 0x00980, last = 0x009FF, otf="beng", description = "Bengali" }, + ["bhaiksuki"] = { first = 0x11C00, last = 0x11C6F, description = "Bhaiksuki" }, + ["blockelements"] = { first = 0x02580, last = 0x0259F, otf="bopo", description = "Block Elements" }, + ["bopomofo"] = { first = 0x03100, last = 0x0312F, otf="bopo", description = "Bopomofo" }, + ["bopomofoextended"] = { first = 0x031A0, last = 0x031BF, otf="bopo", description = "Bopomofo Extended" }, + ["boxdrawing"] = { first = 0x02500, last = 0x0257F, description = "Box Drawing" }, + ["brahmi"] = { first = 0x11000, last = 0x1107F, description = "Brahmi" }, + ["braillepatterns"] = { first = 0x02800, last = 0x028FF, otf="brai", description = "Braille Patterns" }, + ["buginese"] = { first = 0x01A00, last = 0x01A1F, otf="bugi", description = "Buginese" }, + ["buhid"] = { first = 0x01740, last = 0x0175F, otf="buhd", description = "Buhid" }, + ["byzantinemusicalsymbols"] = { first = 0x1D000, last = 0x1D0FF, otf="byzm", description = "Byzantine Musical Symbols" }, + ["carian"] = { first = 0x102A0, last = 0x102DF, description = "Carian" }, + ["caucasianalbanian"] = { first = 0x10530, last = 0x1056F, description = "Caucasian Albanian" }, + ["chakma"] = { first = 0x11100, last = 0x1114F, description = "Chakma" }, + ["cham"] = { first = 0x0AA00, last = 0x0AA5F, description = "Cham" }, + ["cherokee"] = { first = 0x013A0, last = 0x013FF, otf="cher", description = "Cherokee" }, + ["cherokeesupplement"] = { first = 0x0AB70, last = 0x0ABBF, description = "Cherokee Supplement" }, + ["chesssymbols"] = { first = 0x1FA00, last = 0x1FA6F, description = "Chess Symbols" }, + ["chorasmian"] = { first = 0x10FB0, last = 0x10FDF, description = "Chorasmian" }, + ["cjkcompatibility"] = { first = 0x03300, last = 0x033FF, otf="hang", description = "CJK Compatibility" }, + ["cjkcompatibilityforms"] = { first = 0x0FE30, last = 0x0FE4F, otf="hang", description = "CJK Compatibility Forms" }, + ["cjkcompatibilityideographs"] = { first = 0x0F900, last = 0x0FAFF, otf="hang", description = "CJK Compatibility Ideographs" }, + ["cjkcompatibilityideographssupplement"] = { first = 0x2F800, last = 0x2FA1F, otf="hang", description = "CJK Compatibility Ideographs Supplement" }, + ["cjkradicalssupplement"] = { first = 0x02E80, last = 0x02EFF, otf="hang", description = "CJK Radicals Supplement" }, + ["cjkstrokes"] = { first = 0x031C0, last = 0x031EF, otf="hang", description = "CJK Strokes" }, + ["cjksymbolsandpunctuation"] = { first = 0x03000, last = 0x0303F, otf="hang", description = "CJK Symbols and Punctuation" }, + ["cjkunifiedideographs"] = { first = 0x04E00, last = 0x09FFF, otf="hang", description = "CJK Unified Ideographs", catcode = "letter" }, + ["cjkunifiedideographsextensiona"] = { first = 0x03400, last = 0x04DBF, otf="hang", description = "CJK Unified Ideographs Extension A" }, + ["cjkunifiedideographsextensionb"] = { first = 0x20000, last = 0x2A6DF, otf="hang", description = "CJK Unified Ideographs Extension B" }, + ["cjkunifiedideographsextensionc"] = { first = 0x2A700, last = 0x2B73F, description = "CJK Unified Ideographs Extension C" }, + ["cjkunifiedideographsextensiond"] = { first = 0x2B740, last = 0x2B81F, description = "CJK Unified Ideographs Extension D" }, + ["cjkunifiedideographsextensione"] = { first = 0x2B820, last = 0x2CEAF, description = "CJK Unified Ideographs Extension E" }, + ["cjkunifiedideographsextensionf"] = { first = 0x2CEB0, last = 0x2EBEF, description = "CJK Unified Ideographs Extension F" }, + ["cjkunifiedideographsextensiong"] = { first = 0x30000, last = 0x3134F, description = "CJK Unified Ideographs Extension G" }, + ["cjkunifiedideographsextensionh"] = { first = 0x31350, last = 0x323AF, description = "CJK Unified Ideographs Extension H" }, + ["combiningdiacriticalmarks"] = { first = 0x00300, last = 0x0036F, description = "Combining Diacritical Marks" }, + ["combiningdiacriticalmarksextended"] = { first = 0x01AB0, last = 0x01AFF, description = "Combining Diacritical Marks Extended" }, + ["combiningdiacriticalmarksforsymbols"] = { first = 0x020D0, last = 0x020FF, description = "Combining Diacritical Marks for Symbols" }, + ["combiningdiacriticalmarkssupplement"] = { first = 0x01DC0, last = 0x01DFF, description = "Combining Diacritical Marks Supplement" }, + ["combininghalfmarks"] = { first = 0x0FE20, last = 0x0FE2F, description = "Combining Half Marks" }, + ["commonindicnumberforms"] = { first = 0x0A830, last = 0x0A83F, description = "Common Indic Number Forms" }, + ["controlpictures"] = { first = 0x02400, last = 0x0243F, description = "Control Pictures" }, + ["coptic"] = { first = 0x02C80, last = 0x02CFF, otf="copt", description = "Coptic" }, + ["copticepactnumbers"] = { first = 0x102E0, last = 0x102FF, description = "Coptic Epact Numbers" }, + ["countingrodnumerals"] = { first = 0x1D360, last = 0x1D37F, description = "Counting Rod Numerals" }, + ["cuneiform"] = { first = 0x12000, last = 0x123FF, otf="xsux", description = "Cuneiform" }, + ["cuneiformnumbersandpunctuation"] = { first = 0x12400, last = 0x1247F, otf="xsux", description = "Cuneiform Numbers and Punctuation" }, + ["currencysymbols"] = { first = 0x020A0, last = 0x020CF, description = "Currency Symbols" }, + ["cypriotsyllabary"] = { first = 0x10800, last = 0x1083F, otf="cprt", description = "Cypriot Syllabary" }, + ["cyprominoan"] = { first = 0x12F90, last = 0x12FFF, description = "Cypro-Minoan" }, + ["cyrillic"] = { first = 0x00400, last = 0x004FF, otf="cyrl", description = "Cyrillic" }, + ["cyrillicextendeda"] = { first = 0x02DE0, last = 0x02DFF, otf="cyrl", description = "Cyrillic Extended-A" }, + ["cyrillicextendedb"] = { first = 0x0A640, last = 0x0A69F, otf="cyrl", description = "Cyrillic Extended-B" }, + ["cyrillicextendedc"] = { first = 0x01C80, last = 0x01C8F, description = "Cyrillic Extended-C" }, + ["cyrillicextendedd"] = { first = 0x1E030, last = 0x1E08F, description = "Cyrillic Extended-D" }, + ["cyrillicsupplement"] = { first = 0x00500, last = 0x0052F, otf="cyrl", description = "Cyrillic Supplement" }, + ["deseret"] = { first = 0x10400, last = 0x1044F, otf="dsrt", description = "Deseret" }, + ["devanagari"] = { first = 0x00900, last = 0x0097F, otf="deva", description = "Devanagari" }, + ["devanagariextended"] = { first = 0x0A8E0, last = 0x0A8FF, description = "Devanagari Extended" }, + ["devanagariextendeda"] = { first = 0x11B00, last = 0x11B5F, description = "Devanagari Extended-A" }, + ["digitsarabicindic"] = { first = 0x00660, last = 0x00669, math = true }, + -- ["digitsbengali"] = { first = 0x009E6, last = 0x009EF, math = true }, + ["digitsbold"] = { first = 0x1D7CE, last = 0x1D7D7, math = true }, + -- ["digitsdevanagari"] = { first = 0x00966, last = 0x0096F, math = true }, + ["digitsdoublestruck"] = { first = 0x1D7D8, last = 0x1D7E1, math = true }, + -- ["digitsethiopic"] = { first = 0x01369, last = 0x01371, math = true }, + ["digitsextendedarabicindic"] = { first = 0x006F0, last = 0x006F9, math = true }, + -- ["digitsgujarati"] = { first = 0x00AE6, last = 0x00AEF, math = true }, + -- ["digitsgurmukhi"] = { first = 0x00A66, last = 0x00A6F, math = true }, + -- ["digitskannada"] = { first = 0x00CE6, last = 0x00CEF, math = true }, + -- ["digitskhmer"] = { first = 0x017E0, last = 0x017E9, math = true }, + -- ["digitslao"] = { first = 0x00ED0, last = 0x00ED9, math = true }, + ["digitslatin"] = { first = 0x00030, last = 0x00039, math = true }, + -- ["digitsmalayalam"] = { first = 0x00D66, last = 0x00D6F, math = true }, + -- ["digitsmongolian"] = { first = 0x01810, last = 0x01809, math = true }, + ["digitsmonospace"] = { first = 0x1D7F6, last = 0x1D7FF, math = true }, + -- ["digitsmyanmar"] = { first = 0x01040, last = 0x01049, math = true }, + ["digitsnormal"] = { first = 0x00030, last = 0x00039, math = true }, + -- ["digitsoriya"] = { first = 0x00B66, last = 0x00B6F, math = true }, + ["digitssansserifbold"] = { first = 0x1D7EC, last = 0x1D7F5, math = true }, + ["digitssansserifnormal"] = { first = 0x1D7E2, last = 0x1D7EB, math = true }, + -- ["digitstamil"] = { first = 0x00030, last = 0x00039, math = true }, -- no zero + -- ["digitstelugu"] = { first = 0x00C66, last = 0x00C6F, math = true }, + -- ["digitsthai"] = { first = 0x00E50, last = 0x00E59, math = true }, + -- ["digitstibetan"] = { first = 0x00F20, last = 0x00F29, math = true }, + ["dingbats"] = { first = 0x02700, last = 0x027BF, description = "Dingbats" }, + ["divesakuru"] = { first = 0x11900, last = 0x1195F, description = "Dives Akuru" }, + ["dogra"] = { first = 0x11800, last = 0x1184F, description = "Dogra" }, + ["dominotiles"] = { first = 0x1F030, last = 0x1F09F, description = "Domino Tiles" }, + ["duployan"] = { first = 0x1BC00, last = 0x1BC9F, description = "Duployan" }, + ["earlydynasticcuneiform"] = { first = 0x12480, last = 0x1254F, description = "Early Dynastic Cuneiform" }, + ["egyptianhieroglyphformatcontrols"] = { first = 0x13430, last = 0x1345F, description = "Egyptian Hieroglyph Format Controls" }, + ["egyptianhieroglyphs"] = { first = 0x13000, last = 0x1342F, description = "Egyptian Hieroglyphs" }, + ["elbasan"] = { first = 0x10500, last = 0x1052F, description = "Elbasan" }, + ["elymaic"] = { first = 0x10FE0, last = 0x10FFF, description = "Elymaic" }, + ["emoticons"] = { first = 0x1F600, last = 0x1F64F, description = "Emoticons" }, + ["enclosedalphanumerics"] = { first = 0x02460, last = 0x024FF, description = "Enclosed Alphanumerics" }, + ["enclosedalphanumericsupplement"] = { first = 0x1F100, last = 0x1F1FF, description = "Enclosed Alphanumeric Supplement" }, + ["enclosedcjklettersandmonths"] = { first = 0x03200, last = 0x032FF, description = "Enclosed CJK Letters and Months" }, + ["enclosedideographicsupplement"] = { first = 0x1F200, last = 0x1F2FF, description = "Enclosed Ideographic Supplement" }, + ["ethiopic"] = { first = 0x01200, last = 0x0137F, otf="ethi", description = "Ethiopic" }, + ["ethiopicextended"] = { first = 0x02D80, last = 0x02DDF, otf="ethi", description = "Ethiopic Extended" }, + ["ethiopicextendeda"] = { first = 0x0AB00, last = 0x0AB2F, description = "Ethiopic Extended-A" }, + ["ethiopicextendedb"] = { first = 0x1E7E0, last = 0x1E7FF, description = "Ethiopic Extended-B" }, + ["ethiopicsupplement"] = { first = 0x01380, last = 0x0139F, otf="ethi", description = "Ethiopic Supplement" }, + ["generalpunctuation"] = { first = 0x02000, last = 0x0206F, description = "General Punctuation" }, + ["geometricshapes"] = { first = 0x025A0, last = 0x025FF, math = true, description = "Geometric Shapes" }, + ["geometricshapesextended"] = { first = 0x1F780, last = 0x1F7FF, description = "Geometric Shapes Extended" }, + ["georgian"] = { first = 0x010A0, last = 0x010FF, otf="geor", description = "Georgian" }, + ["georgianextended"] = { first = 0x01C90, last = 0x01CBF, description = "Georgian Extended" }, + ["georgiansupplement"] = { first = 0x02D00, last = 0x02D2F, otf="geor", description = "Georgian Supplement" }, + ["glagolitic"] = { first = 0x02C00, last = 0x02C5F, otf="glag", description = "Glagolitic" }, + ["glagoliticsupplement"] = { first = 0x1E000, last = 0x1E02F, description = "Glagolitic Supplement" }, + ["gothic"] = { first = 0x10330, last = 0x1034F, otf="goth", description = "Gothic" }, + ["grantha"] = { first = 0x11300, last = 0x1137F, description = "Grantha" }, + ["greekandcoptic"] = { first = 0x00370, last = 0x003FF, otf="grek", description = "Greek and Coptic" }, + ["greekextended"] = { first = 0x01F00, last = 0x01FFF, otf="grek", description = "Greek Extended" }, + ["gujarati"] = { first = 0x00A80, last = 0x00AFF, otf="gujr", description = "Gujarati" }, + ["gunjalagondi"] = { first = 0x11D60, last = 0x11DAF, description = "Gunjala Gondi" }, + ["gurmukhi"] = { first = 0x00A00, last = 0x00A7F, otf="guru", description = "Gurmukhi" }, + ["halfwidthandfullwidthforms"] = { first = 0x0FF00, last = 0x0FFEF, description = "Halfwidth and Fullwidth Forms" }, + ["hangulcompatibilityjamo"] = { first = 0x03130, last = 0x0318F, otf="jamo", description = "Hangul Compatibility Jamo" }, + ["hanguljamo"] = { first = 0x01100, last = 0x011FF, otf="jamo", description = "Hangul Jamo" }, + ["hanguljamoextendeda"] = { first = 0x0A960, last = 0x0A97F, description = "Hangul Jamo Extended-A" }, + ["hanguljamoextendedb"] = { first = 0x0D7B0, last = 0x0D7FF, description = "Hangul Jamo Extended-B" }, + ["hangulsyllables"] = { first = 0x0AC00, last = 0x0D7AF, otf="hang", description = "Hangul Syllables" }, + ["hanifirohingya"] = { first = 0x10D00, last = 0x10D3F, description = "Hanifi Rohingya" }, + ["hanunoo"] = { first = 0x01720, last = 0x0173F, otf="hano", description = "Hanunoo" }, + ["hatran"] = { first = 0x108E0, last = 0x108FF, description = "Hatran" }, + ["hebrew"] = { first = 0x00590, last = 0x005FF, otf="hebr", description = "Hebrew" }, + ["highprivateusesurrogates"] = { first = 0x0DB80, last = 0x0DBFF, description = "High Private Use Surrogates" }, + ["highsurrogates"] = { first = 0x0D800, last = 0x0DB7F, description = "High Surrogates" }, + ["hiragana"] = { first = 0x03040, last = 0x0309F, otf="kana", description = "Hiragana" }, + ["ideographicdescriptioncharacters"] = { first = 0x02FF0, last = 0x02FFF, description = "Ideographic Description Characters" }, + ["ideographicsymbolsandpunctuation"] = { first = 0x16FE0, last = 0x16FFF, description = "Ideographic Symbols and Punctuation" }, + ["imperialaramaic"] = { first = 0x10840, last = 0x1085F, description = "Imperial Aramaic" }, + ["indicsiyaqnumbers"] = { first = 0x1EC70, last = 0x1ECBF, description = "Indic Siyaq Numbers" }, + ["inscriptionalpahlavi"] = { first = 0x10B60, last = 0x10B7F, description = "Inscriptional Pahlavi" }, + ["inscriptionalparthian"] = { first = 0x10B40, last = 0x10B5F, description = "Inscriptional Parthian" }, + ["ipaextensions"] = { first = 0x00250, last = 0x002AF, description = "IPA Extensions" }, + ["javanese"] = { first = 0x0A980, last = 0x0A9DF, description = "Javanese" }, + ["kaithi"] = { first = 0x11080, last = 0x110CF, description = "Kaithi" }, + ["kaktoviknumerals"] = { first = 0x1D2C0, last = 0x1D2DF, description = "Kaktovik Numerals" }, + ["kanaextendeda"] = { first = 0x1B100, last = 0x1B12F, description = "Kana Extended-A" }, + ["kanaextendedb"] = { first = 0x1AFF0, last = 0x1AFFF, description = "Kana Extended-B" }, + ["kanasupplement"] = { first = 0x1B000, last = 0x1B0FF, description = "Kana Supplement" }, + ["kanbun"] = { first = 0x03190, last = 0x0319F, description = "Kanbun" }, + ["kangxiradicals"] = { first = 0x02F00, last = 0x02FDF, description = "Kangxi Radicals" }, + ["kannada"] = { first = 0x00C80, last = 0x00CFF, otf="knda", description = "Kannada" }, + ["katakana"] = { first = 0x030A0, last = 0x030FF, otf="kana", description = "Katakana" }, + ["katakanaphoneticextensions"] = { first = 0x031F0, last = 0x031FF, otf="kana", description = "Katakana Phonetic Extensions" }, + ["kayahli"] = { first = 0x0A900, last = 0x0A92F, description = "Kayah Li" }, + ["kawi"] = { first = 0x11F00, last = 0x11F5F, description = "Kawi" }, + ["kharoshthi"] = { first = 0x10A00, last = 0x10A5F, otf="khar", description = "Kharoshthi" }, + ["khitansmallscript"] = { first = 0x18B00, last = 0x18CFF, description = "Khitan Small Script" }, + ["khmer"] = { first = 0x01780, last = 0x017FF, otf="khmr", description = "Khmer" }, + ["khmersymbols"] = { first = 0x019E0, last = 0x019FF, otf="khmr", description = "Khmer Symbols" }, + ["khojki"] = { first = 0x11200, last = 0x1124F, description = "Khojki" }, + ["khudawadi"] = { first = 0x112B0, last = 0x112FF, description = "Khudawadi" }, + ["lao"] = { first = 0x00E80, last = 0x00EFF, otf="lao", description = "Lao" }, + ["latinextendeda"] = { first = 0x00100, last = 0x0017F, otf="latn", description = "Latin Extended-A" }, + ["latinextendedadditional"] = { first = 0x01E00, last = 0x01EFF, otf="latn", description = "Latin Extended Additional" }, + ["latinextendedb"] = { first = 0x00180, last = 0x0024F, otf="latn", description = "Latin Extended-B" }, + ["latinextendedc"] = { first = 0x02C60, last = 0x02C7F, otf="latn", description = "Latin Extended-C" }, + ["latinextendedd"] = { first = 0x0A720, last = 0x0A7FF, otf="latn", description = "Latin Extended-D" }, + ["latinextendede"] = { first = 0x0AB30, last = 0x0AB6F, description = "Latin Extended-E" }, + ["latinextendedf"] = { first = 0x10780, last = 0x107BF, description = "Latin Extended-F" }, + ["latinextendedg"] = { first = 0x1DF00, last = 0x1DFFF, description = "Latin Extended-G" }, + ["latinsupplement"] = { first = 0x00080, last = 0x000FF, otf="latn", description = "Latin-1 Supplement" }, + ["lepcha"] = { first = 0x01C00, last = 0x01C4F, description = "Lepcha" }, + ["letterlikesymbols"] = { first = 0x02100, last = 0x0214F, math = true, description = "Letterlike Symbols" }, + ["limbu"] = { first = 0x01900, last = 0x0194F, otf="limb", description = "Limbu" }, + ["lineara"] = { first = 0x10600, last = 0x1077F, description = "Linear A" }, + ["linearbideograms"] = { first = 0x10080, last = 0x100FF, otf="linb", description = "Linear B Ideograms" }, + ["linearbsyllabary"] = { first = 0x10000, last = 0x1007F, otf="linb", description = "Linear B Syllabary" }, + ["lisu"] = { first = 0x0A4D0, last = 0x0A4FF, description = "Lisu" }, + ["lisusupplement"] = { first = 0x11FB0, last = 0x11FBF, description = "Lisu Supplement" }, + ["lowercasebold"] = { first = 0x1D41A, last = 0x1D433, math = true }, + ["lowercaseboldfraktur"] = { first = 0x1D586, last = 0x1D59F, math = true }, + ["lowercasebolditalic"] = { first = 0x1D482, last = 0x1D49B, math = true, italic = true }, + ["lowercaseboldscript"] = { first = 0x1D4EA, last = 0x1D503, math = true, italic = true }, + ["lowercasedoublestruck"] = { first = 0x1D552, last = 0x1D56B, math = true }, + ["lowercasefraktur"] = { first = 0x1D51E, last = 0x1D537, math = true }, + ["lowercasegreekbold"] = { first = 0x1D6C2, last = 0x1D6DB, math = true }, + ["lowercasegreekbolditalic"] = { first = 0x1D736, last = 0x1D74F, math = true, italic = true }, + ["lowercasegreekitalic"] = { first = 0x1D6FC, last = 0x1D715, math = true, italic = true }, + ["lowercasegreeknormal"] = { first = 0x003B1, last = 0x003C9, math = true }, + ["lowercasegreeksansserifbold"] = { first = 0x1D770, last = 0x1D789, math = true }, + ["lowercasegreeksansserifbolditalic"] = { first = 0x1D7AA, last = 0x1D7C3, math = true, italic = true }, + ["lowercaseitalic"] = { first = 0x1D44E, last = 0x1D467, math = true, italic = true }, + ["lowercasemonospace"] = { first = 0x1D68A, last = 0x1D6A3, math = true }, + ["lowercasenormal"] = { first = 0x00061, last = 0x0007A, math = true }, + ["lowercasesansserifbold"] = { first = 0x1D5EE, last = 0x1D607, math = true }, + ["lowercasesansserifbolditalic"] = { first = 0x1D656, last = 0x1D66F, math = true, italic = true }, + ["lowercasesansserifitalic"] = { first = 0x1D622, last = 0x1D63B, math = true, italic = true }, + ["lowercasesansserifnormal"] = { first = 0x1D5BA, last = 0x1D5D3, math = true }, + ["lowercasescript"] = { first = 0x1D4B6, last = 0x1D4CF, math = true, italic = true }, + ["lowsurrogates"] = { first = 0x0DC00, last = 0x0DFFF, description = "Low Surrogates" }, + ["lycian"] = { first = 0x10280, last = 0x1029F, description = "Lycian" }, + ["lydian"] = { first = 0x10920, last = 0x1093F, description = "Lydian" }, + ["mahajani"] = { first = 0x11150, last = 0x1117F, description = "Mahajani" }, + ["mahjongtiles"] = { first = 0x1F000, last = 0x1F02F, description = "Mahjong Tiles" }, + ["makasar"] = { first = 0x11EE0, last = 0x11EFF, description = "Makasar" }, + ["malayalam"] = { first = 0x00D00, last = 0x00D7F, otf="mlym", description = "Malayalam" }, + ["mandaic"] = { first = 0x00840, last = 0x0085F, otf="mand", description = "Mandaic" }, + ["manichaean"] = { first = 0x10AC0, last = 0x10AFF, description = "Manichaean" }, + ["marchen"] = { first = 0x11C70, last = 0x11CBF, description = "Marchen" }, + ["masaramgondi"] = { first = 0x11D00, last = 0x11D5F, description = "Masaram Gondi" }, + ["mathematicalalphanumericsymbols"] = { first = 0x1D400, last = 0x1D7FF, math = true, description = "Mathematical Alphanumeric Symbols" }, + ["mathematicaloperators"] = { first = 0x02200, last = 0x022FF, math = true, description = "Mathematical Operators" }, + ["mayannumerals"] = { first = 0x1D2E0, last = 0x1D2FF, description = "Mayan Numerals" }, + ["medefaidrin"] = { first = 0x16E40, last = 0x16E9F, description = "Medefaidrin" }, + ["meeteimayek"] = { first = 0x0ABC0, last = 0x0ABFF, description = "Meetei Mayek" }, + ["meeteimayekextensions"] = { first = 0x0AAE0, last = 0x0AAFF, description = "Meetei Mayek Extensions" }, + ["mendekikakui"] = { first = 0x1E800, last = 0x1E8DF, description = "Mende Kikakui" }, + ["meroiticcursive"] = { first = 0x109A0, last = 0x109FF, description = "Meroitic Cursive" }, + ["meroitichieroglyphs"] = { first = 0x10980, last = 0x1099F, description = "Meroitic Hieroglyphs" }, + ["miao"] = { first = 0x16F00, last = 0x16F9F, description = "Miao" }, + ["miscellaneousmathematicalsymbolsa"] = { first = 0x027C0, last = 0x027EF, math = true, description = "Miscellaneous Mathematical Symbols-A" }, + ["miscellaneousmathematicalsymbolsb"] = { first = 0x02980, last = 0x029FF, math = true, description = "Miscellaneous Mathematical Symbols-B" }, + ["miscellaneoussymbols"] = { first = 0x02600, last = 0x026FF, math = true, description = "Miscellaneous Symbols" }, + ["miscellaneoussymbolsandarrows"] = { first = 0x02B00, last = 0x02BFF, math = true, description = "Miscellaneous Symbols and Arrows" }, + ["miscellaneoussymbolsandpictographs"] = { first = 0x1F300, last = 0x1F5FF, description = "Miscellaneous Symbols and Pictographs" }, + ["miscellaneoustechnical"] = { first = 0x02300, last = 0x023FF, math = true, description = "Miscellaneous Technical" }, + ["modi"] = { first = 0x11600, last = 0x1165F, description = "Modi" }, + ["modifiertoneletters"] = { first = 0x0A700, last = 0x0A71F, description = "Modifier Tone Letters" }, + ["mongolian"] = { first = 0x01800, last = 0x018AF, otf="mong", description = "Mongolian" }, + ["mongoliansupplement"] = { first = 0x11660, last = 0x1167F, description = "Mongolian Supplement" }, + ["mro"] = { first = 0x16A40, last = 0x16A6F, description = "Mro" }, + ["multani"] = { first = 0x11280, last = 0x112AF, description = "Multani" }, + ["musicalsymbols"] = { first = 0x1D100, last = 0x1D1FF, otf="musc", description = "Musical Symbols" }, + ["myanmar"] = { first = 0x01000, last = 0x0109F, otf="mymr", description = "Myanmar" }, + ["myanmarextendeda"] = { first = 0x0AA60, last = 0x0AA7F, description = "Myanmar Extended-A" }, + ["myanmarextendedb"] = { first = 0x0A9E0, last = 0x0A9FF, description = "Myanmar Extended-B" }, + ["nabataean"] = { first = 0x10880, last = 0x108AF, description = "Nabataean" }, + ["nagmundari"] = { first = 0x1E4D0, last = 0x1E4FF, description = "Nag Mundari" }, + ["nandinagari"] = { first = 0x119A0, last = 0x119FF, description = "Nandinagari" }, + ["newa"] = { first = 0x11400, last = 0x1147F, description = "Newa" }, + ["newtailue"] = { first = 0x01980, last = 0x019DF, description = "New Tai Lue" }, + ["nko"] = { first = 0x007C0, last = 0x007FF, otf="nko", description = "NKo" }, + ["numberforms"] = { first = 0x02150, last = 0x0218F, description = "Number Forms" }, + ["nushu"] = { first = 0x1B170, last = 0x1B2FF, description = "Nushu" }, + ["nyiakengpuachuehmong"] = { first = 0x1E100, last = 0x1E14F, description = "Nyiakeng Puachue Hmong" }, + ["ogham"] = { first = 0x01680, last = 0x0169F, otf="ogam", description = "Ogham" }, + ["olchiki"] = { first = 0x01C50, last = 0x01C7F, description = "Ol Chiki" }, + ["oldhungarian"] = { first = 0x10C80, last = 0x10CFF, description = "Old Hungarian" }, + ["olditalic"] = { first = 0x10300, last = 0x1032F, otf="ital", description = "Old Italic" }, + ["oldnortharabian"] = { first = 0x10A80, last = 0x10A9F, description = "Old North Arabian" }, + ["oldpermic"] = { first = 0x10350, last = 0x1037F, description = "Old Permic" }, + ["oldpersian"] = { first = 0x103A0, last = 0x103DF, otf="xpeo", description = "Old Persian" }, + ["oldsogdian"] = { first = 0x10F00, last = 0x10F2F, description = "Old Sogdian" }, + ["oldsoutharabian"] = { first = 0x10A60, last = 0x10A7F, description = "Old South Arabian" }, + ["oldturkic"] = { first = 0x10C00, last = 0x10C4F, description = "Old Turkic" }, + ["olduyghur"] = { first = 0x10F70, last = 0x10FAF, description = "Old Uyghur" }, + ["opticalcharacterrecognition"] = { first = 0x02440, last = 0x0245F, description = "Optical Character Recognition" }, + ["oriya"] = { first = 0x00B00, last = 0x00B7F, otf="orya", description = "Oriya" }, + ["ornamentaldingbats"] = { first = 0x1F650, last = 0x1F67F, description = "Ornamental Dingbats" }, + ["osage"] = { first = 0x104B0, last = 0x104FF, description = "Osage" }, + ["osmanya"] = { first = 0x10480, last = 0x104AF, otf="osma", description = "Osmanya" }, + ["ottomansiyaqnumbers"] = { first = 0x1ED00, last = 0x1ED4F, description = "Ottoman Siyaq Numbers" }, + ["pahawhhmong"] = { first = 0x16B00, last = 0x16B8F, description = "Pahawh Hmong" }, + ["palmyrene"] = { first = 0x10860, last = 0x1087F, description = "Palmyrene" }, + ["paucinhau"] = { first = 0x11AC0, last = 0x11AFF, description = "Pau Cin Hau" }, + ["phagspa"] = { first = 0x0A840, last = 0x0A87F, otf="phag", description = "Phags-pa" }, + ["phaistosdisc"] = { first = 0x101D0, last = 0x101FF, description = "Phaistos Disc" }, + ["phoenician"] = { first = 0x10900, last = 0x1091F, otf="phnx", description = "Phoenician" }, + ["phoneticextensions"] = { first = 0x01D00, last = 0x01D7F, description = "Phonetic Extensions" }, + ["phoneticextensionssupplement"] = { first = 0x01D80, last = 0x01DBF, description = "Phonetic Extensions Supplement" }, + ["playingcards"] = { first = 0x1F0A0, last = 0x1F0FF, description = "Playing Cards" }, + ["privateusearea"] = { first = 0x0E000, last = 0x0F8FF, description = "Private Use Area" }, + ["psalterpahlavi"] = { first = 0x10B80, last = 0x10BAF, description = "Psalter Pahlavi" }, + ["rejang"] = { first = 0x0A930, last = 0x0A95F, description = "Rejang" }, + ["ruminumeralsymbols"] = { first = 0x10E60, last = 0x10E7F, description = "Rumi Numeral Symbols" }, + ["runic"] = { first = 0x016A0, last = 0x016FF, otf="runr", description = "Runic" }, + ["samaritan"] = { first = 0x00800, last = 0x0083F, description = "Samaritan" }, + ["saurashtra"] = { first = 0x0A880, last = 0x0A8DF, description = "Saurashtra" }, + ["sharada"] = { first = 0x11180, last = 0x111DF, description = "Sharada" }, + ["shavian"] = { first = 0x10450, last = 0x1047F, otf="shaw", description = "Shavian" }, + ["shorthandformatcontrols"] = { first = 0x1BCA0, last = 0x1BCAF, description = "Shorthand Format Controls" }, + ["siddham"] = { first = 0x11580, last = 0x115FF, description = "Siddham" }, + ["sinhala"] = { first = 0x00D80, last = 0x00DFF, otf="sinh", description = "Sinhala" }, + ["sinhalaarchaicnumbers"] = { first = 0x111E0, last = 0x111FF, description = "Sinhala Archaic Numbers" }, + ["smallformvariants"] = { first = 0x0FE50, last = 0x0FE6F, description = "Small Form Variants" }, + ["smallkanaextension"] = { first = 0x1B130, last = 0x1B16F, description = "Small Kana Extension" }, + ["sogdian"] = { first = 0x10F30, last = 0x10F6F, description = "Sogdian" }, + ["sorasompeng"] = { first = 0x110D0, last = 0x110FF, description = "Sora Sompeng" }, + ["soyombo"] = { first = 0x11A50, last = 0x11AAF, description = "Soyombo" }, + ["spacingmodifierletters"] = { first = 0x002B0, last = 0x002FF, description = "Spacing Modifier Letters" }, + ["specials"] = { first = 0x0FFF0, last = 0x0FFFF, description = "Specials" }, + ["sundanese"] = { first = 0x01B80, last = 0x01BBF, description = "Sundanese" }, + ["sundanesesupplement"] = { first = 0x01CC0, last = 0x01CCF, description = "Sundanese Supplement" }, + ["superscriptsandsubscripts"] = { first = 0x02070, last = 0x0209F, description = "Superscripts and Subscripts" }, + ["supplementalarrowsa"] = { first = 0x027F0, last = 0x027FF, math = true, description = "Supplemental Arrows-A" }, + ["supplementalarrowsb"] = { first = 0x02900, last = 0x0297F, math = true, description = "Supplemental Arrows-B" }, + ["supplementalarrowsc"] = { first = 0x1F800, last = 0x1F8FF, math = true, description = "Supplemental Arrows-C" }, + ["supplementalmathematicaloperators"] = { first = 0x02A00, last = 0x02AFF, math = true, description = "Supplemental Mathematical Operators" }, + ["supplementalpunctuation"] = { first = 0x02E00, last = 0x02E7F, description = "Supplemental Punctuation" }, + ["supplementalsymbolsandpictographs"] = { first = 0x1F900, last = 0x1F9FF, description = "Supplemental Symbols and Pictographs" }, + ["supplementaryprivateuseareaa"] = { first = 0xF0000, last = 0xFFFFF, description = "Supplementary Private Use Area-A" }, + ["supplementaryprivateuseareab"] = { first = 0x100000,last = 0x10FFFF, description = "Supplementary Private Use Area-B" }, + ["suttonsignwriting"] = { first = 0x1D800, last = 0x1DAAF, description = "Sutton SignWriting" }, + ["sylotinagri"] = { first = 0x0A800, last = 0x0A82F, otf="sylo", description = "Syloti Nagri" }, + ["symbolsandpictographsextendeda"] = { first = 0x1FA70, last = 0x1FAFF, description = "Symbols and Pictographs Extended-A" }, + ["symbolsforlegacycomputing"] = { first = 0x1FB00, last = 0x1FBFF, description = "Symbols for Legacy Computing" }, + ["syriac"] = { first = 0x00700, last = 0x0074F, otf="syrc", description = "Syriac" }, + ["syriacsupplement"] = { first = 0x00860, last = 0x0086F, description = "Syriac Supplement" }, + ["tagalog"] = { first = 0x01700, last = 0x0171F, otf="tglg", description = "Tagalog" }, + ["tagbanwa"] = { first = 0x01760, last = 0x0177F, otf="tagb", description = "Tagbanwa" }, + ["tags"] = { first = 0xE0000, last = 0xE007F, description = "Tags" }, + ["taile"] = { first = 0x01950, last = 0x0197F, otf="tale", description = "Tai Le" }, + ["taitham"] = { first = 0x01A20, last = 0x01AAF, description = "Tai Tham" }, + ["taiviet"] = { first = 0x0AA80, last = 0x0AADF, description = "Tai Viet" }, + ["taixuanjingsymbols"] = { first = 0x1D300, last = 0x1D35F, description = "Tai Xuan Jing Symbols" }, + ["takri"] = { first = 0x11680, last = 0x116CF, description = "Takri" }, + ["tamil"] = { first = 0x00B80, last = 0x00BFF, otf="taml", description = "Tamil" }, + ["tamilsupplement"] = { first = 0x11FC0, last = 0x11FFF, description = "Tamil Supplement" }, + ["tangut"] = { first = 0x17000, last = 0x187FF, description = "Tangut" }, + ["tangutsupplement"] = { first = 0x18D00, last = 0x18D7F, description = "Tangut Supplement" }, + ["tangutcomponents"] = { first = 0x18800, last = 0x18AFF, description = "Tangut Components" }, + ["tangsa"] = { first = 0x16A70, last = 0x16ACF, description = "Tangsa" }, + ["telugu"] = { first = 0x00C00, last = 0x00C7F, otf="telu", description = "Telugu" }, + ["thaana"] = { first = 0x00780, last = 0x007BF, otf="thaa", description = "Thaana" }, + ["thai"] = { first = 0x00E00, last = 0x00E7F, otf="thai", description = "Thai" }, + ["tibetan"] = { first = 0x00F00, last = 0x00FFF, otf="tibt", description = "Tibetan" }, + ["tifinagh"] = { first = 0x02D30, last = 0x02D7F, otf="tfng", description = "Tifinagh" }, + ["tirhuta"] = { first = 0x11480, last = 0x114DF, description = "Tirhuta" }, + ["toto"] = { first = 0x1E290, last = 0x1E2BF, description = "Toto" }, + ["transportandmapsymbols"] = { first = 0x1F680, last = 0x1F6FF, description = "Transport and Map Symbols" }, + ["ugaritic"] = { first = 0x10380, last = 0x1039F, otf="ugar", description = "Ugaritic" }, + ["unifiedcanadianaboriginalsyllabics"] = { first = 0x01400, last = 0x0167F, otf="cans", description = "Unified Canadian Aboriginal Syllabics" }, + ["unifiedcanadianaboriginalsyllabicsextended"] = { first = 0x018B0, last = 0x018FF, description = "Unified Canadian Aboriginal Syllabics Extended" }, + ["unifiedcanadianaboriginalsyllabicsextendeda"] = { first = 0x11AB0, last = 0x11ABF, description = "Unified Canadian Aboriginal Syllabics Extended-A" }, + ["uppercasebold"] = { first = 0x1D400, last = 0x1D419, math = true }, + ["uppercaseboldfraktur"] = { first = 0x1D56C, last = 0x1D585, math = true }, + ["uppercasebolditalic"] = { first = 0x1D468, last = 0x1D481, math = true, italic = true }, + ["uppercaseboldscript"] = { first = 0x1D4D0, last = 0x1D4E9, math = true, italic = true }, + ["uppercasedoublestruck"] = { first = 0x1D538, last = 0x1D551, math = true }, -- gaps are filled in elsewhere + ["uppercasefraktur"] = { first = 0x1D504, last = 0x1D51D, math = true }, + ["uppercasegreekbold"] = { first = 0x1D6A8, last = 0x1D6C1, math = true }, + ["uppercasegreekbolditalic"] = { first = 0x1D71C, last = 0x1D735, math = true, italic = true }, + ["uppercasegreekitalic"] = { first = 0x1D6E2, last = 0x1D6FB, math = true, italic = true }, + ["uppercasegreeknormal"] = { first = 0x00391, last = 0x003AA, math = true }, + ["uppercasegreeksansserifbold"] = { first = 0x1D756, last = 0x1D76F, math = true }, + ["uppercasegreeksansserifbolditalic"] = { first = 0x1D790, last = 0x1D7A9, math = true, italic = true }, + ["uppercaseitalic"] = { first = 0x1D434, last = 0x1D44D, math = true, italic = true }, + ["uppercasemonospace"] = { first = 0x1D670, last = 0x1D689, math = true }, + ["uppercasenormal"] = { first = 0x00041, last = 0x0005A, math = true }, + ["uppercasesansserifbold"] = { first = 0x1D5D4, last = 0x1D5ED, math = true }, + ["uppercasesansserifbolditalic"] = { first = 0x1D63C, last = 0x1D655, math = true, italic = true }, + ["uppercasesansserifitalic"] = { first = 0x1D608, last = 0x1D621, math = true, italic = true }, + ["uppercasesansserifnormal"] = { first = 0x1D5A0, last = 0x1D5B9, math = true }, + ["uppercasescript"] = { first = 0x1D49C, last = 0x1D4B5, math = true, italic = true }, + ["vai"] = { first = 0x0A500, last = 0x0A63F, description = "Vai" }, + ["variationselectors"] = { first = 0x0FE00, last = 0x0FE0F, description = "Variation Selectors" }, + ["variationselectorssupplement"] = { first = 0xE0100, last = 0xE01EF, description = "Variation Selectors Supplement" }, + ["vedicextensions"] = { first = 0x01CD0, last = 0x01CFF, description = "Vedic Extensions" }, + ["verticalforms"] = { first = 0x0FE10, last = 0x0FE1F, description = "Vertical Forms" }, + ["vithkuqi"] = { first = 0x10570, last = 0x105BF, description = "Vithkuqi" }, + ["wancho"] = { first = 0x1E2C0, last = 0x1E2FF, description = "Wancho" }, + ["warangciti"] = { first = 0x118A0, last = 0x118FF, description = "Warang Citi" }, + ["yezidi"] = { first = 0x10E80, last = 0x10EBF, description = "Yezidi" }, + ["yijinghexagramsymbols"] = { first = 0x04DC0, last = 0x04DFF, otf="yi", description = "Yijing Hexagram Symbols" }, + ["yiradicals"] = { first = 0x0A490, last = 0x0A4CF, otf="yi", description = "Yi Radicals" }, + ["yisyllables"] = { first = 0x0A000, last = 0x0A48F, otf="yi", description = "Yi Syllables" }, + ["zanabazarsquare"] = { first = 0x11A00, last = 0x11A4F, description = "Zanabazar Square" }, + ["znamennymusicalnotation"] = { first = 0x1CF00, last = 0x1CFCF, description = "Znamenny Musical Notation" }, + + -- we need this early on: + + ["lowercasecalligraphic"] = { first = 0x100000, last = 0x100019, math = true }, + ["uppercasecalligraphic"] = { first = 0x100020, last = 0x100039, math = true }, + ["lowercaseboldcalligraphic"] = { first = 0x100040, last = 0x100059, math = true }, + ["uppercaseboldcalligraphic"] = { first = 0x100060, last = 0x100079, math = true }, + -- ["lowercasesansgreek"] = { first = 0x100040, last = 0x100059, math = true }, -- reserved for future use + -- ["uppercasesansgreek"] = { first = 0x100060, last = 0x100079, math = true }, -- reserved for future use + -- ["lowercaseitalicsansgreek"] = { first = 0x100080, last = 0x100099, math = true }, -- reserved for future use + -- ["uppercaseitalicsansgreek"] = { first = 0x1000A0, last = 0x1000B9, math = true }, -- reserved for future use + -- ["lowercaseblackboarditalic"] = { first = 0x1000C0, last = 0x1000D9, math = true }, -- reserved for future use + -- ["uppercaseblackboarditalic"] = { first = 0x1000E0, last = 0x1000F9, math = true }, -- reserved for future use } -- moved from math-act.lua to here: @@ -769,10 +809,27 @@ local is_punctuation = allocate ( tohash { "pc", "pd", "ps", "pe", "pi", "pf", "po", } ) +local is_hyphenator = allocate ( tohash { + "pd", +} ) + local is_symbol = allocate ( tohash { "sm", "sc", "sk", "so", } ) +local can_have_space = allocate ( tohash { + "lu", "ll", "lt", "lm", "lo", -- letters + -- "mn", "mc", "me", -- marks + "nd", "nl", "no", -- numbers + "ps", "pi", -- initial + -- "pe", "pf", -- final + -- "pc", "pd", "po", -- punctuation + "sm", "sc", "sk", "so", -- symbols + -- "zs", "zl", "zp", -- separators + -- "cc", "cf", "cs", "co", "cn", -- others +} ) + + -- to be redone: store checked characters characters.is_character = is_character @@ -781,7 +838,9 @@ characters.is_command = is_command characters.is_spacing = is_spacing characters.is_mark = is_mark characters.is_punctuation = is_punctuation +characters.is_hyphenator = is_hyphenator characters.is_symbol = is_symbol +characters.can_have_space = can_have_space local mti = function(t,k) if type(k) == "number" then @@ -792,11 +851,14 @@ local mti = function(t,k) end end -setmetatableindex(characters.is_character, mti) -setmetatableindex(characters.is_letter, mti) -setmetatableindex(characters.is_command, mti) -setmetatableindex(characters.is_spacing, mti) -setmetatableindex(characters.is_punctuation,mti) +setmetatableindex(characters.is_character, mti) +setmetatableindex(characters.is_letter, mti) +setmetatableindex(characters.is_command, mti) +setmetatableindex(characters.is_spacing, mti) +setmetatableindex(characters.is_punctuation, mti) +setmetatableindex(characters.is_hyphenator, mti) +setmetatableindex(characters.is_symbol, mti) +setmetatableindex(characters.can_have_space, mti) -- todo: also define callers for the above @@ -926,7 +988,7 @@ if not characters.fallbacks then end -if storage then +if storage then -- in case we extend storage.register("characters/fallbacks", characters.fallbacks, "characters.fallbacks") -- accents and such end @@ -1218,7 +1280,7 @@ if not characters.splits then local kind = specials[1] if kind == "compat" then compat[unicode] = { unpack(specials,2) } - elseif kind == "char" then + elseif kind == "char" or kind == "with" then -- width added char [unicode] = { unpack(specials,2) } end end diff --git a/Master/texmf-dist/tex/context/base/mkiv/char-ini.mkiv b/Master/texmf-dist/tex/context/base/mkiv/char-ini.mkiv index aa3d31ba831..384ae983f7f 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/char-ini.mkiv +++ b/Master/texmf-dist/tex/context/base/mkiv/char-ini.mkiv @@ -17,6 +17,7 @@ \registerctxluafile{char-map}{} % maybe we will load this someplace else \registerctxluafile{char-tex}{} \registerctxluafile{char-ent}{} +\registerctxluafile{char-scr}{} \unprotect diff --git a/Master/texmf-dist/tex/context/base/mkiv/char-scr.lua b/Master/texmf-dist/tex/context/base/mkiv/char-scr.lua new file mode 100644 index 00000000000..69213381462 --- /dev/null +++ b/Master/texmf-dist/tex/context/base/mkiv/char-scr.lua @@ -0,0 +1,161 @@ +if not modules then modules = { } end modules ['char-scr'] = { + version = 1.001, + comment = "companion to char-ini.mkiv", + author = "Hans Hagen, PRAGMA-ADE, Hasselt NL", + copyright = "PRAGMA ADE / ConTeXt Development Team", + license = "see context related readme files" +} + +local tonumber = tonumber + +characters.scripthash = { -- we could put these presets in char-def.lua + -- + -- half width opening parenthesis + -- + [0x0028] = "half_width_open", + [0x005B] = "half_width_open", + [0x007B] = "half_width_open", + [0x2018] = "half_width_open", -- ‘ + [0x201C] = "half_width_open", -- “ + -- + -- full width opening parenthesis + -- + [0x3008] = "full_width_open", -- 〈 Left book quote + [0x300A] = "full_width_open", -- 《 Left double book quote + [0x300C] = "full_width_open", -- 「 left quote + [0x300E] = "full_width_open", -- 『 left double quote + [0x3010] = "full_width_open", -- 【 left double book quote + [0x3014] = "full_width_open", -- 〔 left book quote + [0x3016] = "full_width_open", --〖 left double book quote + [0x3018] = "full_width_open", -- left tortoise bracket + [0x301A] = "full_width_open", -- left square bracket + [0x301D] = "full_width_open", -- reverse double prime qm + [0xFF08] = "full_width_open", -- ( left parenthesis + [0xFF3B] = "full_width_open", -- [ left square brackets + [0xFF5B] = "full_width_open", -- { left curve bracket + -- + -- half width closing parenthesis + -- + [0x0029] = "half_width_close", + [0x005D] = "half_width_close", + [0x007D] = "half_width_close", + [0x2019] = "half_width_close", -- ’ right quote, right + [0x201D] = "half_width_close", -- ” right double quote + -- + -- full width closing parenthesis + -- + [0x3009] = "full_width_close", -- 〉 book quote + [0x300B] = "full_width_close", -- 》 double book quote + [0x300D] = "full_width_close", -- 」 right quote, right + [0x300F] = "full_width_close", -- 』 right double quote + [0x3011] = "full_width_close", -- 】 right double book quote + [0x3015] = "full_width_close", -- 〕 right book quote + [0x3017] = "full_width_close", -- 〗 right double book quote + [0x3019] = "full_width_close", -- right tortoise bracket + [0x301B] = "full_width_close", -- right square bracket + [0x301E] = "full_width_close", -- double prime qm + [0x301F] = "full_width_close", -- low double prime qm + [0xFF09] = "full_width_close", -- ) right parenthesis + [0xFF3D] = "full_width_close", -- ] right square brackets + [0xFF5D] = "full_width_close", -- } right curve brackets + -- + [0xFF62] = "half_width_open", -- left corner bracket + [0xFF63] = "half_width_close", -- right corner bracket + -- + -- vertical opening vertical + -- + -- 0xFE35, 0xFE37, 0xFE39, 0xFE3B, 0xFE3D, 0xFE3F, 0xFE41, 0xFE43, 0xFE47, + -- + -- vertical closing + -- + -- 0xFE36, 0xFE38, 0xFE3A, 0xFE3C, 0xFE3E, 0xFE40, 0xFE42, 0xFE44, 0xFE48, + -- + -- half width opening punctuation + -- + -- <empty> + -- + -- full width opening punctuation + -- + -- 0x2236, -- ∶ + -- 0xFF0C, -- , + -- + -- half width closing punctuation_hw + -- + [0x0021] = "half_width_close", -- ! + [0x002C] = "half_width_close", -- , + [0x002E] = "half_width_close", -- . + [0x003A] = "half_width_close", -- : + [0x003B] = "half_width_close", -- ; + [0x003F] = "half_width_close", -- ? + [0xFF61] = "half_width_close", -- hw full stop + -- + -- full width closing punctuation + -- + [0x3001] = "full_width_close", -- 、 + [0x3002] = "full_width_close", -- 。 + [0xFF0C] = "full_width_close", -- , + [0xFF0E] = "full_width_close", -- + -- + -- depends on font + -- + [0xFF01] = "full_width_close", -- ! + [0xFF1F] = "full_width_close", -- ? + -- + [0xFF1A] = "full_width_punct", -- : + [0xFF1B] = "full_width_punct", -- ; + -- + -- non starter + -- + [0x3005] = "non_starter", [0x3041] = "non_starter", [0x3043] = "non_starter", [0x3045] = "non_starter", [0x3047] = "non_starter", + [0x3049] = "non_starter", [0x3063] = "non_starter", [0x3083] = "non_starter", [0x3085] = "non_starter", [0x3087] = "non_starter", + [0x308E] = "non_starter", [0x3095] = "non_starter", [0x3096] = "non_starter", [0x309B] = "non_starter", [0x309C] = "non_starter", + [0x309D] = "non_starter", [0x309E] = "non_starter", [0x30A0] = "non_starter", [0x30A1] = "non_starter", [0x30A3] = "non_starter", + [0x30A5] = "non_starter", [0x30A7] = "non_starter", [0x30A9] = "non_starter", [0x30C3] = "non_starter", [0x30E3] = "non_starter", + [0x30E5] = "non_starter", [0x30E7] = "non_starter", [0x30EE] = "non_starter", [0x30F5] = "non_starter", [0x30F6] = "non_starter", + [0x30FC] = "non_starter", [0x30FD] = "non_starter", [0x30FE] = "non_starter", [0x31F0] = "non_starter", [0x31F1] = "non_starter", + [0x31F2] = "non_starter", [0x31F3] = "non_starter", [0x31F4] = "non_starter", [0x31F5] = "non_starter", [0x31F6] = "non_starter", + [0x31F7] = "non_starter", [0x31F8] = "non_starter", [0x31F9] = "non_starter", [0x31FA] = "non_starter", [0x31FB] = "non_starter", + [0x31FC] = "non_starter", [0x31FD] = "non_starter", [0x31FE] = "non_starter", [0x31FF] = "non_starter", + -- + [0x301C] = "non_starter", [0x303B] = "non_starter", [0x303C] = "non_starter", [0x309B] = "non_starter", [0x30FB] = "non_starter", + [0x30FE] = "non_starter", + -- hyphenation + -- + [0x2026] = "hyphen", -- … ellipsis + [0x2014] = "hyphen", -- — hyphen + -- + [0x1361] = "ethiopic_word", + [0x1362] = "ethiopic_sentence", + -- + -- tibetan: + -- + [0x0F0B] = "breaking_tsheg", + [0x0F0C] = "nonbreaking_tsheg", + +} + +table.setmetatableindex(characters.scripthash, function(t,k) + local v + if not tonumber(k) then v = false + elseif (k >= 0x03040 and k <= 0x030FF) + or (k >= 0x031F0 and k <= 0x031FF) + or (k >= 0x032D0 and k <= 0x032FE) + or (k >= 0x0FF00 and k <= 0x0FFEF) then v = "katakana" + elseif (k >= 0x03400 and k <= 0x04DFF) + or (k >= 0x04E00 and k <= 0x09FFF) + or (k >= 0x0F900 and k <= 0x0FAFF) + or (k >= 0x20000 and k <= 0x2A6DF) + or (k >= 0x2F800 and k <= 0x2FA1F) then v = "chinese" + elseif (k >= 0x0AC00 and k <= 0x0D7A3) then v = "korean" + elseif (k >= 0x01100 and k <= 0x0115F) then v = "jamo_initial" + elseif (k >= 0x01160 and k <= 0x011A7) then v = "jamo_medial" + elseif (k >= 0x011A8 and k <= 0x011FF) then v = "jamo_final" + elseif (k >= 0x01200 and k <= 0x0139F) then v = "ethiopic_syllable" + elseif (k >= 0x00F00 and k <= 0x00FFF) then v = "tibetan" + else v = false + end + t[k] = v + return v +end) + +-- storage.register("characters/scripthash", hash, "characters.scripthash") diff --git a/Master/texmf-dist/tex/context/base/mkiv/char-utf.lua b/Master/texmf-dist/tex/context/base/mkiv/char-utf.lua index 7d8ca219b63..e230370b5d9 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/char-utf.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/char-utf.lua @@ -148,7 +148,7 @@ else if vs then local kind = vs[1] local size = #vs - if kind == "char" then + if kind == "char" or char == "with" then -- with added if size == 3 then local one = vs[2] local two = vs[3] diff --git a/Master/texmf-dist/tex/context/base/mkiv/cldf-bas.lua b/Master/texmf-dist/tex/context/base/mkiv/cldf-bas.lua index ac17a9381f1..5853f805708 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/cldf-bas.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/cldf-bas.lua @@ -243,4 +243,3 @@ do end end - diff --git a/Master/texmf-dist/tex/context/base/mkiv/cldf-ini.lua b/Master/texmf-dist/tex/context/base/mkiv/cldf-ini.lua index bb5a058a530..0bdc60379d4 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/cldf-ini.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/cldf-ini.lua @@ -20,16 +20,8 @@ if not modules then modules = { } end modules ['cldf-ini'] = { -- more efficient approach is stable enough to move the original code to the obsolete -- module. -- --- to be considered: --- --- 0.528 local foo = tex.ctxcatcodes --- 0.651 local foo = getcount("ctxcatcodes") --- 0.408 local foo = getcount(ctxcatcodes) -- local ctxcatcodes = tex.iscount("ctxcatcodes") - -- maybe: (escape) or 0x2061 (apply function) or 0x2394 (software function ⎔) (old) -- note : tex.print == line with endlinechar appended --- todo : context("%bold{total: }%s",total) --- todo : context.documentvariable("title") -- -- During the crited project we ran into the situation that luajittex was 10-20 times -- slower that luatex ... after 3 days of testing and probing we finally figured out that @@ -98,16 +90,21 @@ local texsprint = tex.sprint -- just appended (no space,eol treatment local texprint = tex.print -- each arg a separate line (not last in directlua) ----- texwrite = tex.write -- all 'space' and 'character' -local isnode = node.is_node +-- In this stage we don't yet have nodes populated so we access the library directly ... + +local isnode = node.isnode or node.is_node +local copynodelist = node.copylist or node.copy_list local writenode = node.write -local copynodelist = node.copy_list local tonut = node.direct.todirect local tonode = node.direct.tonode -local istoken = token.is_token local newtoken = token.new local createtoken = token.create -local setluatoken = token.set_lua + +local istoken = token.istoken or token.is_token +local setluatoken = token.setlua or token.set_lua + +-- ... till here. local isprintable = tex.isprintable or function(n) return n and (type(n) == "string" or isnode(n) or istoken(n)) @@ -403,19 +400,22 @@ local registerscanner if CONTEXTLMTXMODE > 0 then -- always permanent but we can consider to obey permanent==false + -- todo: make bitset instead of keys (nil is skipped anyway) + local function toflags(specification) - local protected = specification.protected and "protected" -- or "" + local protected = specification.protected and "protected" + local untraced = specification.untraced and "untraced" local usage = specification.usage if usage == "value" then - return "global", "value", "permanent", protected + return "global", "value", "permanent", "untraced", protected elseif usage == "condition" then - return "global", "conditional", "permanent", protected + return "global", "conditional", "permanent", "untraced", protected elseif specification.frozen then - return "global", "frozen", protected + return "global", "frozen", untraced, protected elseif specification.permanent == false or specification.onlyonce then -- for now onlyonce here - return "global", protected + return "global", untraced, protected else - return "global", "permanent", protected + return "global", "permanent", untraced, protected end end @@ -425,6 +425,7 @@ local registerscanner if CONTEXTLMTXMODE > 0 then storedscanners[name] = n namesofscanners[n] = name name = specification.public and name or (privatenamespace .. name) + -- print(name,n,toflags(specification)) setluatoken(name,n,toflags(specification)) end @@ -577,6 +578,7 @@ local space = patterns.spacer local spacing = newline * space^0 local content = lpegC((1-spacing)^1) -- texsprint local emptyline = space^0 * newline^2 -- texprint("") + + newline * space^1 * newline^1 local endofline = space^0 * newline * space^0 -- texsprint(" ") local simpleline = endofline * lpegP(-1) -- @@ -796,7 +798,7 @@ local function writer(parent,command,...) -- already optimized before call flush(currentcatcodes,"}") end elseif typ == "number" then - -- numbers never have funny catcodesz + -- numbers never have funny catcodes flush(currentcatcodes,"{",ti,"}") elseif typ == "table" then local tn = #ti @@ -850,7 +852,7 @@ local function writer(parent,command,...) -- already optimized before call else flush(currentcatcodes,"[",tj,"]") end - else -- is concat really faster than flushes here? probably needed anyway (print artifacts) + else flush(currentcatcodes,"[") for j=1,tn do local tj = ti[j] @@ -1138,10 +1140,12 @@ end) -- The cmd names were synchronized with the normal call cmd names. -local luacalls = { -- luatex luametatex - lua_expandable_call = true, -- normal - lua_call = true, -- protected normal - lua_protected_call = true, -- protected +local luacalls = { + lua_function_call = true, + lua_protected_call = true, + lua_value = true, + lua_local_call = true, + lua_call = true, } local function userdata(argument) @@ -1153,7 +1157,7 @@ local function userdata(argument) -- return formatters["<<\\%s>>"](csname) return formatters["\\%s"](csname) end - if luacall[argument.cmdname] then + if luacalls[argument.cmdname] then return "<<function>>" -- argument.mode end return "<<token>>" diff --git a/Master/texmf-dist/tex/context/base/mkiv/cldf-ver.lua b/Master/texmf-dist/tex/context/base/mkiv/cldf-ver.lua index 7a1c813014b..479606f838b 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/cldf-ver.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/cldf-ver.lua @@ -68,8 +68,8 @@ local function flush(s,inline) context.resetbuffer(t_buffer) end -local function t_tocontext(t) - local s = table.serialize(t) +local function t_tocontext(t,s) + local s = table.serialize(t,s) context(function() flush(s,false) end) end diff --git a/Master/texmf-dist/tex/context/base/mkiv/colo-ini.lua b/Master/texmf-dist/tex/context/base/mkiv/colo-ini.lua index 5bfe4635c18..7a53ca71fb1 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/colo-ini.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/colo-ini.lua @@ -43,6 +43,7 @@ local texsetattribute = tex.setattribute local texgetattribute = tex.getattribute local texgetcount = tex.getcount local texgettoks = tex.gettoks +local texiscount = tex.iscount local texgetmacro = tokens.getters.macro local a_color = attributes.private('color') @@ -82,8 +83,19 @@ local function synccolorclone(name,clone) valid[name] = clone end -local function synccolorcount(name,n) - counts[name] = n +local synccolorcount if CONTEXTLMTXMODE > 0 then +-- local prefix = texgetmacro("??colornumber") +-- for k, v in next, counts do +-- counts[k] = texiscount(prefix..k) +-- print(k,v,counts[k]) +-- end + synccolorcount = function(name,n) + counts[name] = texiscount(n) + end +else + synccolorcount = function(name,n) + counts[name] = n + end end local stack = { } @@ -650,7 +662,7 @@ local function definemixcolor(makecolor,name,fractions,cs,global,freeze) if not v then return end - values[i] = v + colorvalues[i] = v end if #values > 0 then csone = values[1][1] @@ -877,7 +889,7 @@ local function formatcolor(ca,separator) end return concat(c,separator) else - return format("%0.3f",0) + return "0.000" -- format("%0.3f",0) end end @@ -1139,7 +1151,7 @@ local setcolormodel = colors.setmodel implement { name = "synccolorcount", actions = synccolorcount, - arguments = { "string", "integer" } + arguments = { "string", CONTEXTLMTXMODE > 0 and "string" or "integer" } } implement { @@ -1353,3 +1365,62 @@ implement { context((s < 0 and 0) or (s > 1 and 1) or s) end } + +-- This is a playground for MS and HH: +-- +-- Required Contrast Ratios for WCAG Conformance (how about small text) +-- +-- Level AA Text 4.5:1 for regular text and 3.0:1 for large text (18pt or 14pt/bold) +-- Level AAA Text 7.0:1 for regular text and 4.5:1 for large text (18pt or 14pt/bold) +-- +-- Level AA Non-Text 3.0:1 for user interface components and graphics + +do + + -- https://www.w3.org/TR/WCAG21/#dfn-contrast-ratio + -- https://www.w3.org/TR/WCAG21/#dfn-relative-luminance + + local function crap(v) + return v <= 0.03928 and v/12.92 or (v+0.055/1.055)^2.4 + end + + local function luminance(color) + color = colorvalues[color] + if color then + return (0.2126 * crap(color[2]) + 0.7152 * crap(color[3]) + 0.0722 * crap(color[4])) + 0.05 + end + end + + local function formatluminance(color) + local l = luminance(color) + if l then + return format("%0.3f",l) + end + end + + local function formatluminanceratio(one,two) + local one = luminance(one) + local two = luminance(two) + if one and two then + return format("%0.3f",one > two and one/two or two/one) + end + end + + colors.formatluminance = formatluminance + colors.formatluminanceratio = formatluminanceratio + + implement { + name = "formatluminance", + -- protected = true, + arguments = "integer", + actions = { formatluminance, context }, + } + + implement { + name = "formatluminanceratio", + -- protected = true, + arguments = { "integer", "integer" }, + actions = { formatluminanceratio, context }, + } + +end diff --git a/Master/texmf-dist/tex/context/base/mkiv/cont-fil.mkiv b/Master/texmf-dist/tex/context/base/mkiv/cont-fil.mkiv index edef8dbc82f..1d2a44b1ff0 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/cont-fil.mkiv +++ b/Master/texmf-dist/tex/context/base/mkiv/cont-fil.mkiv @@ -149,4 +149,6 @@ %definefilesynonym [set-13] [setups-proofing] %definefilesynonym [set-15] [setups-generate] +\definefilesynonym [newmml] [mathml] + \endinput diff --git a/Master/texmf-dist/tex/context/base/mkiv/cont-log.mkiv b/Master/texmf-dist/tex/context/base/mkiv/cont-log.mkiv index a6cd1cc2fed..bcd276bdff5 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/cont-log.mkiv +++ b/Master/texmf-dist/tex/context/base/mkiv/cont-log.mkiv @@ -207,6 +207,7 @@ \unexpanded\def\pdfeTeX {pdfe-\wordboundary\TeX} \unexpanded\def\luaTeX {lua\wordboundary\TeX} \unexpanded\def\Lua {Lua} +\unexpanded\def\LUA {\Lua} \unexpanded\def\luajitTeX {lua\wordboundary jit\wordboundary\TeX} \unexpanded\def\luametaTeX{lua\wordboundary meta\wordboundary\TeX} %unexpanded\def\XeTeX {X\lower.5\exheight\hbox{\kern-.15\emwidth\mirror{E}}\kern-.1667\emwidth\TeX} diff --git a/Master/texmf-dist/tex/context/base/mkiv/cont-new.mkiv b/Master/texmf-dist/tex/context/base/mkiv/cont-new.mkiv index 89ef1e6c3bd..2ff5bba1fbd 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/cont-new.mkiv +++ b/Master/texmf-dist/tex/context/base/mkiv/cont-new.mkiv @@ -13,7 +13,7 @@ % \normalend % uncomment this to get the real base runtime -\newcontextversion{2021.03.05 19:11} +\newcontextversion{2023.02.23 21:26} %D This file is loaded at runtime, thereby providing an excellent place for hacks, %D patches, extensions and new features. There can be local overloads in cont-loc diff --git a/Master/texmf-dist/tex/context/base/mkiv/cont-run.mkiv b/Master/texmf-dist/tex/context/base/mkiv/cont-run.mkiv index 12c12e0d93a..764866a9e3f 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/cont-run.mkiv +++ b/Master/texmf-dist/tex/context/base/mkiv/cont-run.mkiv @@ -53,7 +53,9 @@ \unexpanded\def\blocksynctexfile[#1]% {\processcommacommand{#1}\synctexblockfilename} -\def\continuewhenlmtxmode +\let\continuewhenmkivmode\relax + +\unexpanded\def\continuewhenlmtxmode {\starttext \startTEXpage[\c!offset=2ex,\c!foregroundstyle=\tttf]% This file needs \LuaMetaTeX\ and \ConTeXt\ \LMTX.% diff --git a/Master/texmf-dist/tex/context/base/mkiv/context-error.lmx b/Master/texmf-dist/tex/context/base/mkiv/context-error.lmx index d1a758b050a..60579f4a0a6 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/context-error.lmx +++ b/Master/texmf-dist/tex/context/base/mkiv/context-error.lmx @@ -51,9 +51,7 @@ </div></div> <div id="bottom"><div id="bottom-one"><div id="bottom-two"> Job Name: <?lua p(environment.jobname) ?> - ConTeXt Version: <?lua p(environment.version) ?> - Real Page: <?lua p(tracers.cs('c:realpageno')) ?> - Page: <?lua p(tracers.cs('c:pageno')) ?> + ConTeXt Version: <?lua p(environment.version) ?> </div></div></div> </body> </html> diff --git a/Master/texmf-dist/tex/context/base/mkiv/context-todo.tex b/Master/texmf-dist/tex/context/base/mkiv/context-todo.tex index 6aa5bca08a8..e9345c4098c 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/context-todo.tex +++ b/Master/texmf-dist/tex/context/base/mkiv/context-todo.tex @@ -169,6 +169,11 @@ concern \LUATEX\ have been removed from the agenda but some improvements in \stopitem \stopitemize +% should be in lpdf namespace: +% +% ./grph-pat.lua 69: local l = new_literal(lpdf.patternstream(p,width,height)) + + \stopsubject \stoptext diff --git a/Master/texmf-dist/tex/context/base/mkiv/context.mkiv b/Master/texmf-dist/tex/context/base/mkiv/context.mkiv index 49eb150497e..7a7e2e8d5c3 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/context.mkiv +++ b/Master/texmf-dist/tex/context/base/mkiv/context.mkiv @@ -11,6 +11,10 @@ %C therefore copyrighted by \PRAGMA. See mreadme.pdf for %C details. +%D There is some residual code in \MKIV\ that results from the transition to \LMTX\ +%D but removeing it can have side effects due to oversights. There is no impact on +%D performance to I leave at that. + % Here is some timing (2015-04-01) luajittex format generation: % % 2.6 sec : normal make @@ -45,7 +49,7 @@ %D {YYYY.MM.DD HH:MM} format. \edef\contextformat {\jobname} -\edef\contextversion{2021.03.05 19:11} +\edef\contextversion{2023.02.23 21:26} %D Kind of special: diff --git a/Master/texmf-dist/tex/context/base/mkiv/core-con.lua b/Master/texmf-dist/tex/context/base/mkiv/core-con.lua index 4bf1424bc02..f57eb6ef890 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/core-con.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/core-con.lua @@ -17,7 +17,7 @@ slower but look nicer this way.</p> --ldx]]-- local floor = math.floor -local osdate, ostime = os.date, os.time +local osdate, ostime, ostimezone = os.date, os.time, os.timezone local concat, insert, reverse = table.concat, table.insert, table.reverse local lower, upper, rep, match, gsub = string.lower, string.upper, string.rep, string.match, string.gsub local utfchar, utfbyte = utf.char, utf.byte @@ -127,7 +127,8 @@ local counters = allocate { 0xE050, 0xE051, 0xE052, 0xE053, 0xE054, 0xE055, 0xE056, 0xE057, 0xE058, 0xE059 }, - ['devangari'] = { + ['devanagari'] = { + -- ० १ २ ३ ४ ५ ६ ७ ८ ९ 0x0966, 0x0967, 0x0968, 0x0969, 0x096A, 0x096B, 0x096C, 0x096D, 0x096E, 0x096F }, @@ -197,7 +198,39 @@ local decimals = allocate { ['persian'] = { ["0"] = "۰", ["1"] = "۱", ["2"] = "۲", ["3"] = "۳", ["4"] = "۴", ["5"] = "۵", ["6"] = "۶", ["7"] = "۷", ["8"] = "۸", ["9"] = "۹", - } + }, + ['devanagari'] = { + ["0"] = "०", ["1"] = "१", ["2"] = "२", ["3"] = "३", ["4"] = "४", + ["5"] = "५", ["6"] = "६", ["7"] = "७", ["8"] = "८", ["9"] = "९", + }, + ['malayalam'] = { + ["0"] = "൦", ["1"] = "൧", ["2"] = "൨", ["3"] = "൩", ["4"] = "൪", + ["5"] = "൫", ["6"] = "൬", ["7"] = "൭", ["8"] = "൮", ["9"] = "൯", + }, + ['tamil'] = { + ["0"] = "௦", ["1"] = "௧", ["2"] = "௨", ["3"] = "௩", ["4"] = "௪", + ["5"] = "௫", ["6"] = "௬", ["7"] = "௭", ["8"] = "௮", ["9"] = "௯", + }, + ['kannada'] = { + ["0"] = "೦", ["1"] = "೧", ["2"] = "೨", ["3"] = "೩", ["4"] = "೪", + ["5"] = "೫", ["6"] = "೬", ["7"] = "೭", ["8"] = "೮", ["9"] = "೯", + }, + ['telugu'] = { + ["0"] = "౦", ["1"] = "౧", ["2"] = "౨", ["3"] = "౩", ["4"] = "౪", + ["5"] = "౫", ["6"] = "౬", ["7"] = "౭", ["8"] = "౮", ["9"] = "౯", + }, + ['bengali'] = { + ["0"] = "০", ["1"] = "১", ["2"] = "২", ["3"] = "৩", ["4"] = "৪", + ["5"] = "৫", ["6"] = "৬", ["7"] = "৭", ["8"] = "৮", ["9"] = "৯", + }, + ['gujarati'] = { + ["0"] = "૦", ["1"] = "૧", ["2"] = "૨", ["3"] = "૩", ["4"] = "૪", + ["5"] = "૫", ["6"] = "૬", ["7"] = "૭", ["8"] = "૮", ["9"] = "૯", + }, + ['gurmurkhi'] = { + ["0"] = "੦", ["1"] = "੧", ["2"] = "੨", ["3"] = "੩", ["4"] = "੪", + ["5"] = "੫", ["6"] = "੬", ["7"] = "੭", ["8"] = "੮", ["9"] = "੯", + }, } languages.decimals = decimals @@ -1152,6 +1185,8 @@ local ordinals = { french = function(n) if n == 1 then return "er" + else + return "e" end end, } @@ -1415,6 +1450,111 @@ data.es = data.spanish -- print(translate(101)) -- print(translate(199)) +-- verbose swedish by Peter Kvillegard + +do + + local words = { + [0] = "noll", + [1] = "ett", + [2] = "två", + [3] = "tre", + [4] = "fyra", + [5] = "fem", + [6] = "sex", + [7] = "sju", + [8] = "åtta", + [9] = "nio", + [10] = "tio", + [11] = "elva", + [12] = "tolv", + [13] = "tretton", + [14] = "fjorton", + [15] = "femton", + [16] = "sexton", + [17] = "sjutton", + [18] = "arton", + [19] = "nitton", + [20] = "tjugo", + [30] = "trettio", + [40] = "fyrtio", + [50] = "femtio", + [60] = "sextio", + [70] = "sjuttio", + [80] = "åttio", + [90] = "nittio", + [100] = "hundra", + [10^3] = "tusen", + [10^6] = "miljon", + [10^9] = "miljard", + [10^12] = "biljon", + [10^15] = "biljard", + } + + local function translate(n,connector) + local w = words[n] + if w then + return w + else + local t = { } + local l = 0 + -- group of three digits to words, e.g. 123 -> etthundratjugotre + local function triplets(n) + if floor(n/100) > 0 then + l = l + 1 ; t[l] = words[floor(n/100)] + l = l + 1 ; t[l] = words[100] + end + if n%100 > 20 then + l = l + 1 ; t[l] = words[n%100-n%10] + if n%10 > 0 then + l = l + 1 ; t[l] = words[n%10] + end + elseif n%100 > 0 then + l = l + 1 ; t[l] = words[n%100] + end + end + -- loops through 10^15,10^12,...10^3, extracting groups of three digits + -- to make words from, then adding names for order of magnitude + for i=15,3,-3 do + local triplet = floor(n/10^i)%10^3 + if triplet > 0 then + -- grammar: "en" instead of "ett" + if i > 3 and triplet == 1 then + l = l + 1 ; t[l] = "en" + else + triplets(triplet) + end + -- grammar: plural form of "millions" etc + l = l + 1 ; t[l] = words[10^i] + if i > 3 and triplet > 1 then + l = l + 1 ; t[l] = "er" + end + end + end + -- add last group of three numbers (no word for magnitude) + n = n%1000 + if n > 0 then + triplets(n) + end + t = concat(t," ") + -- grammar: spacing for numbers < 10^6 and repeated letters + if n < 10^6 then + t = gsub(t,"%stusen%s","tusen") + t = gsub(t,"etttusen","ettusen") + end + return t + end + end + + data.swedish = { + words = words, + translate = translate, + } + + data.sv = data.swedish + +end + -- verbose handler: function converters.verbose.translate(n,language,connector) @@ -1864,14 +2004,37 @@ implement { actions = { formatters["U+%05X"], context }, } -local n = R("09")^1 / tonumber +-- totime might move to utilities.parsers as more general helper + +local n = R("09")^1 / tonumber -- lpegpatterns.digit local p = Cf( Ct("") - * Cg(Cc("year") * (n )) * P("-")^-1 - * Cg(Cc("month") * (n + Cc( 1))) * P("-")^-1 - * Cg(Cc("day") * (n + Cc( 1))) * whitespace^-1 - * Cg(Cc("hour") * (n + Cc( 0))) * P(":")^-1 - * Cg(Cc("min") * (n + Cc( 0))) + -- year is mandate, month and day are optional + * Cg(Cc("year") * n) + * S("-/")^-1 + * Cg(Cc("month") * (n + Cc(1))) + * S("-/")^-1 + * Cg(Cc("day") * (n + Cc(1))) + -- time is optional, hour and minuta are mandate, seconds are optional + * ( + whitespace^0 + * P("T")^-1 + * whitespace^0 + * Cg(Cc("hour") * n) + * P(":")^-1 + * Cg(Cc("min") * n) + * P(":")^-1 + * Cg(Cc("sec") * (n + Cc(0))) + )^-1 + -- zone is optional, hour is mandate, minutes are optional + * ( + whitespace^0 + * Cg(Cc("tzs") * (P("+") * Cc(1) + P("-") * Cc(-1) + Cc(1))) + * whitespace^0 + * Cg(Cc("tzh") * n) + * P(":")^-1 + * Cg(Cc("tzm") * (n + Cc(0))) + )^-1 , rawset) function converters.totime(s) @@ -1880,11 +2043,19 @@ function converters.totime(s) elseif type(s) == "table" then return s elseif type(s) == "string" then - return lpegmatch(p,s) + local t = lpegmatch(p,s) + if not t then + logs.report("system","invalid time specification %a",s) + elseif t.tzh then + local localtzh, localtzm = ostimezone(true) + t.hour = t.hour + localtzh - t.tzs * t.tzh + t.min = t.min + localtzm - t.tzs * t.tzm + end + return t end local n = tonumber(s) if n and n >= 0 then - return date("*t",n) + return osdate("*t",n) end end @@ -2043,3 +2214,9 @@ local function field(n) return context(osdate("*t")[n]) end implement { name = "actualday", public = true, actions = function() field("day") end } implement { name = "actualmonth", public = true, actions = function() field("month") end } implement { name = "actualyear", public = true, actions = function() field("year") end } + +implement { + name = "uuid", + public = true, + actions = { os.uuid, context }, +} diff --git a/Master/texmf-dist/tex/context/base/mkiv/core-dat.lua b/Master/texmf-dist/tex/context/base/mkiv/core-dat.lua index b497501598b..b58a801d964 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/core-dat.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/core-dat.lua @@ -156,8 +156,29 @@ local function setdataset(settings) end end -local function datasetvariable(name,tag,key) - local t = collected[name] +local cache = table.setmetatableindex(function(t,k) + local v = table.load(k..".tuc") + if v then + v = v.job + if v then + v = v.datasets + if v then + v = v.collected + end + end + end + if not v then + v = { } + if trace_datasets then + report_dataset("error: unknown dataset job %a",k) + end + end + t[k] = v + return v +end) + +local function datasetvariable(name,tag,key,cache) + local t = (cache or collected)[name] if t == nil then if trace_datasets then report_dataset("error: unknown dataset, name %a, tag %a, not passed to tex",name) -- no tag @@ -181,6 +202,10 @@ local function datasetvariable(name,tag,key) end end +local function datasetvariablefromjob(jobnname,name,tag,key) + datasetvariable(name,tag,key,cache[jobnname]) +end + implement { name = "setdataset", actions = setdataset, @@ -200,6 +225,12 @@ implement { arguments = "3 strings", } +implement { + name = "datasetvariablefromjob", + arguments = { "string", "string", "string", "string" }, + actions = datasetvariablefromjob +} + --[[ldx-- <p>We also provide an efficient variant for page states.</p> --ldx]]-- diff --git a/Master/texmf-dist/tex/context/base/mkiv/data-bin.lua b/Master/texmf-dist/tex/context/base/mkiv/data-bin.lua index 2bac901ea47..f455f7d9a9b 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/data-bin.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/data-bin.lua @@ -8,7 +8,8 @@ if not modules then modules = { } end modules ['data-bin'] = { local resolvers = resolvers local methodhandler = resolvers.methodhandler -local notfound = resolvers.loaders.notfound + +local notfound = resolvers.loaders.notfound function resolvers.findbinfile(filename,filetype) return methodhandler('finders',filename,filetype) @@ -28,3 +29,14 @@ function resolvers.loadbinfile(filename,filetype) return notfound() end end + +local notfound = resolvers.cleaners.notfound + +function resolvers.cleanupbinfile(filename) + local fname = methodhandler('finders',filename) + if fname and fname ~= "" then + return methodhandler('cleaners',fname) + else + return notfound() + end +end diff --git a/Master/texmf-dist/tex/context/base/mkiv/data-con.lua b/Master/texmf-dist/tex/context/base/mkiv/data-con.lua index ec2251b3534..51e0ce85614 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/data-con.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/data-con.lua @@ -56,7 +56,7 @@ local mt = { __storage__ = true } -function containers.define(category, subcategory, version, enabled) +function containers.define(category, subcategory, version, enabled, reload) if category and subcategory then local c = allocated[category] if not c then @@ -70,6 +70,7 @@ function containers.define(category, subcategory, version, enabled) subcategory = subcategory, storage = { }, enabled = enabled, + reload = reload, version = version or math.pi, -- after all, this is TeX trace = false, -- writable = getwritablepath and getwritablepath (category,subcategory) or { "." }, @@ -97,7 +98,8 @@ end function containers.read(container,name) local storage = container.storage - local stored = storage[name] + local reload = container.reload + local stored = not reload and storage[name] if not stored and container.enabled and caches and containers.usecache then stored = loaddatafromcache(container.readables,name,container.writable) if stored and stored.cache_version == container.version then diff --git a/Master/texmf-dist/tex/context/base/mkiv/data-dec.lua b/Master/texmf-dist/tex/context/base/mkiv/data-dec.lua new file mode 100644 index 00000000000..2a62b7dd91a --- /dev/null +++ b/Master/texmf-dist/tex/context/base/mkiv/data-dec.lua @@ -0,0 +1,56 @@ +if not modules then modules = { } end modules ['data-dec'] = { + version = 1.001, + comment = "companion to luat-lib.mkiv", + author = "Hans Hagen, PRAGMA-ADE, Hasselt NL", + copyright = "PRAGMA ADE / ConTeXt Development Team", + license = "see context related readme files" +} + +local loaddata = io.loaddata +local suffix = file.suffix +local resultof = os.resultof + +local decompressors = { } +resolvers.decompressors = decompressors + +local decompresslzma = nil +local decompressgzip = gzip.decompress + +local function decompressed(k) + local s = suffix(k) + if s == "xz" then + if decompresslzma == nil then + local lzma = require(resolvers.findfile("libs-imp-lzma.lmt")) + if lzma then + local decompress = lzma.decompress + decompresslzma = function(name) + return decompress(loaddata(k)) + end + else + decompresslzma = function(name) + -- todo: use a proper runner + return resultof("xz -d -c -q -q " .. name) + end + end + end + return decompresslzma(k) + elseif s == "gz" then + return decompressgzip(loaddata(k)) + end +end + +local cache = table.setmetatableindex(function(t,k) + local v = decompressed(k) or false + t[k] = v + return v +end) + +decompressors.decompress = decompress + +function decompressors.register(filename) + return cache[filename] +end + +function decompressors.unregister(filename) + cache[filename] = nil +end diff --git a/Master/texmf-dist/tex/context/base/mkiv/data-env.lua b/Master/texmf-dist/tex/context/base/mkiv/data-env.lua index 3b10d89b8b4..c9c11e49c04 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/data-env.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/data-env.lua @@ -95,8 +95,8 @@ local relations = allocate { -- todo: handlers also here names = { "mp" }, variable = 'MPINPUTS', suffixes = CONTEXTLMTXMODE > 0 - and { 'mp', 'mpxl', 'mpvi', 'mpiv', 'mpii' } - or { 'mp', 'mpvi', 'mpiv', 'mpii' }, + and { 'mpxl', 'mpvi', 'mpiv', 'mpii', 'mp' } + or { 'mpvi', 'mpiv', 'mpii', 'mp' }, usertype = true, }, tex = { diff --git a/Master/texmf-dist/tex/context/base/mkiv/data-inp.lua b/Master/texmf-dist/tex/context/base/mkiv/data-inp.lua index 97fb8904b91..569a66f4eb4 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/data-inp.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/data-inp.lua @@ -15,11 +15,14 @@ local registermethod = resolvers.registermethod local finders = allocate { helpers = { }, notfound = function() end } local openers = allocate { helpers = { }, notfound = function() end } local loaders = allocate { helpers = { }, notfound = function() return false, nil, 0 end } +local tracers = allocate { helpers = { }, notfound = function() end } registermethod("finders", finders, "uri") registermethod("openers", openers, "uri") registermethod("loaders", loaders, "uri") +registermethod("tracers", tracers, "uri") resolvers.finders = finders resolvers.openers = openers resolvers.loaders = loaders +resolvers.tracers = tracers diff --git a/Master/texmf-dist/tex/context/base/mkiv/data-out.lua b/Master/texmf-dist/tex/context/base/mkiv/data-out.lua index 6cd02a22e2e..cc20f50b3f4 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/data-out.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/data-out.lua @@ -14,4 +14,8 @@ local registermethod = resolvers.registermethod local savers = allocate { helpers = { } } resolvers.savers = savers -registermethod("savers", savers, "uri") +local cleaners = allocate { helpers = { } } +resolvers.cleaners = cleaners + +registermethod("savers", savers, "uri") +registermethod("cleaners", cleaners, "uri") diff --git a/Master/texmf-dist/tex/context/base/mkiv/data-pre.lua b/Master/texmf-dist/tex/context/base/mkiv/data-pre.lua index f7df8b91870..cab297d1920 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/data-pre.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/data-pre.lua @@ -25,6 +25,8 @@ if not modules then modules = { } end modules ['data-pre'] = { -- version : operating system version -- release : operating system release + +local ipairs = ipairs local insert, remove = table.insert, table.remove local resolvers = resolvers @@ -40,6 +42,7 @@ local dirname = file.dirname local joinpath = file.join local isfile = lfs.isfile +local isdir = lfs.isdir prefixes.environment = function(str) return cleanpath(expansion(str)) @@ -92,6 +95,8 @@ prefixes.pathname = function(str) return cleanpath(dirname((fullname ~= "" and fullname) or str)) end +-- we can actually freeze these + prefixes.selfautoloc = function(str) local pth = getenv('SELFAUTOLOC') return cleanpath(str and joinpath(pth,str) or pth) @@ -112,6 +117,34 @@ prefixes.home = function(str) return cleanpath(str and joinpath(pth,str) or pth) end +do + local tmppth + + prefixes.temp = function(str) + if not tmppth then + for _, s in ipairs { "TMP", "TEMP", "TMPDIR", "TEMPDIR" } do + tmppth = getenv(s) + if tmppth ~= "" and isdir(tmppth) then + break + end + end + if not tmppth or tmppth == "" then + tmppth = "." + end + end + return cleanpath(str and joinpath(tmppth,str) or tmppth) + end + + prefixes.texruns = function(str) + local pth = getenv('TEXRUNS') + if pth == "" then + pth = tmppth + end + return cleanpath(str and joinpath(pth,str) or pth) + end + +end + prefixes.env = prefixes.environment prefixes.rel = prefixes.relative prefixes.loc = prefixes.locate diff --git a/Master/texmf-dist/tex/context/base/mkiv/data-tar.lua b/Master/texmf-dist/tex/context/base/mkiv/data-tar.lua new file mode 100644 index 00000000000..45de749b663 --- /dev/null +++ b/Master/texmf-dist/tex/context/base/mkiv/data-tar.lua @@ -0,0 +1,236 @@ +if not modules then modules = { } end modules ['data-tar'] = { + version = 1.001, + comment = "companion to luat-lib.mkiv", + author = "Hans Hagen, PRAGMA-ADE, Hasselt NL", + copyright = "PRAGMA ADE / ConTeXt Development Team", + license = "see context related readme files" +} + +local format, find, match = string.format, string.find, string.match + +local trace_locating = false trackers.register("resolvers.locating", function(v) trace_locating = v end) + +local report_tar = logs.reporter("resolvers","tar") + +--[[ldx-- +<p>We use a url syntax for accessing the tar file itself and file in it:</p> + +<typing> +tar:///oeps.tar?name=bla/bla.tex +tar:///oeps.tar?tree=tex/texmf-local +</typing> +--ldx]]-- + +local resolvers = resolvers +local findfile = resolvers.findfile +local registerfile = resolvers.registerfile +local splitmethod = resolvers.splitmethod +local starttiming = resolvers.starttiming +local stoptiming = resolvers.stoptiming + +local urlquery = url.query + +--- hm, zip sits in the global namespace, but tar doesn't + +local tar = utilities.tar or { } +utilities.tar = tar -- not needed + +local archives = tar.archives or { } +tar.archives = archives + +local registeredfiles = tar.registeredfiles or { } +tar.registeredfiles = registeredfiles + +-- foo.tar.xz : done +-- foo.tar.gz : todo +-- foo.tar : done + +local hashtar, fetchtar, wipetar do + + local suffix = file.suffix -- hassuffix .. no need to split + + local tarfiles = utilities.tar.file + local tarstrings = utilities.tar.string + + local hashtarfile = tar.files.hash + local fetchtarfile = tar.files.fetch + + local hashtarstring = tar.strings.hash + local fetchtarstring = tar.strings.fetch + + local register = resolvers.decompressors.register + + hashtar = function(archive,strip) + local a = register(archive) + if a then + return hashtarstring(a,archive) + else + return hashtarfile(archive,archive) + end + end + + fetchtar = function(archive,filename,list) + local a = register(archive) + if a then + return fetchtarstring(a,filename,list) + else + return fetchtarfile(archive,filename,list) + end + end + + wipetar = resolvers.decompressors.unregister + +end + +local function validfile(archive,name) + return archive[name] +end + +local function openarchive(name) + if not name or name == "" then + return nil + else + local arch = archives[name] + if not arch then + local full = findfile(name) or "" + arch = full ~= "" and hashtar(full,name) or false + archives[name] = arch + end + return arch + end +end + +local function closearchive(name) + if not name or (name == "" and archives[name]) then + archives[name] = nil + wipetar(name) + end +end + +tar.openarchive = openarchive +tar.closearchive = closearchive + +function resolvers.locators.tar(specification) + local archive = specification.filename + local tarfile = archive and archive ~= "" and openarchive(archive) + if trace_locating then + if tarfile then + report_tar("locator: archive %a found",archive) + else + report_tar("locator: archive %a not found",archive) + end + end +end + +function resolvers.concatinators.tar(tarfile,path,name) -- ok ? + if not path or path == "" then + return format('%s?name=%s',tarfile,name) + else + return format('%s?name=%s/%s',tarfile,path,name) + end +end + +local finders = resolvers.finders +local notfound = finders.notfound + +function finders.tar(specification) + local original = specification.original + local archive = specification.filename + if archive then + local query = urlquery(specification.query) + local queryname = query.name + if queryname then + local tfile = openarchive(archive) + if tfile then + if trace_locating then + report_tar("finder: archive %a found",archive) + end + if validfile(tfile,queryname) then + if trace_locating then + report_tar("finder: file %a found",queryname) + end + return specification.original + elseif trace_locating then + report_tar("finder: file %a not found",queryname) + end + elseif trace_locating then + report_tar("finder: unknown archive %a",archive) + end + end + end + if trace_locating then + report_tar("finder: %a not found",original) + end + return notfound() +end + +local openers = resolvers.openers +local notfound = openers.notfound +local textopener = openers.helpers.textopener + +function openers.tar(specification) + local original = specification.original + local archive = specification.filename + if archive then + local query = urlquery(specification.query) + local queryname = query.name + if queryname then + local tfile = openarchive(archive) + if tfile then + if trace_locating then + report_tar("opener; archive %a opened",archive) + end + local data = fetchtar(archive,queryname,tfile) + if data then + if trace_locating then + report_tar("opener: file %a found",queryname) + end + return textopener('tar',original,data) -- a string handle + elseif trace_locating then + report_tar("opener: file %a not found",queryname) + end + elseif trace_locating then + report_tar("opener: unknown archive %a",archive) + end + end + end + if trace_locating then + report_tar("opener: %a not found",original) + end + return notfound() +end + +loaders = resolvers.loaders +local notfound = loaders.notfound + +function loaders.tar(specification) + local original = specification.original + local archive = specification.filename + if archive then + local query = urlquery(specification.query) + local queryname = query.name + if queryname then + local tfile = openarchive(archive) + if tfile then + if trace_locating then + report_tar("loader: archive %a opened",archive) + end + local data = fetchtar(archive,queryname,tfile) + if data then + if trace_locating then + report_tar("loader; file %a loaded",original) + end + return true, data, #data + elseif trace_locating then + report_tar("loader: file %a not found",queryname) + end + elseif trace_locating then + report_tar("loader; unknown archive %a",archive) + end + end + end + if trace_locating then + report_tar("loader: %a not found",original) + end + return notfound() +end diff --git a/Master/texmf-dist/tex/context/base/mkiv/data-tex.lua b/Master/texmf-dist/tex/context/base/mkiv/data-tex.lua index 2c1a7dbd5d1..42547b00b2f 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/data-tex.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/data-tex.lua @@ -175,9 +175,10 @@ local function textopener(tag,filename,filehandle,coding) currentline = currentline + 1 -- self.currentline = currentline local content = lines[currentline] --- lines[currentline] = nil + -- lines[currentline] = false if content == "" then - return "" + -- return "" + return content -- elseif content == ctrl_d or ctrl_z then -- return nil -- we need this as \endinput does not work in prints elseif content then diff --git a/Master/texmf-dist/tex/context/base/mkiv/data-tmp.lua b/Master/texmf-dist/tex/context/base/mkiv/data-tmp.lua index 9a8a586cda4..1948f1ea596 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/data-tmp.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/data-tmp.lua @@ -74,7 +74,7 @@ local usedreadables = { } local compilelua = luautilities.compile local luasuffixes = luautilities.suffixes -caches.base = caches.base or "luatex-cache" -- can be local +caches.base = caches.base or (LUATEXENGINE and LUATEXENGINE .. "-cache") or "luatex-cache" -- can be local caches.more = caches.more or "context" -- can be local caches.defaults = { "TMPDIR", "TEMPDIR", "TMP", "TEMP", "HOME", "HOMEPATH" } diff --git a/Master/texmf-dist/tex/context/base/mkiv/data-use.lua b/Master/texmf-dist/tex/context/base/mkiv/data-use.lua index a7ca2389e99..168b62201ee 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/data-use.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/data-use.lua @@ -82,14 +82,14 @@ function statistics.savefmtstatus(texname,formatbanner,sourcefile,banner) -- tex functionality = LUATEXFUNCTIONALITY, } io.savedata(luvname,table.serialize(luvdata,true)) - lua.registerfinalizer(function() + lua.registerinitexfinalizer(function() if jit then logs.report("format banner","%s lua: %s jit",banner,LUAVERSION) else logs.report("format banner","%s lua: %s",banner,LUAVERSION) end logs.newline() - end) + end, "show banner") end end diff --git a/Master/texmf-dist/tex/context/base/mkiv/data-vir.lua b/Master/texmf-dist/tex/context/base/mkiv/data-vir.lua index 4b19ee53720..b78211fc9a7 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/data-vir.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/data-vir.lua @@ -17,6 +17,7 @@ trackers.register("resolvers.virtual", function(v) trace_virtual = v end) local resolvers = resolvers local savers = resolvers.savers +local cleaners = resolvers.cleaners local data = { } local n = 0 -- hm, number can be query @@ -37,6 +38,10 @@ function savers.virtual(specification,content,suffix) return filename end +function cleaners.virtual(filename) + data[filename] = nil +end + local finders = resolvers.finders local notfound = finders.notfound diff --git a/Master/texmf-dist/tex/context/base/mkiv/data-zip.lua b/Master/texmf-dist/tex/context/base/mkiv/data-zip.lua index 8d914b842de..1a9310f17fe 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/data-zip.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/data-zip.lua @@ -70,10 +70,10 @@ if zipfiles then local readstring = streams.readstring local streamsize = streams.size - local metatable = { + local metatable = { -- irrelevant as the streams proivide the methods .. a leftover? close = streams.close, read = function(stream,n) - readstring(stream,n == "*a" and streamsize(stream) or n) + readstring(stream,n == "*a" and streamsize(stream) or n) -- no return ? end } diff --git a/Master/texmf-dist/tex/context/base/mkiv/export-example.css b/Master/texmf-dist/tex/context/base/mkiv/export-example.css index 7cfd7f291fc..45af82c34b4 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/export-example.css +++ b/Master/texmf-dist/tex/context/base/mkiv/export-example.css @@ -19,14 +19,14 @@ \definefloat[myfloata] \definefloat[myfloatb][myfloatbs][figure] - context|div.float.myfloata { } float[detail='myfloata'] { } - context|div.float.myfloatb { } float[detail='myfloatb'] { } - context|div.float.figure { } float[detail='figure'] { } - context|div.float.figure.myfloatb { } float[chain~='figure'][detail='myfloata'] { } - context|div.myfloata { } *[detail='myfloata'] { } - context|div.myfloatb { } *[detail='myfloatb'] { } - context|div.figure { } *[chain~='figure'] { } - context|div.figure.myfloatb { } *[chain~='figure'][detail='myfloatb'] { } + div.float.myfloata { } float[detail='myfloata'] { } + div.float.myfloatb { } float[detail='myfloatb'] { } + div.float.figure { } float[detail='figure'] { } + div.float.figure.myfloatb { } float[chain~='figure'][detail='myfloata'] { } + div.myfloata { } *[detail='myfloata'] { } + div.myfloatb { } *[detail='myfloatb'] { } + div.figure { } *[chain~='figure'] { } + div.figure.myfloatb { } *[chain~='figure'][detail='myfloatb'] { } Inheritance when using div seems to be stronger so we need to take more precautions. @@ -39,34 +39,34 @@ /* extradata: display */ ignore, -context|div.ignore { +div.ignore { display : none ; } ignore, -context|div.private { +div.private { display : none ; } xmetadata, -context|div.xmetadata { +div.xmetadata { display : none ; } xmetavariable, -context|div.xmetavariable { +div.xmetavariable { display : none ; } extradata, -context|div.extradata { +div.extradata { display : none ; } /* document : display */ document:before, -context|div.document:before { +div.document:before { content : attr(title) ; font-size : 44pt ; font-weight : bold ; @@ -74,7 +74,7 @@ context|div.document:before { } document, -context|div.document { +div.document { font-family : "DejaVu Serif", "Lucida Bright", serif ; font-size : 12pt ; /* line-height : 14.4pt; */ @@ -88,26 +88,26 @@ context|div.document { } document>metadata, -context|div.document context|div.metadata { +div.document div.metadata { font-family : "DejaVu Sans Mono", "Lucida Console", monospace ; margin-bottom : 3ex ; } /* document>metadata>metavariable[name="X"]:before, - context|div.document context|div.metadata context|div.metavariable.metaname-X:before { + div.document div.metadata div.metavariable.metaname-X:before { content : "X\00A0\00A0\00A0:\00A0" ; } */ document>metadata, -context|div.document context|div.metadata { +div.document div.metadata { display : flex ; flex-flow : column ; } document>metadata>metavariable:before, -context|div.document context|div.metadata context|div.metavariable:before { +div.document div.metadata div.metavariable:before { display : inline ; content : attr(label); width : 8em ; @@ -116,7 +116,7 @@ context|div.document context|div.metadata context|div.metavariable:before { } document>metadata>metavariable[name="title"], -context|div.document context|div.metadata context|div.metavariable.metaname-title { +div.document div.metadata div.metavariable.metaname-title { order : -1 ; display : block ; width : 50em ; @@ -129,7 +129,7 @@ context|div.document context|div.metadata context|div.metavariable.metaname-titl } document>metadata>metavariable[name="title"]:before, -context|div.document context|div.metadata context|div.metavariable.metaname-title:before { +div.document div.metadata div.metavariable.metaname-title:before { content : none ; } @@ -138,8 +138,8 @@ context|div.document context|div.metadata context|div.metavariable.metaname-titl paragraph, p, -context|div.paragraph, -context|div.p { +div.paragraph, +div.p { display : block ; margin-top : 0.5em ; margin-bottom : 0.5em ; @@ -148,7 +148,7 @@ context|div.p { /* break : display */ break, -context|div.break { +div.break { display : block ; margin-bottom : 0.5em ; } @@ -157,16 +157,16 @@ context|div.break { /* highlight : inline */ construct, -context|div.construct { +div.construct { } construct[detail="important"], -context|div.construct.important { +div.construct.important { font-weight : bold ; } highlight, -context|div.highlight { /* todo: style and color */ +div.highlight { /* todo: style and color */ display : inline ; } @@ -176,12 +176,12 @@ context|div.highlight { /* todo: style and color */ /* sectioncontent : display */ section, -context|div.section { +div.section { display : block ; } sectioncaption, -context|div.sectioncaption { +div.sectioncaption { display : block ; text-align : left ; page-break-after : avoid ; @@ -190,18 +190,18 @@ context|div.sectioncaption { } sectioncontent, -context|div.sectioncontent { +div.sectioncontent { display : block ; } sectionnumber, -context|div.sectionnumber { +div.sectionnumber { display : inline ; margin-right : 1em ; } sectionnumber, -context|div.sectiontitle { +div.sectiontitle { display : inline ; } @@ -211,29 +211,29 @@ context|div.sectiontitle { section[detail="chapter"]>sectioncaption, section[detail="title"]>sectioncaption, -context|div.level-2.chapter context|div.sectioncaption , -context|div.level-2.title context|div.sectioncaption { +div.level-2.chapter div.sectioncaption , +div.level-2.title div.sectioncaption { font-size : 2em ; font-weight : bold ; } section[detail="chapter"], section[detail="title"], -context|div.level-2.chapter, -context|div.level-2.title { +div.level-2.chapter, +div.level-2.title { page-break-before : always ; margin-top : 4ex ; } section[detail="chapter"]>sectioncaption>sectionnumber, -context|div.level-2.chapter context|div.sectioncaption context|div.sectionnumber { +div.level-2.chapter div.sectioncaption div.sectionnumber { /* nothing */ } section[detail="chapter"]>sectioncaption>sectiontitle, section[detail="title"]>sectioncaption>sectiontitle, -context|div.level-2.chapter context|div.sectioncaption context|div.sectiontitle, -context|div.level-2.title context|div.sectioncaption context|div.sectiontitle { +div.level-2.chapter div.sectioncaption div.sectiontitle, +div.level-2.title div.sectioncaption div.sectiontitle { /* nothing */ } @@ -241,28 +241,28 @@ context|div.level-2.title context|div.sectioncaption context|div.sectiontitle { section[detail="section"]>sectioncaption, section[detail="subject"]>sectioncaption, -context|div.level-3.section context|div.sectioncaption, -context|div.level-3.subject context|div.sectioncaption { +div.level-3.section div.sectioncaption, +div.level-3.subject div.sectioncaption { font-size : 1.75em ; font-weight : bold ; } section[detail="section"], section[detail="subject"], -context|div.level-3.section, -context|div.level-3.subject { +div.level-3.section, +div.level-3.subject { /* nothing */ } section[detail="section"]>sectioncaption>sectionnumber, -context|div.level-3.section context|div.sectioncaption context|div.sectionnumber { +div.level-3.section div.sectioncaption div.sectionnumber { /* nothing */ } section[detail="section"]>sectioncaption>sectiontitle, section[detail="subject"]>sectioncaption>sectiontitle, -context|div.level-3.section context|div.sectioncaption context|div.sectiontitle, -context|div.level-3.subject context|div.sectioncaption context|div.sectiontitle { +div.level-3.section div.sectioncaption div.sectiontitle, +div.level-3.subject div.sectioncaption div.sectiontitle { /* nothing */ } @@ -270,28 +270,28 @@ context|div.level-3.subject context|div.sectioncaption context|div.sectiontitle section[detail="subsection"]>sectioncaption, section[detail="subsubject"]>sectioncaption, -context|div.level-4.subsection context|div.sectioncaption, -context|div.level-4.subsubject context|div.sectioncaption { +div.level-4.subsection div.sectioncaption, +div.level-4.subsubject div.sectioncaption { font-size : 1.5em ; font-weight : bold ; } section[detail="subsection"], section[detail="subsubject"], -context|div.level-4.subsection, -context|div.level-4.subsubject { +div.level-4.subsection, +div.level-4.subsubject { /* nothing */ } section[detail="subsection"]>sectioncaption>sectionnumber, -context|div.level-4.subsection context|div.sectioncaption context|div.sectionnumber { +div.level-4.subsection div.sectioncaption div.sectionnumber { /* nothing */ } section[detail="subsection"]>sectioncaption>sectiontitle, section[detail="subsubject"]>sectioncaption>sectiontitle, -context|div.level-4.subsection context|div.sectioncaption context|div.sectiontitle, -context|div.level-4.subsubject context|div.sectioncaption context|div.sectiontitle { +div.level-4.subsection div.sectioncaption div.sectiontitle, +div.level-4.subsubject div.sectioncaption div.sectiontitle { /* nothing */ } @@ -299,28 +299,28 @@ context|div.level-4.subsubject context|div.sectioncaption context|div.sectiontit section[detail="subsubsection"]>sectioncaption, section[detail="subsubsubject"]>sectioncaption, -context|div.level-5.subsubsection context|div.sectioncaption, -context|div.level-5.subsubsubject context|div.sectioncaption { +div.level-5.subsubsection div.sectioncaption, +div.level-5.subsubsubject div.sectioncaption { font-size : 1.25em ; font-weight : bold ; } section[detail="subsubsection"], section[detail="subsubsubject"], -context|div.level-5.subsubsection, -context|div.level-5.subsubsubject { +div.level-5.subsubsection, +div.level-5.subsubsubject { /* nothing */ } section[detail="subsubsection"]>sectioncaption>sectionnumber, -context|div.level-5.subsubsection context|div.sectioncaption context|div.sectionnumber { +div.level-5.subsubsection div.sectioncaption div.sectionnumber { /* nothing */ } section[detail="subsubsection"]>sectioncaption>sectiontitle, section[detail="subsubsubject"]>sectioncaption>sectiontitle, -context|div.level-5.subsubsection context|div.sectioncaption context|div.sectiontitle, -context|div.level-5.subsubsubject context|div.sectioncaption context|div.sectiontitle { +div.level-5.subsubsection div.sectioncaption div.sectiontitle, +div.level-5.subsubsubject div.sectioncaption div.sectiontitle { /* nothing */ } @@ -328,14 +328,14 @@ context|div.level-5.subsubsubject context|div.sectioncaption context|div.section section[detail="summary"], section[detail="subsummary"], -context|div.section.summary, -context|div.section.subsummary { +div.section.summary, +div.section.subsummary { margin-top : 1em ; margin-bottom : 1em ; } section[detail="summary"]>sectioncaption>sectiontitle, -context|div.section.summary context|div.sectioncaption context|div.sectiontitle { +div.section.summary div.sectioncaption div.sectiontitle { display : block ; margin-top : 1em ; margin-bottom : 1em ; @@ -347,7 +347,7 @@ context|div.section.summary context|div.sectioncaption context|div.sectiontitle } section[detail="subsummary"]>sectioncaption>sectiontitle, -context|div.section.subsummary context|div.sectioncaption context|div.sectiontitle { +div.section.subsummary div.sectioncaption div.sectiontitle { display : block ; margin-top : 1em ; margin-bottom : 1em ; @@ -377,27 +377,27 @@ context|div.section.subsummary context|div.sectioncaption context|div.sectiontit } itemgroup, -context|div.itemgroup { +div.itemgroup { display : block ; margin-bottom : 0.5em ; margin-top : 0.5em ; } -itemgroup[symbol="1"], context|div.itemgroup.symbol-1 { list-style-type : disc ; } -itemgroup[symbol="2"], context|div.itemgroup.symbol-2 { list-style-type : square ; } -itemgroup[symbol="3"], context|div.itemgroup.symbol-3 { list-style-type : square ; } -itemgroup[symbol="4"], context|div.itemgroup.symbol-4 { list-style-type : square ; } -itemgroup[symbol="5"], context|div.itemgroup.symbol-5 { list-style-type : circ ; } -itemgroup[symbol="a"], context|div.itemgroup.symbol-a { list-style-type : lower-alpha ; } -itemgroup[symbol="A"], context|div.itemgroup.symbol-A { list-style-type : alpha ; } -itemgroup[symbol="r"], context|div.itemgroup.symbol-r { list-style-type : lower-roman ; } -itemgroup[symbol="R"], context|div.itemgroup.symbol-R { list-style-type : upper-roman ; } -itemgroup[symbol="n"], context|div.itemgroup.symbol-n { list-style-type : decimal ; } -itemgroup[symbol="g"], context|div.itemgroup.symbol-g { list-style-type : lower-greek ; } -itemgroup[symbol="G"], context|div.itemgroup.symbol-G { list-style-type : upper-greek ; } +itemgroup[symbol="1"], div.itemgroup.symbol-1 { list-style-type : disc ; } +itemgroup[symbol="2"], div.itemgroup.symbol-2 { list-style-type : square ; } +itemgroup[symbol="3"], div.itemgroup.symbol-3 { list-style-type : square ; } +itemgroup[symbol="4"], div.itemgroup.symbol-4 { list-style-type : square ; } +itemgroup[symbol="5"], div.itemgroup.symbol-5 { list-style-type : circ ; } +itemgroup[symbol="a"], div.itemgroup.symbol-a { list-style-type : lower-alpha ; } +itemgroup[symbol="A"], div.itemgroup.symbol-A { list-style-type : alpha ; } +itemgroup[symbol="r"], div.itemgroup.symbol-r { list-style-type : lower-roman ; } +itemgroup[symbol="R"], div.itemgroup.symbol-R { list-style-type : upper-roman ; } +itemgroup[symbol="n"], div.itemgroup.symbol-n { list-style-type : decimal ; } +itemgroup[symbol="g"], div.itemgroup.symbol-g { list-style-type : lower-greek ; } +itemgroup[symbol="G"], div.itemgroup.symbol-G { list-style-type : upper-greek ; } item, -context|div.item { +div.item { display : list-item ; margin-left : 1em ; margin-bottom : 0.5em ; @@ -405,12 +405,12 @@ context|div.item { } itemtag, -context|div.itemtag { +div.itemtag { display: none ; } itemcontent, -context|div.itemcontent { +div.itemcontent { } /* description : display */ @@ -419,14 +419,14 @@ context|div.itemcontent { /* descriptionsymbol : inline */ description, -context|div.description { +div.description { display : block ; margin-bottom : 1em ; margin-top : 1em ; } descriptiontag, -context|div.descriptiontag { +div.descriptiontag { display : inline ; float : left ; clear : left ; @@ -436,11 +436,11 @@ context|div.descriptiontag { } descriptioncontent, -context|div.descriptioncontent { +div.descriptioncontent { } descriptionsymbol, -context|div.descriptionsymbol { +div.descriptionsymbol { display : inline ; } @@ -450,7 +450,7 @@ context|div.descriptionsymbol { /* verbatim : inline */ verbatimblock, -context|div.verbatimblock { +div.verbatimblock { background-color : rgb(50%,50%,100%) ; display : block ; padding : 1em ; @@ -460,19 +460,19 @@ context|div.verbatimblock { } verbatimlines+verbatimlines, -context|div.verbatimlines+context|div.verbatimlines { +div.verbatimlines+div.verbatimlines { display : block ; margin-top : 1em ; } verbatimline, -context|div.verbatimline { +div.verbatimline { display : block ; white-space : pre-wrap ; } verbatim, -context|div.verbatim { +div.verbatim { display : inline ; white-space : pre-wrap ; color : rgb(60%,60%,0%) ; @@ -484,26 +484,26 @@ context|div.verbatim { /* linenumber : inline */ lines, -context|div.lines { +div.lines { display : block ; margin-bottom : 1em ; margin-top : 1em ; } lines+lines, -context|div.lines+context|div.lines { +div.lines+div.lines { display : block ; margin-top : 1em ; } line, -context|div.line { +div.line { display : block ; white-space : pre-wrap ; } linenumber, -context|div.linenumber { +div.linenumber { display : inline-block ; margin-right : 1em ; width : 3em ; @@ -516,8 +516,8 @@ context|div.linenumber { sorting, synonym, -context|div.sorting, -context|div.synonym { +div.sorting, +div.synonym { display : inline ; font-variant : small-caps ; } @@ -533,17 +533,17 @@ context|div.synonym { /* registerpagerange : mixed */ register, -context|div.register { +div.register { display: none ; } registerlocation, -context|div.registerlocation { +div.registerlocation { display: inline ; } registerlocation:after, -context|div.registerlocation:after { +div.registerlocation:after { content : "\25B6\00A0\00A0" ; color : rgb(40%,40%,40%) ; font-size : x-small ; @@ -559,38 +559,38 @@ context|div.registerlocation:after { /* we have a few bonus mappings here */ table, -context|div.table { +div.table { display : table ; } tablerow, tr -context|div.tablerow, context|div.tr { +div.tablerow, div.tr { display : table-row ; } tablecell[align="middle"], td[align="middle"], -context|div.tablecell.align-middle { +div.tablecell.align-middle { display : table-cell ; text-align : center ; padding : .1em ; } tablecell[align="flushleft"], td[align="flushleft"], -context|div.tablecell.align-flushleft { +div.tablecell.align-flushleft { display : table-cell ; text-align : left ; padding : .1em ; } tablecell[align="flushright"], td[align="flushright"], -context|div.tablecell.align-flushright { +div.tablecell.align-flushright { display : table-cell ; text-align : right ; padding : .1em ; } tablecell, td -context|div.tablecell, context|div.td { +div.tablecell, div.td { display : table-cell ; text-align : left ; padding : .1em ; @@ -616,7 +616,7 @@ div.tbody, div.tablebody { /* tabulatecell : mixed */ tabulate, -context|div.tabulate { +div.tabulate { display : table ; margin-top : 1em ; margin-bottom : 1em ; @@ -624,50 +624,50 @@ context|div.tabulate { } floatcontent>tabulate, -context|div.floatcontent context|div.tabulate { +div.floatcontent div.tabulate { margin-left : 0em ; } tabulaterow, -context|div.tabulaterow { +div.tabulaterow { display : table-row ; } tabulatecell[align="middle"], -context|div.tabulatecell.align-middle { +div.tabulatecell.align-middle { display : table-cell ; text-align : center ; padding-right : 1em ; } tabulatecell[align="flushleft"], -context|div.tabulatecell.align-flushleft { +div.tabulatecell.align-flushleft { display : table-cell ; text-align : left ; padding-right : 1em ; } tabulatecell[align="flushright"], -context|div.tabulatecell.align-flushright { +div.tabulatecell.align-flushright { display : table-cell ; text-align : right ; padding-right : 1em ; } tabulatecell, -context|div.tabulatecell { +div.tabulatecell { display : table-cell ; text-align : left ; padding-right : 1em ; } tabulatecell[kind="strong"], -context|div.tabulatecell.kind-strong { +div.tabulatecell.kind-strong { font-weight : bold ; } tabulatecell[kind="equals"]:before, -context|div.tabulatecell.kind-equals:before { +div.tabulatecell.kind-equals:before { display : inline-block ; clear : left ; margin-left : -.6em ; @@ -688,26 +688,26 @@ context|div.tabulatecell.kind-equals:before { /* combinationcaption : mixed */ combination, -context|div.combination { +div.combination { display : table ; margin-top : 0em ; margin-bottom : 0em ; } combinationpair, combinationtext, -context|div.combinationpair, context|div.combinationtext { +div.combinationpair, div.combinationtext { display : table-cell ; padding-right : 1em ; } combinationcontent, -context|div.combinationcontent { +div.combinationcontent { display : table-row ; text-align : center ; } combinationcaption, -context|div.combinationcaption { +div.combinationcaption { display : table-row ; padding-top : 1ex ; text-align : center ; @@ -722,13 +722,13 @@ context|div.combinationcaption { /* listtext : inline */ list, -context|div.list { +div.list { display : block ; text-align : left ; } listitem[detail="chapter"], -context|div.listitem.chapter { +div.listitem.chapter { display : block ; margin-top : 1em ; margin-left : 5em ; @@ -736,32 +736,32 @@ context|div.listitem.chapter { } listitem[detail="section"], -context|div.listitem.section { +div.listitem.section { display : block ; margin-left : 5em ; } listitem[detail="subsection"], -context|div.listitem.subsection { +div.listitem.subsection { display : block ; margin-left : 5em ; } /* listitem[detail="subsection"], -context|div.listitem.subsection { +div.listitem.subsection { display : inline-block ; margin-left : -5em ; } listitem[detail="subsection"]>listtag, -context|div.listitem.subsection context|div.listtag { +div.listitem.subsection div.listtag { margin-right : 1em ; } */ listitem[detail="chapter"]>listtag, -context|div.listitem.chapter > context|div.listtag { +div.listitem.chapter > div.listtag { display : inline-block ; margin-left : -5em ; float : left ; @@ -769,7 +769,7 @@ context|div.listitem.chapter > context|div.listtag { } listitem[detail="section"]>listtag, -context|div.listitem.section > context|div.listtag { +div.listitem.section > div.listtag { display : inline-block ; margin-left : -5em ; float : left ; @@ -777,7 +777,7 @@ context|div.listitem.section > context|div.listtag { } listitem[detail="subsection"]>listtag, -context|div.listitem.subsection > context|div.listtag { +div.listitem.subsection > div.listtag { display : inline-block ; margin-left : -5em ; float : left ; @@ -785,22 +785,22 @@ context|div.listitem.subsection > context|div.listtag { } listcontent, -context|div.listcontent { +div.listcontent { display : inline ; } listdata, -context|div.listdata { +div.listdata { display : inline ; } listpage, -context|div.listpage { +div.listpage { display : none ; } listtext, -context|div.listtext { +div.listtext { display : inline ; } @@ -816,75 +816,75 @@ context|div.listtext { delimited[detail="quotation"]:before, delimitedblock[detail="quotation"]:before, -context|div.delimited.quotation:before, -context|div.delimitedblock.quotation:before { +div.delimited.quotation:before, +div.delimitedblock.quotation:before { /* content : "\201C" ; */ font-style : italic ; } delimited[detail="quotation"]:after, delimitedblock[detail="quotation"]:after, -context|div.delimited.quotation:after, -context|div.delimitedblock.quotation:after { +div.delimited.quotation:after, +div.delimitedblock.quotation:after { /* content : "\201D" ; */ font-style : italic ; } delimited[detail="quote"]:before, delimitedblock[detail="quote"]:before, -context|div.delimited.quote:before, -context|div.delimitedblock.quote:before { +div.delimited.quote:before, +div.delimitedblock.quote:before { /* content : "\2018" ; */ font-style : italic ; } delimited[detail="quote"]:after, delimitedblock[detail="quote"]:after, -context|div.delimited.quote:after, -context|div.delimitedblock.quote:after { +div.delimited.quote:after, +div.delimitedblock.quote:after { /* content : "\2019" ; */ font-style : italic ; } delimited, -context|div.delimited { +div.delimited { display : inline } delimitedcontent, -context|div.delimitedcontent { +div.delimitedcontent { display : inline } delimitedsymbol, -context|div.delimitedsymbol { +div.delimitedsymbol { display : inline } delimitedblock, -context|div.delimitedblock { +div.delimitedblock { display : block } subsentence:before, subsentence:after, -context|div.subsentence:before, -context|div.subsentence:after { +div.subsentence:before, +div.subsentence:after { content : "\2014" ; } subsentence, -context|div.subsentence { +div.subsentence { display : inline } subsentencecontent, -context|div.subsentencecontent { +div.subsentencecontent { display : inline } subsentencesymbol, -context|div.subsentencesymbol { +div.subsentencesymbol { display : inline } @@ -899,7 +899,7 @@ context|div.subsentencesymbol { /* floatcontent : mixed */ float, -context|div.float { +div.float { display : block ; margin-top : 1em ; margin-bottom : 1em ; @@ -907,33 +907,33 @@ context|div.float { } floatcaption, -context|div.floatcaption { +div.floatcaption { display : block ; margin-top : 0.5em ; color : rgb(60%,60%,0%) ; } floatlabel, -context|div.floatlabel { +div.floatlabel { display : inline-block ; font-weight : bold ; margin-right : 0.25em ; } floatnumber, -context|div.floatnumber { +div.floatnumber { display : inline ; font-weight : bold ; margin-right : 0.25em ; } floattext, -context|div.floattext { +div.floattext { display : inline ; } floatcontent, -context|div.floatcontent { +div.floatcontent { } /* image : mixed */ @@ -948,13 +948,13 @@ context|div.floatcontent { } */ mpgraphic:before, -context|div.mpgraphic:before { +div.mpgraphic:before { /* does not work with empty element */ content : "[runtime metapost graphic]" ; } mpgraphic, -context|div.mpgraphic { +div.mpgraphic { display : inline ; } @@ -967,15 +967,16 @@ context|div.mpgraphic { /* formulacontent : display */ formula, -context|div.formula { - display : block ; +div.formula { + xdisplay : block ; + display : table ; margin-top : 1em ; margin-bottom : 1em ; margin-left : 2.5em ; } subformula, -context|div.subformula { /* todo */ +div.subformula { /* todo */ display : block ; margin-top : 1em ; margin-bottom : 1em ; @@ -983,7 +984,7 @@ context|div.subformula { /* todo */ } formulaset, -context|div.formulaset { /* todo */ +div.formulaset { /* todo */ display : block ; margin-top : 1em ; margin-bottom : 1em ; @@ -991,32 +992,37 @@ context|div.formulaset { /* todo */ } formulacaption, -context|div.formulacaption { /* todo */ - display : block ; - margin-top : 0.5em ; - color : rgb(60%,60%,0%) ; +div.formulacaption { /* todo */ + xdisplay : block ; + display : table-cell ; + margin-top : 0.5em ; + padding-left : 2em ; + color : rgb(60%,60%,0%) ; } formulalabel, -context|div.formulalabel { +div.formulalabel { display : inline ; font-weight : bold ; margin-right : .25em ; } formulanumber, -context|div.formulanumber { +div.formulanumber { display : inline ; font-weight : bold ; + margin-left : 0em ; } formulacontent, -context|div.formulacontent { - display : block ; +div.formulacontent { + xdisplay : block ; + display : table-cell ; + margin-left : 0em ; } link, -context|div.link { +div.link { display : inline ; } @@ -1024,7 +1030,7 @@ context|div.link { /* margintext : inline */ margintext, -context|div.margintext { +div.margintext { display : block ; font-weight : bold ; margin-top : 1em ; @@ -1032,7 +1038,7 @@ context|div.margintext { } margintext:before, -context|div.margintext:before { +div.margintext:before { content : "\25B6\00A0\00A0" ; color : rgb(40%,40%,40%) ; } @@ -1060,12 +1066,12 @@ context|div.margintext:before { /* mtr : display */ /* mtd : display */ -context|div.math-inline { +div.math-inline { display : inline ; vertical-align : 0 ; /* this will be set directly */ } -context|div.math-display { +div.math-display { display : block ; margin : 1ex 0ex 1em 3em ; } @@ -1074,12 +1080,12 @@ context|div.math-display { /* pubfld : inline */ publication, -context|div.publication { +div.publication { display : inline ; } pubfld[detail="title"], -context|div.pubfld.title { +div.pubfld.title { display : inline ; font-weight : italic ; } @@ -1089,17 +1095,17 @@ context|div.pubfld.title { /* number : inline */ quantity, -context|div.quantity { +div.quantity { display : inline-block ; } quantity>unit, -context|div.quantity>context|div.unit { +div.quantity>div.unit { display : inline ; } quantity>number, -context|div.quantity>context|div.number { +div.quantity>div.number { display : inline ; } @@ -1108,34 +1114,34 @@ context|div.quantity>context|div.number { /* subsup : inline */ sup, -context|div.sup { +div.sup { display : inline-block ; font-size : xx-small ; vertical-align : super ; } sub, -context|div.sub { +div.sub { display : inline-block ; font-size : xx-small ; vertical-align : sub ; } subsup>sup, -context|div.subsup>context|div.sup { +div.subsup>div.sup { display : inline ; vertical-align : top ; } subsup>sub, -context|div.subsup>context|div.sub { +div.subsup>div.sub { display : inline ; vertical-align : bottom ; } /* links */ -context|div[href]:hover { +div[href]:hover { color : rgb(50%,0%,0%) ; background-color : rgb(85%,85%,85%) ; } @@ -1143,12 +1149,12 @@ context|div[href]:hover { /* setups */ setup, -context|div.setup { +div.setup { display : block ; } comment, -context|div.comment { +div.comment { background-color : rgb(50%,75%,100%) ; display : block ; padding : 1em ; @@ -1160,18 +1166,18 @@ context|div.comment { /* blocks */ block, -context|div.block { +div.block { display : block ; } /* special */ c, -context|div.c { +div.c { display : inline ; } warning, -context|div.warning { +div.warning { display : none ; } diff --git a/Master/texmf-dist/tex/context/base/mkiv/file-job.lua b/Master/texmf-dist/tex/context/base/mkiv/file-job.lua index 97e223387dc..0d26cdfb259 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/file-job.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/file-job.lua @@ -49,6 +49,8 @@ local cleanpath = resolvers.cleanpath local toppath = resolvers.toppath local resolveprefix = resolvers.resolve +local currentfile = luatex.currentfile + local hasscheme = url.hasscheme local jobresolvers = resolvers.jobs @@ -791,7 +793,8 @@ end local function autoname(name) if name == "*" then - name = nameonly(toppath() or name) + -- name = nameonly(toppath() or name) + name = nameonly(currentfile() or name) end return name end diff --git a/Master/texmf-dist/tex/context/base/mkiv/file-lib.lua b/Master/texmf-dist/tex/context/base/mkiv/file-lib.lua index 9b0679e250d..50ac5e1db34 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/file-lib.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/file-lib.lua @@ -18,10 +18,11 @@ local report_library = logs.reporter("files","library") ----- report_files = logs.reporter("files","readfile") local removesuffix = file.removesuffix +local collapsepath = file.collapsepath local getreadfilename = resolvers.getreadfilename -local loaded = { } +local libraries = table.setmetatableindex("table") local defaultpatterns = { "%s" } local function defaultaction(name,foundname) @@ -46,6 +47,7 @@ function resolvers.uselibrary(specification) -- todo: reporter local foundname = getreadfilename("any",".",somename) -- maybe some day also an option not to backtrack .. and ../.. (or block global) return foundname ~= "" and foundname end + local loaded = libraries[patterns] for i=1,#files do local filename = files[i] if not loaded[filename] then @@ -76,17 +78,25 @@ function resolvers.uselibrary(specification) -- todo: reporter end end end - if not loaded[foundname] then - if foundname then - action(name,foundname) + if type(foundname) == "string" then + if not loaded[foundname] then + if foundname then + foundname = collapsepath(foundname) + -- this way we can run a module (nil when making a format): + local inputname = environment.inputfilename + if not inputname or collapsepath(inputname) ~= foundname then + action(name,foundname) + end + -- afterwards: + if onlyonce then + loaded[foundname] = true -- todo: base this on return value + end + elseif failure then + failure(name) + end if onlyonce then - loaded[foundname] = true -- todo: base this on return value + loaded[filename] = true -- todo: base this on return value end - elseif failure then - failure(name) - end - if onlyonce then - loaded[filename] = true -- todo: base this on return value end end end diff --git a/Master/texmf-dist/tex/context/base/mkiv/file-res.lua b/Master/texmf-dist/tex/context/base/mkiv/file-res.lua index 16afae4c7ab..3ed7abc8d3d 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/file-res.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/file-res.lua @@ -59,18 +59,20 @@ local function readfilename(specification,backtrack,treetoo) end end if not fnd and backtrack then + local path = environment.arguments.runpath and environment.arguments.path or "" for i=1,#names do local fname = names[i] for i=1,backtrack,1 do fname = "../" .. fname - if isfile(fname) then + local pname = path and (path ~= "") and (path .. "/" .. fname) or fname + if isfile(pname) then if trace_files then - report_files("found by backtracking: %s",fname) + report_files("found by backtracking: %s",pname) end - fnd = fname + fnd = pname break elseif trace_files then - report_files("not found by backtracking: %s",fname) + report_files("not found by backtracking: %s",pname) end end if fnd then diff --git a/Master/texmf-dist/tex/context/base/mkiv/font-cff.lua b/Master/texmf-dist/tex/context/base/mkiv/font-cff.lua index 4e2981011ac..c71c3aef33a 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/font-cff.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/font-cff.lua @@ -29,7 +29,7 @@ if not modules then modules = { } end modules ['font-cff'] = { local next, type, tonumber, rawget = next, type, tonumber, rawget local byte, char, gmatch, sub = string.byte, string.char, string.gmatch, string.sub -local concat, remove, unpack = table.concat, table.remove, table.unpack +local concat, insert, remove, unpack = table.concat, table.insert, table.remove, table.unpack local floor, abs, round, ceil, min, max = math.floor, math.abs, math.round, math.ceil, math.min, math.max local P, C, R, S, C, Cs, Ct = lpeg.P, lpeg.C, lpeg.R, lpeg.S, lpeg.C, lpeg.Cs, lpeg.Ct local lpegmatch = lpeg.match @@ -348,11 +348,11 @@ do top = 0 end + P("\10") / function() - result.strhw = stack[top] + result.stdhw = stack[top] top = 0 end + P("\11") / function() - result.strvw = stack[top] + result.stdvw = stack[top] top = 0 end + P("\13") / function() @@ -453,7 +453,7 @@ do top = 0 end + P("\10") / function() - result.bluesnap = stack[top] + result.blueshift = stack[top] top = 0 end + P("\11") / function() @@ -528,7 +528,7 @@ do -- the second variant is much faster. Not that it matters much as we don't see -- such numbers often. - local remap = { + local remap_1 = { ["\x00"] = "00", ["\x01"] = "01", ["\x02"] = "02", ["\x03"] = "03", ["\x04"] = "04", ["\x05"] = "05", ["\x06"] = "06", ["\x07"] = "07", ["\x08"] = "08", ["\x09"] = "09", ["\x0A"] = "0.", ["\x0B"] = "0E", ["\x0C"] = "0E-", ["\x0D"] = "0", ["\x0E"] = "0-", ["\x0F"] = "0", ["\x10"] = "10", ["\x11"] = "11", ["\x12"] = "12", ["\x13"] = "13", ["\x14"] = "14", ["\x15"] = "15", ["\x16"] = "16", ["\x17"] = "17", ["\x18"] = "18", ["\x19"] = "19", ["\x1A"] = "1.", ["\x1B"] = "1E", ["\x1C"] = "1E-", ["\x1D"] = "1", ["\x1E"] = "1-", ["\x1F"] = "1", ["\x20"] = "20", ["\x21"] = "21", ["\x22"] = "22", ["\x23"] = "23", ["\x24"] = "24", ["\x25"] = "25", ["\x26"] = "26", ["\x27"] = "27", ["\x28"] = "28", ["\x29"] = "29", ["\x2A"] = "2.", ["\x2B"] = "2E", ["\x2C"] = "2E-", ["\x2D"] = "2", ["\x2E"] = "2-", ["\x2F"] = "2", @@ -544,11 +544,18 @@ do ["\xC0"] = "E-0", ["\xC1"] = "E-1", ["\xC2"] = "E-2", ["\xC3"] = "E-3", ["\xC4"] = "E-4", ["\xC5"] = "E-5", ["\xC6"] = "E-6", ["\xC7"] = "E-7", ["\xC8"] = "E-8", ["\xC9"] = "E-9", ["\xCA"] = "E-.", ["\xCB"] = "E-E", ["\xCC"] = "E-E-", ["\xCD"] = "E-", ["\xCE"] = "E--", ["\xCF"] = "E-", ["\xD0"] = "-0", ["\xD1"] = "-1", ["\xD2"] = "-2", ["\xD3"] = "-3", ["\xD4"] = "-4", ["\xD5"] = "-5", ["\xD6"] = "-6", ["\xD7"] = "-7", ["\xD8"] = "-8", ["\xD9"] = "-9", ["\xDA"] = "-.", ["\xDB"] = "-E", ["\xDC"] = "-E-", ["\xDD"] = "-", ["\xDE"] = "--", ["\xDF"] = "-", } + local remap_2 = { + ["\x0F"] = "0", ["\x1F"] = "1", ["\x2F"] = "2", ["\x3F"] = "3", ["\x4F"] = "4", + ["\x5F"] = "5", ["\x6F"] = "6", ["\x7F"] = "7", ["\x8F"] = "8", ["\x9F"] = "9", + } + + local p_last_1 = S("\x0F\x1F\x2F\x3F\x4F\x5F\x6F\x7F\x8F\x9F\xAF\xBF") + local p_last_2 = R("\xF0\xFF") - local p_last = S("\x0F\x1F\x2F\x3F\x4F\x5F\x6F\x7F\x8F\x9F\xAF\xBF") - + R("\xF0\xFF") + -- tricky, we don't want to append last - local p_nibbles = P("\30") * Cs(((1-p_last)/remap)^0 * (P(1)/remap)) / function(n) + -- local p_nibbles = P("\30") * Cs(((1-p_last)/remap)^0 * (P(1)/remap)) / function(n) + local p_nibbles = P("\30") * Cs(((1-(p_last_1+p_last_2))/remap_1)^0 * (p_last_1/remap_2 + p_last_2/"")) / function(n) -- 0-9=digit a=. b=E c=E- d=reserved e=- f=finish top = top + 1 stack[top] = tonumber(n) or 0 @@ -572,6 +579,11 @@ do stack[top] = -(byte(b0)-251)*256 - byte(b1) - 108 end + -- local p_float = P("\255") * C(1) * C(1) * C(1) * C(1) / function(b0,b1,b2,b3) + -- top = top + 1 + -- stack[top] = 0 + -- end + local p_short = P("\28") * C(1) * C(1) / function(b1,b2) -- -32768 .. +32767 : b1<<8 | b2 top = top + 1 @@ -607,6 +619,7 @@ do + p_nibbles + p_single + p_double + -- + p_float + p_unsupported )^1 @@ -701,6 +714,7 @@ do local y = 0 local width = false local lsb = 0 + local result = { } local r = 0 local stems = 0 local globalbias = 0 @@ -728,8 +742,13 @@ do local seacs = { } local procidx = nil - local function showstate(where) - report("%w%-10s : [%s] n=%i",depth*2,where,concat(stack," ",1,top),top) + local function showstate(where,i,n) + if i then + local j = i + n - 1 + report("%w%-10s : [%s] step",depth*2+2,where,concat(stack," ",i,j <= top and j or top)) + else + report("%w%-10s : [%s] n=%i",depth*2,where,concat(stack," ",1,top),top) + end end local function showvalue(where,value,showstack) @@ -745,6 +764,13 @@ do -- some back. I inlined some of then and a bit speed can be gained by more -- inlining but not that much. + -- Maybe have several action tables: + -- + -- keep curve / checked + -- keep curve / not checked + -- checked + -- not checked + local function xymoveto() if keepcurve then r = r + 1 @@ -859,9 +885,9 @@ do end end - local function xycurveto(x1,y1,x2,y2,x3,y3) -- called local so no blend here + local function xycurveto(x1,y1,x2,y2,x3,y3,i,n) -- called local so no blend here if trace_charstrings then - showstate("curveto") + showstate("curveto",i,n) end if keepcurve then r = r + 1 @@ -1005,6 +1031,16 @@ do if trace_charstrings then showstate("rrcurveto") end +if top == 6 then + local ax = x + stack[1] -- dxa + local ay = y + stack[2] -- dya + local bx = ax + stack[3] -- dxb + local by = ay + stack[4] -- dyb + x = bx + stack[5] -- dxc + y = by + stack[6] -- dyc + xycurveto(ax,ay,bx,by,x,y,1,6) +else +-- print("rr",top==6,top) for i=1,top,6 do local ax = x + stack[i] -- dxa local ay = y + stack[i+1] -- dya @@ -1012,8 +1048,9 @@ do local by = ay + stack[i+3] -- dyb x = bx + stack[i+4] -- dxc y = by + stack[i+5] -- dyc - xycurveto(ax,ay,bx,by,x,y) + xycurveto(ax,ay,bx,by,x,y,i,6) end +end top = 0 end @@ -1026,6 +1063,15 @@ do y = y + stack[1] -- dy1 s = 2 end +if top == 4 then + local ax = x + stack[1] -- dxa + local ay = y + local bx = ax + stack[2] -- dxb + local by = ay + stack[3] -- dyb + x = bx + stack[4] -- dxc + y = by + xycurveto(ax,ay,bx,by,x,y,1,4) +else for i=s,top,4 do local ax = x + stack[i] -- dxa local ay = y @@ -1033,8 +1079,9 @@ do local by = ay + stack[i+2] -- dyb x = bx + stack[i+3] -- dxc y = by - xycurveto(ax,ay,bx,by,x,y) + xycurveto(ax,ay,bx,by,x,y,i,4) end +end top = 0 end @@ -1048,6 +1095,16 @@ do d = stack[1] -- dx1 s = 2 end +if top == 4 then + local ax = x + d + local ay = y + stack[1] -- dya + local bx = ax + stack[2] -- dxb + local by = ay + stack[3] -- dyb + x = bx + y = by + stack[4] -- dyc + xycurveto(ax,ay,bx,by,x,y,1,4) + d = 0 +else for i=s,top,4 do local ax = x + d local ay = y + stack[i] -- dya @@ -1055,9 +1112,10 @@ do local by = ay + stack[i+2] -- dyb x = bx y = by + stack[i+3] -- dyc - xycurveto(ax,ay,bx,by,x,y) + xycurveto(ax,ay,bx,by,x,y,i,4) d = 0 end +end top = 0 end @@ -1066,6 +1124,33 @@ do if last then top = top - 1 end +if top == 4 then + local ax, ay, bx, by + if swap then + ax = x + stack[1] + ay = y + bx = ax + stack[2] + by = ay + stack[3] + y = by + stack[4] + if last then + x = bx + last + else + x = bx + end + else + ax = x + ay = y + stack[1] + bx = ax + stack[2] + by = ay + stack[3] + x = bx + stack[4] + if last then + y = by + last + else + y = by + end + end + xycurveto(ax,ay,bx,by,x,y,1 ,4) +else for i=1,top,4 do local ax, ay, bx, by if swap then @@ -1093,8 +1178,9 @@ do end swap = true end - xycurveto(ax,ay,bx,by,x,y) + xycurveto(ax,ay,bx,by,x,y,i,4) end +end top = 0 end @@ -1123,7 +1209,7 @@ do local by = ay + stack[i+3] -- dyb x = bx + stack[i+4] -- dxc y = by + stack[i+5] -- dyc - xycurveto(ax,ay,bx,by,x,y) + xycurveto(ax,ay,bx,by,x,y,i,6) end x = x + stack[top-1] -- dxc y = y + stack[top] -- dyc @@ -1628,7 +1714,8 @@ do -- todo: round in blend - local encode = { } + local encode = { } + local typeone = false -- this eventually can become a helper @@ -1645,15 +1732,13 @@ do end for i=108,1131 do local v = 0xF700 + i - 108 --- t[i] = char(band(rshift(v,8),0xFF),band(v,0xFF)) t[i] = char(extract(v,8,8),extract(v,0,8)) end for i=1132,2048 do t[i] = char(28,band(rshift(i,8),0xFF),band(i,0xFF)) end - -- we could inline some ... setmetatableindex(encode,function(t,k) - -- 16.16-bit signed fixed value + -- as we're cff2 we write 16.16-bit signed fixed value local r = round(k) local v = rawget(t,r) if v then @@ -1758,42 +1843,6 @@ do -- precompiling and reuse is much slower than redoing the calls - -- local function decode(str) - -- local a, b, c, d, e = byte(str,1,5) - -- if a == 28 then - -- if c then - -- local n = 0x100 * b + c - -- if n >= 0x8000 then - -- return n - 0x10000 - -- else - -- return n - -- end - -- end - -- elseif a < 32 then - -- return false - -- elseif a <= 246 then - -- return a - 139 - -- elseif a <= 250 then - -- if b then - -- return a*256 - 63124 + b - -- end - -- elseif a <= 254 then - -- if b then - -- return -a*256 + 64148 - b - -- end - -- else - -- if e then - -- local n = 0x100 * b + c - -- if n >= 0x8000 then - -- return n - 0x10000 + (0x100 * d + e)/0xFFFF - -- else - -- return n + (0x100 * d + e)/0xFFFF - -- end - -- end - -- end - -- return false - -- end - process = function(tab) local i = 1 local n = #tab @@ -1817,14 +1866,20 @@ do -- stack[top] = -t*256 + 251*256 - tab[i+1] - 108 stack[top] = -t*256 + 64148 - tab[i+1] i = i + 2 + elseif typeone then + local n = 0x1000000 * tab[i+1] + 0x10000 * tab[i+2] + 0x100 * tab[i+3] + tab[i+4] + if n >= 0x8000000 then + n = n - 0xFFFFFFFF - 1 + end + stack[top] = n + i = i + 5 else - -- a 16.16 float - local n = 0x100 * tab[i+1] + tab[i+2] - if n >= 0x8000 then - stack[top] = n - 0x10000 + (0x100 * tab[i+3] + tab[i+4])/0xFFFF - else - stack[top] = n + (0x100 * tab[i+3] + tab[i+4])/0xFFFF + local n1 = 0x100 * tab[i+1] + tab[i+2] + local n2 = 0x100 * tab[i+3] + tab[i+4] + if n1 >= 0x8000 then + n1 = n1 - 0x10000 end + stack[top] = n1 + n2/0xFFFF i = i + 5 end elseif t == 28 then @@ -1917,7 +1972,8 @@ do -- cff 1: (when cff2 strip them) elseif t == 1 or t == 3 or t == 18 or operation == 23 then p_getstem() -- at the start - if true then + if version == "cff" then +-- if true then if top > 0 then for i=1,top do r = r + 1 ; result[r] = encode[stack[i]] @@ -1932,6 +1988,7 @@ do -- cff 1: (when cff2 strip them) elseif t == 19 or t == 20 then local s = p_getmask() or 0 -- after the stems +-- if version == "cff" then if true then if top > 0 then for i=1,top do @@ -1955,7 +2012,8 @@ do i = i + 1 elseif t == 13 then hsbw() - if version == "cff" then +-- if version == "cff" then + if true then -- we do a moveto over lsb r = r + 1 ; result[r] = encode[lsb] r = r + 1 ; result[r] = chars[22] @@ -1968,8 +2026,40 @@ do showstate(reverse[t] or "<action>") end if top > 0 then - for i=1,top do - r = r + 1 ; result[r] = encode[stack[i]] + -- if t == 8 and top > 42 then + if t == 8 and top > 48 then + -- let's assume this only happens for rrcurveto .. the other ones would need some more + -- complex handling (cff2 stuff) + -- + -- dx1 dy1 (dx1+dx2) (dy1+dy2) (dx1+dx2+dx3) (dy1+dy2+dy3) rcurveto. + local n = 0 + for i=1,top do + -- if n == 42 then + if n == 48 then +-- local zero = encode[0] +-- local res3 = result[r-3] +-- local res2 = result[r-2] +-- local res1 = result[r-1] +-- local res0 = result[r] +-- result[r-3] = zero +-- result[r-2] = zero + r = r + 1 ; result[r] = chars[t] +-- r = r + 1 ; result[r] = zero +-- r = r + 1 ; result[r] = zero +-- r = r + 1 ; result[r] = res3 +-- r = r + 1 ; result[r] = res2 +-- r = r + 1 ; result[r] = res1 +-- r = r + 1 ; result[r] = res0 + n = 1 + else + n = n + 1 + end + r = r + 1 ; result[r] = encode[stack[i]] + end + else + for i=1,top do + r = r + 1 ; result[r] = encode[stack[i]] + end end top = 0 end @@ -2046,7 +2136,7 @@ do end end - local function processshape(tab,index,hack) + local function processshape(glyphs,tab,index,hack) if not tab then glyphs[index] = { @@ -2085,7 +2175,6 @@ do end process(tab) - if hack then return x, y end @@ -2108,13 +2197,15 @@ do r = r + 1 result[r] = c_endchar local stream = concat(result) +result = nil -- if trace_charstrings then -- report("vdata: %s",stream) -- end if glyph then - glyph.stream = stream + glyph.stream = stream + glyph.width = width else - glyphs[index] = { stream = stream } + glyphs[index] = { stream = stream, width = width } end elseif glyph then glyph.segments = keepcurve ~= false and result or nil @@ -2134,6 +2225,7 @@ do name = charset and charset[index] or nil, -- sidebearing = 0, } +result = nil else glyphs[index] = { boundingbox = boundingbox, @@ -2141,7 +2233,6 @@ do name = charset and charset[index] or nil, } end - if trace_charstrings then report("width : %s",tostring(width)) report("boundingbox: % t",boundingbox) @@ -2192,19 +2283,21 @@ do return privatedata.nominalwidthx or 0, privatedata.defaultwidthx or 0 end - parsecharstrings = function(fontdata,data,glphs,doshapes,tversion,streams,nobias) + parsecharstrings = function(fontdata,data,glphs,doshapes,tversion,streams,nobias,istypeone) local dictionary = data.dictionaries[1] local charstrings = dictionary.charstrings keepcurve = doshapes version = tversion + typeone = istypeone or false strings = data.strings globals = data.routines or { } locals = dictionary.subroutines or { } charset = dictionary.charset vsindex = dictionary.vsindex or 0 - glyphs = glphs or { } + + local glyphs = glphs or { } globalbias, localbias = setbias(globals,locals,nobias) nominalwidth, defaultwidth = setwidths(dictionary.private) @@ -2212,7 +2305,7 @@ do if charstrings then startparsing(fontdata,data,streams) for index=1,#charstrings do - processshape(charstrings[index],index-1) + processshape(glyphs,charstrings[index],index-1) end if justpass and next(seacs) then -- old type 1 stuff ... seacs @@ -2228,7 +2321,7 @@ do -- this is a real ugly hack but we seldom enter this branch (e.g. old lbr) local jp = justpass justpass = false - local x, y = processshape(charstrings[bindex+1],bindex,true) + local x, y = processshape(glyphs,charstrings[bindex+1],bindex,true) justpass = jp -- local base = bglyph.stream @@ -2259,7 +2352,8 @@ do locals = dictionary.subroutines or { } charset = false vsindex = dictionary.vsindex or 0 - glyphs = glphs or { } + + local glyphs = glphs or { } justpass = streams == true seacs = { } @@ -2267,9 +2361,9 @@ do globalbias, localbias = setbias(globals,locals,nobias) nominalwidth, defaultwidth = setwidths(dictionary.private) - processshape(tab,index-1) + processshape(glyphs,tab,index-1) - -- return glyphs[index] + return glyphs[index] end end @@ -2434,7 +2528,7 @@ local function readnoselect(f,fontdata,data,glyphs,doshapes,version,streams) parseprivates(data,data.dictionaries) readlocals(f,data,dictionary,version) startparsing(fontdata,data,streams) - parsecharstrings(fontdata,data,glyphs,doshapes,version,streams) + parsecharstrings(fontdata,data,glyphs,doshapes,version,streams,false) stopparsing(fontdata,data) end @@ -2483,7 +2577,7 @@ local function readfdselect(f,fontdata,data,glyphs,doshapes,version,streams) end end else - -- unsupported format + report("unsupported fd index format %i",format) end -- hm, always if maxindex >= 0 then @@ -2491,21 +2585,30 @@ local function readfdselect(f,fontdata,data,glyphs,doshapes,version,streams) if cidarray then setposition(f,header.offset+cidarray) local dictionaries = readlengths(f,version == "cff2") - for i=1,#dictionaries do - dictionaries[i] = readstring(f,dictionaries[i]) - end - parsedictionaries(data,dictionaries) - cid.dictionaries = dictionaries - readcidprivates(f,data) - for i=1,#dictionaries do - readlocals(f,data,dictionaries[i],version) - end - startparsing(fontdata,data,streams) - for i=1,#charstrings do - parsecharstring(fontdata,data,dictionaries[fdindex[i]+1],charstrings[i],glyphs,i,doshapes,version,streams) --- charstrings[i] = nil + if #dictionaries > 0 then + for i=1,#dictionaries do + dictionaries[i] = readstring(f,dictionaries[i]) + end + parsedictionaries(data,dictionaries) + cid.dictionaries = dictionaries + readcidprivates(f,data) + for i=1,#dictionaries do + readlocals(f,data,dictionaries[i],version) + end + startparsing(fontdata,data,streams) + for i=1,#charstrings do + local dictionary = dictionaries[fdindex[i]+1] + if dictionary then + parsecharstring(fontdata,data,dictionary,charstrings[i],glyphs,i,doshapes,version,streams) + else + -- report("no dictionary for %a : %a => %a",version,i,fdindex[i]+1) + end + -- charstrings[i] = false + end + stopparsing(fontdata,data) + else + report("no cid dictionaries") end - stopparsing(fontdata,data) else report("no cid array") end @@ -2593,6 +2696,8 @@ function readers.cff(f,fontdata,specification) cffinfo.bluefuzz = data.bluefuzz cffinfo.stdhw = data.stdhw cffinfo.stdvw = data.stdvw + cffinfo.stemsnaph = data.stemsnaph + cffinfo.stemsnapv = data.stemsnapv end end cleanup(data,dictionaries) @@ -2643,38 +2748,38 @@ end -- temporary helper needed for checking backend patches -function readers.cffcheck(filename) - local f = io.open(filename,"rb") - if f then - local fontdata = { - glyphs = { }, - } - local header = readheader(f) - if header.major ~= 1 then - report("only version %s is supported for table %a",1,"cff") - return - end - local names = readfontnames(f) - local dictionaries = readtopdictionaries(f) - local strings = readstrings(f) - local glyphs = { } - local data = { - header = header, - names = names, - dictionaries = dictionaries, - strings = strings, - glyphs = glyphs, - nofglyphs = 0, - } - -- - parsedictionaries(data,dictionaries,"cff") - -- - local cid = data.dictionaries[1].cid - if cid and cid.fdselect then - readfdselect(f,fontdata,data,glyphs,false) - else - readnoselect(f,fontdata,data,glyphs,false) - end - return data - end -end +-- function readers.cffcheck(filename) +-- local f = io.open(filename,"rb") +-- if f then +-- local fontdata = { +-- glyphs = { }, +-- } +-- local header = readheader(f) +-- if header.major ~= 1 then +-- report("only version %s is supported for table %a",1,"cff") +-- return +-- end +-- local names = readfontnames(f) +-- local dictionaries = readtopdictionaries(f) +-- local strings = readstrings(f) +-- local glyphs = { } +-- local data = { +-- header = header, +-- names = names, +-- dictionaries = dictionaries, +-- strings = strings, +-- glyphs = glyphs, +-- nofglyphs = 0, +-- } +-- -- +-- parsedictionaries(data,dictionaries,"cff") +-- -- +-- local cid = data.dictionaries[1].cid +-- if cid and cid.fdselect then +-- readfdselect(f,fontdata,data,glyphs,false) +-- else +-- readnoselect(f,fontdata,data,glyphs,false) +-- end +-- return data +-- end +-- end diff --git a/Master/texmf-dist/tex/context/base/mkiv/font-cft.lua b/Master/texmf-dist/tex/context/base/mkiv/font-cft.lua index cf6c232a606..d6afc01f70f 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/font-cft.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/font-cft.lua @@ -6,7 +6,7 @@ if not modules then modules = { } end modules ['font-cft'] = { license = "see context related readme files" } --- context font tables (needs updating) +-- context font tables (needs updating, only okay for mkiv) -- -- todo: extra: -- @@ -439,7 +439,7 @@ do }, colorschemes = { default = { - [1] = { t_string }, + { t_string }, } }, files = { diff --git a/Master/texmf-dist/tex/context/base/mkiv/font-chk.lua b/Master/texmf-dist/tex/context/base/mkiv/font-chk.lua index e18e4b8048a..693823a8662 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/font-chk.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/font-chk.lua @@ -64,7 +64,7 @@ local implement = interfaces.implement local glyph_code = nodes.nodecodes.glyph local new_special = nodes.pool.special -- todo: literal -local hpack_node = node.hpack +local hpack_node = nodes.hpack local nuts = nodes.nuts local tonut = nuts.tonut @@ -75,7 +75,7 @@ local setchar = nuts.setchar local nextglyph = nuts.traversers.glyph local remove_node = nuts.remove -local insert_node_after = nuts.insert_after +local insertnodeafter = nuts.insertafter -- maybe in fonts namespace -- deletion can be option @@ -324,7 +324,7 @@ function checkers.missing(head) local char, font = isglyph(node) local kind, char = placeholder(font,char) if kind == "node" then - insert_node_after(head,node,tonut(char)) + insertnodeafter(head,node,tonut(char)) head = remove_node(head,node,true) elseif kind == "char" then setchar(node,char) diff --git a/Master/texmf-dist/tex/context/base/mkiv/font-col.lua b/Master/texmf-dist/tex/context/base/mkiv/font-col.lua index c47a299060b..ea9b9c98c7b 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/font-col.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/font-col.lua @@ -22,7 +22,6 @@ local nuts = nodes.nuts local setfont = nuts.setfont ------ traverse_char = nuts.traverse_char local nextchar = nuts.traversers.char local settings_to_hash = utilities.parsers.settings_to_hash diff --git a/Master/texmf-dist/tex/context/base/mkiv/font-con.lua b/Master/texmf-dist/tex/context/base/mkiv/font-con.lua index f650e5b03d6..066ea33ed2b 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/font-con.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/font-con.lua @@ -388,20 +388,20 @@ function constructors.scale(tfmdata,specification) -- local mathsize = tonumber(specification.mathsize) or 0 local textsize = tonumber(specification.textsize) or scaledpoints - local forcedsize = tonumber(parameters.mathsize ) or 0 -- can be set by the feature "mathsize" + -- local forcedsize = tonumber(parameters.mathsize ) or 0 -- can be set by the feature "mathsize" local extrafactor = tonumber(specification.factor ) or 1 - if (mathsize == 2 or forcedsize == 2) and parameters.scriptpercentage then - scaledpoints = parameters.scriptpercentage * textsize / 100 - elseif (mathsize == 3 or forcedsize == 3) and parameters.scriptscriptpercentage then - scaledpoints = parameters.scriptscriptpercentage * textsize / 100 - elseif forcedsize > 1000 then -- safeguard - scaledpoints = forcedsize - else - -- in context x and xx also use mathsize - end + -- if context then + -- -- do nothing, as we moved this upstream + -- elseif (mathsize == 2 or forcedsize == 2) and parameters.scriptpercentage then + -- scaledpoints = parameters.scriptpercentage * textsize / 100 + -- elseif (mathsize == 3 or forcedsize == 3) and parameters.scriptscriptpercentage then + -- scaledpoints = parameters.scriptscriptpercentage * textsize / 100 + -- elseif forcedsize > 1000 then -- safeguard + -- scaledpoints = forcedsize + -- end targetparameters.mathsize = mathsize -- context specific targetparameters.textsize = textsize -- context specific - targetparameters.forcedsize = forcedsize -- context specific + -- targetparameters.forcedsize = forcedsize -- context specific targetparameters.extrafactor = extrafactor -- context specific -- local addtounicode = constructors.addtounicode @@ -534,7 +534,6 @@ function constructors.scale(tfmdata,specification) local realdimensions = properties.realdimensions local writingmode = properties.writingmode or "horizontal" local identity = properties.identity or "horizontal" - -- local vfonts = target.fonts if vfonts and #vfonts > 0 then target.fonts = fastcopy(vfonts) -- maybe we virtualize more afterwards diff --git a/Master/texmf-dist/tex/context/base/mkiv/font-ctx.lua b/Master/texmf-dist/tex/context/base/mkiv/font-ctx.lua index eead8abff67..2c56b5613fc 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/font-ctx.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/font-ctx.lua @@ -1411,7 +1411,7 @@ do -- else too many locals context(function() busy = false mathematics.finishfallbacks(tfmdata,specification,fallbacks) -tfmdata.original = specification.specification + tfmdata.original = specification.specification local id = definefont(tfmdata) csnames[id] = specification.cs properties.id = id @@ -1449,7 +1449,7 @@ tfmdata.original = specification.specification end) return else -tfmdata.original = specification.specification + tfmdata.original = specification.specification local id = definefont(tfmdata) csnames[id] = specification.cs properties.id = id diff --git a/Master/texmf-dist/tex/context/base/mkiv/font-dsp.lua b/Master/texmf-dist/tex/context/base/mkiv/font-dsp.lua index 8d7c3d359d9..f0f8e50cfcf 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/font-dsp.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/font-dsp.lua @@ -234,6 +234,24 @@ local read_integer = { streamreader.readinteger4, } +directives.register("fonts.streamreader",function() + + read_cardinal = { + streamreader.readcardinal1, + streamreader.readcardinal2, + streamreader.readcardinal3, + streamreader.readcardinal4, + } + + read_integer = { + streamreader.readinteger1, + streamreader.readinteger2, + streamreader.readinteger3, + streamreader.readinteger4, + } + +end) + -- Traditionally we use these unique names (so that we can flatten the lookup list -- (we create subsets runtime) but I will adapt the old code to newer names. @@ -360,7 +378,7 @@ local function getaxisscale(segments,minimum,default,maximum,user) for i=1,#segments do local s = segments[i] if type(s) ~= "number" then - report("using default axis scale") + -- report("using default axis scale") return default elseif s[1] >= default then if s[2] == default then @@ -2177,6 +2195,8 @@ do -- local usedlookups = false -- setmetatableindex("number") -- + local allsteps = { } -- new per 2022-09-25 + for lookupid=1,noflookups do local lookup = lookups[lookupid] local lookuptype = lookup.type @@ -2214,6 +2234,7 @@ do steps[nofsteps] = step local rules = step.rules if rules then + allsteps[#allsteps+1] = step -- new per 2022-09-25 for i=1,#rules do local rule = rules[i] local before = rule.before @@ -2329,29 +2350,31 @@ do local reported = { } - local function report_issue(i,what,sequence,kind) - local name = sequence.name - if not reported[name] then - report("rule %i in %s lookup %a has %s lookups",i,what,name,kind) - reported[name] = true - end + local function report_issue(i,what,step,kind) +-- if not reported[step] then + report("rule %i in step %i of %s has %s lookups",i,step,what,kind) +-- reported[name] = true +-- end end - for i=lastsequence+1,nofsequences do - local sequence = sequences[i] - local steps = sequence.steps - for i=1,#steps do - local step = steps[i] + -- for i=lastsequence+1,nofsequences do + -- local sequence = sequences[i] + -- local steps = sequence.steps + -- for i=1,#steps do + -- local step = steps[i] + + for s=1,#allsteps do -- new per 2022-09-25 + local step = allsteps[s] -- new per 2022-09-25 local rules = step.rules if rules then for i=1,#rules do local rule = rules[i] local rlookups = rule.lookups if not rlookups then - report_issue(i,what,sequence,"no") + report_issue(i,what,s,"no") elseif not next(rlookups) then -- can be ok as it aborts a chain sequence - -- report_issue(i,what,sequence,"empty") + -- report_issue(i,what,s,"empty") rule.lookups = nil else -- we can have holes in rlookups flagged false and we can have multiple lookups @@ -2392,12 +2415,12 @@ do sublookupcheck[lookupid] = 1 h = nofsublookups else - report_issue(i,what,sequence,"missing") + report_issue(i,what,s,"missing") rule.lookups = nil break end else - report_issue(i,what,sequence,"bad") + report_issue(i,what,s,"bad") rule.lookups = nil break end @@ -2419,7 +2442,7 @@ do end end end - end + -- end -- new per 2022-09-25 for i, n in sortedhash(sublookupcheck) do local l = lookups[i] @@ -2515,7 +2538,9 @@ do local scriptoffset = tableoffset + readushort(f) local featureoffset = tableoffset + readushort(f) local lookupoffset = tableoffset + readushort(f) - local variationsoffset = version > 0x00010000 and (tableoffset + readulong(f)) or 0 + -- MFK : Rubik-Regular.ttf : we need to delay adding the offset + -- local variationsoffset = version > 0x00010000 and (tableoffset + readulong(f)) or 0 + local variationsoffset = version > 0x00010000 and readulong(f) or 0 if not scriptoffset then return end @@ -2541,7 +2566,8 @@ do end -- if variationsoffset > 0 then - loadvariations(f,fontdata,variationsoffset,lookuptypes,featurehash,featureorder) + -- loadvariations(f,fontdata,variationsoffset,lookuptypes,featurehash,featureorder) + loadvariations(f,fontdata,tableoffset + variationsoffset,lookuptypes,featurehash,featureorder) end end end @@ -2878,7 +2904,7 @@ local function readmathglyphinfo(f,fontdata,offset) if not math then glyph.math = { accent = accent } else - math.accent = accent + math.accent = accent -- will become math.topanchor end end end @@ -2968,7 +2994,7 @@ local function readmathvariants(f,fontdata,offset) -- advance = readushort(f), -- } - local function get(offset,coverage,nofglyphs,construction,kvariants,kparts,kitalic) + local function get(offset,coverage,nofglyphs,construction,kvariants,kparts,kitalic,korientation,orientation) if coverage ~= 0 and nofglyphs > 0 then local coverage = readcoverage(f,offset+coverage,true) for i=1,nofglyphs do @@ -3033,14 +3059,23 @@ local function readmathvariants(f,fontdata,offset) if italic and italic ~= 0 then math[kitalic] = italic end + if orientation then + math[korientation] = orientation + end end end end end end - get(offset,vcoverage,vnofglyphs,vconstruction,"vvariants","vparts","vitalic") - get(offset,hcoverage,hnofglyphs,hconstruction,"hvariants","hparts","hitalic") + -- if LUATEXENGINE == "luametatex" then + if CONTEXTLMTXMODE and CONTEXTLMTXMODE > 0 then + get(offset,hcoverage,hnofglyphs,hconstruction,"variants","parts","partsitalic","partsorientation","horizontal") + get(offset,vcoverage,vnofglyphs,vconstruction,"variants","parts","partsitalic","partsorientation","vertical") + else + get(offset,vcoverage,vnofglyphs,vconstruction,"vvariants","vparts","vitalic") + get(offset,hcoverage,hnofglyphs,hconstruction,"hvariants","hparts","hitalic") + end end function readers.math(f,fontdata,specification) @@ -3072,9 +3107,11 @@ function readers.colr(f,fontdata,specification) local tableoffset = gotodatatable(f,fontdata,"colr",specification.glyphs) if tableoffset then local version = readushort(f) - if version ~= 0 then + if version == 0 or version == 1 then report("table version %a of %a is not supported (yet), maybe font %s is bad",version,"colr",fontdata.filename) return + else + -- both versions have this in common end if not fontdata.tables.cpal then report("color table %a in font %a has no mandate %a table","colr",fontdata.filename,"cpal") @@ -3806,6 +3843,7 @@ function readers.hvar(f,fontdata,specification) end local tableoffset = gotodatatable(f,fontdata,"hvar",specification.variable) if not tableoffset then + -- report("no hvar table, expect problems due to messy widths") return end @@ -3819,11 +3857,11 @@ function readers.hvar(f,fontdata,specification) local variations = { } local innerindex = { } -- size is mapcount local outerindex = { } -- size is mapcount + local deltas = { } if variationoffset > 0 then regions, deltas = readvariationdata(f,variationoffset,factors) end - if not regions then -- for now .. what to do ? return diff --git a/Master/texmf-dist/tex/context/base/mkiv/font-enc.lua b/Master/texmf-dist/tex/context/base/mkiv/font-enc.lua index 608539c59ad..f2f0595ddfa 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/font-enc.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/font-enc.lua @@ -26,7 +26,7 @@ local report_encoding = logs.reporter("fonts","encoding") local encodings = fonts.encodings or { } fonts.encodings = encodings -encodings.version = 1.03 +encodings.version = 1.04 encodings.cache = containers.define("fonts", "enc", fonts.encodings.version, true) encodings.known = allocate { -- sort of obsolete texnansi = true, diff --git a/Master/texmf-dist/tex/context/base/mkiv/font-hsh.lua b/Master/texmf-dist/tex/context/base/mkiv/font-hsh.lua index 7e90e15024e..89b0dc8238d 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/font-hsh.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/font-hsh.lua @@ -37,6 +37,7 @@ local italics = hashes.italics or allocate() local lastmathids = hashes.lastmathids or allocate() local dynamics = hashes.dynamics or allocate() local unicodes = hashes.unicodes or allocate() +local unislots = hashes.unislots or allocate() local originals = hashes.originals or allocate() local modes = hashes.modes or allocate() local variants = hashes.variants or allocate() @@ -59,12 +60,13 @@ hashes.italics = italics hashes.lastmathids = lastmathids hashes.dynamics = dynamics hashes.unicodes = unicodes +hashes.unislots = unislots hashes.originals = originals hashes.modes = modes hashes.variants = variants -local nodepool = nodes and nodes.pool -local dummyglyph = nodepool and nodepool.register(nodepool.glyph()) +local nodepool = nodes and nodes.pool +local dummyglyph = nodepool and nodepool.register(nodepool.glyph()) local nulldata = allocate { name = "nullfont", @@ -343,6 +345,22 @@ setmetatableindex(originals, function(t,k) -- always a unicode end end) +setmetatableindex(unislots, function(t,k) + if k == true then + return unislots[currentfont()] + else + local characters = identifiers[k].characters + local resolved = setmetatableindex(function(t,k) + local c = characters[k] + local v = c and c.unicode or 0xFFFD + t[k] = v + return v -- can be a table ! + end) + t[k] = resolved + return resolved + end +end) + setmetatableindex(modes, function(t,k) if k == true then return modes[currentfont()] diff --git a/Master/texmf-dist/tex/context/base/mkiv/font-imp-dimensions.lua b/Master/texmf-dist/tex/context/base/mkiv/font-imp-dimensions.lua index 760ce37193a..9e664a68484 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/font-imp-dimensions.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/font-imp-dimensions.lua @@ -42,6 +42,7 @@ local function initialize(tfmdata,key,value) local newwidth = false local newheight = false local newdepth = false + local newshift = false if value == "strut" then newheight = gettexdimen("strutht") newdepth = gettexdimen("strutdp") @@ -55,6 +56,7 @@ local function initialize(tfmdata,key,value) newwidth = spec[1] newheight = spec[2] newdepth = spec[3] + newshift = spec[4] local quad = parameters.quad or 0 local ascender = parameters.ascender or 0 local descender = parameters.descender or 0 @@ -87,6 +89,7 @@ local function initialize(tfmdata,key,value) parameters.x_heigth = (ascender + descender) / 2 end end + -- todo: hshift too if newwidth or newheight or newdepth then for unicode, character in next, characters do local oldwidth = character.width @@ -100,8 +103,9 @@ local function initialize(tfmdata,key,value) character.height = height character.depth = depth if oldwidth ~= width then + -- todo: xoffset local commands = character.commands - local hshift = rightcommand[(width - oldwidth) / 2] + local hshift = rightcommand[newshift or ((width - oldwidth) / 2)] if commands then character.commands = prependcommands ( commands, diff --git a/Master/texmf-dist/tex/context/base/mkiv/font-imp-effects.lua b/Master/texmf-dist/tex/context/base/mkiv/font-imp-effects.lua index 43ce82b71a6..27a16914b8e 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/font-imp-effects.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/font-imp-effects.lua @@ -207,94 +207,63 @@ local rules = { "UnderbarRuleThickness", } --- local commands = char.commands --- if commands then --- local command = commands[1] --- if command and command[1] == "right" then --- commands[1] = rightcommand[command[2]-snap] --- end --- end - -- radicals are not yet ok -local setmathparameters -local setmathcharacters - -if CONTEXTLMTXMODE and CONTEXTLMTXMODE > 0 then - - setmathparameters = function(tfmdata,characters,mathparameters,dx,dy,squeeze,multiplier) - if delta ~= 0 then - for i=1,#rules do - local name = rules[i] - local value = mathparameters[name] - if value then - mathparameters[name] = (squeeze or 1) * (value + dy) - end +local function setmathparameters(tfmdata,characters,mathparameters,dx,dy,squeeze,multiplier) + -- hm, this was "if delta ~= 0 then" but delta was gone + if dy ~= 0 then + for i=1,#rules do + local name = rules[i] + local value = mathparameters[name] + if value then + mathparameters[name] = (squeeze or 1) * (value + dy) end end end +end - setmathcharacters = function() - end +local function setmathcharacters(tfmdata,characters,mathparameters,dx,dy,squeeze,wdelta,hdelta,ddelta) -else + -- still not the perfect rule - setmathparameters = function(tfmdata,characters,mathparameters,dx,dy,squeeze,multiplier) - if delta ~= 0 then - for i=1,#rules do - local name = rules[i] - local value = mathparameters[name] - if value then - mathparameters[name] = (squeeze or 1) * (value + dy) - end - end + local function wdpatch(char) + if wsnap ~= 0 then + char.width = char.width + wdelta/2 end end - setmathcharacters = function(tfmdata,characters,mathparameters,dx,dy,squeeze,wdelta,hdelta,ddelta) - - -- still not the perfect rule - - local function wdpatch(char) - if wsnap ~= 0 then - char.width = char.width + wdelta/2 - end - end - - local function htpatch(char) - if hsnap ~= 0 then - local height = char.height - if height then - char.height = char.height + 2 * dy - end + local function htpatch(char) + if hsnap ~= 0 then + local height = char.height + if height then + char.height = char.height + 2 * dy end end + end - local character = characters[0x221A] + local character = characters[0x221A] - if character and character.next then - local char = character - local next = character.next + if character and character.next then + local char = character + local next = character.next + wdpatch(char) + htpatch(char) + while next do + char = characters[next] wdpatch(char) htpatch(char) - while next do - char = characters[next] - wdpatch(char) - htpatch(char) - next = char.next - end - if char then - local v = char.vert_variants - if v then - local top = v[#v] - if top then - local char = characters[top.glyph] - htpatch(char) - end + next = char.next + end + if char then + local v = char.vert_variants + if v then + local top = v[#v] + if top then + local char = characters[top.glyph] + htpatch(char) end end end - end end @@ -304,8 +273,6 @@ end -- inspect(fonts.hashes.characters[f][c]) -- end } -local shiftmode = CONTEXTLMTXMODE and CONTEXTLMTXMODE > 0 - local function manipulateeffect(tfmdata) local effect = tfmdata.properties.effect if effect then @@ -327,49 +294,42 @@ local function manipulateeffect(tfmdata) local factor = (1 + effect.factor) * factor local hfactor = (1 + effect.hfactor) * hfactor local vfactor = (1 + effect.vfactor) * vfactor - if shiftmode then - parameters.hshift = hshift - parameters.vshift = vshift - else - vshift = vshift ~= 0 and upcommand[vshift] or false - hshift = rightcommand[hshift] - end + vshift = vshift ~= 0 and upcommand[vshift] or false + hshift = rightcommand[hshift] for unicode, character in next, characters do local oldwidth = character.width local oldheight = character.height local olddepth = character.depth if oldwidth and oldwidth > 0 then character.width = oldwidth + wdelta - if not shiftmode then - local commands = character.commands - if vshift then - if commands then - prependcommands ( commands, - -- show_effect, - hshift, - vshift - ) - else - character.commands = { - -- show_effect, - hshift, - vshift, - charcommand[unicode] - } - end + local commands = character.commands + if vshift then + if commands then + prependcommands ( commands, + -- show_effect, + hshift, + vshift + ) + else + character.commands = { + -- show_effect, + hshift, + vshift, + charcommand[unicode] + } + end + else + if commands then + prependcommands ( commands, + -- show_effect, + hshift + ) else - if commands then - prependcommands ( commands, - -- show_effect, - hshift - ) - else - character.commands = { - -- show_effect, - hshift, - charcommand[unicode] - } - end + character.commands = { + -- show_effect, + hshift, + charcommand[unicode] + } end end end diff --git a/Master/texmf-dist/tex/context/base/mkiv/font-imp-italics.lua b/Master/texmf-dist/tex/context/base/mkiv/font-imp-italics.lua index 6c432d7cf4a..8b38c5893b6 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/font-imp-italics.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/font-imp-italics.lua @@ -6,34 +6,39 @@ if not modules then modules = { } end modules ['font-imp-italics'] = { license = "see context related readme files" } -local next = next +local next, tonumber = next, tonumber local fonts = fonts local handlers = fonts.handlers local registerotffeature = handlers.otf.features.register local registerafmfeature = handlers.afm.features.register -local function initialize(tfmdata,key,value) - for unicode, character in next, tfmdata.characters do - local olditalic = character.italic - if olditalic and olditalic ~= 0 then - character.width = character.width + olditalic - character.italic = 0 - end - end -end - -local specification = { - name = "italicwidths", - description = "add italic to width", - manipulators = { - base = initialize, - node = initialize, -- only makes sense for math - } -} - -registerotffeature(specification) -registerafmfeature(specification) +-- This is a precursor to what we do in lmtx now via tweaks but at some point I +-- might make this a mkiv features too using staircase kerns. + +-- local function initialize(tfmdata,key,value) +-- local factor = tonumber(value) or 1 +-- for unicode, character in next, tfmdata.characters do +-- local olditalic = character.italic +-- if olditalic and olditalic ~= 0 then +-- character.width = character.width + olditalic +-- character.italic = 0 +-- character.bottomright = -factor * olditalic -- lmtx only +-- end +-- end +-- end +-- +-- local specification = { +-- name = "italicwidths", +-- description = "add italic to width", +-- manipulators = { +-- base = initialize, +-- node = initialize, -- only makes sense for math +-- } +-- } +-- +-- registerotffeature(specification) +-- registerafmfeature(specification) local function initialize(tfmdata,value) -- hm, always value if value then diff --git a/Master/texmf-dist/tex/context/base/mkiv/font-imp-ligatures.lua b/Master/texmf-dist/tex/context/base/mkiv/font-imp-ligatures.lua index 091eb5d4b45..02833707ba2 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/font-imp-ligatures.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/font-imp-ligatures.lua @@ -104,14 +104,14 @@ local function blockligatures(str) before = before, current = { one, two }, after = after, - lookups = { 1 }, -- not shared ! + lookups = { 1, false }, -- not shared ! } revert[new] = { -- before = before, current = { one, zwj }, -- after = { two, unpack(after) }, after = { two }, - lookups = { 1 }, -- not shared ! + lookups = { 1, false }, -- not shared ! } end end diff --git a/Master/texmf-dist/tex/context/base/mkiv/font-imp-math.lua b/Master/texmf-dist/tex/context/base/mkiv/font-imp-math.lua index d2294e93c6f..624f39f029b 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/font-imp-math.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/font-imp-math.lua @@ -16,57 +16,41 @@ local registerotffeature = fonts.handlers.otf.features.register local setmetatableindex = table.setmetatableindex --- requested for latex but not supported unless really needed in context: +-- local splitter = lpeg.splitat(",",tonumber) +-- local lpegmatch = lpeg.match -- --- registerotffeature { --- name = "ignoremathconstants", --- description = "ignore math constants table", --- initializers = { --- base = function(tfmdata,value) --- if value then --- tfmdata.mathparameters = nil +-- local function initialize(tfmdata,value) +-- local mathparameters = tfmdata.mathparameters +-- if mathparameters then +-- local sup, sub +-- if type(value) == "string" then +-- sup, sub = lpegmatch(splitter,value) +-- if not sup then +-- sub, sup = 0, 0 +-- elseif not sub then +-- sub, sup = sup, 0 -- end +-- elseif type(value) == "number" then +-- sup, sub = 0, value +-- end +-- if sup then +-- mathparameters.NoLimitSupFactor = sup +-- end +-- if sub then +-- mathparameters.NoLimitSubFactor = sub -- end +-- end +-- end +-- +-- registerotffeature { +-- name = "mathnolimitsmode", +-- description = "influence nolimits placement", +-- initializers = { +-- base = initialize, +-- node = initialize, -- } -- } --- tfmdata.properties.mathnolimitsmode = tonumber(value) or 0 - -local splitter = lpeg.splitat(",",tonumber) -local lpegmatch = lpeg.match - -local function initialize(tfmdata,value) - local mathparameters = tfmdata.mathparameters - if mathparameters then - local sup, sub - if type(value) == "string" then - sup, sub = lpegmatch(splitter,value) - if not sup then - sub, sup = 0, 0 - elseif not sub then - sub, sup = sup, 0 - end - elseif type(value) == "number" then - sup, sub = 0, value - end - if sup then - mathparameters.NoLimitSupFactor = sup - end - if sub then - mathparameters.NoLimitSubFactor = sub - end - end -end - -registerotffeature { - name = "mathnolimitsmode", - description = "influence nolimits placement", - initializers = { - base = initialize, - node = initialize, - } -} - local function initialize(tfmdata,value) tfmdata.properties.nostackmath = value and true end @@ -108,7 +92,8 @@ function fonts.helpers.mathscriptslots(tfmdata,textcode) end end end -local function initialize(tfmdata,key,value) + +local function initialize(tfmdata,value) if value then local rawdata = tfmdata.shared.rawdata local rawresources = rawdata and rawdata.resources diff --git a/Master/texmf-dist/tex/context/base/mkiv/font-imp-properties.lua b/Master/texmf-dist/tex/context/base/mkiv/font-imp-properties.lua index 21b55aeb2b0..5405737a5bd 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/font-imp-properties.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/font-imp-properties.lua @@ -72,10 +72,10 @@ do extra = amount end end - parameters.space = amount * emwidth - parameters.space_stretch = stretch * emwidth - parameters.space_shrink = shrink * emwidth - parameters.extra_space = extra * emwidth + parameters.space = amount * emwidth + parameters.spacestretch = stretch * emwidth + parameters.spaceshrink = shrink * emwidth + parameters.extraspace = extra * emwidth end end diff --git a/Master/texmf-dist/tex/context/base/mkiv/font-imp-reorder.lua b/Master/texmf-dist/tex/context/base/mkiv/font-imp-reorder.lua index b2dec781c7d..323978cde20 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/font-imp-reorder.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/font-imp-reorder.lua @@ -35,6 +35,7 @@ local trace_reorder = trackers.register("fonts.reorderlookups",function(v) trac local report_reorder = logs.reporter("fonts","reorder") local vectors = { } +otf.vectors = vectors -- kind of private vectors.arab = { gsub = { @@ -97,7 +98,7 @@ function otf.reorderlookups(tfmdata,vector) if not what then what = find(kind,"^gsub") and "gsub" or "gpos" end - local newwhen = order[what][feature] +-- local newwhen = order[what][feature] if not newwhen then -- skip elseif not when then diff --git a/Master/texmf-dist/tex/context/base/mkiv/font-imp-tweaks.lua b/Master/texmf-dist/tex/context/base/mkiv/font-imp-tweaks.lua index 9cbda97fa8f..6d522e48b85 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/font-imp-tweaks.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/font-imp-tweaks.lua @@ -10,10 +10,15 @@ if not context then return end local addfeature = fonts.handlers.otf.addfeature +-- The mapping directives avoids a check and copying of the (kind of special code +-- mapping tables. + addfeature { name = "uppercasing", type = "substitution", prepend = true, + mapping = true, + -- valid = function() return true end, data = characters.uccodes } @@ -21,5 +26,115 @@ addfeature { name = "lowercasing", type = "substitution", prepend = true, + mapping = true, + -- valid = function() return true end, data = characters.lccodes } + +if CONTEXTLMTXMODE > 0 then + + local nuts = nodes.nuts + local isnextchar = nuts.isnextchar + local getdisc = nuts.getdisc + local setchar = nuts.setchar + + local disc_code = nodes.nodecodes.disc + + local lccodes = characters.lccodes + local uccodes = characters.uccodes + + function fonts.handlers.otf.handlers.ctx_camelcasing(head,dataset,sequence,initialrl,font,dynamic) + local first = false + local current = head + -- local scale = 1000 + -- local xscale = 1000 + -- local yscale = 1000 + local function check(current) + while current do + -- scale, xscale, yscale = getscales(current) + local nxt, char, id = isnextchar(current,font,dynamic) -- ,scale,xscale,yscale) + if char then + if first then + local lower = lccodes[char] + if lower ~= char then + setchar(current,lower) + end + else + local upper = uccodes[char] + if upper ~= char then + setchar(current,upper) + end + first = true + end + elseif id == disc_code then + local pre, post, replace = getdisc(current) + if pre then + check(pre) + end + if post then + check(post) + end + if replace then + check(replace) + end + else + first = false + end + current = nxt + end + end + check(current) + return head + end + + addfeature { + nocheck = true, + name = "camelcasing", + type = "ctx_camelcasing", + prepend = true, + data = "action", + } + +end + +do -- for the moment this is mostly a demo feature + + local digit = { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9" } + local single = { "'" } + local double = { '"' } + + local singleprime = 0x2032 -- "′" + local doubleprime = 0x2033 -- "″" + + addfeature { + -- nocheck = true, + name = "primes", + type = "chainsubstitution", + lookups = { + { + type = "substitution", + data = { ["'"] = singleprime }, + }, + { + type = "substitution", + data = { ["'"] = doubleprime }, + }, + }, + data = { + rules = { + { + before = { digit }, + current = { single }, + after = { digit }, + lookups = { 1 }, + }, + { + before = { digit }, + current = { single, single }, + lookups = { 2, 0 }, -- zero: gsub_remove + }, + }, + }, + } + +end diff --git a/Master/texmf-dist/tex/context/base/mkiv/font-imp-unicode.lua b/Master/texmf-dist/tex/context/base/mkiv/font-imp-unicode.lua index ddb965ec977..7b2cd29bf48 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/font-imp-unicode.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/font-imp-unicode.lua @@ -18,6 +18,8 @@ local registerotffeature = fonts.handlers.otf.features.register local extraprivates = helpers.extraprivates local addprivate = helpers.addprivate +local tounicode = fonts.mappings.tounicode + local function initialize(tfmdata) for i=1,#extraprivates do local e = extraprivates[i] @@ -38,8 +40,6 @@ constructors.newfeatures.otf.register { } } -local tounicode = fonts.mappings.tounicode - local function initialize(tfmdata,key,value) if value == "ligatures" then local private = fonts.constructors and fonts.constructors.privateoffset or 0xF0000 @@ -80,3 +80,25 @@ registerotffeature { node = initialize, } } + +local function initialize(tfmdata,key,value) + if value then +-- local c = tfmdata.characters[0x002D] +-- if c then +-- c.tounicode = tounicode(0x002D) +-- end + local c = tfmdata.descriptions[0x002D] + if c then + c.tounicode = tounicode(0x002D) + end + end +end + +registerotffeature { + name = "hardhyphen", + description = "hardhyphen", + manipulators = { + base = initialize, + node = initialize, + } +} diff --git a/Master/texmf-dist/tex/context/base/mkiv/font-ini.mkvi b/Master/texmf-dist/tex/context/base/mkiv/font-ini.mkvi index 271a81c2aa4..c51019fdd60 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/font-ini.mkvi +++ b/Master/texmf-dist/tex/context/base/mkiv/font-ini.mkvi @@ -474,15 +474,52 @@ \installcorenamespace{mappedfontsize} +% \unexpanded\def\mapfontsize +% {\dodoubleargument\font_basics_map_fontsize} + +% \def\font_basics_map_fontsize[#from][#to]% +% {\setvalue{\??mappedfontsize\the\dimexpr#from\relax}{#to}} + +% \def\font_basics_set_mapped_fontsize#from% +% {\ifcsname\??mappedfontsize\the\dimexpr#from\relax\endcsname +% \lastnamedcs\else#from% +% \fi} + +%letcsname\??mappedfontsize\s!text \endcsname\!!plusone +\letcsname\??mappedfontsize\s!script \endcsname\!!plustwo +\letcsname\??mappedfontsize\s!scriptscript\endcsname\!!plusthree + \unexpanded\def\mapfontsize - {\dodoubleargument\font_basics_map_fontsize} + {\dotripleargument\font_basics_map_fontsize} + +\def\font_basics_map_fontsize[#class][#from][#to]% + {\setvalue{% + \??mappedfontsize + #class:% + \ifcsname\??mappedfontsize#from\endcsname\lastnamedcs\else1\fi + }{#to}} + +\permanent\tolerant\protected\def\checkedmapfontsize[#class]#spacer[#from]#spacer[#to]% + {\ifcsname\??mappedfontsize#class:\csname\??mappedfontsize#from\endcsname\endcsname + % keep (user) value + \else + \mapfontsize[#class][#from][#to]% + \fi} -\def\font_basics_map_fontsize[#from][#to]% - {\setvalue{\??mappedfontsize\the\dimexpr#from\relax}{#to}} +\permanent\tolerant\def\mappedfontsize#class#from% + {\begincsname + \??mappedfontsize + #class:% + \ifcsname\??mappedfontsize#from\endcsname\lastnamedcs\else1\fi + \endcsname} \def\font_basics_set_mapped_fontsize#from% - {\ifcsname\??mappedfontsize\the\dimexpr#from\relax\endcsname - \lastnamedcs\else#from% + {\ifcsname\??mappedfontsize\fontclass:\fontface\endcsname + %\the\dimexpr\lastnamedcs\dimexpr#from\relax\relax + %\the\dimexpr\lastnamedcs\dimexpr\bodyfontsize\relax\relax + \the\dimexpr\lastnamedcs\dimexpr\normalizedbodyfontsize\relax\relax + \else % we could use default + #from% \fi} \installcorenamespace{fontbodyknown} @@ -2852,4 +2889,10 @@ \unexpanded\def\usefontpath[#1]% {\clf_addfontpath{#1}} +%D NO select discs: + +\ifdefined\discretionaryligaturemode + \discretionaryligaturemode\plusone +\fi + \protect \endinput diff --git a/Master/texmf-dist/tex/context/base/mkiv/font-lib.mkvi b/Master/texmf-dist/tex/context/base/mkiv/font-lib.mkvi index db9df49cd6f..dcb1ff1bbe7 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/font-lib.mkvi +++ b/Master/texmf-dist/tex/context/base/mkiv/font-lib.mkvi @@ -52,9 +52,9 @@ % \ifcase\directlua{tex.print(callback.list()["provide_charproc_data"] == false and 1 or 0)}\relax % % this is the generic variant that will become luatex-fonts-ocl once we have % % more recent versions of luatex 1.13/1.14 on the garden - \registerctxluafile{font-ocl}{} +% \registerctxluafile{font-ocl}{} % \else -% \registerctxluafile{font-ocm}{} + \registerctxluafile{font-ocm}{} % \fi % we use otf code for type one @@ -63,6 +63,8 @@ \registerctxluafile{font-one}{optimize} \registerctxluafile{font-afk}{} +\registerctxluafile{font-txt}{} + % tfm \registerctxluafile{font-tpk}{optimize} diff --git a/Master/texmf-dist/tex/context/base/mkiv/font-lig.lua b/Master/texmf-dist/tex/context/base/mkiv/font-lig.lua index 1aed9fc5b58..b753b881d60 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/font-lig.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/font-lig.lua @@ -6,7 +6,7 @@ if not modules then modules = { } end modules ['font-lig'] = { license = "see context related readme files", } --- This module is not loaded but generated a file for plain TeX as a substitute +-- This module is not loaded but generates a file for plain TeX as a substitute -- for collapsing the input: "luatex-fonts-lig.lua" with "collapse=yes". local next = next diff --git a/Master/texmf-dist/tex/context/base/mkiv/font-map.lua b/Master/texmf-dist/tex/context/base/mkiv/font-map.lua index c983ea96343..4aa937ed162 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/font-map.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/font-map.lua @@ -253,9 +253,9 @@ function mappings.addtounicode(data,filename,checklookups,forceligatures) local usedmap = cidinfo and fonts.cid.getmap(cidinfo) local uparser = makenameparser() -- hm, every time? if usedmap then - oparser = usedmap and makenameparser(cidinfo.ordering) - cidnames = usedmap.names - cidcodes = usedmap.unicodes + oparser = usedmap and makenameparser(cidinfo.ordering) + cidnames = usedmap.names + cidcodes = usedmap.unicodes end local ns = 0 local nl = 0 diff --git a/Master/texmf-dist/tex/context/base/mkiv/font-mis.lua b/Master/texmf-dist/tex/context/base/mkiv/font-mis.lua index 18120f524a0..f721be0ef8f 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/font-mis.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/font-mis.lua @@ -21,7 +21,7 @@ local readers = otf.readers if readers then - otf.version = otf.version or 3.113 + otf.version = otf.version or 3.133 otf.cache = otf.cache or containers.define("fonts", "otl", otf.version, true) function fonts.helpers.getfeatures(name,save) diff --git a/Master/texmf-dist/tex/context/base/mkiv/font-mps.lua b/Master/texmf-dist/tex/context/base/mkiv/font-mps.lua index 8bfe23b892b..d75267a09ae 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/font-mps.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/font-mps.lua @@ -279,7 +279,7 @@ local getdepth = nuts.getdepth local getexpansion = nuts.getexpansion local isglyph = nuts.isglyph -local effective_glue = nuts.effective_glue +local effectiveglue = nuts.effectiveglue local characters = fonts.hashes.characters local parameters = fonts.hashes.parameters @@ -362,7 +362,7 @@ function fonts.metapost.boxtomp(n,kind) elseif id == kern_code then dx = dx + getkern(current) * fc elseif id == glue_code then - dx = dx + effective_glue(current,parent) * fc + dx = dx + effectiveglue(current,parent) * fc elseif id == hlist_code then local list = getlist(current) if list then @@ -420,7 +420,7 @@ function fonts.metapost.boxtomp(n,kind) elseif id == kern_code then dy = dy - getkern(current) * fc elseif id == glue_code then - dy = dy - effective_glue(current,parent) * fc + dy = dy - effectiveglue(current,parent) * fc elseif id == rule_code then local wd, ht, dp = getwhd(current) local hd = (ht + dp) * fc diff --git a/Master/texmf-dist/tex/context/base/mkiv/font-nod.lua b/Master/texmf-dist/tex/context/base/mkiv/font-nod.lua index ed307e7c531..a7dcfd9b09b 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/font-nod.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/font-nod.lua @@ -70,11 +70,11 @@ local setbox = nuts.setbox local setchar = nuts.setchar local setsubtype = nuts.setsubtype -local copy_node_list = nuts.copy_list -local hpack_node_list = nuts.hpack -local flush_node_list = nuts.flush_list -local protect_glyphs = nuts.protect_glyphs -local start_of_par = nuts.start_of_par +local copy_node_list = nuts.copylist +local hpacknodelist = nuts.hpack +local flushnodelist = nuts.flushlist +local protectglyphs = nuts.protectglyphs +local startofpar = nuts.startofpar local nextnode = nuts.traversers.node local nextglyph = nuts.traversers.glyph @@ -144,7 +144,7 @@ function step_tracers.reset() for i=1,#collection do local c = collection[i] if c then - flush_node_list(c) + flushnodelist(c) end end collection, messages = { }, { } @@ -158,7 +158,7 @@ function step_tracers.glyphs(n,i) local c = collection[i] if c then local c = copy_node_list(c) - local b = hpack_node_list(c) -- multiple arguments + local b = hpacknodelist(c) -- multiple arguments setbox(n,b) end end @@ -266,7 +266,7 @@ function step_tracers.codes(i,command,space) local char, id = isglyph(c) if char then showchar(char,id) - elseif id == dir_code or (id == par_code and start_of_par(c)) then + elseif id == dir_code or (id == par_code and startofpar(c)) then context("[%s]",getdirection(c) or "?") elseif id == disc_code then local pre, post, replace = getdisc(c) @@ -317,7 +317,7 @@ function step_tracers.check(head) if l then -- hm, can be false n = l end - protect_glyphs(n) + protectglyphs(n) collection[1] = n end end @@ -333,7 +333,7 @@ function step_tracers.register(head) if l then -- hm, can be false n = l end - protect_glyphs(n) + protectglyphs(n) collection[nc] = n end end diff --git a/Master/texmf-dist/tex/context/base/mkiv/font-ocl.lua b/Master/texmf-dist/tex/context/base/mkiv/font-ocl.lua index e6a38af5c3e..7d960922f47 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/font-ocl.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/font-ocl.lua @@ -370,13 +370,24 @@ if context then local xmlconvert = xml.convert local xmlfirst = xml.first + -- function otfsvg.filterglyph(entry,index) + -- -- we only support decompression in lmtx, so one needs to wipe the + -- -- cache when invalid xml is reported + -- local svg = xmlconvert(entry.data) + -- local root = svg and xmlfirst(svg,"/svg[@id='glyph"..index.."']") + -- local data = root and tostring(root) + -- -- report_svg("data for glyph %04X: %s",index,data) + -- return data + -- end + function otfsvg.filterglyph(entry,index) - -- we only support decompression in lmtx, so one needs to wipe the - -- cache when invalid xml is reported - local svg = xmlconvert(entry.data) + local d = entry.data + if gzip.compressed(d) then + d = gzip.decompress(d) or d + end + local svg = xmlconvert(d) local root = svg and xmlfirst(svg,"/svg[@id='glyph"..index.."']") local data = root and tostring(root) - -- report_svg("data for glyph %04X: %s",index,data) return data end @@ -412,6 +423,9 @@ end -- -- Because a generic setup can be flawed we need to catch bad inkscape runs which add a bit of -- ugly overhead. Bah. + -- + -- In the long run this method is a dead end because we cannot rely on command line arguments + -- etc to be upward compatible (so no real batch tool). local new = nil @@ -430,9 +444,10 @@ end -- local indices = fonts.getindices(tfmdata) local descriptions = tfmdata.descriptions local nofshapes = #svgshapes + local s_format = inkscapeformat("pdf") -- hack, this will go away when is >= 0 is everywhere local f_svgfile = formatters["temp-otf-svg-shape-%i.svg"] local f_pdffile = formatters["temp-otf-svg-shape-%i.pdf"] - local f_convert = formatters["%s --export-%s=%s\n"] + local f_convert = formatters[new and "file-open:%s; export-%s:%s; export-do\n" or "%s --export-%s=%s\n"] local filterglyph = otfsvg.filterglyph local nofdone = 0 local processed = { } @@ -446,7 +461,7 @@ end local svgfile = f_svgfile(index) local pdffile = f_pdffile(index) savedata(svgfile,data) - inkscape:write(f_convert(svgfile,inkscapeformat("pdf"),pdffile)) + inkscape:write(f_convert(svgfile,s_format,pdffile)) processed[index] = true nofdone = nofdone + 1 if nofdone % 25 == 0 then diff --git a/Master/texmf-dist/tex/context/base/mkiv/font-ocm.lua b/Master/texmf-dist/tex/context/base/mkiv/font-ocm.lua index 2f6c29e65d8..e54799b235f 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/font-ocm.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/font-ocm.lua @@ -40,16 +40,16 @@ callback.register("provide_charproc_data",function(action,f,...) end) local defaults = { - [1] = function() return 0, 0 end, - [2] = function() return 0, 0 end, - [3] = function() return 0.001, "" end, + function() return 0, 0 end, + function() return 0, 0 end, + function() return 0.001, "" end, } local function registeractions(t) return { - [1] = t.preroll or defaults[1], - [2] = t.collect or defaults[2], - [3] = t.wrapup or defaults[3], + t.preroll or defaults[1], + t.collect or defaults[2], + t.wrapup or defaults[3], } end @@ -408,6 +408,7 @@ local pdftovirtual do scale = scale * (width / (xform.width * bpfactor)) dy = - depth + dy +-- png .. no time to figure it out now -- dx = 0 -- dy = 0 local object = pdf.immediateobj("stream",f_stream(width,scale,scale,dx,dy,c)), width @@ -558,6 +559,9 @@ local initializesvg do -- -- Because a generic setup can be flawed we need to catch bad inkscape runs which add a bit of -- ugly overhead. Bah. + -- + -- In the long run this method is a dead end because we cannot rely on command line arguments + -- etc to be upward compatible (so no real batch tool). local new = nil @@ -576,9 +580,10 @@ local initializesvg do -- local indices = fonts.getindices(tfmdata) local descriptions = tfmdata.descriptions local nofshapes = #svgshapes + local s_format = inkscapeformat("pdf") -- hack, this will go away when is >= 0 is everywhere local f_svgfile = formatters["temp-otf-svg-shape-%i.svg"] local f_pdffile = formatters["temp-otf-svg-shape-%i.pdf"] - local f_convert = formatters["%s --export-%s=%s\n"] + local f_convert = formatters[new and "file-open:%s; export-%s:%s; export-do\n" or "%s --export-%s=%s\n"] local filterglyph = otfsvg.filterglyph local nofdone = 0 local processed = { } @@ -592,7 +597,7 @@ local initializesvg do local svgfile = f_svgfile(index) local pdffile = f_pdffile(index) savedata(svgfile,data) - inkscape:write(f_convert(svgfile,inkscapeformat("pdf"),pdffile)) + inkscape:write(f_convert(svgfile,s_format,pdffile)) processed[index] = true nofdone = nofdone + 1 if nofdone % 25 == 0 then @@ -695,34 +700,53 @@ end local initializepng do - local otfpng = otf.png or { } - otf.png = otfpng - otf.pngenabled = true + -- Alternatively we can create a single pdf file with -adjoin and then pick up pages from + -- that file but creating thousands of small files is no fun either. + local otfpng = otf.png or { } + otf.png = otfpng + otf.pngenabled = true local report_png = logs.reporter("fonts","png conversion") - local loaddata = io.loaddata local savedata = io.savedata local remove = os.remove - - local runner = sandbox and sandbox.registerrunner { - name = "otfpng", - program = "gm", - template = "convert -quality 100 temp-otf-png-shape.png temp-otf-png-shape.pdf > temp-otf-svg-shape.log", - -- reporter = report_png, - } - - if not runner then - -- - -- poor mans variant for generic: - -- - runner = function() - return os.execute("gm convert -quality 100 temp-otf-png-shape.png temp-otf-png-shape.pdf > temp-otf-svg-shape.log") + local texhack = [[\startTEXpage\externalfigure[temp-otf-png-shape.png]\stopTEXpage]] + local runner = false + local method = "gm" + + local function initialize(v) + if v == "lmtx" then + report_png("using lmtx converter, slow but okay") + runner = sandbox.registerrunner { + -- reporter = report_png, + name = "otfpng", + program = "mtxrun --script context", + template = "--once --batch --silent temp-otf-png-shape.tex > temp-otf-svg-shape.log", + } + method = v + elseif v == "mutool" then + report_png("using lmtx converter, no mask, black background") + runner = sandbox.registerrunner { + -- reporter = report_png, + name = "otfpng", + program = "mutool", + template = "convert -o temp-otf-png-shape.pdf temp-otf-png-shape.png", + } + method = v + else + report_png("using lmtx converter, no mask, white background") + runner = sandbox.registerrunner { + -- reporter = report_png, + name = "otfpng", + program = "gm", + template = "convert -quality 100 temp-otf-png-shape.png temp-otf-png-shape.pdf > temp-otf-svg-shape.log", + } + method = "gm" end + return runner end - -- Alternatively we can create a single pdf file with -adjoin and then pick up pages from - -- that file but creating thousands of small files is no fun either. + directives.register("backend.otfpng.method",initialize) local files = utilities.files local openfile = files.open @@ -735,12 +759,19 @@ local initializepng do local pdfshapes = { } local pngfile = "temp-otf-png-shape.png" local pdffile = "temp-otf-png-shape.pdf" + local logfile = "temp-otf-png-shape.log" + local texfile = "temp-otf-png-shape.tex" + local tucfile = "temp-otf-png-shape.tuc" local nofdone = 0 local indices = sortedkeys(pngshapes) -- can be sparse local nofindices = #indices report_png("processing %i png containers",nofindices) statistics.starttiming() local filehandle = openfile(filename) + savedata(texfile,texhack) -- not always used but who cares + if not runner then + initialize() + end for i=1,nofindices do local index = indices[i] local entry = pngshapes[index] @@ -771,6 +802,9 @@ local initializepng do report_png("processing %i pdf results",nofindices) remove(pngfile) remove(pdffile) + remove(logfile) + remove(texfile) + remove(tucfile) statistics.stoptiming() if statistics.elapsedseconds then report_png("png conversion time %s",statistics.elapsedseconds() or "-") @@ -789,7 +823,7 @@ local initializepng do end local pdffile = containers.read(otf.pdfcache,hash) local pdfshapes = pdffile and pdffile.pdfshapes - if not pdfshapes or pdffile.timestamp ~= timestamp then + if not pdfshapes or pdffile.timestamp ~= timestamp or pdffile.timestamp ~= method then local pngfile = containers.read(otf.pngcache,hash) local filename = tfmdata.resources.filename local pngshapes = pngfile and pngfile.pngshapes @@ -797,6 +831,7 @@ local initializepng do containers.write(otf.pdfcache, hash, { pdfshapes = pdfshapes, timestamp = timestamp, + method = method, }) end -- diff --git a/Master/texmf-dist/tex/context/base/mkiv/font-onr.lua b/Master/texmf-dist/tex/context/base/mkiv/font-onr.lua index c33b09f9e2a..9e5a012bd5f 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/font-onr.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/font-onr.lua @@ -211,6 +211,8 @@ do + P(1) )^0 * Carg(1) + -- cache this? + local function loadpfbvector(filename,shapestoo,streams) -- for the moment limited to encoding only diff --git a/Master/texmf-dist/tex/context/base/mkiv/font-osd.lua b/Master/texmf-dist/tex/context/base/mkiv/font-osd.lua index 87453d9e2d9..f35be2cd188 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/font-osd.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/font-osd.lua @@ -6,7 +6,6 @@ if not modules then modules = { } end modules ['font-osd'] = { -- script devanag license = "see context related readme files" } - -- we need to check nbsphash (context only) -- A few remarks: @@ -56,6 +55,11 @@ if not modules then modules = { } end modules ['font-osd'] = { -- script devanag -- By now we have yet another incremental improved version. In the end I might -- rewrite the code. -- +-- At the start of 2022 Kauśika spent a lot of time testing combinations of fonts +-- and scripts and in the process some more tracing was added as well as a mixed +-- conjuncts options that can deal with fuzzy fonts. The machinery does what it has +-- to do but some fonts expect more magic to be applied. +-- -- Hans Hagen, PRAGMA-ADE, Hasselt NL -- Todo: @@ -81,8 +85,10 @@ if not modules then modules = { } end modules ['font-osd'] = { -- script devanag -- malayalam, oriya, tamil and tolugu but not all are checked. Also, some of the -- code below might need to be adapted to the extra scripts. -local insert, imerge, copy, tohash = table.insert, table.imerge, table.copy, table.tohash -local next, type = next, type +local insert, remove, imerge, copy, tohash = table.insert, table.remove, table.imerge, table.copy, table.tohash +local next, type, rawget = next, type, rawget +local formatters = string.formatters +local settings_to_hash = utilities.parsers.settings_to_hash local report = logs.reporter("otf","devanagari") @@ -98,6 +104,8 @@ local methods = fonts.analyzers.methods local otffeatures = fonts.constructors.features.otf local registerotffeature = otffeatures.register +local trace_steps = false + local nuts = nodes.nuts local getnext = nuts.getnext @@ -118,11 +126,11 @@ local setstate = nuts.setstate local ischar = nuts.ischar -local insert_node_after = nuts.insert_after +local insertnodeafter = nuts.insertafter local copy_node = nuts.copy local remove_node = nuts.remove -local flush_list = nuts.flush_list -local flush_node = nuts.flush_node +local flushlist = nuts.flushlist +local flushnode = nuts.flushnode local copyinjection = nodes.injections.copy -- KE: is this necessary? HH: probably not as positioning comes later and we rawget/set @@ -130,7 +138,8 @@ local unsetvalue = attributes.unsetvalue local fontdata = fonts.hashes.identifiers -local a_syllabe = attributes.private('syllabe') +local a_syllabe = "syllable" -- attributes.private('syllabe') -- can be just a property key +local a_reordered = "reordered" -- attributes.private('reordered') -- can be just a property key local dotted_circle = 0x25CC local c_nbsp = 0x00A0 @@ -156,9 +165,14 @@ replace_all_nbsp = function(head) -- delayed definition end local processcharacters = nil +local logprocess = nil if context then - local fontprocesses = fonts.hashes.processes + + local fontprocesses = fonts.hashes.processes + local tracers = nodes.tracers + local registermessage = (tracers and tracers.steppers.message) or function() end + function processcharacters(head,font) local processors = fontprocesses[font] for i=1,#processors do @@ -166,7 +180,24 @@ if context then end return head end + + -- When we'retrying to fix something it can be handy to have some more + -- details available. + + trackers.register("otf.steps", function(v) trace_steps = v end) + + logprocess = function(str) + if trace_steps then + registermessage("devanagari %s",str) + if trace_steps == "silent" then + return + end + end + report(str) + end + else + function processcharacters(head,font) local processors = fontdata[font].shared.processes for i=1,#processors do @@ -174,6 +205,11 @@ else end return head end + + logprocess = function(str) + -- do nothing + end + end -- We can assume that script are not mixed in the source but if that is the case @@ -302,7 +338,7 @@ local after_subscript = indicgroups.after_subscript local before_main = indicgroups.before_main local after_main = indicgroups.after_main -local mark_four = table.merged ( +local mark_pre_above_below_post = table.merged ( pre_mark, above_mark, below_mark, @@ -315,6 +351,14 @@ local mark_above_below_post = table.merged ( post_mark ) +-- Handy + +local devanagarihash = table.setmetatableindex(function(t,k) + local v = fontdata[k].resources.devanagari or false + t[k] = v + return v +end) + -- We use some pseudo features as we need to manipulate the nodelist based -- on information in the font as well as already applied features. We can -- probably replace some of the code below by injecting 'real' features @@ -460,7 +504,7 @@ local function initializedevanagi(tfmdata) local devanagari = resources.devanagari if not devanagari then -- - report("adding devanagari features to font") + report("adding features to font") -- local gsubfeatures = resources.features.gsub local sequences = resources.sequences @@ -491,7 +535,9 @@ local function initializedevanagi(tfmdata) for k, v in next, pre_mark do local locl = coverage[k] if locl then - if #locl > 0 then --contextchain; KE: is this right? + -- if #locl > 0 then we have a list otherwise a hash; we actually should + -- test properly for gsub_... + if #locl > 0 then for j=1,#locl do local ck = locl[j] local f = ck[4] @@ -512,6 +558,8 @@ local function initializedevanagi(tfmdata) end end end + else + -- useless next if, because locl is a table end if locl then reorder_matras.steps[1].coverage[locl] = true @@ -524,7 +572,7 @@ local function initializedevanagi(tfmdata) if basic_shaping_forms[k] then lastmatch = lastmatch + 1 if s ~= lastmatch then - table.insert(sequences, lastmatch, table.remove(sequences, s)) + insert(sequences,lastmatch,remove(sequences,s)) end end end @@ -545,9 +593,7 @@ local function initializedevanagi(tfmdata) local vatucache = { } local pstfcache = { } local seqsubset = { } - local rephstep = { - coverage = { } -- will be adapted each work - } + local rephstep = { coverage = { } } -- will be adapted each work local devanagari = { reph = false, vattu = false, @@ -577,7 +623,7 @@ local function initializedevanagi(tfmdata) local has_pstf = features.pstf if has_rphf and has_rphf[script] then devanagari.reph = true - elseif (has_blwf and has_blwf[script] ) or (has_vatu and has_vatu[script] ) then + elseif (has_blwf and has_blwf[script]) or (has_vatu and has_vatu[script]) then devanagari.vattu = true for i=1,nofsteps do local step = steps[i] @@ -585,10 +631,8 @@ local function initializedevanagi(tfmdata) if coverage then for k, v in next, coverage do for h, w in next, halant do - if v[h] then - if not blwfcache[k] then - blwfcache[k] = v - end + if v[h] and not blwfcache[k] then + blwfcache[k] = v end if has_vatu and has_vatu[script] and not vatucache[k] then vatucache[k] = v @@ -610,34 +654,40 @@ local function initializedevanagi(tfmdata) for k, v in next, ra do local r = coverage[k] if r then + -- if #r > 0 then we have a list otherwise a hash; we actually should + -- test properly for gsub_... local found = false - if #r > 0 then -- contextchain; KE: is this right? + if #r > 0 then for j=1,#r do - local ck = r[j] - local f = ck[4] + local ck = r[j] + local f = ck[4] local chainlookups = ck[6] - if chainlookups and chainlookups[f] then --KE: why is check for chainlookups[f] necessacy??? + if chainlookups then local chainlookup = chainlookups[f] - for j=1,#chainlookup do - local chainstep = chainlookup[j] - local steps = chainstep.steps - local nofsteps = chainstep.nofsteps - for i=1,nofsteps do - local step = steps[i] - local coverage = step.coverage - if coverage then - local h = coverage[k] - if h then - for k, v in next, h do - found = v and v.ligature + if chainlookup then + for j=1,#chainlookup do + local chainstep = chainlookup[j] + local steps = chainstep.steps + local nofsteps = chainstep.nofsteps + for i=1,nofsteps do + local step = steps[i] + local coverage = step.coverage + if coverage then + local h = coverage[k] + if h then + for k, v in next, h do + if v then + found = tonumber(v) or v.ligature + if found then + pre_base_reordering_consonants[found] = true + break + end + end + end if found then - pre_base_reordering_consonants[found] = true break end end - if found then - break - end end end end @@ -646,10 +696,12 @@ local function initializedevanagi(tfmdata) end else for k, v in next, r do - found = v and v.ligature - if found then - pre_base_reordering_consonants[found] = true - break + if v then + found = tonumber(v) or v.ligature + if found then + pre_base_reordering_consonants[found] = true + break + end end end end @@ -667,18 +719,21 @@ local function initializedevanagi(tfmdata) local step = steps[i] local coverage = step.coverage if coverage then - local reph, rephbase = false, false + local reph = false + local base = false if kind == "rphf" then -- rphf acts on consonant + halant for k, v in next, ra do local r = coverage[k] if r then - rephbase = k + -- if #r > 0 then we have a list otherwise a hash; we actually should + -- test properly for gsub_... + base = k local h = false - if #r > 0 then --contextchain; KE: is this right? + if #r > 0 then for j=1,#r do - local ck = r[j] - local f = ck[4] + local ck = r[j] + local f = ck[4] local chainlookups = ck[6] if chainlookups then local chainlookup = chainlookups[f] @@ -695,7 +750,7 @@ local function initializedevanagi(tfmdata) for k, v in next, halant do local h = r[k] if h then - reph = h.ligature or false + reph = tonumber(h) or h.ligature or false break end end @@ -712,7 +767,7 @@ local function initializedevanagi(tfmdata) for k, v in next, halant do local h = r[k] if h then - reph = h.ligature or false + reph = tonumber(h) or h.ligature or false break end end @@ -723,7 +778,9 @@ local function initializedevanagi(tfmdata) end end end - seqsubset[#seqsubset+1] = { kind, coverage, reph, rephbase } +-- if reph then + seqsubset[#seqsubset+1] = { kind, coverage, reph, base } +-- end end end end @@ -737,18 +794,20 @@ local function initializedevanagi(tfmdata) for k, v in next, halant do local h = coverage[k] if h then + -- if #h > 0 then we have a list otherwise a hash; we actually should + -- test properly for gsub_... local found = false - if #h > 0 then -- contextchain; KE: is this right? + if #h > 0 then for j=1,#h do - local ck = h[j] - local f = ck[4] + local ck = h[j] + local f = ck[4] local chainlookups = ck[6] if chainlookups then local chainlookup = chainlookups[f] for j=1,#chainlookup do local chainstep = chainlookup[j] - local steps = chainstep.steps - local nofsteps = chainstep.nofsteps + local steps = chainstep.steps + local nofsteps = chainstep.nofsteps for i=1,nofsteps do local step = steps[i] local coverage = step.coverage @@ -756,10 +815,12 @@ local function initializedevanagi(tfmdata) local h = coverage[k] if h then for k, v in next, h do - found = v and v.ligature - if found then - pre_base_reordering_consonants[found] = true - break + if v then + found = tonumber(v) or v.ligature + if found then + pre_base_reordering_consonants[found] = true + break + end end end if found then @@ -773,7 +834,7 @@ local function initializedevanagi(tfmdata) end else for k, v in next, h do - found = v and v.ligature + found = v and (tonumber(v) or v.ligature) if found then pre_base_reordering_consonants[found] = true break @@ -800,9 +861,9 @@ local function initializedevanagi(tfmdata) sharedfeatures["dv03"] = true -- dv03_reorder_pre_base_reordering_consonants sharedfeatures["dv04"] = true -- dv04_remove_joiners end - if script == "mlym" or script == "taml" then - devanagari.left_matra_before_base = true - end + -- if script == "mlym" or script == "taml" then + -- devanagari.movematra = "leftbeforebase" + -- end end end end @@ -816,6 +877,49 @@ registerotffeature { }, } +local function initializeconjuncts(tfmdata,value) + if value then + local resources = tfmdata.resources + local devanagari = resources.devanagari + if devanagari then + -- quit was the old situation + local conjuncts = "auto" -- mixed|continue|quit|auto + local movematra = "auto" -- default|leftbeforebase|auto + if type(value) == "string" and value ~= "auto" then + value = settings_to_hash(value) + conjuncts = rawget(value,"conjuncts") or conjuncts + movematra = rawget(value,"movematra") or movematra + end + if conjuncts == "auto" then + conjuncts = "mixed" -- for all scripts ? + end + if movematra == "auto" and + script == "mlym" or + script == "taml" then + movematra = "leftbeforebase" + else + movematra = "default" + end + devanagari.conjuncts = conjuncts + devanagari.movematra = movematra + -- + if trace_steps then + report("conjuncts %a, movematra %a",conjuncts,movematra) + end + -- + end + end +end + +registerotffeature { + name = "indic", + description = "control indic", + default = "auto", + initializers = { + node = initializeconjuncts, + }, +} + local show_syntax_errors = false local function inject_syntax_error(head,current,char) @@ -826,7 +930,7 @@ local function inject_syntax_error(head,current,char) else setchar(current,dotted_circle) end - return insert_node_after(head,current,signal) + return insertnodeafter(head,current,signal) end -- hm, this is applied to one character: @@ -874,38 +978,44 @@ local function initialize_one(font,attr) -- we need a proper hook into the datas end -local function contextchain(contexts, n) +-- HH: somehow we can get a non context here so for now we check for .n + +local function contextchain(contexts,n) local char = getchar(n) - for k=1,#contexts do - local ck = contexts[k] - local seq = ck[3] - local f = ck[4] - local l = ck[5] - if (l - f) == 1 and seq[f+1][char] then - local ok = true - local c = n - for i=l+1,#seq do - c = getnext(c) - if not c or not seq[i][ischar(c)] then - ok = false - break - end - end - if ok then - c = getprev(n) - for i=1,f-1 do - c = getprev(c) - if not c or not seq[f-i][ischar(c)] then + if not contexts.n then + return contexts[char] + else + for k=1,#contexts do + local ck = contexts[k] + local seq = ck[3] + local f = ck[4] + local l = ck[5] + if (l - f) == 1 and seq[f+1][char] then + local ok = true + local c = n + for i=l+1,#seq do + c = getnext(c) + if not c or not seq[i][ischar(c)] then ok = false + break end end - end - if ok then - return true + if ok then + c = getprev(n) + for i=1,f-1 do + c = getprev(c) + if not c or not seq[f-i][ischar(c)] then + ok = false + end + end + end + if ok then + return true + end end end + return false end - return false end local function order_matras(c) @@ -937,11 +1047,13 @@ local function order_matras(c) end end +local swapped = table.swapped(states) + local function reorder_one(head,start,stop,font,attr,nbspaces) local reph, vattu, blwfcache, vatucache, pstfcache = initialize_one(font,attr) -- todo: a hash[font] - local devanagari = fontdata[font].resources.devanagari + -- local devanagari = devanagarihash[font] local current = start local n = getnext(start) local base = nil @@ -968,7 +1080,10 @@ local function reorder_one(head,start,stop,font,attr,nbspaces) if current == stop then stop = getprev(stop) head = remove_node(head,current) - flush_node(current) + flushnode(current) + if trace_steps then + logprocess("reorder one, remove nbsp") + end return head, stop, nbspaces else nbspaces = nbspaces + 1 @@ -998,7 +1113,7 @@ local function reorder_one(head,start,stop,font,attr,nbspaces) tempcurrent = processcharacters(tempcurrent,font) setstate(tempcurrent,unsetvalue) if getchar(next) == getchar(tempcurrent) then - flush_list(tempcurrent) + flushlist(tempcurrent) if show_syntax_errors then head, current = inject_syntax_error(head,current,char) end @@ -1006,12 +1121,15 @@ local function reorder_one(head,start,stop,font,attr,nbspaces) setchar(current,getchar(tempcurrent)) -- we assumes that the result of blwf consists of one node local freenode = getnext(current) setlink(current,tmp) - flush_node(freenode) - flush_list(tempcurrent) + flushnode(freenode) + flushlist(tempcurrent) if changestop then stop = current end end + if trace_steps then + logprocess("reorder one, handle nbsp") + end end end end @@ -1073,6 +1191,9 @@ local function reorder_one(head,start,stop,font,attr,nbspaces) if lastcons == stop then stop = n end + if trace_steps then + logprocess("reorder one, handle halant") + end end end @@ -1102,6 +1223,9 @@ local function reorder_one(head,start,stop,font,attr,nbspaces) if matra == stop then stop = n end + if trace_steps then + logprocess("reorder one, handle matra") + end end local current = start @@ -1148,14 +1272,19 @@ local function reorder_one(head,start,stop,font,attr,nbspaces) end local tpm = twopart_mark[ch] - while tpm do - local extra = copy_node(n) - copyinjection(extra,n) - ch = tpm[1] - setchar(n,ch) - setchar(extra,tpm[2]) - head = insert_node_after(head,current,extra) - tpm = twopart_mark[ch] + if tpm then + while tpm do + local extra = copy_node(n) + copyinjection(extra,n) + ch = tpm[1] + setchar(n,ch) + setchar(extra,tpm[2]) + head = insertnodeafter(head,current,extra) + tpm = twopart_mark[ch] + end + if trace_steps then + logprocess("reorder one, handle mark") + end end while c ~= stop and dependent_vowel[ch] do c = n @@ -1178,10 +1307,11 @@ local function reorder_one(head,start,stop,font,attr,nbspaces) local bp = getprev(firstcons) local cn = getnext(current) local last = getnext(c) + local done = false while cn ~= last do -- move pre-base matras... if pre_mark[getchar(cn)] then - if devanagari.left_matra_before_base then + if devanagarihash[font].movematra == "leftbeforebase" then local prev, next = getboth(cn) setlink(prev,next) if cn == stop then @@ -1219,6 +1349,7 @@ local function reorder_one(head,start,stop,font,attr,nbspaces) end cn = next end + done = true elseif current ~= base and dependent_vowel[getchar(cn)] then local prev, next = getboth(cn) if next then @@ -1231,6 +1362,7 @@ local function reorder_one(head,start,stop,font,attr,nbspaces) setlink(b,cn,getnext(b)) order_matras(cn) cn = next + done = true elseif current == base and dependent_vowel[getchar(cn)] then local cnn = getnext(cn) order_matras(cn) @@ -1244,10 +1376,15 @@ local function reorder_one(head,start,stop,font,attr,nbspaces) end allreordered = c == stop current = getnext(c) + if done and trace_steps then + logprocess("reorder one, matra") + end end if reph or vattu then - local current, cns = start, nil + local current = start + local cns = nil + local done = false while current ~= stop do local c = current local n = getnext(current) @@ -1280,6 +1417,7 @@ local function reorder_one(head,start,stop,font,attr,nbspaces) local next = getnext(b) setlink(c,next) setlink(b,current) + done = true end elseif cns and getnext(cns) ~= current then -- todo: optimize next -- position below-base Ra (vattu) following the consonants on which it is placed (either the base consonant or one of the pre-base consonants) @@ -1288,6 +1426,7 @@ local function reorder_one(head,start,stop,font,attr,nbspaces) setlink(cp,n) setlink(cns,current) -- cns ? setlink(c,cnsn) + done = true if c == stop then stop = cp break @@ -1327,15 +1466,18 @@ local function reorder_one(head,start,stop,font,attr,nbspaces) end current = getnext(current) end + if done and trace_steps then + logprocess("reorder one, handle reph and vata") -- todo: boolean + end end if getchar(base) == c_nbsp then nbspaces = nbspaces - 1 if base == stop then - stop = getprev(stop) + stop = getprev(stop) end head = remove_node(head,base) - flush_node(base) + flushnode(base) end return head, stop, nbspaces @@ -1373,6 +1515,9 @@ function handlers.devanagari_reorder_matras(head,start) -- no leak setlink(current,start) -- setlink(current,start,next) -- maybe start = startnext + if trace_steps then + logprocess("reorder matra") + end break -- elseif consonant[char] and (not getstate(current) or getstate(current,s_init) then -- startnext = getnext(start) @@ -1438,6 +1583,9 @@ function handlers.devanagari_reorder_reph(head,start) local char = ischar(current,startfont) if char and getprop(current,a_syllabe) == startattr then if halant[char] then + if trace_steps then + logprocess("reorder reph, handling halant") + end local next = getnext(current) if next then local nextchar = ischar(next,startfont) @@ -1475,6 +1623,9 @@ function handlers.devanagari_reorder_reph(head,start) local char = ischar(current,startfont) if char and getprop(current,a_syllabe) == startattr then if consonant[char] and not getstate(current,s_pref) then + if trace_steps then + logprocess("reorder reph, handling consonant") + end startnext = getnext(start) head = remove_node(head,start) setlink(current,start) @@ -1506,6 +1657,9 @@ function handlers.devanagari_reorder_reph(head,start) local char = ischar(current,startfont) if char and getprop(current,a_syllabe) == startattr then if getstate(current,s_pstf) then -- post-base + if trace_steps then + logprocess("reorder reph, before postscript, post base") + end startnext = getnext(start) head = remove_node(head,start) setlink(getprev(current),start) @@ -1514,12 +1668,15 @@ function handlers.devanagari_reorder_reph(head,start) start = startnext startattr = getprop(start,a_syllabe) break - elseif not c and ( vowel_modifier[char] or stress_tone_mark[char] ) then + elseif not c and (vowel_modifier[char] or stress_tone_mark[char]) then c = current end current = getnext(current) else if c then + if trace_steps then + logprocess("reorder reph, before postscript") + end startnext = getnext(start) head = remove_node(head,start) setlink(getprev(c),start) @@ -1551,7 +1708,13 @@ function handlers.devanagari_reorder_reph(head,start) local state = getstate(current) if before_subscript[rephbase] and (state == s_blwf or state == s_pstf) then c = current + if trace_steps then + logprocess("reorder reph, before subscript") + end elseif after_subscript[rephbase] and (state == s_pstf) then + if trace_steps then + logprocess("reorder reph, after subscript") + end c = current end current = getnext(current) @@ -1589,6 +1752,9 @@ function handlers.devanagari_reorder_reph(head,start) end end if start ~= current then + if trace_steps then + logprocess("reorder reph, to end") + end startnext = getnext(start) head = remove_node(head,start) setlink(start,getnext(current)) @@ -1616,10 +1782,10 @@ end -- return head, start, done -- end -local reordered_pre_base_reordering_consonants = { } -- shared ? not reset ? +-- todo: nodes -> table -> nodes function handlers.devanagari_reorder_pre_base_reordering_consonants(head,start) - if reordered_pre_base_reordering_consonants[start] then + if getprop(start,a_reordered) then return head, start, true end local current = start -- we could cache attributes here @@ -1630,6 +1796,9 @@ function handlers.devanagari_reorder_pre_base_reordering_consonants(head,start) local next = getnext(current) if char and getprop(current,a_syllabe) == startattr then if halant[char] then -- state can also be init + if trace_steps then + logprocess("reorder pre base consonants, handle halant") + end if next then local char = ischar(next,startfont) if char and zw_char[char] and getprop(next,a_syllabe) == startattr then @@ -1643,7 +1812,7 @@ function handlers.devanagari_reorder_pre_base_reordering_consonants(head,start) setlink(start,next) setlink(current,start) -- setlink(current,start,next) -- maybe - reordered_pre_base_reordering_consonants[start] = true + setprop(start,"reordered",true) start = startnext return head, start, true -- elseif consonant[char] and (not getstate(current) or getstate(current,s_init)) then @@ -1670,6 +1839,9 @@ function handlers.devanagari_reorder_pre_base_reordering_consonants(head,start) while current and getprop(current,a_syllabe) == startattr do local char = ischar(current) if (not dependent_vowel[char] and (not getstate(current) or getstate(current,s_init))) then + if trace_steps then + logprocess("reorder pre base consonants, handle vowel or initial") + end startnext = getnext(start) head = remove_node(head,start) if current == head then @@ -1679,7 +1851,7 @@ function handlers.devanagari_reorder_pre_base_reordering_consonants(head,start) setlink(getprev(current),start) setlink(start,current) end - reordered_pre_base_reordering_consonants[start] = true + setprop(start,"reordered",true) start = startnext break end @@ -1712,7 +1884,10 @@ function handlers.devanagari_remove_joiners(head,start,kind,lookupname,replaceme if head == start then head = stop end - flush_list(start) + flushlist(start) + if trace_steps then + logprocess("remove joiners") + end return head, stop, true end @@ -1739,8 +1914,8 @@ local function reorder_two(head,start,stop,font,attr,nbspaces) -- maybe do a pas local subpos = nil local postpos = nil - reorderreph.coverage = { } - rephbase[font] = { } + reorderreph.coverage = { } -- use local + rephbase[font] = { } -- use local for i=1,#seqsubset do @@ -1750,8 +1925,12 @@ local function reorder_two(head,start,stop,font,attr,nbspaces) -- maybe do a pas local kind = subset[1] local lookupcache = subset[2] if kind == "rphf" then - reorderreph.coverage[subset[3]] = true -- neat - rephbase[font][subset[3]] = subset[4] + -- + local reph = subset[3] + local base = subset[4] + reorderreph.coverage[reph] = true -- neat -- use local + rephbase[font][reph] = base -- use local + -- local current = start local last = getnext(stop) while current ~= last do @@ -1760,15 +1939,15 @@ local function reorder_two(head,start,stop,font,attr,nbspaces) -- maybe do a pas local found = lookupcache[c] if found then local next = getnext(current) - if found[getchar(next)] or contextchain(found, next) then --above-base: rphf Consonant + Halant + if contextchain(found, next) then -- above-base: rphf Consonant + Halant local afternext = next ~= stop and getnext(next) if afternext and zw_char[getchar(afternext)] then -- ZWJ and ZWNJ prevent creation of reph current = afternext -- getnext(next) elseif current == start then setstate(current,s_rphf) - current = next + current = next -- later again next else - current = next + current = next -- later again next end end end @@ -1784,8 +1963,8 @@ local function reorder_two(head,start,stop,font,attr,nbspaces) -- maybe do a pas local found = lookupcache[c] if found then -- pre-base: pref Halant + Consonant local next = getnext(current) - if found[getchar(next)] or contextchain(found, next) then - if (not getstate(current) and not getstate(next)) then --KE: state can also be init... + if contextchain(found, next) then + if not getstate(current) and not getstate(next) then --KE: state can also be init... setstate(current,s_pref) setstate(next,s_pref) current = next @@ -1804,10 +1983,10 @@ local function reorder_two(head,start,stop,font,attr,nbspaces) -- maybe do a pas local found = lookupcache[c] if found then local next = getnext(current) - if found[getchar(next)] or contextchain(found, next) then + if contextchain(found, next) then if next ~= stop and getchar(getnext(next)) == c_zwnj then -- zwnj prevent creation of half current = next - elseif (not getstate(current)) then --KE: state can also be init... + elseif not getstate(current) then --KE: state can also be init... setstate(current,s_half) if not halfpos then halfpos = current @@ -1828,8 +2007,8 @@ local function reorder_two(head,start,stop,font,attr,nbspaces) -- maybe do a pas local found = lookupcache[c] if found then local next = getnext(current) - if found[getchar(next)] or contextchain(found, next) then - if (not getstate(current) and not getstate(next)) then --KE: state can also be init... + if contextchain(found, next) then + if not getstate(current) and not getstate(next) then --KE: state can also be init... setstate(current,s_blwf) setstate(next,s_blwf) current = next @@ -1849,8 +2028,8 @@ local function reorder_two(head,start,stop,font,attr,nbspaces) -- maybe do a pas local found = lookupcache[c] if found then local next = getnext(current) - if found[getchar(next)] or contextchain(found, next) then - if (not getstate(current) and not getstate(next)) then -- KE: state can also be init... + if contextchain(found, next) then + if not getstate(current) and not getstate(next) then -- KE: state can also be init... setstate(current,s_pstf) setstate(next,s_pstf) current = next @@ -1864,7 +2043,7 @@ local function reorder_two(head,start,stop,font,attr,nbspaces) -- maybe do a pas end end - local current, base, firstcons = start, nil, nil + local current, base, firstcons, subnotafterbase, postnotafterbase = start, nil, nil, nil, nil if getstate(start,s_rphf) then -- if syllable starts with Ra + H and script has 'Reph' then exclude Reph from candidates for base consonants @@ -1876,7 +2055,10 @@ local function reorder_two(head,start,stop,font,attr,nbspaces) -- maybe do a pas if current == stop then stop = getprev(stop) head = remove_node(head,current) - flush_node(current) + flushnode(current) + if trace_steps then + logprocess("reorder two, remove nbsp") + end return head, stop, nbspaces else nbspaces = nbspaces + 1 @@ -1917,11 +2099,22 @@ local function reorder_two(head,start,stop,font,attr,nbspaces) -- maybe do a pas end end end + if trace_steps then + logprocess("reorder two, handle nbsp") + end end else -- not Stand Alone cluster local last = getnext(stop) while current ~= last do -- find base consonant local next = getnext(current) +-- IF PATCHED THEN +-- if current == subpos then +-- subnotafterbase = current +-- end +-- if current == postpos then +-- postnotafterbase = current +-- end +-- END if consonant[getchar(current)] then if not (current ~= stop and next ~= stop and halant[getchar(next)] and getchar(getnext(next)) == c_zwj) then if not firstcons then @@ -1931,6 +2124,14 @@ local function reorder_two(head,start,stop,font,attr,nbspaces) -- maybe do a pas local a = getstate(current) if not (a == s_blwf or a == s_pstf or (a ~= s_rphf and a ~= s_blwf and ra[getchar(current)])) then base = current +-- IF PATCHED THEN +-- if subnotafterbase then +-- subpos = base +-- end +-- if postnotafterbase then +-- postpos = base +-- end +-- END end end end @@ -1948,7 +2149,7 @@ local function reorder_two(head,start,stop,font,attr,nbspaces) -- maybe do a pas return head, stop, nbspaces else if getstate(base) then -- state can also be init - setstate(base,unsetvalue) + setstate(base,unsetvalue) -- THIS RESETS THE HALF STATE end basepos = base end @@ -1973,19 +2174,32 @@ local function reorder_two(head,start,stop,font,attr,nbspaces) -- maybe do a pas local cn = getnext(current) -- not so efficient (needed for malayalam) local tpm = twopart_mark[char] - while tpm do - local extra = copy_node(current) - copyinjection(extra,current) - char = tpm[1] - setchar(current,char) - setchar(extra,tpm[2]) - head = insert_node_after(head,current,extra) - tpm = twopart_mark[char] + if tpm then + while tpm do + local extra = copy_node(current) + copyinjection(extra,current) + char = tpm[1] + setchar(current,char) + setchar(extra,tpm[2]) + head = insertnodeafter(head,current,extra) + tpm = twopart_mark[char] + end + if tpm and trace_steps then + logprocess("reorder two, handle matra") + end end -- - if not moved[current] and dependent_vowel[char] then +-- IF PATCHED THEN +-- if dependent_vowel[char] then +-- ELSE + if not moved[current] and dependent_vowel[char] then +-- END if pre_mark[char] then -- or: if before_main or before_half +-- IF PATCHED THEN +-- -- nothing +-- ELSE moved[current] = true +-- END -- can be helper to remove one node local prev, next = getboth(current) setlink(prev,next) @@ -2031,8 +2245,18 @@ local function reorder_two(head,start,stop,font,attr,nbspaces) -- maybe do a pas setlink(getprev(pos),current) setlink(current,pos) -- setlink(getprev(pos),current,pos) -- maybe + if trace_steps then + logprocess("reorder two, handle pre mark") + end elseif above_mark[char] then -- after main consonant +-- IF PATCHED +-- target = subpos +-- if postpos == subpos then +-- postpos = current +-- end +-- subpos = current +-- ELSE target = basepos if subpos == basepos then subpos = current @@ -2041,6 +2265,7 @@ local function reorder_two(head,start,stop,font,attr,nbspaces) -- maybe do a pas postpos = current end basepos = current +-- END elseif below_mark[char] then -- after subjoined consonants target = subpos @@ -2074,13 +2299,16 @@ local function reorder_two(head,start,stop,font,attr,nbspaces) -- maybe do a pas setlink(current,getnext(target)) setlink(target,current) -- setlink(target,current,getnext(target)) -- maybe + if trace_steps then + logprocess("reorder two, handle mark") + end end end end current = cn end - -- reorder halant+Ra + -- reorder halant + Ra local current = getnext(start) local last = getnext(stop) @@ -2104,6 +2332,9 @@ local function reorder_two(head,start,stop,font,attr,nbspaces) -- maybe do a pas stop = prev end cn = next + if trace_steps then + logprocess("reorder two, handle halant and ra") + end end end -- after_postscript @@ -2143,6 +2374,9 @@ local function reorder_two(head,start,stop,font,attr,nbspaces) -- maybe do a pas setprev(nextnextnext,current) end setlink(nextnext,c) + if trace_steps then + logprocess("reorder two, handle nukta") + end end if stop == current then break end current = getnext(current) @@ -2154,7 +2388,10 @@ local function reorder_two(head,start,stop,font,attr,nbspaces) -- maybe do a pas end nbspaces = nbspaces - 1 head = remove_node(head, base) - flush_node(base) + flushnode(base) + if trace_steps then + logprocess("reorder two, handle nbsp") + end end return head, stop, nbspaces @@ -2179,8 +2416,8 @@ local function analyze_next_chars_one(c,font,variant) -- skip one dependent vowe if not n then return c end + local v = ischar(n,font) if variant == 1 then - local v = ischar(n,font) if v and nukta[v] then n = getnext(n) if n then @@ -2213,7 +2450,6 @@ local function analyze_next_chars_one(c,font,variant) -- skip one dependent vowe end end elseif variant == 2 then - local v = ischar(n,font) if v and nukta[v] then c = n end @@ -2238,11 +2474,11 @@ local function analyze_next_chars_one(c,font,variant) -- skip one dependent vowe end end -- c = ms_matra(c) - local n = getnext(c) + n = getnext(c) if not n then return c end - local v = ischar(n,font) + v = ischar(n,font) if not v then return c end @@ -2251,21 +2487,49 @@ local function analyze_next_chars_one(c,font,variant) -- skip one dependent vowe local already_below_mark -- = false local already_post_mark -- = false while dependent_vowel[v] do - local vowels = twopart_mark[v] or { v } - for k, v in next, vowels do - if pre_mark[v] and not already_pre_mark then - already_pre_mark = true - elseif above_mark[v] and not already_above_mark then - already_above_mark = true - elseif below_mark[v] and not already_below_mark then - already_below_mark = true - elseif post_mark[v] and not already_post_mark then - already_post_mark = true - else - return c - end - end - c = getnext(c) + local vowels = twopart_mark[v] + if vowels then + for k=1,#vowels do + local v = vowels[k] + if pre_mark[v] and not already_pre_mark then + already_pre_mark = true + elseif above_mark[v] and not already_above_mark then + already_above_mark = true + elseif below_mark[v] and not already_below_mark then + already_below_mark = true + elseif post_mark[v] and not already_post_mark then + already_post_mark = true + elseif devanagarihash[font].conjuncts == "continue" then + -- for testing + else + return c + end + end + else + if pre_mark[v] and not already_pre_mark then + already_pre_mark = true + elseif post_mark[v] and not already_post_mark then +-- IF PATCHED THEN +-- already_post_mark = true +-- ELSE + if devanagarihash[font].conjuncts == "mixed" then + -- for messy fonts + return c + else + already_post_mark = true + end +-- END + elseif below_mark[v] and not already_below_mark then + already_below_mark = true + elseif above_mark[v] and not already_above_mark then + already_above_mark = true + elseif devanagarihash[font].conjuncts == "continue" then + -- for testing + else + return c + end + end + c = n n = getnext(c) if not n then return c @@ -2276,7 +2540,7 @@ local function analyze_next_chars_one(c,font,variant) -- skip one dependent vowe end end if nukta[v] then - c = getnext(c) + c = n n = getnext(c) if not n then return c @@ -2287,7 +2551,7 @@ local function analyze_next_chars_one(c,font,variant) -- skip one dependent vowe end end if halant[v] then - c = getnext(c) + c = n n = getnext(c) if not n then return c @@ -2298,7 +2562,7 @@ local function analyze_next_chars_one(c,font,variant) -- skip one dependent vowe end end if vowel_modifier[v] then - c = getnext(c) + c = n n = getnext(c) if not n then return c @@ -2309,7 +2573,7 @@ local function analyze_next_chars_one(c,font,variant) -- skip one dependent vowe end end if stress_tone_mark[v] then - c = getnext(c) + c = n n = getnext(c) if not n then return c @@ -2326,6 +2590,16 @@ local function analyze_next_chars_one(c,font,variant) -- skip one dependent vowe end end +-- Consonant syllable: +-- +-- { C + [ N ] + < H + [ < ZWNJ | ZWJ > ] | < ZWNJ | ZWJ > + H > } +-- + C +-- + [ N ] +-- + [ A ] +-- + [ < H + [ < ZWNJ|ZWJ > ] | { M } + [ N ] + [ H ] > ] +-- + [ SM ] +-- + [ ( VD ) ] + local function analyze_next_chars_two(c,font) local n = getnext(c) if not n then @@ -2393,11 +2667,11 @@ local function analyze_next_chars_two(c,font) -- This shouldn't happen I guess. return end - local n = getnext(c) + n = getnext(c) if not n then return c end - local v = ischar(n,font) + v = ischar(n,font) if not v then return c end @@ -2440,21 +2714,50 @@ local function analyze_next_chars_two(c,font) local already_above_mark -- = false local already_below_mark -- = false local already_post_mark -- = false - while dependent_vowel[v] do - local vowels = twopart_mark[v] or { v } - for k, v in next, vowels do - if pre_mark[v] and not already_pre_mark then - already_pre_mark = true - elseif above_mark[v] and not already_above_mark then - already_above_mark = true - elseif below_mark[v] and not already_below_mark then - already_below_mark = true - elseif post_mark[v] and not already_post_mark then - already_post_mark = true - else - return c - end - end + -- inefficient : too many tests but seldom more than one + while dependent_vowel[v] do + local vowels = twopart_mark[v] + if vowels then + for k=1,#vowels do + local v = vowels[k] + if pre_mark[v] and not already_pre_mark then + already_pre_mark = true + elseif above_mark[v] and not already_above_mark then + already_above_mark = true + elseif below_mark[v] and not already_below_mark then + already_below_mark = true + elseif post_mark[v] and not already_post_mark then + already_post_mark = true + elseif devanagarihash[font].conjuncts == "continue" then + -- for testing + else + return c + end + end + else + if pre_mark[v] and not already_pre_mark then + already_pre_mark = true + elseif post_mark[v] and not already_post_mark then +-- IF PATCHED THEN +-- already_post_mark = true +-- ELSE + if devanagarihash[font].conjuncts == "mixed" then + -- for messy fonts + return c + else + already_post_mark = true + end +-- END + elseif below_mark[v] and not already_below_mark then + already_below_mark = true + elseif above_mark[v] and not already_above_mark then + already_above_mark = true + elseif devanagarihash[font].conjuncts == "continue" then + -- for testing + else + return c + end + end c = n n = getnext(c) if not n then @@ -2708,7 +3011,7 @@ local function method_one(head,font,attr) end else if show_syntax_errors then - local mark = mark_four[char] + local mark = mark_pre_above_below_post[char] if mark then head, current = inject_syntax_error(head,current,char) end @@ -2731,15 +3034,15 @@ local function method_one(head,font,attr) while current do local char = ischar(current,font) if char then - if n == 0 and not getstate(current) then - setstate(current,s_init) - end - n = n + 1 - else - n = 0 - end - current = getnext(current) - end + if n == 0 and not getstate(current) then + setstate(current,s_init) + end + n = n + 1 + else + n = 0 + end + current = getnext(current) + end return head, done end @@ -2800,7 +3103,6 @@ local function method_two(head,font,attr) syllableend = current elseif consonant[getchar(current)] then -- WHY current INSTEAD OF c ? - -- Consonant syllable: {C+[N]+<H+[<ZWNJ|ZWJ>]|<ZWNJ|ZWJ>+H>} + C+[N]+[A] + [< H+[<ZWNJ|ZWJ>] | {M}+[N]+[H]>]+[SM]+[(VD)] current = analyze_next_chars_two(current,font) -- not c ! syllableend = current @@ -2822,7 +3124,7 @@ local function method_two(head,font,attr) if not syllableend and show_syntax_errors then local char = ischar(current,font) if char and not getstate(current) then -- state can also be init - local mark = mark_four[char] + local mark = mark_pre_above_below_post[char] if mark then head, current = inject_syntax_error(head,current,char) end @@ -2841,15 +3143,19 @@ local function method_two(head,font,attr) while current do local char = ischar(current,font) if char then - if n == 0 and not getstate(current) then -- state can also be init - setstate(current,s_init) - end - n = n + 1 - else - n = 0 - end - current = getnext(current) - end + if n == 0 and not getstate(current) then -- state can also be init + setstate(current,s_init) + end + n = n + 1 + else + n = 0 + end + current = getnext(current) + end + + -- if languages.indic then + -- head = languages.indic.handler(head) + -- end return head, done end diff --git a/Master/texmf-dist/tex/context/base/mkiv/font-ota.lua b/Master/texmf-dist/tex/context/base/mkiv/font-ota.lua index ce1b22b50d7..a8f9f0047c2 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/font-ota.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/font-ota.lua @@ -40,7 +40,7 @@ local getsubtype = nuts.getsubtype local getchar = nuts.getchar local ischar = nuts.ischar -local end_of_math = nuts.end_of_math +local endofmath = nuts.endofmath local nodecodes = nodes.nodecodes ----- glyph_code = nodecodes.glyph @@ -173,7 +173,7 @@ function analyzers.setstate(head,font) end first, last, n = nil, nil, 0 if id == math_code then - current = end_of_math(current) + current = endofmath(current) end elseif id == disc_code then -- always in the middle .. it doesn't make much sense to assign a property @@ -189,7 +189,7 @@ function analyzers.setstate(head,font) end first, last, n = nil, nil, 0 if id == math_code then - current = end_of_math(current) + current = endofmath(current) end end current = getnext(current) @@ -435,7 +435,7 @@ function methods.arab(head,font,attr) first = nil end if id == math_code then -- a bit duplicate as we test for glyphs twice - current = end_of_math(current) + current = endofmath(current) end end current = getnext(current) @@ -562,7 +562,7 @@ do wrapup() end if id == math_code then -- a bit duplicate as we test for glyphs twice - current = end_of_math(current) + current = endofmath(current) end end current = getnext(current) diff --git a/Master/texmf-dist/tex/context/base/mkiv/font-otc.lua b/Master/texmf-dist/tex/context/base/mkiv/font-otc.lua index 2643d022a57..f83c3e8ec76 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/font-otc.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/font-otc.lua @@ -102,8 +102,9 @@ local function validspecification(specification,name) specification = { dataset = dataset } else dataset = { { data = specification.data } } - specification.data = nil - specification.dataset = dataset + specification.data = nil + specification.coverage = dataset + specification.dataset = dataset end local first = dataset[1] if first then @@ -129,7 +130,7 @@ local function validspecification(specification,name) end end -local function addfeature(data,feature,specifications) +local function addfeature(data,feature,specifications,prepareonly) -- todo: add some validator / check code so that we're more tolerant to -- user errors @@ -141,6 +142,12 @@ local function addfeature(data,feature,specifications) local descriptions = data.descriptions local resources = data.resources + + if not descriptions or not resources then + report_otf("missing specification") + return + end + local features = resources.features local sequences = resources.sequences @@ -225,6 +232,9 @@ local function addfeature(data,feature,specifications) local stepkey = coverup.stepkey local register = coverup.register + -- todo: directly pass a coverage i.e. for privates that later will be + -- set + local function prepare_substitution(list,featuretype,nocheck) local coverage = { } local cover = coveractions[featuretype] @@ -232,6 +242,7 @@ local function addfeature(data,feature,specifications) local unicode = tounicode(code) local description = descriptions[unicode] if not nocheck and not description then + -- todo: trace ! skip = skip + 1 else if type(replacement) == "table" then @@ -436,13 +447,36 @@ local function addfeature(data,feature,specifications) local prepare_single = prepare_pair -- we could have a better test on the spec - local function prepare_chain(list,featuretype,sublookups) + local function hassteps(lookups) + if lookups then + for i=1,#lookups do + local l = lookups[i] + if l then + for j=1,#l do + local l = l[j] + if l then + local n = l.nofsteps + if not n then + -- gsub_remove + return true + elseif n > 0 then + return true + end + end + end + end + end + end + return false + end + + -- 0 == remove, false = ignore (remove is default) + + local function prepare_chain(list,featuretype,sublookups,nocheck) -- todo: coveractions local rules = list.rules local coverage = { } if rules then - local rulehash = { } - local rulesize = 0 local lookuptype = types[featuretype] for nofrules=1,#rules do local rule = rules[nofrules] @@ -473,6 +507,16 @@ local function addfeature(data,feature,specifications) local lookups = rule.lookups or false local subtype = nil if lookups and sublookups then + -- inspect(lookups) + if #lookups > 0 then + local ns = stop - start + 1 + for i=1,ns do + if lookups[i] == nil then + lookups[i] = 0 + end + end + end + local l = { } for k, v in sortedhash(lookups) do local t = type(v) if t == "table" then @@ -483,61 +527,76 @@ local function addfeature(data,feature,specifications) v[i] = { vi } end end + l[k] = v elseif t == "number" then local lookup = sublookups[v] if lookup then - lookups[k] = { lookup } + l[k] = { lookup } if not subtype then subtype = lookup.type end elseif v == 0 then - lookups[k] = { { type = "gsub_remove" } } + l[k] = { { type = "gsub_remove", nosteps = true } } else - lookups[k] = false -- { false } -- new + l[k] = false -- { false } -- new end else - lookups[k] = false -- { false } -- new + l[k] = false -- { false } -- new end end + if nocheck then + -- fragile + rule.lookups = l --no, because checking can spoil it + end + lookups = l end if nofsequences > 0 then -- we merge coverage into one -- we copy as we can have different fonts - local hashed = { } - for i=1,nofsequences do - local t = { } - local s = sequence[i] - for i=1,#s do - local u = tounicode(s[i]) - if u then - t[u] = true + if hassteps(lookups) then + -- sequence is the before|current|after match list + local hashed = { } + for i=1,nofsequences do + local t = { } + local s = sequence[i] + for i=1,#s do + local u = tounicode(s[i]) + if u then + t[u] = true + end end + hashed[i] = t end - hashed[i] = t - end - sequence = hashed - -- now we create the rule - rulesize = rulesize + 1 - rulehash[rulesize] = { - nofrules, -- 1 - lookuptype, -- 2 - sequence, -- 3 - start, -- 4 - stop, -- 5 - lookups, -- 6 (6/7 also signal of what to do) - replacements, -- 7 - subtype, -- 8 - } --- for unic in next, sequence[start] do - for unic in sortedhash(sequence[start]) do - local cu = coverage[unic] - if not cu then - coverage[unic] = rulehash -- can now be done cleaner i think + -- hashed is the before|current|after match hash + sequence = hashed + local ruleset = { + nofrules, -- 1 + lookuptype, -- 2 + sequence, -- 3 + start, -- 4 + stop, -- 5 + lookups, -- 6 (6/7 also signal of what to do) + replacements, -- 7 + subtype, -- 8 + } + for unic in sortedhash(sequence[start]) do + local cu = coverage[unic] + if cu then + local n = cu.n + 1 + cu[n] = ruleset + cu.n = n + else + coverage[unic] = { + ruleset, + n = 1, + } + end end + sequence.n = nofsequences + else + -- report_otf("no steps for %a",lookuptype) -- e.g. in primes feature end - sequence.n = nofsequences end end - rulehash.n = rulesize end return coverage end @@ -626,133 +685,167 @@ local function addfeature(data,feature,specifications) end local askedfeatures = specification.features or everywhere local askedsteps = specification.steps or specification.subtables or { specification.data } or { } - local featuretype = normalized[specification.type or "substitution"] or "substitution" + local featuretype = specification.type or "substitution" + local featureaction = false local featureflags = specification.flags or noflags local nocheck = specification.nocheck + local mapping = specification.mapping local featureorder = specification.order or { feature } local featurechain = (featuretype == "chainsubstitution" or featuretype == "chainposition") and 1 or 0 local nofsteps = 0 local steps = { } local sublookups = specification.lookups local category = nil + local steptype = nil + local sequence = nil + -- + if fonts.handlers.otf.handlers[featuretype] then + featureaction = true -- function based + else + featuretype = normalized[specification.type or "substitution"] or "substitution" + end -- checkflags(specification,resources) -- - if sublookups then - local s = { } - for i=1,#sublookups do - local specification = sublookups[i] - local askedsteps = specification.steps or specification.subtables or { specification.data } or { } - local featuretype = normalized[specification.type or "substitution"] or "substitution" - local featureflags = specification.flags or noflags - local nofsteps = 0 - local steps = { } - for i=1,#askedsteps do - local list = askedsteps[i] - local coverage = nil - local format = nil - if featuretype == "substitution" then - coverage = prepare_substitution(list,featuretype,nocheck) - elseif featuretype == "ligature" then - coverage = prepare_ligature(list,featuretype,nocheck) - elseif featuretype == "alternate" then - coverage = prepare_alternate(list,featuretype,nocheck) - elseif featuretype == "multiple" then - coverage = prepare_multiple(list,featuretype,nocheck) - elseif featuretype == "kern" or featuretype == "move" then - format = featuretype - coverage = prepare_kern(list,featuretype) - elseif featuretype == "pair" then - format = "pair" - coverage = prepare_pair(list,featuretype) - elseif featuretype == "single" then - format = "single" - coverage = prepare_single(list,featuretype) - end - if coverage and next(coverage) then - nofsteps = nofsteps + 1 - steps[nofsteps] = register(coverage,featuretype,format,feature,nofsteps,descriptions,resources) + for k, v in next, askedfeatures do + if v[1] then + askedfeatures[k] = tohash(v) + end + end + -- + if featureflags[1] then featureflags[1] = "mark" end + if featureflags[2] then featureflags[2] = "ligature" end + if featureflags[3] then featureflags[3] = "base" end + -- + if featureaction then + + category = "gsub" + sequence = { + features = { [feature] = askedfeatures }, + flags = featureflags, + name = feature, -- redundant + order = featureorder, + type = featuretype, + -- steps = { }, + nofsteps = 0, -- just in case we test for that + } + + else + + if sublookups then + local s = { } + for i=1,#sublookups do + local specification = sublookups[i] + local askedsteps = specification.steps or specification.subtables or { specification.data } or { } + local featuretype = normalized[specification.type or "substitution"] or "substitution" + local featureflags = specification.flags or noflags + local nofsteps = 0 + local steps = { } + for i=1,#askedsteps do + local list = askedsteps[i] + local coverage = nil + local format = nil + if featuretype == "substitution" then + coverage = prepare_substitution(list,featuretype,nocheck) + elseif featuretype == "ligature" then + coverage = prepare_ligature(list,featuretype,nocheck) + elseif featuretype == "alternate" then + coverage = prepare_alternate(list,featuretype,nocheck) + elseif featuretype == "multiple" then + coverage = prepare_multiple(list,featuretype,nocheck) + elseif featuretype == "kern" or featuretype == "move" then + format = featuretype + coverage = prepare_kern(list,featuretype) + elseif featuretype == "pair" then + format = "pair" + coverage = prepare_pair(list,featuretype) + elseif featuretype == "single" then + format = "single" + coverage = prepare_single(list,featuretype) + end + if coverage and next(coverage) then + nofsteps = nofsteps + 1 + steps[nofsteps] = register(coverage,featuretype,format,feature,nofsteps,descriptions,resources) + end end + -- + checkmerge(specification) + checksteps(specification) + -- + s[i] = { + [stepkey] = steps, + nofsteps = nofsteps, + flags = featureflags, + type = types[featuretype], + } + end + sublookups = s + end + + for i=1,#askedsteps do + local list = askedsteps[i] + local coverage = nil + local format = nil + if featuretype == "substitution" then + -- see font-imp-tweaks: we directly pass a mapping so no checks done + category = "gsub" + coverage = (mapping and list) or prepare_substitution(list,featuretype,nocheck) + elseif featuretype == "ligature" then + category = "gsub" + coverage = prepare_ligature(list,featuretype,nocheck) + elseif featuretype == "alternate" then + category = "gsub" + coverage = prepare_alternate(list,featuretype,nocheck) + elseif featuretype == "multiple" then + category = "gsub" + coverage = prepare_multiple(list,featuretype,nocheck) + elseif featuretype == "kern" or featuretype == "move" then + category = "gpos" + format = featuretype + coverage = prepare_kern(list,featuretype) + elseif featuretype == "pair" then + category = "gpos" + format = "pair" + coverage = prepare_pair(list,featuretype) + elseif featuretype == "single" then + category = "gpos" + format = "single" + coverage = prepare_single(list,featuretype) + elseif featuretype == "chainsubstitution" then + category = "gsub" + coverage = prepare_chain(list,featuretype,sublookups,nocheck) + elseif featuretype == "chainposition" then + category = "gpos" + coverage = prepare_chain(list,featuretype,sublookups,nocheck) + else + report_otf("not registering feature %a, unknown category",feature) + return end - -- - checkmerge(specification) - checksteps(specification) - -- - s[i] = { + if coverage and next(coverage) then + nofsteps = nofsteps + 1 + steps[nofsteps] = register(coverage,featuretype,format,feature,nofsteps,descriptions,resources) + end + end + + if nofsteps > 0 then + sequence = { + chain = featurechain, + features = { [feature] = askedfeatures }, + flags = featureflags, + name = feature, -- redundant + order = featureorder, [stepkey] = steps, nofsteps = nofsteps, - flags = featureflags, - type = types[featuretype], + type = specification.handler or types[featuretype], } - end - sublookups = s - end - for i=1,#askedsteps do - local list = askedsteps[i] - local coverage = nil - local format = nil - if featuretype == "substitution" then - category = "gsub" - coverage = prepare_substitution(list,featuretype,nocheck) - elseif featuretype == "ligature" then - category = "gsub" - coverage = prepare_ligature(list,featuretype,nocheck) - elseif featuretype == "alternate" then - category = "gsub" - coverage = prepare_alternate(list,featuretype,nocheck) - elseif featuretype == "multiple" then - category = "gsub" - coverage = prepare_multiple(list,featuretype,nocheck) - elseif featuretype == "kern" or featuretype == "move" then - category = "gpos" - format = featuretype - coverage = prepare_kern(list,featuretype) - elseif featuretype == "pair" then - category = "gpos" - format = "pair" - coverage = prepare_pair(list,featuretype) - elseif featuretype == "single" then - category = "gpos" - format = "single" - coverage = prepare_single(list,featuretype) - elseif featuretype == "chainsubstitution" then - category = "gsub" - coverage = prepare_chain(list,featuretype,sublookups) - elseif featuretype == "chainposition" then - category = "gpos" - coverage = prepare_chain(list,featuretype,sublookups) - else - report_otf("not registering feature %a, unknown category",feature) - return - end - if coverage and next(coverage) then - nofsteps = nofsteps + 1 - steps[nofsteps] = register(coverage,featuretype,format,feature,nofsteps,descriptions,resources) + if prepareonly then + return sequence + end end end - if nofsteps > 0 then + + if sequence then -- script = { lang1, lang2, lang3 } or script = { lang1 = true, ... } - for k, v in next, askedfeatures do - if v[1] then - askedfeatures[k] = tohash(v) - end - end - -- - if featureflags[1] then featureflags[1] = "mark" end - if featureflags[2] then featureflags[2] = "ligature" end - if featureflags[3] then featureflags[3] = "base" end - local steptype = types[featuretype] - local sequence = { - chain = featurechain, - features = { [feature] = askedfeatures }, - flags = featureflags, - name = feature, -- redundant - order = featureorder, - [stepkey] = steps, - nofsteps = nofsteps, - type = steptype, - } - -- checkflags(sequence,resources) checkmerge(sequence) checksteps(sequence) @@ -782,11 +875,13 @@ local function addfeature(data,feature,specifications) end end end + end end if trace_loading then report_otf("registering feature %a, affected glyphs %a, skipped glyphs %a",feature,done,skip) end + end otf.enhancers.addfeature = addfeature @@ -833,6 +928,23 @@ local function enhance(data,filename,raw) end end +-- local function enhance(data,filename,raw) +-- local first = 1 +-- local last = #extrafeatures +-- while true do +-- for slot=first,last do +-- local specification = extrafeatures[slot] +-- addfeature(data,specification.name,specification) +-- end +-- if #extrafeatures > last then +-- first = last + 1 +-- last = #extrafeatures +-- else +-- break +-- end +-- end +-- end + otf.enhancers.enhance = enhance otf.enhancers.register("check extra features",enhance) diff --git a/Master/texmf-dist/tex/context/base/mkiv/font-otj.lua b/Master/texmf-dist/tex/context/base/mkiv/font-otj.lua index bb02044dca6..c4ec9972cd4 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/font-otj.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/font-otj.lua @@ -90,6 +90,8 @@ local getoffsets = nuts.getoffsets local getboth = nuts.getboth local getdisc = nuts.getdisc local setdisc = nuts.setdisc +local getreplace = nuts.getreplace +local setreplace = nuts.setreplace local setoffsets = nuts.setoffsets local ischar = nuts.ischar local getkern = nuts.getkern @@ -98,13 +100,11 @@ local setlink = nuts.setlink local setwidth = nuts.setwidth local getwidth = nuts.getwidth ------ traverse_id = nuts.traverse_id ------ traverse_char = nuts.traverse_char local nextchar = nuts.traversers.char local nextglue = nuts.traversers.glue -local insert_node_before = nuts.insert_before -local insert_node_after = nuts.insert_after +local insertnodebefore = nuts.insertbefore +local insertnodeafter = nuts.insertafter local properties = nodes.properties.data @@ -124,7 +124,7 @@ if not fontkern then -- generic local thekern = nuts.new("kern",0) -- fontkern local setkern = nuts.setkern - local copy_node = nuts.copy_node + local copy_node = nuts.copy fontkern = function(k) local n = copy_node(thekern) @@ -138,7 +138,7 @@ if not italickern then -- generic local thekern = nuts.new("kern",3) -- italiccorrection local setkern = nuts.setkern - local copy_node = nuts.copy_node + local copy_node = nuts.copy italickern = function(k) local n = copy_node(thekern) @@ -667,12 +667,12 @@ local function inject_kerns_only(head,where) if leftkern and leftkern ~= 0 then if prev and getid(prev) == glue_code then if useitalickerns then - head = insert_node_before(head,current,italickern(leftkern)) + head = insertnodebefore(head,current,italickern(leftkern)) else setwidth(prev, getwidth(prev) + leftkern) end else - head = insert_node_before(head,current,fontkern(leftkern)) + head = insertnodebefore(head,current,fontkern(leftkern)) end end end @@ -731,7 +731,7 @@ local function inject_kerns_only(head,where) if i then local leftkern = i.leftkern if leftkern and leftkern ~= 0 then - pre = insert_node_before(pre,n,fontkern(leftkern)) + pre = insertnodebefore(pre,n,fontkern(leftkern)) done = true end end @@ -747,7 +747,7 @@ local function inject_kerns_only(head,where) if i then local leftkern = i.leftkern if leftkern and leftkern ~= 0 then - post = insert_node_before(post,n,fontkern(leftkern)) + post = insertnodebefore(post,n,fontkern(leftkern)) done = true end end @@ -763,7 +763,7 @@ local function inject_kerns_only(head,where) if i then local leftkern = i.leftkern if leftkern and leftkern ~= 0 then - replace = insert_node_before(replace,n,fontkern(leftkern)) + replace = insertnodebefore(replace,n,fontkern(leftkern)) done = true end end @@ -830,39 +830,36 @@ local function inject_positions_only(head,where) rightkern = 0 elseif prev and getid(prev) == glue_code then if useitalickerns then - head = insert_node_before(head,current,italickern(leftkern)) + head = insertnodebefore(head,current,italickern(leftkern)) else setwidth(prev, getwidth(prev) + leftkern) end else - head = insert_node_before(head,current,fontkern(leftkern)) + head = insertnodebefore(head,current,fontkern(leftkern)) end end if rightkern and rightkern ~= 0 then if next and getid(next) == glue_code then if useitalickerns then - insert_node_after(head,current,italickern(rightkern)) + insertnodeafter(head,current,italickern(rightkern)) else setwidth(next, getwidth(next) + rightkern) end else - insert_node_after(head,current,fontkern(rightkern)) + insertnodeafter(head,current,fontkern(rightkern)) end end - else + elseif next then local i = p.emptyinjections if i then -- glyph|disc|glyph (special case) local rightkern = i.rightkern - if rightkern and rightkern ~= 0 then - if next and getid(next) == disc_code then - if replace then - -- error, we expect an empty one - else - -- KE setfield(next,"replace",fontkern(rightkern)) -- maybe also leftkern - replace = fontkern(rightkern) -- maybe also leftkern - done = true --KE - end + if rightkern and rightkern ~= 0 and getid(next) == disc_code then + local replace = getreplace(next) + if replace then + -- can't happen + else + setreplace(next,fontkern(rightkern)) end end end @@ -925,12 +922,12 @@ local function inject_positions_only(head,where) end local leftkern = i.leftkern if leftkern and leftkern ~= 0 then - pre = insert_node_before(pre,n,fontkern(leftkern)) + pre = insertnodebefore(pre,n,fontkern(leftkern)) done = true end local rightkern = i.rightkern if rightkern and rightkern ~= 0 then - insert_node_after(pre,n,fontkern(rightkern)) + insertnodeafter(pre,n,fontkern(rightkern)) done = true end end @@ -950,12 +947,12 @@ local function inject_positions_only(head,where) end local leftkern = i.leftkern if leftkern and leftkern ~= 0 then - post = insert_node_before(post,n,fontkern(leftkern)) + post = insertnodebefore(post,n,fontkern(leftkern)) done = true end local rightkern = i.rightkern if rightkern and rightkern ~= 0 then - insert_node_after(post,n,fontkern(rightkern)) + insertnodeafter(post,n,fontkern(rightkern)) done = true end end @@ -975,12 +972,12 @@ local function inject_positions_only(head,where) end local leftkern = i.leftkern if leftkern and leftkern ~= 0 then - replace = insert_node_before(replace,n,fontkern(leftkern)) + replace = insertnodebefore(replace,n,fontkern(leftkern)) done = true end local rightkern = i.rightkern if rightkern and rightkern ~= 0 then - insert_node_after(replace,n,fontkern(rightkern)) + insertnodeafter(replace,n,fontkern(rightkern)) done = true end end @@ -996,7 +993,7 @@ local function inject_positions_only(head,where) -- glyph|pre glyphs local rightkern = i.rightkern if rightkern and rightkern ~= 0 then - pre = insert_node_before(pre,pre,fontkern(rightkern)) + pre = insertnodebefore(pre,pre,fontkern(rightkern)) done = true end end @@ -1010,7 +1007,7 @@ local function inject_positions_only(head,where) -- glyph|replace glyphs local rightkern = i.rightkern if rightkern and rightkern ~= 0 then - replace = insert_node_before(replace,replace,fontkern(rightkern)) + replace = insertnodebefore(replace,replace,fontkern(rightkern)) done = true end end @@ -1144,8 +1141,8 @@ local function inject_everything(head,where) -- -- todo: head and check for prev / next kern -- - insert_node_before(n,n,fontkern(-wn)) - insert_node_after(n,n,fontkern(-wn)) + insertnodebefore(n,n,fontkern(-wn)) + insertnodeafter(n,n,fontkern(-wn)) end end end @@ -1295,39 +1292,37 @@ local function inject_everything(head,where) rightkern = 0 elseif prev and getid(prev) == glue_code then if useitalickerns then - head = insert_node_before(head,current,italickern(leftkern)) + head = insertnodebefore(head,current,italickern(leftkern)) else setwidth(prev, getwidth(prev) + leftkern) end else - head = insert_node_before(head,current,fontkern(leftkern)) + head = insertnodebefore(head,current,fontkern(leftkern)) end end if rightkern and rightkern ~= 0 then if next and getid(next) == glue_code then if useitalickerns then - insert_node_after(head,current,italickern(rightkern)) + insertnodeafter(head,current,italickern(rightkern)) else setwidth(next, getwidth(next) + rightkern) end else - insert_node_after(head,current,fontkern(rightkern)) + insertnodeafter(head,current,fontkern(rightkern)) end end end - else + elseif next then local i = p.emptyinjections if i then -- glyph|disc|glyph (special case) local rightkern = i.rightkern - if rightkern and rightkern ~= 0 then - if next and getid(next) == disc_code then - if replace then - -- error, we expect an empty one - else - replace = fontkern(rightkern) - done = true - end + if rightkern and rightkern ~= 0 and getid(next) == disc_code then + local replace = getreplace(next) + if replace then + -- can't happen + else + setreplace(next,fontkern(rightkern)) end end end @@ -1406,12 +1401,12 @@ local function inject_everything(head,where) end local leftkern = i.leftkern if leftkern and leftkern ~= 0 then - pre = insert_node_before(pre,n,fontkern(leftkern)) + pre = insertnodebefore(pre,n,fontkern(leftkern)) done = true end local rightkern = i.rightkern if rightkern and rightkern ~= 0 then - insert_node_after(pre,n,fontkern(rightkern)) + insertnodeafter(pre,n,fontkern(rightkern)) done = true end if hasmarks then @@ -1437,12 +1432,12 @@ local function inject_everything(head,where) end local leftkern = i.leftkern if leftkern and leftkern ~= 0 then - post = insert_node_before(post,n,fontkern(leftkern)) + post = insertnodebefore(post,n,fontkern(leftkern)) done = true end local rightkern = i.rightkern if rightkern and rightkern ~= 0 then - insert_node_after(post,n,fontkern(rightkern)) + insertnodeafter(post,n,fontkern(rightkern)) done = true end if hasmarks then @@ -1468,12 +1463,12 @@ local function inject_everything(head,where) end local leftkern = i.leftkern if leftkern and leftkern ~= 0 then - replace = insert_node_before(replace,n,fontkern(leftkern)) + replace = insertnodebefore(replace,n,fontkern(leftkern)) done = true end local rightkern = i.rightkern if rightkern and rightkern ~= 0 then - insert_node_after(replace,n,fontkern(rightkern)) + insertnodeafter(replace,n,fontkern(rightkern)) done = true end if hasmarks then @@ -1495,7 +1490,7 @@ local function inject_everything(head,where) -- glyph|pre glyphs local rightkern = i.rightkern if rightkern and rightkern ~= 0 then - pre = insert_node_before(pre,pre,fontkern(rightkern)) + pre = insertnodebefore(pre,pre,fontkern(rightkern)) done = true end end @@ -1509,7 +1504,7 @@ local function inject_everything(head,where) -- glyph|replace glyphs local rightkern = i.rightkern if rightkern and rightkern ~= 0 then - replace = insert_node_before(replace,replace,fontkern(rightkern)) + replace = insertnodebefore(replace,replace,fontkern(rightkern)) done = true end end @@ -1711,8 +1706,8 @@ local function injectspaces(head) if trace_spaces then report_spaces("%C [%p + %p + %p] %C",prevchar,lnew,old,rnew,nextchar) end - head = insert_node_before(head,n,italickern(lnew)) - insert_node_after(head,n,italickern(rnew)) + head = insertnodebefore(head,n,italickern(lnew)) + insertnodeafter(head,n,italickern(rnew)) else local new = old + (leftkern + rightkern) * factor if trace_spaces then @@ -1727,7 +1722,7 @@ local function injectspaces(head) if trace_spaces then report_spaces("%C [%p + %p]",prevchar,old,new) end - insert_node_after(head,n,italickern(new)) -- tricky with traverse but ok + insertnodeafter(head,n,italickern(new)) -- tricky with traverse but ok else local new = old + leftkern * factor if trace_spaces then @@ -1746,7 +1741,7 @@ local function injectspaces(head) if trace_spaces then report_spaces("[%p + %p] %C",old,new,nextchar) end - insert_node_after(head,n,italickern(new)) + insertnodeafter(head,n,italickern(new)) else local new = old + rightkern * factor if trace_spaces then diff --git a/Master/texmf-dist/tex/context/base/mkiv/font-otl.lua b/Master/texmf-dist/tex/context/base/mkiv/font-otl.lua index 8159db180d6..354ca59a78d 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/font-otl.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/font-otl.lua @@ -26,7 +26,7 @@ if not modules then modules = { } end modules ['font-otl'] = { local lower = string.lower local type, next, tonumber, tostring, unpack = type, next, tonumber, tostring, unpack local abs = math.abs -local derivetable = table.derive +local derivetable, sortedhash = table.derive, table.sortedhash local formatters = string.formatters local setmetatableindex = table.setmetatableindex @@ -52,7 +52,7 @@ local report_otf = logs.reporter("fonts","otf loading") local fonts = fonts local otf = fonts.handlers.otf -otf.version = 3.113 -- beware: also sync font-mis.lua and in mtx-fonts +otf.version = 3.132 -- beware: also sync font-mis.lua and in mtx-fonts otf.cache = containers.define("fonts", "otl", otf.version, true) otf.svgcache = containers.define("fonts", "svg", otf.version, true) otf.pngcache = containers.define("fonts", "png", otf.version, true) @@ -218,6 +218,9 @@ function otf.load(filename,sub,instance) if cleanup == 0 then checkmemory(used,threshold,tracememory) end + if context then + otfreaders.condense(data) + end otfreaders.pack(data) report_otf("loading done") report_otf("saving %a in cache",filename) @@ -314,7 +317,7 @@ local function copytotfm(data,cache_id) local properties = derivetable(data.properties) local descriptions = derivetable(data.descriptions) local goodies = derivetable(data.goodies) - local characters = { } + local characters = { } -- newtable if we knwo how many local parameters = { } local mathparameters = { } -- @@ -504,7 +507,28 @@ local function copytotfm(data,cache_id) properties.subfont = subfont -- if not CONTEXTLMTXMODE or CONTEXTLMTXMODE == 0 then - properties.encodingbytes = 2 + -- + properties.encodingbytes = 2 +elseif CONTEXTLMTXMODE then + local duplicates = resources and resources.duplicates + if duplicates then + local maxindex = data.nofglyphs or metadata.nofglyphs + if maxindex then + for u, d in sortedhash(duplicates) do + local du = descriptions[u] + if du then + for uu in sortedhash(d) do + maxindex = maxindex + 1 + descriptions[uu].dupindex = du.index + descriptions[uu].index = maxindex + end + else + -- report_otf("no %U in font %a, duplicates ignored",u,filename) + end + end + end + end + -- end -- -- properties.name = specification.name @@ -619,25 +643,33 @@ local function read_from_otf(specification) return tfmdata end -local function checkmathsize(tfmdata,mathsize) - local mathdata = tfmdata.shared.rawdata.metadata.math - local mathsize = tonumber(mathsize) - if mathdata then -- we cannot use mathparameters as luatex will complain - local parameters = tfmdata.parameters - parameters.scriptpercentage = mathdata.ScriptPercentScaleDown - parameters.scriptscriptpercentage = mathdata.ScriptScriptPercentScaleDown - parameters.mathsize = mathsize -- only when a number ! - end -end - -registerotffeature { - name = "mathsize", - description = "apply mathsize specified in the font", - initializers = { - base = checkmathsize, - node = checkmathsize, - } -} +-- if context then +-- +-- -- so the next will go to some generic module instead +-- +-- else +-- +-- local function checkmathsize(tfmdata,mathsize) +-- local mathdata = tfmdata.shared.rawdata.metadata.math +-- local mathsize = tonumber(mathsize) +-- if mathdata then -- we cannot use mathparameters as luatex will complain +-- local parameters = tfmdata.parameters +-- parameters.scriptpercentage = mathdata.ScriptPercentScaleDown +-- parameters.scriptscriptpercentage = mathdata.ScriptScriptPercentScaleDown +-- parameters.mathsize = mathsize -- only when a number ! +-- end +-- end +-- +-- registerotffeature { +-- name = "mathsize", +-- description = "apply mathsize specified in the font", +-- initializers = { +-- base = checkmathsize, +-- node = checkmathsize, +-- } +-- } +-- +-- end -- readers diff --git a/Master/texmf-dist/tex/context/base/mkiv/font-oto.lua b/Master/texmf-dist/tex/context/base/mkiv/font-oto.lua index 6f5f2fb418f..e8b92c07755 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/font-oto.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/font-oto.lua @@ -67,7 +67,7 @@ local function gref(descriptions,n) end local function cref(feature,sequence) - return formatters["feature %a, type %a, chain lookup %a"](feature,sequence.type,sequence.name) + return formatters["feature %a, type %a, (chain) lookup %a"](feature,sequence.type,sequence.name) end local function report_substitution(feature,sequence,descriptions,unicode,substitution) @@ -170,7 +170,7 @@ end local function makefake(tfmdata,name,present) local private = getprivate(tfmdata) local character = { intermediate = true, ligatures = { } } - resources.unicodes[name] = private + tfmdata.resources.unicodes[name] = private tfmdata.characters[private] = character tfmdata.descriptions[private] = { name = name } present[name] = private @@ -178,43 +178,55 @@ local function makefake(tfmdata,name,present) end local function make_1(present,tree,name) - for k, v in next, tree do - if k == "ligature" then - present[name] = v + if tonumber(tree) then + present[name] = v + else + for k, v in next, tree do + if k == "ligature" then + present[name] = v + else + make_1(present,v,name .. "_" .. k) + end + end + end +end + +local function make_3(present,tfmdata,characters,tree,name,preceding,unicode,done,v) + local character = characters[preceding] + if not character then + if trace_baseinit then + report_prepare("weird ligature in lookup %a, current %C, preceding %C",sequence.name,v,preceding) + end + character = makefake(tfmdata,name,present) + end + local ligatures = character.ligatures + if ligatures then + ligatures[unicode] = { char = v } + else + character.ligatures = { [unicode] = { char = v } } + end + if done then + local d = done[name] + if not d then + done[name] = { "dummy", v } else - make_1(present,v,name .. "_" .. k) + d[#d+1] = v end end end local function make_2(present,tfmdata,characters,tree,name,preceding,unicode,done) - for k, v in next, tree do - if k == "ligature" then - local character = characters[preceding] - if not character then - if trace_baseinit then - report_prepare("weird ligature in lookup %a, current %C, preceding %C",sequence.name,v,preceding) - end - character = makefake(tfmdata,name,present) - end - local ligatures = character.ligatures - if ligatures then - ligatures[unicode] = { char = v } + if tonumber(tree) then + make_3(present,tfmdata,characters,tree,name,preceding,unicode,done,tree) + else + for k, v in next, tree do + if k == "ligature" then + make_3(present,tfmdata,characters,tree,name,preceding,unicode,done,v) else - character.ligatures = { [unicode] = { char = v } } + local code = present[name] or unicode + local name = name .. "_" .. k + make_2(present,tfmdata,characters,v,name,code,k,done) end - if done then - local d = done[name] - if not d then - done[name] = { "dummy", v } - else - d[#d+1] = v - end - end - else - local code = present[name] or unicode - local name = name .. "_" .. k - make_2(present,tfmdata,characters,v,name,code,k,done) end end end @@ -228,12 +240,11 @@ local function preparesubstitutions(tfmdata,feature,value,validlookups,lookuplis local ligatures = { } local alternate = tonumber(value) or true and 1 local defaultalt = otf.defaultbasealternate - local trace_singles = trace_baseinit and trace_singles local trace_alternatives = trace_baseinit and trace_alternatives local trace_ligatures = trace_baseinit and trace_ligatures - -- A chain of changes is handled in font-con which is clesner because + -- A chain of changes is handled in font-con which is cleaner because -- we can have shared changes and such. if not changed then @@ -493,6 +504,9 @@ local function featuresinitializer(tfmdata,value) local value = features[feature] if value then local validlookups, lookuplist = collectlookups(rawdata,feature,script,language) +-- if not validlookups and not lookuplist and script == "math" then +-- validlookups, lookuplist = collectlookups(rawdata,feature,"dflt","dflt") +-- end if not validlookups then -- skip elseif basesubstitutions and basesubstitutions[feature] then diff --git a/Master/texmf-dist/tex/context/base/mkiv/font-otr.lua b/Master/texmf-dist/tex/context/base/mkiv/font-otr.lua index 531f665de72..1e6f94e455c 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/font-otr.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/font-otr.lua @@ -66,6 +66,7 @@ if not modules then modules = { } end modules ['font-otr'] = { -- require("char-ini") -- end +local number = number local next, type, tonumber, rawget = next, type, tonumber, rawget local byte, lower, char, gsub = string.byte, string.lower, string.char, string.gsub local fullstrip = string.fullstrip @@ -682,15 +683,15 @@ local weights = { } local widths = { - [1] = "ultracondensed", - [2] = "extracondensed", - [3] = "condensed", - [4] = "semicondensed", - [5] = "normal", - [6] = "semiexpanded", - [7] = "expanded", - [8] = "extraexpanded", - [9] = "ultraexpanded", + "ultracondensed", + "extracondensed", + "condensed", + "semicondensed", + "normal", + "semiexpanded", + "expanded", + "extraexpanded", + "ultraexpanded", } setmetatableindex(weights, function(t,k) @@ -703,31 +704,31 @@ setmetatableindex(widths,function(t,k) return "normal" end) -local panoseweights = { - [ 0] = "normal", - [ 1] = "normal", - [ 2] = "verylight", - [ 3] = "light", - [ 4] = "thin", - [ 5] = "book", - [ 6] = "medium", - [ 7] = "demi", - [ 8] = "bold", - [ 9] = "heavy", - [10] = "black", +local panoseweights = { [0] = + "normal", + "normal", + "verylight", + "light", + "thin", + "book", + "medium", + "demi", + "bold", + "heavy", + "black", } -local panosewidths = { - [ 0] = "normal", - [ 1] = "normal", - [ 2] = "normal", - [ 3] = "normal", - [ 4] = "normal", - [ 5] = "expanded", - [ 6] = "condensed", - [ 7] = "veryexpanded", - [ 8] = "verycondensed", - [ 9] = "monospaced", +local panosewidths = { [0] = + "normal", + "normal", + "normal", + "normal", + "normal", + "expanded", + "condensed", + "veryexpanded", + "verycondensed", + "monospaced", } -- We implement a reader per table. @@ -1189,6 +1190,9 @@ readers.hmtx = function(f,fontdata,specification) -- if leftsidebearing ~= 0 then -- glyph.lsb = leftsidebearing -- end +-- if leftsidebearing ~= 0 then +-- glyph.lsb = leftsidebearing +-- end end -- The next can happen in for instance a monospace font or in a cjk font -- with fixed widths. @@ -1250,7 +1254,7 @@ readers.post = function(f,fontdata,specification) local version = readulong(f) fontdata.postscript = { version = version, - italicangle = round(1000*readfixed(f))/1000, + italicangle = readfixed(f), underlineposition = readfword(f), underlinethickness = readfword(f), monospaced = readulong(f), @@ -1292,8 +1296,8 @@ readers.post = function(f,fontdata,specification) if length > 0 then glyphs[mapping].name = readstring(f,length) else - report("quit post name fetching at %a of %a: %s",i,maxnames,"overflow") - break + -- report("quit post name fetching at %a of %a: %s",i,maxnames,"overflow") + -- break end end end @@ -1683,7 +1687,7 @@ end function readers.cmap(f,fontdata,specification) local tableoffset = gotodatatable(f,fontdata,"cmap",specification.glyphs) if tableoffset then - local version = readushort(f) + local version = readushort(f) -- check later versions local noftables = readushort(f) local records = { } local unicodecid = false @@ -1962,9 +1966,10 @@ local function getinfo(maindata,sub,platformnames,rawfamilynames,metricstoo,inst weight = weight and lower(weight), width = width and lower(width), pfmweight = metrics.weightclass or 400, -- will become weightclass - pfmwidth = metrics.widthclass or 5, -- will become widthclass + pfmwidth = metrics.widthclass or 5, -- will become widthclass panosewidth = metrics.panosewidth, panoseweight = metrics.panoseweight, + fstype = metrics.fstype or 0, -- embedding, subsetting and editing italicangle = postscript.italicangle or 0, units = fontheader.units or 0, designsize = fontdata.designsize, @@ -2424,25 +2429,29 @@ function readers.loadfont(filename,n,instance) nofsubfonts = fontdata.subfonts and #fontdata.subfonts or nil, }, resources = { - -- filename = fontdata.filename, - filename = filename, - private = privateoffset, - duplicates = fontdata.duplicates or { }, - features = fontdata.features or { }, -- we need to add these in the loader - sublookups = fontdata.sublookups or { }, -- we need to add these in the loader - marks = fontdata.marks or { }, -- we need to add these in the loader - markclasses = fontdata.markclasses or { }, -- we need to add these in the loader - marksets = fontdata.marksets or { }, -- we need to add these in the loader - sequences = fontdata.sequences or { }, -- we need to add these in the loader - variants = fontdata.variants, -- variant -> unicode -> glyph - version = getname(fontdata,"version"), - cidinfo = fontdata.cidinfo, - mathconstants = fontdata.mathconstants, - colorpalettes = fontdata.colorpalettes, - svgshapes = fontdata.svgshapes, - pngshapes = fontdata.pngshapes, - variabledata = fontdata.variabledata, - foundtables = fontdata.foundtables, + -- filename = fontdata.filename, + filename = filename, + private = privateoffset, + duplicates = fontdata.duplicates or { }, + features = fontdata.features or { }, -- we need to add these in the loader + sublookups = fontdata.sublookups or { }, -- we need to add these in the loader + marks = fontdata.marks or { }, -- we need to add these in the loader + markclasses = fontdata.markclasses or { }, -- we need to add these in the loader + marksets = fontdata.marksets or { }, -- we need to add these in the loader + sequences = fontdata.sequences or { }, -- we need to add these in the loader + variants = fontdata.variants, -- variant -> unicode -> glyph + version = getname(fontdata,"version"), + cidinfo = fontdata.cidinfo, + mathconstants = fontdata.mathconstants, + colorpalettes = fontdata.colorpalettes, + colorpaintdata = fontdata.colorpaintdata, + colorpaintlist = fontdata.colorpaintlist, + colorlinesdata = fontdata.colorlinesdata, + coloraffinedata = fontdata.coloraffinedata, + svgshapes = fontdata.svgshapes, + pngshapes = fontdata.pngshapes, + variabledata = fontdata.variabledata, + foundtables = fontdata.foundtables, }, } end @@ -2498,15 +2507,15 @@ function readers.getinfo(filename,specification) -- string, nil|number|table end end -function readers.rehash(fontdata,hashmethod) +function readers.rehash() -- fontdata,hashmethod report("the %a helper is not yet implemented","rehash") end -function readers.checkhash(fontdata) +function readers.checkhash() --fontdata report("the %a helper is not yet implemented","checkhash") end -function readers.pack(fontdata,hashmethod) +function readers.pack() -- fontdata,hashmethod report("the %a helper is not yet implemented","pack") end @@ -2522,6 +2531,10 @@ function readers.compact(fontdata) report("the %a helper is not yet implemented","compact") end +function readers.condense(fontdata) + report("the %a helper is not yet implemented","condense") +end + -- plug in local extenders = { } diff --git a/Master/texmf-dist/tex/context/base/mkiv/font-ots.lua b/Master/texmf-dist/tex/context/base/mkiv/font-ots.lua index 880bcb6d50a..6d7c5fb2568 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/font-ots.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/font-ots.lua @@ -8,6 +8,11 @@ if not modules then modules = { } end modules ['font-ots'] = { -- sequences } --[[ldx-- +<p>I need to check the description at the microsoft site ... it has been improved +so maybe there are some interesting details there. Most below is based on old and +incomplete documentation and involved quite a bit of guesswork (checking with the +abstract uniscribe of those days. But changing things is tricky!</p> + <p>This module is a bit more split up that I'd like but since we also want to test with plain <l n='tex'/> it has to be so. This module is part of <l n='context'/> and discussion about improvements and functionality mostly happens on the @@ -163,13 +168,10 @@ local trace_testruns = false registertracker("otf.testruns", function local forcediscretionaries = false local forcepairadvance = false -- for testing -directives.register("otf.forcediscretionaries",function(v) - forcediscretionaries = v -end) +local repeatablemultiples = context or false -directives.register("otf.forcepairadvance",function(v) - forcepairadvance = v -end) +directives.register("otf.forcediscretionaries", function(v) forcediscretionaries = v end) +directives.register("otf.forcepairadvance", function(v) forcepairadvance = v end) local report_direct = logs.reporter("fonts","otf direct") local report_subchain = logs.reporter("fonts","otf subchain") @@ -195,7 +197,6 @@ local setboth = nuts.setboth local getid = nuts.getid local getstate = nuts.getstate local getsubtype = nuts.getsubtype -local setsubtype = nuts.setsubtype local getchar = nuts.getchar local setchar = nuts.setchar local getdisc = nuts.getdisc @@ -213,39 +214,37 @@ local getglyphdata = nuts.getglyphdata -- their positions because some complex ligatures might need that. For the moment we -- use an x_ prefix because for now generic follows the other approach. -local copy_no_components = nuts.copy_no_components -local copy_only_glyphs = nuts.copy_only_glyphs -local count_components = nuts.count_components -local set_components = nuts.set_components -local get_components = nuts.get_components -local flush_components = nuts.flush_components +local components = nuts.components +local copynocomponents = components.copynocomponents +local copyonlyglyphs = components.copyonlyglyphs +local countcomponents = components.count +local setcomponents = components.set +local getcomponents = components.get +local flushcomponents = components.flush --------------------------------------------------------------------------------------- local ischar = nuts.ischar -local usesfont = nuts.uses_font - -local insert_node_after = nuts.insert_after -local copy_node = nuts.copy -local copy_node_list = nuts.copy_list -local remove_node = nuts.remove -local find_node_tail = nuts.tail -local flush_node_list = nuts.flush_list -local flush_node = nuts.flush_node -local end_of_math = nuts.end_of_math -local start_of_par = nuts.start_of_par +local usesfont = nuts.usesfont + +local insertnodeafter = nuts.insertafter +local copynode = nuts.copy +local copynodelist = nuts.copylist +local removenode = nuts.remove +local findnodetail = nuts.tail +local flushnodelist = nuts.flushlist +local flushnode = nuts.flushnode +local endofmath = nuts.endofmath + +local startofpar = nuts.startofpar local setmetatable = setmetatable local setmetatableindex = table.setmetatableindex local nextnode = nuts.traversers.node ------ zwnj = 0x200C ------ zwj = 0x200D - local nodecodes = nodes.nodecodes local glyphcodes = nodes.glyphcodes -local disccodes = nodes.disccodes local glyph_code = nodecodes.glyph local glue_code = nodecodes.glue @@ -257,8 +256,7 @@ local par_code = nodecodes.par local lefttoright_code = nodes.dirvalues.lefttoright local righttoleft_code = nodes.dirvalues.righttoleft -local discretionarydisc_code = disccodes.discretionary -local ligatureglyph_code = glyphcodes.ligature +local discretionarydisc_code = nodes.disccodes.discretionary local a_noligature = attributes.private("noligature") @@ -317,13 +315,6 @@ local checkstep = (tracers and tracers.steppers.check) or function() local registerstep = (tracers and tracers.steppers.register) or function() end local registermessage = (tracers and tracers.steppers.message) or function() end --- local function checkdisccontent(d) --- local pre, post, replace = getdisc(d) --- if pre then for n in traverse_id(glue_code,pre) do report("pre: %s",nodes.idstostring(pre)) break end end --- if post then for n in traverse_id(glue_code,post) do report("pos: %s",nodes.idstostring(post)) break end end --- if replace then for n in traverse_id(glue_code,replace) do report("rep: %s",nodes.idstostring(replace)) break end end --- end - local function logprocess(...) if trace_steps then registermessage(...) @@ -380,7 +371,7 @@ local function cref(dataset,sequence,index) return "no valid dataset" end local merged = sequence.merged and "merged " or "" - if index then + if index and index > 1 then return formatters["feature %a, type %a, %schain lookup %a, index %a"]( dataset[4],sequence.type,merged,sequence.name,index) else @@ -423,12 +414,12 @@ local function flattendisk(head,disc) local prev, next = getboth(disc) local ishead = head == disc setdisc(disc) - flush_node(disc) + flushnode(disc) if pre then - flush_node_list(pre) + flushnodelist(pre) end if post then - flush_node_list(post) + flushnodelist(post) end if ishead then if replace then @@ -458,7 +449,7 @@ end local function appenddisc(disc,list) local pre, post, replace, pretail, posttail, replacetail = getdisc(disc,true) local posthead = list - local replacehead = copy_node_list(list) + local replacehead = copynodelist(list) if post then setlink(posttail,posthead) else @@ -480,16 +471,15 @@ local function markstoligature(head,start,stop,char) local next = getnext(stop) setprev(start) setnext(stop) - local base = copy_no_components(start,copyinjection) + local base = copynocomponents(start,copyinjection) if head == start then head = base end resetinjection(base) setchar(base,char) - setsubtype(base,ligatureglyph_code) - set_components(base,start) + setcomponents(base,start) setlink(prev,base,next) - flush_components(start) + flushcomponents(start) return head, base end end @@ -509,7 +499,7 @@ local no_right_ligature_code = 2 local no_left_kern_code = 4 local no_right_kern_code = 8 -local has_glyph_option = node.direct.has_glyph_option or function(n,c) +local hasglyphoption = function(n,c) if c == no_left_ligature_code or c == no_right_ligature_code then return getattr(n,a_noligature) == 1 else @@ -520,7 +510,7 @@ end -- in lmtx we need to check the components and can be slightly more clever local function toligature(head,start,stop,char,dataset,sequence,skiphash,discfound,hasmarks) -- brr head - if has_glyph_option(start,no_right_ligature_code) then + if hasglyphoption(start,no_right_ligature_code) then return head, start end if start == stop and getchar(start) == char then @@ -533,14 +523,13 @@ local function toligature(head,start,stop,char,dataset,sequence,skiphash,discfou local comp = start setprev(start) setnext(stop) - local base = copy_no_components(start,copyinjection) + local base = copynocomponents(start,copyinjection) if start == head then head = base end resetinjection(base) setchar(base,char) - setsubtype(base,ligatureglyph_code) - set_components(base,comp) + setcomponents(base,comp) setlink(prev,base,next) if not discfound then local deletemarks = not skiphash or hasmarks @@ -554,7 +543,7 @@ local function toligature(head,start,stop,char,dataset,sequence,skiphash,discfou local char = getchar(start) if not marks[char] then baseindex = baseindex + componentindex - componentindex = count_components(start,marks) + componentindex = countcomponents(start,marks) -- we can be more clever here: "not deletemarks or (skiphash and not skiphash[char])" -- and such: elseif not deletemarks then @@ -563,9 +552,9 @@ local function toligature(head,start,stop,char,dataset,sequence,skiphash,discfou if trace_marks then logwarning("%s: keep ligature mark %s, gets index %s",pref(dataset,sequence),gref(char),getligaindex(start)) end - local n = copy_node(start) + local n = copynode(start) copyinjection(n,start) -- is this ok ? we position later anyway - head, current = insert_node_after(head,current,n) -- unlikely that mark has components + head, current = insertnodeafter(head,current,n) -- unlikely that mark has components elseif trace_marks then logwarning("%s: delete ligature mark %s",pref(dataset,sequence),gref(char)) end @@ -590,7 +579,7 @@ local function toligature(head,start,stop,char,dataset,sequence,skiphash,discfou break end end - flush_components(components) + flushcomponents(components) else -- discfound ... forget about marks .. probably no scripts that hyphenate and have marks local discprev, discnext = getboth(discfound) @@ -602,8 +591,8 @@ local function toligature(head,start,stop,char,dataset,sequence,skiphash,discfou if not replace then -- looks like we never come here as it's not okay local prev = getprev(base) - -- local comp = get_components(base) -- already set - local copied = copy_only_glyphs(comp) + -- local comp = getcomponents(base) -- already set + local copied = copyonlyglyphs(comp) if pre then setlink(discprev,pre) else @@ -620,7 +609,7 @@ local function toligature(head,start,stop,char,dataset,sequence,skiphash,discfou setlink(prev,discfound,next) setboth(base) -- here components have a pointer so we can't free it! - set_components(base,copied) + setcomponents(base,copied) replace = base if forcediscretionaries then setdisc(discfound,pre,post,replace,discretionarydisc_code) @@ -637,32 +626,69 @@ end local function multiple_glyphs(head,start,multiple,skiphash,what,stop) -- what to do with skiphash matches here local nofmultiples = #multiple if nofmultiples > 0 then + local first = start resetinjection(start) setchar(start,multiple[1]) if nofmultiples > 1 then - local sn = getnext(start) - for k=2,nofmultiples do + -- local sn = getnext(start) + for i=2,nofmultiples do -- untested: -- -- while ignoremarks and marks[getchar(sn)] then -- local sn = getnext(sn) -- end - local n = copy_node(start) -- ignore components + local n = copynode(start) -- ignore components resetinjection(n) - setchar(n,multiple[k]) - insert_node_after(head,start,n) + setchar(n,multiple[i]) + insertnodeafter(head,start,n) start = n end - if what == true then - -- we're ok - elseif what > 1 then - local m = multiple[nofmultiples] - for i=2,what do - local n = copy_node(start) -- ignore components - resetinjection(n) - setchar(n,m) - insert_node_after(head,start,n) - start = n + end + if what ~= true and repeatablemultiples then + -- This is just some experimental code; we might introduce gsub_extensible + -- some day instead. Beware: when we have a feature that mixes alternates and + -- multiples we need to make sure we don't handle the alternate string values + -- here. + local kind = type(what) + local m, f, l + if kind == "string" then + local what, n = string.match(what,"^repeat(.-)[:=](%d+)$") + if what == "middle" then + m = tonumber(n) + elseif what == "first" then + f = tonumber(n) + elseif what == "last" then + l = tonumber(n) + end + elseif kind == "table" then + -- won't happen because currently we don't split these values + m = what.middle + f = what.first + l = what.last + end + if f or m or l then + if m and m > 1 and nofmultiples == 3 then + local middle = getnext(first) + for i=2,m do + local n = copynode(middle) -- ignore components + resetinjection(n) + insertnodeafter(head,first,n) + end + end + if f and f > 1 then + for i=2,f do + local n = copynode(first) -- ignore components + resetinjection(n) + insertnodeafter(head,first,n) + end + end + if l and l > 1 then + for i=2,l do + local n = copynode(start) -- ignore components + resetinjection(n) + insertnodeafter(head,start,n) + start = n + end end end end @@ -768,7 +794,7 @@ function handlers.gsub_ligature(head,start,dataset,sequence,ligature,rlmode,skip while current do local char = ischar(current,currentfont) if char then - local lg = ligature[char] + local lg = not tonumber(ligature) and ligature[char] if lg then stop = current ligature = lg @@ -781,14 +807,14 @@ function handlers.gsub_ligature(head,start,dataset,sequence,ligature,rlmode,skip end end if stop then - local lig = ligature.ligature - if lig then + local ligature = tonumber(ligature) or ligature.ligature + if ligature then if trace_ligatures then local stopchar = getchar(stop) - head, start = markstoligature(head,start,stop,lig) + head, start = markstoligature(head,start,stop,ligature) logprocess("%s: replacing %s upto %s by ligature %s case 1",pref(dataset,sequence),gref(startchar),gref(stopchar),gref(getchar(start))) else - head, start = markstoligature(head,start,stop,lig) + head, start = markstoligature(head,start,stop,ligature) end return head, start, true, false else @@ -804,7 +830,7 @@ function handlers.gsub_ligature(head,start,dataset,sequence,ligature,rlmode,skip if skiphash and skiphash[char] then current = getnext(current) else - local lg = ligature[char] + local lg = not tonumber(ligature) and ligature[char] if lg then if marks[char] then hasmarks = true @@ -838,20 +864,20 @@ function handlers.gsub_ligature(head,start,dataset,sequence,ligature,rlmode,skip local match if replace then local char = ischar(replace,currentfont) - if char and ligature[char] then + if char and (not tonumber(ligature) and ligature[char]) then match = true end end if not match and pre then local char = ischar(pre,currentfont) - if char and ligature[char] then + if char and (not tonumber(ligature) and ligature[char]) then match = true end end if not match and not pre or not replace then local n = getnext(discfound) local char = ischar(n,currentfont) - if char and ligature[char] then + if char and (not tonumber(ligature) and ligature[char]) then match = true end end @@ -861,9 +887,9 @@ function handlers.gsub_ligature(head,start,dataset,sequence,ligature,rlmode,skip local prev = getprev(start) if stop then setnext(stop) - local copy = copy_node_list(start) + local copy = copynodelist(start) local tail = stop -- was: getprev(stop) -- Kai: needs checking on your samples - local liat = find_node_tail(copy) + local liat = findnodetail(copy) if pre then setlink(liat,pre) end @@ -874,7 +900,7 @@ function handlers.gsub_ligature(head,start,dataset,sequence,ligature,rlmode,skip replace = start else setnext(start) - local copy = copy_node(start) + local copy = copynode(start) if pre then setlink(copy,pre) end @@ -895,24 +921,26 @@ function handlers.gsub_ligature(head,start,dataset,sequence,ligature,rlmode,skip return head, start, true, true end end - local lig = ligature.ligature - if lig then + local ligature = tonumber(ligature) or ligature.ligature + if ligature then if stop then if trace_ligatures then local stopchar = getchar(stop) - -- head, start = toligature(head,start,stop,lig,dataset,sequence,skiphash,discfound,hasmarks) - head, start = toligature(head,start,stop,lig,dataset,sequence,skiphash,false,hasmarks) - logprocess("%s: replacing %s upto %s by ligature %s case 2",pref(dataset,sequence),gref(startchar),gref(stopchar),gref(lig)) + -- head, start = toligature(head,start,stop,ligature,dataset,sequence,skiphash,discfound,hasmarks) + head, start = toligature(head,start,stop,ligature,dataset,sequence,skiphash,false,hasmarks) + logprocess("%s: replacing %s upto %s by ligature %s case 2",pref(dataset,sequence),gref(startchar),gref(stopchar),gref(ligature)) + -- we can have a rare case of multiple disc in a lig but that makes no sense language wise but if really + -- needed we could backtrack if we're in a disc node else - -- head, start = toligature(head,start,stop,lig,dataset,sequence,skiphash,discfound,hasmarks) - head, start = toligature(head,start,stop,lig,dataset,sequence,skiphash,false,hasmarks) + -- head, start = toligature(head,start,stop,ligature,dataset,sequence,skiphash,discfound,hasmarks) + head, start = toligature(head,start,stop,ligature,dataset,sequence,skiphash,false,hasmarks) end else -- weird but happens (in some arabic font) resetinjection(start) - setchar(start,lig) + setchar(start,ligature) if trace_ligatures then - logprocess("%s: replacing %s by (no real) ligature %s case 3",pref(dataset,sequence),gref(startchar),gref(lig)) + logprocess("%s: replacing %s by (no real) ligature %s case 3",pref(dataset,sequence),gref(startchar),gref(ligature)) end end return head, start, true, false @@ -924,7 +952,7 @@ function handlers.gsub_ligature(head,start,dataset,sequence,ligature,rlmode,skip end function handlers.gpos_single(head,start,dataset,sequence,kerns,rlmode,skiphash,step,injection) - if has_glyph_option(start,no_right_kern_code) then + if hasglyphoption(start,no_right_kern_code) then return head, start, false else local startchar = getchar(start) @@ -945,7 +973,7 @@ function handlers.gpos_single(head,start,dataset,sequence,kerns,rlmode,skiphash, end function handlers.gpos_pair(head,start,dataset,sequence,kerns,rlmode,skiphash,step,injection) - if has_glyph_option(start,no_right_kern_code) then + if hasglyphoption(start,no_right_kern_code) then return head, start, false else local snext = getnext(start) @@ -1055,7 +1083,7 @@ function handlers.gpos_mark2base(head,start,dataset,sequence,markanchors,rlmode, end return head, start, true elseif trace_bugs then - -- onetimemessage(currentfont,basechar,"no base anchors",report_fonts) + -- onetimemessage(currentfont,basechar,"no base anchors") logwarning("%s: mark %s is not anchored to %s",pref(dataset,sequence),gref(markchar),gref(basechar)) end elseif trace_bugs then @@ -1121,7 +1149,7 @@ function handlers.gpos_mark2ligature(head,start,dataset,sequence,markanchors,rlm end elseif trace_bugs then -- logwarning("%s: char %s is missing in font",pref(dataset,sequence),gref(basechar)) - onetimemessage(currentfont,basechar,"no base anchors",report_fonts) + onetimemessage(currentfont,basechar,"no base anchors") end elseif trace_bugs then logwarning("%s: prev node is no char, case %i",pref(dataset,sequence),1) @@ -1286,7 +1314,7 @@ as less as needed but that would also make the code even more messy.</p> -- To be done (example needed): what if > 1 steps --- this is messy: do we need this disc checking also in alternaties? +-- this is messy: do we need this disc checking also in alternates? local function reportzerosteps(dataset,sequence) logwarning("%s: no steps",cref(dataset,sequence)) @@ -1322,7 +1350,7 @@ function chainprocs.gsub_remove(head,start,stop,dataset,sequence,currentlookup,r if trace_chains then logprocess("%s: removing character %s",cref(dataset,sequence,chainindex),gref(getchar(start))) end - head, start = remove_node(head,start,true) + head, start = removenode(head,start,true) return head, getprev(start), true end @@ -1489,7 +1517,7 @@ function chainprocs.gsub_ligature(head,start,stop,dataset,sequence,currentlookup current = getnext(current) -- end else - local lg = ligatures[schar] + local lg = not tonumber(ligatures) and ligatures[schar] if lg then ligatures = lg last = current @@ -1508,7 +1536,7 @@ function chainprocs.gsub_ligature(head,start,stop,dataset,sequence,currentlookup end end end - local ligature = ligatures.ligature + local ligature = tonumber(ligatures) or ligatures.ligature if ligature then if chainindex then stop = last @@ -1536,7 +1564,7 @@ end function chainprocs.gpos_single(head,start,stop,dataset,sequence,currentlookup,rlmode,skiphash,chainindex) -- we actually should check no_left_kern_code with next - if not has_glyph_option(start,no_right_kern_code) then + if not hasglyphoption(start,no_right_kern_code) then local mapping = currentlookup.mapping if mapping == nil then mapping = getmapping(dataset,sequence,currentlookup) @@ -1566,7 +1594,7 @@ end function chainprocs.gpos_pair(head,start,stop,dataset,sequence,currentlookup,rlmode,skiphash,chainindex) -- todo: injections ? -- we actually should check no_left_kern_code with next - if not has_glyph_option(start,no_right_kern_code) then + if not hasglyphoption(start,no_right_kern_code) then local mapping = currentlookup.mapping if mapping == nil then mapping = getmapping(dataset,sequence,currentlookup) @@ -1861,7 +1889,7 @@ function chainprocs.gpos_cursive(head,start,stop,dataset,sequence,currentlookup, end end elseif trace_bugs then - onetimemessage(currentfont,startchar,"no entry anchors",report_fonts) + onetimemessage(currentfont,startchar,"no entry anchors") end break end @@ -1917,7 +1945,7 @@ do if not userkern then -- generic local setkern = nuts.setkern -- not injections.setkern userkern = function(k) - local n = copy_node(thekern) + local n = copynode(thekern) setkern(n,k) return n end @@ -1934,13 +1962,13 @@ local function checked(head) if next then setlink(kern,next) end - flush_node(current) + flushnode(current) head = kern current = next else local prev, next = getboth(current) setlink(prev,kern,next) - flush_node(current) + flushnode(current) current = next end else @@ -1959,12 +1987,11 @@ end local noflags = { false, false, false, false } -local function chainrun(head,start,last,dataset,sequence,rlmode,skiphash,ck) +local function chainrun(head,start,last,dataset,sequence,rlmode,skiphash,ck,where) local size = ck[5] - ck[4] + 1 local chainlookups = ck[6] local done = false - -- current match if chainlookups then -- Lookups can be like { 1, false, 3 } or { false, 2 } or basically anything and @@ -1975,21 +2002,30 @@ local function chainrun(head,start,last,dataset,sequence,rlmode,skiphash,ck) -- if nofchainlookups > size then -- -- bad rules -- end - local chainlookup = chainlookups[1] - for j=1,#chainlookup do - local chainstep = chainlookup[j] - local chainkind = chainstep.type - local chainproc = chainprocs[chainkind] - if chainproc then - local ok - head, start, ok = chainproc(head,start,last,dataset,sequence,chainstep,rlmode,skiphash) - if ok then - done = true + if chainlookup then + for j=1,#chainlookup do + local chainstep = chainlookup[j] + if chainstep then + local chainkind = chainstep.type + local chainproc = chainprocs[chainkind] + if chainproc then + local ok + -- HH: chainindex 1 added here (for KAI to check too), there are weird ligatures e.g. + -- char + mark -> char where mark has to disappear + head, start, ok = chainproc(head,start,last,dataset,sequence,chainstep,rlmode,skiphash,1) + if ok then + done = true + end + else + logprocess("%s: %s is not yet supported (1)",cref(dataset,sequence),chainkind) + end + else + logprocess("%s: has an issue (1)",cref(dataset,sequence)) end - else - logprocess("%s: %s is not yet supported (1)",cref(dataset,sequence),chainkind) end + else + -- whatever end else @@ -2030,23 +2066,28 @@ local function chainrun(head,start,last,dataset,sequence,rlmode,skiphash,ck) if chainlookup then for j=1,#chainlookup do local chainstep = chainlookup[j] - local chainkind = chainstep.type - local chainproc = chainprocs[chainkind] - if chainproc then - local ok, n - head, start, ok, n = chainproc(head,start,last,dataset,sequence,chainstep,rlmode,skiphash,i) - -- messy since last can be changed ! - if ok then - done = true - if n and n > 1 and i + n > nofchainlookups then - -- this is a safeguard, we just ignore the rest of the lookups - i = size -- prevents an advance - break + if chainstep then + local chainkind = chainstep.type + local chainproc = chainprocs[chainkind] + if chainproc then + local ok, n + head, start, ok, n = chainproc(head,start,last,dataset,sequence,chainstep,rlmode,skiphash,i) + -- messy since last can be changed ! + if ok then + done = true + if n and n > 1 and i + n > nofchainlookups then + -- this is a safeguard, we just ignore the rest of the lookups + i = size -- prevents an advance + break + end end + else + -- actually an error + logprocess("%s: %s is not yet supported (2)",cref(dataset,sequence),chainkind) end else -- actually an error - logprocess("%s: %s is not yet supported (2)",cref(dataset,sequence),chainkind) + logprocess("%s: has an issue (2)",cref(dataset,sequence)) end end else @@ -2074,7 +2115,7 @@ local function chainrun(head,start,last,dataset,sequence,rlmode,skiphash,ck) else done = true if trace_contexts then - logprocess("%s: skipping match",cref(dataset,sequence)) + logprocess("%s: skipping match @ %i",cref(dataset,sequence),where) end end end @@ -2104,6 +2145,8 @@ local function chaindisk(head,start,dataset,sequence,rlmode,skiphash,ck) local last = start local prev = getprev(start) local hasglue = false + local useddisc = nil -- new 2022-09-25 + local usedstart = start -- new 2022-09-25 -- fishy: so we can overflow and then go on in the sweep? -- todo : id can also be glue_code as we checked spaces @@ -2174,7 +2217,7 @@ local function chaindisk(head,start,dataset,sequence,rlmode,skiphash,ck) tail = prev setprev(current,sweepnode) else - tail = find_node_tail(head) + tail = findnodetail(head) end setnext(sweepnode,current) setprev(head) @@ -2265,15 +2308,14 @@ local function chaindisk(head,start,dataset,sequence,rlmode,skiphash,ck) end end end + local done = false if lookaheaddisc then - local cf = start local cl = getprev(lookaheaddisc) local cprev = getprev(start) local insertedmarks = 0 - while cprev do local char = ischar(cf,currentfont) if char and marks[char] then @@ -2292,13 +2334,13 @@ local function chaindisk(head,start,dataset,sequence,rlmode,skiphash,ck) head = lookaheaddisc end local pre, post, replace = getdisc(lookaheaddisc) - local new = copy_node_list(cf) -- br, how often does that happen + local new = copynodelist(cf) -- br, how often does that happen local cnew = new if pre then - setlink(find_node_tail(cf),pre) + setlink(findnodetail(cf),pre) end if replace then - local tail = find_node_tail(new) + local tail = findnodetail(new) setlink(tail,replace) end for i=1,insertedmarks do @@ -2312,14 +2354,14 @@ local function chaindisk(head,start,dataset,sequence,rlmode,skiphash,ck) end if not notmatchpre[lookaheaddisc] then local ok = false - cf, start, ok = chainrun(cf,start,cl,dataset,sequence,rlmode,skiphash,ck) + cf, start, ok = chainrun(cf,start,cl,dataset,sequence,rlmode,skiphash,ck,1) if ok then done = true end end if not notmatchreplace[lookaheaddisc] then local ok = false - new, cnew, ok = chainrun(new,cnew,clast,dataset,sequence,rlmode,skiphash,ck) + new, cnew, ok = chainrun(new,cnew,clast,dataset,sequence,rlmode,skiphash,ck,2) if ok then done = true end @@ -2330,16 +2372,14 @@ local function chaindisk(head,start,dataset,sequence,rlmode,skiphash,ck) setdisc(lookaheaddisc,cf,post,new) end start = getprev(lookaheaddisc) + useddisc = lookaheaddisc -- new 2022-09-25 sweephead[cf] = getnext(clast) or false sweephead[new] = getnext(cl) or false - elseif backtrackdisc then - local cf = getnext(backtrackdisc) local cl = start local cnext = getnext(start) local insertedmarks = 0 - while cnext do local char = ischar(cnext,currentfont) if char and marks[char] then @@ -2354,8 +2394,8 @@ local function chaindisk(head,start,dataset,sequence,rlmode,skiphash,ck) setprev(cf) setnext(cl) local pre, post, replace, pretail, posttail, replacetail = getdisc(backtrackdisc,true) - local new = copy_node_list(cf) - local cnew = find_node_tail(new) + local new = copynodelist(cf) + local cnew = findnodetail(new) for i=1,insertedmarks do cnew = getprev(cnew) end @@ -2365,14 +2405,14 @@ local function chaindisk(head,start,dataset,sequence,rlmode,skiphash,ck) end if not notmatchpost[backtrackdisc] then local ok = false - cf, start, ok = chainrun(cf,start,last,dataset,sequence,rlmode,skiphash,ck) + cf, start, ok = chainrun(cf,start,last,dataset,sequence,rlmode,skiphash,ck,3) if ok then done = true end end if not notmatchreplace[backtrackdisc] then local ok = false - new, cnew, ok = chainrun(new,cnew,clast,dataset,sequence,rlmode,skiphash,ck) + new, cnew, ok = chainrun(new,cnew,clast,dataset,sequence,rlmode,skiphash,ck,4) if ok then done = true end @@ -2393,33 +2433,57 @@ local function chaindisk(head,start,dataset,sequence,rlmode,skiphash,ck) setdisc(backtrackdisc,pre,post,replace) end start = getprev(backtrackdisc) + useddisc = backtrackdisc -- new 2022-09-25 sweephead[post] = getnext(clast) or false sweephead[replace] = getnext(last) or false - else local ok = false - head, start, ok = chainrun(head,start,last,dataset,sequence,rlmode,skiphash,ck) + head, start, ok = chainrun(head,start,last,dataset,sequence,rlmode,skiphash,ck,5) if ok then done = true end end - - return head, start, done + if useddisc and start ~= usedstart then -- make this option per font -- new 2022-09-25 + start = getnext(start) -- new 2022-09-25 + end -- new 2022-09-25 + return head, start, done, useddisc -- new 2022-09-25 end -local function chaintrac(head,start,dataset,sequence,rlmode,skiphash,ck,match,discseen,sweepnode) - local rule = ck[1] - local lookuptype = ck[8] or ck[2] - local nofseq = #ck[3] - local first = ck[4] - local last = ck[5] - local char = getchar(start) - logwarning("%s: rule %s %s at char %s for (%s,%s,%s) chars, lookuptype %a, %sdisc seen, %ssweeping", - cref(dataset,sequence),rule,match and "matches" or "nomatch", - gref(char),first-1,last-first+1,nofseq-last,lookuptype, - discseen and "" or "no ", sweepnode and "" or "not ") +local chaintrac do + + local level = 0 + local last = { } + + chaintrac = function(head,start,dataset,sequence,rlmode,skiphash,ck,match,discseen,sweepnode) + if dataset then + level = level + 1 + last[level] = start + local rule = ck[1] + local lookuptype = ck[8] or ck[2] + local nofseq = #ck[3] -- ck[3].n + local first = ck[4] + local last = ck[5] + local char = getchar(start) + logwarning("+ %i : %s: rule %s %s at char %s for (%s,%s,%s) chars, lookuptype %a, %sdisc seen, %ssweeping", + level,cref(dataset,sequence),rule,match and "matches" or "nomatch", + gref(char),first-1,last-first+1,nofseq-last,lookuptype, + discseen and "" or "no ", sweepnode and "" or "not ") + else + -- (start,done) + local what = start and "done" or "continue" + local where = head == last[level] and "same" or "different" + local char = getchar(head) + if char then + logwarning("- %i : %s at char %s, %s node",level,what,gref(char),where) + else + logwarning("- %i : %s, %s node",level,what,where) + end + level = level - 1 + end + end + end -- The next one is quite optimized but still somewhat slow, fonts like ebgaramond @@ -2433,6 +2497,9 @@ end -- the previous disc .. such be it (<before><disc><current=fl><after> with only f done) local function handle_contextchain(head,start,dataset,sequence,contexts,rlmode,skiphash) + if not contexts then + return head, start, false + end -- optimizing for rlmode gains nothing local sweepnode = sweepnode local sweeptype = sweeptype @@ -2473,160 +2540,291 @@ local function handle_contextchain(head,start,dataset,sequence,contexts,rlmode,s for k=1,nofcontexts do -- does this disc mess work well with n > 1 - local ck = contexts[k] - local seq = ck[3] - local f = ck[4] -- first current + local ck = contexts[k] + local seq = ck[3] + local f = ck[4] -- first current + local last = start if not startchar or not seq[f][startchar] then -- report("no hit in %a at %i of %i contexts",sequence.type,k,nofcontexts) goto next end - local s = seq.n -- or #seq - local l = ck[5] -- last current - local current = start - local last = start - + local s = seq.n -- or #seq if s == 1 then - goto next - end + -- bit weird case: why use a chain, but it is a hit + else + local l = ck[5] -- last current + local current = start + -- local last = start - -- current match + -- current match - if l > f then - -- before/current/after | before/current | current/after - local discfound -- = nil - local n = f + 1 - last = startnext -- the second in current (first already matched) - while n <= l do - if postreplace and not last then - last = getnext(sweepnode) - sweeptype = nil - end - if last then - local char, id = ischar(last,currentfont) - if char then - if skiphash and skiphash[char] then - skipped = true - if trace_skips then - show_skip(dataset,sequence,char,ck,classes[char]) - end - last = getnext(last) - elseif seq[n][char] then - if n < l then + if l > f then + -- before/current/after | before/current | current/after + local discfound -- = nil + local n = f + 1 + last = startnext -- the second in current (first already matched) + while n <= l do + if postreplace and not last then + last = getnext(sweepnode) + sweeptype = nil + end + if last then + local char, id = ischar(last,currentfont) + if char then + if skiphash and skiphash[char] then + skipped = true + if trace_skips then + show_skip(dataset,sequence,char,ck,classes[char]) + end last = getnext(last) - end - n = n + 1 - elseif discfound then - notmatchreplace[discfound] = true - if notmatchpre[discfound] then - goto next + elseif seq[n][char] then + if n < l then + last = getnext(last) + end + n = n + 1 + elseif discfound then + notmatchreplace[discfound] = true + if notmatchpre[discfound] then + goto next + else + break + end else - break - end - else - goto next - end - elseif char == false then - if discfound then - notmatchreplace[discfound] = true - if notmatchpre[discfound] then goto next + end + elseif char == false then + if discfound then + notmatchreplace[discfound] = true + if notmatchpre[discfound] then + goto next + else + break + end else - break + goto next end - else - goto next - end - elseif id == disc_code then - -- elseif id == disc_code and (not discs or discs[last]) then - discseen = true - discfound = last - notmatchpre[last] = nil - notmatchpost[last] = true - notmatchreplace[last] = nil - local pre, post, replace = getdisc(last) - if pre then - local n = n - while pre do - if seq[n][getchar(pre)] then - n = n + 1 - if n > l then + elseif id == disc_code then + -- elseif id == disc_code and (not discs or discs[last]) then + discseen = true + discfound = last + notmatchpre[last] = nil + notmatchpost[last] = true + notmatchreplace[last] = nil + local pre, post, replace = getdisc(last) + if pre then + local n = n + while pre do + if seq[n][getchar(pre)] then + n = n + 1 + if n > l then + break + end + pre = getnext(pre) + else + notmatchpre[last] = true break end - pre = getnext(pre) - else + end + if n <= l then notmatchpre[last] = true - break end - end - if n <= l then + else notmatchpre[last] = true end + if replace then + -- so far we never entered this branch + while replace do + if seq[n][getchar(replace)] then + n = n + 1 + if n > l then + break + end + replace = getnext(replace) + else + notmatchreplace[last] = true + if notmatchpre[last] then + goto next + else + break + end + end + end + -- why here again + if notmatchpre[last] then + goto next + end + end + -- maybe only if match + last = getnext(last) else - notmatchpre[last] = true + goto next end - if replace then - -- so far we never entered this branch - while replace do - if seq[n][getchar(replace)] then - n = n + 1 - if n > l then - break + else + goto next + end + end + end + + -- before + + if f > 1 then + -- if startprev then -- new 2022-09-25 + local prev = startprev + if prereplace and prev == checkdisc then + prev = getprev(sweepnode) + end + if prev then + local discfound -- = nil + local n = f - 1 + while n >= 1 do + if prev then + local char, id = ischar(prev,currentfont) + if char then + if skiphash and skiphash[char] then + skipped = true + if trace_skips then + show_skip(dataset,sequence,char,ck,classes[char]) + end + prev = getprev(prev) + elseif seq[n][char] then + if n > 1 then + prev = getprev(prev) + end + n = n - 1 + elseif discfound then + notmatchreplace[discfound] = true + if notmatchpost[discfound] then + goto next + else + break + end + else + goto next end - replace = getnext(replace) - else - notmatchreplace[last] = true - if notmatchpre[last] then + elseif char == false then + if discfound then + notmatchreplace[discfound] = true + if notmatchpost[discfound] then + goto next + end + else goto next + end + break + elseif id == disc_code then + -- elseif id == disc_code and (not discs or discs[prev]) then + -- the special case: f i where i becomes dottless i .. + discseen = true + discfound = prev + notmatchpre[prev] = true + notmatchpost[prev] = nil + notmatchreplace[prev] = nil + local pre, post, replace, pretail, posttail, replacetail = getdisc(prev,true) + -- weird test: needs checking + if pre ~= start and post ~= start and replace ~= start then + if post then + local n = n + while posttail do + if seq[n][getchar(posttail)] then + n = n - 1 + if posttail == post or n < 1 then + break + else + posttail = getprev(posttail) + end + else + notmatchpost[prev] = true + break + end + end + if n >= 1 then + notmatchpost[prev] = true + end + else + notmatchpost[prev] = true + end + if replace then + -- we seldom enter this branch (e.g. on brill efficient) + while replacetail do + if seq[n][getchar(replacetail)] then + n = n - 1 + if replacetail == replace or n < 1 then + break + else + replacetail = getprev(replacetail) + end + else + notmatchreplace[prev] = true + if notmatchpost[prev] then + goto next + else + break + end + end + end + else + -- notmatchreplace[prev] = true -- not according to Kai + end + end + prev = getprev(prev) + -- elseif id == glue_code and seq[n][32] and isspace(prev,threshold,id) then + -- elseif seq[n][32] and spaces[prev] then + -- n = n - 1 + -- prev = getprev(prev) + elseif id == glue_code then + local sn = seq[n] + if (sn[32] and spaces[prev]) or sn[0xFFFC] then + n = n - 1 + prev = getprev(prev) else - break + goto next end + elseif seq[n][0xFFFC] then + n = n - 1 + prev = getprev(prev) + else + goto next end - end - -- why here again - if notmatchpre[last] then + else goto next end end - -- maybe only if match - last = getnext(last) else goto next end - else - goto next - end + -- else -- new 2022-09-25 + -- goto next -- new 2022-09-25 + -- end -- new 2022-09-25 end - end - -- before + -- after - if f > 1 then - if startprev then - local prev = startprev - if prereplace and prev == checkdisc then - prev = getprev(sweepnode) + if s > l then + local current = last and getnext(last) + if not current and postreplace then + current = getnext(sweepnode) end - if prev then + if current then local discfound -- = nil - local n = f - 1 - while n >= 1 do - if prev then - local char, id = ischar(prev,currentfont) + local n = l + 1 + while n <= s do + if current then + local char, id = ischar(current,currentfont) if char then if skiphash and skiphash[char] then skipped = true if trace_skips then show_skip(dataset,sequence,char,ck,classes[char]) end - prev = getprev(prev) + current = getnext(current) -- was absent elseif seq[n][char] then - if n > 1 then - prev = getprev(prev) + if n < s then -- new test + current = getnext(current) -- was absent end - n = n - 1 + n = n + 1 elseif discfound then notmatchreplace[discfound] = true - if notmatchpost[discfound] then + if notmatchpre[discfound] then goto next else break @@ -2637,237 +2835,108 @@ local function handle_contextchain(head,start,dataset,sequence,contexts,rlmode,s elseif char == false then if discfound then notmatchreplace[discfound] = true - if notmatchpost[discfound] then + if notmatchpre[discfound] then goto next + else + break end else goto next end - break elseif id == disc_code then - -- elseif id == disc_code and (not discs or discs[prev]) then - -- the special case: f i where i becomes dottless i .. - discseen = true - discfound = prev - notmatchpre[prev] = true - notmatchpost[prev] = nil - notmatchreplace[prev] = nil - local pre, post, replace, pretail, posttail, replacetail = getdisc(prev,true) - -- weird test: needs checking - if pre ~= start and post ~= start and replace ~= start then - if post then - local n = n - while posttail do - if seq[n][getchar(posttail)] then - n = n - 1 - if posttail == post or n < 1 then - break - else - posttail = getprev(posttail) - end - else - notmatchpost[prev] = true + -- elseif id == disc_code and (not discs or discs[current]) then + discseen = true + discfound = current + notmatchpre[current] = nil + notmatchpost[current] = true + notmatchreplace[current] = nil + local pre, post, replace = getdisc(current) + if pre then + local n = n + while pre do + if seq[n][getchar(pre)] then + n = n + 1 + if n > s then break + else + pre = getnext(pre) end + else + notmatchpre[current] = true + break end - if n >= 1 then - notmatchpost[prev] = true - end - else - notmatchpost[prev] = true end - if replace then - -- we seldom enter this branch (e.g. on brill efficient) - while replacetail do - if seq[n][getchar(replacetail)] then - n = n - 1 - if replacetail == replace or n < 1 then - break - else - replacetail = getprev(replacetail) - end + if n <= s then + notmatchpre[current] = true + end + else + notmatchpre[current] = true + end + if replace then + -- so far we never entered this branch + while replace do + if seq[n][getchar(replace)] then + n = n + 1 + if n > s then + break else - notmatchreplace[prev] = true - if notmatchpost[prev] then - goto next - else - break - end + replace = getnext(replace) + end + else + notmatchreplace[current] = true + if notmatchpre[current] then + goto next + else + break end end - else - -- notmatchreplace[prev] = true -- not according to Kai end + else + -- notmatchreplace[current] = true -- not according to Kai end - prev = getprev(prev) - -- elseif id == glue_code and seq[n][32] and isspace(prev,threshold,id) then - -- elseif seq[n][32] and spaces[prev] then - -- n = n - 1 - -- prev = getprev(prev) + current = getnext(current) elseif id == glue_code then local sn = seq[n] - if (sn[32] and spaces[prev]) or sn[0xFFFC] then - n = n - 1 - prev = getprev(prev) + if (sn[32] and spaces[current]) or sn[0xFFFC] then + n = n + 1 + current = getnext(current) else goto next end elseif seq[n][0xFFFC] then - n = n - 1 - prev = getprev(prev) - else - goto next - end - else - goto next - end - end - else - goto next - end - else - goto next - end - end - - -- after - - if s > l then - local current = last and getnext(last) - if not current and postreplace then - current = getnext(sweepnode) - end - if current then - local discfound -- = nil - local n = l + 1 - while n <= s do - if current then - local char, id = ischar(current,currentfont) - if char then - if skiphash and skiphash[char] then - skipped = true - if trace_skips then - show_skip(dataset,sequence,char,ck,classes[char]) - end - current = getnext(current) -- was absent - elseif seq[n][char] then - if n < s then -- new test - current = getnext(current) -- was absent - end - n = n + 1 - elseif discfound then - notmatchreplace[discfound] = true - if notmatchpre[discfound] then - goto next - else - break - end - else - goto next - end - elseif char == false then - if discfound then - notmatchreplace[discfound] = true - if notmatchpre[discfound] then - goto next - else - break - end - else - goto next - end - elseif id == disc_code then - -- elseif id == disc_code and (not discs or discs[current]) then - discseen = true - discfound = current - notmatchpre[current] = nil - notmatchpost[current] = true - notmatchreplace[current] = nil - local pre, post, replace = getdisc(current) - if pre then - local n = n - while pre do - if seq[n][getchar(pre)] then - n = n + 1 - if n > s then - break - else - pre = getnext(pre) - end - else - notmatchpre[current] = true - break - end - end - if n <= s then - notmatchpre[current] = true - end - else - notmatchpre[current] = true - end - if replace then - -- so far we never entered this branch - while replace do - if seq[n][getchar(replace)] then - n = n + 1 - if n > s then - break - else - replace = getnext(replace) - end - else - notmatchreplace[current] = true - if notmatchpre[current] then - goto next - else - break - end - end - end - else - -- notmatchreplace[current] = true -- not according to Kai - end - current = getnext(current) - elseif id == glue_code then - local sn = seq[n] - if (sn[32] and spaces[current]) or sn[0xFFFC] then n = n + 1 current = getnext(current) else goto next end - elseif seq[n][0xFFFC] then - n = n + 1 - current = getnext(current) else goto next end - else - goto next end + else + goto next end - else - goto next end end - if trace_contexts then chaintrac(head,start,dataset,sequence,rlmode,skipped and skiphash,ck,true,discseen,sweepnode) end if discseen or sweepnode then + -- When we process a disc we can collapse and therefore we backtrack one node (start) and + -- reprocess. This is needed because there might be more in the collapsed list. head, start, done = chaindisk(head,start,dataset,sequence,rlmode,skipped and skiphash,ck) else - head, start, done = chainrun(head,start,last,dataset,sequence,rlmode,skipped and skiphash,ck) + head, start, done = chainrun(head,start,last,dataset,sequence,rlmode,skipped and skiphash,ck,6) + end + if trace_contexts then + chaintrac(start,done) end if done then break -- else -- next context end - ::next:: - -- if trace_chains then - -- chaintrac(head,start,dataset,sequence,rlmode,skipped and skiphash,ck,false,discseen,sweepnode) - -- end + ::next:: end if discseen then notmatchpre = { } @@ -2886,21 +2955,46 @@ handlers.gsub_reversecontextchain = handle_contextchain handlers.gpos_contextchain = handle_contextchain handlers.gpos_context = handle_contextchain --- this needs testing +-- local function chained_contextchain(head,start,stop,dataset,sequence,currentlookup,rlmode,skiphash) +-- local steps = currentlookup.steps +-- local nofsteps = currentlookup.nofsteps +-- if nofsteps > 1 then +-- reportmoresteps(dataset,sequence) +-- end +-- -- probably wrong +-- local l = steps[1].coverage[getchar(start)] +-- if l then +-- return handle_contextchain(head,start,dataset,sequence,l,rlmode,skiphash) +-- else +-- return head, start, false +-- end +-- end + +-- new 2022-09-25 local function chained_contextchain(head,start,stop,dataset,sequence,currentlookup,rlmode,skiphash) local steps = currentlookup.steps local nofsteps = currentlookup.nofsteps - if nofsteps > 1 then - reportmoresteps(dataset,sequence) - end - -- probably wrong - local l = steps[1].coverage[getchar(start)] - if l then - return handle_contextchain(head,start,dataset,sequence,l,rlmode,skiphash) + local char = getchar(start) + if nofsteps == 1 then + local s = steps[1] + local l = s.coverage[char] + if l then + return handle_contextchain(head,start,dataset,sequence,l,rlmode,skiphash) + end else - return head, start, false + for i=1,nofsteps do + local s = steps[i] + local l = s.coverage[char] + if l then + local h, s, d = handle_contextchain(head,start,dataset,sequence,l,rlmode,skiphash) + if d then + return h, s, d + end + end + end end + return head, start, false end chainprocs.gsub_context = chained_contextchain @@ -3039,7 +3133,7 @@ do -- overcome local limit end -- Functions like kernrun, comprun etc evolved over time and in the end look rather --- complex. It's a bit of a compromis between extensive copying and creating subruns. +-- complex. It's a bit of a compromise between extensive copying and creating subruns. -- The logic has been improved a lot by Kai and Ivo who use complex fonts which -- really helped to identify border cases on the one hand and get insight in the diverse -- ways fonts implement features (not always that consistent and efficient). At the same @@ -3146,7 +3240,8 @@ local function kernrun(disc,k_run,font,attr,...) if done and trace_testruns then report_disc("done",disc) end - return nextstart, done + -- return nextstart, done + return nextstart end -- fonts like ebgaramond do ligatures this way (less efficient than e.g. dejavu which @@ -3199,12 +3294,19 @@ local function comprun(disc,c_run,...) -- vararg faster than the whole list setdisc(disc,pre,post,replace) end -- - return getnext(disc), renewed + -- return getnext(disc), renewed + return getnext(disc) end -- if we can hyphenate in a lig then unlikely a lig so we -- could have a option here to ignore lig +local test_flatten_start = 2 -- must start at 2 according to Kai + +directives.register("otf.testrun.forceflatten", function(v) + test_flatten_start = v and 1 or 2 +end) + local function testrun(disc,t_run,c_run,...) if trace_testruns then report_disc("test",disc) @@ -3233,7 +3335,7 @@ local function testrun(disc,t_run,c_run,...) local d = d_replace > d_post and d_replace or d_post local head = getnext(disc) -- is: next local tail = head - for i=2,d do -- must start at 2 according to Kai + for i=test_flatten_start,d do local nx = getnext(tail) local id = getid(nx) if id == disc_code then @@ -3248,7 +3350,7 @@ local function testrun(disc,t_run,c_run,...) next = getnext(tail) setnext(tail) setprev(head) - local new = copy_node_list(head) + local new = copynodelist(head) if posttail then setlink(posttail,head) else @@ -3321,7 +3423,8 @@ local function testrun(disc,t_run,c_run,...) end end -- next can have changed (copied list) - return getnext(disc), renewed + -- return getnext(disc), renewed + return getnext(disc) end -- 1{2{\oldstyle\discretionary{3}{4}{5}}6}7\par @@ -3414,7 +3517,7 @@ local function t_run_single(start,stop,font,attr,lookupcache) while s do local char = ischar(s,font) if char then - local lg = lookupmatch[char] + local lg = not tonumber(lookupmatch) and lookupmatch[char] if lg then if sstop then d = 1 @@ -3444,7 +3547,7 @@ local function t_run_single(start,stop,font,attr,lookupcache) break end end - if l and l.ligature then -- so we test for ligature + if l and (tonumber(l) or l.ligature) then -- so we test for ligature lastd = d end -- why not: if not l then break elseif l.ligature then return d end @@ -3585,7 +3688,7 @@ local function t_run_multiple(start,stop,font,attr,steps,nofsteps) while s do local char = ischar(s) if char then - local lg = lookupmatch[char] + local lg = not tonumber(lookupmatch) and lookupmatch[char] if lg then if sstop then d = 1 @@ -3615,7 +3718,7 @@ local function t_run_multiple(start,stop,font,attr,steps,nofsteps) break end end - if l and l.ligature then + if l and (tonumber(l) or l.ligature) then lastd = d end end @@ -3795,7 +3898,7 @@ do local initialrl = 0 - if getid(head) == par_code and start_of_par(head) then + if getid(head) == par_code and startofpar(head) then initialrl = pardirstate(head) elseif direction == righttoleft_code then initialrl = -1 @@ -3844,7 +3947,7 @@ do -- the before and after lists in the loader. But first I need to see a font that uses multiple -- matches. -- - local start = find_node_tail(head) + local start = findnodetail(head) local rlmode = 0 -- how important is this .. do we need to check for dir? local merged = steps.merged while start do @@ -3930,26 +4033,22 @@ do start = getnext(start) elseif id == disc_code then if not discs or discs[start] == true then - local ok if gpossing then - start, ok = kernrun(start,k_run_single, font,attr,lookupcache,step,dataset,sequence,rlmode,skiphash,handler) + start = kernrun(start,k_run_single, font,attr,lookupcache,step,dataset,sequence,rlmode,skiphash,handler) elseif forcetestrun then - start, ok = testrun(start,t_run_single,c_run_single,font,attr,lookupcache,step,dataset,sequence,rlmode,skiphash,handler) + start = testrun(start,t_run_single,c_run_single,font,attr,lookupcache,step,dataset,sequence,rlmode,skiphash,handler) else - start, ok = comprun(start,c_run_single, font,attr,lookupcache,step,dataset,sequence,rlmode,skiphash,handler) + start = comprun(start,c_run_single, font,attr,lookupcache,step,dataset,sequence,rlmode,skiphash,handler) end - -- if ok then - -- done = true - -- end else start = getnext(start) end elseif id == math_code then - start = getnext(end_of_math(start)) + start = getnext(endofmath(start)) elseif id == dir_code then topstack, rlmode = txtdirstate(start,dirstack,topstack,rlparmode) start = getnext(start) - -- elseif id == par_code and start_of_par(start) then + -- elseif id == par_code and startofpar(start) then -- rlparmode, rlmode = pardirstate(start) -- start = getnext(start) else @@ -4014,26 +4113,22 @@ do start = getnext(start) elseif id == disc_code then if not discs or discs[start] == true then - local ok if gpossing then - start, ok = kernrun(start,k_run_multiple, font,attr,steps,nofsteps,dataset,sequence,rlmode,skiphash,handler) + start = kernrun(start,k_run_multiple, font,attr,steps,nofsteps,dataset,sequence,rlmode,skiphash,handler) elseif forcetestrun then - start, ok = testrun(start,t_run_multiple,c_run_multiple,font,attr,steps,nofsteps,dataset,sequence,rlmode,skiphash,handler) + start = testrun(start,t_run_multiple,c_run_multiple,font,attr,steps,nofsteps,dataset,sequence,rlmode,skiphash,handler) else - start, ok = comprun(start,c_run_multiple, font,attr,steps,nofsteps,dataset,sequence,rlmode,skiphash,handler) + start = comprun(start,c_run_multiple, font,attr,steps,nofsteps,dataset,sequence,rlmode,skiphash,handler) end - -- if ok then - -- done = true - -- end else start = getnext(start) end elseif id == math_code then - start = getnext(end_of_math(start)) + start = getnext(endofmath(start)) elseif id == dir_code then topstack, rlmode = txtdirstate(start,dirstack,topstack,rlparmode) start = getnext(start) - -- elseif id == par_code and start_of_par(start) then + -- elseif id == par_code and startofpar(start) then -- rlparmode, rlmode = pardirstate(start) -- start = getnext(start) else @@ -4140,13 +4235,13 @@ do -- a different font|state or glue (happens often) start = getnext(start) elseif id == math_code then - start = getnext(end_of_math(start)) + start = getnext(endofmath(start)) elseif id == dir_code then topstack, rlmode = txtdirstate(start,dirstack,topstack,rlparmode) start = getnext(start) - -- elseif id == par_code and start_of_par(start) then + -- elseif id == par_code and startofpar(start) then -- rlparmode, rlmode = pardirstate(start) - -- start = getnext(start) + -- start = nxt else start = getnext(start) end @@ -4161,49 +4256,60 @@ end -- so far -local plugins = { } -otf.plugins = plugins +do -local report = logs.reporter("fonts") + local plugins = { } + otf.plugins = plugins -function otf.registerplugin(name,f) - if type(name) == "string" and type(f) == "function" then - plugins[name] = { name, f } - report() - report("plugin %a has been loaded, please be aware of possible side effects",name) - report() - if logs.pushtarget then - logs.pushtarget("log") - end - report("Plugins are not officially supported unless stated otherwise. This is because") - report("they bypass the regular font handling and therefore some features in ConTeXt") - report("(especially those related to fonts) might not work as expected or might not work") - report("at all. Some plugins are for testing and development only and might change") - report("whenever we feel the need for it.") - report() - if logs.poptarget then - logs.poptarget() + local report = logs.reporter("fonts") + local warned = false + local okay = { text = true } + + function otf.registerplugin(name,f) + if type(name) == "string" and type(f) == "function" then + plugins[name] = { name, f } + if okay[name] then + -- no warning (e.g. the diagnostic text plugin) + else + report("plugin %a has been loaded, please be aware of possible side effects",name) + if not warned then + if logs.pushtarget then + logs.pushtarget("log") + end + report("Plugins are not officially supported unless stated otherwise. This is because") + report("they bypass the regular font handling and therefore some features in ConTeXt") + report("(especially those related to fonts) might not work as expected or might not work") + report("at all. Some plugins are for testing and development only and might change") + report("whenever we feel the need for it.") + report() + if logs.poptarget then + logs.poptarget() + end + warned = true + end + end end end -end -function otf.plugininitializer(tfmdata,value) - if type(value) == "string" then - tfmdata.shared.plugin = plugins[value] + function otf.plugininitializer(tfmdata,value) + if type(value) == "string" then + tfmdata.shared.plugin = plugins[value] + end end -end -function otf.pluginprocessor(head,font,attr,direction) -- n - local s = fontdata[font].shared - local p = s and s.plugin - if p then - if trace_plugins then - report_process("applying plugin %a",p[1]) + function otf.pluginprocessor(head,font,dynamic,direction) -- n + local s = fontdata[font].shared + local p = s and s.plugin + if p then + if trace_plugins then + report_process("applying plugin %a",p[1]) + end + return p[2](head,font,dynamic,direction) + else + return head, false end - return p[2](head,font,attr,direction) - else - return head, false end + end function otf.featuresinitializer(tfmdata,value) @@ -4225,8 +4331,8 @@ registerotffeature { } } --- Moved here (up) a bit. This doesn't really belong in generic so it will --- move to a context module some day. +-- Moved here (up) a bit. This doesn't really belong in generic so it will move to a +-- context module some day. local function markinitializer(tfmdata,value) local properties = tfmdata.properties diff --git a/Master/texmf-dist/tex/context/base/mkiv/font-ott.lua b/Master/texmf-dist/tex/context/base/mkiv/font-ott.lua index f4d7e05a137..74fd583758a 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/font-ott.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/font-ott.lua @@ -52,16 +52,20 @@ local scripts = allocate { ["cari"] = "carian", ["cham"] = "cham", ["cher"] = "cherokee", + ["chrs"] = "chorasmian", ["copt"] = "coptic", + ["cpmn"] = "cypro-minoan", ["cprt"] = "cypriot syllabary", ["cyrl"] = "cyrillic", ["dev2"] = "devanagari variant 2", ["deva"] = "devanagari", + ["diak"] = "dives akuru", ["dogr"] = "dogra", ["dsrt"] = "deseret", ["dupl"] = "duployan", ["egyp"] = "egyptian heiroglyphs", ["elba"] = "elbasan", + ["elym"] = "elymaic", ["ethi"] = "ethiopic", ["geor"] = "georgian", ["gjr2"] = "gujarati variant 2", @@ -81,6 +85,7 @@ local scripts = allocate { ["hebr"] = "hebrew", ["hluw"] = "anatolian hieroglyphs", ["hmng"] = "pahawh hmong", + ["hmnp"] = "nyiakeng puachue hmong", ["hung"] = "old hungarian", ["ital"] = "old italic", ["jamo"] = "hangul jamo", @@ -90,6 +95,7 @@ local scripts = allocate { ["khar"] = "kharosthi", ["khmr"] = "khmer", ["khoj"] = "khojki", + ["kits"] = "khitan small script", ["knd2"] = "kannada variant 2", ["knda"] = "kannada", ["kthi"] = "kaithi", @@ -123,6 +129,7 @@ local scripts = allocate { ["musc"] = "musical symbols", ["mym2"] = "myanmar variant 2", ["mymr"] = "myanmar", + ["nand"] = "nandinagari", ["narb"] = "old north arabian", ["nbat"] = "nabataean", ["newa"] = "newa", @@ -132,9 +139,10 @@ local scripts = allocate { ["olck"] = "ol chiki", ["orkh"] = "old turkic and orkhon runic", ["ory2"] = "odia variant 2", - ["orya"] = "oriya", + ["orya"] = "odia", ["osge"] = "osage", ["osma"] = "osmanya", + ["ougr"] = "old uyghur", ["palm"] = "palmyrene", ["pauc"] = "pau cin hau", ["perm"] = "old permic", @@ -166,7 +174,7 @@ local scripts = allocate { ["tagb"] = "tagbanwa", ["takr"] = "takri", ["tale"] = "tai le", - ["talu"] = "tai lu", + ["talu"] = "new tai lue", ["taml"] = "tamil", ["tang"] = "tangut", ["tavt"] = "tai viet", @@ -178,12 +186,16 @@ local scripts = allocate { ["thai"] = "thai", ["tibt"] = "tibetan", ["tirh"] = "tirhuta", + ["tnsa"] = "tangsa", ["tml2"] = "tamil variant 2", + ["toto"] = "toto", ["ugar"] = "ugaritic cuneiform", ["vai" ] = "vai", ["wara"] = "warang citi", + ["wcho"] = "wancho", ["xpeo"] = "old persian cuneiform", ["xsux"] = "sumero-akkadian cuneiform", + ["yezi"] = "yezidi", ["yi" ] = "yi", ["zanb"] = "zanabazar square", } @@ -199,6 +211,7 @@ local languages = allocate { ["agw" ] = "agaw", ["aio" ] = "aiton", ["aka" ] = "akan", + ["akb" ] = "batak angkola", ["als" ] = "alsatian", ["alt" ] = "altai", ["amh" ] = "amharic", @@ -211,6 +224,7 @@ local languages = allocate { ["asm" ] = "assamese", ["ast" ] = "asturian", ["ath" ] = "athapaskan", + ["avn" ] = "avatime", ["avr" ] = "avar", ["awa" ] = "awadhi", ["aym" ] = "aymara", @@ -256,8 +270,12 @@ local languages = allocate { ["brx" ] = "bodo", ["bsh" ] = "bashkir", ["bsk" ] = "burushaski", + ["bta" ] = "batak alas kluet", + ["btd" ] = "batak dairi (pakpak)", ["bti" ] = "beti", + ["btm" ] = "batak mandailing", ["bts" ] = "batak simalungun", + ["btx" ] = "batak karo", ["bug" ] = "bugis", ["byv" ] = "medumba", ["cak" ] = "kaqchikel", @@ -292,14 +310,16 @@ local languages = allocate { ["csl" ] = "church slavonic", ["csy" ] = "czech", ["ctg" ] = "chittagonian", + ["ctt" ] = "wayanad chetti", ["cuk" ] = "san blas kuna", + ["dag" ] = "dagbani", ["dan" ] = "danish", ["dar" ] = "dargwa", ["dax" ] = "dayi", ["dcr" ] = "woods cree", ["deu" ] = "german", - ["dgo" ] = "dogri", - ["dgr" ] = "dogri", + ["dgo" ] = "dogri (individual language)", + ["dgr" ] = "dogri (macro language)", ["dhg" ] = "dhangu", ["dhv" ] = "divehi (dhivehi, maldivian)", ["diq" ] = "dimli", @@ -371,13 +391,16 @@ local languages = allocate { ["guj" ] = "gujarati", ["guz" ] = "gusii", ["hai" ] = "haitian (haitian creole)", + ["hai0"] = "haida", ["hal" ] = "halam", ["har" ] = "harauti", ["hau" ] = "hausa", ["haw" ] = "hawaiian", ["hay" ] = "haya", ["haz" ] = "hazaragi", + ["hmz" ] = "hmong shuat", ["hbn" ] = "hammer-banna", + ["hei" ] = "heiltsuk", ["her" ] = "herero", ["hil" ] = "hiligaynon", ["hin" ] = "hindi", @@ -402,10 +425,12 @@ local languages = allocate { ["ind" ] = "indonesian", ["ing" ] = "ingush", ["inu" ] = "inuktitut", + ["inuk"] = "nunavik inuktitut", ["ipk" ] = "inupiat", ["ipph"] = "phonetic transcription—ipa conventions", ["iri" ] = "irish", ["irt" ] = "irish traditional", + ["uri" ] = "irula", ["isl" ] = "icelandic", ["ism" ] = "inari sami", ["ita" ] = "italian", @@ -425,6 +450,7 @@ local languages = allocate { ["kan" ] = "kannada", ["kar" ] = "karachay", ["kat" ] = "georgian", + ["kaw" ] = "kawi (old javanese)", ["kaz" ] = "kazakh", ["kde" ] = "makonde", ["kea" ] = "kabuverdianu (crioulo)", @@ -482,6 +508,7 @@ local languages = allocate { ["kur" ] = "kurdish", ["kuu" ] = "kurukh", ["kuy" ] = "kuy", + ["kwk" ] = "kwakʼwala", ["kyk" ] = "koryak", ["kyu" ] = "western kayah", ["lad" ] = "ladin", @@ -493,6 +520,7 @@ local languages = allocate { ["laz" ] = "laz", ["lcr" ] = "l-cree", ["ldk" ] = "ladakhi", + ["lef" ] = "lelemi", ["lez" ] = "lezgi", ["lij" ] = "ligurian", ["lim" ] = "limburgish", @@ -505,6 +533,7 @@ local languages = allocate { ["lmo" ] = "lombard", ["lmw" ] = "lomwe", ["lom" ] = "loma", + ["lpo" ] = "lipo", ["lrc" ] = "luri", ["lsb" ] = "lower sorbian", ["lsm" ] = "lule sami", @@ -521,7 +550,7 @@ local languages = allocate { ["mah" ] = "marshallese", ["maj" ] = "majang", ["mak" ] = "makhuwa", - ["mal" ] = "malayalam reformed", + ["mal" ] = "malayalam", ["mam" ] = "mam", ["man" ] = "mansi", ["map" ] = "mapudungun", @@ -556,6 +585,7 @@ local languages = allocate { ["mok" ] = "moksha", ["mol" ] = "moldavian", ["mon" ] = "mon", + ["mnw" ] = "thailand mon", ["mor" ] = "moroccan", ["mos" ] = "mossi", ["mri" ] = "maori", @@ -594,7 +624,7 @@ local languages = allocate { ["nor" ] = "norwegian", ["nov" ] = "novial", ["nsm" ] = "northern sami", - ["nso" ] = "sotho, northern", + ["nso" ] = "northern sotho", ["nta" ] = "northern tai", ["nto" ] = "esperanto", ["nym" ] = "nyamwezi", @@ -642,6 +672,7 @@ local languages = allocate { ["rbu" ] = "russian buriat", ["rcr" ] = "r-cree", ["rej" ] = "rejang", + ["rhg" ] = "rohingya", ["ria" ] = "riang", ["rif" ] = "tarifit", ["rit" ] = "ritarungo", @@ -666,6 +697,7 @@ local languages = allocate { ["scs" ] = "north slavey", ["sek" ] = "sekota", ["sel" ] = "selkup", + ["sfm" ] = "small flowery miao", ["sga" ] = "old irish", ["sgo" ] = "sango", ["sgs" ] = "samogitian", @@ -687,7 +719,7 @@ local languages = allocate { ["snk" ] = "soninke", ["sog" ] = "sodo gurage", ["sop" ] = "songe", - ["sot" ] = "sotho, southern", + ["sot" ] = "southern sotho", ["sqi" ] = "albanian", ["srb" ] = "serbian", ["srd" ] = "sardinian", @@ -728,7 +760,9 @@ local languages = allocate { ["tht" ] = "tahitian", ["tib" ] = "tibetan", ["tiv" ] = "tiv", + ["tj;" ] = "tai laing", ["tkm" ] = "turkmen", + ["tli" ] = "tlingit", ["tmh" ] = "tamashek", ["tmn" ] = "temne", ["tna" ] = "tswana", @@ -742,7 +776,7 @@ local languages = allocate { ["tsj" ] = "tshangla", ["tua" ] = "turoyo aramaic", ["tul" ] = "tulu", - ["tum" ] = "tulu", + ["tum" ] = "tumbuka", ["tuv" ] = "tuvin", ["tvl" ] = "tuvalu", ["twi" ] = "twi", @@ -764,6 +798,7 @@ local languages = allocate { ["wa" ] = "wa", ["wag" ] = "wagdi", ["war" ] = "waray-waray", + ["wci" ] = "waci gbe", ["wcr" ] = "west-cree", ["wel" ] = "welsh", ["wlf" ] = "wolof", @@ -775,17 +810,23 @@ local languages = allocate { ["xkf" ] = "khengkha", ["xog" ] = "soga", ["xpe" ] = "kpelle (liberia)", + ["xub" ] = "bette kuruma", + ["xuj" ] = "jennu kuruma", ["yak" ] = "sakha", ["yao" ] = "yao", ["yap" ] = "yapese", ["yba" ] = "yoruba", ["ycr" ] = "y-cree", + ["ygp" ] = "gepo", ["yic" ] = "yi classic", ["yim" ] = "yi modern", + ["yna" ] = "aluo", + ["ywq" ] = "wuding-luquan", ["zea" ] = "zealandic", ["zgh" ] = "standard morrocan tamazigh", ["zha" ] = "zhuang", ["zhh" ] = "chinese, hong kong sar", + ["zho" ] = "chinese traditional, macao", ["zhp" ] = "chinese phonetic", ["zhs" ] = "chinese simplified", ["zht" ] = "chinese traditional", @@ -794,7 +835,6 @@ local languages = allocate { ["zza" ] = "zazaki", } - local features = allocate { ["aalt"] = "access all alternates", ["abvf"] = "above-base forms", @@ -811,6 +851,7 @@ local features = allocate { ["case"] = "case-sensitive forms", ["ccmp"] = "glyph composition/decomposition", ["cfar"] = "conjunct form after ro", + ["chws"] = "contextual half-width spacing", ["cjct"] = "conjunct forms", ["clig"] = "contextual ligatures", ["cpct"] = "centered cjk punctuation", @@ -821,13 +862,13 @@ local features = allocate { ["dist"] = "distances", ["dlig"] = "discretionary ligatures", ["dnom"] = "denominators", - ["dtls"] = "dotless forms", -- math + ["dtls"] = "dotless forms", -- math ["expt"] = "expert forms", ["falt"] = "final glyph alternates", ["fin2"] = "terminal forms #2", ["fin3"] = "terminal forms #3", ["fina"] = "terminal forms", - ["flac"] = "flattened accents over capitals", -- math + ["flac"] = "flattened accents over capitals", -- math ["frac"] = "fractions", ["fwid"] = "full width", ["half"] = "half forms", @@ -836,7 +877,7 @@ local features = allocate { ["hist"] = "historical forms", ["hkna"] = "horizontal kana alternates", ["hlig"] = "historical ligatures", - ["hngl"] = "hangul", + ["hngl"] = "hangul", -- depricated ["hojo"] = "hojo kanji forms", ["hwid"] = "half width", ["init"] = "initial forms", @@ -866,7 +907,7 @@ local features = allocate { ["nukt"] = "nukta forms", ["numr"] = "numerators", ["onum"] = "old style figures", - ["opbd"] = "optical bounds", + ["opbd"] = "optical bounds", -- funny, this is obsolete (too hard?) (and was recomended always true) ["ordn"] = "ordinals", ["ornm"] = "ornaments", ["palt"] = "proportional alternate width", @@ -887,8 +928,8 @@ local features = allocate { ["rtbd"] = "right bounds", ["rtla"] = "right-to-left alternates", ["rtlm"] = "right to left mirrored forms", - ["rvrn"] = "required variation alternates", ["ruby"] = "ruby notation forms", + ["rvrn"] = "required variation alternates", ["salt"] = "stylistic alternates", ["sinf"] = "scientific inferiors", ["size"] = "optical size", -- now stat table @@ -928,6 +969,7 @@ local features = allocate { ["unic"] = "unicase", ["valt"] = "alternate vertical metrics", ["vatu"] = "vattu variants", + ["vchw"] = "vertical contextual half-width spacing", ["vert"] = "vertical writing", ["vhal"] = "alternate vertical half metrics", ["vjmo"] = "vowel jamo forms", diff --git a/Master/texmf-dist/tex/context/base/mkiv/font-oup.lua b/Master/texmf-dist/tex/context/base/mkiv/font-oup.lua index 2c49bc993f9..198e62bee40 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/font-oup.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/font-oup.lua @@ -10,6 +10,7 @@ local next, type = next, type local P, R, S = lpeg.P, lpeg.R, lpeg.S local lpegmatch = lpeg.match local insert, remove, copy, unpack = table.insert, table.remove, table.copy, table.unpack +local find = string.find local formatters = string.formatters local sortedkeys = table.sortedkeys @@ -37,13 +38,16 @@ local f_index = formatters["I%05X"] local f_character_y = formatters["%C"] local f_character_n = formatters["[ %C ]"] -local check_duplicates = true -- can become an option (pseudo feature) / aways needed anyway -local check_soft_hyphen = true -- can become an option (pseudo feature) / needed for tagging +local check_duplicates = true -- can become an option (pseudo feature) / always needed anyway +local check_soft_hyphen = context -- only in context directives.register("otf.checksofthyphen",function(v) - check_soft_hyphen = v + check_soft_hyphen = v -- only for testing end) +-- After (!) the unicodes have been resolved we compact ligature tables so before that happens +-- we don't need to check for numbers. + local function replaced(list,index,replacement) if type(list) == "number" then return replacement @@ -453,31 +457,48 @@ local function copyduplicates(fontdata) local resources = fontdata.resources local duplicates = resources.duplicates if check_soft_hyphen then - -- ebgaramond has a zero width empty soft hyphen - -- antykwatorunsks lacks a soft hyphen - local ds = descriptions[0xAD] - if not ds or ds.width == 0 then - if ds then + -- ebgaramond has a zero width empty soft hyphen + -- antykwatorunska lacks a soft hyphen + -- lucidaot has a halfwidth soft hyphen + + -- local dh = descriptions[0x2D] + -- if dh then + -- descriptions[0xAD] = nil + -- local d = duplicates[0x2D] + -- if d then + -- d[#d+1] = { [0xAD] = true } + -- else + -- duplicates[0x2D] = { [0xAD] = true } + -- end + -- end + + local dh = descriptions[0x2D] + if dh then + local ds = descriptions[0xAD] + if not ds or ds.width ~= dh.width then descriptions[0xAD] = nil - if trace_unicodes then - report_unicodes("patching soft hyphen") + if ds then + if trace_unicodes then + report_unicodes("patching soft hyphen") + end + else + if trace_unicodes then + report_unicodes("adding soft hyphen") + end end - else - if trace_unicodes then - report_unicodes("adding soft hyphen") + if not duplicates then + duplicates = { } + resources.duplicates = duplicates + end + local d = duplicates[0x2D] + if d then + d[0xAD] = true + else + duplicates[0x2D] = { [0xAD] = true } end - end - if not duplicates then - duplicates = { } - resources.duplicates = duplicates - end - local dh = duplicates[0x2D] - if dh then - dh[#dh+1] = { [0xAD] = true } - else - duplicates[0x2D] = { [0xAD] = true } end end + end if duplicates then for u, d in next, duplicates do @@ -759,6 +780,7 @@ local function unifyglyphs(fontdata,usenames) local resources = fontdata.resources local zero = glyphs[0] local zerocode = zero.unicode + local nofglyphs = #glyphs if not zerocode then zerocode = private zero.unicode = zerocode @@ -775,7 +797,7 @@ local function unifyglyphs(fontdata,usenames) -- if names then -- seldom uses, we don't issue message ... this branch might even go away - for index=1,#glyphs do + for index=1,nofglyphs do local glyph = glyphs[index] local unicode = glyph.unicode -- this is the primary one if not unicode then @@ -808,7 +830,7 @@ local function unifyglyphs(fontdata,usenames) descriptions[unicode] = glyph end elseif trace_unicodes then - for index=1,#glyphs do + for index=1,nofglyphs do local glyph = glyphs[index] local unicode = glyph.unicode -- this is the primary one if not unicode then @@ -849,7 +871,7 @@ local function unifyglyphs(fontdata,usenames) descriptions[unicode] = glyph end else - for index=1,#glyphs do + for index=1,nofglyphs do local glyph = glyphs[index] local unicode = glyph.unicode -- this is the primary one if not unicode then @@ -876,33 +898,49 @@ local function unifyglyphs(fontdata,usenames) end end -- - for index=1,#glyphs do - local math = glyphs[index].math - if math then - local list = math.vparts - if list then - for i=1,#list do local l = list[i] l.glyph = indices[l.glyph] end - end - local list = math.hparts - if list then - for i=1,#list do local l = list[i] l.glyph = indices[l.glyph] end - end - local list = math.vvariants - if list then - -- for i=1,#list do local l = list[i] l.glyph = indices[l.glyph] end - for i=1,#list do list[i] = indices[list[i]] end + if LUATEXENGINE == "luametatex" then + for index=1,nofglyphs do + local math = glyphs[index].math + if math then + local list = math.parts + if list then + for i=1,#list do local l = list[i] l.glyph = indices[l.glyph] end + end + local list = math.variants + if list then + for i=1,#list do list[i] = indices[list[i]] end + end end - local list = math.hvariants - if list then - -- for i=1,#list do local l = list[i] l.glyph = indices[l.glyph] end - for i=1,#list do list[i] = indices[list[i]] end + end + else + for index=1,nofglyphs do + local math = glyphs[index].math + if math then + local list = math.vparts + if list then + for i=1,#list do local l = list[i] l.glyph = indices[l.glyph] end + end + local list = math.hparts + if list then + for i=1,#list do local l = list[i] l.glyph = indices[l.glyph] end + end + local list = math.vvariants + if list then + -- for i=1,#list do local l = list[i] l.glyph = indices[l.glyph] end + for i=1,#list do list[i] = indices[list[i]] end + end + local list = math.hvariants + if list then + -- for i=1,#list do local l = list[i] l.glyph = indices[l.glyph] end + for i=1,#list do list[i] = indices[list[i]] end + end end end end -- local colorpalettes = resources.colorpalettes if colorpalettes then - for index=1,#glyphs do + for index=1,nofglyphs do local colors = glyphs[index].colors if colors then for i=1,#colors do @@ -918,19 +956,22 @@ local function unifyglyphs(fontdata,usenames) fontdata.names = names fontdata.descriptions = descriptions fontdata.hashmethod = hashmethod + fontdata.nofglyphs = nofglyphs -- return indices, names end -local p_crappyname do +local stripredundant do local p_hex = R("af","AF","09") local p_digit = R("09") local p_done = S("._-")^0 + P(-1) + -- local p_style = P(".ss") * p_digit * p_digit * P(-1) + local p_style = P(".") local p_alpha = R("az","AZ") local p_ALPHA = R("AZ") - p_crappyname = ( + local p_crappyname = ( -- (P("uni") + P("UNI") + P("Uni") + P("U") + P("u")) lpeg.utfchartabletopattern({ "uni", "u" },true) * S("Xx_")^0 @@ -958,56 +999,182 @@ local p_crappyname do * P(1)^1 ) * p_done -end + -- In context we only keep glyph names because of tracing and access by name + -- so weird names make no sense. --- In context we only keep glyph names because of tracing and access by name --- so weird names make no sense. + if context then -local forcekeep = false -- only for testing something + local forcekeep = false -- only for testing something +-- local forcekeep = true -directives.register("otf.keepnames",function(v) - report_cleanup("keeping weird glyph names, expect larger files and more memory usage") - forcekeep = v -end) + directives.register("otf.keepnames",function(v) + report_cleanup("keeping weird glyph names, expect larger files and more memory usage") + forcekeep = v + end) -local function stripredundant(fontdata) - local descriptions = fontdata.descriptions - if descriptions then - local n = 0 - local c = 0 - -- in context we always strip - if (not context and fonts.privateoffsets.keepnames) or forcekeep then - for unicode, d in next, descriptions do - if d.class == "base" then - d.class = nil - c = c + 1 + -- local p_lesscrappyname = + -- lpeg.utfchartabletopattern({ "uni", "u" },true) + -- * S("Xx")^0 + -- * p_hex^1 + -- * p_style + + local function stripvariants(descriptions,list) + local n = list and #list or 0 + if n > 0 then + for i=1,n do + local g = list[i] + if g then + local d = descriptions[g] + if d and d.name then + d.name = nil + n = n + 1 + end + end end end - else - for unicode, d in next, descriptions do - local name = d.name - if name and lpegmatch(p_crappyname,name) then - d.name = nil - n = n + 1 + return n + end + + local function stripparts(descriptions,list) + local n = list and #list or 0 + if n > 0 then + for i=1,n do + local g = list[i].glyph + if g then + local d = descriptions[g] + if d and d.name then + d.name = nil + n = n + 1 + end + end end - if d.class == "base" then - d.class = nil - c = c + 1 + end + return n + end + + -- local function collectsimple(fontdata) + -- local resources = fontdata.resources + -- local sequences = resources and resources.sequences + -- if sequences then + -- local keeplist = { } + -- for i=1,#sequences do + -- local s = sequences[i] + -- if s.type == "gsub_single" then + -- -- only simple ones + -- local features = s.features + -- local steps = s.steps + -- if features and steps then + -- local okay = false + -- for k, v in next, features do + -- if find(k,"^ss%d%d") then + -- okay = true + -- break + -- end + -- end + -- if okay then + -- for i=1,#steps do + -- local coverage = steps[i].coverage + -- if coverage then + -- for k, v in next, coverage do + -- keeplist[k] = v + -- end + -- end + -- end + -- end + -- end + -- end + -- end + -- return next(keeplist) and keeplist or nil + -- end + -- end + + local function collectsimple(fontdata) + return nil + end + + stripredundant = function(fontdata) + local descriptions = fontdata.descriptions + if descriptions then + local n = 0 + local c = 0 + for unicode, d in next, descriptions do + local m = d.math + if m then + n = n + stripvariants(descriptions,m.vvariants) + n = n + stripvariants(descriptions,m.hvariants) + n = n + stripparts (descriptions,m.vparts) + n = n + stripparts (descriptions,m.hparts) + end + end + if forcekeep then + for unicode, d in next, descriptions do + if d.class == "base" then + d.class = nil + c = c + 1 + end + end + else + local keeplist = collectsimple(fontdata) + for unicode, d in next, descriptions do + local name = d.name + if name then + -- if lpegmatch(p_lesscrappyname,name) then + if keeplist and keeplist[name] then + -- keep name + elseif lpegmatch(p_crappyname,name) then + d.name = nil + n = n + 1 + end + end + if d.class == "base" then + d.class = nil + c = c + 1 + end + end + end + if trace_cleanup then + if n > 0 then + report_cleanup("%s bogus names removed (verbose unicode)",n) + end + if c > 0 then + report_cleanup("%s base class tags removed (default is base)",c) + end end end end - if trace_cleanup then - if n > 0 then - report_cleanup("%s bogus names removed (verbose unicode)",n) - end - if c > 0 then - report_cleanup("%s base class tags removed (default is base)",c) + + else + + stripredundant = function(fontdata) + local descriptions = fontdata.descriptions + if descriptions then + if fonts.privateoffsets.keepnames then + for unicode, d in next, descriptions do + if d.class == "base" then + d.class = nil + end + end + else + for unicode, d in next, descriptions do + local name = d.name + if name then + if lpegmatch(p_crappyname,name) then + d.name = nil + end + end + if d.class == "base" then + d.class = nil + end + end + end end end + end -end -readers.stripredundant = stripredundant + readers.stripredundant = stripredundant + +end function readers.getcomponents(fontdata) -- handy for resolving ligatures when names are missing local resources = fontdata.resources @@ -1024,6 +1191,10 @@ function readers.getcomponents(fontdata) -- handy for resolving ligatures when n local function traverse(p,k,v) if k == "ligature" then collected[v] = { unpack(l) } + elseif tonumber(v) then + insert(l,k) + collected[v] = { unpack(l) } + remove(l) else insert(l,k) for k, vv in next, v do @@ -1102,8 +1273,7 @@ readers.unifymissing = unifymissing function readers.rehash(fontdata,hashmethod) -- TODO: combine loops in one if not (fontdata and fontdata.glyphs) then return - end - if hashmethod == "indices" then + elseif hashmethod == "indices" then fontdata.hashmethod = "indices" elseif hashmethod == "names" then fontdata.hashmethod = "names" @@ -1111,7 +1281,6 @@ function readers.rehash(fontdata,hashmethod) -- TODO: combine loops in one unifyresources(fontdata,indices) copyduplicates(fontdata) unifymissing(fontdata) - -- stripredundant(fontdata) else fontdata.hashmethod = "unicodes" local indices = unifyglyphs(fontdata) @@ -1211,7 +1380,6 @@ local function tabstr_flat(t) end local function tabstr_mixed(t) -- indexed - local s = { } local n = #t if n == 0 then return "" @@ -1225,6 +1393,7 @@ local function tabstr_mixed(t) -- indexed return tostring(k) -- number or string end else + local s = { } for i=1,n do local k = t[i] if k == true then @@ -1334,6 +1503,21 @@ function readers.pack(data) end end + -- local function pack_indexed(v) -- less code + -- local tag = concat(v," ") + -- local ht = h[tag] + -- if ht then + -- c[ht] = c[ht] + 1 + -- else + -- ht = nt + 1 + -- t[ht] = v + -- c[ht] = 1 + -- h[tag] = ht + -- nt = ht + -- end + -- return ht + -- end + local function pack_mixed(v) local tag = tabstr_mixed(v) local ht = h[tag] @@ -2564,6 +2748,34 @@ end -- Because we pack we cannot mix tables and numbers so we can only turn a whole set in -- format kern instead of pair. +local strip_pairs = true + +local compact_pairs = true +local compact_singles = true + +local merge_pairs = true +local merge_singles = true +local merge_substitutions = true +local merge_alternates = true +local merge_multiples = true +local merge_ligatures = true +local merge_cursives = true +local merge_marks = true + +directives.register("otf.strip.pairs", function(v) strip_pairs = v end) + +directives.register("otf.compact.pairs", function(v) compact_pairs = v end) +directives.register("otf.compact.singles", function(v) compact_singles = v end) + +directives.register("otf.merge.pairs", function(v) merge_pairs = v end) +directives.register("otf.merge.singles", function(v) merge_singles = v end) +directives.register("otf.merge.substitutions", function(v) merge_substitutions = v end) +directives.register("otf.merge.alternates", function(v) merge_alternates = v end) +directives.register("otf.merge.multiples", function(v) merge_multiples = v end) +directives.register("otf.merge.ligatures", function(v) merge_ligatures = v end) +directives.register("otf.merge.cursives", function(v) merge_cursives = v end) +directives.register("otf.merge.marks", function(v) merge_marks = v end) + local function checkpairs(lookup) local steps = lookup.steps local nofsteps = lookup.nofsteps @@ -2581,6 +2793,7 @@ local function checkpairs(lookup) if v == true then -- all zero elseif v and (v[1] ~= 0 or v[2] ~= 0 or v[4] ~= 0) then + -- complex kerns return false end end @@ -2617,29 +2830,39 @@ local function checkpairs(lookup) return kerned end -local compact_pairs = true -local compact_singles = true - -local merge_pairs = true -local merge_singles = true -local merge_substitutions = true -local merge_alternates = true -local merge_multiples = true -local merge_ligatures = true -local merge_cursives = true -local merge_marks = true - -directives.register("otf.compact.pairs", function(v) compact_pairs = v end) -directives.register("otf.compact.singles", function(v) compact_singles = v end) +local function strippairs(lookup) + local steps = lookup.steps + local nofsteps = lookup.nofsteps + local stripped = 0 -directives.register("otf.merge.pairs", function(v) merge_pairs = v end) -directives.register("otf.merge.singles", function(v) merge_singles = v end) -directives.register("otf.merge.substitutions", function(v) merge_substitutions = v end) -directives.register("otf.merge.alternates", function(v) merge_alternates = v end) -directives.register("otf.merge.multiples", function(v) merge_multiples = v end) -directives.register("otf.merge.ligatures", function(v) merge_ligatures = v end) -directives.register("otf.merge.cursives", function(v) merge_cursives = v end) -directives.register("otf.merge.marks", function(v) merge_marks = v end) + for i=1,nofsteps do + local step = steps[i] + if step.format == "pair" then + local coverage = step.coverage + for g1, d1 in next, coverage do + for g2, d2 in next, d1 do + if d2[2] then + --- true or { a, b, c, d } + -- else + -- local v = d2[1] + -- if v == true then + -- d1[g2] = nil + -- stripped = stripped + 1 + -- elseif v and (v[1] == 0 and v[2] == 0 and v[4] == 0) then -- vkrn can have v[3] ~= 0 + -- d1[g2] = nil + -- stripped = stripped + 1 + -- end + -- end + elseif d2[1] == true then + d1[g2] = nil + stripped = stripped + 1 + end + end + end + end + end + return stripped +end function readers.compact(data) if not data or data.compacted then @@ -2648,6 +2871,7 @@ function readers.compact(data) data.compacted = true end local resources = data.resources + local stripped = 0 local merged = 0 local kerned = 0 local allsteps = 0 @@ -2678,6 +2902,7 @@ function readers.compact(data) merged = merged + mergesteps_4(lookup) end elseif kind == "gpos_single" then + -- maybe also strip zeros here if merge_singles then merged = merged + mergesteps_1(lookup,true) end @@ -2685,6 +2910,9 @@ function readers.compact(data) kerned = kerned + checkkerns(lookup) end elseif kind == "gpos_pair" then + if strip_pairs then + stripped = stripped + strippairs(lookup) -- noto cjk from 24M -> 8 M + end if merge_pairs then merged = merged + mergesteps_2(lookup) end @@ -2726,6 +2954,9 @@ function readers.compact(data) compact("sequences") compact("sublookups") if trace_optimizations then + if stripped > 0 then + report_optimizations("%i zero positions stripped before merging",stripped) + end if merged > 0 then report_optimizations("%i steps of %i removed due to merging",merged,allsteps) end @@ -2735,6 +2966,91 @@ function readers.compact(data) end end +if CONTEXTLMTXMODE and CONTEXTLMTXMODE > 0 then + + local done = 0 + + local function condense_1(k,v,t) + if type(v) == "table" then + local u = false + local l = false + for k, v in next, v do + if k == "ligature" then + l = v + if u then + break + end + elseif u then + break + else + u = true + end + end + if l and not u then + t[k] = l + done = done + 1 + end + if u then + for k, vv in next, v do + if k ~= "ligature" then + condense_1(k,vv,v) + end + end + end + end + end + + local function condensesteps_1(lookup) + done = 0 + if lookup.type == "gsub_ligature" then + local steps = lookup.steps + if steps then + for i=1,#steps do + local step = steps[i] + local coverage = step.coverage + if coverage then + for k, v in next, coverage do + if condense_1(k,v,coverage) then + coverage[k] = v.ligature + done = done + 1 + end + end + end + end + end + end + return done + end + + function readers.condense(data) + if not data or data.condensed then + return + else + data.condensed = true + end + local resources = data.resources + local condensed = 0 + local function condense(what) + local lookups = resources[what] + if lookups then + for i=1,#lookups do + condensed = condensed + condensesteps_1(lookups[i]) + end + elseif trace_optimizations then + report_optimizations("no lookups in %a",what) + end + end + condense("sequences") + condense("sublookups") + if trace_optimizations then + if condensed > 0 then + report_optimizations("%i ligatures condensed",condensed) + end + end + end + +end + local function mergesteps(t,k) if k == "merged" then local merged = { } @@ -2854,7 +3170,7 @@ function readers.expand(data) -- about 15% on arabtype .. then moving the a test also saves a bit (even when -- often a is not set at all so that one is a bit debatable - local function expandlookups(sequences) + local function expandlookups(sequences,whatever) if sequences then -- we also need to do sublookups for i=1,#sequences do @@ -2930,6 +3246,9 @@ function readers.expand(data) if lookups then for k, v in next, lookups do -- actually this one is indexed local lookup = sublookups[v] +if not lookup and whatever then + lookup = whatever[v] +end if lookup then lookups[k] = lookup if not subtype then @@ -3010,5 +3329,5 @@ function readers.expand(data) end expandlookups(sequences) - expandlookups(sublookups) + expandlookups(sublookups,sequences) end diff --git a/Master/texmf-dist/tex/context/base/mkiv/font-phb-imp-binary.lua b/Master/texmf-dist/tex/context/base/mkiv/font-phb-imp-binary.lua new file mode 100644 index 00000000000..39ac6ec049c --- /dev/null +++ b/Master/texmf-dist/tex/context/base/mkiv/font-phb-imp-binary.lua @@ -0,0 +1,119 @@ +if not modules then modules = { } end modules ['font-phb-imp-binary'] = { + version = 1.000, -- 2016.10.10, + comment = "companion to font-txt.mkiv", + author = "Hans Hagen", + copyright = "PRAGMA ADE / ConTeXt Development Team", + license = "see context related readme files", +} + +-- The hb library comes in versions and the one I tested in 2016 was part of the inkscape +-- suite. In principle one can have incompatibilities due to updates but that is the nature +-- of a library. When a library ie expected one has better use the system version, if only +-- to make sure that different programs behave the same. +-- +-- The main reason for testing this approach was that when Idris was working on his fonts, +-- we wanted to know how different shapers deal with it and the hb command line program +-- could provide uniscribe output. For the context shaper uniscribe is the reference, also +-- because Idris started out with Volt a decade ago. +-- +-- This file uses the indirect approach by calling the executable. This file uses context +-- features and is not generic. + +local next, tonumber, pcall = next, tonumber, pcall + +local concat = table.concat +local reverse = table.reverse +local formatters = string.formatters +local removefile = os.remove +local resultof = os.resultof +local savedata = io.savedata + +local report = utilities.hb.report or print +local packtoutf8 = utilities.hb.helpers.packtoutf8 + +if not context then + report("the binary runner is only supported in context") + return +end + +-- output : [index=cluster@x_offset,y_offset+x_advance,y_advance|...] +-- result : { index, cluster, x_offset, y_offset, x_advance, y_advance } + +local P, Ct, Cc = lpeg.P, lpeg.Ct, lpeg.Cc +local lpegmatch = lpeg.match + +local zero = Cc(0) +local number = lpeg.patterns.integer / tonumber + zero +local index = lpeg.patterns.cardinal / tonumber +local cluster = index +local offset = (P("@") * number * (P(",") * number + zero)) + zero * zero +local advance = (P("+") * number * (P(",") * number + zero)) + zero * zero +local glyph = Ct(index * P("=") * cluster * offset * advance) +local pattern = Ct(P("[") * (glyph * P("|")^-1)^0 * P("]")) + +local shapers = { + native = "ot,uniscribe,fallback", + uniscribe = "uniscribe,ot,fallback", + fallback = "fallback" +} + +local runner = sandbox.registerrunner { + method = "resultof", + name = "harfbuzz", + -- program = { + -- windows = "hb-shape.exe", + -- unix = "hb-shape" + -- }, + program = "hb-shape", + checkers = { + shaper = "string", + features = "string", + script = "string", + language = "string", + direction = "string", + textfile = "writable", + fontfile = "readable", + }, + template = string.longtostring [[ + --shaper=%shaper% + --output-format=text + --no-glyph-names + --features="%features%" + --script=%script% + --language=%language% + --direction=%direction% + --text-file=%textfile% + --font-file=%fontfile% + ]], +} + +local tempfile = "font-phb.tmp" +local reported = false + +function utilities.hb.methods.binary(font,data,rlmode,text,leading,trailing) + if runner then + savedata(tempfile,packtoutf8(text,leading,trailing)) + local result = runner { + shaper = shapers[data.shaper] or shapers.native, + features = data.features, + script = data.script or "dflt", + language = data.language or "dflt", + direction = rlmode < 0 and "rtl" or "ltr", + textfile = tempfile, + fontfile = data.filename, + } + removefile(tempfile) + if result then + -- return jsontolua(result) + result = lpegmatch(pattern,result) -- { index cluster xo yo xa ya } + if rlmode < 0 then + return reverse(result) -- we can avoid this + else + return result + end + end + elseif reported then + report("no runner available") + reported = true + end +end diff --git a/Master/texmf-dist/tex/context/base/mkiv/font-phb-imp-library.lua b/Master/texmf-dist/tex/context/base/mkiv/font-phb-imp-library.lua new file mode 100644 index 00000000000..fe991b023c7 --- /dev/null +++ b/Master/texmf-dist/tex/context/base/mkiv/font-phb-imp-library.lua @@ -0,0 +1,498 @@ +if not modules then modules = { } end modules ['font-phb-imp-library'] = { + version = 1.000, -- 2020.01.08, + comment = "companion to font-txt.mkiv", + original = "derived from a prototype by Kai Eigner", + author = "Hans Hagen", -- so don't blame KE + copyright = "TAT Zetwerk / PRAGMA ADE / ConTeXt Development Team", + license = "see context related readme files", +} + +-- The hb library comes in versions and the one I tested in 2016 was part of the inkscape +-- suite. In principle one can have incompatibilities due to updates but that is the nature +-- of a library. When a library ie expected one has better use the system version, if only +-- to make sure that different programs behave the same. +-- +-- The main reason for testing this approach was that when Idris was working on his fonts, +-- we wanted to know how different shapers deal with it and the hb command line program +-- could provide uniscribe output. For the context shaper uniscribe is the reference, also +-- because Idris started out with Volt a decade ago. +-- +-- We treat the lib as a black box as it should be. At some point Kai Eigner made an ffi +-- binding and that one was adapted to the plugin approach of context. It saved me the +-- trouble of looking at source files to figure it all out. Below is the adapted code. +-- +-- Keep in mind that this file is for mkiv only. It won't work in lmtx where instead of +-- ffi we use simple optional libraries with delayed bindings. In principle this mechanism +-- is generic but because other macropackages follow another route we don't spend time +-- on that code path here. + +local next, tonumber, pcall = next, tonumber, pcall +local reverse = table.reverse +local loaddata = io.loaddata + +local report = utilities.hb.report or print +local packtoutf32 = utilities.hb.helpers.packtoutf32 + +if not FFISUPPORTED or not ffi then + report("no ffi support") + return +elseif CONTEXTLMTXMODE and CONTEXTLMTXMODE > 0 then + report("no ffi support") + return +elseif not context then + return +end + +local harfbuzz = ffilib(os.name == "windows" and "libharfbuzz-0" or "libharfbuzz") + +if not harfbuzz then + report("no hb library found") + return +end + +-- jit.on() : on very long (hundreds of pages) it looks faster but +-- the normal font processor slows down ... this is consistent with +-- earlier observations that turning it on is often slower on these +-- one-shot tex runs (also because we don't use many math and/or +-- string helpers and therefore the faster vm of luajit gives most +-- benefits (given the patched hasher) + +-- Here is Kai's ffi mapping, a bit reorganized. We only define what we +-- need. I'm happy that Kai did the deciphering of the api that I could +-- then build upon. + +ffi.cdef [[ + +typedef struct hb_blob_t hb_blob_t ; + +typedef enum { + HB_MEMORY_MODE_DUPLICATE, + HB_MEMORY_MODE_READONLY, + HB_MEMORY_MODE_WRITABLE, + HB_MEMORY_MODE_READONLY_MAY_MAKE_WRITABLE +} hb_memory_mode_t ; + +typedef void (*hb_destroy_func_t) ( + void *user_data +) ; + +typedef struct hb_face_t hb_face_t ; + +typedef const struct hb_language_impl_t *hb_language_t ; + +typedef struct hb_buffer_t hb_buffer_t ; + +typedef enum { + HB_SCRIPT_COMMON, HB_SCRIPT_INHERITED, HB_SCRIPT_UNKNOWN, + + HB_SCRIPT_ARABIC, HB_SCRIPT_ARMENIAN, HB_SCRIPT_BENGALI, HB_SCRIPT_CYRILLIC, + HB_SCRIPT_DEVANAGARI, HB_SCRIPT_GEORGIAN, HB_SCRIPT_GREEK, + HB_SCRIPT_GUJARATI, HB_SCRIPT_GURMUKHI, HB_SCRIPT_HANGUL, HB_SCRIPT_HAN, + HB_SCRIPT_HEBREW, HB_SCRIPT_HIRAGANA, HB_SCRIPT_KANNADA, HB_SCRIPT_KATAKANA, + HB_SCRIPT_LAO, HB_SCRIPT_LATIN, HB_SCRIPT_MALAYALAM, HB_SCRIPT_ORIYA, + HB_SCRIPT_TAMIL, HB_SCRIPT_TELUGU, HB_SCRIPT_THAI, HB_SCRIPT_TIBETAN, + HB_SCRIPT_BOPOMOFO, HB_SCRIPT_BRAILLE, HB_SCRIPT_CANADIAN_SYLLABICS, + HB_SCRIPT_CHEROKEE, HB_SCRIPT_ETHIOPIC, HB_SCRIPT_KHMER, HB_SCRIPT_MONGOLIAN, + HB_SCRIPT_MYANMAR, HB_SCRIPT_OGHAM, HB_SCRIPT_RUNIC, HB_SCRIPT_SINHALA, + HB_SCRIPT_SYRIAC, HB_SCRIPT_THAANA, HB_SCRIPT_YI, HB_SCRIPT_DESERET, + HB_SCRIPT_GOTHIC, HB_SCRIPT_OLD_ITALIC, HB_SCRIPT_BUHID, HB_SCRIPT_HANUNOO, + HB_SCRIPT_TAGALOG, HB_SCRIPT_TAGBANWA, HB_SCRIPT_CYPRIOT, HB_SCRIPT_LIMBU, + HB_SCRIPT_LINEAR_B, HB_SCRIPT_OSMANYA, HB_SCRIPT_SHAVIAN, HB_SCRIPT_TAI_LE, + HB_SCRIPT_UGARITIC, HB_SCRIPT_BUGINESE, HB_SCRIPT_COPTIC, + HB_SCRIPT_GLAGOLITIC, HB_SCRIPT_KHAROSHTHI, HB_SCRIPT_NEW_TAI_LUE, + HB_SCRIPT_OLD_PERSIAN, HB_SCRIPT_SYLOTI_NAGRI, HB_SCRIPT_TIFINAGH, + HB_SCRIPT_BALINESE, HB_SCRIPT_CUNEIFORM, HB_SCRIPT_NKO, HB_SCRIPT_PHAGS_PA, + HB_SCRIPT_PHOENICIAN, HB_SCRIPT_CARIAN, HB_SCRIPT_CHAM, HB_SCRIPT_KAYAH_LI, + HB_SCRIPT_LEPCHA, HB_SCRIPT_LYCIAN, HB_SCRIPT_LYDIAN, HB_SCRIPT_OL_CHIKI, + HB_SCRIPT_REJANG, HB_SCRIPT_SAURASHTRA, HB_SCRIPT_SUNDANESE, HB_SCRIPT_VAI, + HB_SCRIPT_AVESTAN, HB_SCRIPT_BAMUM, HB_SCRIPT_EGYPTIAN_HIEROGLYPHS, + HB_SCRIPT_IMPERIAL_ARAMAIC, HB_SCRIPT_INSCRIPTIONAL_PAHLAVI, + HB_SCRIPT_INSCRIPTIONAL_PARTHIAN, HB_SCRIPT_JAVANESE, HB_SCRIPT_KAITHI, + HB_SCRIPT_LISU, HB_SCRIPT_MEETEI_MAYEK, HB_SCRIPT_OLD_SOUTH_ARABIAN, + HB_SCRIPT_OLD_TURKIC, HB_SCRIPT_SAMARITAN, HB_SCRIPT_TAI_THAM, + HB_SCRIPT_TAI_VIET, HB_SCRIPT_BATAK, HB_SCRIPT_BRAHMI, HB_SCRIPT_MANDAIC, + HB_SCRIPT_CHAKMA, HB_SCRIPT_MEROITIC_CURSIVE, HB_SCRIPT_MEROITIC_HIEROGLYPHS, + HB_SCRIPT_MIAO, HB_SCRIPT_SHARADA, HB_SCRIPT_SORA_SOMPENG, HB_SCRIPT_TAKRI, + HB_SCRIPT_BASSA_VAH, HB_SCRIPT_CAUCASIAN_ALBANIAN, HB_SCRIPT_DUPLOYAN, + HB_SCRIPT_ELBASAN, HB_SCRIPT_GRANTHA, HB_SCRIPT_KHOJKI, HB_SCRIPT_KHUDAWADI, + HB_SCRIPT_LINEAR_A, HB_SCRIPT_MAHAJANI, HB_SCRIPT_MANICHAEAN, + HB_SCRIPT_MENDE_KIKAKUI, HB_SCRIPT_MODI, HB_SCRIPT_MRO, HB_SCRIPT_NABATAEAN, + HB_SCRIPT_OLD_NORTH_ARABIAN, HB_SCRIPT_OLD_PERMIC, HB_SCRIPT_PAHAWH_HMONG, + HB_SCRIPT_PALMYRENE, HB_SCRIPT_PAU_CIN_HAU, HB_SCRIPT_PSALTER_PAHLAVI, + HB_SCRIPT_SIDDHAM, HB_SCRIPT_TIRHUTA, HB_SCRIPT_WARANG_CITI, HB_SCRIPT_AHOM, + HB_SCRIPT_ANATOLIAN_HIEROGLYPHS, HB_SCRIPT_HATRAN, HB_SCRIPT_MULTANI, + HB_SCRIPT_OLD_HUNGARIAN, HB_SCRIPT_SIGNWRITING, HB_SCRIPT_ADLAM, + HB_SCRIPT_BHAIKSUKI, HB_SCRIPT_MARCHEN, HB_SCRIPT_OSAGE, HB_SCRIPT_TANGUT, + HB_SCRIPT_NEWA, HB_SCRIPT_MASARAM_GONDI, HB_SCRIPT_NUSHU, HB_SCRIPT_SOYOMBO, + HB_SCRIPT_ZANABAZAR_SQUARE, HB_SCRIPT_DOGRA, HB_SCRIPT_GUNJALA_GONDI, + HB_SCRIPT_HANIFI_ROHINGYA, HB_SCRIPT_MAKASAR, HB_SCRIPT_MEDEFAIDRIN, + HB_SCRIPT_OLD_SOGDIAN, HB_SCRIPT_SOGDIAN, HB_SCRIPT_ELYMAIC, + HB_SCRIPT_NANDINAGARI, HB_SCRIPT_NYIAKENG_PUACHUE_HMONG, HB_SCRIPT_WANCHO, + + HB_SCRIPT_INVALID, _HB_SCRIPT_MAX_VALUE, _HB_SCRIPT_MAX_VALUE_SIGNED, +} hb_script_t ; + +typedef enum { + HB_DIRECTION_INVALID, + HB_DIRECTION_LTR, + HB_DIRECTION_RTL, + HB_DIRECTION_TTB, + HB_DIRECTION_BTT +} hb_direction_t ; + +typedef int hb_bool_t ; + +typedef uint32_t hb_tag_t ; + +typedef struct hb_feature_t { + hb_tag_t tag; + uint32_t value; + unsigned int start; + unsigned int end; +} hb_feature_t ; + +typedef struct hb_font_t hb_font_t ; + +typedef uint32_t hb_codepoint_t ; +typedef int32_t hb_position_t ; +typedef uint32_t hb_mask_t ; + +typedef union _hb_var_int_t { + uint32_t u32; + int32_t i32; + uint16_t u16[2]; + int16_t i16[2]; + uint8_t u8[4]; + int8_t i8[4]; +} hb_var_int_t ; + +typedef struct hb_glyph_info_t { + hb_codepoint_t codepoint ; + hb_mask_t mask ; + uint32_t cluster ; + /*< private >*/ + hb_var_int_t var1 ; + hb_var_int_t var2 ; +} hb_glyph_info_t ; + +typedef struct hb_glyph_position_t { + hb_position_t x_advance ; + hb_position_t y_advance ; + hb_position_t x_offset ; + hb_position_t y_offset ; + /*< private >*/ + hb_var_int_t var ; +} hb_glyph_position_t ; + +const char * hb_version_string ( + void +) ; + +hb_blob_t * hb_blob_create ( + const char *data, + unsigned int length, + hb_memory_mode_t mode, + void *user_data, + hb_destroy_func_t destroy +) ; + +void hb_blob_destroy ( + hb_blob_t *blob +) ; + +hb_face_t * hb_face_create ( + hb_blob_t *blob, + unsigned int index +) ; + +void hb_face_destroy ( + hb_face_t *face +) ; + +hb_language_t hb_language_from_string ( + const char *str, + int len +) ; + +void hb_buffer_set_language ( + hb_buffer_t *buffer, + hb_language_t language +) ; + +hb_script_t hb_script_from_string ( + const char *s, + int len +) ; + +void hb_buffer_set_script ( + hb_buffer_t *buffer, + hb_script_t script +) ; + +hb_direction_t hb_direction_from_string ( + const char *str, + int len +) ; + +void hb_buffer_set_direction ( + hb_buffer_t *buffer, + hb_direction_t direction +) ; + +hb_bool_t hb_feature_from_string ( + const char *str, + int len, + hb_feature_t *feature +) ; + +hb_bool_t hb_shape_full ( + hb_font_t *font, + hb_buffer_t *buffer, + const hb_feature_t *features, + unsigned int num_features, + const char * const *shaper_list +) ; + + +hb_buffer_t * hb_buffer_create ( + void +) ; + +void hb_buffer_destroy ( + hb_buffer_t *buffer +) ; + +void hb_buffer_add_utf8 ( + hb_buffer_t *buffer, + const char *text, + int text_length, + unsigned int item_offset, + int item_length +) ; + +void hb_buffer_add_utf32 ( + hb_buffer_t *buffer, + const char *text, + int text_length, + unsigned int item_offset, + int item_length +) ; + +void hb_buffer_add ( + hb_buffer_t *buffer, + hb_codepoint_t codepoint, + unsigned int cluster +) ; + +unsigned int hb_buffer_get_length ( + hb_buffer_t *buffer +) ; + +hb_glyph_info_t * hb_buffer_get_glyph_infos ( + hb_buffer_t *buffer, + unsigned int *length +) ; + +hb_glyph_position_t *hb_buffer_get_glyph_positions ( + hb_buffer_t *buffer, + unsigned int *length +) ; + +void hb_buffer_reverse ( + hb_buffer_t *buffer +) ; + +void hb_buffer_reset ( + hb_buffer_t *buffer +) ; + +void hb_buffer_guess_segment_properties ( + hb_buffer_t *buffer +) ; + +hb_font_t * hb_font_create ( + hb_face_t *face +) ; + +void hb_font_destroy ( + hb_font_t *font +) ; + +void hb_font_set_scale ( + hb_font_t *font, + int x_scale, + int y_scale +) ; + +void hb_ot_font_set_funcs ( + hb_font_t *font +) ; + +unsigned int hb_face_get_upem ( + hb_face_t *face +) ; + +const char ** hb_shape_list_shapers ( + void +); +]] + +-- The library must be somewhere accessible. The calls to the library are similar to +-- the ones in the prototype but we organize things a bit differently. I tried to alias +-- the functions in the harfbuzz namespace (luajittex will optimize this anyway but +-- normal luatex not) but it crashes luajittex so I revered that. + +do + + local l = harfbuzz.hb_shape_list_shapers() + local s = { } + + for i=0,9 do + local str = l[i] + if str == ffi.NULL then + break + else + s[#s+1] = ffi.string(str) + end + end + + report("using hb library version %a, supported shapers: %,t",ffi.string(harfbuzz.hb_version_string()),s) + +end + +-- we don't want to store userdata in the public data blob + +local fontdata = fonts.hashes.identifiers + +local loaded = { } +local shared = { } +local featured = { } + +local function loadfont(font) + local tfmdata = fontdata[font] + local resources = tfmdata.resources + local filename = resources.filename + local instance = shared[filename] + if not instance then + local wholefont = io.loaddata(filename) + local wholeblob = ffi.gc(harfbuzz.hb_blob_create(wholefont,#wholefont,0,nil,nil),harfbuzz.hb_blob_destroy) + local wholeface = ffi.gc(harfbuzz.hb_face_create(wholeblob,font),harfbuzz.hb_face_destroy) + local scale = harfbuzz.hb_face_get_upem(wholeface) + instance = ffi.gc(harfbuzz.hb_font_create(wholeface),harfbuzz.hb_font_destroy) + harfbuzz.hb_font_set_scale(instance,scale,scale) + harfbuzz.hb_ot_font_set_funcs(instance) + shared[filename] = instance + end + return instance +end + +local function loadfeatures(data) + local featureset = data.featureset or { } + local feature = ffi.new("hb_feature_t[?]",#featureset) + local featurespec = feature[0] + local noffeatures = 0 + for i=1,#featureset do + local f = featureset[i] + harfbuzz.hb_feature_from_string(f,#f,feature[noffeatures]) + noffeatures = noffeatures + 1 + end + return { + noffeatures = #featureset, + featureblob = feature, + featurespec = featurespec, + } +end + +local function crap(t) + return ffi.new("const char *[?]", #t, t) +end + +local shapers = { + native = crap { "ot", "uniscribe", "fallback" }, + uniscribe = crap { "uniscribe", "ot", "fallback" }, + -- uniscribe = crap { "uniscribe", "fallback" }, -- stalls without fallback when no uniscribe present + fallback = crap { "fallback" }, +} + +-- Reusing a buffer doesn't make a difference in performance so we forget +-- about it and keep things simple. Todo: check if using locals makes sense. + +function utilities.hb.methods.library(font,data,rlmode,text,leading,trailing) + local instance = loaded[font] + if not instance then + instance = loadfont(font) + loaded[font] = instance + end + -- todo: dflt -> DFLT ? + -- todo: whatever -> Whatever ? + local language = data.language or "dflt" + local script = data.script or "dflt" + local direction = rlmode < 0 and "rtl" or "ltr" + local shaper = shapers[data.shaper] + local featurehash = data.features + local featuredata = featured[featurehash] + if not featuredata then + featuredata = loadfeatures(data) + featured[featurehash] = featuredata + end + + local buffer = ffi.gc(harfbuzz.hb_buffer_create(),harfbuzz.hb_buffer_destroy) + + -- if false then + -- -- i have no time to look into this now but something like this should + -- -- be possible .. it probably doesn't make a difference in performance + -- local n = 0 -- here we also start at 0 + -- if leading then + -- harfbuzz.hb_buffer_add(buffer,[todo: 0x20],n) + -- end + -- for i=1,#text do + -- n = n + 1 + -- harfbuzz.hb_buffer_add(buffer,[todo: text[i] ],n) + -- end + -- if trailing then + -- n = n + 1 + -- harfbuzz.hb_buffer_add(buffer,[todo: 0x20 ],n) + -- end + -- else + -- maybe also utf 8 clusters here like on the command line but i have no time + -- to figure that out + text = packtoutf32(text,leading,trailing) + local size = #text/4 + text = text .. "\000\000\000\000\000\000\000\000" -- trial and error: avoid crash + harfbuzz.hb_buffer_add_utf32(buffer,text,#text,0,size) + -- end + + -- maybe: hb_buffer_set_segment_properties(buffer,...) + + harfbuzz.hb_buffer_set_language(buffer,harfbuzz.hb_language_from_string(language,#language)) + harfbuzz.hb_buffer_set_script(buffer,harfbuzz.hb_script_from_string(script,#script)) + harfbuzz.hb_buffer_set_direction(buffer,harfbuzz.hb_direction_from_string(direction,#direction)) + + harfbuzz.hb_buffer_guess_segment_properties(buffer) -- why is this needed (we already set them) + harfbuzz.hb_shape_full(instance,buffer,featuredata.featurespec,featuredata.noffeatures,shaper) + + if rlmode < 0 then + harfbuzz.hb_buffer_reverse(buffer) + end + + local size = harfbuzz.hb_buffer_get_length(buffer) + local infos = harfbuzz.hb_buffer_get_glyph_infos(buffer, nil) + local positions = harfbuzz.hb_buffer_get_glyph_positions(buffer, nil) + + local result = { } + for i=1,size do + local info = infos[i-1] + local position = positions[i-1] + result[i] = { + info.codepoint, + info.cluster, + position.x_offset, + position.y_offset, + position.x_advance, + position.y_advance, + } + end + -- inspect(result) + return result + +end diff --git a/Master/texmf-dist/tex/context/base/mkiv/font-phb.lua b/Master/texmf-dist/tex/context/base/mkiv/font-phb.lua new file mode 100644 index 00000000000..ce42e5a59cc --- /dev/null +++ b/Master/texmf-dist/tex/context/base/mkiv/font-phb.lua @@ -0,0 +1,728 @@ +if not modules then modules = { } end modules ['font-phb'] = { + version = 1.000, -- 2016.10.10, + comment = "companion to font-txt.mkiv", + original = "derived from a prototype by Kai Eigner", + author = "Hans Hagen", -- so don't blame KE + copyright = "TAT Zetwerk / PRAGMA ADE / ConTeXt Development Team", + license = "see context related readme files", +} + +-- The next code is a rewrite of Kai's prototype. Here we forget about components +-- and assume some sane data structures. Clusters are handled on the fly. This is +-- probably one of the places where generic and context code is (to be) different +-- anyway. All errors in the logic below are mine (Hans). The optimizations probably +-- make less sense in luajittex because there the interpreter does some optimization +-- but we may end up with a non-jit version some day. +-- +-- For testing I used the commandline tool as this code is not that critital and not +-- used in context for production (maybe for testing). I noticed some issues with +-- r2l shaping of latin but the uniscribe shaper seems better with that but as it's +-- a library we're supposed to treat it as a magic black box and not look into it. In +-- the end all will be sorted out I guess so we don't need to worry about it. Also, I +-- can always improve the code below if really needed. +-- +-- We create intermediate tables which might look inefficient. For instance we could +-- just return two tables or an iterator but in the end this is not the bottleneck. +-- In fact, speed is hard to measure anyway, as it depends on the font, complexity +-- of the text, etc. Sometimes the library is faster, sometimes the context Lua one +-- (which is interesting as it does a bit more, i.e. supports additional features, +-- which also makes it even harder to check). When we compare context mkiv runs with +-- mkii runs using pdftex or xetex (which uses harfbuzz) the performance of luatex +-- on (simple) font demos normally is significant less compared with pdftex (8 bit +-- and no unicode) but a bit better than xetex. It looks like the interface that gets +-- implemented here suits that pattern (keep in mind that especially discretionary +-- handling is quite complex and similar to the context mkiv variant). +-- +-- The main motivations for supporting this are (1) the fact that Kai spent time on +-- it, and (2) that we can compare the Lua variant with uniscribe, which is kind of +-- a reference. We started a decade ago (2006) with the Lua implementation and had +-- to rely on MSWord for comparison. On the other hand, the command line version is +-- also useable for that. Don't blame the library or its (maybe wrong) use (here) +-- for side effects. +-- +-- Currently there are two methods: (1) binary, which is slow and uses the command +-- line shaper and (2) the ffi binding. In the meantime I redid the feed-back-into- +-- the-node-list method. This way tracing is easier, performance better, and there +-- is no need to mess so much with spacing. I have no clue if I lost functionality +-- and as this is not production code issues probably will go unnoticed for a while. +-- We'll see. +-- +-- Usage: see m-fonts-plugins.mkiv as that is the interface. +-- +-- Remark: It looks like the library sets up some features by default. Passing them +-- somehow doesn't work (yet) so I must miss something here. There is something fishy +-- here with enabling features like init, medi, fina etc because when we turn them on +-- they aren't applied. Also some features are not processed. +-- +-- Remark: Because utf32 is fragile I append a couple of zero slots which seems to +-- work out ok. In fact, after some experiment I figured out that utf32 needs a list +-- of 4 byte cardinals. From the fact that Kai used the utf8 method I assumed that +-- there was a utf32 too and indeed that worked but I have no time to look into it +-- more deeply. It seems to work ok though. +-- +-- The plugin itself has plugins and we do it the same as with (my)sql support, i.e. +-- we provide methods. The specific methods are implemented in the imp files. We +-- follow that model with other libraries too. +-- +-- Somehow the command line version does uniscribe (usp10.dll) but not the library +-- so when I can get motivated I might write a binding for uniscribe. (Problem: I +-- don't look forward to decipher complex (c++) library api's so in the end it might +-- never happen. A quick glance at the usp10 api gives me the impression that the +-- apis don't differ that much, but still.) +-- +-- Warning: This is rather old code, cooked up in the second half of 2016. I'm not +-- sure if it will keep working because it's not used in production and therefore +-- doesn't get tested. It was written as part of some comparison tests for Idris, +-- who wanted to compare the ConTeXt handler, uniscribe and hb, for which there are +-- also some special modules (that show results alongside). It has never been tested +-- in regular documents. As it runs independent of the normal font processors there +-- is probably not that much risk of interference but of course one looses all the +-- goodies that have been around for a while (or will show up in the future). The +-- code can probably be optimized a bit. + +-- There are three implementation specific files: +-- +-- 1 font-phb-imp-binary.lua : calls the command line version of hb +-- 2 font-phb-imp-library.lua : uses ffi to interface to hb +-- 3 font-phb-imp-internal.lua : uses a small library to interface to hb +-- +-- Variants 1 and 2 should work with mkiv and were used when playing with these +-- things, when writing the articles, and when running some tests for Idris font +-- development. Variant 3 (and maybe 1 also works) is meant for lmtx and has not +-- been used (read: tested) so far. The 1 and 2 variants are kind of old, but 3 is +-- an adaptation of 2 so not hip and modern either. + +if not context then + return +end + +local next, tonumber, pcall, rawget = next, tonumber, pcall, rawget + +local concat = table.concat +local sortedhash = table.sortedhash +local formatters = string.formatters + +local fonts = fonts +local otf = fonts.handlers.otf +local texthandler = otf.texthandler + +local fontdata = fonts.hashes.identifiers + +local nuts = nodes.nuts +local tonode = nuts.tonode +local tonut = nuts.tonut + +local remove_node = nuts.remove + +local getboth = nuts.getboth +local getnext = nuts.getnext +local setnext = nuts.setnext +local getprev = nuts.getprev +local setprev = nuts.setprev +local getid = nuts.getid +local getchar = nuts.getchar +local setchar = nuts.setchar +local setlink = nuts.setlink +local setoffsets = nuts.setoffsets +----- getcomponents = nuts.getcomponents +----- setcomponents = nuts.setcomponents +local getwidth = nuts.getwidth +local setwidth = nuts.setwidth + +local copy_node = nuts.copy +local find_tail = nuts.tail + +local nodepool = nuts.pool +local new_kern = nodepool.fontkern +local new_glyph = nodepool.glyph + +local nodecodes = nodes.nodecodes +local glyph_code = nodecodes.glyph +local glue_code = nodecodes.glue + +local skipped = { + -- we assume that only valid features are set but maybe we need a list + -- of valid hb features as there can be many context specific ones + mode = true, + features = true, + language = true, + script = true, +} + +local seenspaces = { + [0x0020] = true, + [0x00A0] = true, + [0x0009] = true, -- indeed + [0x000A] = true, -- indeed + [0x000D] = true, -- indeed +} + +-- helpers + +local helpers = { } +local methods = { } +local initialized = { } -- we don't polute the shared table + +local method = "library" +local shaper = "native" -- "uniscribe" +local report = logs.reporter("font plugin","hb") + +utilities.hb = { + methods = methods, + helpers = helpers, + report = report, +} + +do + + local toutf8 = utf.char + local space = toutf8(0x20) + + -- we can move this to the internal lib .. just pass a table .. but it is not faster + + function helpers.packtoutf8(text,leading,trailing) + local size = #text + for i=1,size do + text[i] = toutf8(text[i]) + end + if leading then + text[0] = space + end + if trailing then + text[size+1] = space + end + return concat(text,"",leading and 0 or 1,trailing and (size + 1) or size) + end + + local toutf32 = utf.toutf32string + local space = toutf32(0x20) + + function helpers.packtoutf32(text,leading,trailing) + local size = #text + for i=1,size do + text[i] = toutf32(text[i]) + end + if leading then + text[0] = space + end + if trailing then + text[size+1] = space + end + return concat(text,"",leading and 0 or 1,trailing and (size + 1) or size) + end + +end + +local function initialize(font) + + local tfmdata = fontdata[font] + local resources = tfmdata.resources + local shared = tfmdata.shared + local filename = resources.filename + local features = shared.features + local descriptions = shared.rawdata.descriptions + local characters = tfmdata.characters + local featureset = { } + local copytochar = shared.copytochar -- indextounicode + local spacewidth = nil -- unscaled + local factor = tfmdata.parameters.factor + local marks = resources.marks or { } + + -- could be shared but why care about a few extra tables + + if not copytochar then + copytochar = { } + -- let's make sure that we have an indexed table and not a hash + local max = 0 + for k, v in next, descriptions do + if v.index > max then + max = v.index + end + end + for i=0,max do + copytochar[i] = i + end + -- the normal mapper + for k, v in next, descriptions do + copytochar[v.index] = k + end + shared.copytochar = copytochar + end + + -- independent from loop as we have unordered hashes + + if descriptions[0x0020] then + spacewidth = descriptions[0x0020].width + elseif descriptions[0x00A0] then + spacewidth = descriptions[0x00A0].width + end + + for k, v in sortedhash(features) do + if #k > 4 then + -- unknown ones are ignored anyway but we can assume that the current + -- (and future) extra context features use more verbose names + elseif skipped[k] then + -- we don't want to pass language and such so we block a few features + -- explicitly + elseif v == "yes" or v == true then + featureset[#featureset+1] = k .. "=1" -- cf command line (false) + elseif v == "no" or v == false then + featureset[#featureset+1] = k .. "=0" -- cf command line (true) + elseif type(v) == "number" then + featureset[#featureset+1] = k .. "=" .. v -- cf command line (alternate) + else + -- unset + end + end + + local data = { + language = features.language, -- do we need to uppercase and padd to 4 ? + script = features.script, -- do we need to uppercase and padd to 4 ? + features = #featureset > 0 and concat(featureset,",") or "", -- hash + featureset = #featureset > 0 and featureset or nil, + copytochar = copytochar, + spacewidth = spacewidth, + filename = filename, + marks = marks, + factor = factor, + characters = characters, -- the loaded font (we use its metrics which is more accurate) + method = features.method or method, + shaper = features.shaper or shaper, + } + initialized[font] = data + return data +end + +-- In many cases this gives compatible output but especially with respect to spacing and user +-- discretionaries that mix fonts there can be different outcomes. We also have no possibility +-- to tweak and cheat. Of course one can always run a normal node mode pass with specific +-- features first but then one can as well do all in node mode. So .. after a bit of playing +-- around I redid this one from scratch and also added tracing. + +local trace_colors = false trackers.register("fonts.plugins.hb.colors", function(v) trace_colors = v end) +local trace_details = false trackers.register("fonts.plugins.hb.details",function(v) trace_details = v end) +local check_id = false +----- components = false -- we have no need for them + +local setcolor = function() end +local resetcolor = function() end + +if context then + setcolor = nodes.tracers.colors.set + resetcolor = nodes.tracers.colors.reset +end + +table.setmetatableindex(methods,function(t,k) + local l = "font-phb-imp-" .. k .. ".lua" + report("start loading method %a from %a",k,l) + dofile(resolvers.findfile(l)) + local v = rawget(t,k) + if v then + report("loading method %a succeeded",k) + else + report("loading method %a failed",k) + v = function() return { } end + end + t[k] = v + return v +end) + +local inandout do + + local utfbyte = utf.byte + local utfchar = utf.char + local utf3208 = utf.utf32_to_utf8_le + + inandout = function(text,result,first,last,copytochar) + local s = { } + local t = { } + local r = { } + local f = formatters["%05U"] + for i=1,#text do + local c = text[i] + -- t[#t+1] = f(utfbyte(utf3208(c))) + s[#s+1] = utfchar(c) + t[#t+1] = f(c) + end + for i=first,last do + r[#r+1] = f(copytochar[result[i][1]]) + end + return s, t, r + end + +end + +local function harfbuzz(head,font,attr,rlmode,start,stop,text,leading,trailing) + local data = initialized[font] + + if not data then + data = initialize(font) + end + + if check_id then + if getid(start) ~= glyph_code then + report("error: start is not a glyph") + return head + elseif getid(stop) ~= glyph_code then + report("error: stop is not a glyph") + return head + end + end + local size = #text -- original text, without spaces + local result = methods[data.method](font,data,rlmode,text,leading,trailing) + local length = result and #result or 0 + + if length == 0 then + -- report("warning: no result") + return head + end + + local factor = data.factor + local marks = data.marks + local spacewidth = data.spacewidth + local copytochar = data.copytochar + local characters = data.characters + + -- the text analyzer is only partially clever so we must assume that we get + -- inconsistent lists + + -- we could check if something has been done (replacement or kern or so) but + -- then we pass around more information and need to check a lot and spaces + -- are kind of spoiling that game (we need a different table then) .. more + -- pain than gain + + -- we could play with 0xFFFE as boundary + + local current = start + local prev = nil + local glyph = nil + + local first = 1 + local last = length + local next = nil -- todo: keep track of them + local prev = nil -- todo: keep track of them + + if leading then + first = first + 1 + end + if trailing then + last = last - 1 + end + + local position = first + local cluster = 0 + local glyph = nil + local index = 0 + local count = 1 + -- local runner = nil + local saved = nil + + if trace_details then + report("start run, original size: %i, result index: %i upto %i",size,first,last) + local s, t, r = inandout(text,result,first,last,copytochar) + report("method : %s",data.method) + report("shaper : %s",data.shaper) + report("string : %t",s) + report("text : % t",t) + report("result : % t",r) + end + + -- okay, after some experiments, it became clear that more complex code aimed at + -- optimization doesn't pay off as complexity also demands more testing + + for i=first,last do + local r = result[i] + local unicode = copytochar[r[1]] -- can be private of course + -- + cluster = r[2] + 1 -- starts at zero + -- + if position == cluster then + if i == first then + index = 1 + if trace_details then + report("[%i] position: %i, cluster: %i, index: %i, starting",i,position,cluster,index) + end + else + index = index + 1 + if trace_details then + report("[%i] position: %i, cluster: %i, index: %i, next step",i,position,cluster,index) + end + end + elseif position < cluster then + -- a new cluster + current = getnext(current) + position = position + 1 + size = size - 1 + -- if runner then + -- local h, t + -- if saved then + -- h = copy_node(runner) + -- if trace_colors then + -- resetcolor(h) + -- end + -- setchar(h,saved) + -- t = h + -- if trace_details then + -- report("[%i] position: %i, cluster: %i, index: -, initializing components",i,position,cluster) + -- end + -- else + -- h = getcomponents(runner) + -- t = find_tail(h) + -- end + -- for p=position,cluster-1 do + -- local n + -- head, current, n = remove_node(head,current) + -- setlink(t,n) + -- t = n + -- if trace_details then + -- report("[%i] position: %i, cluster: %i, index: -, moving node to components",i,p,cluster) + -- end + -- size = size - 1 + -- end + -- if saved then + -- setcomponents(runner,h) + -- saved = false + -- end + -- else + for p=position,cluster-1 do + head, current = remove_node(head,current,true) + if trace_details then + report("[%i] position: %i, cluster: %i, index: -, removing node",i,p,cluster) + end + size = size - 1 + end + -- end + position = cluster + index = 1 + glyph = nil + if trace_details then + report("[%i] position: %i, cluster: %i, index: %i, arriving",i,cluster,position,index) + end + else -- maybe a space got properties + if trace_details then + report("position: %i, cluster: %i, index: %i, quitting due to fatal inconsistency",position,cluster,index) + end + return head + end + local copied = false + if glyph then + if trace_details then + report("[%i] position: %i, cluster: %i, index: %i, copying glyph, unicode %U",i,position,cluster,index,unicode) + end + local g = copy_node(glyph) + if trace_colors then + resetcolor(g) + end + setlink(current,g,getnext(current)) + current = g + copied = true + else + if trace_details then + report("[%i] position: %i, cluster: %i, index: %i, using glyph, unicode %U",i,position,cluster,index,unicode) + end + glyph = current + end + -- + if not current then + if trace_details then + report("quitting due to unexpected end of node list") + end + return head + end + -- + local id = getid(current) + if id ~= glyph_code then + if trace_details then + report("glyph expected in node list") + end + return head + end + -- + -- really, we can get a tab (9), lf (10), or cr(13) back in cambria .. don't ask me why + -- + local prev, next = getboth(current) + -- + -- assign glyph: first in run + -- + -- if components and index == 1 then + -- runner = current + -- saved = getchar(current) + -- if saved ~= unicode then + -- setchar(current,unicode) -- small optimization + -- if trace_colors then + -- count = (count == 8) and 1 or count + 1 + -- setcolor(current,"trace:"..count) + -- end + -- end + -- else + setchar(current,unicode) + if trace_colors then + count = (count == 8) and 1 or count + 1 + setcolor(current,"trace:"..count) + end + -- end + -- + local x_offset = r[3] -- r.dx + local y_offset = r[4] -- r.dy + local x_advance = r[5] -- r.ax + ----- y_advance = r[6] -- r.ay + local left = 0 + local right = 0 + local dx = 0 + local dy = 0 + if trace_details then + if x_offset ~= 0 or y_offset ~= 0 or x_advance ~= 0 then -- or y_advance ~= 0 + report("[%i] position: %i, cluster: %i, index: %i, old, xoffset: %p, yoffset: %p, xadvance: %p, width: %p", + i,position,cluster,index,x_offset*factor,y_offset*factor,x_advance*factor,characters[unicode].width) + end + end + if y_offset ~= 0 then + dy = y_offset * factor + end + if rlmode >= 0 then + -- l2r marks and rest + if x_offset ~= 0 then + dx = x_offset * factor + end + local width = characters[unicode].width + local delta = x_advance * factor + if delta ~= width then + -- right = -(delta - width) + right = delta - width + end + elseif marks[unicode] then -- why not just the next loop + -- r2l marks + if x_offset ~= 0 then + dx = -x_offset * factor + end + else + -- r2l rest + local width = characters[unicode].width + local delta = (x_advance - x_offset) * factor + if delta ~= width then + left = delta - width + end + if x_offset ~= 0 then + right = x_offset * factor + end + end + if copied or dx ~= 0 or dy ~= 0 then + setoffsets(current,dx,dy) + end + if left ~= 0 then + setlink(prev,new_kern(left),current) -- insertbefore + if current == head then + head = prev + end + end + if right ~= 0 then + local kern = new_kern(right) + setlink(current,kern,next) + current = kern + end + if trace_details then + if dy ~= 0 or dx ~= 0 or left ~= 0 or right ~= 0 then + report("[%i] position: %i, cluster: %i, index: %i, new, xoffset: %p, yoffset: %p, left: %p, right: %p",i,position,cluster,index,dx,dy,left,right) + end + end + end + -- + if trace_details then + report("[-] position: %i, cluster: %i, index: -, at end",position,cluster) + end + if size > 1 then + current = getnext(current) + -- if runner then + -- local h, t + -- if saved then + -- h = copy_node(runner) + -- if trace_colors then + -- resetcolor(h) + -- end + -- setchar(h,saved) + -- t = h + -- if trace_details then + -- report("[-] position: %i, cluster: -, index: -, initializing components",position) + -- end + -- else + -- h = getcomponents(runner) + -- t = find_tail(h) + -- end + -- for i=1,size-1 do + -- if trace_details then + -- report("[-] position: %i + %i, cluster: -, index: -, moving node to components",position,i) + -- end + -- local n + -- head, current, n = remove_node(head,current,true) + -- setlink(t,n) + -- t = n + -- end + -- if saved then + -- setcomponents(runner,h) + -- saved = false + -- end + -- else + for i=1,size-1 do + if trace_details then + report("[-] position: %i + %i, cluster: -, index: -, removing node",position,i) + end + head, current = remove_node(head,current,true) + end + -- end + end + -- + -- We see all kind of interesting spaces come back (like tabs in cambria) so we do a bit of + -- extra testing here. + -- + if leading then + local r = result[1] + local unicode = copytochar[r[1]] + if seenspaces[unicode] then + local x_advance = r[5] + local delta = x_advance - spacewidth + if delta ~= 0 then + -- nothing to do but jump one slot ahead + local prev = getprev(start) + if getid(prev) == glue_code then + local dx = delta * factor + setwidth(prev,getwidth(prev) + dx) + if trace_details then + report("compensating leading glue by %p due to codepoint %U",dx,unicode) + end + else + report("no valid leading glue node") + end + end + end + end + -- + if trailing then + local r = result[length] + local unicode = copytochar[r[1]] + if seenspaces[unicode] then + local x_advance = r[5] + local delta = x_advance - spacewidth + if delta ~= 0 then + local next = getnext(stop) + if getid(next) == glue_code then + local dx = delta * factor + setwidth(next,getwidth(next) + dx) + if trace_details then + report("compensating trailing glue by %p due to codepoint %U",dx,unicode) + end + else + report("no valid trailing glue node") + end + end + end + end + -- + if trace_details then + report("run done") + end + return head +end + +otf.registerplugin("harfbuzz",function(head,font,attr,direction) + return texthandler(head,font,attr,direction,harfbuzz) +end) diff --git a/Master/texmf-dist/tex/context/base/mkiv/font-pre.mkiv b/Master/texmf-dist/tex/context/base/mkiv/font-pre.mkiv index 445dedd2543..91a2e818eb7 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/font-pre.mkiv +++ b/Master/texmf-dist/tex/context/base/mkiv/font-pre.mkiv @@ -401,10 +401,11 @@ % liga=yes, % makes no sense % tlig=yes, % makes no sense % trep=yes, % makes no sense - mathnolimitsmode={0,800}, % this looks okay on the average font + % mathnolimitsmode={0,800}, % this looks okay on the average font mathalternates=yes, - mathitalics=yes, % we pass them - mathdimensions=all, + emulatelmtx=yes, + % mathitalics=yes, % we pass them + % mathdimensions=all, % mathkerns=yes, % mathgaps=yes, language=dflt, @@ -416,10 +417,14 @@ % [oldmath] % [oldmath=yes] -\ifdefined\mathnolimitsmode - \mathnolimitsmode\plusone % font driven (only opentype) +\ifdefined\variablefam + \variablefam\pluscclv \fi +% \ifdefined\mathnolimitsmode +% \mathnolimitsmode\plusone % font driven (only opentype) +% \fi + \ifdefined\mathitalicsmode \mathitalicsmode\plusone % simple noads become zero % \mathitalicsmode\plustwo % idem but inner is kept (for testing) diff --git a/Master/texmf-dist/tex/context/base/mkiv/font-prv.lua b/Master/texmf-dist/tex/context/base/mkiv/font-prv.lua index 15057e2554e..59b793444d8 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/font-prv.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/font-prv.lua @@ -39,6 +39,8 @@ local sharedprivates = setmetatableindex(function(t,k) return v end) +fonts.helpers.sharedprivates = sharedprivates + function helpers.addprivate(tfmdata,name,characterdata) local properties = tfmdata.properties local characters = tfmdata.characters @@ -81,6 +83,22 @@ function helpers.newprivateslot(name) return sharedprivates[name] end +function helpers.isprivate(unicode) + if unicode < 0xD7FF or (unicode > 0xDFFF and unicode <= 0xFFFF) then + return false + elseif unicode >= 0x00E000 and unicode <= 0x00F8FF then + return true + elseif unicode >= 0x0F0000 and unicode <= 0x0FFFFF then + return true + elseif unicode >= 0x100000 and unicode <= 0x10FFFF then + return true + elseif unicode >= 0x00D800 and unicode <= 0x00DFFF then + return true + else + return false + end +end + do local context = context diff --git a/Master/texmf-dist/tex/context/base/mkiv/font-sel.lua b/Master/texmf-dist/tex/context/base/mkiv/font-sel.lua index 9a611f9faa3..ab6297f40aa 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/font-sel.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/font-sel.lua @@ -77,19 +77,24 @@ local report_typescript = logs.reporter("selectfont","typescripts") defaults["rm"] = { features = { ["sc"] = "*,f:smallcaps" } } defaults["ss"] = { features = { ["sc"] = "*,f:smallcaps" } } -defaults["asanamath"] = { options = { extras = "asana-math", features = "math\\mathsizesuffix", goodies = "anana-math" } } -defaults["cambriamath"] = { options = { extras = "cambria-math", features = "math\\mathsizesuffix", goodies = "cambria-math" } } -defaults["dejavumath"] = { options = { extras = "dejavu", features = "math\\mathsizesuffix" } } -defaults["neoeuler"] = { options = { extras = "euler-math", features = "math\\mathsizesuffix" } } -defaults["latinmodernmath"] = { options = { extras = "lm,lm-math", features = "math\\mathsizesuffix,lm-math", goodies = "lm" } } -defaults["lucidabrightmathot"] = { options = { extras = "lucida-opentype-math", features = "math\\mathsizesuffix", goodies = "lucida-opentype-math" } } -defaults["minionmath"] = { options = { extras = "minion-math", features = "math\\mathsizesuffix", goodies = "minion-math" } } -defaults["texgyredejavumath"] = { options = { extras = "dejavu", features = "math\\mathsizesuffix" } } -defaults["texgyrepagellamath"] = { options = { extras = "texgyre", features = "math\\mathsizesuffix" } } -defaults["texgyrebonummath"] = { options = { extras = "texgyre", features = "math\\mathsizesuffix" } } -defaults["texgyrescholamath"] = { options = { extras = "texgyre", features = "math\\mathsizesuffix" } } -defaults["texgyretermesmath"] = { options = { extras = "texgyre", features = "math\\mathsizesuffix" } } -defaults["xitsmath"] = { options = { extras = "xits-math", features = "math\\mathsizesuffix", goodies = "xits-math" } } +-- WS: we need to check the extras with the typescripts + +defaults["asanamath"] = { options = { extras = "asana-math", features = "math\\mathsizesuffix,mathextra", goodies = "anana-math" } } +defaults["cambriamath"] = { options = { extras = "cambria-math", features = "math\\mathsizesuffix,mathextra", goodies = "cambria-math" } } +defaults["euler"] = { options = { extras = "euler-math", features = "math\\mathsizesuffix,mathextra", goodies = "euler-math" } } +defaults["latinmodernmath"] = { options = { extras = "lm,lm-math", features = "math\\mathsizesuffix,mathextra,lm-math", goodies = "modern" } } +defaults["lucidabrightmathot"] = { options = { extras = "lucida-opentype-math", features = "math\\mathsizesuffix,mathextra", goodies = "lucida-math" } } +defaults["minionmath"] = { options = { extras = "minion-math", features = "math\\mathsizesuffix,mathextra", goodies = "minion-math" } } +defaults["stixtwomath"] = { options = { extras = "stix-two-math", features = "math\\mathsizesuffix,mathextra", goodies = "stixtwo-math" } } +defaults["texgyredejavumath"] = { options = { extras = "dejavu", features = "math\\mathsizesuffix,mathextra", goodies = "dejavu-math" } } +defaults["texgyrepagellamath"] = { options = { extras = "texgyre", features = "math\\mathsizesuffix,mathextra", goodies = "pagella-math" } } +defaults["texgyrebonummath"] = { options = { extras = "texgyre", features = "math\\mathsizesuffix,mathextra", goodies = "bonum-math" } } +defaults["texgyrescholamath"] = { options = { extras = "texgyre", features = "math\\mathsizesuffix,mathextra", goodies = "schola-math" } } +defaults["texgyretermesmath"] = { options = { extras = "texgyre", features = "math\\mathsizesuffix,mathextra", goodies = "termes-math" } } +defaults["xitsmath"] = { options = { extras = "xits-math", features = "math\\mathsizesuffix,mathextra", goodies = "xits-math" } } + +defaults["neoeuler"] = defaults["euler"] +defaults["dejavumath"] = defaults["texgyredejavumath"] extras["features"] = function(data,alternative,features) local d = data.options.features @@ -466,7 +471,12 @@ function selectfont.registerfiles(index) argument = method method = "name" end - (extras[method] or methods[method] or methods[v_default])(data,alternative,argument) + if #entries == 1 and method == "features" then + extras["features"](data,alternative,argument) + methods[v_default](data,alternative) + else + (extras[method] or methods[method] or methods[v_default])(data,alternative,argument) + end end else methods[v_default](data,alternative) diff --git a/Master/texmf-dist/tex/context/base/mkiv/font-shp.lua b/Master/texmf-dist/tex/context/base/mkiv/font-shp.lua index 78e8597b937..197a3f1ccb0 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/font-shp.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/font-shp.lua @@ -17,7 +17,7 @@ local pfb = fonts.handlers.pfb local hashes = fonts.hashes local identifiers = hashes.identifiers -local version = 0.009 +local version = otf.version or 0.015 local shapescache = containers.define("fonts", "shapes", version, true) local streamscache = containers.define("fonts", "streams", version, true) @@ -150,6 +150,8 @@ end local readers = otf.readers local cleanname = otf.readers.helpers.cleanname +-- todo: shared hash for this but not accessed often + local function makehash(filename,sub,instance) local name = cleanname(file.basename(filename)) if instance then @@ -234,17 +236,21 @@ local function loadstreams(cache,filename,sub,instance) if data then local glyphs = data.glyphs local streams = { } + -- local widths = { } if glyphs then for i=0,#glyphs do local glyph = glyphs[i] if glyph then streams[i] = glyph.stream or "" + -- widths [i] = glyph.width or 0 else streams[i] = "" + -- widths [i] = 0 end end end data.streams = streams + -- data.widths = widths -- maybe more reliable! data.glyphs = nil data.size = size data.format = data.format or (kind == "otf" and "opentype") or "truetype" @@ -259,8 +265,11 @@ local function loadstreams(cache,filename,sub,instance) local names, encoding, streams, metadata = pfb.loadvector(filename,false,true) if streams then local fontbbox = metadata.fontbbox or { 0, 0, 0, 0 } + -- local widths = { } for i=0,#streams do - streams[i] = streams[i].stream or "\14" + local s = streams[i] + streams[i] = s.stream or "\14" + -- widths [i] = s.width or 0 end data = { filename = filename, @@ -268,6 +277,7 @@ local function loadstreams(cache,filename,sub,instance) time = time, format = "type1", streams = streams, + -- widths = widths, fontheader = { fontversion = metadata.version, units = 1000, -- can this be different? @@ -346,7 +356,8 @@ local function getstreamhash(fontid) local fontdata = identifiers[fontid] if fontdata then local properties = fontdata.properties - return makehash(properties.filename,properties.subfont,properties.instance) + local fonthash = makehash(properties.filename,properties.subfont,properties.instance) + return fonthash, fontdata end end diff --git a/Master/texmf-dist/tex/context/base/mkiv/font-sol.lua b/Master/texmf-dist/tex/context/base/mkiv/font-sol.lua index c618739959f..b3b514a16b7 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/font-sol.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/font-sol.lua @@ -75,14 +75,14 @@ local setnext = nuts.setnext local setlist = nuts.setlist local find_node_tail = nuts.tail -local flush_node = nuts.flush_node -local flush_node_list = nuts.flush_list -local copy_node_list = nuts.copy_list +local flushnode = nuts.flushnode +local flushnodelist = nuts.flushlist +local copy_node_list = nuts.copylist local hpack_nodes = nuts.hpack -local insert_node_before = nuts.insert_before -local insert_node_after = nuts.insert_after -local protect_glyphs = nuts.protect_glyphs -local start_of_par = nuts.start_of_par +local insertnodebefore = nuts.insertbefore +local insertnodeafter = nuts.insertafter +local protectglyphs = nuts.protectglyphs +local startofpar = nuts.startofpar local nextnode = nuts.traversers.next local nexthlist = nuts.traversers.hlist @@ -92,7 +92,7 @@ local repack_hlist = nuts.repackhlist local nodes_to_utf = nodes.listtoutf ------ protect_glyphs = nodes.handlers.protectglyphs +----- protectglyphs = nodes.handlers.protectglyphs local setnodecolor = nodes.tracers.colors.set @@ -367,8 +367,8 @@ function splitters.split(head) -- best also pass the direction if encapsulate then local user_one = new_usernode(splitter_one,n) local user_two = new_usernode(splitter_two,n) - head, start = insert_node_before(head,start,user_one) - insert_node_after(head,stop,user_two) + head, start = insertnodebefore(head,start,user_one) + insertnodeafter(head,stop,user_two) else local current = start while true do @@ -437,7 +437,7 @@ function splitters.split(head) -- best also pass the direction end local direction, pop = getdirection(current) r2l = not pop and direction == righttoleft_code - elseif id == par_code and start_of_par(current) then + elseif id == par_code and startofpar(current) then if start then flush() -- very unlikely as this starts a paragraph end @@ -636,7 +636,7 @@ local function doit(word,list,best,width,badness,line,set,listdir) if getid(first) == whatsit_code then local temp = first first = getnext(first) - flush_node(temp) + flushnode(temp) end local last = find_node_tail(first) -- replace [u]h->t by [u]first->last @@ -660,14 +660,14 @@ local function doit(word,list,best,width,badness,line,set,listdir) setnext(t) end setnext(last) - flush_node_list(first) + flushnodelist(first) else if trace_optimize then report_optimizers("line %a, set %a, badness before: %a, after %a, criterium %a, verdict %a",line,set or "?",badness,b,criterium,"continue") end -- free old h->t setnext(t) - flush_node_list(h) -- somehow fails + flushnodelist(h) -- somehow fails if not encapsulate then word[2] = first word[3] = last @@ -784,7 +784,7 @@ function splitters.optimize(head) if not encapsulate and getid(list) == glyph_code then -- nasty .. we always assume a prev being there .. future luatex will always have a leftskip set -- is this assignment ok ? .. needs checking - list = insert_node_before(list,list,new_leftskip(0)) -- new_glue(0) + list = insertnodebefore(list,list,new_leftskip(0)) -- new_glue(0) setlist(current,list) end local temp, badness = repack_hlist(list,width,"exactly",direction) -- it would be nice if the badness was stored in the node @@ -813,7 +813,7 @@ function splitters.optimize(head) local bb, base for i=1,max do if base then - flush_node_list(base) + flushnodelist(base) end base = copy_node_list(list) local words = collect_words(base) -- beware: words is adapted @@ -841,7 +841,7 @@ function splitters.optimize(head) break end end - flush_node_list(base) + flushnodelist(base) end local words = collect_words(list) for best=lastbest or 1,max do @@ -852,7 +852,7 @@ function splitters.optimize(head) end if done then if b <= criterium then -- was == 0 - protect_glyphs(list) + protectglyphs(list) break end end @@ -869,7 +869,7 @@ function splitters.optimize(head) end for i=1,nc do local ci = cache[i] - flush_node_list(ci.original) + flushnodelist(ci.original) end cache = { } tex.hbadness = tex_hbadness diff --git a/Master/texmf-dist/tex/context/base/mkiv/font-syn.lua b/Master/texmf-dist/tex/context/base/mkiv/font-syn.lua index 1d5e1803243..e80d57f4146 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/font-syn.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/font-syn.lua @@ -1408,13 +1408,30 @@ here is for testing purposes only (it deals with names prefixed by an encoding name).</p> --ldx]]-- -local function fuzzy(mapping,sorted,name,sub) +local function fuzzy(mapping,sorted,name,sub) -- no need for reverse sorted here local condensed = gsub(name,"[^%a%d]","") + local pattern = condensed .. "$" + local matches = false for k=1,#sorted do local v = sorted[k] - if find(v,condensed) then + if v == condensed then return mapping[v], v + elseif find(v,pattern) then + return mapping[v], v + elseif find(v,condensed) then + if matches then + matches[#matches+1] = v + else + matches = { v } + end + end + end + if matches then + if #matches > 1 then + sort(matches,function(a,b) return #a < #b end) end + matches = matches[1] + return mapping[matches], matches end end diff --git a/Master/texmf-dist/tex/context/base/mkiv/font-ttf.lua b/Master/texmf-dist/tex/context/base/mkiv/font-ttf.lua index a2732aa5f2e..1fee9fa88d9 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/font-ttf.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/font-ttf.lua @@ -35,7 +35,7 @@ if not modules then modules = { } end modules ['font-ttf'] = { local next, type, unpack = next, type, unpack local band, rshift = bit32.band, bit32.rshift -local sqrt, round = math.sqrt, math.round +local sqrt, round, abs, min, max = math.sqrt, math.round, math.abs, math.min, math.max local char, rep = string.char, string.rep local concat = table.concat local idiv = number.idiv @@ -136,8 +136,12 @@ local function mergecomposites(glyphs,shapes) local y = p[2] nofpoints = nofpoints + 1 points[nofpoints] = { + -- unifractur : u n + -- seguiemj : 0x270E 0x2710 xscale * x + xrotate * y + xoffset, yscale * y + yrotate * x + yoffset, +-- xscale * x + yrotate * y + xoffset, +-- xrotate * x + yscale * y + yoffset, p[3] } end @@ -203,77 +207,220 @@ end -- We had two loops (going backward) but can do it in one loop .. but maybe we -- should only accept fonts with proper hvar tables. +-- dowidth is kind of hack ... fonts are not always ok wrt these extra points + +local xv = { } -- we share this cache +local yv = { } -- we share this cache + local function applyaxis(glyph,shape,deltas,dowidth) local points = shape.points if points then local nofpoints = #points - local h = nofpoints + 2 -- weird, the example font seems to have left first - local l = nofpoints + 1 - ----- v = nofpoints + 3 - ----- t = nofpoints + 4 local dw = 0 local dl = 0 for i=1,#deltas do local deltaset = deltas[i] local xvalues = deltaset.xvalues local yvalues = deltaset.yvalues - local dpoints = deltaset.points - local factor = deltaset.factor - if dpoints then - -- todo: interpolate - local nofdpoints = #dpoints - for i=1,nofdpoints do - local d = dpoints[i] - local p = points[d] - if p then - if xvalues then - local x = xvalues[i] - if x and x ~= 0 then - p[1] = p[1] + factor * x - end - end - if yvalues then - local y = yvalues[i] - if y and y ~= 0 then - p[2] = p[2] + factor * y + if xvalues and yvalues then + local dpoints = deltaset.points + local factor = deltaset.factor + if dpoints then + local cnt = #dpoints + if dowidth then + cnt = cnt - 4 + end + if cnt > 0 then + -- Not the most efficient solution but we seldom do this. We + -- actually need to avoid the extra points here but I'll deal + -- with that when needed. + local contours = shape.contours + local nofcontours = #contours + local first = 1 + local firstindex = 1 + for contour=1,nofcontours do + local last = contours[contour] + if last >= first then + local lastindex = cnt + if firstindex < cnt then + for currentindex=firstindex,cnt do + local found = dpoints[currentindex] + if found <= first then + firstindex = currentindex + end + if found == last then + lastindex = currentindex + break + elseif found > last then + -- \definefontfeature[book][default][axis={weight=800}] + -- \definefont[testfont][file:Commissioner-vf-test.ttf*book] + -- \testfont EΘÄΞ + while lastindex > 1 and dpoints[lastindex] > last do + lastindex = lastindex - 1 + end + -- + break + end + end + end + -- print("unicode: ",glyph.unicode or "?") + -- print("contour: ",first,contour,last) + -- print("index : ",firstindex,lastindex,cnt) + -- print("points : ",dpoints[firstindex],dpoints[lastindex]) + local function find(i) + local prv = lastindex + for j=firstindex,lastindex do + local nxt = dpoints[j] -- we could save this lookup when we return it + if nxt == i then + return false, j, false + elseif nxt > i then + return prv, false, j + end + prv = j + end + return prv, false, firstindex + end + -- We need the first and last points untouched so we first + -- collect data. + for point=first,last do + local d1, d2, d3 = find(point) + local p2 = points[point] + if d2 then + xv[point] = xvalues[d2] + yv[point] = yvalues[d2] + else + local n1 = dpoints[d1] + local n3 = dpoints[d3] + -- Some day I need to figure out these extra points but + -- I'll wait till the standard is more clear and fonts + -- become better (ntg-context: fraunces.ttf > abcdef). + if n1 > nofpoints then + n1 = nofpoints + end + if n3 > nofpoints then + n3 = nofpoints + end + -- + local p1 = points[n1] + local p3 = points[n3] + local p1x = p1[1] + local p2x = p2[1] + local p3x = p3[1] + local p1y = p1[2] + local p2y = p2[2] + local p3y = p3[2] + local x1 = xvalues[d1] + local y1 = yvalues[d1] + local x3 = xvalues[d3] + local y3 = yvalues[d3] + -- + local fx + local fy + -- + if p1x == p3x then + if x1 == x3 then + fx = x1 + else + fx = 0 + end + elseif p2x <= min(p1x,p3x) then + if p1x < p3x then + fx = x1 + else + fx = x3 + end + elseif p2x >= max(p1x,p3x) then + if p1x > p3x then + fx = x1 + else + fx = x3 + end + else + fx = (p2x - p1x)/(p3x - p1x) +-- fx = round(fx) + fx = (1 - fx) * x1 + fx * x3 + end + -- + if p1y == p3y then + if y1 == y3 then + fy = y1 + else + fy = 0 + end + elseif p2y <= min(p1y,p3y) then + if p1y < p3y then + fy = y1 + else + fy = y3 + end + elseif p2y >= max(p1y,p3y) then + if p1y > p3y then + fy = y1 + else + fy = y3 + end + else + fy = (p2y - p1y)/(p3y - p1y) +-- fy = round(fy) + fy = (1 - fy) * y1 + fy * y3 + end + -- -- maybe: + -- if p1y ~= p3y then + -- fy = (p2y - p1y)/(p3y - p1y) + -- fy = (1 - fy) * y1 + fy * y3 + -- elseif abs(p1y-p2y) < abs(p3y-p2y) then + -- fy = y1 + -- else + -- fy = y3 + -- end + -- + xv[point] = fx + yv[point] = fy + end + end + if lastindex < cnt then + firstindex = lastindex + 1 + end end + first = last + 1 end - elseif dowidth then - -- we've now ran into phantom points which is a bit fuzzy because: - -- are there gaps in there? - -- - -- todo: move this outside the loop (when we can be sure of all 4 being there) - if d == h then - -- we have a phantom point hadvance - local x = xvalues[i] - if x then - dw = dw + factor * x + + for i=1,nofpoints do + local pi = points[i] + local fx = xv[i] + local fy = yv[i] + if fx ~= 0 then + pi[1] = pi[1] + factor * fx end - elseif d == l then - local x = xvalues[i] - if x then - dl = dl + factor * x + if fy ~= 0 then + pi[2] = pi[2] + factor * fy end end + else + report("bad deltapoint data, maybe a missing hvar table") end - end - else - for i=1,nofpoints do - local p = points[i] - if xvalues then + else + for i=1,nofpoints do + local p = points[i] local x = xvalues[i] - if x and x ~= 0 then - p[1] = p[1] + factor * x - end - end - if yvalues then - local y = yvalues[i] - if y and y ~= 0 then - p[2] = p[2] + factor * y + if x then + local y = yvalues[i] + if x ~= 0 then + p[1] = p[1] + factor * x + end + if y ~= 0 then + p[2] = p[2] + factor * y + end + else + break end end end if dowidth then + local h = nofpoints + 2 -- weird, the example font seems to have left first + local l = nofpoints + 1 + ----- v = nofpoints + 3 + ----- t = nofpoints + 4 local x = xvalues[h] if x then dw = dw + factor * x @@ -618,6 +765,18 @@ local function contours2outlines_shaped(glyphs,shapes,keepcurve) end first = last + 1 end + -- See readers.hvar where we set the delta lsb as well as the adapted + -- width. At this point we do know the boundingbox's llx. The xmax is + -- not that relevant. It needs more testing! + -- + xmin = glyph.boundingbox[1] + -- + local dlsb = glyph.dlsb + if dlsb then + xmin = xmin + dlsb + glyph.dlsb = nil -- save space + end + -- glyph.boundingbox = { round(xmin), round(ymin), round(xmax), round(ymax) } end end @@ -829,8 +988,8 @@ local function readglyph(f,nofcontours) -- read deltas here, saves space local x = 0 for i=1,nofpoints do local flag = flags[i] - -- local short = band(flag,0x04) ~= 0 - -- local same = band(flag,0x20) ~= 0 + -- local short = band(flag,0x02) ~= 0 + -- local same = band(flag,0x10) ~= 0 if band(flag,0x02) ~= 0 then if band(flag,0x10) ~= 0 then x = x + readbyte(f) @@ -930,13 +1089,13 @@ local function readcomposite(f) yoffset = yoffset * yscale end elseif band(flags,0x0080) ~= 0 then -- f_matrix - xscale = read2dot14(f) - xrotate = read2dot14(f) - yrotate = read2dot14(f) - yscale = read2dot14(f) + xscale = read2dot14(f) -- xxpart + xrotate = read2dot14(f) -- yxpart + yrotate = read2dot14(f) -- xypart + yscale = read2dot14(f) -- yypart if f_xyarg and f_offset then - xoffset = xoffset * sqrt(xscale ^2 + xrotate^2) - yoffset = yoffset * sqrt(yrotate^2 + yscale ^2) + xoffset = xoffset * sqrt(xscale ^2 + yrotate^2) -- was xrotate + yoffset = yoffset * sqrt(xrotate^2 + yscale ^2) -- was yrotate end end nofcomponents = nofcomponents + 1 @@ -1119,50 +1278,6 @@ end local function readdeltas(f,nofpoints) local deltas = { } local p = 0 - local z = 0 - while nofpoints > 0 do - local control = readbyte(f) -if not control then - break -end - local allzero = band(control,0x80) ~= 0 - local runlength = band(control,0x3F) + 1 - if allzero then - z = z + runlength - else - local runreader = band(control,0x40) ~= 0 and readshort or readinteger - if z > 0 then - for i=1,z do - p = p + 1 - deltas[p] = 0 - end - z = 0 - end - for i=1,runlength do - p = p + 1 - deltas[p] = runreader(f) - end - end - nofpoints = nofpoints - runlength - end - -- saves space --- if z > 0 then --- for i=1,z do --- p = p + 1 --- deltas[p] = 0 --- end --- end - if p > 0 then - -- forget about trailing zeros - return deltas - else - -- forget about all zeros - end -end - -local function readdeltas(f,nofpoints) - local deltas = { } - local p = 0 while nofpoints > 0 do local control = readbyte(f) if control then @@ -1330,7 +1445,8 @@ function readers.gvar(f,fontdata,specification,glyphdata,shapedata) -- local start = start and start[i] or 0 -- local stop = stop and stop [i] or 0 local start = start and start[i] or (peak < 0 and peak or 0) - local stop = stop and stop [i] or (peak > 0 and peak or 0) + local stop = stop and stop [i] or (peak > 0 and peak or 0) -- or 1 ? +-- local stop = stop and stop [i] or (peak > 0 and peak or 1) -- or 1 ? -- do we really need these tests ... can't we assume sane values if start > peak or peak > stop then -- * 1 @@ -1343,7 +1459,6 @@ function readers.gvar(f,fontdata,specification,glyphdata,shapedata) s = 0 break elseif f < peak then --- s = - s * (f - start) / (peak - start) s = s * (f - start) / (peak - start) elseif f > peak then s = s * (stop - f) / (stop - peak) diff --git a/Master/texmf-dist/tex/context/base/mkiv/font-txt.lua b/Master/texmf-dist/tex/context/base/mkiv/font-txt.lua new file mode 100644 index 00000000000..b8614c8f565 --- /dev/null +++ b/Master/texmf-dist/tex/context/base/mkiv/font-txt.lua @@ -0,0 +1,553 @@ +if not modules then modules = { } end modules ['font-txt'] = { + version = 1.001, + comment = "companion to font-ini.mkiv", + original = "derived from a prototype by Kai Eigner", + author = "Hans Hagen", -- so don't blame KE + copyright = "TAT Zetwerk / PRAGMA ADE / ConTeXt Development Team", + license = "see context related readme files" +} + +-- The next code is derived from a snippet handler prototype by Kai Eigner and +-- resembles the main loop of the Lua font handler but I decided use a more generic +-- (and pluggable) approach and not hook it into the already present opentype +-- handler. This is cleaner as it cannot interfere with the Lua font processor +-- (which does some more things) and is also better performance wise. It also makes +-- it possible to support other handlers as history has proven that there are no +-- universal solution in computer land. Most of the disc logic is kept but done +-- slightly different. +-- +-- The code is heavily optimized and generalized so there can be errors. As +-- mentioned, the plug mode can be used for alternative font handlers. A font is +-- still loaded but the node and base mode handlers are ignored. Plugins are +-- unlikely to work well in context as they can mess up attribute driven subsystem, +-- so they are not officially supported. The language and script options are +-- available in the usual way. +-- +-- The code collects snippets, either or not with spacing around them and partially +-- running over disc nodes. The r2l "don't assume disc and collect larger chunks" is +-- not robust so I got rid of that branch. This is somewhat similar to the Lua font +-- handler. +-- +-- An alternative is to run over longer strings with dummy chars (unicode objects) as +-- markers for whatever is in the list but that becomes tricky with mixed fonts and +-- reconstruction becomes a bit of a mess then, especially because disc nodes force +-- us to backtrack and look at several solutions. It also has a larger memory +-- footprint. Some tests demonstrated that it has no gain and only adds complexity. +-- +-- This (derived) variant is better suited for context and seems to work ok in the +-- generic variant. I also added some context specific tracing to the code. This +-- variant uses the plug model provided in the context font system. So, in context, +-- using the built in Lua handler is the better alternative, also because it has +-- extensive tracing features. Context users would loose additional functionality +-- that has been provided for a decade and therefore plugins are not officially +-- supported (at least not by me, unless I use them myself). +-- +-- There is no checking here for already processed characters so best not mix this +-- variant with code that does similar things. If this code evolves depends on the +-- useability. Kai's code can now be found on github where it is used with a harfbuzz +-- library. We add this kind of stuff because occasionally we compare engines and +-- Kai sends me examples and I then need to check context. +-- +-- One important difference between Kai's approach and the one used in ConTeXt is +-- that we use utf-32 instead of utf-8. Once I figured out that clusters were just +-- indices into the original text that made more sense. The first implementation +-- used the command line tool (binary), then I went for ffi (library). +-- +-- Beware: this file only implements the framework for plugins. Plugins themselves +-- are in other files (e.g. font-phb*.lua). On the todo list is a uniscribe plugin +-- because that is after all the reference for opentype support, but that interface +-- needs a bit more work (so it might never happen). +-- +-- Usage: see m-fonts-plugins.mkiv. As it's a nice test for ffi support that file +-- migth be added to the distribution somewhere in the middle of 2017 when the ffi +-- interface has been tested a bit more. Okay, it's 2012 now and we're way past that +-- date but we never had a reason for adding it to the ConTeXt distribution. It +-- should still work okay because I occasionally checked it against progress made in +-- the engines and used newer helpers. +-- +-- Here is an example of usage: +-- +-- \starttext +-- \definefontfeature[test][mode=plug,features=text] +-- \start +-- \showfontkerns +-- \definedfont[Serif*test] +-- \input tufte \par +-- \stop +-- \stoptext + +local fonts = fonts +local otf = fonts.handlers.otf +local nodes = nodes + +local utfchar = utf.char + +local nuts = nodes.nuts + +local getnext = nuts.getnext +local setnext = nuts.setnext +local getprev = nuts.getprev +local setprev = nuts.setprev +local getid = nuts.getid +local getsubtype = nuts.getsubtype +local getfont = nuts.getfont +local getchar = nuts.getchar +local getdisc = nuts.getdisc +local setdisc = nuts.setdisc +local getboth = nuts.getboth +local setlink = nuts.setlink +local getkern = nuts.getkern +local getwidth = nuts.getwidth + +local ischar = nuts.ischar +local isglyph = nuts.isglyph +local usesfont = nuts.usesfont + +local copy_node_list = nuts.copylist +local find_node_tail = nuts.tail +local flushlist = nuts.flushlist +local freenode = nuts.free +local endofmath = nuts.endofmath + +local startofpar = nuts.startofpar + +local nodecodes = nodes.nodecodes + +local glyph_code = nodecodes.glyph +local glue_code = nodecodes.glue +local disc_code = nodecodes.disc +local kern_code = nodecodes.kern +local math_code = nodecodes.math +local dir_code = nodecodes.dir +local par_code = nodecodes.par + +local righttoleft_code = nodes.dirvalues.righttoleft + +local txtdirstate = otf.helpers.txtdirstate +local pardirstate = otf.helpers.pardirstate + +local fonthashes = fonts.hashes +local fontdata = fonthashes.identifiers + +local function deletedisc(head) + local current = head + local next = nil + while current do + next = getnext(current) + if getid(current) == disc_code then + local pre, post, replace, pre_tail, post_tail, replace_tail = getdisc(current,true) + setdisc(current) + if pre then + flushlist(pre) + end + if post then + flushlist(post) + end + local p, n = getboth(current) + if replace then + if current == head then + head = replace + setprev(replace) -- already nil + else + setlink(p,replace) + end + setlink(replace_tail,n) -- was: setlink(n,replace_tail) + elseif current == head then + head = n + setprev(n) + else + setlink(p,n) + end + freenode(current) + end + current = next + end + return head +end + +-- As we know that we have the same font we can probably optimize this a bit more. +-- Although we can have more in disc nodes than characters and kerns we only support +-- those two types. + +local function eqnode(n,m) -- no real improvement in speed + local n_char = isglyph(n) + if n_char then + return n_char == ischar(m,getfont(n)) + elseif n_id == kern_code then + return getkern(n) == getkern(m) + end +end + +local function equalnode(n,m) + if not n then + return not m + elseif not m then + return false + end + local n_char, n_id = isglyph(n) + if n_char then + return n_char == ischar(m,n_id) -- n_id == n_font + elseif n_id == whatsit_code then + return false + elseif n_id == glue_code then + return true + elseif n_id == kern_code then + return getkern(n) == getkern(m) + elseif n_id == disc_code then + local n_pre, n_post, n_replace = getdisc(n) + local m_pre, m_post, m_replace = getdisc(m) + while n_pre and m_pre do + if not eqnode(n_pre,m_pre) then + return false + end + n_pre = getnext(n_pre) + m_pre = getnext(m_pre) + end + if n_pre or m_pre then + return false + end + while n_post and m_post do + if not eqnode(n_post,m_post) then + return false + end + n_post = getnext(n_post) + m_post = getnext(m_post) + end + if n_post or m_post then + return false + end + while n_replace and m_replace do + if not eqnode(n_replace,m_replace) then + return false + end + n_replace = getnext(n_replace) + m_replace = getnext(m_replace) + end + if n_replace or m_replace then + return false + end + return true + end + return false +end + +-- The spacing hackery is not nice. The text can get leading and trailing spaces +-- and even mid spaces while the start and stop nodes not always are glues then +-- so the plugin really needs to do some testing there. We could pass more context +-- but it doesn't become much better. +-- +-- The attribute gets passed for tracing purposes. We could support it (not that +-- hard to do) but as we don't test strickly for fonts (in disc nodes) we are not +-- compatible anyway. It would also mean more testing. So, don't use this mixed +-- with node and base mode in context. +-- +-- We don't distinguish between modes in treatment (so no r2l assumptions) and +-- no cheats for scripts that might not use discretionaries. Such hacks can work +-- in predictable cases but in context one can use a mix all kind of things and +-- users do that. On the other hand, we do support longer glyph runs in both modes +-- so there we gain a bit. + +do + + local function texthandler(head,font,dynamic,rlmode,handler,startspacing,stopspacing,nesting) + if not head then + return + end + if startspacing == nil then + startspacing = false + end + if stopspacing == nil then + stopspacing = false + end + + if getid(head) == par_code and startofpar(head) then + rlmode = pardirstate(head) + elseif rlmode == righttoleft_code then + rlmode = -1 + else + rlmode = 0 + end + + local dirstack = { } + local rlparmode = 0 + local topstack = 0 + local text = { } + local size = 0 + local current = head + local start = nil + local stop = nil + local startrlmode = rlmode + + local function handle(leading,trailing) -- what gets passed can become configureable: e.g. utf 8 + local stop = current or start -- hm, what with outer stop + if getid(stop) ~= glyph_code then + stop = getprev(stop) + end + head = handler(head,font,dynamic,rlmode,start,stop,text,leading,trailing) -- handler can adapt text + size = 0 + text = { } + start = nil + end + + while current do + local char, id = ischar(current,font) + if char then + if not start then + start = current + startrlmode = rlmode + end + local char = getchar(current) + size = size + 1 + text[size] = char + current = getnext(current) + elseif char == false then + -- so a mixed font + if start and size > 0 then + handle(startspacing,false) + end + startspacing = false + current = getnext(current) + elseif id == glue_code then + -- making this branch optional i.e. always use the else doesn't really + -- make a difference in performance (in hb) .. tricky anyway as we can + local width = getwidth(current) + if width > 0 then + if start and size > 0 then + handle(startspacing,true) + end + startspacing = true + stopspacing = false + else + if start and size > 0 then + head = handle(startspacing) + end + startspacing = false + stopspacing = false + end + current = getnext(current) + elseif id == disc_code and usesfont(current,font) then -- foo|-|bar : has hbox + -- This looks much like the original code but I don't see a need to optimize + -- for e.g. deva or r2l fonts. If there are no disc nodes then we won't see + -- this branch anyway and if there are, we should just deal with them. + -- + -- There is still some weird code here ... start/stop and such. When I'm in + -- the mood (or see a need) I'll rewrite this bit. + + -- bug: disc in last word moves to end (in practice not an issue as one + -- doesn't want a break there) + + local pre = nil + local post = nil + local currentnext = getnext(current) + local current_pre, current_post, current_replace = getdisc(current) + setdisc(current) -- why, we set it later + if start then + pre = copy_node_list(start,current) + stop = getprev(current) + -- why also current and not: + -- pre = copy_node_list(start,stop) + if start == head then + head = current + end + setlink(getprev(start),current) + setlink(stop,current_pre) + current_pre = start + setprev(current_pre) + start = nil + stop = nil + startrlmode = rlmode + end + while currentnext do + local char, id = ischar(currentnext,font) + if char or id == disc_code then + stop = currentnext + currentnext = getnext(currentnext) + elseif id == glue_code then + local width = getwidth(currentnext) + if width and width > 0 then + stopspacing = true + else + stopspacing = false + end + break + else + break + end + end + if stop then + local currentnext = getnext(current) + local stopnext = getnext(stop) + post = copy_node_list(currentnext,stopnext) + if current_post then + setlink(find_node_tail(current_post),currentnext) + else + setprev(currentnext) + current_post = currentnext + end + setlink(current,stopnext) + setnext(stop) + stop = nil + end + if pre then + setlink(find_node_tail(pre),current_replace) + current_replace = pre + pre = nil + end + if post then + if current_replace then + setlink(find_node_tail(current_replace),post) + else + current_replace = post + end + post = nil + end + size = 0 -- hm, ok, start is also nil now + text = { } + if current_pre then + current_pre = texthandler(current_pre,font,dynamic,rlmode,handler,startspacing,false,"pre") + end + if current_post then + current_post = texthandler(current_post,font,dynamic,rlmode,handler,false,stopspacing,"post") + end + if current_replace then + current_replace = texthandler(current_replace,font,dynamic,rlmode,handler,startspacing,stopspacing,"replace") + end + startspacing = false + stopspacing = false + local cpost = current_post and find_node_tail(current_post) + local creplace = current_replace and find_node_tail(current_replace) + local cpostnew = nil + local creplacenew = nil + local newcurrent = nil + while cpost and equalnode(cpost,creplace) do + cpostnew = cpost + creplacenew = creplace + if creplace then + creplace = getprev(creplace) + end + cpost = getprev(cpost) + end + if cpostnew then + if cpostnew == current_post then + current_post = nil + else + setnext(getprev(cpostnew)) + end + flushlist(cpostnew) + if creplacenew == current_replace then + current_replace = nil + else + setnext(getprev(creplacenew)) + end + local c = getnext(current) + setlink(current,creplacenew) + local creplacenewtail = find_node_tail(creplacenew) + setlink(creplacenewtail,c) + newcurrent = creplacenewtail + end + current_post = current_post and deletedisc(current_post) + current_replace = current_replace and deletedisc(current_replace) + local cpre = current_pre + local creplace = current_replace + local cprenew = nil + local creplacenew = nil + while cpre and equalnode(cpre, creplace) do + cprenew = cpre + creplacenew = creplace + if creplace then + creplace = getnext(creplace) + end + cpre = getnext(cpre) + end + if cprenew then + cpre = current_pre + current_pre = getnext(cprenew) + if current_pre then + setprev(current_pre) + end + setnext(cprenew) + flushlist(cpre) + creplace = current_replace + current_replace = getnext(creplacenew) + if current_replace then + setprev(current_replace) + end + setlink(getprev(current),creplace) + if current == head then + head = creplace + end + setlink(creplacenew,current) + end + setdisc(current,current_pre,current_post,current_replace) + current = currentnext + else + if start and size > 0 then + handle(startspacing,stopspacing) + end + startspacing = false + stopspacing = false + if id == math_code then + current = getnext(endofmath(current)) + elseif id == dir_code then + startspacing = false + topstack, rlmode = txtdirstate(current,dirstack,topstack,rlparmode) + current = getnext(current) + -- elseif id == par_code and startofpar(current) then + -- startspacing = false + -- rlparmode, rlmode = pardirstate(current) + -- current = getnext(current) + else + current = getnext(current) + end + end + end + if start and size > 0 then + handle(startspacing,stopspacing) + end + return head, true + end + + function fonts.handlers.otf.texthandler(head,font,dynamic,direction,action) + if action then + return texthandler(head,font,dynamic,direction == righttoleft_code and -1 or 0,action) + else + return head, false + end + end + + -- Next comes a tracer plug into context. + + ----- texthandler = fonts.handlers.otf.texthandler + local report_text = logs.reporter("otf plugin","text") + local nofruns = 0 + local nofsnippets = 0 + local f_unicode = string.formatters["%U"] + + local function showtext(head,font,dynamic,rlmode,start,stop,list,before,after) + if list then + nofsnippets = nofsnippets + 1 + local plus = { } + for i=1,#list do + local u = list[i] + list[i] = utfchar(u) + plus[i] = f_unicode(u) + end + report_text("%03i : [%s] %t [%s]-> % t", nofsnippets, before and "+" or "-", list, after and "+" or "-", plus) + else + report_text() + report_text("invalid list") + report_text() + end + return head, false + end + + fonts.handlers.otf.registerplugin("text",function(head,font,dynamic,direction) + nofruns = nofruns + 1 + nofsnippets = 0 + report_text("start run %i",nofruns) + local h, d = texthandler(head,font,dynamic,direction,showtext) + report_text("stop run %i",nofruns) + return h, d + end) + +end diff --git a/Master/texmf-dist/tex/context/base/mkiv/good-gen.lua b/Master/texmf-dist/tex/context/base/mkiv/good-gen.lua index cee6b317211..1747727c177 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/good-gen.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/good-gen.lua @@ -10,7 +10,7 @@ if not modules then modules = { } end modules ['good-gen'] = { local type, next = type, next local lower = string.lower - +local filesuffix, replacesuffix = file.suffix, file.replacesuffix local fonts = fonts ----- trace_goodies = false trackers.register("fonts.goodies", function(v) trace_goodies = v end) @@ -134,6 +134,16 @@ function fontgoodies.filenames.resolve(name) return fn end end + elseif filesuffix(name) == "any" then + -- This is a bit weird place but it's a kind of fallback option in case + -- we can't resolve due to a name conflict. + local sequence = fonts.readers.sequence + for i=1,#sequence do + local fn = replacesuffix(name,sequence[i]) + if findfile(fn) ~= "" then + return fn + end + end else -- no lookup, just use the regular mechanism end diff --git a/Master/texmf-dist/tex/context/base/mkiv/good-ini.lua b/Master/texmf-dist/tex/context/base/mkiv/good-ini.lua index 22ca12d28c6..df79adb61c3 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/good-ini.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/good-ini.lua @@ -150,7 +150,9 @@ end local function flattenedfeatures(t,tt) -- first set value dominates - local tt = tt or { } + if not tt then + tt = { } + end for i=1,#t do local ti = t[i] local ty = type(ti) diff --git a/Master/texmf-dist/tex/context/base/mkiv/good-mth.lua b/Master/texmf-dist/tex/context/base/mkiv/good-mth.lua index 3473cc205c4..e25782e9ea6 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/good-mth.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/good-mth.lua @@ -1,4 +1,4 @@ -if not modules then modules = { } end modules ['good-mth'] = { + if not modules then modules = { } end modules ['good-mth'] = { version = 1.000, comment = "companion to font-lib.mkiv", author = "Hans Hagen, PRAGMA-ADE, Hasselt NL", @@ -36,7 +36,7 @@ local new_glyph = nodepool.glyph local new_hlist = nodepool.hlist local new_vlist = nodepool.vlist -local insert_node_after = nuts.insert_after +local insertnodeafter = nuts.insertafter local helpers = fonts.helpers local upcommand = helpers.commands.up @@ -47,151 +47,151 @@ local prependcommands = helpers.prependcommands -- experiment, we have to load the definitions immediately as they precede -- the definition so they need to be initialized in the typescript -local function withscriptcode(tfmdata,unicode,data,action) - if type(unicode) == "string" then - local p, u = match(unicode,"^(.-):(.-)$") - if u then - u = tonumber(u) - if u then - local slots = fonts.helpers.mathscriptslots(tfmdata,u) - if slots then - if p == "*" then - action(u,data) - for i=1,#slots do - action(slots[i],data) - end - else - p = tonumber(p) - if p then - action(slots[p],data) - end - end - end - end - end - else - action(unicode,data) - end -end - -local function finalize(tfmdata,feature,value) --- if tfmdata.mathparameters then -- funny, cambria text has this - local goodies = tfmdata.goodies - if goodies then - local virtualized = mathematics.virtualized - for i=1,#goodies do - local goodie = goodies[i] - local mathematics = goodie.mathematics - local dimensions = mathematics and mathematics.dimensions - if dimensions then - if trace_defining then - report_math("overloading dimensions in %a @ %p",tfmdata.properties.fullname,tfmdata.parameters.size) - end - local characters = tfmdata.characters - local descriptions = tfmdata.descriptions - local parameters = tfmdata.parameters - local factor = parameters.factor - local hfactor = parameters.hfactor - local vfactor = parameters.vfactor - local function overloadone(unicode,data) - local character = characters[unicode] - if not character then - local c = virtualized[unicode] - if c then - character = characters[c] - end - end - if character then - local width = data.width - local height = data.height - local depth = data.depth - if trace_defining and (width or height or depth) then - report_math("overloading dimensions of %C, width %p, height %p, depth %p", - unicode,width or 0,height or 0,depth or 0) - end - if width then character.width = width * hfactor end - if height then character.height = height * vfactor end - if depth then character.depth = depth * vfactor end - -- - local xoffset = data.xoffset - local yoffset = data.yoffset - if xoffset == "llx" then - local d = descriptions[unicode] - if d then - xoffset = - d.boundingbox[1] * hfactor - character.width = character.width + xoffset - xoffset = rightcommand[xoffset] - else - xoffset = nil - end - elseif xoffset and xoffset ~= 0 then - xoffset = rightcommand[xoffset * hfactor] - else - xoffset = nil - end - if yoffset and yoffset ~= 0 then - yoffset = upcommand[yoffset * vfactor] - else - yoffset = nil - end - if xoffset or yoffset then - local commands = characters.commands - if commands then - prependcommands(commands,yoffset,xoffset) - else - local slot = charcommand[unicode] - if xoffset and yoffset then - character.commands = { xoffset, yoffset, slot } - elseif xoffset then - character.commands = { xoffset, slot } - else - character.commands = { yoffset, slot } - end - end - end - elseif trace_defining then - report_math("no overloading dimensions of %C, not in font",unicode) - end - end - local function overload(dimensions) - for unicode, data in next, dimensions do - withscriptcode(tfmdata,unicode,data,overloadone) - end - end - if value == nil then - value = { "default" } - end - if value == "all" or value == true then - for name, value in next, dimensions do - overload(value) - end - else - if type(value) == "string" then - value = utilities.parsers.settings_to_array(value) - end - if type(value) == "table" then - for i=1,#value do - local d = dimensions[value[i]] - if d then - overload(d) - end - end - end - end - end - end - end -end +-- local function withscriptcode(tfmdata,unicode,data,action) +-- if type(unicode) == "string" then +-- local p, u = match(unicode,"^(.-):(.-)$") +-- if u then +-- u = tonumber(u) +-- if u then +-- local slots = fonts.helpers.mathscriptslots(tfmdata,u) +-- if slots then +-- if p == "*" then +-- action(u,data) +-- for i=1,#slots do +-- action(slots[i],data) +-- end +-- else +-- p = tonumber(p) +-- if p then +-- action(slots[p],data) +-- end +-- end +-- end +-- end +-- end +-- else +-- action(unicode,data) +-- end +-- end -registerotffeature { - name = "mathdimensions", - description = "manipulate math dimensions", - -- default = true, - manipulators = { - base = finalize, - node = finalize, - } -} +-- local function finalize(tfmdata,feature,value) +-- -- if tfmdata.mathparameters then -- funny, cambria text has this +-- local goodies = tfmdata.goodies +-- if goodies then +-- local virtualized = mathematics.virtualized +-- for i=1,#goodies do +-- local goodie = goodies[i] +-- local mathematics = goodie.mathematics +-- local dimensions = mathematics and mathematics.dimensions +-- if dimensions then +-- if trace_defining then +-- report_math("overloading dimensions in %a @ %p",tfmdata.properties.fullname,tfmdata.parameters.size) +-- end +-- local characters = tfmdata.characters +-- local descriptions = tfmdata.descriptions +-- local parameters = tfmdata.parameters +-- local factor = parameters.factor +-- local hfactor = parameters.hfactor +-- local vfactor = parameters.vfactor +-- local function overloadone(unicode,data) +-- local character = characters[unicode] +-- if not character then +-- local c = virtualized[unicode] +-- if c then +-- character = characters[c] +-- end +-- end +-- if character then +-- local width = data.width +-- local height = data.height +-- local depth = data.depth +-- if trace_defining and (width or height or depth) then +-- report_math("overloading dimensions of %C, width %p, height %p, depth %p", +-- unicode,width or 0,height or 0,depth or 0) +-- end +-- if width then character.width = width * hfactor end +-- if height then character.height = height * vfactor end +-- if depth then character.depth = depth * vfactor end +-- -- +-- local xoffset = data.xoffset +-- local yoffset = data.yoffset +-- if xoffset == "llx" then +-- local d = descriptions[unicode] +-- if d then +-- xoffset = - d.boundingbox[1] * hfactor +-- character.width = character.width + xoffset +-- xoffset = rightcommand[xoffset] +-- else +-- xoffset = nil +-- end +-- elseif xoffset and xoffset ~= 0 then +-- xoffset = rightcommand[xoffset * hfactor] +-- else +-- xoffset = nil +-- end +-- if yoffset and yoffset ~= 0 then +-- yoffset = upcommand[yoffset * vfactor] +-- else +-- yoffset = nil +-- end +-- if xoffset or yoffset then +-- local commands = character.commands +-- if commands then +-- prependcommands(commands,yoffset,xoffset) +-- else +-- local slot = charcommand[unicode] +-- if xoffset and yoffset then +-- character.commands = { xoffset, yoffset, slot } +-- elseif xoffset then +-- character.commands = { xoffset, slot } +-- else +-- character.commands = { yoffset, slot } +-- end +-- end +-- end +-- elseif trace_defining then +-- report_math("no overloading dimensions of %C, not in font",unicode) +-- end +-- end +-- local function overload(dimensions) +-- for unicode, data in next, dimensions do +-- withscriptcode(tfmdata,unicode,data,overloadone) +-- end +-- end +-- if value == nil then +-- value = { "default" } +-- end +-- if value == "all" or value == true then +-- for name, value in next, dimensions do +-- overload(value) +-- end +-- else +-- if type(value) == "string" then +-- value = utilities.parsers.settings_to_array(value) +-- end +-- if type(value) == "table" then +-- for i=1,#value do +-- local d = dimensions[value[i]] +-- if d then +-- overload(d) +-- end +-- end +-- end +-- end +-- end +-- end +-- end +-- end +-- +-- registerotffeature { +-- name = "mathdimensions", +-- description = "manipulate math dimensions", +-- -- default = true, +-- manipulators = { +-- base = finalize, +-- node = finalize, +-- } +-- } local function initialize(goodies) local mathgoodies = goodies.mathematics @@ -222,119 +222,117 @@ fontgoodies.register("mathematics", initialize) -- local enabled = false directives.register("fontgoodies.mathkerning",function(v) enabled = v end) -local function initialize(tfmdata) --- if enabled and tfmdata.mathparameters then -- funny, cambria text has this - if tfmdata.mathparameters then -- funny, cambria text has this - local goodies = tfmdata.goodies - if goodies then - local characters = tfmdata.characters - if characters[0x1D44E] then -- 119886 - -- we have at least an italic a - for i=1,#goodies do - local mathgoodies = goodies[i].mathematics - if mathgoodies then - local kerns = mathgoodies.kerns - if kerns then - local function kernone(unicode,data) - local chardata = characters[unicode] - if chardata and (not chardata.mathkerns or data.force) then - chardata.mathkerns = data - end - end - for unicode, data in next, kerns do - withscriptcode(tfmdata,unicode,data,kernone) - end - return - end - end - end - else - return -- no proper math font anyway - end - end - end -end - -registerotffeature { - name = "mathkerns", - description = "math kerns", - -- default = true, - initializers = { - base = initialize, - node = initialize, - } -} - --- math italics (not really needed) +-- local function initialize(tfmdata) +-- -- if enabled and tfmdata.mathparameters then -- funny, cambria text has this +-- if tfmdata.mathparameters then -- funny, cambria text has this +-- local goodies = tfmdata.goodies +-- if goodies then +-- local characters = tfmdata.characters +-- if characters[0x1D44E] then -- 119886 +-- -- we have at least an italic a +-- for i=1,#goodies do +-- local mathgoodies = goodies[i].mathematics +-- if mathgoodies then +-- local kerns = mathgoodies.kerns +-- if kerns then +-- local function kernone(unicode,data) +-- local chardata = characters[unicode] +-- if chardata and (not chardata.mathkerns or data.force) then +-- chardata.mathkerns = data +-- end +-- end +-- for unicode, data in next, kerns do +-- withscriptcode(tfmdata,unicode,data,kernone) +-- end +-- return +-- end +-- end +-- end +-- else +-- return -- no proper math font anyway +-- end +-- end +-- end +-- end -- --- it would be nice to have a \noitalics\font option +-- registerotffeature { +-- name = "mathkerns", +-- description = "math kerns", +-- -- default = true, +-- initializers = { +-- base = initialize, +-- node = initialize, +-- } +-- } -local function initialize(tfmdata) - local goodies = tfmdata.goodies - if goodies then - local shared = tfmdata.shared - for i=1,#goodies do - local mathgoodies = goodies[i].mathematics - if mathgoodies then - local mathitalics = mathgoodies.italics - if mathitalics then - local properties = tfmdata.properties - if properties.setitalics then - mathitalics = mathitalics[file.nameonly(properties.name)] or mathitalics - if mathitalics then - if trace_goodies then - report_goodies("loading mathitalics for font %a",properties.name) - end - local corrections = mathitalics.corrections - local defaultfactor = mathitalics.defaultfactor - -- properties.mathitalic_defaultfactor = defaultfactor -- we inherit outer one anyway (name will change) - if corrections then - fontgoodies.registerpostprocessor(tfmdata, function(tfmdata) -- this is another tfmdata (a copy) - -- better make a helper so that we have less code being defined - local properties = tfmdata.properties - local parameters = tfmdata.parameters - local characters = tfmdata.characters - properties.mathitalic_defaultfactor = defaultfactor - properties.mathitalic_defaultvalue = defaultfactor * parameters.quad - if trace_goodies then - report_goodies("assigning mathitalics for font %a",properties.name) - end - local quad = parameters.quad - local hfactor = parameters.hfactor - for k, v in next, corrections do - local c = characters[k] - if c then - if v > -1 and v < 1 then - c.italic = v * quad - else - c.italic = v * hfactor - end - else - report_goodies("invalid mathitalics entry %U for font %a",k,properties.name) - end - end - end) - end - return -- maybe not as these can accumulate - end - end - end - end - end - end -end - -registerotffeature { - name = "mathitalics", - description = "additional math italic corrections", - -- default = true, - initializers = { - base = initialize, - node = initialize, - } -} - --- fontgoodies.register("mathitalics", initialize) +-- -- math italics (not really needed) +-- -- +-- -- it would be nice to have a \noitalics\font option +-- +-- local function initialize(tfmdata) +-- local goodies = tfmdata.goodies +-- if goodies then +-- local shared = tfmdata.shared +-- for i=1,#goodies do +-- local mathgoodies = goodies[i].mathematics +-- if mathgoodies then +-- local mathitalics = mathgoodies.italics +-- if mathitalics then +-- local properties = tfmdata.properties +-- if properties.setitalics then +-- mathitalics = mathitalics[file.nameonly(properties.name)] or mathitalics +-- if mathitalics then +-- if trace_goodies then +-- report_goodies("loading mathitalics for font %a",properties.name) +-- end +-- local corrections = mathitalics.corrections +-- local defaultfactor = mathitalics.defaultfactor +-- -- properties.mathitalic_defaultfactor = defaultfactor -- we inherit outer one anyway (name will change) +-- if corrections then +-- fontgoodies.registerpostprocessor(tfmdata, function(tfmdata) -- this is another tfmdata (a copy) +-- -- better make a helper so that we have less code being defined +-- local properties = tfmdata.properties +-- local parameters = tfmdata.parameters +-- local characters = tfmdata.characters +-- properties.mathitalic_defaultfactor = defaultfactor +-- properties.mathitalic_defaultvalue = defaultfactor * parameters.quad +-- if trace_goodies then +-- report_goodies("assigning mathitalics for font %a",properties.name) +-- end +-- local quad = parameters.quad +-- local hfactor = parameters.hfactor +-- for k, v in next, corrections do +-- local c = characters[k] +-- if c then +-- if v > -1 and v < 1 then +-- c.italic = v * quad +-- else +-- c.italic = v * hfactor +-- end +-- else +-- report_goodies("invalid mathitalics entry %U for font %a",k,properties.name) +-- end +-- end +-- end) +-- end +-- return -- maybe not as these can accumulate +-- end +-- end +-- end +-- end +-- end +-- end +-- end +-- +-- registerotffeature { +-- name = "mathitalics", +-- description = "additional math italic corrections", +-- -- default = true, +-- initializers = { +-- base = initialize, +-- node = initialize, +-- } +-- } local function mathradicalaction(n,h,v,font,mchar,echar) local characters = fontcharacters[font] @@ -361,7 +359,7 @@ local function mathradicalaction(n,h,v,font,mchar,echar) local kern = new_kern(height-v) list = setlink(kern,list) local list = new_vlist(kern) - insert_node_after(n,n,list) + insertnodeafter(n,n,list) end local function mathhruleaction(n,h,v,font,bchar,mchar,echar) @@ -397,7 +395,7 @@ local function mathhruleaction(n,h,v,font,bchar,mchar,echar) local kern = new_kern(height-v) list = setlink(kern,list) local list = new_vlist(kern) - insert_node_after(n,n,list) + insertnodeafter(n,n,list) end local function initialize(tfmdata) diff --git a/Master/texmf-dist/tex/context/base/mkiv/grph-con.lua b/Master/texmf-dist/tex/context/base/mkiv/grph-con.lua index b3d39f0bd93..fdae2223bda 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/grph-con.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/grph-con.lua @@ -29,6 +29,7 @@ local variables = interfaces.variables local v_high = variables.high local v_low = variables.low local v_medium = variables.medium +local v_yes = variables.yes local figures = figures @@ -48,6 +49,10 @@ do -- eps | ps local epsconverter = converters.eps converters.ps = epsconverter + local function gscrop(specification) + return (specification and specification.crop == v_yes) and "-dEPSCrop" or "" + end + local resolutions = { [v_low] = "screen", [v_medium] = "ebook", @@ -68,7 +73,7 @@ do -- eps | ps -dBATCH -dAutoRotatePages=/None -dPDFSETTINGS=/%presets% - -dEPSCrop + %crop% -dCompatibilityLevel=%level% -sOutputFile=%newname% %colorspace% @@ -81,6 +86,7 @@ do -- eps | ps presets = "string", level = "string", colorspace = "string", + -- crop = "string", }, } @@ -119,7 +125,7 @@ do -- eps | ps return tmpname end - function epsconverter.pdf(oldname,newname,resolution,colorspace) -- the resolution interface might change + function epsconverter.pdf(oldname,newname,resolution,colorspace,specification) -- the resolution interface might change local presets = resolutions[resolution or "high"] or resolutions.high local level = codeinjections.getformatoption("pdf_level") or "1.3" local tmpname = oldname @@ -141,13 +147,14 @@ do -- eps | ps presets = presets, level = tostring(level), colorspace = colorspace, + crop = gscrop(specification), } if tmpname ~= oldname then os.remove(tmpname) end end - epsconverter["gray.pdf"] = function(oldname,newname,resolution) -- the resolution interface might change + epsconverter["gray.pdf"] = function(oldname,newname,resolution,_,specification) -- the resolution interface might change epsconverter.pdf(oldname,newname,resolution,"gray") end @@ -211,11 +218,16 @@ do -- svg return new and "filename" or suffix end + local function inkscapecrop(specification) + return (specification and specification.crop == v_yes) and "--export-area-drawing" or "" + end + local runner = sandbox.registerrunner { name = "svg to something", program = "inkscape", template = longtostring [[ %oldname% + %crop% --export-dpi=%resolution% --export-%format%=%newname% ]], @@ -226,7 +238,7 @@ do -- svg resolution = "string", }, defaults = { - format = format, + format = "pdf", resolution = "600", } } @@ -235,10 +247,11 @@ do -- svg runner = runner, } - function svgconverter.pdf(oldname,newname) + function svgconverter.pdf(oldname,newname,resolution,arguments,specification) runner { format = inkscapeformat("pdf"), resolution = "600", + crop = inkscapecrop(specification), newname = expandfilename(newname), oldname = expandfilename(oldname), } @@ -248,6 +261,7 @@ do -- svg runner { format = inkscapeformat("png"), resolution = "600", + crop = inkscapecrop(specification), newname = expandfilename(newname), oldname = expandfilename(oldname), } diff --git a/Master/texmf-dist/tex/context/base/mkiv/grph-epd.lua b/Master/texmf-dist/tex/context/base/mkiv/grph-epd.lua deleted file mode 100644 index 0993270f14a..00000000000 --- a/Master/texmf-dist/tex/context/base/mkiv/grph-epd.lua +++ /dev/null @@ -1,55 +0,0 @@ -if not modules then modules = { } end modules ['grph-epd'] = { - version = 1.001, - comment = "companion to grph-epd.mkiv", - author = "Hans Hagen, PRAGMA-ADE, Hasselt NL", - copyright = "PRAGMA ADE / ConTeXt Development Team", - license = "see context related readme files" -} - -local variables = interfaces.variables -local settings_to_hash = utilities.parsers.settings_to_hash -local codeinjections = backends.pdf.codeinjections - -local trace = false trackers.register("figures.merging", function(v) trace = v end) - -local report = logs.reporter("backend","merging") - -local function mergegoodies(optionlist) - local options = settings_to_hash(optionlist) - local yes = options[variables.yes] - local all = options[variables.all] - if next(options) then - report("% t",table.sortedkeys(options)) - end - if all or yes or options[variables.reference] then - codeinjections.mergereferences() - end - if all or options[variables.comment] then - codeinjections.mergecomments() - end - if all or yes or options[variables.bookmark] then - codeinjections.mergebookmarks() - end - if all or options[variables.field] then - codeinjections.mergefields() - end - if all or options[variables.layer] then - codeinjections.mergeviewerlayers() - end - codeinjections.flushmergelayer() -end - -function figures.mergegoodies(optionlist) - -- todo: we can use runlocal instead - context.stepwise(function() - -- we use stepwise because we might need to define symbols - -- for stamps that have no default appearance - mergegoodies(optionlist) - end) -end - -interfaces.implement { - name = "figure_mergegoodies", - actions = figures.mergegoodies, - arguments = "string" -} diff --git a/Master/texmf-dist/tex/context/base/mkiv/grph-fil.lua b/Master/texmf-dist/tex/context/base/mkiv/grph-fil.lua index b3980783038..afb303acd17 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/grph-fil.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/grph-fil.lua @@ -42,82 +42,154 @@ end job.register('job.files.collected', tobesaved, initializer) -local runner = sandbox.registerrunner { +-- When there is a runpath specified, we're already there, so then we only need to +-- pass the orginal path. But we pass it because it will prevent prepending the +-- current direction to the given name. + +local contextrunner = sandbox.registerrunner { name = "hashed context run", program = "context", - template = [[%options% %filename%]], + template = [[%options% %?path: --path=%path% ?% %?runpath: --runpath=%runpath% ?% %filename%]], checkers = { options = "string", filename = "readable", + path = "string", + runpath = "string", } } -function jobfiles.run(name,action) - local usedname = addsuffix(name,inputsuffix) -- we assume tex if not set - local oldchecksum = collected[usedname] - local newchecksum = checksum(usedname) - local resultfile = replacesuffix(usedname,resultsuffix) - local tobedone = false - if jobfiles.forcerun then - tobedone = true - if trace_run then - report_run("processing file, changes in %a, %s",name,"processing forced") +-- we can also use: +-- +-- local jobvariables = job.variables +-- jobvariables.getchecksum(tag) +-- jobvariables.makechecksum(data) +-- jobvariables.setchecksum(tag,checksum) + +-- The runpath features makes things more complex than needed, so we need to wrap +-- that some day in a helper. This is also very sensitive for both being set! + +function jobfiles.run(action) + local filename = action.filename + if filename and filename ~= "" then + local result = action.result + local runner = action.runner or contextrunner + local path = action.path +if not isfile(filename) and path and path ~= "" then + filename = file.join(path,filename) +end + local oldchecksum = collected[filename] + local newchecksum = checksum(filename) +-- print(filename,oldchecksum,newchecksum) + local tobedone = false + local forcerun = action.forcerun or jobfiles.forcerun + if not result then + result = replacesuffix(filename,resultsuffix) + action.result = result end - end - if not tobedone and not oldchecksum then - tobedone = true - if trace_run then - report_run("processing file, changes in %a, %s",name,"no checksum yet") + if forcerun then + tobedone = true + if trace_run then + report_run("processing file, changes in %a, %s",filename,"processing forced") + end end - end - if not tobedone and oldchecksum ~= newchecksum then - tobedone = true - if trace_run then - report_run("processing file, changes in %a, %s",name,"checksum mismatch") + if not tobedone and not oldchecksum then + tobedone = true + if trace_run then + report_run("processing file, changes in %a, %s",filename,"no checksum yet") + end end - end - if not tobedone and not isfile(resultfile) then - tobedone = true - if trace_run then - report_run("processing file, changes in %a, %s",name,"no result file") + if not tobedone and oldchecksum ~= newchecksum then + tobedone = true + if trace_run then + report_run("processing file, changes in %a, %s",filename,"checksum mismatch") + end end - end - if tobedone then - local ta = type(action) - if ta == "function" then - action(name) - elseif ta == "string" and action ~= "" then - -- can be anything but we assume it gets checked by the sandbox - os.execute(action) - elseif ta == "table" then - runner(action) - else - report_run("processing file, no action given for processing %a",name) + if not tobedone and not isfile(result) then + tobedone = true + if trace_run then + report_run("processing file, changes in %a, %s",filename,"no result file") + end end - elseif trace_run then - report_run("processing file, no changes in %a, not processed",name) + if tobedone then + local kind = type(runner) + if kind == "function" then + if trace_run then + report_run("processing file, command: %s",action.name or "unknown") + end + -- We can have a sandbox.registerrunner here in which case we need to make + -- sure that we don't feed a function into the checker. So one cannot use a + -- variable named "runner" in the template but that's no big deal. + local r = action.runner + action.runner = nil + runner(action) + action.runner = r + elseif kind == "string" then + -- can be anything but we assume it gets checked by the sandbox + if trace_run then + report_run("processing file, command: %s",runner) + end + os.execute(runner) + else + report_run("processing file, changes in %a, %s",filename,"no valid runner") + end + elseif trace_run then + report_run("processing file, no changes in %a, %s",filename,"not processed") + end + tobesaved[filename] = newchecksum + else + -- silently ignore error end - tobesaved[name] = newchecksum end -- local done = { } -function jobfiles.context(name,options) +local function analyzed(name,options) + local usedname = addsuffix(name,inputsuffix) -- we assume tex if not set + local resultname = replacesuffix(name,resultsuffix) -- we assume tex if not set + local pathname = file.pathpart(usedname) + local path = environment.arguments.path -- sic, no runpath + local runpath = environment.arguments.runpath + local resultname = replacesuffix(name,resultsuffix) -- we assume tex if not set + if runpath and runpath ~= "" then + -- not really needed but probably more robust for local leftovers + resultname = file.join(runpath,file.basename(resultname)) + end + if path ~= "" then + if path then + path = file.join(path,pathname) + else + path = pathname + end + usedname = file.basename(usedname) + end + return { + options = options, + path = path, + filename = usedname, + result = resultname, + runpath = runpath, + } +end + +function jobfiles.context(name,options) -- runpath ? if type(name) == "table" then local result = { } for i=1,#name do result[#result+1] = jobfiles.context(name[i],options) end return result - else - local result = replacesuffix(name,resultsuffix) + elseif name ~= "" then + local action = analyzed(name,options) + local result = action.result if not done[result] then - jobfiles.run(name, { options = options, filename = name }) + jobfiles.run(action) done[result] = true end return result + else + return { } end end diff --git a/Master/texmf-dist/tex/context/base/mkiv/grph-img.lua b/Master/texmf-dist/tex/context/base/mkiv/grph-img.lua index 0dc5efa7038..43299a84caa 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/grph-img.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/grph-img.lua @@ -16,7 +16,7 @@ local round = math.round local concat = table.concat local suffixonly = file.suffix -local newreader = io.newreader +local newreader = io.newreader -- needs checking 0/1 based local setmetatableindex = table.setmetatableindex local setmetatablecall = table.setmetatablecall @@ -24,6 +24,15 @@ local graphics = graphics or { } local identifiers = { } graphics.identifiers = identifiers +local function checkedmethod(filename,method) + if method ~= "string" then + local found, data = resolvers.loadbinfile(filename) + return data, "string" + else + return filename, method + end +end + do local colorspaces = { @@ -222,6 +231,7 @@ do specification.error = "invalid filename" return specification -- error end + filename, method = checkedmethod(filename,method) local f = newreader(filename,method) if not f then specification.error = "unable to open file" @@ -454,6 +464,7 @@ do specification.error = "invalid filename" return specification -- error end + filename, method = checkedmethod(filename,method) local f = newreader(filename,method) if not f then specification.error = "unable to open file" @@ -558,6 +569,7 @@ do specification.error = "invalid filename" return specification -- error end + filename, method = checkedmethod(filename,method) local f = newreader(filename,method) if not f then specification.error = "unable to open file" @@ -727,21 +739,18 @@ end function graphics.identify(filename,filetype) local identify = filetype and identifiers[filetype] - if identify then - return identify(filename) + if not identify then + identify = identifiers[suffixonly(filename)] end - local identify = identifiers[suffixonly(filename)] if identify then - identify = identify(filename) + return identify(filename) else - identify = { + return { filename = filename, filetype = filetype, error = "identification failed", } end - -- inspect(identify) - return identify end -- inspect(identifiers.jpg("t:/sources/hacker.jpg")) diff --git a/Master/texmf-dist/tex/context/base/mkiv/grph-inc.lua b/Master/texmf-dist/tex/context/base/mkiv/grph-inc.lua index 6fdf74c08da..f8dcc658b5f 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/grph-inc.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/grph-inc.lua @@ -78,9 +78,10 @@ local resolveprefix = resolvers.resolve local texgetbox = tex.getbox local texsetbox = tex.setbox -local hpack = node.hpack +local hpack = nodes.hpack local new_latelua = nodes.pool.latelua +local new_hlist = nodes.pool.hlist local context = context @@ -554,6 +555,11 @@ function figures.setpaths(locationset,pathlist) end end end + -- new + if environment.arguments.path then + table.insert(t,1,environment.arguments.path) + end + -- figure_paths = t last_pathlist = pathlist figures.paths = figure_paths @@ -587,6 +593,7 @@ local function new() -- we could use metatables status -> used -> request but it controls = false, display = false, mask = false, + crop = false, conversion = false, resolution = false, color = false, @@ -766,18 +773,20 @@ local function register(askedname,specification) local conversion = wipe(specification.conversion) local resolution = wipe(specification.resolution) local arguments = wipe(specification.arguments) + local crop = wipe(specification.crop) local newformat = conversion if not newformat or newformat == "" then newformat = defaultformat end if trace_conversion then - report_inclusion("checking conversion of %a, fullname %a, old format %a, new format %a, conversion %a, resolution %a, arguments %a", + report_inclusion("checking conversion of %a, fullname %a, old format %a, new format %a, conversion %a, resolution %a, crop %a, arguments %a", askedname, specification.fullname, format, newformat, conversion or "default", resolution or "default", + crop or "default", arguments or "" ) end @@ -793,7 +802,7 @@ local function register(askedname,specification) end end -- end of quick hack - local converter = (not remapper) and (newformat ~= format or resolution or arguments) and converters[format] + local converter = (not remapper) and (newformat ~= format or resolution or arguments) and converters[format] -- no crop here if converter then local okay = converter[newformat] if okay then @@ -813,6 +822,10 @@ local function register(askedname,specification) local oldname = specification.fullname local newpath = file.dirname(oldname) local oldbase = file.basename(oldname) + local runpath = environment.arguments.runpath + if runpath and runpath ~= "" and newpath == environment.arguments.path then + newpath = runpath + end -- -- problem: we can have weird filenames, like a.b.c (no suffix) and a.b.c.gif -- so we cannot safely remove a suffix (unless we do that for known suffixes) @@ -853,6 +866,10 @@ local function register(askedname,specification) if arguments then hash = hash .. "[a:" .. arguments .. "]" end + if crop then + hash = hash .. "[c:" .. crop .. "]" + end + newbase = gsub(newbase,"%.","_") -- nicer to have no suffix in the name if hash ~= "" then newbase = newbase .. "_" .. md5.hex(hash) end @@ -877,7 +894,7 @@ local function register(askedname,specification) if trace_conversion then report_inclusion("converting %a (%a) from %a to %a",askedname,oldname,format,newformat) end - converter(oldname,newname,resolution or "", arguments or "") + converter(oldname,newname,resolution or "", arguments or "",specification) -- in retrospect a table else if trace_conversion then report_inclusion("no need to convert %a (%a) from %a to %a",askedname,oldname,format,newformat) @@ -971,10 +988,12 @@ local function locate(request) -- name, format, cache local askedconversion = request.conversion local askedresolution = request.resolution local askedarguments = request.arguments + local askedcrop = request.crop local askedhash = f_hash_part( askedname, askedconversion or "default", askedresolution or "default", + askedcrop or "default", askedarguments or "" ) local foundname = figures_found[askedhash] @@ -1029,6 +1048,7 @@ local function locate(request) -- name, format, cache cache = askedcache, conversion = askedconversion, resolution = askedresolution, + crop = askedcrop, arguments = askedarguments, }) end @@ -1066,6 +1086,7 @@ local function locate(request) -- name, format, cache conversion = askedconversion, resolution = askedresolution, arguments = askedarguments, + crop = askedcrop, internal = internal, }) elseif quitscanning then @@ -1086,6 +1107,7 @@ local function locate(request) -- name, format, cache cache = askedcache, conversion = askedconversion, resolution = askedresolution, + crop = askedcrop, arguments = askedarguments, }) end @@ -1105,6 +1127,7 @@ local function locate(request) -- name, format, cache cache = askedcache, conversion = askedconversion, resolution = askedresolution, + crop = askedcrop, arguments = askedarguments, }) end @@ -1119,6 +1142,7 @@ local function locate(request) -- name, format, cache cache = askedcache, conversion = askedconversion, resolution = askedresolution, + crop = askedcrop, arguments = askedarguments, }) end @@ -1143,6 +1167,7 @@ local function locate(request) -- name, format, cache cache = askedcache, conversion = askedconversion, resolution = askedresolution, + crop = askedcrop, arguments = askedarguments, }) end @@ -1178,6 +1203,7 @@ local function locate(request) -- name, format, cache cache = askedcache, conversion = askedconversion, resolution = askedresolution, + crop = askedcrop, arguments = askedarguments }) end @@ -1206,6 +1232,7 @@ local function locate(request) -- name, format, cache cache = askedcache, conversion = askedconversion, resolution = askedresolution, + crop = askedcrop, arguments = askedarguments, }) end @@ -1231,6 +1258,7 @@ local function locate(request) -- name, format, cache cache = askedcache, conversion = askedconversion, resolution = askedresolution, + crop = askedcrop, arguments = askedarguments, }) end @@ -1241,6 +1269,7 @@ local function locate(request) -- name, format, cache return register(askedname, { -- these two are needed for hashing 'found' conversion = askedconversion, resolution = askedresolution, + crop = askedcrop, arguments = askedarguments, }) end @@ -1373,7 +1402,7 @@ end function figures.dummy(data) data = data or callstack[#callstack] or lastfiguredata local dr, du, nr = data.request, data.used, figures.boxnumber - local box = hpack(node.new("hlist")) -- we need to set the dir (luatex 0.60 buglet) + local box = hpack(new_hlist()) -- we need to set the dir (luatex 0.60 buglet) du.width = du.width or figures.defaultwidth du.height = du.height or figures.defaultheight du.depth = du.depth or figures.defaultdepth @@ -1455,6 +1484,7 @@ function checkers.generic(data) local size = dr.size or "crop" local color = dr.color or "natural" local mask = dr.mask or "none" + local crop = dr.crop or "none" local conversion = dr.conversion local resolution = dr.resolution local arguments = dr.arguments @@ -1476,6 +1506,7 @@ function checkers.generic(data) size, color, mask, + crop, conversion, resolution, arguments @@ -2071,6 +2102,7 @@ implement { { "preview" }, { "display" }, { "mask" }, + { "crop" }, { "conversion" }, { "resolution" }, { "color" }, diff --git a/Master/texmf-dist/tex/context/base/mkiv/grph-inc.mkiv b/Master/texmf-dist/tex/context/base/mkiv/grph-inc.mkiv index 0b8065989fc..05d4c3a572a 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/grph-inc.mkiv +++ b/Master/texmf-dist/tex/context/base/mkiv/grph-inc.mkiv @@ -111,6 +111,7 @@ \c!ownerpassword =, \c!compact =, \c!cmyk =, + \c!crop =\v!yes, ] %D Defining figures. @@ -370,6 +371,7 @@ compact {\externalfigureparameter\c!compact}% experiment, share fonts userpassword {\externalfigureparameter\c!userpassword}% ownerpassword{\externalfigureparameter\c!ownerpassword}% + crop {\externalfigureparameter\c!crop}% \ifx\p_width\empty \else width \dimexpr\p_width\relax \fi diff --git a/Master/texmf-dist/tex/context/base/mkiv/grph-pat.lua b/Master/texmf-dist/tex/context/base/mkiv/grph-pat.lua index 4310af672b7..7954e9fee0f 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/grph-pat.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/grph-pat.lua @@ -9,7 +9,8 @@ if not modules then modules = { } end modules ['grph-pat'] = { -- This is just a proof of concept. Viewers behave different (offsets) and Acrobat doesn't -- show xform based patterns. -- --- This module will be cleaned up and use codeinjections and such. +-- This module will be cleaned up and use codeinjections and such. It should be in the lpdf +-- namespace. local texsetbox = tex.setbox local texgetbox = tex.getbox diff --git a/Master/texmf-dist/tex/context/base/mkiv/grph-raw.lua b/Master/texmf-dist/tex/context/base/mkiv/grph-raw.lua index 62e96fcc9d7..73f0d51755e 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/grph-raw.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/grph-raw.lua @@ -22,7 +22,8 @@ function figures.bitmapimage(t) local xresolution = tonumber(t.xresolution) local yresolution = tonumber(t.yresolution) if data and xresolution and yresolution then - local width, height = t.width or "", t.height or "" + local width = t.width or "" + local height = t.height or "" local n = backends.nodeinjections.injectbitmap { xresolution = xresolution, yresolution = yresolution, @@ -30,9 +31,11 @@ function figures.bitmapimage(t) height = height ~= "" and texsp(height) or nil, data = data, colorspace = t.colorspace, + format = t.format, } if n then - context.hbox(n) + -- context.hpack(n) + context(nodes.hpack(n)) else report_bitmap("format no supported by backend") end diff --git a/Master/texmf-dist/tex/context/base/mkiv/l-dir.lua b/Master/texmf-dist/tex/context/base/mkiv/l-dir.lua index 325039cb1e6..ac8e2f4e8e1 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/l-dir.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/l-dir.lua @@ -230,18 +230,18 @@ if onwindows then -- we could sanitize here -- pattern = Ct { pattern = { - [1] = (Cs(P(".") + slash^1) + Cs(R("az","AZ") * P(":") * slash^0) + Cc("./")) * V(2) * V(3), - [2] = Cs(((1-S("*?/\\"))^0 * slash)^0), - [3] = Cs(P(1)^0) + (Cs(P(".") + slash^1) + Cs(R("az","AZ") * P(":") * slash^0) + Cc("./")) * V(2) * V(3), + Cs(((1-S("*?/\\"))^0 * slash)^0), + Cs(P(1)^0) } else -- assume unix -- pattern = Ct { pattern = { - [1] = (C(P(".") + P("/")^1) + Cc("./")) * V(2) * V(3), - [2] = C(((1-S("*?/"))^0 * P("/"))^0), - [3] = C(P(1)^0) + (C(P(".") + P("/")^1) + Cc("./")) * V(2) * V(3), + C(((1-S("*?/"))^0 * P("/"))^0), + C(P(1)^0) } end diff --git a/Master/texmf-dist/tex/context/base/mkiv/l-file.lua b/Master/texmf-dist/tex/context/base/mkiv/l-file.lua index d0af94f09d4..9f8fd654833 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/l-file.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/l-file.lua @@ -456,7 +456,7 @@ function file.join(one, two, three, ...) if not two then return one == "" and one or lpegmatch(reslasher,one) end - if one == "" then + if not one or one == "" then return lpegmatch(stripper,three and concat({ two, three, ... },"/") or two) end if lpegmatch(isnetwork,one) then diff --git a/Master/texmf-dist/tex/context/base/mkiv/l-gzip.lua b/Master/texmf-dist/tex/context/base/mkiv/l-gzip.lua index f141b5ebbbe..aadb781da38 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/l-gzip.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/l-gzip.lua @@ -5,176 +5,4 @@ if not modules then modules = { } end modules ['l-gzip'] = { license = "see context related readme files" } --- We only have a few official methods here: --- --- local decompressed = gzip.load (filename) --- local resultsize = gzip.save (filename,compresslevel) --- local compressed = gzip.compress (str,compresslevel) --- local decompressed = gzip.decompress (str) --- local iscompressed = gzip.compressed (str) --- local suffix, okay = gzip.suffix (filename) --- --- In LuaMetaTeX we have only xzip which implements a very few methods: --- --- compress (str,level,method,window,memory,strategy) --- decompress (str,window) --- adler32 (str,checksum) --- crc32 (str,checksum) --- --- Special window values are: --- --- flate : - 15 --- zlib : 15 --- gzip : 15 | 16 --- auto : 15 | 32 - -gzip = gzip or { } -- so in luatex we keep the old ones too - -if not zlib then - zlib = xzip -- in luametatex we shadow the old one -elseif not xzip then - xzip = zlib -end - -if zlib then - - local suffix = file.suffix - local suffixes = file.suffixes - local find = string.find - local openfile = io.open - - local gzipwindow = 15 + 16 -- +16: gzip, +32: gzip|zlib - local gziplevel = 3 - local identifier = "^\x1F\x8B\x08" - - local compress = zlib.compress - local decompress = zlib.decompress - - function gzip.load(filename) - local f = openfile(filename,"rb") - if not f then - -- invalid file - else - local data = f:read("*all") - f:close() - if data and data ~= "" then - if suffix(filename) == "gz" then - data = decompress(data,gzipwindow) - end - return data - end - end - end - - function gzip.save(filename,data,level) - if suffix(filename) ~= "gz" then - filename = filename .. ".gz" - end - local f = openfile(filename,"wb") - if f then - data = compress(data or "",level or gziplevel,nil,gzipwindow) - f:write(data) - f:close() - return #data - end - end - - function gzip.suffix(filename) - local suffix, extra = suffixes(filename) - local gzipped = extra == "gz" - return suffix, gzipped - end - - function gzip.compressed(s) - return s and find(s,identifier) - end - - function gzip.compress(s,level) - if s and not find(s,identifier) then -- the find check might go away - if not level then - level = gziplevel - elseif level <= 0 then - return s - elseif level > 9 then - level = 9 - end - return compress(s,level or gziplevel,nil,gzipwindow) or s - end - end - - function gzip.decompress(s) - if s and find(s,identifier) then - return decompress(s,gzipwindow) - else - return s - end - end - -end - --- In luametatex we can use this one but it doesn't look like there wil be stream --- support so for now we still use zlib (the performance difference is not that --- spectacular in our usage. - --- if flate then --- --- local type = type --- local find = string.find --- --- local compress = flate.gz_compress --- local decompress = flate.gz_decompress --- --- local absmax = 128*1024*1024 --- local initial = 64*1024 --- local identifier = "^\x1F\x8B\x08" --- --- function gzip.compressed(s) --- return s and find(s,identifier) --- end --- --- function gzip.compress(s,level) --- if s and not find(s,identifier) then -- the find check might go away --- if not level then --- level = 3 --- elseif level <= 0 then --- return s --- elseif level > 9 then --- level = 9 --- end --- return compress(s,level) or s --- end --- end --- --- function gzip.decompress(s,size,iterate) --- if s and find(s,identifier) then --- if type(size) ~= "number" then --- size = initial --- end --- if size > absmax then --- size = absmax --- end --- if type(iterate) == "number" then --- max = size * iterate --- elseif iterate == nil or iterate == true then --- iterate = true --- max = absmax --- end --- if max > absmax then --- max = absmax --- end --- while true do --- local d = decompress(s,size) --- if d then --- return d --- end --- size = 2 * size --- if not iterate or size > max then --- return false --- end --- end --- else --- return s --- end --- end --- --- end +-- now in util-zip diff --git a/Master/texmf-dist/tex/context/base/mkiv/l-io.lua b/Master/texmf-dist/tex/context/base/mkiv/l-io.lua index a955262a31e..6bf7a97bda2 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/l-io.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/l-io.lua @@ -147,9 +147,12 @@ function io.copydata(source,target,action) end end -function io.savedata(filename,data,joiner) - local f = open(filename,"wb") +function io.savedata(filename,data,joiner,append) + local f = open(filename,append and "ab" or "wb") if f then + if append and joiner and f:seek("end") > 0 then + f:write(joiner) + end if type(data) == "table" then f:write(concat(data,joiner or "")) elseif type(data) == "function" then @@ -288,7 +291,8 @@ end io.noflines = noflines --- inlined is faster ... beware, better use util-fil +-- inlined is faster ... beware, better use util-fil so these are obsolete +-- and will go local nextchar = { [ 4] = function(f) diff --git a/Master/texmf-dist/tex/context/base/mkiv/l-lpeg.lua b/Master/texmf-dist/tex/context/base/mkiv/l-lpeg.lua index b0868ba4886..5f3bea08ca6 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/l-lpeg.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/l-lpeg.lua @@ -507,7 +507,7 @@ end -- todo: cache when string -function lpeg.replacer(one,two,makefunction,isutf) -- in principle we should sort the keys +function lpeg.replacer(one,two,makefunction,isutf) -- in principle we should sort the keys but we have a better one anyway local pattern local u = isutf and utf8char or 1 if type(one) == "table" then @@ -665,12 +665,12 @@ end -- lpeg.print(lpeg.P("a","b","c")) -- lpeg.print(lpeg.S("a","b","c")) --- print(lpeg.count("äáàa",lpeg.P("á") + lpeg.P("à"))) --- print(lpeg.count("äáàa",lpeg.UP("áà"))) --- print(lpeg.count("äáàa",lpeg.US("àá"))) --- print(lpeg.count("äáàa",lpeg.UR("aá"))) --- print(lpeg.count("äáàa",lpeg.UR("àá"))) --- print(lpeg.count("äáàa",lpeg.UR(0x0000,0xFFFF))) +-- print(lpeg.counter(lpeg.P("á") + lpeg.P("à"))("äáàa")) +-- print(lpeg.counter(lpeg.UP("áà"))("äáàa")) +-- print(lpeg.counter(lpeg.US("àá"))("äáàa")) +-- print(lpeg.counter(lpeg.UR("aá"))("äáàa")) +-- print(lpeg.counter(lpeg.UR("àá"))("äáàa")) +-- print(lpeg.counter(lpeg.UR(0x0000,0xFFFF))) function lpeg.is_lpeg(p) return p and lpegtype(p) == "pattern" diff --git a/Master/texmf-dist/tex/context/base/mkiv/l-macro-imp-optimize.lua b/Master/texmf-dist/tex/context/base/mkiv/l-macro-imp-optimize.lua index 1ecaef7d4c5..c343dfa742e 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/l-macro-imp-optimize.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/l-macro-imp-optimize.lua @@ -28,7 +28,7 @@ if LUAVERSION >= 5.3 and lua.macros then -- This indirect method makes it possible to use both the functions -- and the inline variant (which often looks better). Also, a mixed - -- 5,2 and 5.3 source is not possible because the 5.2 doesn't deal + -- 5.2 and 5.3 source is not possible because the 5.2 doesn't deal -- with the newer 5.3 syntax. -- We need to check for 64 usage: 0xFFFFFFFFFFFFFFFF (-1) @@ -44,6 +44,7 @@ lua.macros.resolvestring [[ #define extract1(a,b) ((a >> b) & 0x01) #define extract2(a,b) ((a >> b) & 0x03) #define extract4(a,b) ((a >> b) & 0x0F) +#define extract8(a,b) ((a >> b) & 0xFF) #define lshift(a,b) (((a)<<(b))&0xFFFFFFFF) #define rshift(a,b) (((a)>>(b))&0xFFFFFFFF) #define intdiv(a,b) ((a)//(b)) diff --git a/Master/texmf-dist/tex/context/base/mkiv/l-math.lua b/Master/texmf-dist/tex/context/base/mkiv/l-math.lua index e5668a5db0a..6105bc3c2d7 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/l-math.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/l-math.lua @@ -14,9 +14,19 @@ end if not math.round then - local floor = math.floor + if xmath then + + math.round = xmath.round + + else - function math.round(x) return floor(x + 0.5) end + local floor = math.floor + + function math.round(x) + return x < 0 and -floor(-x + 0.5) or floor(x + 0.5) + end + + end end @@ -141,7 +151,7 @@ if not math.ult then local floor = math.floor - function math.tointeger(m,n) + function math.ult(m,n) -- not ok but i'm not motivated to look into it now return floor(m) < floor(n) -- unsigned comparison needed end diff --git a/Master/texmf-dist/tex/context/base/mkiv/l-number.lua b/Master/texmf-dist/tex/context/base/mkiv/l-number.lua index 9fd2f82f785..0ec60880d75 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/l-number.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/l-number.lua @@ -1,16 +1,13 @@ if not modules then modules = { } end modules ['l-number'] = { version = 1.001, - comment = "companion to luat-lib.mkiv", + comment = "companion to luat-lib.mkxl", author = "Hans Hagen, PRAGMA-ADE, Hasselt NL", copyright = "PRAGMA ADE / ConTeXt Development Team", license = "see context related readme files" } --- this module will be replaced when we have the bit library .. the number based sets --- might go away - local tostring, tonumber = tostring, tonumber -local format, floor, match, rep = string.format, math.floor, string.match, string.rep +local format, match, rep = string.format, string.match, string.rep local concat, insert = table.concat, table.insert local lpegmatch = lpeg.match local floor = math.floor @@ -18,51 +15,6 @@ local floor = math.floor number = number or { } local number = number --- begin obsolete code -- - --- if bit32 then --- --- local btest, bor = bit32.btest, bit32.bor --- --- function number.bit(p) --- return 2 ^ (p - 1) -- 1-based indexing --- end --- --- number.hasbit = btest --- number.setbit = bor --- --- function number.setbit(x,p) -- why not bor? --- return btest(x,p) and x or x + p --- end --- --- function number.clearbit(x,p) --- return btest(x,p) and x - p or x --- end --- --- else --- --- -- http://ricilake.blogspot.com/2007/10/iterating-bits-in-lua.html --- --- function number.bit(p) --- return 2 ^ (p - 1) -- 1-based indexing --- end --- --- function number.hasbit(x, p) -- typical call: if hasbit(x, bit(3)) then ... --- return x % (p + p) >= p --- end --- --- function number.setbit(x, p) --- return (x % (p + p) >= p) and x or x + p --- end --- --- function number.clearbit(x, p) --- return (x % (p + p) >= p) and x - p or x --- end --- --- end - --- end obsolete code -- - -- print(number.tobitstring(8)) -- print(number.tobitstring(14)) -- print(number.tobitstring(66)) diff --git a/Master/texmf-dist/tex/context/base/mkiv/l-os.lua b/Master/texmf-dist/tex/context/base/mkiv/l-os.lua index 73841074c46..faae76881ac 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/l-os.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/l-os.lua @@ -26,22 +26,27 @@ if not modules then modules = { } end modules ['l-os'] = { -- math.randomseed(tonumber(string.sub(string.reverse(tostring(math.floor(socket.gettime()*10000))),1,6))) local os = os -local date, time = os.date, os.time +local date, time, difftime = os.date, os.time, os.difftime local find, format, gsub, upper, gmatch = string.find, string.format, string.gsub, string.upper, string.gmatch local concat = table.concat -local random, ceil, randomseed = math.random, math.ceil, math.randomseed +local random, ceil, randomseed, modf = math.random, math.ceil, math.randomseed, math.modf local type, setmetatable, tonumber, tostring = type, setmetatable, tonumber, tostring -- This check needs to happen real early on. Todo: we can pick it up from the commandline -- if we pass --binpath= (which is useful anyway) do + local selfdir = os.selfdir + if selfdir == "" then selfdir = nil end + if not selfdir then + -- We need a fallback plan so let's see what we get. + if arg then -- passed by mtx-context ... saves network access for i=1,#arg do @@ -52,6 +57,7 @@ do end end end + if not selfdir then selfdir = os.selfbin or "luatex" if find(selfdir,"[/\\]") then @@ -92,11 +98,16 @@ do end end end + -- let's hope we're okay now + os.selfdir = selfdir or "." + end + + -- print(os.selfdir) os.exit() + end --- print(os.selfdir) os.exit() -- The following code permits traversing the environment table, at least in luatex. Internally all -- environment names are uppercase. @@ -157,7 +168,7 @@ if not os.__getenv__ then end function os.getenv(k) - local K = upper(k) + local K = upper(k) -- hm utf local v = osenv[K] or osgetenv(K) or osgetenv(k) if v == "" then return nil @@ -183,32 +194,14 @@ end -- end of environment hack -local execute = os.execute -local iopopen = io.popen - -local function resultof(command) - local handle = iopopen(command,"r") -- already has flush - if handle then - local result = handle:read("*all") or "" - handle:close() - return result - else - return "" - end -end - -os.resultof = resultof - -function os.pipeto(command) - return iopopen(command,"w") -- already has flush -end - if not io.fileseparator then + if find(os.getenv("PATH"),";",1,true) then io.fileseparator, io.pathseparator, os.type = "\\", ";", os.type or "windows" else io.fileseparator, io.pathseparator, os.type = "/" , ":", os.type or "unix" end + end os.type = os.type or (io.pathseparator == ";" and "windows") or "unix" @@ -220,351 +213,370 @@ else os.libsuffix, os.binsuffix, os.binsuffixes = 'so', '', { '' } end -local launchers = { - windows = "start %s", - macosx = "open %s", - unix = "xdg-open %s &> /dev/null &", -} +do -function os.launch(str) - local command = format(launchers[os.name] or launchers.unix,str) - -- todo: pcall --- print(command) - execute(command) -end + local execute = os.execute + local iopopen = io.popen + local ostype = os.type + + local function resultof(command) + -- already has flush, b is new and we need it to pipe xz output + local handle = iopopen(command,ostype == "windows" and "rb" or "r") + if handle then + local result = handle:read("*all") or "" + handle:close() + return result + else + return "" + end + end -local gettimeofday = os.gettimeofday or os.clock -os.gettimeofday = gettimeofday + os.resultof = resultof -local startuptime = gettimeofday() + function os.pipeto(command) + return iopopen(command,"w") -- already has flush + end -function os.runtime() - return gettimeofday() - startuptime -end + local launchers = { + windows = "start %s", + macosx = "open %s", + unix = "xdg-open %s &> /dev/null &", + } + + function os.launch(str) + local command = format(launchers[os.name] or launchers.unix,str) + -- todo: pcall + -- print(command) + execute(command) + end --- print(os.gettimeofday()-os.time()) --- os.sleep(1.234) --- print (">>",os.runtime()) --- print(os.date("%H:%M:%S",os.gettimeofday())) --- print(os.date("%H:%M:%S",os.time())) +end --- no need for function anymore as we have more clever code and helpers now --- this metatable trickery might as well disappear +do -local resolvers = os.resolvers or { } -os.resolvers = resolvers + local gettimeofday = os.gettimeofday or os.clock + os.gettimeofday = gettimeofday -setmetatable(os, { __index = function(t,k) - local r = resolvers[k] - return r and r(t,k) or nil -- no memoize -end }) + local startuptime = gettimeofday() --- we can use HOSTTYPE on some platforms + function os.runtime() + return gettimeofday() - startuptime + end -local name, platform = os.name or "linux", os.getenv("MTX_PLATFORM") or "" + -- print(os.gettimeofday()-os.time()) + -- os.sleep(1.234) + -- print (">>",os.runtime()) + -- print(os.date("%H:%M:%S",os.gettimeofday())) + -- print(os.date("%H:%M:%S",os.time())) --- local function guess() --- local architecture = resultof("uname -m") or "" --- if architecture ~= "" then --- return architecture --- end --- architecture = os.getenv("HOSTTYPE") or "" --- if architecture ~= "" then --- return architecture --- end --- return resultof("echo $HOSTTYPE") or "" --- end +end +-- We can use HOSTTYPE on some platforms (but not consistently on e.g. Linux). +-- -- os.bits = 32 | 64 +-- +-- os.uname() : return { +-- machine = "x86_64", +-- nodename = "MYLAPTOP", +-- release = "build 9200", +-- sysname = "Windows", +-- version = "6.02", +-- } --- os.uname() --- sysname --- machine --- release --- version --- nodename - -if platform ~= "" then +do - os.platform = platform + local name = os.name or "linux" + local platform = os.getenv("MTX_PLATFORM") or "" + local architecture = os.uname and os.uname().machine -- lmtx + local bits = os.getenv("MTX_BITS") or find(platform,"64") and 64 or 32 -elseif os.type == "windows" then + if platform ~= "" then - -- we could set the variable directly, no function needed here + -- we're okay already - -- PROCESSOR_ARCHITECTURE : binary platform - -- PROCESSOR_ARCHITEW6432 : OS platform + elseif os.type == "windows" then - -- mswin-64 is now win64 + -- PROCESSOR_ARCHITECTURE : binary platform + -- PROCESSOR_ARCHITEW6432 : OS platform - function resolvers.platform(t,k) - local architecture = os.getenv("PROCESSOR_ARCHITECTURE") or "" - local platform = "" - if find(architecture,"AMD64",1,true) then - platform = "win64" + architecture = string.lower(architecture or os.getenv("PROCESSOR_ARCHITECTURE") or "") + if architecture == "x86_64" then + bits, platform = 64, "win64" + elseif find(architecture,"amd64") then + bits, platform = 64, "win64" + elseif find(architecture,"arm64") then + bits, platform = 64, "windows-arm64" + elseif find(architecture,"arm32") then + bits, platform = 32, "windows-arm32" else - platform = "mswin" + bits, platform = 32, "mswin" end - os.setenv("MTX_PLATFORM",platform) - os.platform = platform - return platform - end -elseif name == "linux" then - - function resolvers.platform(t,k) - -- we sometimes have HOSTTYPE set so let's check that first - local architecture = os.getenv("HOSTTYPE") or resultof("uname -m") or "" - local platform = os.getenv("MTX_PLATFORM") or "" - local musl = find(os.selfdir or "","linuxmusl") - if platform ~= "" then - -- we're done - elseif find(architecture,"x86_64",1,true) then - platform = musl and "linuxmusl" or "linux-64" - elseif find(architecture,"ppc",1,true) then - platform = "linux-ppc" + elseif name == "linux" then + + -- There is no way to detect if musl is used because there is no __MUSL__ + -- and it looks like there never will be. Folks don't care about cases where + -- one ships multipe binaries (as with TeX distibutions) and want to select + -- the right one. So probably it expects users to compile locally in which + -- case we don't care to much as they can then sort it out. + + architecture = architecture or os.getenv("HOSTTYPE") or resultof("uname -m") or "" + local musl = find(os.selfdir or "","linuxmusl") + if find(architecture,"x86_64") then + bits, platform = 64, musl and "linuxmusl" or "linux-64" + elseif find(architecture,"ppc") then + bits, platform = 32, "linux-ppc" -- this will be dropped else - platform = musl and "linuxmusl" or "linux" + bits, platform = 32, musl and "linuxmusl" or "linux" end - os.setenv("MTX_PLATFORM",platform) - os.platform = platform - return platform - end -elseif name == "macosx" then - - --[[ - Identifying the architecture of OSX is quite a mess and this - is the best we can come up with. For some reason $HOSTTYPE is - a kind of pseudo environment variable, not known to the current - environment. And yes, uname cannot be trusted either, so there - is a change that you end up with a 32 bit run on a 64 bit system. - Also, some proper 64 bit intel macs are too cheap (low-end) and - therefore not permitted to run the 64 bit kernel. - ]]-- - - function resolvers.platform(t,k) - -- local platform = "" - -- local architecture = os.getenv("HOSTTYPE") or "" - -- if architecture == "" then - -- architecture = resultof("echo $HOSTTYPE") or "" - -- end - local architecture = resultof("echo $HOSTTYPE") or "" - local platform = "" + elseif name == "macosx" then + + -- Identifying the architecture of OSX is quite a mess and this is the best + -- we can come up with. For some reason $HOSTTYPE is a kind of pseudo + -- environment variable, not known to the current environment. And yes, + -- uname cannot be trusted either, so there is a change that you end up with + -- a 32 bit run on a 64 bit system. Also, some proper 64 bit intel macs are + -- too cheap (low-end) and therefore not permitted to run the 64 bit kernel. + + architecture = architecture or resultof("echo $HOSTTYPE") or "" if architecture == "" then - -- print("\nI have no clue what kind of OSX you're running so let's assume an 32 bit intel.\n") - platform = "osx-intel" - elseif find(architecture,"i386",1,true) then - platform = "osx-intel" - elseif find(architecture,"x86_64",1,true) then - platform = "osx-64" - elseif find(architecture,"arm64",1,true) then - platform = "osx-64" + bits, platform = 64, "osx-intel" + elseif find(architecture,"i386") then + bits, platform = 64, "osx-intel" + elseif find(architecture,"x86_64") then + bits, platform = 64, "osx-64" + elseif find(architecture,"arm64") then + bits, platform = 64, "osx-arm" else - platform = "osx-ppc" + bits, platform = 32, "osx-ppc" end - os.setenv("MTX_PLATFORM",platform) - os.platform = platform - return platform - end -elseif name == "sunos" then + elseif name == "sunos" then - function resolvers.platform(t,k) - local architecture = resultof("uname -m") or "" - local platform = "" - if find(architecture,"sparc",1,true) then - platform = "solaris-sparc" + architecture = architecture or resultof("uname -m") or "" + if find(architecture,"sparc") then + bits, platform = 32, "solaris-sparc" else -- if architecture == 'i86pc' - platform = "solaris-intel" + bits, platform = 32, "solaris-intel" end - os.setenv("MTX_PLATFORM",platform) - os.platform = platform - return platform - end -elseif name == "freebsd" then + elseif name == "freebsd" then - function resolvers.platform(t,k) - local architecture = resultof("uname -m") or "" - local platform = "" - if find(architecture,"amd64",1,true) then - platform = "freebsd-amd64" + architecture = architecture or os.getenv("MACHTYPE") or resultof("uname -m") or "" + if find(architecture,"amd64") or find(architecture,"AMD64") then + bits, platform = 64, "freebsd-amd64" else - platform = "freebsd" + bits, platform = 32, "freebsd" end - os.setenv("MTX_PLATFORM",platform) - os.platform = platform - return platform - end -elseif name == "kfreebsd" then + elseif name == "kfreebsd" then - function resolvers.platform(t,k) - -- we sometimes have HOSTTYPE set so let's check that first - local architecture = os.getenv("HOSTTYPE") or resultof("uname -m") or "" - local platform = "" - if find(architecture,"x86_64",1,true) then - platform = "kfreebsd-amd64" + architecture = architecture or os.getenv("HOSTTYPE") or resultof("uname -m") or "" + if architecture == "x86_64" then + bits, platform = 64, "kfreebsd-amd64" else - platform = "kfreebsd-i386" + bits, platform = 32, "kfreebsd-i386" end - os.setenv("MTX_PLATFORM",platform) - os.platform = platform - return platform - end -else + else - -- platform = "linux" - -- os.setenv("MTX_PLATFORM",platform) - -- os.platform = platform + architecture = architecture or resultof("uname -m") or "" + + if find(architecture,"aarch64") then + bits, platform = "linux-aarch64" + elseif find(architecture,"armv7l") then + -- linux-armel + bits, platform = 32, "linux-armhf" + elseif find(architecture,"mips64") or find(architecture,"mips64el") then + bits, platform = 64, "linux-mipsel" + elseif find(architecture,"mipsel") or find(architecture,"mips") then + bits, platform = 32, "linux-mipsel" + else + bits, platform = 64, "linux-64" -- was 32, "linux" + end - function resolvers.platform(t,k) - local platform = "linux" - os.setenv("MTX_PLATFORM",platform) - os.platform = platform - return platform end -end + os.setenv("MTX_PLATFORM",platform) + os.setenv("MTX_BITS", bits) -os.newline = name == "windows" and "\013\010" or "\010" -- crlf or lf + os.platform = platform + os.bits = bits + os.newline = name == "windows" and "\013\010" or "\010" -- crlf or lf -function resolvers.bits(t,k) - local bits = find(os.platform,"64",1,true) and 64 or 32 - os.bits = bits - return bits end -- beware, we set the randomseed --- from wikipedia: Version 4 UUIDs use a scheme relying only on random numbers. This algorithm sets the --- version number as well as two reserved bits. All other bits are set using a random or pseudorandom --- data source. Version 4 UUIDs have the form xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx with hexadecimal --- digits x and hexadecimal digits 8, 9, A, or B for y. e.g. f47ac10b-58cc-4372-a567-0e02b2c3d479. --- --- as we don't call this function too often there is not so much risk on repetition - -local t = { 8, 9, "a", "b" } - -function os.uuid() - return format("%04x%04x-4%03x-%s%03x-%04x-%04x%04x%04x", - random(0xFFFF),random(0xFFFF), - random(0x0FFF), - t[ceil(random(4))] or 8,random(0x0FFF), - random(0xFFFF), - random(0xFFFF),random(0xFFFF),random(0xFFFF) - ) +-- From wikipedia: Version 4 UUIDs use a scheme relying only on random numbers. This +-- algorithm sets the version number as well as two reserved bits. All other bits +-- are set using a random or pseudorandom data source. Version 4 UUIDs have the form +-- xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx with hexadecimal digits x and hexadecimal +-- digits 8, 9, A, or B for y. e.g. f47ac10b-58cc-4372-a567-0e02b2c3d479. As we don't +-- call this function too often there is not so much risk on repetition. + +do + + local t = { 8, 9, "a", "b" } + + function os.uuid() + return format("%04x%04x-4%03x-%s%03x-%04x-%04x%04x%04x", + random(0xFFFF),random(0xFFFF), + random(0x0FFF), + t[ceil(random(4))] or 8,random(0x0FFF), + random(0xFFFF), + random(0xFFFF),random(0xFFFF),random(0xFFFF) + ) + end + end -local d +do -function os.timezone(delta) - d = d or ((tonumber(date("%H")) or 0) - (tonumber(date("!%H")) or 0)) - if delta then - if d > 0 then - return format("+%02i:00",d) + -- this is fragile because it depends on time and so we only check once during + -- a run (the computer doesn't move zones) .. Michal Vlasák made a better one + + -- local d + -- + -- function os.timezone() + -- d = d or ((tonumber(date("%H")) or 0) - (tonumber(date("!%H")) or 0)) + -- if d > 0 then + -- return format("+%02i:00",d) + -- else + -- return format("-%02i:00",-d) + -- end + -- end + + local hour, min + + function os.timezone(difference) + if not hour then + -- somehow looks too complex: + local current = time() + local utcdate = date("!*t", current) + local localdate = date("*t", current) + localdate.isdst = false + local timediff = difftime(time(localdate), time(utcdate)) + hour, min = modf(timediff / 3600) + min = min * 60 + end + if difference then + return hour, min else - return format("-%02i:00",-d) + return format("%+03d:%02d",hour,min) -- %+ means: always show sign end - else - return 1 end -end -local timeformat = format("%%s%s",os.timezone(true)) -local dateformat = "!%Y-%m-%d %H:%M:%S" -local lasttime = nil -local lastdate = nil - -function os.fulltime(t,default) - t = t and tonumber(t) or 0 - if t > 0 then - -- valid time - elseif default then - return default - else - t = time() - end - if t ~= lasttime then - lasttime = t - lastdate = format(timeformat,date(dateformat)) + -- localtime with timezone: 2021-10-22 10:22:54+02:00 + + local timeformat = format("%%s%s",os.timezone()) + local dateformat = "%Y-%m-%d %H:%M:%S" + local lasttime = nil + local lastdate = nil + + function os.fulltime(t,default) + t = t and tonumber(t) or 0 + if t > 0 then + -- valid time + elseif default then + return default + else + t = time() + end + if t ~= lasttime then + lasttime = t + lastdate = format(timeformat,date(dateformat)) + end + return lastdate end - return lastdate -end -local dateformat = "%Y-%m-%d %H:%M:%S" -local lasttime = nil -local lastdate = nil + -- localtime without timezone: 2021-10-22 10:22:54 -function os.localtime(t,default) - t = t and tonumber(t) or 0 - if t > 0 then - -- valid time - elseif default then - return default - else - t = time() + local dateformat = "%Y-%m-%d %H:%M:%S" + local lasttime = nil + local lastdate = nil + + function os.localtime(t,default) + t = t and tonumber(t) or 0 + if t > 0 then + -- valid time + elseif default then + return default + else + t = time() + end + if t ~= lasttime then + lasttime = t + lastdate = date(dateformat,t) + end + return lastdate end - if t ~= lasttime then - lasttime = t - lastdate = date(dateformat,t) + + function os.converttime(t,default) + local t = tonumber(t) + if t and t > 0 then + return date(dateformat,t) + else + return default or "-" + end end - return lastdate -end -function os.converttime(t,default) - local t = tonumber(t) - if t and t > 0 then - return date(dateformat,t) - else - return default or "-" + -- table with values + + function os.today() + return date("!*t") + end + + -- utc time without timezone: 2021-10-22 08:22:54 + + function os.now() + return date("!%Y-%m-%d %H:%M:%S") end + end -local memory = { } - -local function which(filename) - local fullname = memory[filename] - if fullname == nil then - local suffix = file.suffix(filename) - local suffixes = suffix == "" and os.binsuffixes or { suffix } - for directory in gmatch(os.getenv("PATH"),"[^" .. io.pathseparator .."]+") do - local df = file.join(directory,filename) - for i=1,#suffixes do - local dfs = file.addsuffix(df,suffixes[i]) - if io.exists(dfs) then - fullname = dfs - break +do + + local cache = { } + + local function which(filename) + local fullname = cache[filename] + if fullname == nil then + local suffix = file.suffix(filename) + local suffixes = suffix == "" and os.binsuffixes or { suffix } + for directory in gmatch(os.getenv("PATH"),"[^" .. io.pathseparator .."]+") do + local df = file.join(directory,filename) + for i=1,#suffixes do + local dfs = file.addsuffix(df,suffixes[i]) + if io.exists(dfs) then + fullname = dfs + break + end end end + if not fullname then + fullname = false + end + cache[filename] = fullname end - if not fullname then - fullname = false - end - memory[filename] = fullname + return fullname end - return fullname -end -os.which = which -os.where = which + os.which = which + os.where = which -function os.today() - return date("!*t") -- table with values -end + -- print(os.which("inkscape.exe")) + -- print(os.which("inkscape")) + -- print(os.which("gs.exe")) + -- print(os.which("ps2pdf")) -function os.now() - return date("!%Y-%m-%d %H:%M:%S") -- 2011-12-04 14:59:12 end --- if not os.sleep and socket then --- os.sleep = socket.sleep --- end - if not os.sleep then + local socket = socket + function os.sleep(n) if not socket then -- so we delay ... if os.sleep is really needed then one should also @@ -573,101 +585,105 @@ if not os.sleep then end socket.sleep(n) end -end - --- print(os.which("inkscape.exe")) --- print(os.which("inkscape")) --- print(os.which("gs.exe")) --- print(os.which("ps2pdf")) - --- These are moved from core-con.lua (as I needed them elsewhere). -local function isleapyear(year) -- timed for bram's cs practicum - -- return (year % 400 == 0) or (year % 100 ~= 0 and year % 4 == 0) -- 3:4:1600:1900 = 9.9 : 8.2 : 5.0 : 6.8 (29.9) - return (year % 4 == 0) and (year % 100 ~= 0 or year % 400 == 0) -- 3:4:1600:1900 = 5.1 : 6.5 : 8.1 : 10.2 (29.9) - -- return (year % 4 == 0) and (year % 400 == 0 or year % 100 ~= 0) -- 3:4:1600:1900 = 5.2 : 8.5 : 6.8 : 10.1 (30.6) end -os.isleapyear = isleapyear +-- These are moved from core-con.lua (as I needed them elsewhere). --- nicer: --- --- local days = { --- [false] = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }, --- [true] = { 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 } --- } --- --- local function nofdays(year,month) --- return days[isleapyear(year)][month] --- return month == 2 and isleapyear(year) and 29 or days[month] --- end --- --- more efficient: +do -local days = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 } + local function isleapyear(year) -- timed for bram's cs practicum + -- return (year % 400 == 0) or (year % 100 ~= 0 and year % 4 == 0) -- 3:4:1600:1900 = 9.9 : 8.2 : 5.0 : 6.8 (29.9) + return (year % 4 == 0) and (year % 100 ~= 0 or year % 400 == 0) -- 3:4:1600:1900 = 5.1 : 6.5 : 8.1 : 10.2 (29.9) + -- return (year % 4 == 0) and (year % 400 == 0 or year % 100 ~= 0) -- 3:4:1600:1900 = 5.2 : 8.5 : 6.8 : 10.1 (30.6) + end -local function nofdays(year,month,day) - if not month then - return isleapyear(year) and 365 or 364 - elseif not day then - return month == 2 and isleapyear(year) and 29 or days[month] - else - for i=1,month-1 do - day = day + days[i] - end - if month > 2 and isleapyear(year) then - day = day + 1 + os.isleapyear = isleapyear + + -- nicer: + -- + -- local days = { + -- [false] = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }, + -- [true] = { 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 } + -- } + -- + -- local function nofdays(year,month) + -- return days[isleapyear(year)][month] + -- return month == 2 and isleapyear(year) and 29 or days[month] + -- end + -- + -- more efficient: + + local days = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 } + + local function nofdays(year,month,day) + if not month then + return isleapyear(year) and 365 or 364 + elseif not day then + return month == 2 and isleapyear(year) and 29 or days[month] + else + for i=1,month-1 do + day = day + days[i] + end + if month > 2 and isleapyear(year) then + day = day + 1 + end + return day end - return day end -end - -os.nofdays = nofdays -function os.weekday(day,month,year) - return date("%w",time { year = year, month = month, day = day }) + 1 -end + os.nofdays = nofdays -function os.validdate(year,month,day) - -- we assume that all three values are set - -- year is always ok, even if lua has a 1970 time limit - if month < 1 then - month = 1 - elseif month > 12 then - month = 12 + function os.weekday(day,month,year) + return date("%w",time { year = year, month = month, day = day }) + 1 end - if day < 1 then - day = 1 - else - local max = nofdays(year,month) - if day > max then - day = max + + function os.validdate(year,month,day) + -- we assume that all three values are set + -- year is always ok, even if lua has a 1970 time limit + if month < 1 then + month = 1 + elseif month > 12 then + month = 12 end + if day < 1 then + day = 1 + else + local max = nofdays(year,month) + if day > max then + day = max + end + end + return year, month, day end - return year, month, day -end -function os.date(fmt,...) - if not fmt then - -- otherwise differences between unix, mingw and msvc - fmt = "%Y-%m-%d %H:%M" + function os.date(fmt,...) + if not fmt then + -- otherwise differences between unix, mingw and msvc + fmt = "%Y-%m-%d %H:%M" + end + return date(fmt,...) end - return date(fmt,...) + end -local osexit = os.exit -local exitcode = nil +do -function os.setexitcode(code) - exitcode = code -end + local osexit = os.exit + local exitcode = nil -function os.exit(c) - if exitcode ~= nil then - return osexit(exitcode) + function os.setexitcode(code) + exitcode = code end - if c ~= nil then - return osexit(c) + + function os.exit(c) + if exitcode ~= nil then + return osexit(exitcode) + end + if c ~= nil then + return osexit(c) + end + return osexit() end - return osexit() + end diff --git a/Master/texmf-dist/tex/context/base/mkiv/l-string.lua b/Master/texmf-dist/tex/context/base/mkiv/l-string.lua index 1dee85e2894..476820a175b 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/l-string.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/l-string.lua @@ -7,7 +7,7 @@ if not modules then modules = { } end modules ['l-string'] = { } local string = string -local sub, gmatch, format, char, byte, rep, lower = string.sub, string.gmatch, string.format, string.char, string.byte, string.rep, string.lower +local sub, gmatch, format, char, byte, rep, lower, find = string.sub, string.gmatch, string.format, string.char, string.byte, string.rep, string.lower, string.find local lpegmatch, patterns = lpeg.match, lpeg.patterns local P, S, C, Ct, Cc, Cs = lpeg.P, lpeg.S, lpeg.C, lpeg.Ct, lpeg.Cc, lpeg.Cs @@ -52,10 +52,26 @@ function string.quoted(str) return format("%q",str) -- always double quote end -function string.count(str,pattern) -- variant 3 +-- function string.count(str,pattern) -- variant 3 +-- local n = 0 +-- for _ in gmatch(str,pattern) do -- not for utf +-- n = n + 1 +-- end +-- return n +-- end + +function string.count(str,pattern) local n = 0 - for _ in gmatch(str,pattern) do -- not for utf - n = n + 1 + local i = 1 + local l = #pattern + while true do + i = find(str,pattern,i) + if i then + n = n + 1 + i = i + l + else + break + end end return n end diff --git a/Master/texmf-dist/tex/context/base/mkiv/l-url.lua b/Master/texmf-dist/tex/context/base/mkiv/l-url.lua index 6f834d778d1..2e01ad40808 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/l-url.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/l-url.lua @@ -379,53 +379,53 @@ end -- print(url.barepath("/test"),url.barepath("test/"),url.barepath("/test/"),url.barepath("test")) -- print(url.barepath("/x/yz"),url.barepath("x/yz/"),url.barepath("/x/yz/"),url.barepath("x/yz")) ---~ print(url.filename("file:///c:/oeps.txt")) ---~ print(url.filename("c:/oeps.txt")) ---~ print(url.filename("file:///oeps.txt")) ---~ print(url.filename("file:///etc/test.txt")) ---~ print(url.filename("/oeps.txt")) - ---~ from the spec on the web (sort of): - ---~ local function test(str) ---~ local t = url.hashed(str) ---~ t.constructed = url.construct(t) ---~ print(table.serialize(t)) ---~ end - ---~ inspect(url.hashed("http://www.pragma-ade.com/test%20test?test=test%20test&x=123%3d45")) ---~ inspect(url.hashed("http://www.pragma-ade.com/test%20test?test=test%20test&x=123%3d45")) - ---~ test("sys:///./colo-rgb") - ---~ test("/data/site/output/q2p-develop/resources/ecaboperception4_res/topicresources/58313733/figuur-cow.jpg") ---~ test("file:///M:/q2p/develop/output/q2p-develop/resources/ecaboperception4_res/topicresources/58313733") ---~ test("M:/q2p/develop/output/q2p-develop/resources/ecaboperception4_res/topicresources/58313733") ---~ test("file:///q2p/develop/output/q2p-develop/resources/ecaboperception4_res/topicresources/58313733") ---~ test("/q2p/develop/output/q2p-develop/resources/ecaboperception4_res/topicresources/58313733") - ---~ test("file:///cow%20with%20spaces") ---~ test("file:///cow%20with%20spaces.pdf") ---~ test("cow%20with%20spaces.pdf") ---~ test("some%20file") ---~ test("/etc/passwords") ---~ test("http://www.myself.com/some%20words.html") ---~ test("file:///c:/oeps.txt") ---~ test("file:///c|/oeps.txt") ---~ test("file:///etc/oeps.txt") ---~ test("file://./etc/oeps.txt") ---~ test("file:////etc/oeps.txt") ---~ test("ftp://ftp.is.co.za/rfc/rfc1808.txt") ---~ test("http://www.ietf.org/rfc/rfc2396.txt") ---~ test("ldap://[2001:db8::7]/c=GB?objectClass?one#what") ---~ test("mailto:John.Doe@example.com") ---~ test("news:comp.infosystems.www.servers.unix") ---~ test("tel:+1-816-555-1212") ---~ test("telnet://192.0.2.16:80/") ---~ test("urn:oasis:names:specification:docbook:dtd:xml:4.1.2") ---~ test("http://www.pragma-ade.com/spaced%20name") - ---~ test("zip:///oeps/oeps.zip#bla/bla.tex") ---~ test("zip:///oeps/oeps.zip?bla/bla.tex") - ---~ table.print(url.hashed("/test?test")) +-- print(url.filename("file:///c:/oeps.txt")) +-- print(url.filename("c:/oeps.txt")) +-- print(url.filename("file:///oeps.txt")) +-- print(url.filename("file:///etc/test.txt")) +-- print(url.filename("/oeps.txt")) + +-- from the spec on the web (sort of): + +-- local function test(str) +-- local t = url.hashed(str) +-- t.constructed = url.construct(t) +-- print(table.serialize(t)) +-- end + +-- inspect(url.hashed("http://www.pragma-ade.com/test%20test?test=test%20test&x=123%3d45")) +-- inspect(url.hashed("http://www.pragma-ade.com/test%20test?test=test%20test&x=123%3d45")) + +-- test("sys:///./colo-rgb") + +-- test("/data/site/output/q2p-develop/resources/ecaboperception4_res/topicresources/58313733/figuur-cow.jpg") +-- test("file:///M:/q2p/develop/output/q2p-develop/resources/ecaboperception4_res/topicresources/58313733") +-- test("M:/q2p/develop/output/q2p-develop/resources/ecaboperception4_res/topicresources/58313733") +-- test("file:///q2p/develop/output/q2p-develop/resources/ecaboperception4_res/topicresources/58313733") +-- test("/q2p/develop/output/q2p-develop/resources/ecaboperception4_res/topicresources/58313733") + +-- test("file:///cow%20with%20spaces") +-- test("file:///cow%20with%20spaces.pdf") +-- test("cow%20with%20spaces.pdf") +-- test("some%20file") +-- test("/etc/passwords") +-- test("http://www.myself.com/some%20words.html") +-- test("file:///c:/oeps.txt") +-- test("file:///c|/oeps.txt") +-- test("file:///etc/oeps.txt") +-- test("file://./etc/oeps.txt") +-- test("file:////etc/oeps.txt") +-- test("ftp://ftp.is.co.za/rfc/rfc1808.txt") +-- test("http://www.ietf.org/rfc/rfc2396.txt") +-- test("ldap://[2001:db8::7]/c=GB?objectClass?one#what") +-- test("mailto:John.Doe@example.com") +-- test("news:comp.infosystems.www.servers.unix") +-- test("tel:+1-816-555-1212") +-- test("telnet://192.0.2.16:80/") +-- test("urn:oasis:names:specification:docbook:dtd:xml:4.1.2") +-- test("http://www.pragma-ade.com/spaced%20name") + +-- test("zip:///oeps/oeps.zip#bla/bla.tex") +-- test("zip:///oeps/oeps.zip?bla/bla.tex") + +-- table.print(url.hashed("/test?test")) diff --git a/Master/texmf-dist/tex/context/base/mkiv/lang-def.mkiv b/Master/texmf-dist/tex/context/base/mkiv/lang-def.mkiv index 85c1f3ac775..19f431ebf56 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/lang-def.mkiv +++ b/Master/texmf-dist/tex/context/base/mkiv/lang-def.mkiv @@ -269,6 +269,23 @@ \c!rightquotation=\leftguillemot, \c!date={\v!day,{.},\space,\v!month,\space,\v!year}] +\installlanguage + [\s!hy] + [\c!spacing=\v!packed, + \c!leftsentence=\endash, % *sentences not confirmed + \c!rightsentence=\endash, + \c!leftsubsentence=\endash, + \c!rightsubsentence=\endash, + \c!leftquote=\guilsingleleft, + \c!rightquote=\guilsingleright, + \c!leftquotation=\leftguillemot + \c!rightquotation=\rightguillemot + \c!date={\v!day,\space,\v!month,\space,\v!year}, % word + % \c!date={\v!day,{.},\v!month,{.},\v!year}, % numbers + \s!patterns=\s!hy, + \s!lefthyphenmin=2, + \s!righthyphenmin=2] + \installlanguage [\s!polish] [\s!pl] \installlanguage [\s!czech] [\s!cs] \installlanguage [\s!slovak] [\s!sk] @@ -276,6 +293,10 @@ \installlanguage [\s!slovenian] [\s!sl] \installlanguage [slovene] [\s!sl] % both possible (mojca: still needed?) +\installlanguage [\s!armenian] [\s!hy] +\installlanguage [\s!hye] [\s!hy] % Eastern Armenian +\installlanguage [\s!hyw] [\s!hy] % Western Armenian + % Cyrillic Languages \installlanguage @@ -350,6 +371,21 @@ \c!rightquotation=\upperrightdoublesixquote, \c!date={\v!day,\space,\v!month,\space,\v!year}] +\installlanguage + [\s!bg] + [\s!lefthyphenmin=2, + \s!righthyphenmin=2, + \c!spacing=\v!packed, + \c!leftsentence=\leftguillemot, + \c!rightsentence=\rightguillemot, + \c!leftsubsentence=\lowerleftdoubleninequote, + \c!rightsubsentence=\upperrightdoubleninequote, + \c!leftquote=\lowerleftsingleninequote, + \c!rightquote=\upperrightsinglesixquote, + \c!leftquotation=\lowerleftdoubleninequote, + \c!rightquotation=\upperrightdoublesixquote, + \c!date={\v!day,\space,\v!month,\space,\v!year}] + \installlanguage [\s!russian] [\s!ru] \installlanguage [\s!ukrainian] [\s!ua] \installlanguage [\s!belarussian][\s!be] @@ -357,6 +393,7 @@ \installlanguage [\s!sr-latn] [\s!sr] \installlanguage [\s!sr-cyrl] [\s!sr] \installlanguage [\s!macedonian] [\s!mk] +\installlanguage [\s!bulgarian] [\s!bg] % Uralic Languages: Cheremiss, Estonian, Finnish, Karelian, Laap, @@ -486,7 +523,7 @@ \installlanguage [\s!arabic] [\s!ar] \installlanguage - [\s!pe] + [\s!farsi] [\c!spacing=\v!broad, \c!leftsentence=\emdash, \c!rightsentence=\emdash, @@ -498,9 +535,9 @@ \c!rightquotation=\rightguillemot, \c!date={\v!day,\space,\v!month,\space,\v!year}] -\installlanguage [\s!persian] [\s!pe] -\installlanguage [\s!fa] [\s!pe] % these two are redundant but sometimes might -\installlanguage [\s!farsi] [\s!fa] % sound more natural .. best set labels to 'pe' +\installlanguage [\s!fa] [\s!farsi] +\installlanguage [\s!persian] [\s!farsi] +\installlanguage [\s!pe] [\s!farsi] % Just aliases to "ar" for now @@ -538,21 +575,23 @@ % Artificial Languages: Esperanto \installlanguage - [\s!esperanto] - [%\c!spacing=\v!packed, - %\c!leftsentence=\emdash, - %\c!rightsentence=\emdash, - %\c!leftsubsentence=\emdash, - %\c!rightsubsentence=\emdash, - %\c!leftquote=\lowerleftdoubleninequote, - %\c!rightquote=\upperrightdoublesixquote, - %\c!leftquotation=\lowerleftdoubleninequote, - %\c!rightquotation=\upperrightdoublesixquote, - %\c!date={\v!year,~m.,\space,\v!month,\space,\v!day,~d.}, + [\s!eo] + [\c!spacing=\v!packed, + \c!leftsentence=\endash, + \c!rightsentence=\endash, + \c!leftsubsentence=\endash, + \c!rightsubsentence=\endash, + \c!leftquote=\upperleftsinglesixquote, %U+2018, + \c!rightquote=\upperrightsingleninequote, %U+2019, + \c!leftquotation=\upperleftdoublesixquote, %U+201C, + \c!rightquotation=\upperrightdoubleninequote, %U+201D, + \c!date={\v!day,-a\space de\space,\v!month,\space \v!year}, \s!patterns=eo, \s!lefthyphenmin=2, \s!righthyphenmin=2] +\installlanguage[\s!esperanto][\c!default=\s!eo] + % Baltic Languages: Lettish/Latvian, Lietuvių/Lithuanian \installlanguage diff --git a/Master/texmf-dist/tex/context/base/mkiv/lang-dis.lua b/Master/texmf-dist/tex/context/base/mkiv/lang-dis.lua index 3e4678801f5..f6b27175cb6 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/lang-dis.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/lang-dis.lua @@ -36,8 +36,7 @@ local isglyph = nuts.isglyph local copy_node = nuts.copy local remove_node = nuts.remove -local flush_list = nuts.flush_list -local flush_node = nuts.flush_node +----- flushnode = nuts.flushnode local nextdisc = nuts.traversers.disc @@ -124,12 +123,12 @@ end local wiped = 0 -local flatten_discretionaries = nuts.flatten_discretionaries -- todo in nodes +local flattendiscretionaries = nuts.flattendiscretionaries -- todo in nodes --- if flatten_discretionaries then +-- if flattendiscretionaries then function languages.flatten(head) - local h, n = flatten_discretionaries(head) + local h, n = flattendiscretionaries(head) wiped = wiped + n return h, n > 0 end @@ -152,7 +151,7 @@ local flatten_discretionaries = nuts.flatten_discretionaries -- todo in nodes -- head = h -- end -- wiped = wiped + 1 --- flush_node(delayed) +-- flushnode(delayed) -- return head -- end -- @@ -202,7 +201,7 @@ function languages.explicithyphen(template) local pre, post local disc = new_disc() if template then - local langdata = getlanguagedata(getlang(template)) + local langdata = getlanguagedata(getlanguage(template)) local instance = langdata and langdata.instance if instance then local prechr = prehyphenchar(instance) diff --git a/Master/texmf-dist/tex/context/base/mkiv/lang-exp.lua b/Master/texmf-dist/tex/context/base/mkiv/lang-exp.lua index c2eb46990aa..758ab0f779e 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/lang-exp.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/lang-exp.lua @@ -46,7 +46,7 @@ if LUATEXVERSION < 1.005 then -- not loaded any more local char = isglyph(pre) if char and char <= 0 then done = true - flush_list(pre) + flushlist(pre) pre = nil end end @@ -54,7 +54,7 @@ if LUATEXVERSION < 1.005 then -- not loaded any more local char = isglyph(post) if char and char <= 0 then done = true - flush_list(post) + flushlist(post) post = nil end end @@ -179,7 +179,7 @@ languages.expanders = expanders -- expanded = function(head) -- local done = hyphenate(head) -- if done then --- for d in traverse_id(disc_code,head) do +-- for d in traverseid(disc_code,head) do -- local s = getsubtype(d) -- if s ~= discretionary_code then -- expanders[s](d,template) diff --git a/Master/texmf-dist/tex/context/base/mkiv/lang-hyp.lua b/Master/texmf-dist/tex/context/base/mkiv/lang-hyp.lua index ca9f519cee4..e098e93af5f 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/lang-hyp.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/lang-hyp.lua @@ -656,12 +656,12 @@ if context then local setprev = nuts.setprev local setnext = nuts.setnext - local insert_before = nuts.insert_before - local insert_after = nuts.insert_after + local insertbefore = nuts.insertbefore + local insertafter = nuts.insertafter local copy_node = nuts.copy - local copy_list = nuts.copy_list + local copylist = nuts.copylist local remove_node = nuts.remove - local end_of_math = nuts.end_of_math + local endofmath = nuts.endofmath local node_tail = nuts.tail local nexthlist = nuts.traversers.hlist @@ -1014,7 +1014,7 @@ featureset.hyphenonly = hyphenonly == v_yes -- [nodecodes.rule] = true, -- [nodecodes.dir] = true, -- [nodecodes.whatsit] = true, - -- [nodecodes.ins] = true, + -- [nodecodes.insert] = true, -- [nodecodes.adjust] = true, -- -- [nodecodes.math] = true, @@ -1087,7 +1087,7 @@ featureset.hyphenonly = hyphenonly == v_yes nuts.setvisual(p,"penalty") end last = getprev(last) - first, last = insert_after(first,last,p) + first, last = insertafter(first,last,p) end local function synchronizefeatureset(a) @@ -1245,7 +1245,7 @@ featureset.hyphenonly = hyphenonly == v_yes local glyph = copy_node(stop) setchar(glyph,characters[replacement]) if head then - insert_after(current,current,glyph) + insertafter(current,current,glyph) else head = glyph end @@ -1256,7 +1256,7 @@ featureset.hyphenonly = hyphenonly == v_yes local glyph = copy_node(stop) setchar(glyph,characters[list[i]]) if head then - insert_after(current,current,glyph) + insertafter(current,current,glyph) else head = glyph end @@ -1265,7 +1265,7 @@ featureset.hyphenonly = hyphenonly == v_yes end if rightchar then local glyph = copy_node(stop) - insert_after(current,current,glyph) + insertafter(current,current,glyph) setchar(glyph,rightchar) end return head @@ -1291,7 +1291,7 @@ featureset.hyphenonly = hyphenonly == v_yes setattrlist(disc,attrnode) end -- could be a replace as well - insert_before(first,current,disc) + insertbefore(first,current,disc) elseif type(r) == "table" then local disc = new_disc() local pre = r[1] @@ -1325,7 +1325,7 @@ featureset.hyphenonly = hyphenonly == v_yes if attrnode then setattrlist(disc,attrnode) end - insert_before(first,current,disc) + insertbefore(first,current,disc) else setchar(current,characters[r]) if i < rsize then @@ -1347,7 +1347,7 @@ featureset.hyphenonly = hyphenonly == v_yes if first ~= current then local disc = new_disc() first, current, glyph = remove_node(first,current) - first, current = insert_before(first,current,disc) + first, current = insertbefore(first,current,disc) if trace_visualize then setcolor(glyph,"darkred") -- these get checked setcolor(disc,"darkgreen") -- in the colorizer @@ -1372,7 +1372,7 @@ featureset.hyphenonly = hyphenonly == v_yes local function injectseries(current,last,next,attrnode) local disc = new_disc() local start = current - first, current = insert_before(first,current,disc) + first, current = insertbefore(first,current,disc) setprev(start) setnext(last) if next then @@ -1380,7 +1380,7 @@ featureset.hyphenonly = hyphenonly == v_yes else setnext(current) end - local pre = copy_list(start) + local pre = copylist(start) local post = nil local replace = start setdisc(disc,pre,post,replace,automaticdisc_code,hyphenpenalty) -- ex ? @@ -1547,10 +1547,10 @@ featureset.hyphenonly = hyphenonly == v_yes skipping = true end -- elseif strict and strict[id] then - -- current = id == math_code and getnext(end_of_math(current)) or getnext(current) + -- current = id == math_code and getnext(endofmath(current)) or getnext(current) -- size = 0 else - current = id == math_code and getnext(end_of_math(current)) or getnext(current) + current = id == math_code and getnext(endofmath(current)) or getnext(current) end if size > 0 then if dictionary and size > charmin and leftmin + rightmin <= size then diff --git a/Master/texmf-dist/tex/context/base/mkiv/lang-imp-indic.lua b/Master/texmf-dist/tex/context/base/mkiv/lang-imp-indic.lua new file mode 100644 index 00000000000..164b765cc02 --- /dev/null +++ b/Master/texmf-dist/tex/context/base/mkiv/lang-imp-indic.lua @@ -0,0 +1,2282 @@ +return { + + name = "indic transliterations", + version = "1.00", + comment = "Experimental code, the name of this file might change" + .. "or maybe it become a llg file in the end.", + author = "Sreeram and Hans", + copyright = "ConTeXt development team & whoever made this list", + + transliterations = { + ["iast to deva"] = { + mapping = { + --- vowels + ["a"] = "अ", + ["ā"] = "आ", + ["i"] = "इ", + ["ī"] = "ई", + ["u"] = "उ", + ["ū"] = "ऊ", + ["ṛ"] = "ऋ", + ["ṝ"] = "ॠ", + ["ḷ"] = "ऌ", + ["ḹ"] = "ॡ", + ["è"] = "ऎ", + ["e"] = "ए", + ["ai"] = "ऐ", + ["ò"] = "ऒ", + ["o"] = "ओ", + ["au"] = "औ", + --- consonant forms + ["ka"] = "क", + ["kā"] = "का", + ["ki"] = "कि", + ["kī"] = "की", + ["ku"] = "कु", + ["kū"] = "कू", + ["ke"] = "के", + ["ko"] = "को", + ["kai"] = "कै", + ["kau"] = "कौ", + ["kḷ"] = "कॢ", + ["kḹ"] = "कॣ", + ["kṛ"] = "कृ", + ["kṝ"] = "कॄ", + --- + ["kha"] = "ख", + ["khā"] = "खा", + ["khi"] = "खि", + ["khī"] = "खी", + ["khu"] = "खु", + ["khū"] = "खू", + ["khe"] = "खे", + ["kho"] = "खो", + ["khai"] = "खै", + ["khau"] = "खौ", + ["khḷ"] = "खॢ", + ["khḹ"] = "खॣ", + ["khṛ"] = "खृ", + ["khṝ"] = "खॄ", + --- + ["ga"] = "ग", + ["gā"] = "गा", + ["gi"] = "गि", + ["gī"] = "गी", + ["gu"] = "गु", + ["gū"] = "गू", + ["ge"] = "गे", + ["go"] = "गो", + ["gai"] = "गै", + ["gau"] = "गौ", + ["gḷ"] = "गॢ", + ["gḹ"] = "गॣ", + ["gṛ"] = "गृ", + ["gṝ"] = "गॄ", + --- + ["gha"] = "घ", + ["ghā"] = "घा", + ["ghi"] = "घि", + ["ghī"] = "घी", + ["ghu"] = "घु", + ["ghū"] = "घू", + ["ghe"] = "घे", + ["gho"] = "घो", + ["ghai"] = "घै", + ["ghau"] = "घौ", + ["ghḷ"] = "घॢ", + ["ghḹ"] = "घॣ", + ["ghṛ"] = "घृ", + ["ghṝ"] = "घॄ", + --- + ["ṅa"] = "ङ", + ["ṅā"] = "ङा", + ["ṅi"] = "ङि", + ["ṅī"] = "ङी", + ["ṅu"] = "ङु", + ["ṅū"] = "ङू", + ["ṅe"] = "ङे", + ["ṅo"] = "ङो", + ["ṅai"] = "ङै", + ["ṅau"] = "ङौ", + ["ṅḷ"] = "ङॢ", + ["ṅḹ"] = "ङॣ", + ["ṅṛ"] = "ङृ", + ["ṅṝ"] = "ङॄ", + --- + ["ca"] = "च", + ["cā"] = "चा", + ["ci"] = "चि", + ["cī"] = "ची", + ["cu"] = "चु", + ["cū"] = "चू", + ["ce"] = "चे", + ["co"] = "चो", + ["cai"] = "चै", + ["cau"] = "चौ", + ["cḷ"] = "चॢ", + ["cḹ"] = "चॣ", + ["cṛ"] = "चृ", + ["cṝ"] = "चॄ", + --- + ["cha"] = "छ", + ["chā"] = "छा", + ["chi"] = "छि", + ["chī"] = "छी", + ["chu"] = "छु", + ["chū"] = "छू", + ["che"] = "छे", + ["cho"] = "छो", + ["chai"] = "छै", + ["chau"] = "छौ", + ["chḷ"] = "छॢ", + ["chḹ"] = "छॣ", + ["chṛ"] = "छृ", + ["chṝ"] = "छॄ", + --- + ["ja"] = "ज", + ["jā"] = "जा", + ["ji"] = "जि", + ["jī"] = "जी", + ["ju"] = "जु", + ["jū"] = "जू", + ["je"] = "जे", + ["jo"] = "जो", + ["jai"] = "जै", + ["jau"] = "जौ", + ["jḷ"] = "जॢ", + ["jḹ"] = "जॣ", + ["jṛ"] = "जृ", + ["jṝ"] = "जॄ", + --- + ["jha"] = "झ", + ["jhā"] = "झा", + ["jhi"] = "झि", + ["jhī"] = "झी", + ["jhu"] = "झु", + ["jhū"] = "झू", + ["jhe"] = "झे", + ["jho"] = "झो", + ["jhai"] = "झै", + ["jhau"] = "झौ", + ["jhḷ"] = "झॢ", + ["jhḹ"] = "झॣ", + ["jhṛ"] = "झृ", + ["jhṝ"] = "झॄ", + --- + ["ña"] = "ञ", + ["ñā"] = "ञा", + ["ñi"] = "ञि", + ["ñī"] = "ञी", + ["ñu"] = "ञु", + ["ñū"] = "ञू", + ["ñe"] = "ञे", + ["ño"] = "ञो", + ["ñai"] = "ञै", + ["ñau"] = "ञौ", + ["ñḷ"] = "ञॢ", + ["ñḹ"] = "ञॣ", + ["ñṛ"] = "ञृ", + ["ñṝ"] = "ञॄ", + --- + ["ṭa"] = "ट", + ["ṭā"] = "टा", + ["ṭi"] = "टि", + ["ṭī"] = "टी", + ["ṭu"] = "टु", + ["ṭū"] = "टू", + ["ṭe"] = "टे", + ["ṭo"] = "टो", + ["ṭai"] = "टै", + ["ṭau"] = "टौ", + ["ṭḷ"] = "टॢ", + ["ṭḹ"] = "टॣ", + ["ṭṛ"] = "टृ", + ["ṭṝ"] = "टॄ", + --- + ["ṭha"] = "ठ", + ["ṭhā"] = "ठा", + ["ṭhi"] = "ठि", + ["ṭhī"] = "ठी", + ["ṭhu"] = "ठु", + ["ṭhū"] = "ठू", + ["ṭhe"] = "ठे", + ["ṭho"] = "ठो", + ["ṭhai"] = "ठै", + ["ṭhau"] = "ठौ", + ["ṭhḷ"] = "ठॢ", + ["ṭhḹ"] = "ठॣ", + ["ṭhṛ"] = "ठृ", + ["ṭhṝ"] = "ठॄ", + --- + ["ḍa"] = "ड", + ["ḍā"] = "डा", + ["ḍi"] = "डि", + ["ḍī"] = "डी", + ["ḍu"] = "डु", + ["ḍū"] = "डू", + ["ḍe"] = "डे", + ["ḍo"] = "डो", + ["ḍai"] = "डै", + ["ḍau"] = "डौ", + ["ḍḷ"] = "डॢ", + ["ḍḹ"] = "डॣ", + ["ḍṛ"] = "डृ", + ["ḍṝ"] = "डॄ", + --- + ["ḍha"] = "ढ", + ["ḍhā"] = "ढा", + ["ḍhi"] = "ढि", + ["ḍhī"] = "ढी", + ["ḍhu"] = "ढु", + ["ḍhū"] = "ढू", + ["ḍhe"] = "ढे", + ["ḍho"] = "ढो", + ["ḍhai"] = "ढै", + ["ḍhau"] = "ढौ", + ["ḍhḷ"] = "ढॢ", + ["ḍhḹ"] = "ढॣ", + ["ḍhṛ"] = "ढृ", + ["ḍhṝ"] = "ढॄ", + --- + ["ṇa"] = "ण", + ["ṇā"] = "णा", + ["ṇi"] = "णि", + ["ṇī"] = "णी", + ["ṇu"] = "णु", + ["ṇū"] = "णू", + ["ṇe"] = "णे", + ["ṇo"] = "णो", + ["ṇai"] = "णै", + ["ṇau"] = "णौ", + ["ṇḷ"] = "णॢ", + ["ṇḹ"] = "णॣ", + ["ṇṛ"] = "णृ", + ["ṇṝ"] = "णॄ", + --- + ["ta"] = "त", + ["tā"] = "ता", + ["ti"] = "ति", + ["tī"] = "ती", + ["tu"] = "तु", + ["tū"] = "तू", + ["te"] = "ते", + ["to"] = "तो", + ["tai"] = "तै", + ["tau"] = "तौ", + ["tḷ"] = "तॢ", + ["tḹ"] = "तॣ", + ["tṛ"] = "तृ", + ["tṝ"] = "तॄ", + --- + ["tha"] = "थ", + ["thā"] = "था", + ["thi"] = "थि", + ["thī"] = "थी", + ["thu"] = "थु", + ["thū"] = "थू", + ["the"] = "थे", + ["tho"] = "थो", + ["thai"] = "थै", + ["thau"] = "थौ", + ["thḷ"] = "थॢ", + ["thḹ"] = "थॣ", + ["thṛ"] = "थृ", + ["thṝ"] = "थॄ", + --- + ["da"] = "द", + ["dā"] = "दा", + ["di"] = "दि", + ["dī"] = "दी", + ["du"] = "दु", + ["dū"] = "दू", + ["de"] = "दे", + ["do"] = "दो", + ["dai"] = "दै", + ["dau"] = "दौ", + ["dḷ"] = "दॢ", + ["dḹ"] = "दॣ", + ["dṛ"] = "दृ", + ["dṝ"] = "दॄ", + --- + ["dha"] = "ध", + ["dhā"] = "धा", + ["dhi"] = "धि", + ["dhī"] = "धी", + ["dhu"] = "धु", + ["dhū"] = "धू", + ["dhe"] = "धे", + ["dho"] = "धो", + ["dhai"] = "धै", + ["dhau"] = "धौ", + ["dhḷ"] = "धॢ", + ["dhḹ"] = "धॣ", + ["dhṛ"] = "धृ", + ["dhṝ"] = "धॄ", + --- + ["na"] = "न", + ["nā"] = "ना", + ["ni"] = "नि", + ["nī"] = "नी", + ["nu"] = "नु", + ["nū"] = "नू", + ["ne"] = "ने", + ["no"] = "नो", + ["nai"] = "नै", + ["nau"] = "नौ", + ["nḷ"] = "नॢ", + ["nḹ"] = "नॣ", + ["nṛ"] = "नृ", + ["nṝ"] = "नॄ", + --- + ["pa"] = "प", + ["pā"] = "पा", + ["pi"] = "पि", + ["pī"] = "पी", + ["pu"] = "पु", + ["pū"] = "पू", + ["pe"] = "पे", + ["po"] = "पो", + ["pai"] = "पै", + ["pau"] = "पौ", + ["pḷ"] = "पॢ", + ["pḹ"] = "पॣ", + ["pṛ"] = "पृ", + ["pṝ"] = "पॄ", + --- + ["pha"] = "फ", + ["phā"] = "फा", + ["phi"] = "फि", + ["phī"] = "फी", + ["phu"] = "फु", + ["phū"] = "फू", + ["phe"] = "फे", + ["pho"] = "फो", + ["phai"] = "फै", + ["phau"] = "फौ", + ["phḷ"] = "फॢ", + ["phḹ"] = "फॣ", + ["phṛ"] = "फृ", + ["phṝ"] = "फॄ", + --- + ["ba"] = "ब", + ["bā"] = "बा", + ["bi"] = "बि", + ["bī"] = "बी", + ["bu"] = "बु", + ["bū"] = "बू", + ["be"] = "बे", + ["bo"] = "बो", + ["bai"] = "बै", + ["bau"] = "बौ", + ["bḷ"] = "बॢ", + ["bḹ"] = "बॣ", + ["bṛ"] = "बृ", + ["bṝ"] = "बॄ", + --- + ["bha"] = "भ", + ["bhā"] = "भा", + ["bhi"] = "भि", + ["bhī"] = "भी", + ["bhu"] = "भु", + ["bhū"] = "भू", + ["bhe"] = "भे", + ["bho"] = "भो", + ["bhai"] = "भै", + ["bhau"] = "भौ", + ["bhḷ"] = "भॢ", + ["bhḹ"] = "भॣ", + ["bhṛ"] = "भृ", + ["bhṝ"] = "भॄ", + --- + ["ma"] = "म", + ["mā"] = "मा", + ["mi"] = "मि", + ["mī"] = "मी", + ["mu"] = "मु", + ["mū"] = "मू", + ["me"] = "मे", + ["mo"] = "मो", + ["mai"] = "मै", + ["mau"] = "मौ", + ["mḷ"] = "मॢ", + ["mḹ"] = "मॣ", + ["mṛ"] = "मृ", + ["mṝ"] = "मॄ", + --- + ["ya"] = "य", + ["yā"] = "या", + ["yi"] = "यि", + ["yī"] = "यी", + ["yu"] = "यु", + ["yū"] = "यू", + ["ye"] = "ये", + ["yo"] = "यो", + ["yai"] = "यै", + ["yau"] = "यौ", + ["yḷ"] = "यॢ", + ["yḹ"] = "यॣ", + ["yṛ"] = "यृ", + ["yṝ"] = "यॄ", + --- + ["ra"] = "र", + ["rā"] = "रा", + ["ri"] = "रि", + ["rī"] = "री", + ["ru"] = "रु", + ["rū"] = "रू", + ["re"] = "रे", + ["ro"] = "रो", + ["rai"] = "रै", + ["rau"] = "रौ", + ["rḷ"] = "रॢ", + ["rḹ"] = "रॣ", + ["rṛ"] = "रृ", + ["rṝ"] = "रॄ", + --- + ["la"] = "ल", + ["lā"] = "ला", + ["li"] = "लि", + ["lī"] = "ली", + ["lu"] = "लु", + ["lū"] = "लू", + ["le"] = "ले", + ["lo"] = "लो", + ["lai"] = "लै", + ["lau"] = "लौ", + ["lḷ"] = "लॢ", + ["lḹ"] = "लॣ", + ["lṛ"] = "लृ", + ["lṝ"] = "लॄ", + --- + ["va"] = "व", + ["vā"] = "वा", + ["vi"] = "वि", + ["vī"] = "वी", + ["vu"] = "वु", + ["vū"] = "वू", + ["ve"] = "वे", + ["vo"] = "वो", + ["vai"] = "वै", + ["vau"] = "वौ", + ["vḷ"] = "वॢ", + ["vḹ"] = "वॣ", + ["vṛ"] = "वृ", + ["vṝ"] = "वॄ", + --- + ["śa"] = "श", + ["śā"] = "शा", + ["śi"] = "शि", + ["śī"] = "शी", + ["śu"] = "शु", + ["śū"] = "शू", + ["śe"] = "शे", + ["śo"] = "शो", + ["śai"] = "शै", + ["śau"] = "शौ", + ["śḷ"] = "शॢ", + ["śḹ"] = "शॣ", + ["śṛ"] = "शृ", + ["śṝ"] = "शॄ", + --- + ["ṣa"] = "ष", + ["ṣā"] = "षा", + ["ṣi"] = "षि", + ["ṣī"] = "षी", + ["ṣu"] = "षु", + ["ṣū"] = "षू", + ["ṣe"] = "षे", + ["ṣo"] = "षो", + ["ṣai"] = "षै", + ["ṣau"] = "षौ", + ["ṣḷ"] = "षॢ", + ["ṣḹ"] = "षॣ", + ["ṣṛ"] = "षृ", + ["ṣṝ"] = "षॄ", + --- + ["sa"] = "स", + ["sā"] = "सा", + ["si"] = "सि", + ["sī"] = "सी", + ["su"] = "सु", + ["sū"] = "सू", + ["se"] = "से", + ["so"] = "सो", + ["sai"] = "सै", + ["sau"] = "सौ", + ["sḷ"] = "सॢ", + ["sḹ"] = "सॣ", + ["sṛ"] = "सृ", + ["sṝ"] = "सॄ", + --- + ["ha"] = "ह", + ["hā"] = "हा", + ["hi"] = "हि", + ["hī"] = "ही", + ["hu"] = "हु", + ["hū"] = "हू", + ["he"] = "हे", + ["ho"] = "हो", + ["hai"] = "है", + ["hau"] = "हौ", + ["hḷ"] = "हॢ", + ["hḹ"] = "हॣ", + ["hṛ"] = "हृ", + ["hṝ"] = "हॄ", + --- + ["ḻa"] = "ळ", + ["ḻā"] = "ळा", + ["ḻi"] = "ळि", + ["ḻī"] = "ळी", + ["ḻu"] = "ळु", + ["ḻū"] = "ळू", + ["ḻe"] = "ळे", + ["ḻo"] = "ळो", + ["ḻai"] = "ळै", + ["ḻau"] = "ळौ", + ["ḻḷ"] = "ळॢ", + ["ḻḹ"] = "ळॣ", + ["ḻṛ"] = "ळृ", + ["ḻṝ"] = "ळॄ", + --- + ["kṣa"] = "क्ष", + ["kṣā"] = "क्षा", + ["kṣi"] = "क्षि", + ["kṣī"] = "क्षी", + ["kṣu"] = "क्षु", + ["kṣū"] = "क्षू", + ["kṣe"] = "क्षे", + ["kṣo"] = "क्षो", + ["kṣai"] = "क्षै", + ["kṣau"] = "क्षौ", + ["kṣḷ"] = "क्षॢ", + ["kṣḹ"] = "क्षॣ", + ["kṣṛ"] = "क्षृ", + ["kṣṝ"] = "क्षॄ", + --- + ["jña"] = "ज्ञ", + ["jñā"] = "ज्ञा", + ["jñi"] = "ज्ञि", + ["jñī"] = "ज्ञी", + ["jñu"] = "ज्ञु", + ["jñū"] = "ज्ञू", + ["jñe"] = "ज्ञे", + ["jño"] = "ज्ञो", + ["jñai"] = "ज्ञै", + ["jñau"] = "ज्ञौ", + ["jñḷ"] = "ज्ञॢ", + ["jñḹ"] = "ज्ञॣ", + ["jñṛ"] = "ज्ञृ", + ["jñṝ"] = "ज्ञॄ", + --- + ["k"] = "क्", + ["kh"] = "ख्", + ["g"] = "ग्", + ["gh"] = "घ्", + ["ṅ"] = "ङ्", + ["c"] = "च्", + ["ch"] = "छ्", + ["j"] = "ज्", + ["jh"] = "झ्", + ["ñ"] = "ञ्", + ["ṭ"] = "ट्", + ["ṭh"] = "ठ्", + ["ḍ"] = "ड्", + ["ḍh"] = "ढ्", + ["ṇ"] = "ण्", + ["t"] = "त्", + ["th"] = "थ्", + ["d"] = "द्", + ["dh"] = "ध्", + ["n"] = "न्", + ["p"] = "प्", + ["ph"] = "फ्", + ["b"] = "ब्", + ["bh"] = "भ्", + ["m"] = "म्", + ["y"] = "य्", + ["r"] = "र्", + ["l"] = "ल्", + ["v"] = "व्", + ["ś"] = "श्", + ["ṣ"] = "ष्", + ["s"] = "स्", + ["h"] = "ह्", + ["ḻ"] = "ळ्", + ["kṣ"] = "क्ष्", + ["jñ"] = "ज्ञ्", + -- yogavaahas (always with phonetic) + ["ṁ"] = "ं", + ["ḥ"] = "ः", + ["ँ"] = "ँ", + -- punctuations + ["viraama"] = "्", + ["."] = "।", + ["|"] = "।", + ["||"] = "॥", + }, + }, + ["itrans to deva"] = { + mapping = { + --- vowels + ["a"] = "अ", + ["A"] = "आ", + ["i"] = "इ", + ["I"] = "ई", + ["u"] = "उ", + ["U"] = "ऊ", + ["RRi"] = "ऋ", + ["RRI"] = "ॠ", + ["LLi"] = "ऌ", + ["LLI"] = "ॡ", + ["e"] = "ए", + ["ai"] = "ऐ", + ["o"] = "ओ", + ["au"] = "औ", + --- consonant forms + ["ka"] = "क", + ["kA"] = "का", + ["ki"] = "कि", + ["kI"] = "की", + ["ku"] = "कु", + ["kU"] = "कू", + ["ke"] = "के", + ["ko"] = "को", + ["kai"] = "कै", + ["kau"] = "कौ", + ["kLLi"] = "कॢ", + ["kLLI"] = "कॣ", + ["kRRi"] = "कृ", + ["kRRI"] = "कॄ", + --- + ["kha"] = "ख", + ["khA"] = "खा", + ["khi"] = "खि", + ["khI"] = "खी", + ["khu"] = "खु", + ["khU"] = "खू", + ["khe"] = "खे", + ["kho"] = "खो", + ["khai"] = "खै", + ["khau"] = "खौ", + ["khLLi"] = "खॢ", + ["khLLI"] = "खॣ", + ["khRRi"] = "खृ", + ["khRRI"] = "खॄ", + --- + ["ga"] = "ग", + ["gA"] = "गा", + ["gi"] = "गि", + ["gI"] = "गी", + ["gu"] = "गु", + ["gU"] = "गू", + ["ge"] = "गे", + ["go"] = "गो", + ["gai"] = "गै", + ["gau"] = "गौ", + ["gLLi"] = "गॢ", + ["gLLI"] = "गॣ", + ["gRRi"] = "गृ", + ["gRRI"] = "गॄ", + --- + ["gha"] = "घ", + ["ghA"] = "घा", + ["ghi"] = "घि", + ["ghI"] = "घी", + ["ghu"] = "घु", + ["ghU"] = "घू", + ["ghe"] = "घे", + ["gho"] = "घो", + ["ghai"] = "घै", + ["ghau"] = "घौ", + ["ghLLi"] = "घॢ", + ["ghLLI"] = "घॣ", + ["ghRRi"] = "घृ", + ["ghRRI"] = "घॄ", + --- + ["~Na"] = "ङ", + ["~NA"] = "ङा", + ["~Ni"] = "ङि", + ["~NI"] = "ङी", + ["~Nu"] = "ङु", + ["~NU"] = "ङू", + ["~Ne"] = "ङे", + ["~No"] = "ङो", + ["~Nai"] = "ङै", + ["~Nau"] = "ङौ", + ["~NLLi"] = "ङॢ", + ["~NLLI"] = "ङॣ", + ["~NRRi"] = "ङृ", + ["~NRRI"] = "ङॄ", + --- + ["ca"] = "च", + ["cA"] = "चा", + ["ci"] = "चि", + ["cI"] = "ची", + ["cu"] = "चु", + ["cU"] = "चू", + ["ce"] = "चे", + ["co"] = "चो", + ["cai"] = "चै", + ["cau"] = "चौ", + ["cLLi"] = "चॢ", + ["cLLI"] = "चॣ", + ["cRRi"] = "चृ", + ["cRRI"] = "चॄ", + --- + ["cha"] = "छ", + ["chA"] = "छा", + ["chi"] = "छि", + ["chI"] = "छी", + ["chu"] = "छु", + ["chU"] = "छू", + ["che"] = "छे", + ["cho"] = "छो", + ["chai"] = "छै", + ["chau"] = "छौ", + ["chLLi"] = "छॢ", + ["chLLI"] = "छॣ", + ["chRRi"] = "छृ", + ["chRRI"] = "छॄ", + --- + ["ja"] = "ज", + ["jA"] = "जा", + ["ji"] = "जि", + ["jI"] = "जी", + ["ju"] = "जु", + ["jU"] = "जू", + ["je"] = "जे", + ["jo"] = "जो", + ["jai"] = "जै", + ["jau"] = "जौ", + ["jLLi"] = "जॢ", + ["jLLI"] = "जॣ", + ["jRRi"] = "जृ", + ["jRRI"] = "जॄ", + --- + ["jha"] = "झ", + ["jhA"] = "झा", + ["jhi"] = "झि", + ["jhI"] = "झी", + ["jhu"] = "झु", + ["jhU"] = "झू", + ["jhe"] = "झे", + ["jho"] = "झो", + ["jhai"] = "झै", + ["jhau"] = "झौ", + ["jhLLi"] = "झॢ", + ["jhLLI"] = "झॣ", + ["jhRRi"] = "झृ", + ["jhRRI"] = "झॄ", + --- + ["~na"] = "ञ", + ["~nA"] = "ञा", + ["~ni"] = "ञि", + ["~nI"] = "ञी", + ["~nu"] = "ञु", + ["~nU"] = "ञू", + ["~ne"] = "ञे", + ["~no"] = "ञो", + ["~nai"] = "ञै", + ["~nau"] = "ञौ", + ["~nLLi"] = "ञॢ", + ["~nLLI"] = "ञॣ", + ["~nRRi"] = "ञृ", + ["~nRRI"] = "ञॄ", + --- + ["Ta"] = "ट", + ["TA"] = "टा", + ["Ti"] = "टि", + ["TI"] = "टी", + ["Tu"] = "टु", + ["TU"] = "टू", + ["Te"] = "टे", + ["To"] = "टो", + ["Tai"] = "टै", + ["Tau"] = "टौ", + ["TLLi"] = "टॢ", + ["TLLI"] = "टॣ", + ["TRRi"] = "टृ", + ["TRRI"] = "टॄ", + --- + ["Tha"] = "ठ", + ["ThA"] = "ठा", + ["Thi"] = "ठि", + ["ThI"] = "ठी", + ["Thu"] = "ठु", + ["ThU"] = "ठू", + ["The"] = "ठे", + ["Tho"] = "ठो", + ["Thai"] = "ठै", + ["Thau"] = "ठौ", + ["ThLLi"] = "ठॢ", + ["ThLLI"] = "ठॣ", + ["ThRRi"] = "ठृ", + ["ThRRI"] = "ठॄ", + --- + ["Da"] = "ड", + ["DA"] = "डा", + ["Di"] = "डि", + ["DI"] = "डी", + ["Du"] = "डु", + ["DU"] = "डू", + ["De"] = "डे", + ["Do"] = "डो", + ["Dai"] = "डै", + ["Dau"] = "डौ", + ["DLLi"] = "डॢ", + ["DLLI"] = "डॣ", + ["DRRi"] = "डृ", + ["DRRI"] = "डॄ", + --- + ["Dha"] = "ढ", + ["DhA"] = "ढा", + ["Dhi"] = "ढि", + ["DhI"] = "ढी", + ["Dhu"] = "ढु", + ["DhU"] = "ढू", + ["Dhe"] = "ढे", + ["Dho"] = "ढो", + ["Dhai"] = "ढै", + ["Dhau"] = "ढौ", + ["DhLLi"] = "ढॢ", + ["DhLLI"] = "ढॣ", + ["DhRRi"] = "ढृ", + ["DhRRI"] = "ढॄ", + --- + ["Na"] = "ण", + ["NA"] = "णा", + ["Ni"] = "णि", + ["NI"] = "णी", + ["Nu"] = "णु", + ["NU"] = "णू", + ["Ne"] = "णे", + ["No"] = "णो", + ["Nai"] = "णै", + ["Nau"] = "णौ", + ["NLLi"] = "णॢ", + ["NLLI"] = "णॣ", + ["NRRi"] = "णृ", + ["NRRI"] = "णॄ", + --- + ["ta"] = "त", + ["tA"] = "ता", + ["ti"] = "ति", + ["tI"] = "ती", + ["tu"] = "तु", + ["tU"] = "तू", + ["te"] = "ते", + ["to"] = "तो", + ["tai"] = "तै", + ["tau"] = "तौ", + ["tLLi"] = "तॢ", + ["tLLI"] = "तॣ", + ["tRRi"] = "तृ", + ["tRRI"] = "तॄ", + --- + ["tha"] = "थ", + ["thA"] = "था", + ["thi"] = "थि", + ["thI"] = "थी", + ["thu"] = "थु", + ["thU"] = "थू", + ["the"] = "थे", + ["tho"] = "थो", + ["thai"] = "थै", + ["thau"] = "थौ", + ["thLLi"] = "थॢ", + ["thLLI"] = "थॣ", + ["thRRi"] = "थृ", + ["thRRI"] = "थॄ", + --- + ["da"] = "द", + ["dA"] = "दा", + ["di"] = "दि", + ["dI"] = "दी", + ["du"] = "दु", + ["dU"] = "दू", + ["de"] = "दे", + ["do"] = "दो", + ["dai"] = "दै", + ["dau"] = "दौ", + ["dLLi"] = "दॢ", + ["dLLI"] = "दॣ", + ["dRRi"] = "दृ", + ["dRRI"] = "दॄ", + --- + ["dha"] = "ध", + ["dhA"] = "धा", + ["dhi"] = "धि", + ["dhI"] = "धी", + ["dhu"] = "धु", + ["dhU"] = "धू", + ["dhe"] = "धे", + ["dho"] = "धो", + ["dhai"] = "धै", + ["dhau"] = "धौ", + ["dhLLi"] = "धॢ", + ["dhLLI"] = "धॣ", + ["dhRRi"] = "धृ", + ["dhRRI"] = "धॄ", + --- + ["na"] = "न", + ["nA"] = "ना", + ["ni"] = "नि", + ["nI"] = "नी", + ["nu"] = "नु", + ["nU"] = "नू", + ["ne"] = "ने", + ["no"] = "नो", + ["nai"] = "नै", + ["nau"] = "नौ", + ["nLLi"] = "नॢ", + ["nLLI"] = "नॣ", + ["nRRi"] = "नृ", + ["nRRI"] = "नॄ", + --- + ["pa"] = "प", + ["pA"] = "पा", + ["pi"] = "पि", + ["pI"] = "पी", + ["pu"] = "पु", + ["pU"] = "पू", + ["pe"] = "पे", + ["po"] = "पो", + ["pai"] = "पै", + ["pau"] = "पौ", + ["pLLi"] = "पॢ", + ["pLLI"] = "पॣ", + ["pRRi"] = "पृ", + ["pRRI"] = "पॄ", + --- + ["pha"] = "फ", + ["phA"] = "फा", + ["phi"] = "फि", + ["phI"] = "फी", + ["phu"] = "फु", + ["phU"] = "फू", + ["phe"] = "फे", + ["pho"] = "फो", + ["phai"] = "फै", + ["phau"] = "फौ", + ["phLLi"] = "फॢ", + ["phLLI"] = "फॣ", + ["phRRi"] = "फृ", + ["phRRI"] = "फॄ", + --- + ["ba"] = "ब", + ["bA"] = "बा", + ["bi"] = "बि", + ["bI"] = "बी", + ["bu"] = "बु", + ["bU"] = "बू", + ["be"] = "बे", + ["bo"] = "बो", + ["bai"] = "बै", + ["bau"] = "बौ", + ["bLLi"] = "बॢ", + ["bLLI"] = "बॣ", + ["bRRi"] = "बृ", + ["bRRI"] = "बॄ", + --- + ["bha"] = "भ", + ["bhA"] = "भा", + ["bhi"] = "भि", + ["bhI"] = "भी", + ["bhu"] = "भु", + ["bhU"] = "भू", + ["bhe"] = "भे", + ["bho"] = "भो", + ["bhai"] = "भै", + ["bhau"] = "भौ", + ["bhLLi"] = "भॢ", + ["bhLLI"] = "भॣ", + ["bhRRi"] = "भृ", + ["bhRRI"] = "भॄ", + --- + ["ma"] = "म", + ["mA"] = "मा", + ["mi"] = "मि", + ["mI"] = "मी", + ["mu"] = "मु", + ["mU"] = "मू", + ["me"] = "मे", + ["mo"] = "मो", + ["mai"] = "मै", + ["mau"] = "मौ", + ["mLLi"] = "मॢ", + ["mLLI"] = "मॣ", + ["mRRi"] = "मृ", + ["mRRI"] = "मॄ", + --- + ["ya"] = "य", + ["yA"] = "या", + ["yi"] = "यि", + ["yI"] = "यी", + ["yu"] = "यु", + ["yU"] = "यू", + ["ye"] = "ये", + ["yo"] = "यो", + ["yai"] = "यै", + ["yau"] = "यौ", + ["yLLi"] = "यॢ", + ["yLLI"] = "यॣ", + ["yRRi"] = "यृ", + ["yRRI"] = "यॄ", + --- + ["ra"] = "र", + ["rA"] = "रा", + ["ri"] = "रि", + ["rI"] = "री", + ["ru"] = "रु", + ["rU"] = "रू", + ["re"] = "रे", + ["ro"] = "रो", + ["rai"] = "रै", + ["rau"] = "रौ", + ["rLLi"] = "रॢ", + ["rLLI"] = "रॣ", + ["rRRi"] = "रृ", + ["rRRI"] = "रॄ", + --- + ["la"] = "ल", + ["lA"] = "ला", + ["li"] = "लि", + ["lI"] = "ली", + ["lu"] = "लु", + ["lU"] = "लू", + ["le"] = "ले", + ["lo"] = "लो", + ["lai"] = "लै", + ["lau"] = "लौ", + ["lLLi"] = "लॢ", + ["lLLI"] = "लॣ", + ["lRRi"] = "लृ", + ["lRRI"] = "लॄ", + --- + ["va"] = "व", + ["vA"] = "वा", + ["vi"] = "वि", + ["vI"] = "वी", + ["vu"] = "वु", + ["vU"] = "वू", + ["ve"] = "वे", + ["vo"] = "वो", + ["vai"] = "वै", + ["vau"] = "वौ", + ["vLLi"] = "वॢ", + ["vLLI"] = "वॣ", + ["vRRi"] = "वृ", + ["vRRI"] = "वॄ", + --- + ["sha"] = "श", + ["shA"] = "शा", + ["shi"] = "शि", + ["shI"] = "शी", + ["shu"] = "शु", + ["shU"] = "शू", + ["she"] = "शे", + ["sho"] = "शो", + ["shai"] = "शै", + ["shau"] = "शौ", + ["shLLi"] = "शॢ", + ["shLLI"] = "शॣ", + ["shRRi"] = "शृ", + ["shRRI"] = "शॄ", + --- + ["Sha"] = "ष", + ["ShA"] = "षा", + ["Shi"] = "षि", + ["ShI"] = "षी", + ["Shu"] = "षु", + ["ShU"] = "षू", + ["She"] = "षे", + ["Sho"] = "षो", + ["Shai"] = "षै", + ["Shau"] = "षौ", + ["ShLLi"] = "षॢ", + ["ShLLI"] = "षॣ", + ["ShRRi"] = "षृ", + ["ShRRI"] = "षॄ", + --- + ["sa"] = "स", + ["sA"] = "सा", + ["si"] = "सि", + ["sI"] = "सी", + ["su"] = "सु", + ["sU"] = "सू", + ["se"] = "से", + ["so"] = "सो", + ["sai"] = "सै", + ["sau"] = "सौ", + ["sLLi"] = "सॢ", + ["sLLI"] = "सॣ", + ["sRRi"] = "सृ", + ["sRRI"] = "सॄ", + --- + ["ha"] = "ह", + ["hA"] = "हा", + ["hi"] = "हि", + ["hI"] = "ही", + ["hu"] = "हु", + ["hU"] = "हू", + ["he"] = "हे", + ["ho"] = "हो", + ["hai"] = "है", + ["hau"] = "हौ", + ["hLLi"] = "हॢ", + ["hLLI"] = "हॣ", + ["hRRi"] = "हृ", + ["hRRI"] = "हॄ", + --- + ["ḻa"] = "ळ", + ["ḻA"] = "ळा", + ["ḻi"] = "ळि", + ["ḻI"] = "ळी", + ["ḻu"] = "ळु", + ["ḻU"] = "ळू", + ["ḻe"] = "ळे", + ["ḻo"] = "ळो", + ["ḻai"] = "ळै", + ["ḻau"] = "ळौ", + ["ḻLLi"] = "ळॢ", + ["ḻLLI"] = "ळॣ", + ["ḻRRi"] = "ळृ", + ["ḻRRI"] = "ळॄ", + --- + ["xa"] = "क्ष", + ["xA"] = "क्षा", + ["xi"] = "क्षि", + ["xI"] = "क्षी", + ["xu"] = "क्षु", + ["xU"] = "क्षू", + ["xe"] = "क्षे", + ["xo"] = "क्षो", + ["xai"] = "क्षै", + ["xau"] = "क्षौ", + ["xLLi"] = "क्षॢ", + ["xLLI"] = "क्षॣ", + ["xRRi"] = "क्षृ", + ["xRRI"] = "क्षॄ", + --- + ["j~na"] = "ज्ञ", + ["j~nA"] = "ज्ञा", + ["j~ni"] = "ज्ञि", + ["j~nI"] = "ज्ञी", + ["j~nu"] = "ज्ञु", + ["j~nU"] = "ज्ञू", + ["j~ne"] = "ज्ञे", + ["j~no"] = "ज्ञो", + ["j~nai"] = "ज्ञै", + ["j~nau"] = "ज्ञौ", + ["j~nLLi"] = "ज्ञॢ", + ["j~nLLI"] = "ज्ञॣ", + ["j~nRRi"] = "ज्ञृ", + ["j~nRRI"] = "ज्ञॄ", + --- + ["k"] = "क्", + ["kh"] = "ख्", + ["g"] = "ग्", + ["gh"] = "घ्", + ["~N"] = "ङ्", + ["c"] = "च्", + ["ch"] = "छ्", + ["j"] = "ज्", + ["jh"] = "झ्", + ["~n"] = "ञ्", + ["T"] = "ट्", + ["Th"] = "ठ्", + ["D"] = "ड्", + ["Dh"] = "ढ्", + ["N"] = "ण्", + ["t"] = "त्", + ["th"] = "थ्", + ["d"] = "द्", + ["dh"] = "ध्", + ["n"] = "न्", + ["p"] = "प्", + ["ph"] = "फ्", + ["b"] = "ब्", + ["bh"] = "भ्", + ["m"] = "म्", + ["y"] = "य्", + ["r"] = "र्", + ["l"] = "ल्", + ["v"] = "व्", + ["sh"] = "श्", + ["Sh"] = "ष्", + ["s"] = "स्", + ["h"] = "ह्", + ["ḻ"] = "ळ्", + ["x"] = "क्ष्", + ["j~n"] = "ज्ञ्", + -- yogavaahas (always with phonetic) + ["M"] = "ं", + ["H"] = "ः", + ["ँ"] = "ँ", + -- punctuations + ["viraama"] = "्", + ["."] = "।", + ["|"] = "।", + ["||"] = "॥", + }, + }, + ["deva to iast"] = { + mapping = { + -- vowels + ["अ"] = "a", + ["आ"] = "ā", + ["इ"] = "i", + ["ई"] = "ī", + ["उ"] = "u", + ["ऊ"] = "ū", + ["ऋ"] = "ṛ", + ["ॠ"] = "ṝ", + ["ऌ"] = "ḷ", + ["ॡ"] = "ḹ", + ["ऎ"] = "è", + ["ए"] = "e", + ["ऐ"] = "ai", + ["ऒ"] = "ò", + ["ओ"] = "o", + ["औ"] = "au", + -- consonant + vowel forms + ["क"]= "ka", + ["का"] = "kā", + ["कि"] = "ki", + ["की"] = "kī", + ["कु"] = "ku", + ["कू"] = "kū", + ["के"] = "ke", + ["को"] = "ko", + ["कै"] = "kai", + ["कौ"] = "kau", + ["कॢ"] = "kḷ", + ["कॣ"] = "kḹ", + ["कृ"] = "kṛ", + ["कॄ"] = "kṝ", + --- + ["ख"]= "kha", + ["खा"] = "khā", + ["खि"] = "khi", + ["खी"] = "khī", + ["खु"] = "khu", + ["खू"] = "khū", + ["खे"] = "khe", + ["खो"] = "kho", + ["खै"] = "khai", + ["खौ"] = "khau", + ["खॢ"] = "khḷ", + ["खॣ"] = "khḹ", + ["खृ"] = "khṛ", + ["खॄ"] = "khṝ", + --- + ["ग"]= "ga", + ["गा"] = "gā", + ["गि"] = "gi", + ["गी"] = "gī", + ["गु"] = "gu", + ["गू"] = "gū", + ["गे"] = "ge", + ["गो"] = "go", + ["गै"] = "gai", + ["गौ"] = "gau", + ["गॢ"] = "gḷ", + ["गॣ"] = "gḹ", + ["गृ"] = "gṛ", + ["गॄ"] = "gṝ", + --- + ["घ"]= "gha", + ["घा"] = "ghā", + ["घि"] = "ghi", + ["घी"] = "ghī", + ["घु"] = "ghu", + ["घू"] = "ghū", + ["घे"] = "ghe", + ["घो"] = "gho", + ["घै"] = "ghai", + ["घौ"] = "ghau", + ["घॢ"] = "ghḷ", + ["घॣ"] = "ghḹ", + ["घृ"] = "ghṛ", + ["घॄ"] = "ghṝ", + --- + ["ङ"]= "ṅa", + ["ङा"] = "ṅā", + ["ङि"] = "ṅi", + ["ङी"] = "ṅī", + ["ङु"] = "ṅu", + ["ङू"] = "ṅū", + ["ङे"] = "ṅe", + ["ङो"] = "ṅo", + ["ङै"] = "ṅai", + ["ङौ"] = "ṅau", + ["ङॢ"] = "ṅḷ", + ["ङॣ"] = "ṅḹ", + ["ङृ"] = "ṅṛ", + ["ङॄ"] = "ṅṝ", + --- + ["च"]= "ca", + ["चा"] = "cā", + ["चि"] = "ci", + ["ची"] = "cī", + ["चु"] = "cu", + ["चू"] = "cū", + ["चे"] = "ce", + ["चो"] = "co", + ["चै"] = "cai", + ["चौ"] = "cau", + ["चॢ"] = "cḷ", + ["चॣ"] = "cḹ", + ["चृ"] = "cṛ", + ["चॄ"] = "cṝ", + -- + ["छ"]= "cha", + ["छा"] = "chā", + ["छि"] = "chi", + ["छी"] = "chī", + ["छु"] = "chu", + ["छू"] = "chū", + ["छे"] = "che", + ["छो"] = "cho", + ["छै"] = "chai", + ["छौ"] = "chau", + ["छॢ"] = "chḷ", + ["छॣ"] = "chḹ", + ["छृ"] = "chṛ", + ["छॄ"] = "chṝ", + -- + ["ज"]= "ja", + ["जा"] = "jā", + ["जि"] = "ji", + ["जी"] = "jī", + ["जु"] = "ju", + ["जू"] = "jū", + ["जे"] = "je", + ["जो"] = "jo", + ["जै"] = "jai", + ["जौ"] = "jau", + ["जॢ"] = "jḷ", + ["जॣ"] = "jḹ", + ["जृ"] = "jṛ", + ["जॄ"] = "jṝ", + -- + ["झ"]= "jha", + ["झा"] = "jhā", + ["झि"] = "jhi", + ["झी"] = "jhī", + ["झु"] = "jhu", + ["झू"] = "jhū", + ["झे"] = "jhe", + ["झो"] = "jho", + ["झै"] = "jhai", + ["झौ"] = "jhau", + ["झॢ"] = "jhḷ", + ["झॣ"] = "jhḹ", + ["झृ"] = "jhṛ", + ["झॄ"] = "jhṝ", + -- + ["ञ"]= "ña", + ["ञा"] = "ñā", + ["ञि"] = "ñi", + ["ञी"] = "ñī", + ["ञु"] = "ñu", + ["ञू"] = "ñū", + ["ञे"] = "ñe", + ["ञो"] = "ño", + ["ञै"] = "ñai", + ["ञौ"] = "ñau", + ["ञॢ"] = "ñḷ", + ["ञॣ"] = "ñḹ", + ["ञृ"] = "ñṛ", + ["ञॄ"] = "ñṝ", + -- + ["ट"]= "ṭa", + ["टा"] = "ṭā", + ["टि"] = "ṭi", + ["टी"] = "ṭī", + ["टु"] = "ṭu", + ["टू"] = "ṭū", + ["टे"] = "ṭe", + ["टो"] = "ṭo", + ["टै"] = "ṭai", + ["टौ"] = "ṭau", + ["टॢ"] = "ṭḷ", + ["टॣ"] = "ṭḹ", + ["टृ"] = "ṭṛ", + ["टॄ"] = "ṭṝ", + -- + ["ठ"]= "ṭha", + ["ठा"] = "ṭhā", + ["ठि"] = "ṭhi", + ["ठी"] = "ṭhī", + ["ठु"] = "ṭhu", + ["ठू"] = "ṭhū", + ["ठे"] = "ṭhe", + ["ठो"] = "ṭho", + ["ठै"] = "ṭhai", + ["ठौ"] = "ṭhau", + ["ठॢ"] = "ṭhḷ", + ["ठॣ"] = "ṭhḹ", + ["ठृ"] = "ṭhṛ", + ["ठॄ"] = "ṭhṝ", + -- + ["ड"]= "ḍa", + ["डा"] = "ḍā", + ["डि"] = "ḍi", + ["डी"] = "ḍī", + ["डु"] = "ḍu", + ["डू"] = "ḍū", + ["डे"] = "ḍe", + ["डो"] = "ḍo", + ["डै"] = "ḍai", + ["डौ"] = "ḍau", + ["डॢ"] = "ḍḷ", + ["डॣ"] = "ḍḹ", + ["डृ"] = "ḍṛ", + ["डॄ"] = "ḍṝ", + -- + ["ढ"]= "ḍha", + ["ढा"] = "ḍhā", + ["ढि"] = "ḍhi", + ["ढी"] = "ḍhī", + ["ढु"] = "ḍhu", + ["ढू"] = "ḍhū", + ["ढे"] = "ḍhe", + ["ढो"] = "ḍho", + ["ढै"] = "ḍhai", + ["ढौ"] = "ḍhau", + ["ढॢ"] = "ḍhḷ", + ["ढॣ"] = "ḍhḹ", + ["ढृ"] = "ḍhṛ", + ["ढॄ"] = "ḍhṝ", + -- + ["ण"]= "ṇa", + ["णा"] = "ṇā", + ["णि"] = "ṇi", + ["णी"] = "ṇī", + ["णु"] = "ṇu", + ["णू"] = "ṇū", + ["णे"] = "ṇe", + ["णो"] = "ṇo", + ["णै"] = "ṇai", + ["णौ"] = "ṇau", + ["णॢ"] = "ṇḷ", + ["णॣ"] = "ṇḹ", + ["णृ"] = "ṇṛ", + ["णॄ"] = "ṇṝ", + -- + ["त"]= "ta", + ["ता"] = "tā", + ["ति"] = "ti", + ["ती"] = "tī", + ["तु"] = "tu", + ["तू"] = "tū", + ["ते"] = "te", + ["तो"] = "to", + ["तै"] = "tai", + ["तौ"] = "tau", + ["तॢ"] = "tḷ", + ["तॣ"] = "tḹ", + ["तृ"] = "tṛ", + ["तॄ"] = "tṝ", + -- + ["थ"]= "tha", + ["था"] = "thā", + ["थि"] = "thi", + ["थी"] = "thī", + ["थु"] = "thu", + ["थू"] = "thū", + ["थे"] = "the", + ["थो"] = "tho", + ["थै"] = "thai", + ["थौ"] = "thau", + ["थॢ"] = "thḷ", + ["थॣ"] = "thḹ", + ["थृ"] = "thṛ", + ["थॄ"] = "thṝ", + -- + ["द"]= "da", + ["दा"] = "dā", + ["दि"] = "di", + ["दी"] = "dī", + ["दु"] = "du", + ["दू"] = "dū", + ["दे"] = "de", + ["दो"] = "do", + ["दै"] = "dai", + ["दौ"] = "dau", + ["दॢ"] = "dḷ", + ["दॣ"] = "dḹ", + ["दृ"] = "dṛ", + ["दॄ"] = "dṝ", + -- + ["ध"]= "dha", + ["धा"] = "dhā", + ["धि"] = "dhi", + ["धी"] = "dhī", + ["धु"] = "dhu", + ["धू"] = "dhū", + ["धे"] = "dhe", + ["धो"] = "dho", + ["धै"] = "dhai", + ["धौ"] = "dhau", + ["धॢ"] = "dhḷ", + ["धॣ"] = "dhḹ", + ["धृ"] = "dhṛ", + ["धॄ"] = "dhṝ", + -- + ["न"]= "na", + ["ना"] = "nā", + ["नि"] = "ni", + ["नी"] = "nī", + ["नु"] = "nu", + ["नू"] = "nū", + ["ने"] = "ne", + ["नो"] = "no", + ["नै"] = "nai", + ["नौ"] = "nau", + ["नॢ"] = "nḷ", + ["नॣ"] = "nḹ", + ["नृ"] = "nṛ", + ["नॄ"] = "nṝ", + -- + ["प"]= "pa", + ["पा"] = "pā", + ["पि"] = "pi", + ["पी"] = "pī", + ["पु"] = "pu", + ["पू"] = "pū", + ["पे"] = "pe", + ["पो"] = "po", + ["पै"] = "pai", + ["पौ"] = "pau", + ["पॢ"] = "pḷ", + ["पॣ"] = "pḹ", + ["पृ"] = "pṛ", + ["पॄ"] = "pṝ", + -- + ["फ"]= "pha", + ["फा"] = "phā", + ["फि"] = "phi", + ["फी"] = "phī", + ["फु"] = "phu", + ["फू"] = "phū", + ["फे"] = "phe", + ["फो"] = "pho", + ["फै"] = "phai", + ["फौ"] = "phau", + ["फॢ"] = "phḷ", + ["फॣ"] = "phḹ", + ["फृ"] = "phṛ", + ["फॄ"] = "phṝ", + -- + ["ब"]= "ba", + ["बा"] = "bā", + ["बि"] = "bi", + ["बी"] = "bī", + ["बु"] = "bu", + ["बू"] = "bū", + ["बे"] = "be", + ["बो"] = "bo", + ["बै"] = "bai", + ["बौ"] = "bau", + ["बॢ"] = "bḷ", + ["बॣ"] = "bḹ", + ["बृ"] = "bṛ", + ["बॄ"] = "bṝ", + -- + ["भ"]= "bha", + ["भा"] = "bhā", + ["भि"] = "bhi", + ["भी"] = "bhī", + ["भु"] = "bhu", + ["भू"] = "bhū", + ["भे"] = "bhe", + ["भो"] = "bho", + ["भै"] = "bhai", + ["भौ"] = "bhau", + ["भॢ"] = "bhḷ", + ["भॣ"] = "bhḹ", + ["भृ"] = "bhṛ", + ["भॄ"] = "bhṝ", + -- + ["म"]= "ma", + ["मा"] = "mā", + ["मि"] = "mi", + ["मी"] = "mī", + ["मु"] = "mu", + ["मू"] = "mū", + ["मे"] = "me", + ["मो"] = "mo", + ["मै"] = "mai", + ["मौ"] = "mau", + ["मॢ"] = "mḷ", + ["मॣ"] = "mḹ", + ["मृ"] = "mṛ", + ["मॄ"] = "mṝ", + -- + ["य"]= "ya", + ["या"] = "yā", + ["यि"] = "yi", + ["यी"] = "yī", + ["यु"] = "yu", + ["यू"] = "yū", + ["ये"] = "ye", + ["यो"] = "yo", + ["यै"] = "yai", + ["यौ"] = "yau", + ["यॢ"] = "yḷ", + ["यॣ"] = "yḹ", + ["यृ"] = "yṛ", + ["यॄ"] = "yṝ", + -- + ["र"]= "ra", + ["रा"] = "rā", + ["रि"] = "ri", + ["री"] = "rī", + ["रु"] = "ru", + ["रू"] = "rū", + ["रे"] = "re", + ["रो"] = "ro", + ["रै"] = "rai", + ["रौ"] = "rau", + ["रॢ"] = "rḷ", + ["रॣ"] = "rḹ", + ["रृ"] = "rṛ", + ["रॄ"] = "rṝ", + -- + ["ल"]= "la", + ["ला"] = "lā", + ["लि"] = "li", + ["ली"] = "lī", + ["लु"] = "lu", + ["लू"] = "lū", + ["ले"] = "le", + ["लो"] = "lo", + ["लै"] = "lai", + ["लौ"] = "lau", + ["लॢ"] = "lḷ", + ["लॣ"] = "lḹ", + ["लृ"] = "lṛ", + ["लॄ"] = "lṝ", + -- + ["व"]= "va", + ["वा"] = "vā", + ["वि"] = "vi", + ["वी"] = "vī", + ["वु"] = "vu", + ["वू"] = "vū", + ["वे"] = "ve", + ["वो"] = "vo", + ["वै"] = "vai", + ["वौ"] = "vau", + ["वॢ"] = "vḷ", + ["वॣ"] = "vḹ", + ["वृ"] = "vṛ", + ["वॄ"] = "vṝ", + -- + ["ष"]= "ṣa", + ["षा"] = "ṣā", + ["षि"] = "ṣi", + ["षी"] = "ṣī", + ["षु"] = "ṣu", + ["षू"] = "ṣū", + ["षे"] = "ṣe", + ["षो"] = "ṣo", + ["षै"] = "ṣai", + ["षौ"] = "ṣau", + ["षॢ"] = "ṣḷ", + ["षॣ"] = "ṣḹ", + ["षृ"] = "ṣṛ", + ["षॄ"] = "ṣṝ", + -- + ["श"]= "śa", + ["शा"] = "śā", + ["शि"] = "śi", + ["शी"] = "śī", + ["शु"] = "śu", + ["शू"] = "śū", + ["शे"] = "śe", + ["शो"] = "śo", + ["शै"] = "śai", + ["शौ"] = "śau", + ["शॢ"] = "śḷ", + ["शॣ"] = "śḹ", + ["शृ"] = "śṛ", + ["शॄ"] = "śṝ", + -- + ["स"]= "sa", + ["सा"] = "sā", + ["सि"] = "si", + ["सी"] = "sī", + ["सु"] = "su", + ["सू"] = "sū", + ["से"] = "se", + ["सो"] = "so", + ["सै"] = "sai", + ["सौ"] = "sau", + ["सॢ"] = "sḷ", + ["सॣ"] = "sḹ", + ["सृ"] = "sṛ", + ["सॄ"] = "sṝ", + -- + ["ह"]= "ha", + ["हा"] = "hā", + ["हि"] = "hi", + ["ही"] = "hī", + ["हु"] = "hu", + ["हू"] = "hū", + ["हे"] = "he", + ["हो"] = "ho", + ["है"] = "hai", + ["हौ"] = "hau", + ["हॢ"] = "hḷ", + ["हॣ"] = "hḹ", + ["हृ"] = "hṛ", + ["हॄ"] = "hṝ", + -- + ["ळ"]= "l̤a", + ["ळा"] = "l̤ā", + ["ळि"] = "l̤i", + ["ळी"] = "l̤ī", + ["ळु"] = "l̤u", + ["ळू"] = "l̤ū", + ["ळे"] = "l̤e", + ["ळो"] = "l̤o", + ["ळै"] = "l̤ai", + ["ळौ"] = "l̤au", + ["ळॢ"] = "l̤ḷ", + ["ळॣ"] = "l̤ḹ", + ["ळृ"] = "l̤ṛ", + ["ळॄ"] = "l̤ṝ", + --- + ["क्ष"]= "kṣa", + ["क्षा"] = "kṣā", + ["क्षि"] = "kṣi", + ["क्षी"] = "kṣī", + ["क्षु"] = "kṣu", + ["क्षू"] = "kṣū", + ["क्षे"] = "kṣe", + ["क्षो"] = "kṣo", + ["क्षै"] = "kṣai", + ["क्षौ"] = "kṣau", + ["क्षॢ"] = "kṣḷ", + ["क्षॣ"] = "kṣḹ", + ["क्षृ"] = "kṣṛ", + ["क्षॄ"] = "kṣṝ", + --- + ["ज्ञ"]= "jña", + ["ज्ञा"] = "jñā", + ["ज्ञि"] = "jñi", + ["ज्ञी"] = "jñī", + ["ज्ञु"] = "jñu", + ["ज्ञू"] = "jñū", + ["ज्ञे"] = "jñe", + ["ज्ञो"] = "jño", + ["ज्ञै"] = "jñai", + ["ज्ञौ"] = "jñau", + ["ज्ञॢ"] = "jñḷ", + ["ज्ञॣ"] = "jñḹ", + ["ज्ञृ"] = "jñṛ", + ["ज्ञॄ"] = "jñṝ", + -- + ["क्"]= "k", + ["ख्"] = "kh", + ["ग्"] = "g", + ["घ्"] = "gh", + ["ङ्"] = "ṅ", + ["च्"] = "c", + ["छ्"] = "ch", + ["ज्"] = "j", + ["झ्"] = "jh", + ["ञ्"] = "ñ", + ["ट्"] = "ṭ", + ["ठ्"] = "ṭh", + ["ड्"] = "ḍ", + ["ढ्"] = "ḍh", + ["ण्"] = "ṇ", + ["त्"] = "t", + ["थ्"] = "th", + ["द्"] = "d", + ["ध्"] = "dh", + ["न्"] = "n", + ["प्"] = "p", + ["फ्"] = "ph", + ["ब्"] = "b", + ["भ्"] = "bh", + ["म्"] = "m", + ["य्"] = "y", + ["र्"] = "r", + ["ल्"] = "l", + ["व्"] = "v", + ["श्"] = "ś", + ["ष्"] = "ṣ", + ["स्"] = "s", + ["ह्"] = "h", + ["ळ्"] = "l̤", + ["क्ष्"] = "kṣ", + ["ज्ञ्"] = "jñ", + -- discard virama (?!) TODO: revisit this if need arises + -- ["्"] = "", + ["।"] = "|", + ["॥"] = "||", + ["ं"] = "ṃ", + ["ः"] = "ḥ", + ["ऽ"] = "\'", + -- disputed + ["ँ"] = "̃", + -- diactrics (combining): provided for completeness + -- warning: many fonts don't have these + ["॒"] = "॒", + -- could not test + -- ["॑"] = "̭", + ["॑"] = "॑", + ["᳚"] = "᳚", + ["᳛"] = "᳛", + ["᳡"] = "̀", + ["꣡"] = "́", + ["꣢"] = "²", + ["꣣"] = "³", + ["꣤"] = "⁴", + ["꣥"] = "⁵", + ["꣦"] = "⁶", + ["꣧"] = "⁷", + ["꣨"] = "⁸", + ["꣩"] = "⁹", + ["꣪"] = "꣪", + ["꣫"] = "꣫", + ["꣬"] = "꣬", + ["꣭"] = "꣭", + ["꣮"] = "꣮", + ["꣯"] = "꣯", + ["꣰"] = "꣰", + ["꣱"] = "꣱", + }, + }, + ["deva to mlym"] = { + mapping = { + -- vowels + ["अ"] = "അ", + ["आ"] = "ആ", + ["इ"] = "ഇ", + ["ई"] = "ഈ", + ["उ"] = "ഉ", + ["ऊ"] = "ഊ", + ["ऋ"] = "ഋ", + ["ॠ"] = "ൠ", + ["ऌ"] = "ഌ", + ["ॡ"] = "ൡ", + ["ऎ"] = "എ", + ["ए"] = "ഏ", + ["ऐ"] = "ഐ", + ["ऒ"] = "ഒ", + ["ओ"] = "ഓ", + ["औ"] = "ഔ", + -- consonants + ["क"] = "ക", + ["ख"] = "ഖ", + ["ग"] = "ഗ", + ["घ"] = "ഘ", + ["ङ"] = "ങ", + ["च"] = "ച", + ["छ"] = "ഛ", + ["ज"] = "ജ", + ["झ"] = "ഝ", + ["ञ"] = "ഞ", + ["ट"] = "ട", + ["ठ"] = "ഠ", + ["ड"] = "ഡ", + ["ढ"] = "ഢ", + ["ण"] = "ണ", + ["त"] = "ത", + ["थ"] = "ഥ", + ["द"] = "ദ", + ["ध"] = "ധ", + ["न"] = "ന", + ["प"] = "പ", + ["फ"] = "ഫ", + ["ब"] = "ബ", + ["भ"] = "ഭ", + ["म"] = "മ", + ["य"] = "യ", + ["र"] = "ര", + ["ल"] = "ല", + ["व"] = "വ", + ["श"] = "ശ", + ["ष"] = "ഷ", + ["स"] = "സ", + ["ह"] = "ഹ", + ["ळ"] = "ള", + ["क्ष"] = "ക്ഷ", + ["ज्ञ"] = "ജ്ഞ", + -- vowel marks + ["ा"] = "ാ", + ["ि"] = "ി", + ["ी"] = "ീ", + ["ु"] = "ു", + ["ू"] = "ൂ", + ["ृ"] = "ൃ", + ["ॄ"] = "ൄ", + ["ॢ"] = "ൢ", + ["ॣ"] = "ൣ", + ["ॆ"] = "െ", + ["े"] = "േ", + ["ै"] = "ൈ", + ["ॊ"] = "ൊ", + ["ो"] = "ോ", + ["ौ"] = "ൌ", + -- always with phonetic + ["ं"] = "ം", + ["ः"] = "ഃ", + ["ँ"] = "ഁ", + -- punctuation marks + ["्"] = "്", + ["'"] = "'", + ["।"] = ".", + ["॥"] = ".", + ["‘"] = "‘", + ["’"] = "’", + }, + }, + ["deva to tlgu"] = { + mapping = { + -- vowels + ["अ"] = "అ", + ["आ"] = "ఆ", + ["इ"] = "ఇ", + ["ई"] = "ఈ", + ["उ"] = "ఉ", + ["ऊ"] = "ఊ", + ["ऋ"] = "ఋ", + ["ॠ"] = "ౠ", + ["ऌ"] = "ఌ", + ["ॡ"] = "ౡ", + ["ऎ"] = "ఎ", + ["ए"] = "ఏ", + ["ऐ"] = "ఐ", + ["ऒ"] = "ఒ", + ["ओ"] = "ఓ", + ["औ"] = "ఔ", + -- consonants + ["क"] = "క", + ["ख"] = "ఖ", + ["ग"] = "గ", + ["घ"] = "ఘ", + ["ङ"] = "ఙ", + ["च"] = "చ", + ["छ"] = "ఛ", + ["ज"] = "జ", + ["झ"] = "ఝ", + ["ञ"] = "ఞ", + ["ट"] = "ట", + ["ठ"] = "ఠ", + ["ड"] = "డ", + ["ढ"] = "ఢ", + ["ण"] = "ణ", + ["त"] = "త", + ["थ"] = "థ", + ["द"] = "ద", + ["ध"] = "ధ", + ["न"] = "న", + ["प"] = "ప", + ["फ"] = "ఫ", + ["ब"] = "బ", + ["भ"] = "భ", + ["म"] = "మ", + ["य"] = "య", + ["र"] = "ర", + ["ल"] = "ల", + ["व"] = "వ", + ["श"] = "శ", + ["ष"] = "ష", + ["स"] = "స", + ["ह"] = "హ", + ["ळ"] = "ళ", + ["क्ष"] = "క్ష", + ["ज्ञ"] = "జ్ఞ", + -- vowel marks + ["ा"] = "ా", + ["ि"] = "ి", + ["ी"] = "ీ", + ["ु"] = "ు", + ["ू"] = "ూ", + ["ृ"] = "ృ", + ["ॄ"] = "ౄ", + ["ॢ"] = "ౢ", + ["ॣ"] = "ౣ", + ["ॆ"] = "ె", + ["े"] = "ే", + ["ै"] = "ై", + ["ॊ"] = "ొ", + ["ो"] = "ో", + ["ौ"] = "ౌ", + -- always with phonetic + ["ं"] = "ం", + ["ः"] = "ః", + ["ँ"] = "ఀ", + -- punctuation marks + ["्"] = "్", + ["'"] = "'", + ["।"] = ".", + ["॥"] = ".", + ["‘"] = "‘", + ["’"] = "’", + }, + }, + ["deva to knda"] = { + mapping = { + -- vowels + ["अ"] = "ಅ", + ["आ"] = "ಆ", + ["इ"] = "ಇ", + ["ई"] = "ಈ", + ["उ"] = "ಉ", + ["ऊ"] = "ಊ", + ["ऋ"] = "ಋ", + ["ॠ"] = "ೠ", + ["ऌ"] = "ಌ", + ["ॡ"] = "ೡ", + ["ऎ"] = "ಎ", + ["ए"] = "ಏ", + ["ऐ"] = "ಐ", + ["ऒ"] = "ಒ", + ["ओ"] = "ಓ", + ["औ"] = "ಔ", + -- consonants + ["क"] = "ಕ", + ["ख"] = "ಖ", + ["ग"] = "ಗ", + ["घ"] = "ಘ", + ["ङ"] = "ಙ", + ["च"] = "ಚ", + ["छ"] = "ಛ", + ["ज"] = "ಜ", + ["झ"] = "ಝ", + ["ञ"] = "ಞ", + ["ट"] = "ಟ", + ["ठ"] = "ಠ", + ["ड"] = "ಡ", + ["ढ"] = "ಢ", + ["ण"] = "ಣ", + ["त"] = "ತ", + ["थ"] = "ಥ", + ["द"] = "ದ", + ["ध"] = "ಧ", + ["न"] = "ನ", + ["प"] = "ಪ", + ["फ"] = "ಫ", + ["ब"] = "ಬ", + ["भ"] = "ಭ", + ["म"] = "ಮ", + ["य"] = "ಯ", + ["र"] = "ರ", + ["ल"] = "ಲ", + ["व"] = "ವ", + ["श"] = "ಶ", + ["ष"] = "ಷ", + ["स"] = "ಸ", + ["ह"] = "ಹ", + ["ळ"] = "ಳ", + ["क्ष"] = "ಕ್ಷ", + ["ज्ञ"] = "ಜ್ಞ", + -- vowel marks + ["ा"] = "ಾ", + ["ि"] = "ಿ", + ["ी"] = "ೀ", + ["ु"] = "ು", + ["ू"] = "ೂ", + ["ृ"] = "ೃ", + ["ॄ"] = "ೄ", + ["ॢ"] = "ೢ", + ["ॣ"] = "ೣ", + ["ॆ"] = "ೆ", + ["े"] = "ೇ", + ["ै"] = "ೈ", + ["ॊ"] = "ೊ", + ["ो"] = "ೋ", + ["ौ"] = "ೌ", + -- always with phonetic + ["ं"] = "ಂ", + ["ः"] = "ಃ", + ["ँ"] = "ಁ", + -- punctuation marks + ["्"] = "್", + ["'"] = "'", + ["।"] = ".", + ["॥"] = ".", + ["‘"] = "‘", + ["’"] = "’", + }, + }, + ["deva to gujr"] = { + mapping = { + -- vowels + ["अ"] = "અ", + ["आ"] = "આ", + ["इ"] = "ઇ", + ["ई"] = "ઈ", + ["उ"] = "ઉ", + ["ऊ"] = "ઊ", + ["ऋ"] = "ઋ", + ["ॠ"] = "ૠ", + ["ऌ"] = "ઌ", + ["ॡ"] = "ૡ", + -- ["ऎ"] = "", + ["ए"] = "એ", + ["ऐ"] = "ઐ", + -- ["ऒ"] = "", + ["ओ"] = "ઓ", + ["औ"] = "ઔ", + -- consonants + ["क"] = "ક", + ["ख"] = "ખ", + ["ग"] = "ગ", + ["घ"] = "ઘ", + ["ङ"] = "ઙ", + ["च"] = "ચ", + ["छ"] = "છ", + ["ज"] = "જ", + ["झ"] = "ઝ", + ["ञ"] = "ઞ", + ["ट"] = "ટ", + ["ठ"] = "ઠ", + ["ड"] = "ડ", + ["ढ"] = "ઢ", + ["ण"] = "ણ", + ["त"] = "ત", + ["थ"] = "થ", + ["द"] = "દ", + ["ध"] = "ધ", + ["न"] = "ન", + ["प"] = "પ", + ["फ"] = "ફ", + ["ब"] = "બ", + ["भ"] = "ભ", + ["म"] = "મ", + ["य"] = "ય", + ["र"] = "ર", + ["ल"] = "લ", + ["व"] = "વ", + ["श"] = "શ", + ["ष"] = "ષ", + ["स"] = "સ", + ["ह"] = "હ", + ["ळ"] = "ળ", + ["क्ष"] = "ક્ષ", + ["ज्ञ"] = "જ્ઞ", + -- vowel marks + ["ा"] = "ા", + ["ि"] = "િ", + ["ी"] = "ી", + ["ु"] = "ુ", + ["ू"] = "ૂ", + ["ृ"] = "ૃ", + ["ॄ"] = "ૄ", + ["ॢ"] = "ૢ", + ["ॣ"] = "ૣ", + -- ["ॆ"] = "", + ["े"] = "ે", + ["ै"] = "ૈ", + -- ["ॊ"] = "", + ["ो"] = "ો", + ["ौ"] = "ૌ", + -- always with phonetic + ["ं"] = "ં", + ["ः"] = "ઃ", + ["ँ"] = "ઁ", + -- punctuation marks + ["्"] = "્", + ["'"] = "'", + ["।"] = ".", + ["॥"] = ".", + ["‘"] = "‘", + ["’"] = "’", + }, + }, + ["deva to bngl"] = { + mapping = { + -- vowels + ["अ"] = "অ", + ["आ"] = "আ", + ["इ"] = "ই", + ["ई"] = "ঈ", + ["उ"] = "উ", + ["ऊ"] = "ঊ", + ["ऋ"] = "ঋ", + ["ॠ"] = "ৠ", + ["ऌ"] = "ঌ", + ["ॡ"] = "ৡ", + -- ["ऎ"] = "", + ["ए"] = "এ", + ["ऐ"] = "ঐ", + -- ["ऒ"] = "", + ["ओ"] = "ও", + ["औ"] = "ঔ", + -- consonants + ["क"] = "ক", + ["ख"] = "খ", + ["ग"] = "গ", + ["घ"] = "ঘ", + ["ङ"] = "ঙ", + ["च"] = "চ", + ["छ"] = "ছ", + ["ज"] = "জ", + ["झ"] = "ঝ", + ["ञ"] = "ঞ", + ["ट"] = "ট", + ["ठ"] = "ঠ", + ["ड"] = "ড", + ["ढ"] = "ঢ", + ["ण"] = "ণ", + ["त"] = "ত", + ["थ"] = "থ", + ["द"] = "দ", + ["ध"] = "ধ", + ["न"] = "ন", + ["प"] = "প", + ["फ"] = "ফ", + ["ब"] = "ব", + ["भ"] = "ভ", + ["म"] = "ম", + ["य"] = "য", + ["र"] = "র", + ["ल"] = "ল", + ["व"] = "ব", + ["श"] = "শ", + ["ष"] = "ষ", + ["स"] = "স", + ["ह"] = "হ", + -- ["ळ"] = "", + ["क्ष"] = "ক্ষ", + ["ज्ञ"] = "জ্ঞ", + -- vowel marks + ["ा"] = "া", + ["ि"] = "ি", + ["ी"] = "ী", + ["ु"] = "ু", + ["ू"] = "ূ", + ["ृ"] = "ৃ", + ["ॄ"] = "ৄ", + ["ॢ"] = "ৢ", + ["ॣ"] = "ৣ", + -- ["ॆ"] = "", + ["े"] = "ে", + ["ै"] = "ৈ", + -- ["ॊ"] = "", + ["ो"] = "ো", + ["ौ"] = "ৌ", + -- always with phonetic + ["ं"] = "ং", + ["ः"] = "ঃ", + ["ँ"] = "ঁ", + -- punctuation marks + ["्"] = "্", + ["'"] = "'", + ["।"] = ".", + ["॥"] = ".", + ["‘"] = "‘", + ["’"] = "’", + }, + }, + } +} diff --git a/Master/texmf-dist/tex/context/base/mkiv/lang-imp-serbian.lua b/Master/texmf-dist/tex/context/base/mkiv/lang-imp-serbian.lua index 377d6dfde1d..6212500c264 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/lang-imp-serbian.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/lang-imp-serbian.lua @@ -1,38 +1,81 @@ +local c2l = { + mapping = { + ["А"] = "A", ["а"] = "a", + ["Б"] = "B", ["б"] = "b", + ["В"] = "V", ["в"] = "v", + ["Г"] = "G", ["г"] = "g", + ["Д"] = "D", ["д"] = "d", + ["Ђ"] = "Đ", ["ђ"] = "đ", + ["Е"] = "E", ["е"] = "e", + ["Ж"] = "Ž", ["ж"] = "ž", + ["З"] = "Z", ["з"] = "z", + ["И"] = "I", ["и"] = "i", + ["Ј"] = "J", ["ј"] = "j", + ["К"] = "K", ["к"] = "k", + ["Л"] = "L", ["л"] = "l", + ["Љ"] = "Lj", ["љ"] = "lj", + ["М"] = "M", ["м"] = "m", + ["Н"] = "N", ["н"] = "n", + ["Њ"] = "Nj", ["њ"] = "nj", + ["О"] = "O", ["о"] = "o", + ["П"] = "P", ["п"] = "p", + ["Р"] = "R", ["р"] = "r", + ["С"] = "S", ["с"] = "s", + ["Т"] = "T", ["т"] = "t", + ["Ћ"] = "Ć", ["ћ"] = "ć", + ["У"] = "U", ["у"] = "u", + ["Ф"] = "F", ["ф"] = "f", + ["Х"] = "H", ["х"] = "h", + ["Ц"] = "C", ["ц"] = "c", + ["Ч"] = "Č", ["ч"] = "č", + ["Џ"] = "Dž", ["џ"] = "dž", + ["Ш"] = "Š", ["ш"] = "š", + } +} + +local C2L = { + mapping = { + ["А"] = "A", ["а"] = "a", + ["Б"] = "B", ["б"] = "b", + ["В"] = "V", ["в"] = "v", + ["Г"] = "G", ["г"] = "g", + ["Д"] = "D", ["д"] = "d", + ["Ђ"] = "Đ", ["ђ"] = "đ", + ["Е"] = "E", ["е"] = "e", + ["Ж"] = "Ž", ["ж"] = "ž", + ["З"] = "Z", ["з"] = "z", + ["И"] = "I", ["и"] = "i", + ["Ј"] = "J", ["ј"] = "j", + ["К"] = "K", ["к"] = "k", + ["Л"] = "L", ["л"] = "l", + ["Љ"] = "LJ", ["љ"] = "lj", + ["М"] = "M", ["м"] = "m", + ["Н"] = "N", ["н"] = "n", + ["Њ"] = "NJ", ["њ"] = "nj", + ["О"] = "O", ["о"] = "o", + ["П"] = "P", ["п"] = "p", + ["Р"] = "R", ["р"] = "r", + ["С"] = "S", ["с"] = "s", + ["Т"] = "T", ["т"] = "t", + ["Ћ"] = "Ć", ["ћ"] = "ć", + ["У"] = "U", ["у"] = "u", + ["Ф"] = "F", ["ф"] = "f", + ["Х"] = "H", ["х"] = "h", + ["Ц"] = "C", ["ц"] = "c", + ["Ч"] = "Č", ["ч"] = "č", + ["Џ"] = "DŽ", ["џ"] = "dž", + ["Ш"] = "Š", ["ш"] = "š", + } +} + return { + name = "sebian transliterations", + version = "1.00", + author = "Hans Hagen & Ivan Pešić", + copyright = "ConTeXt development team & whoever made this list", transliterations = { - ["serbian to latin"] = { - mapping = { - ["А"] = "A", ["а"] = "a", - ["Б"] = "B", ["б"] = "b", - ["В"] = "V", ["в"] = "v", - ["Г"] = "G", ["г"] = "g", - ["Д"] = "D", ["д"] = "d", - ["Е"] = "E", ["е"] = "e", - ["Ж"] = "Ž", ["ж"] = "ž", - ["З"] = "Z", ["з"] = "z", - ["И"] = "I", ["и"] = "i", - ["Й"] = "J", ["й"] = "j", - ["К"] = "K", ["к"] = "k", - ["Л"] = "L", ["л"] = "l", - ["М"] = "M", ["м"] = "m", - ["Н"] = "N", ["н"] = "n", - ["О"] = "O", ["о"] = "o", - ["П"] = "P", ["п"] = "p", - ["Р"] = "R", ["р"] = "r", - ["С"] = "S", ["с"] = "s", - ["Т"] = "T", ["т"] = "t", - ["У"] = "U", ["у"] = "u", - ["Ф"] = "F", ["ф"] = "f", - ["Х"] = "Ch", ["х"] = "ch", - ["Ц"] = "C", ["ц"] = "c", - ["Ч"] = "Č", ["ч"] = "č", - ["Ш"] = "Š", ["ш"] = "š", - ["Щ"] = "Št", ["щ"] = "št", - ["Ъ"] = "Ă", ["ъ"] = "ă", - ["Ь"] = "′", ["ь"] = "′", - ["Ю"] = "Ju", ["ю"] = "ju", - ["Я"] = "Ja", ["я"] = "ja", - } - } + ["serbian to latin"] = c2l, + c2l = c2l, + C2L = C2L, } } diff --git a/Master/texmf-dist/tex/context/base/mkiv/lang-ini.lua b/Master/texmf-dist/tex/context/base/mkiv/lang-ini.lua index 7a8aab8183f..54e5e96f841 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/lang-ini.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/lang-ini.lua @@ -21,7 +21,7 @@ if not modules then modules = { } end modules ['lang-ini'] = { local type, tonumber, next = type, tonumber, next local utfbyte = utf.byte local format, gsub, gmatch, find = string.format, string.gsub, string.gmatch, string.find -local concat, sortedkeys, sortedpairs, keys, insert = table.concat, table.sortedkeys, table.sortedpairs, table.keys, table.insert +local concat, sortedkeys, sortedhash, keys, insert = table.concat, table.sortedkeys, table.sortedhash, table.keys, table.insert local utfvalues, strip, utfcharacters = string.utfvalues, string.strip, utf.characters local context = context @@ -36,19 +36,20 @@ local trace_patterns = false trackers.register("languages.patterns", function(v local report_initialization = logs.reporter("languages","initialization") local lang = lang +language = lang -- we use that in lmtx -local prehyphenchar = lang.prehyphenchar -- global per language -local posthyphenchar = lang.posthyphenchar -- global per language -local preexhyphenchar = lang.preexhyphenchar -- global per language -local postexhyphenchar = lang.postexhyphenchar -- global per language ------ lefthyphenmin = lang.lefthyphenmin ------ righthyphenmin = lang.righthyphenmin -local sethjcode = lang.sethjcode +local prehyphenchar = language.prehyphenchar -- global per language +local posthyphenchar = language.posthyphenchar -- global per language +local preexhyphenchar = language.preexhyphenchar -- global per language +local postexhyphenchar = language.postexhyphenchar -- global per language +----- lefthyphenmin = language.lefthyphenmin +----- righthyphenmin = language.righthyphenmin +local sethjcode = language.sethjcode local uccodes = characters.uccodes local lccodes = characters.lccodes -local new_language = lang.new +local new_language = language.new languages = languages or {} local languages = languages @@ -157,11 +158,16 @@ local function sethjcodes(instance,loaded,what,factor) loaded.codehash = h end -- - local function setcode(l) - local u = uccodes[l] + local function setcode(code) + local l = lccodes[code] -- just in case we get a mixture + local u = uccodes[code] -- just in case we get a mixture local s = l + if type(s) ~= "number" then + l = code + s = code + end if hjcounts then - local c = hjcounts[l] + local c = hjcounts[s] if c then c = c.count if not c then @@ -182,14 +188,14 @@ local function sethjcodes(instance,loaded,what,factor) h[l] = s if u ~= l and type(u) == "number" then sethjcode(instance,u,s) - h[u] = lccodes[l] + h[u] = s end end -- local s = tex.savinghyphcodes tex.savinghyphcodes = 0 if type(c) == "table" then - for l in next, c do + for l in sortedhash(c) do setcode(utfbyte(l)) end else @@ -500,15 +506,6 @@ else return 0 end end - - if CONTEXTLMTXMODE > 0 then - numbers[0] = "null" - registered.null = { - number = 0, - instance = new_language(0), - } - end - end -- not that usefull, global values @@ -584,7 +581,7 @@ languages.logger = languages.logger or { } function languages.logger.report() local result, r = { }, 0 - for tag, l in sortedpairs(registered) do + for tag, l in sortedhash(registered) do if l.loaded then r = r + 1 result[r] = format("%s:%s:%s",tag,l.parent,l.number) diff --git a/Master/texmf-dist/tex/context/base/mkiv/lang-ini.mkiv b/Master/texmf-dist/tex/context/base/mkiv/lang-ini.mkiv index ffa280b053d..5bf08343adf 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/lang-ini.mkiv +++ b/Master/texmf-dist/tex/context/base/mkiv/lang-ini.mkiv @@ -287,6 +287,8 @@ \s!righthyphenmin=2, \s!lefthyphenchar=-1, \s!righthyphenchar=45, + \s!explicitlefthyphenchar=\languageparameter\s!lefthyphenchar, + \s!explicitrighthyphenchar=\languageparameter\s!righthyphenchar, % used in compound i.e. interfaced with c! and can be anything so no numbers \c!lefthyphen=, \c!righthyphen=-, @@ -442,8 +444,10 @@ \righthyphenmin\numexpr0\languageparameter\s!righthyphenmin+\hyphenminoffset\relax \hyphenationmin\numexpr0\languageparameter\s!hyphenmin\relax % these values are stored with the language (global!) - \prehyphenchar \languageparameter\s!righthyphenchar\relax - \posthyphenchar\languageparameter\s!lefthyphenchar \relax} + \prehyphenchar \languageparameter\s!righthyphenchar\relax + \posthyphenchar \languageparameter\s!lefthyphenchar \relax + \preexhyphenchar \languageparameter\s!explicitrighthyphenchar\relax + \postexhyphenchar\languageparameter\s!explicitlefthyphenchar \relax} \appendtoks \lang_basics_synchronize_min_max diff --git a/Master/texmf-dist/tex/context/base/mkiv/lang-rep.lua b/Master/texmf-dist/tex/context/base/mkiv/lang-rep.lua index 9f89fa24848..d2c47f5bacd 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/lang-rep.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/lang-rep.lua @@ -62,11 +62,11 @@ local setprev = nuts.setprev local setchar = nuts.setchar local setattrlist = nuts.setattrlist -local insert_node_before = nuts.insert_before +local insertbefore = nuts.insertbefore +local insertafter = nuts.insertafter local remove_node = nuts.remove local copy_node = nuts.copy -local flush_list = nuts.flush_list -local insert_after = nuts.insert_after +local flushlist = nuts.flushlist local nodepool = nuts.pool local new_disc = nodepool.disc @@ -170,7 +170,7 @@ local function tonodes(list,template) local new = copy_node(template) setchar(new,list[i]) if head then - head, current = insert_after(head,current,new) + head, current = insertafter(head,current,new) else head, current = new, new end @@ -230,7 +230,7 @@ local function replace(head,first,last,final,hasspace,overload) -- todo: also set attr local new = new_disc(pre,post,replace) setattrlist(new,first) - head, current = insert_after(head,current,new) + head, current = insertafter(head,current,new) elseif method == "noligature" then -- not that efficient to copy but ok for testing local list = codes[2] @@ -239,12 +239,12 @@ local function replace(head,first,last,final,hasspace,overload) local new = copy_node(first) setchar(new,list[i]) setattr(new,a_noligature,1) - head, current = insert_after(head,current,new) + head, current = insertafter(head,current,new) end else local new = copy_node(first) setchar(new,zwnj) - head, current = insert_after(head,current,new) + head, current = insertafter(head,current,new) end else report_replacement("unknown method %a",method or "?") @@ -252,11 +252,11 @@ local function replace(head,first,last,final,hasspace,overload) else local new = copy_node(first) setchar(new,codes) - head, current = insert_after(head,current,new) + head, current = insertafter(head,current,new) end i = i + 1 end - flush_list(list) + flushlist(list) elseif newlength == 0 then -- we overload elseif oldlength == newlength then @@ -271,7 +271,7 @@ local function replace(head,first,last,final,hasspace,overload) for i=1,newlength-oldlength do local n = copy_node(current) setchar(n,newcodes[i]) - head, current = insert_node_before(head,current,n) + head, current = insertbefore(head,current,n) current = getnext(current) end for i=newlength-oldlength+1,newlength do diff --git a/Master/texmf-dist/tex/context/base/mkiv/lang-tra.lua b/Master/texmf-dist/tex/context/base/mkiv/lang-tra.lua index 5fd123349a3..35e9344aa1f 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/lang-tra.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/lang-tra.lua @@ -15,7 +15,7 @@ local nextchar = nuts.traversers.char local getattr = nuts.getattr local setchar = nuts.setchar -local insert_before = nuts.insert_before +local insertbefore = nuts.insertbefore local copy_node = nuts.copy local texsetattribute = tex.setattribute @@ -97,7 +97,7 @@ function transliteration.handler(head) for i = n-1,1,-1 do local g = copy_node(current) setchar(g,t[i]) - head, p = insert_before(head, p, g) + head, p = insertbefore(head, p, g) end end end diff --git a/Master/texmf-dist/tex/context/base/mkiv/lang-txt.lua b/Master/texmf-dist/tex/context/base/mkiv/lang-txt.lua index 026abbd0ed4..1b278926ec3 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/lang-txt.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/lang-txt.lua @@ -16,23 +16,29 @@ if not modules then modules = { } end modules ['lang-txt'] = { -- completed by numerous users. The following list is incomplete so feel -- free to send me corrections. -- +-- In 2020+ Tomas Hala and his students added some more languages and did +-- some extensive checking of the entries in this file. +-- -- af Afrikaans ... -- ar Arabic Idris Samawi Hamid, Khaled Hosny -- be Belarussian Darya Hryshkavets (2019) -- bg Bulgarian Vladislav Hinkin, Aleš Ďurčanský (2019) --- ca Catalan ... +-- ca Catalan ...; additions Javier Gambin Monzo + Samuel Conca Coles (2022) -- cn Chinese Wang Lei, ... -- cs Czech Tom Hudec, Petr Sojka, Richard Gabriel -- da Danish Arne Jorgensen -- de German Tobias Burnus, ... -- en English Hans Hagen, ... --- es Spanish Andrés Montoya, ... +-- eo Esperanto Alain Delmotte (2021) +-- es Spanish Andrés Montoya, ...; additions Javier Gambin Monzo + Samuel Conca Coles (2022) -- et Estonian Clyde Johnston (2018) --- fi Finish ... --- fr French Daniel Flipo, Arthur Reutenauer +-- fa Persian Mohammad Hossein Bateni (2016) +-- fi Finnish ...; additions Ossi Salo (2022) +-- fr French Daniel Flipo, Arthur Reutenauer; additions Arnaud Pierre Henri De Barbentane + Adrien Patton (2022) -- gr Greek Apostolos Syropoulos, Thomas Schmitz -- hr Croatian Željko Vrba, Richard Gabriel, Vedran Miletić -- hu Hungarian Adam Reviczky +-- hy Armenian Kristina Nazarjanová (2022) -- it Italian Giuseppe Bilotta, Luigi Scarso -- ja Japanese Richard Gabriel -- kr Korean Jeong Dalyoung @@ -42,7 +48,6 @@ if not modules then modules = { } end modules ['lang-txt'] = { -- nb Norwegian Hans Fredrik Nordhaug, ... -- nn Norwegian Hans Fredrik Nordhaug, ... -- nl Dutch Hans Hagen --- pe Persian Mohammad Hossein Bateni (2016) -- pl Polish Grzegorz Sapijaszko (2011) -- pt Portuguese Pedro F. M. Mendonça -- ro Romanian Dan Seracu, ... @@ -57,6 +62,7 @@ if not modules then modules = { } end modules ['lang-txt'] = { -- ua Ukrainian Olga Briginets, Alexander Bokovoy, Victor Figurnov, ... -- vi Vietnamese Han The Thanh + -- For the moment we keep this table in memory. In the future we can then -- enable labels. @@ -77,11 +83,15 @@ data.labels={ ["labels"]={ ["be"]="У", ["bg"]="в", + ["ca"]="En", + ["de"]="In", ["en"]="In", + ["eo"]="En", ["es"]="En", + ["fa"]="در", ["fr"]="Dans", + ["hy"]="Մեջ", ["mk"]="во", - ["pe"]="در", ["sr"]="У", ["sr-latn"]="U", }, @@ -90,12 +100,16 @@ data.labels={ ["labels"]={ ["be"]="Нумар", ["bg"]="номер", - ["de"]="Numer", + ["ca"]="Nombre", + ["de"]="Nummer", ["en"]="Number", + ["eo"]="Nombro", + ["es"]="Numero", + ["fa"]="شماره", ["fr"]="Numéro", + ["hy"]="Համար", ["mk"]="Број", ["nl"]="Nummer", - ["pe"]="شماره", ["sr"]="Број", ["sr-latn"]="Broj", }, @@ -104,12 +118,17 @@ data.labels={ ["labels"]={ ["be"]="Гук", ["bg"]="обем", + ["ca"]="Volum", ["de"]="Band", ["en"]="Volume", + ["eo"]="Volumo", + ["es"]="Volumen", ["et"]="Köide", + ["fa"]="جلد", + ["fr"]="Volume", + ["hy"]="Ծավալ", ["mk"]="Том", ["nl"]="Deel", - ["pe"]="جلد", ["sr"]="Том", ["sr-latn"]="Tom", }, @@ -118,15 +137,18 @@ data.labels={ ["labels"]={ ["be"]="i", ["bg"]="a", + ["ca"]="i", ["de"]="und", ["en"]="and", + ["eo"]="kaj", ["es"]="y", ["et"]="ja", + ["fa"]="و", ["fr"]="et", + ["hy"]="և", ["it"]="e", ["mk"]="и", ["nl"]="en", - ["pe"]="و", ["sr"]="и", ["sr-latn"]="i", }, @@ -135,15 +157,19 @@ data.labels={ ["labels"]={ ["be"]="Выданне", ["bg"]="издание", + ["ca"]="Edició", ["de"]="Auflage", ["en"]="edition", + ["eo"]="eldono", ["es"]="edición", ["et"]="väljaanne", + ["fa"]="ویرایش", + ["fi"]="versio", ["fr"]="édition", + ["hy"]="հրատարակություն", ["it"]="edizione", ["mk"]="издание", ["nl"]="editie", - ["pe"]="ویرایش", ["sr"]="издање", ["sr-latn"]="izdanje", }, @@ -152,13 +178,17 @@ data.labels={ ["labels"]={ ["be"]="Рэдактар", ["bg"]="редактор", + ["ca"]="Editor", ["de"]="Herausgeber", ["en"]="editor", + ["eo"]="eldonisto", + ["es"]="editor", ["et"]="toimetaja", + ["fa"]="ویراستار", ["fr"]="éditeur", + ["hy"]="խմբագիր", ["it"]="a cura di", ["mk"]="уредник", - ["pe"]="ویراستار", ["sr"]="уредник", ["sr-latn"]="urednik", }, @@ -167,11 +197,14 @@ data.labels={ ["labels"]={ ["be"]="Рэдактары", ["bg"]="редактори", + ["ca"]="Editors", ["de"]="Herausgeber", ["en"]="editors", + ["eo"]="eldonistoj", ["es"]="editores", ["et"]="toimetajad", ["fr"]="éditeurs", + ["hy"]="խմբագիրներ", ["it"]="a cura di", ["mk"]="уредници", ["sr"]="уредници", @@ -182,11 +215,15 @@ data.labels={ ["labels"]={ ["be"]="у", ["bg"]="в", + ["ca"]="en", + ["de"]="in", ["en"]="in", + ["eo"]="en", ["es"]="en", + ["fa"]="در", ["fr"]="dans", + ["hy"]="մեջ", ["mk"]="во", - ["pe"]="در", ["sr"]="у", ["sr-latn"]="u", }, @@ -195,15 +232,19 @@ data.labels={ ["labels"]={ ["be"]="Дыпломная работа", ["bg"]="дипломна работа", + ["ca"]="Tesi de maestria", ["de"]="Masterarbeit", ["en"]="Master's thesis", + ["eo"]="Magistreca disertaĵo", ["es"]="Tesis de maestría", ["et"]="magistritöö", + ["fa"]="پایاننامه کارشناسی ارشد", + ["fi"]="Pro gradu tutkielma", ["fr"]="Thèse de master (DEA, DESS, master)", + ["hy"]="Մագիստրոսական թեզ", ["it"]="Tesi di laurea", ["mk"]="Магистерска дисертација", ["nl"]="Masterproef", - ["pe"]="پایاننامه کارشناسی ارشد", ["sr"]="Мастер дисертација", ["sr-latn"]="Master disertacija", }, @@ -212,12 +253,17 @@ data.labels={ ["labels"]={ ["be"]="нумар", ["bg"]="номер", - ["de"]="Numer", + ["ca"]="nombre", + ["de"]="Nummer", ["en"]="number", + ["eo"]="numero", + ["es"]="numero", + ["fa"]="شماره", + ["fi"]="numero", ["fr"]="numéro", + ["hy"]="համար", ["mk"]="број", ["nl"]="nummer", - ["pe"]="شماره", ["sr"]="број", ["sr-latn"]="broj", }, @@ -226,9 +272,13 @@ data.labels={ ["labels"]={ ["be"]="з", ["bg"]="на", + ["ca"]="de", ["de"]="von", ["en"]="of", + ["eo"]="de", + ["es"]="de", ["fr"]="de", + ["hy"]="-ից", ["mk"]="од", ["nl"]="van", ["sr"]="од", @@ -237,8 +287,14 @@ data.labels={ }, ["others"]={ ["labels"]={ + ["ca"]="et al.", + ["de"]="et al.", ["en"]="et al.", + ["eo"]="aliaj", + ["es"]="otros", ["et"]="jt", + ["fr"]="et al.", + ["hy"]="եւ այլն", ["mk"]="и др.", ["sr"]="и др.", ["sr-latn"]="i dr.", @@ -247,11 +303,16 @@ data.labels={ ["p"]={ ["labels"]={ ["be"]="стар.", + ["ca"]="p.", ["de"]="S.", ["en"]="p.", + ["eo"]="p.", + ["es"]="p", ["et"]="lk", + ["fa"]="ص", + ["fr"]="p.", + ["hy"]="էջ", ["mk"]="стр.", - ["pe"]="ص", ["sr"]="стр.", ["sr-latn"]="str.", }, @@ -260,12 +321,18 @@ data.labels={ ["labels"]={ ["be"]="старонка", ["bg"]="страни", + ["ca"]="pagines", ["de"]="Seiten", ["en"]="pages", + ["eo"]="paĝoj", + ["es"]="paginas", ["et"]="leheküljed", + ["fa"]="صفحات", + ["fi"]="sivut", + ["fr"]="pages", + ["hy"]="էջեր", ["mk"]="страници", ["nl"]="paginas", - ["pe"]="صفحات", ["sr"]="страницa", ["sr-latn"]="stranica", }, @@ -274,11 +341,15 @@ data.labels={ ["labels"]={ ["be"]="патэнт", ["bg"]="патент", + ["ca"]="Patent", ["de"]="Patent", ["en"]="Patent", + ["eo"]="Patento", ["es"]="Patente", ["et"]="Patent", + ["fi"]="patentti", ["fr"]="Brevet", + ["hy"]="Արտոնագիր", ["it"]="Brevetto", ["mk"]="Патент", ["nl"]="Octrooi", @@ -290,26 +361,33 @@ data.labels={ ["labels"]={ ["be"]="Доктарская дысертацыя", ["bg"]="дисертачна работа", + ["ca"]="Tesi doctoral", ["de"]="Dissertation", ["en"]="PhD thesis", + ["eo"]="Doktoriĝa disertaĵo", ["es"]="Tesis doctoral", ["et"]="doktoritöö", + ["fa"]="رساله دکتری", ["fr"]="Thèse de doctorat", + ["hy"]="Դոկտորական թեզ", ["it"]="Tesi di dottorato", ["mk"]="Докторска дисертација", ["nl"]="Proefschrift", - ["pe"]="رساله دکتری", ["sr"]="Докторска дисертација", ["sr-latn"]="Doktorska disertacija", }, }, ["pp"]={ ["labels"]={ + ["ca"]="pp", ["de"]="S.", ["en"]="pp.", + ["eo"]="pp.", + ["es"]="pp", ["et"]="lk-d", + ["fa"]="صص", + ["hy"]="էջ", ["mk"]="стр.", - ["pe"]="صص", ["sr"]="стр.", ["sr-latn"]="str.", }, @@ -318,15 +396,19 @@ data.labels={ ["labels"]={ ["be"]="Тэхнічны даклад", ["bg"]="технически доклад", + ["ca"]="Report tecnic", ["de"]="Technischer Bericht", ["en"]="Technical report", + ["eo"]="Teknika raporto", ["es"]="Informe técnico", ["et"]="tehniline raport", + ["fa"]="گزارش فنی", + ["fi"]="Tekninen raportti", ["fr"]="Rapport technique", + ["hy"]="Տեխնիկական հաշվետվություն", ["it"]="Relazione tecnica", ["mk"]="Технички извештај", ["nl"]="Technisch rapport", - ["pe"]="گزارش فنی", ["sr"]="Технички извештај", ["sr-latn"]="Tehnički izveštaj", }, @@ -335,12 +417,17 @@ data.labels={ ["labels"]={ ["be"]="гучнасць", ["bg"]="обем", + ["ca"]="volum", ["de"]="Band", ["en"]="volume", + ["eo"]="volumo", + ["es"]="volumen", ["et"]="köide", + ["fa"]="جلد", + ["fr"]="volume", + ["hy"]="ծավալ", ["mk"]="том", ["nl"]="deel", - ["pe"]="جلد", ["sr"]="том", ["sr-latn"]="tom", }, @@ -349,11 +436,15 @@ data.labels={ ["labels"]={ ["be"]="з", ["bg"]="със", + ["ca"]="en", ["de"]="mit", ["en"]="with", + ["eo"]="kun", ["es"]="con", ["et"]="koos", + ["fi"]="kanssa", ["fr"]="avec", + ["hy"]="ի հետ", ["it"]="con", ["mk"]="со", ["nl"]="met", @@ -365,8 +456,12 @@ data.labels={ ["functions"]={ ["Pr"]={ ["labels"]={ + ["ca"]="Pr", ["cs"]="P", ["en"]="Pr", + ["eo"]="P", + ["es"]="Pr", + ["hy"]="P", ["mk"]="P", ["sk"]="P", ["sr"]="P", @@ -375,10 +470,13 @@ data.labels={ }, ["arccos"]={ ["labels"]={ + ["ca"]="arc cos", ["cs"]="arccos", ["en"]="arccos", + ["eo"]="arccos", ["es"]="arc\\sixperemspace cos", ["hr"]="arc\\sixperemspace cos", + ["hy"]="arccos", ["mk"]="arccos", ["pl"]="arc\\sixperemspace cos", ["sk"]="arccos", @@ -388,10 +486,13 @@ data.labels={ }, ["arccosh"]={ ["labels"]={ + ["ca"]="arccosh", ["cs"]="arccosh", ["en"]="arccosh", + ["eo"]="arccosh", ["es"]="arc\\sixperemspace cosh", ["hr"]="arc\\sixperemspace cosh", + ["hy"]="arccosh", ["mk"]="arccosh", ["pl"]="arc\\sixperemspace cosh", ["sk"]="arccosh", @@ -401,10 +502,13 @@ data.labels={ }, ["arcctg"]={ ["labels"]={ + ["ca"]="arc cot", ["cs"]="arccotg", ["en"]="arccot", + ["eo"]="arcctan", ["es"]="arc\\sixperemspace cot", ["hr"]="arc\\sixperemspace ctg", + ["hy"]="arcctg", ["mk"]="arccotg", ["pl"]="arc\\sixperemspace ctg", ["sk"]="arccotg", @@ -414,10 +518,13 @@ data.labels={ }, ["arcsin"]={ ["labels"]={ + ["ca"]="arc sen", ["cs"]="arcsin", ["en"]="arcsin", + ["eo"]="arcsin", ["es"]="arc\\sixperemspace sen", ["hr"]="arc\\sixperemspace sin", + ["hy"]="arcsin", ["mk"]="arcsin", ["pl"]="arc\\sixperemspace sin", ["sk"]="arcsin", @@ -427,10 +534,13 @@ data.labels={ }, ["arcsinh"]={ ["labels"]={ + ["ca"]="arc senh", ["cs"]="arcsinh", ["en"]="arcsinh", + ["eo"]="arcsinh", ["es"]="arc\\sixperemspace senh", ["hr"]="arc\\sixperemspace sinh", + ["hy"]="arcsinh", ["mk"]="arcsinh", ["pl"]="arc\\sixperemspace sinh", ["sk"]="arcsinh", @@ -440,10 +550,13 @@ data.labels={ }, ["arctan"]={ ["labels"]={ + ["ca"]="arc tan", ["cs"]="arctg", ["en"]="arctan", + ["eo"]="arctang", ["es"]="arc\\sixperemspace tan", ["hr"]="arc\\sixperemspace tg", + ["hy"]="arctan", ["mk"]="arctg", ["pl"]="arc\\sixperemspace tg", ["sk"]="arctg", @@ -453,10 +566,13 @@ data.labels={ }, ["arctanh"]={ ["labels"]={ + ["ca"]="arc tanh", ["cs"]="arctgh", ["en"]="arctanh", + ["eo"]="arctanh", ["es"]="arc\\sixperemspace tanh", ["hr"]="arc\\sixperemspace tgh", + ["hy"]="arctanh", ["mk"]="arctgh", ["pl"]="arc\\sixperemspace tgh", ["sk"]="arctgh", @@ -466,9 +582,12 @@ data.labels={ }, ["arg"]={ ["labels"]={ + ["ca"]="arg", ["cs"]="arg", ["en"]="arg", + ["eo"]="arg", ["es"]="arg", + ["hy"]="arg", ["mk"]="arg", ["sk"]="arg", ["sr"]="arg", @@ -477,9 +596,12 @@ data.labels={ }, ["cos"]={ ["labels"]={ + ["ca"]="cos", ["cs"]="cos", ["en"]="cos", + ["eo"]="cos", ["es"]="cos", + ["hy"]="cos", ["mk"]="cos", ["sk"]="cos", ["sr"]="cos", @@ -488,9 +610,12 @@ data.labels={ }, ["cosh"]={ ["labels"]={ + ["ca"]="cosh", ["cs"]="cosh", ["en"]="cosh", + ["eo"]="cosh", ["es"]="cosh", + ["hy"]="cosh", ["mk"]="cosh", ["sk"]="cosh", ["sr"]="cosh", @@ -499,10 +624,13 @@ data.labels={ }, ["cot"]={ ["labels"]={ + ["ca"]="cot", ["cs"]="cotg", ["en"]="cot", + ["eo"]="cotan", ["es"]="cot", ["hr"]="ctg", + ["hy"]="cot", ["mk"]="ctg", ["pl"]="ctg", ["sk"]="cotg", @@ -512,9 +640,12 @@ data.labels={ }, ["coth"]={ ["labels"]={ + ["ca"]="coth", ["cs"]="cotgh", ["en"]="coth", + ["eo"]="cotanh", ["es"]="coth", + ["hy"]="coth", ["mk"]="ctgh", ["sk"]="cotgh", ["sr"]="ctgh", @@ -523,9 +654,12 @@ data.labels={ }, ["csc"]={ ["labels"]={ + ["ca"]="csc", ["cs"]="cosec", ["en"]="csc", + ["eo"]="cosec", ["es"]="csc", + ["hy"]="csc", ["mk"]="cosec", ["sk"]="cosec", ["sr"]="cosec", @@ -534,10 +668,13 @@ data.labels={ }, ["ctg"]={ ["labels"]={ + ["ca"]="cot", ["cs"]="cotg", ["en"]="cot", + ["eo"]="cotan", ["es"]="cot", ["hr"]="ctg", + ["hy"]="cot", ["mk"]="ctg", ["pl"]="ctg", ["sk"]="cotg", @@ -547,9 +684,12 @@ data.labels={ }, ["deg"]={ ["labels"]={ + ["ca"]="gr", ["cs"]="deg", ["en"]="deg", + ["eo"]="gr", ["es"]="gr", + ["hy"]="deg", ["mk"]="deg", ["sk"]="deg", ["sr"]="deg", @@ -558,9 +698,12 @@ data.labels={ }, ["det"]={ ["labels"]={ + ["ca"]="det", ["cs"]="det", ["en"]="det", + ["eo"]="det", ["es"]="det", + ["hy"]="det", ["sk"]="det", ["sr"]="det", ["sr-latn"]="det", @@ -568,14 +711,20 @@ data.labels={ }, ["diff"]={ ["labels"]={ + ["ca"]="d", ["en"]="d", + ["eo"]="dif", + ["hy"]="diff", }, }, ["dim"]={ ["labels"]={ + ["ca"]="dim", ["cs"]="dim", ["en"]="dim", + ["eo"]="dim", ["es"]="dim", + ["hy"]="dim", ["mk"]="dim", ["sk"]="dim", ["sr"]="dim", @@ -584,9 +733,12 @@ data.labels={ }, ["exp"]={ ["labels"]={ + ["ca"]="exp", ["cs"]="exp", ["en"]="exp", + ["eo"]="eksp", ["es"]="exp", + ["hy"]="exp", ["sk"]="exp", ["sr"]="exp", ["sr-latn"]="exp", @@ -594,10 +746,14 @@ data.labels={ }, ["gcd"]={ ["labels"]={ + ["ca"]="med", ["cs"]="NSD", + ["de"]="ggT", ["en"]="gcd", + ["eo"]="", ["es"]="mcd", ["hr"]="nzd", + ["hy"]="ԱԸԲ", ["mk"]="НЗД", ["nl"]="ggd", ["sk"]="NSD", @@ -607,17 +763,23 @@ data.labels={ }, ["hom"]={ ["labels"]={ + ["ca"]="hom", ["cs"]="Hom", ["en"]="hom", + ["eo"]="hom", ["es"]="hom", + ["hy"]="հոմ", ["sk"]="Hom", }, }, ["inf"]={ ["labels"]={ + ["ca"]="inf", ["cs"]="inf", ["en"]="inf", + ["eo"]="inf", ["es"]="inf", + ["hy"]="inf", ["mk"]="inf", ["sk"]="inf", ["sr"]="inf", @@ -626,19 +788,39 @@ data.labels={ }, ["injlim"]={ ["labels"]={ + ["ca"]="inj", ["cs"]="inj\\sixperemspace lim", ["en"]="inj\\sixperemspace lim", + ["eo"]="", ["es"]="lím\\sixperemspace iny", + ["hy"]="inj\\sixperemspace lim", ["sk"]="inj\\sixperemspace lim", ["sr"]="inj\\sixperemspace lim", ["sr-latn"]="inj\\sixperemspace lim", }, }, + ["inv"]={ + ["labels"]={ + ["ca"]="inv", + ["cs"]="inv", + ["en"]="inv", + ["eo"]="inv", + ["es"]="inv", + ["hy"]="inv", + ["mk"]="inv", + ["sk"]="inv", + ["sr"]="inv", + ["sr-latn"]="inv", + }, + }, ["ker"]={ ["labels"]={ + ["ca"]="Ker", ["cs"]="ker", ["en"]="ker", + ["eo"]="", ["es"]="Ker", + ["hy"]="ker", ["sk"]="ker", ["sr"]="ker", ["sr-latn"]="ker", @@ -646,10 +828,14 @@ data.labels={ }, ["lcm"]={ ["labels"]={ + ["ca"]="MCM", ["cs"]="NSN", + ["de"]="kgV", ["en"]="lcm", + ["eo"]="", ["es"]="MCM", ["hr"]="nzv", + ["hy"]="աըբ", ["mk"]="НЗС", ["nl"]="kgv", ["sk"]="NSN", @@ -659,9 +845,14 @@ data.labels={ }, ["lg"]={ ["labels"]={ + ["ca"]="log", ["cs"]="log", + ["de"]="log", ["en"]="lg", + ["eo"]="log", ["es"]="log", + ["fr"]="log", + ["hy"]="lg", ["mk"]="lg", ["sk"]="log", ["sr"]="lg", @@ -670,9 +861,12 @@ data.labels={ }, ["lim"]={ ["labels"]={ + ["ca"]="lim", ["cs"]="lim", ["en"]="lim", + ["eo"]="lim", ["es"]="lím", + ["hy"]="lim", ["mk"]="lim", ["sk"]="lim", ["sr"]="lim", @@ -681,9 +875,12 @@ data.labels={ }, ["liminf"]={ ["labels"]={ + ["ca"]="lim inf", ["cs"]="lim\\sixperemspace inf", ["en"]="lim\\sixperemspace inf", + ["eo"]="subinf", ["es"]="lím\\sixperemspace inf", + ["hy"]="lim\\sixperemspace infs", ["mk"]="lim\\sixperemspace inf", ["sk"]="lim\\sixperemspace inf", ["sr"]="lim\\sixperemspace inf", @@ -692,9 +889,12 @@ data.labels={ }, ["limsup"]={ ["labels"]={ + ["ca"]="lim sup", ["cs"]="lim\\sixperemspace sup", ["en"]="lim\\sixperemspace sup", + ["eo"]="suplim", ["es"]="lím\\sixperemspace sup", + ["hy"]="lim\\sixperemspace sup", ["mk"]="lim\\sixperemspace sup", ["sk"]="lim\\sixperemspace sup", ["sr"]="lim\\sixperemspace sup", @@ -703,9 +903,12 @@ data.labels={ }, ["ln"]={ ["labels"]={ + ["ca"]="En", ["cs"]="ln", ["en"]="ln", + ["eo"]="ln", ["es"]="ln", + ["hy"]="ln", ["mk"]="ln", ["sk"]="ln", ["sr"]="ln", @@ -714,9 +917,12 @@ data.labels={ }, ["log"]={ ["labels"]={ + ["ca"]="log", ["cs"]="log", ["en"]="log", + ["eo"]="log", ["es"]="log", + ["hy"]="log", ["mk"]="log", ["sk"]="log", ["sr"]="log", @@ -725,9 +931,13 @@ data.labels={ }, ["max"]={ ["labels"]={ + ["ca"]="max", ["cs"]="max", ["en"]="max", + ["eo"]="maks", ["es"]="máx", + ["fi"]="max", + ["hy"]="max", ["mk"]="max", ["sk"]="max", ["sr"]="max", @@ -736,9 +946,14 @@ data.labels={ }, ["median"]={ ["labels"]={ + ["ca"]="mitjana", ["cs"]="\\tilde", ["en"]="median", + ["eo"]="mediano", ["es"]="Mediana", + ["fi"]="mediaani", + ["fr"]="médiane", + ["hy"]="միջին", ["sk"]="\\tilde", ["sr"]="median", ["sr-latn"]="median", @@ -746,9 +961,13 @@ data.labels={ }, ["min"]={ ["labels"]={ + ["ca"]="min", ["cs"]="min", ["en"]="min", + ["eo"]="min", ["es"]="mín", + ["fi"]="min", + ["hy"]="min", ["mk"]="min", ["sk"]="min", ["sr"]="min", @@ -757,9 +976,13 @@ data.labels={ }, ["mod"]={ ["labels"]={ + ["ca"]="mod", ["cs"]="mod", ["en"]="mod", + ["eo"]="mod", ["es"]="mod", + ["fi"]="mod", + ["hy"]="mod", ["mk"]="mod", ["sk"]="mod", ["sr"]="mod", @@ -768,9 +991,12 @@ data.labels={ }, ["projlim"]={ ["labels"]={ + ["ca"]="lim proy", ["cs"]="proj\\sixperemspace lim", ["en"]="proj\\sixperemspace lim", + ["eo"]="", ["es"]="lím\\sixperemspace proy", + ["hy"]="proj\\sixperemspace lim", ["sk"]="proj\\sixperemspace lim", ["sr"]="proj\\sixperemspace lim", ["sr-latn"]="proj\\sixperemspace lim", @@ -778,9 +1004,13 @@ data.labels={ }, ["sec"]={ ["labels"]={ + ["ca"]="sec", ["cs"]="sec", ["en"]="sec", + ["eo"]="sek", ["es"]="sec", + ["fi"]="sek", + ["hy"]="sec", ["mk"]="sec", ["sk"]="sec", ["sr"]="sec", @@ -789,9 +1019,13 @@ data.labels={ }, ["sin"]={ ["labels"]={ + ["ca"]="sen", ["cs"]="sin", ["en"]="sin", + ["eo"]="sin", ["es"]="sen", + ["fi"]="sin", + ["hy"]="sin", ["mk"]="sin", ["sk"]="sin", ["sr"]="sin", @@ -800,9 +1034,12 @@ data.labels={ }, ["sinh"]={ ["labels"]={ + ["ca"]="senh", ["cs"]="sinh", ["en"]="sinh", + ["eo"]="sinh", ["es"]="senh", + ["hy"]="sinh", ["mk"]="sinh", ["sk"]="sinh", ["sr"]="sinh", @@ -813,7 +1050,9 @@ data.labels={ ["labels"]={ ["cs"]="sup", ["en"]="sup", + ["eo"]="sup", ["es"]="sup", + ["hy"]="sup", ["mk"]="sup", ["sk"]="sup", ["sr"]="sup", @@ -824,8 +1063,10 @@ data.labels={ ["labels"]={ ["cs"]="tg", ["en"]="tan", + ["eo"]="tan", ["es"]="tan", ["hr"]="tg", + ["hy"]="tan", ["mk"]="tg", ["pl"]="tg", ["sk"]="tg", @@ -837,7 +1078,9 @@ data.labels={ ["labels"]={ ["cs"]="tgh", ["en"]="tanh", + ["eo"]="tanh", ["es"]="tanh", + ["hy"]="tanh", ["mk"]="tgh", ["sk"]="tgh", ["sr"]="tgh", @@ -849,18 +1092,21 @@ data.labels={ ["and"]={ ["labels"]={ ["af"]="", - ["ca"]="", + ["ca"]=" i ", ["cs"]=" a ", ["da"]="", ["de"]=" und ", ["en"]=" and ", + ["eo"]=" kaj ", ["es"]=" y ", ["et"]=" ja ", + ["fa"]=" و ", ["fi"]="", - ["fr"]="", + ["fr"]=" et ", ["gr"]="", ["hr"]=" i ", ["hu"]=" és ", + ["hy"]=" և ", ["it"]="", ["la"]="", ["lt"]="", @@ -868,7 +1114,6 @@ data.labels={ ["nb"]="", ["nl"]=" en ", ["nn"]="", - ["pe"]=" و ", ["pl"]=" i ", ["pt"]="", ["ro"]="", @@ -895,13 +1140,16 @@ data.labels={ ["da"]="Bilag ", ["de"]="Anhang ", ["en"]="Appendix ", + ["eo"]="Anekso", ["es"]="Apéndice ", ["et"]="Lisa ", - ["fi"]="", + ["fa"]="پیوست ", + ["fi"]="liite", ["fr"]="Annexe ", - ["gr"]="Παράρτημα", + ["gr"]="Παράρτημα ", ["hr"]="Dodatak ", ["hu"]="Melléklet ", + ["hy"]="Հավելված ", ["it"]="", ["ja"]="付録", ["kr"]="부록", @@ -911,7 +1159,6 @@ data.labels={ ["nb"]="Tillegg ", ["nl"]="", ["nn"]="Tillegg ", - ["pe"]="پیوست ", ["pl"]="Dodatek ", ["pt"]="", ["ro"]="", @@ -921,7 +1168,7 @@ data.labels={ ["sr"]="Додатак ", ["sr-latn"]="Dodatak ", ["sv"]="", - ["tk"]="Goşmaça", + ["tk"]="Goşmaça ", ["tr"]="", ["ua"]="", ["vi"]="", @@ -941,13 +1188,16 @@ data.labels={ ["da"]="april", ["de"]="April", ["en"]="April", + ["eo"]="Aprilo", ["es"]="abril", ["et"]="aprill", + ["fa"]="آوریل", ["fi"]="huhtikuu", ["fr"]="avril", ["gr"]="Απρίλιος", ["hr"]="travnja", ["hu"]="április", + ["hy"]="Ապրիլ", ["it"]="aprile", ["ja"]="4", ["kr"]="4", @@ -957,7 +1207,6 @@ data.labels={ ["nb"]="april", ["nl"]="april", ["nn"]="april", - ["pe"]="آوریل", ["pl"]="kwietnia", ["pt"]="abril", ["ro"]="aprilie", @@ -975,25 +1224,30 @@ data.labels={ }, ["april:jalali"]={ ["labels"]={ + ["ca"]="Tir", ["en"]="Tir", ["fa"]="تیر", + ["hy"]="Տիր", }, }, ["april:mnem"]={ ["labels"]={ ["af"]="", - ["ca"]="", + ["bg"]="апр.", + ["ca"]="abr", ["cs"]="dub.", ["da"]="", ["de"]="Apr.", ["en"]="apr", + ["eo"]="Apr.", ["es"]="abr.", ["et"]="apr", ["fi"]="", - ["fr"]="", + ["fr"]="avr.", ["gr"]="", ["hr"]="tra", ["hu"]="ápr.", + ["hy"]="Ապր", ["it"]="", ["la"]="", ["lt"]="apr", @@ -1007,8 +1261,8 @@ data.labels={ ["ru"]="", ["sk"]="apr.", ["sl"]="", - ["sr"]="апр.", - ["sr-latn"]="apr.", + ["sr"]="апр", + ["sr-latn"]="apr", ["sv"]="", ["tk"]="", ["tr"]="", @@ -1020,18 +1274,21 @@ data.labels={ ["labels"]={ ["af"]="", ["ar"]="في صفحة ", - ["ca"]="", + ["ca"]="a la pagina", ["cs"]="na straně ", ["da"]="på side ", ["de"]="auf Seite ", ["en"]="at page ", + ["eo"]="je paĝo", ["es"]="en la página ", ["et"]="leheküljel ", - ["fi"]="", + ["fa"]="در صفحه ", + ["fi"]="sivulla", ["fr"]="à la page ", ["gr"]="", ["hr"]="na stranici ", ["hu"]="oldal ", + ["hy"]="էջում ", ["it"]="a pagina ", ["la"]="", ["lt"]="puslapyje ", @@ -1039,7 +1296,6 @@ data.labels={ ["nb"]="på side ", ["nl"]="op pagina ", ["nn"]="på side ", - ["pe"]="در صفحه ", ["pl"]="na stronie ", ["pt"]="", ["ro"]="", @@ -1070,13 +1326,16 @@ data.labels={ ["da"]="august", ["de"]="August", ["en"]="August", + ["eo"]="Aŭgusto", ["es"]="agosto", ["et"]="august", + ["fa"]="اوت", ["fi"]="elokuu", ["fr"]="août", ["gr"]="Αύγουστος", ["hr"]="kolovoza", ["hu"]="augusztus", + ["hy"]="Օգոստոս", ["it"]="agosto", ["ja"]="8", ["kr"]="8", @@ -1086,7 +1345,6 @@ data.labels={ ["nb"]="august", ["nl"]="augustus", ["nn"]="august", - ["pe"]="اوت", ["pl"]="sierpnia", ["pt"]="agosto", ["ro"]="august", @@ -1104,18 +1362,22 @@ data.labels={ }, ["august:jalali"]={ ["labels"]={ + ["ca"]="Aban", ["en"]="Aban", ["fa"]="آبان", + ["hy"]="Աբան", }, }, ["august:mnem"]={ ["labels"]={ ["af"]="", - ["ca"]="", + ["bg"]="авг.", + ["ca"]="ag", ["cs"]="srp.", ["da"]="", ["de"]="Aug.", ["en"]="aug", + ["eo"]="Aŭg.", ["es"]="ago.", ["et"]="aug", ["fi"]="", @@ -1123,6 +1385,7 @@ data.labels={ ["gr"]="", ["hr"]="kol", ["hu"]="aug.", + ["hy"]="Օգ", ["it"]="", ["la"]="", ["lt"]="aug", @@ -1136,8 +1399,8 @@ data.labels={ ["ru"]="", ["sk"]="aug.", ["sl"]="", - ["sr"]="авг.", - ["sr-latn"]="avg.", + ["sr"]="авг", + ["sr-latn"]="avg", ["sv"]="", ["tk"]="", ["tr"]="", @@ -1158,13 +1421,16 @@ data.labels={ ["da"]="", ["de"]="Kapitel ", ["en"]="Chapter ", + ["eo"]="Ĉapitro", ["es"]="Capítulo ", ["et"]="Peatükk ", - ["fi"]="", + ["fa"]="فصل ", + ["fi"]="luku", ["fr"]="Chapitre ", ["gr"]="Κεφάλαιο", ["hr"]="Poglavlje ", ["hu"]={ "", " fejezet" }, + ["hy"]="Գլուխ ", ["it"]="", ["ja"]={ "第", "章" }, ["kr"]={ "제", "장" }, @@ -1174,14 +1440,12 @@ data.labels={ ["nb"]="", ["nl"]="", ["nn"]="", - ["pe"]="فصل ", ["pl"]="Rozdział ", ["pt"]="", ["ro"]="", ["ru"]="", ["sk"]="Kapitola ", ["sl"]="Poglavje ", - ["sr"]="Поглавље ", ["sr"]="Глава ", ["sr-latn"]="Glava ", ["sv"]="", @@ -1196,18 +1460,21 @@ data.labels={ ["af"]="", ["be"]=" (працяг)", ["bg"]=" (продължение)", - ["ca"]="", + ["ca"]="continua", ["cs"]=" (pokračování)", ["da"]="", - ["de"]="", + ["de"]=" (Fortsetzung)", ["en"]=" (continued)", + ["eo"]=" (daŭrigota)", ["es"]=" (continúa)", ["et"]=" (jätkub)", - ["fi"]="", + ["fa"]="(ادامه دارد)", + ["fi"]="(jatkuu)", ["fr"]="", ["gr"]="", ["hr"]=" (nastavak)", ["hu"]=" (folytatás)", + ["hy"]=" (շարունակություն)", ["it"]="", ["la"]="", ["lt"]="", @@ -1215,14 +1482,12 @@ data.labels={ ["nb"]="", ["nl"]=" (vervolgd)", ["nn"]="", - ["pe"]="(ادامه دارد)", ["pl"]="", ["pt"]="", ["ro"]="", ["ru"]="", ["sk"]=" (pokračovanie)", ["sl"]="", - ["sr"]=" (наставио)", ["sr"]=" (наставак)", ["sr-latn"]=" (nastavak)", ["sv"]="", @@ -1235,12 +1500,18 @@ data.labels={ ["day"]={ ["labels"]={ ["bg"]="ден", + ["ca"]="dia", + ["de"]="Tag", ["en"]="day", + ["eo"]="tago", ["et"]="päev", + ["fa"]="روز", + ["fi"]="päivä", + ["fr"]="jour", + ["hy"]="օր", ["kr"]="일", ["mk"]="ден", ["nl"]="dag", - ["pe"]="روز", ["sr"]="дан", ["sr-latn"]="dan", }, @@ -1259,13 +1530,16 @@ data.labels={ ["da"]="december", ["de"]="Dezember", ["en"]="December", + ["eo"]="Decembro", ["es"]="diciembre", ["et"]="detsember", + ["fa"]="دسامبر", ["fi"]="joulukuu", ["fr"]="décembre", ["gr"]="Δεκέμβριος", ["hr"]="prosinca", ["hu"]="december", + ["hy"]="Դեկտեմբեր", ["it"]="dicembre", ["ja"]="12", ["kr"]="12", @@ -1275,7 +1549,6 @@ data.labels={ ["nb"]="desember", ["nl"]="december", ["nn"]="desember", - ["pe"]="دسامبر", ["pl"]="grudnia", ["pt"]="dezembro", ["ro"]="decembrie", @@ -1293,25 +1566,30 @@ data.labels={ }, ["december:jalali"]={ ["labels"]={ + ["ca"]="Esfand", ["en"]="Esfand", ["fa"]="اسفند", + ["hy"]="Էսֆանդ", }, }, ["december:mnem"]={ ["labels"]={ ["af"]="", - ["ca"]="", + ["bg"]="дек.", + ["ca"]="des", ["cs"]="pros.", ["da"]="", ["de"]="Dez.", ["en"]="dec", + ["eo"]="Dec.", ["es"]="dic.", ["et"]="dets", ["fi"]="", - ["fr"]="", + ["fr"]="déc.", ["gr"]="", ["hr"]="pro", ["hu"]="dec.", + ["hy"]="Դեկ", ["it"]="", ["la"]="", ["lt"]="dec", @@ -1325,8 +1603,8 @@ data.labels={ ["ru"]="", ["sk"]="dec.", ["sl"]="", - ["sr"]="дец.", - ["sr-latn"]="dec.", + ["sr"]="дец", + ["sr-latn"]="dec", ["sv"]="", ["tk"]="", ["tr"]="", @@ -1348,13 +1626,16 @@ data.labels={ ["da"]="februar", ["de"]="Februar", ["en"]="February", + ["eo"]="Februaro", ["es"]="febrero", ["et"]="veebruar", + ["fa"]="فوریه", ["fi"]="helmikuu", ["fr"]="février", ["gr"]="Φεβρουάριος", ["hr"]="veljače", ["hu"]="február", + ["hy"]="Պետրվար", ["it"]="febbraio", ["ja"]="2", ["kr"]="2", @@ -1364,7 +1645,6 @@ data.labels={ ["nb"]="februar", ["nl"]="februari", ["nn"]="februar", - ["pe"]="فوریه", ["pl"]="lutego", ["pt"]="fevereiro", ["ro"]="februarie", @@ -1382,25 +1662,30 @@ data.labels={ }, ["february:jalali"]={ ["labels"]={ + ["ca"]="Ordibehesht", ["en"]="Ordibehesht", ["fa"]="اردیبهشت", + ["hy"]="Օրդիբեհեշթ", }, }, ["february:mnem"]={ ["labels"]={ ["af"]="", - ["ca"]="", + ["bg"]="февр.", + ["ca"]="febr", ["cs"]="ún.", ["da"]="", ["de"]="Feb.", ["en"]="feb", + ["eo"]="Feb.", ["es"]="feb.", ["et"]="veebr", ["fi"]="", - ["fr"]="", + ["fr"]="fév.", ["gr"]="", ["hr"]="velj", ["hu"]="feb.", + ["hy"]="Փետ", ["it"]="", ["la"]="", ["lt"]="feb", @@ -1414,8 +1699,8 @@ data.labels={ ["ru"]="", ["sk"]="feb.", ["sl"]="", - ["sr"]="феб.", - ["sr-latn"]="feb.", + ["sr"]="феб", + ["sr-latn"]="feb", ["sv"]="", ["tk"]="", ["tr"]="", @@ -1435,13 +1720,16 @@ data.labels={ ["da"]="Figur ", ["de"]="Abbildung ", ["en"]="Figure ", + ["eo"]="Figuro ", ["es"]="Figura ", ["et"]="Joonis ", + ["fa"]="شکل ", ["fi"]="Kuva ", ["fr"]="Figure ", ["gr"]="Σχήμα", ["hr"]="Slika ", ["hu"]={ "", " ábra" }, + ["hy"]="Նկար ", ["it"]="Fig. ", ["ja"]="図", ["kr"]="그림 ", @@ -1451,7 +1739,6 @@ data.labels={ ["nb"]="Figur ", ["nl"]="Figuur ", ["nn"]="Figur ", - ["pe"]="شکل ", ["pl"]="Ilustracja ", ["pt"]="Figura ", ["ro"]="Figura ", @@ -1469,23 +1756,36 @@ data.labels={ }, ["following:plural"]={ ["labels"]={ + ["de"]="ff.", ["en"]="ff.", + ["eo"]="sekvv", ["fr"]=hairspace .. "sqq", + ["hy"]="ff.", }, }, ["following:singular"]={ ["labels"]={ + ["de"]="f.", ["en"]="f.", + ["eo"]="sekv", ["fr"]=hairspace .. "sq", + ["hy"]="f.", }, }, ["followingpage"]={ ["labels"]={ + ["ca"]="en la seguent pagina", + ["de"]="auf einer Folgeseite", ["en"]="on a following page", + ["eo"]="je sekvanta paĝo", + ["es"]="en la siguiente pagina", ["et"]="järgmisel leheküljel", + ["fa"]="در صفحات آینده", + ["fi"]="seuraavalla sivulla", + ["fr"]="sur la page suivante", + ["hy"]="Հաջորդ էջում", ["mk"]="на следната страница", ["nl"]="op een volgende bladzijde", - ["pe"]="در صفحات آینده", ["sr"]="на следећој страници", ["sr-latn"]="na sledećoj stranici", }, @@ -1502,13 +1802,16 @@ data.labels={ ["da"]="fredag", ["de"]="Freitag", ["en"]="Friday", + ["eo"]="vendredo", ["es"]="viernes", ["et"]="reede", + ["fa"]="جمعه", ["fi"]="perjantai", ["fr"]="vendredi", ["gr"]="Παρασκευή", ["hr"]="petak", ["hu"]="péntek", + ["hy"]="ուրբաթ", ["it"]="venerdì", ["ja"]="金曜日", ["kr"]="금요일", @@ -1518,7 +1821,6 @@ data.labels={ ["nb"]="fredag", ["nl"]="vrijdag", ["nn"]="fredag", - ["pe"]="جمعه", ["pl"]="piątek", ["pt"]="sexta-feira", ["ro"]="vineri", @@ -1536,10 +1838,19 @@ data.labels={ }, ["friday:mnem"]={ ["labels"]={ + ["bg"]="пт", + ["ca"]="dv", + ["cs"]="pá", ["de"]="Fr.", ["en"]="fri", - ["sr"]="пет.", - ["sr-latn"]="pet.", + ["eo"]="ven.", + ["es"]="vi", + ["fi"]="pe", + ["fr"]="ven.", + ["hy"]="Ուրբ", + ["sk"]="pi", + ["sr"]="пет", + ["sr-latn"]="pet", }, }, ["graphic"]={ @@ -1552,15 +1863,18 @@ data.labels={ ["cn"]="插图", ["cs"]="Graf ", ["da"]="Grafik ", - ["de"]="Graphik ", + ["de"]="Grafik ", ["en"]="Graphic ", + ["eo"]="Grafiko", ["es"]="Gráfico ", ["et"]="Pilt ", + ["fa"]="طرح ", ["fi"]="Grafiikka ", ["fr"]="Illustration ", ["gr"]="Γραφικό", ["hr"]="Slika ", ["hu"]={ "", " kép" }, + ["hy"]="Գրաֆ", ["it"]="Grafico ", ["ja"]="イラスト", ["la"]="Typus ", @@ -1569,7 +1883,6 @@ data.labels={ ["nb"]="Bilde ", ["nl"]="Grafiek ", ["nn"]="Bilete ", - ["pe"]="طرح ", ["pl"]="Grafika ", ["pt"]="Gráfico ", ["ro"]="Graficul ", @@ -1589,19 +1902,23 @@ data.labels={ ["labels"]={ ["af"]="", ["ar"]="كما وضحنا سابقا", - ["be"]="Графіка", - ["ca"]="", + ["be"]="гл. вышэй", + ["bg"]="виж по-горе", + ["ca"]="com es mostra dalt ", ["cs"]="viz výše", ["da"]="se foroven", - ["de"]="siehe oben", + ["de"]="siehe oben", -- better "oben"? ["en"]="as we show above", + ["eo"]="laŭsupre", ["es"]="como se muestra arriba", ["et"]="nii nagu üleval näidatud", - ["fi"]="", + ["fa"]="چنانکه شرح دادیم", + ["fi"]="kuten yllä näytämme", ["fr"]="ci-dessus", ["gr"]="", ["hr"]="vidi gore", ["hu"]="lásd feljebb", + ["hy"]="ստորև նշված", ["it"]="come mostrato sopra", ["kr"]="그러므로", ["la"]="", @@ -1610,14 +1927,12 @@ data.labels={ ["nb"]="som vist over", ["nl"]="hierboven", ["nn"]="som vist over", - ["pe"]="چنانکه شرح دادیم", ["pl"]="jak pokazano wyżej", ["pt"]="", ["ro"]="", ["ru"]="см. выше", ["sk"]="pozri hore", ["sl"]="glej zgoraj", - ["sr"]="види горе", ["sr"]="као што је показано изнад", ["sr-latn"]="kao što je pokazano iznad", ["sv"]="se ovan", @@ -1631,20 +1946,23 @@ data.labels={ ["labels"]={ ["af"]="", ["ar"]="كما نوضح لاحقا", - ["be"]="гл. вышэй", + ["be"]="гл. ніжэй", ["bg"]="ў далейшым", - ["ca"]="", + ["ca"]="com es mostra baix", ["cs"]="viz níže", ["da"]="se forneden", - ["de"]="siehe unten", + ["de"]="siehe unten", -- better "nachstehend"? ["en"]="as we show below", + ["eo"]="laŭsube", ["es"]="como se muestra abajo", ["et"]="nii nagu all näidatud", - ["fi"]="", + ["fa"]="چنانکه شرح خواهیم داد", + ["fi"]="kuten alla näytämme", ["fr"]="ci-dessous", ["gr"]="", ["hr"]="vidi ispod", ["hu"]="lásd lejjebb", + ["hy"]="ինչպես ցույց է տրված ստորև", ["it"]="come mostrato sotto", ["kr"]="이후로", ["la"]="", @@ -1653,14 +1971,12 @@ data.labels={ ["nb"]="som vist under", ["nl"]="hieronder", ["nn"]="som vist under", - ["pe"]="چنانکه شرح خواهیم داد", ["pl"]="jak pokazano niżej", ["pt"]="", ["ro"]="", ["ru"]="см. ниже", ["sk"]="pozri ďalej", ["sl"]="glej spodaj", - ["sr"]="види доле", ["sr"]="као што је показано ниже", ["sr-latn"]="kao što je pokazano niže", ["sv"]="se nedan", @@ -1674,14 +1990,15 @@ data.labels={ ["labels"]={ ["af"]="Intermezzo ", ["ar"]="فسحة ", - ["be"]="Устаўка", - ["bg"]="Aнтракт ", + ["be"]="Інтэрмецца ", + ["bg"]="Интермецо ", ["ca"]="Intermedi ", ["cn"]="퉣", ["cs"]="Intermezzo ", ["da"]="Intermezzo ", ["de"]="Intermezzo ", ["en"]="Intermezzo ", + ["eo"]="Intermezo", ["es"]="Intermedio ", ["et"]="Vahemäng ", ["fi"]="Intermezzo ", @@ -1689,6 +2006,7 @@ data.labels={ ["gr"]="Παύση", ["hr"]="Intermeco ", ["hu"]={ "", " intermezzo" }, + ["hy"]="Ինտերմեցո", ["it"]="Intermezzo ", ["ja"]="間奏曲", ["kr"]="간주곡", @@ -1704,7 +2022,6 @@ data.labels={ ["ru"]="Вставка ", ["sk"]="Intermezzo ", ["sl"]="Intermezzo ", - ["sr"]="Интермеззо ", ["sr"]="Дигресија ", ["sr-latn"]="Digresija ", ["sv"]="Intermezzo ", @@ -1728,13 +2045,16 @@ data.labels={ ["da"]="januar", ["de"]="Januar", ["en"]="January", + ["eo"]="Januaro", ["es"]="enero", ["et"]="jaanuar", + ["fa"]="ژانویه", ["fi"]="tammikuu", ["fr"]="janvier", ["gr"]="Ιανουάριος", ["hr"]="siječnja", ["hu"]="január", + ["hy"]="Հունվար", ["it"]="gennaio", ["ja"]="1", ["kr"]="1", @@ -1744,7 +2064,6 @@ data.labels={ ["nb"]="januar", ["nl"]="januari", ["nn"]="januar", - ["pe"]="ژانویه", ["pl"]="stycznia", ["pt"]="janeiro", ["ro"]="ianuarie", @@ -1762,25 +2081,31 @@ data.labels={ }, ["january:jalali"]={ ["labels"]={ + ["ca"]="Farvardin", ["en"]="Farvardin", + ["es"]="Farvardin", ["fa"]="فروردین", + ["hy"]="Ֆարվարդին", }, }, ["january:mnem"]={ ["labels"]={ ["af"]="", - ["ca"]="", + ["bg"]="ян.", + ["ca"]="gen", ["cs"]="led.", ["da"]="", ["de"]="Jan.", ["en"]="jan", + ["eo"]="Jan.", ["es"]="ene.", ["et"]="jaan", ["fi"]="", - ["fr"]="", + ["fr"]="jan.", ["gr"]="", ["hr"]="sij", ["hu"]="jan.", + ["hy"]="Հունվ", ["it"]="", ["la"]="", ["lt"]="jan", @@ -1794,8 +2119,8 @@ data.labels={ ["ru"]="", ["sk"]="jan.", ["sl"]="", - ["sr"]="јан.", - ["sr-latn"]="jan.", + ["sr"]="јан", + ["sr-latn"]="jan", ["sv"]="", ["tk"]="", ["tr"]="", @@ -1818,13 +2143,16 @@ data.labels={ ["da"]="juli", ["de"]="Juli", ["en"]="July", + ["eo"]="Julio", ["es"]="julio", ["et"]="juuli", + ["fa"]="ژوئیه", ["fi"]="heinäkuu", ["fr"]="juillet", ["gr"]="Ιούλιος", ["hr"]="srpnja", ["hu"]="július", + ["hy"]="Հուլիս", ["it"]="luglio", ["ja"]="7", ["kr"]="7", @@ -1834,7 +2162,6 @@ data.labels={ ["nb"]="juli", ["nl"]="juli", ["nn"]="juli", - ["pe"]="ژوئیه", ["pl"]="lipca", ["pt"]="julho", ["ro"]="iulie", @@ -1852,25 +2179,31 @@ data.labels={ }, ["july:jalali"]={ ["labels"]={ + ["ca"]="Mehr", ["en"]="Mehr", + ["es"]="Mehr", ["fa"]="مهر", + ["hy"]="Մեհր", }, }, ["july:mnem"]={ ["labels"]={ ["af"]="", - ["ca"]="", + ["bg"]="юли", + ["ca"]="jul", ["cs"]="čce", ["da"]="", ["de"]="Jul.", ["en"]="jul", + ["eo"]="Jul.", ["es"]="jul.", ["et"]="juuli", ["fi"]="", - ["fr"]="", + ["fr"]="juill.", ["gr"]="", ["hr"]="srp", ["hu"]="júl.", + ["hy"]="Հուլ", ["it"]="", ["la"]="", ["lt"]="jul", @@ -1884,8 +2217,8 @@ data.labels={ ["ru"]="", ["sk"]="júla", ["sl"]="", - ["sr"]="јул.", - ["sr-latn"]="jul.", + ["sr"]="јул", + ["sr-latn"]="jul", ["sv"]="", ["tk"]="", ["tr"]="", @@ -1907,13 +2240,16 @@ data.labels={ ["da"]="juni", ["de"]="Juni", ["en"]="June", + ["eo"]="Junio", ["es"]="junio", ["et"]="juuni", + ["fa"]="ژوئن", ["fi"]="kesäkuu", ["fr"]="juin", ["gr"]="Ιούνιος", ["hr"]="lipnja", ["hu"]="június", + ["hy"]="Հունիսի", ["it"]="giugno", ["ja"]="6", ["kr"]="6", @@ -1923,7 +2259,6 @@ data.labels={ ["nb"]="juni", ["nl"]="juni", ["nn"]="juni", - ["pe"]="ژوئن", ["pl"]="czerwca", ["pt"]="junho", ["ro"]="iunie", @@ -1941,25 +2276,31 @@ data.labels={ }, ["june:jalali"]={ ["labels"]={ + ["ca"]="Shahrivar", ["en"]="Shahrivar", + ["es"]="Shahrivar", ["fa"]="شهریور", + ["hy"]="Շահրիվար", }, }, ["june:mnem"]={ ["labels"]={ ["af"]="", - ["ca"]="", + ["bg"]="юни", + ["ca"]="juny", ["cs"]="čer.", ["da"]="", ["de"]="Jun.", ["en"]="jun", + ["eo"]="Jun.", ["es"]="jun.", ["et"]="juuni", ["fi"]="", - ["fr"]="", + ["fr"]="juin", ["gr"]="", ["hr"]="lip", ["hu"]="jún.", + ["hy"]="Հուն", ["it"]="", ["la"]="", ["lt"]="jun", @@ -1994,13 +2335,16 @@ data.labels={ ["da"]="linie ", ["de"]="Zeile ", ["en"]="line ", + ["eo"]="linio ", ["es"]="línea ", ["et"]="joon ", + ["fa"]="سطر ", ["fi"]="rivi ", ["fr"]="ligne ", ["gr"]="Γραμμή", ["hr"]="redak ", ["hu"]={ "", " sor" }, + ["hy"]="Տող ", ["it"]="riga ", ["ja"]="線", ["kr"]="행", @@ -2010,7 +2354,6 @@ data.labels={ ["nb"]="linje ", ["nl"]="regel ", ["nn"]="linje ", - ["pe"]="سطر ", ["pl"]="wiersz ", ["pt"]="linha ", ["ro"]="linia ", @@ -2038,13 +2381,16 @@ data.labels={ ["da"]="linier ", ["de"]="Zeilen ", ["en"]="lines ", + ["eo"]="linioj ", ["es"]="líneas ", ["et"]="jooned ", + ["fa"]="سطرهای ", ["fi"]="rivie ", ["fr"]="lignes ", ["gr"]="Γραμμές", ["hr"]="retci ", ["hu"]="sorok ", + ["hy"]="Տողեր ", ["it"]="righe ", ["ja"]="線", ["kr"]="행", @@ -2054,7 +2400,6 @@ data.labels={ ["nb"]="linjer ", ["nl"]="regels ", ["nn"]="linjer ", - ["pe"]="سطرهای ", ["pl"]="wiersze ", ["pt"]="linhas ", ["ro"]="liniile ", @@ -2083,13 +2428,16 @@ data.labels={ ["da"]="marts", ["de"]="März", ["en"]="March", + ["eo"]="Marto", ["es"]="marzo", ["et"]="märts", + ["fa"]="مارس", ["fi"]="maaliskuu", ["fr"]="mars", ["gr"]="Μάρτιος", ["hr"]="ožujka", ["hu"]="március", + ["hy"]="Մարտ", ["it"]="marzo", ["ja"]="3", ["kr"]="3", @@ -2099,7 +2447,6 @@ data.labels={ ["nb"]="mars", ["nl"]="maart", ["nn"]="mars", - ["pe"]="مارس", ["pl"]="marca", ["pt"]="março", ["ro"]="martie", @@ -2117,25 +2464,31 @@ data.labels={ }, ["march:jalali"]={ ["labels"]={ + ["ca"]="Jordad", ["en"]="Khordad", + ["es"]="Khordad", ["fa"]="خرداد", + ["hy"]="Խորդադ", }, }, ["march:mnem"]={ ["labels"]={ ["af"]="", - ["ca"]="", + ["bg"]="март", + ["ca"]="març", ["cs"]="břez.", ["da"]="", ["de"]="Mrz.", ["en"]="mar", + ["eo"]="Mar.", ["es"]="mar.", ["et"]="märts", ["fi"]="", - ["fr"]="", + ["fr"]="mars", ["gr"]="", ["hr"]="ožu", ["hu"]="már.", + ["hy"]="Մարտ", ["it"]="", ["la"]="", ["lt"]="mar", @@ -2149,8 +2502,8 @@ data.labels={ ["ru"]="", ["sk"]="mar.", ["sl"]="", - ["sr"]="мар.", - ["sr-latn"]="mar.", + ["sr"]="мар", + ["sr-latn"]="mar", ["sv"]="", ["tk"]="", ["tr"]="", @@ -2173,13 +2526,16 @@ data.labels={ ["da"]="maj", ["de"]="Mai", ["en"]="May", + ["eo"]="Majo", ["es"]="mayo", ["et"]="mai", + ["fa"]="مه", ["fi"]="toukokuu", ["fr"]="mai", ["gr"]="Μάιος", ["hr"]="svibnja", ["hu"]="május", + ["hy"]="Մայիս", ["it"]="maggio", ["ja"]="5", ["kr"]="5", @@ -2189,7 +2545,6 @@ data.labels={ ["nb"]="mai", ["nl"]="mei", ["nn"]="mai", - ["pe"]="مه", ["pl"]="maja", ["pt"]="maio", ["ro"]="mai", @@ -2207,25 +2562,31 @@ data.labels={ }, ["may:jalali"]={ ["labels"]={ + ["ca"]="Mordad", ["en"]="Mordad", + ["es"]="Mordad", ["fa"]="مرداد", + ["hy"]="Մորդադ", }, }, ["may:mnem"]={ ["labels"]={ ["af"]="", - ["ca"]="", + ["bg"]="май", + ["ca"]="maig", ["cs"]="květ.", ["da"]="", ["de"]="Mai", ["en"]="may", + ["eo"]="Maj.", ["es"]="may.", ["et"]="mai", ["fi"]="", - ["fr"]="", + ["fr"]="mai", ["gr"]="", ["hr"]="svi", ["hu"]="máj.", + ["hy"]="Մայ", ["it"]="", ["la"]="", ["lt"]="may", @@ -2260,13 +2621,16 @@ data.labels={ ["da"]="mandag", ["de"]="Montag", ["en"]="Monday", + ["eo"]="lundo", ["es"]="lunes", ["et"]="esmaspäev", + ["fa"]="دوشنبه", ["fi"]="maanantai", ["fr"]="lundi", ["gr"]="Δευτέρα", ["hr"]="ponedjeljak", ["hu"]="hétfő", + ["hy"]="երկուշաբթի", ["it"]="lunedì", ["ja"]="月曜日", ["kr"]="월요일", @@ -2276,7 +2640,6 @@ data.labels={ ["nb"]="mandag", ["nl"]="maandag", ["nn"]="måndag", - ["pe"]="دوشنبه", ["pl"]="poniedziałek", ["pt"]="segunda-feira", ["ro"]="luni", @@ -2294,22 +2657,38 @@ data.labels={ }, ["monday:mnem"]={ ["labels"]={ + ["bg"]="пн", + ["ca"]="dl", + ["cs"]="po", ["de"]="Mo.", ["en"]="mon", - ["sr"]="пон.", - ["sr-latn"]="pon.", + ["eo"]="lun.", + ["es"]="lu", + ["fi"]="ma", + ["fr"]="lun.", + ["hy"]="Երկ", + ["sk"]="po", + ["sr"]="пон", + ["sr-latn"]="pon", }, }, ["month"]={ ["labels"]={ ["be"]="месяц", ["bg"]="месец", + ["ca"]="mes", + ["de"]="Monat", ["en"]="month", + ["eo"]="monato", + ["es"]="mes", ["et"]="kuu", + ["fa"]="ماه", + ["fi"]="kuukausi", + ["fr"]="mois", + ["hy"]="ամիս", ["kr"]="월", ["mk"]="месец", ["nl"]="maand", - ["pe"]="ماه", ["sr"]="месец", ["sr-latn"]="mesec", }, @@ -2328,13 +2707,16 @@ data.labels={ ["da"]="november", ["de"]="November", ["en"]="November", + ["eo"]="Novembro", ["es"]="noviembre", ["et"]="november", + ["fa"]="نوامبر", ["fi"]="marraskuu", ["fr"]="novembre", ["gr"]="Νοέμβριος", ["hr"]="studenog", ["hu"]="november", + ["hy"]="Նոյեմբեր", ["it"]="novembre", ["ja"]="11", ["kr"]="11", @@ -2344,7 +2726,6 @@ data.labels={ ["nb"]="november", ["nl"]="november", ["nn"]="november", - ["pe"]="نوامبر", ["pl"]="listopada", ["pt"]="novembro", ["ro"]="noiembrie", @@ -2362,25 +2743,31 @@ data.labels={ }, ["november:jalali"]={ ["labels"]={ + ["ca"]="Bahman", ["en"]="Bahman", + ["es"]="Bahman", ["fa"]="بهمن", + ["hy"]="Բահման", }, }, ["november:mnem"]={ ["labels"]={ ["af"]="", - ["ca"]="", + ["bg"]="ноем.", + ["ca"]="nov", ["cs"]="list.", ["da"]="", ["de"]="Nov.", ["en"]="nov", + ["eo"]="Nov.", ["es"]="nov.", ["et"]="nov", ["fi"]="", - ["fr"]="", + ["fr"]="nov.", ["gr"]="", ["hr"]="stu", ["hu"]="nov.", + ["hy"]="Նոյ", ["it"]="", ["la"]="", ["lt"]="nov", @@ -2394,8 +2781,8 @@ data.labels={ ["ru"]="", ["sk"]="nov.", ["sl"]="", - ["sr"]="нов.", - ["sr-latn"]="nov.", + ["sr"]="нов", + ["sr-latn"]="nov", ["sv"]="", ["tk"]="", ["tr"]="", @@ -2416,13 +2803,16 @@ data.labels={ ["da"]="oktober", ["de"]="Oktober", ["en"]="October", + ["eo"]="Oktobro", ["es"]="octubre", ["et"]="oktoober", + ["fa"]="اکتبر", ["fi"]="lokakuu", ["fr"]="octobre", ["gr"]="Οκτώβριος", ["hr"]="listopada", ["hu"]="október", + ["hy"]="հոկտեմբեր", ["it"]="ottobre", ["ja"]="10", ["kr"]="10", @@ -2432,7 +2822,6 @@ data.labels={ ["nb"]="oktober", ["nl"]="oktober", ["nn"]="oktober", - ["pe"]="اکتبر", ["pl"]="października", ["pt"]="outubro", ["ro"]="octombrie", @@ -2450,25 +2839,31 @@ data.labels={ }, ["october:jalali"]={ ["labels"]={ + ["ca"]="Dey", ["en"]="Dey", + ["es"]="Dey", ["fa"]="دی", + ["hy"]="Դեյ", }, }, ["october:mnem"]={ ["labels"]={ ["af"]="", - ["ca"]="", + ["bg"]="окт.", + ["ca"]="oct", ["cs"]="říj.", ["da"]="", ["de"]="Okt.", ["en"]="oct", + ["eo"]="Okt.", ["es"]="oct.", ["et"]="okt", ["fi"]="", - ["fr"]="", + ["fr"]="oct.", ["gr"]="", ["hr"]="lis", ["hu"]="okt.", + ["hy"]="Հոկ", ["it"]="", ["la"]="", ["lt"]="oct", @@ -2482,8 +2877,8 @@ data.labels={ ["ru"]="", ["sk"]="okt.", ["sl"]="", - ["sr"]="окт.", - ["sr-latn"]="okt.", + ["sr"]="окт", + ["sr-latn"]="okt", ["sv"]="", ["tk"]="", ["tr"]="", @@ -2497,18 +2892,21 @@ data.labels={ ["ar"]="صفحة ", ["be"]="старонка ", ["bg"]="страна", - ["ca"]="", + ["ca"]="pagina ", ["cs"]="strana ", ["da"]="Side ", ["de"]="Seite ", ["en"]="page ", + ["eo"]="paĝo ", ["es"]="página ", ["et"]="lehekülg ", - ["fi"]="", + ["fa"]="صفحه ", + ["fi"]="Sivu", ["fr"]="page ", ["gr"]="", ["hr"]="stranica ", ["hu"]="oldal ", + ["hy"]="էջ ", ["it"]="pagina ", ["kr"]="쪽", ["la"]="", @@ -2517,7 +2915,6 @@ data.labels={ ["nb"]="side ", ["nl"]="pagina ", ["nn"]="side ", - ["pe"]="صفحه ", ["pl"]="strona ", ["pt"]="", ["ro"]="", @@ -2545,13 +2942,16 @@ data.labels={ ["da"]="Del ", ["de"]="Teil ", ["en"]="Part ", + ["eo"]="Parto ", ["es"]="Parte ", ["et"]="Osa ", + ["fa"]="قسمت ", ["fi"]="Osa ", ["fr"]="Partie ", ["gr"]="Μέρος", ["hr"]="Dio ", ["hu"]={ "", " rész" }, + ["hy"]="Մաս ", ["it"]="Parte ", ["ja"]={ "第", "パート" }, ["kr"]={ "제", "부" }, @@ -2561,7 +2961,6 @@ data.labels={ ["nb"]="Del ", ["nl"]="Deel ", ["nn"]="Del", - ["pe"]="قسمت ", ["pl"]="Część ", ["pt"]="Parte ", ["ro"]="Partea ", @@ -2579,11 +2978,18 @@ data.labels={ }, ["precedingpage"]={ ["labels"]={ + ["ca"]="en una pagina anterior", + ["de"]="oben", -- "auf der vorigen Seite" ok, but not "auf einer vorigen Seite" ["en"]="on a preceding page", + ["eo"]="sur antaŭa paĝo", + ["es"]="en la pagina anterior", ["et"]="eelmisel lehel", + ["fa"]="در صفحات گذشته", + ["fi"]="edellisellä sivulla", + ["fr"]="sur la page précédente", + ["hy"]="նախորդ էջ", ["mk"]="на претходната страница", ["nl"]="op een voorgaande bladzijde", - ["pe"]="در صفحات گذشته", ["sr"]="на претходној страници", ["sr-latn"]="na prethodnoj stranici", }, @@ -2600,13 +3006,16 @@ data.labels={ ["da"]="lørdag", ["de"]="Samstag", ["en"]="Saturday", + ["eo"]="sabato", ["es"]="sábado", ["et"]="laupäev", + ["fa"]="شنبه", ["fi"]="lauantai", ["fr"]="samedi", ["gr"]="Σάββατο", ["hr"]="subota", ["hu"]="szombat", + ["hy"]="շաբաթ", ["it"]="sabato", ["ja"]="土曜日", ["kr"]="토요일", @@ -2616,7 +3025,6 @@ data.labels={ ["nb"]="lørdag", ["nl"]="zaterdag", ["nn"]="laurdag", - ["pe"]="شنبه", ["pl"]="sobota", ["pt"]="sábado", ["ro"]="sâmbătă", @@ -2634,10 +3042,18 @@ data.labels={ }, ["saturday:mnem"]={ ["labels"]={ + ["bg"]="сб", + ["cs"]="so", ["de"]="Sa.", ["en"]="sat", - ["sr"]="суб.", - ["sr-latn"]="sub.", + ["eo"]="sab.", + ["es"]="sa", + ["fi"]="La", + ["fr"]="sam.", + ["hy"]="Շաբ", + ["sk"]="so", + ["sr"]="суб", + ["sr-latn"]="sub", }, }, ["section"]={ @@ -2650,15 +3066,18 @@ data.labels={ ["cn"]={ "第", "节" }, ["cs"]="Sekce ", ["da"]="", - ["de"]="", - ["en"]="", + ["de"]="Abschnitt ", + ["en"]="Section", + ["eo"]="Sekcio ", ["es"]="Sección ", ["et"]="jaos ", - ["fi"]="", + ["fa"]="بخش ", + ["fi"]="Osio", ["fr"]="Section ", ["gr"]="Ενότητα", ["hr"]="Odjeljak ", ["hu"]="Fejezet ", + ["hy"]="Բաժին ", ["it"]="", ["ja"]={ "第", "項" }, ["kr"]={ "제", "절" }, @@ -2668,7 +3087,6 @@ data.labels={ ["nb"]="", ["nl"]="", ["nn"]="", - ["pe"]="بخش ", ["pl"]="Podrozdział ", ["pt"]="", ["ro"]="", @@ -2690,18 +3108,21 @@ data.labels={ ["ar"]="انظر ", ["be"]="гл. ", ["bg"]="погледни", - ["ca"]="", + ["ca"]="vore ", ["cs"]="viz ", ["da"]="se ", ["de"]="siehe ", ["en"]="see ", + ["eo"]="vidu ", ["es"]="ver: ", ["et"]="vaadake ", - ["fi"]="", + ["fa"]="نگاه کنید به ", + ["fi"]="Katso", ["fr"]="cf. ", ["gr"]="", ["hr"]="vidi ", ["hu"]="lásd ", + ["hy"]="Նայել ", ["it"]="cf. ", ["kr"]="", ["la"]="", @@ -2710,7 +3131,6 @@ data.labels={ ["nb"]="se ", ["nl"]="zie ", ["nn"]="sjå ", - ["pe"]="نگاه کنید به ", ["pl"]="patrz ", ["pt"]="", ["ro"]="", @@ -2740,13 +3160,16 @@ data.labels={ ["da"]="september", ["de"]="September", ["en"]="September", + ["eo"]="Septembro", ["es"]="septiembre", ["et"]="september", + ["fa"]="سپتامبر", ["fi"]="syyskuu", ["fr"]="septembre", ["gr"]="Σεπτέμβριος", ["hr"]="rujna", ["hu"]="szeptember", + ["hy"]="Սեպտեմբեր", ["it"]="settembre", ["ja"]="9", ["kr"]="9", @@ -2756,7 +3179,6 @@ data.labels={ ["nb"]="september", ["nl"]="september", ["nn"]="september", - ["pe"]="سپتامبر", ["pl"]="września", ["pt"]="setembro", ["ro"]="septembrie", @@ -2775,24 +3197,29 @@ data.labels={ ["september:jalali"]={ ["labels"]={ ["en"]="Azar", + ["es"]="Azar", ["fa"]="آذر", + ["hy"]="Ազար", }, }, ["september:mnem"]={ ["labels"]={ ["af"]="", - ["ca"]="", + ["bg"]="септ.", + ["ca"]="set", ["cs"]="září", ["da"]="", ["de"]="Sep.", ["en"]="sep", + ["eo"]="Sep.", ["es"]="sep.", ["et"]="sept", ["fi"]="", - ["fr"]="", + ["fr"]="sept.", ["gr"]="", ["hr"]="ruj", ["hu"]="szep.", + ["hy"]="Սեպ", ["it"]="", ["la"]="", ["lt"]="sep", @@ -2825,15 +3252,18 @@ data.labels={ ["cn"]="", ["cs"]="Podsekce ", ["da"]="", - ["de"]="", - ["en"]="", + ["de"]="Unterabschnitt ", + ["en"]="Subsection", + ["eo"]="Subsekcio ", ["es"]="Subsección ", ["et"]="alajaotis ", - ["fi"]="", + ["fa"]="زیربخش ", + ["fi"]="Alajakso", ["fr"]="Soussection ", ["gr"]="Υπόενότητα", ["hr"]="Pododjeljak ", ["hu"]="Alfejezet ", + ["hy"]=" Ենթաբաժին ", ["it"]="", ["ja"]="", ["la"]="", @@ -2842,7 +3272,6 @@ data.labels={ ["nb"]="", ["nl"]="", ["nn"]="", - ["pe"]="زیربخش ", ["pl"]="Podpodrozdział ", ["pt"]="", ["ro"]="", @@ -2868,15 +3297,18 @@ data.labels={ ["cn"]="", ["cs"]="Podpodsekce ", ["da"]="", - ["de"]="", - ["en"]="", + ["de"]="Unterunterabschnitt ", + ["en"]="Subsubsection", + ["eo"]="Subsubsekcio ", ["es"]="Subsubsección ", ["et"]="alamjaotis ", - ["fi"]="", + ["fa"]="زیرزیربخش ", + ["fi"]="Alakohta", ["fr"]="Soussoussection ", ["gr"]="", ["hr"]="Podpododjeljak ", ["hu"]="Al-alfejezet ", + ["hy"]="Ենթաենթաբաժին ", ["it"]="", ["ja"]="", ["la"]="", @@ -2885,7 +3317,6 @@ data.labels={ ["nb"]="", ["nl"]="", ["nn"]="", - ["pe"]="زیرزیربخش ", ["pl"]="", ["pt"]="", ["ro"]="", @@ -2911,15 +3342,18 @@ data.labels={ ["cn"]="", ["cs"]="Podpodpodsekce ", ["da"]="", - ["de"]="", - ["en"]="", + ["de"]="Unterunterunterabschnitt", + ["en"]="Subsubsubsection", + ["eo"]="Subsubsubsekcio ", ["es"]="Subsubsubsección ", ["et"]="", - ["fi"]="", + ["fa"]="زیرزیرزیربخش ", + ["fi"]="Ala-alakohta", ["fr"]="Soussoussoussection ", ["gr"]="", ["hr"]="Podpodpododjeljak ", ["hu"]="Al-al-alfejezet ", + ["hy"]="Ենթաենթաենթաբաժին ", ["it"]="", ["ja"]="", ["la"]="", @@ -2928,7 +3362,6 @@ data.labels={ ["nb"]="", ["nl"]="", ["nn"]="", - ["pe"]="زیرزیرزیربخش ", ["pl"]="", ["pt"]="", ["ro"]="", @@ -2956,13 +3389,16 @@ data.labels={ ["da"]="søndag", ["de"]="Sonntag", ["en"]="Sunday", + ["eo"]="dimanĉo", ["es"]="domingo", ["et"]="pühapäev", + ["fa"]="یکشنبه", ["fi"]="sunnuntai", ["fr"]="dimanche", ["gr"]="Κυριακή", ["hr"]="nedjelja", ["hu"]="vasárnap", + ["hy"]="կիրակի", ["it"]="domenica", ["ja"]="日曜日", ["kr"]="일요일", @@ -2972,7 +3408,6 @@ data.labels={ ["nb"]="søndag", ["nl"]="zondag", ["nn"]="sundag", - ["pe"]="یکشنبه", ["pl"]="niedziela", ["pt"]="domingo", ["ro"]="duminică", @@ -2990,10 +3425,18 @@ data.labels={ }, ["sunday:mnem"]={ ["labels"]={ + ["bg"]="нд", + ["ca"]="dg", + ["cs"]="ne", ["de"]="So.", ["en"]="sun", - ["sr"]="нед.", - ["sr-latn"]="ned.", + ["eo"]="dim.", + ["es"]="do", + ["fr"]="dim.", + ["hy"]="Կիր", + ["sk"]="ne", + ["sr"]="нед", + ["sr-latn"]="ned", }, }, ["table"]={ @@ -3008,13 +3451,16 @@ data.labels={ ["da"]="Tabel ", ["de"]="Tabelle ", ["en"]="Table ", + ["eo"]="Tabelo ", ["es"]="Tabla ", ["et"]="Tabel ", + ["fa"]="جدول ", ["fi"]="Taulukko ", ["fr"]="Tableau ", ["gr"]="Πίνακας", ["hr"]="Tablica ", ["hu"]={ "", " táblázat" }, + ["hy"]="Աղյուսակ ", ["it"]="Tabella ", ["ja"]="表", ["kr"]="표 ", @@ -3024,7 +3470,6 @@ data.labels={ ["nb"]="Tabell ", ["nl"]="Tabel ", ["nn"]="Tabell ", - ["pe"]="جدول ", ["pl"]="Tabela ", ["pt"]="Tabela ", ["ro"]="Tabelul ", @@ -3052,13 +3497,16 @@ data.labels={ ["da"]="torsdag", ["de"]="Donnerstag", ["en"]="Thursday", + ["eo"]="ĵaŭdo", ["es"]="jueves", ["et"]="neljapäev", + ["fa"]="پنجشنبه", ["fi"]="torstai", ["fr"]="jeudi", ["gr"]="Πέμπτη", ["hr"]="četvrtak", ["hu"]="csütörtök", + ["hy"]="հինգշաբթի", ["it"]="giovedì", ["ja"]="木曜日", ["kr"]="목요일", @@ -3068,7 +3516,6 @@ data.labels={ ["nb"]="torsdag", ["nl"]="donderdag", ["nn"]="torsdag", - ["pe"]="پنجشنبه", ["pl"]="czwartek", ["pt"]="quinta-feira", ["ro"]="joi", @@ -3086,10 +3533,19 @@ data.labels={ }, ["thursday:mnem"]={ ["labels"]={ + ["bg"]="чт", + ["ca"]="dj", + ["cs"]="čt", ["de"]="Do.", ["en"]="thu", - ["sr"]="чет.", - ["sr-latn"]="čet.", + ["eo"]="ĵaŭ.", + ["es"]="ju", + ["fi"]="To", + ["fr"]="jeu.", + ["hy"]="Հնգ", + ["sk"]="št", + ["sr"]="чет", + ["sr-latn"]="čet", }, }, ["tuesday"]={ @@ -3104,13 +3560,16 @@ data.labels={ ["da"]="tirsdag", ["de"]="Dienstag", ["en"]="Tuesday", + ["eo"]="mardo", ["es"]="martes", ["et"]="teisipäev", + ["fa"]="سهشنبه", ["fi"]="tiistai", ["fr"]="mardi", ["gr"]="Τρίτη", ["hr"]="utorak", ["hu"]="kedd", + ["hy"]="երեքշաբթի", ["it"]="martedì", ["ja"]="火曜日", ["kr"]="화요일", @@ -3120,7 +3579,6 @@ data.labels={ ["nb"]="tirsdag", ["nl"]="dinsdag", ["nn"]="tysdag", - ["pe"]="سهشنبه", ["pl"]="wtorek", ["pt"]="terça-feira", ["ro"]="marți", @@ -3138,10 +3596,19 @@ data.labels={ }, ["tuesday:mnem"]={ ["labels"]={ + ["bg"]="вт", + ["ca"]="dm", + ["cs"]="út", ["de"]="Di.", ["en"]="tue", - ["sr"]="уто.", - ["sr-latn"]="uto.", + ["eo"]="mar.", + ["es"]="ma", + ["fi"]="Ti", + ["fr"]="mar.", + ["hy"]="Երք", + ["sk"]="út", + ["sr"]="уто", + ["sr-latn"]="uto", }, }, ["wednesday"]={ @@ -3156,13 +3623,16 @@ data.labels={ ["da"]="onsdag", ["de"]="Mittwoch", ["en"]="Wednesday", + ["eo"]="merkredo", ["es"]="miércoles", ["et"]="kolmapäev", + ["fa"]="چهارشنبه", ["fi"]="keskiviikko", ["fr"]="mercredi", ["gr"]="Τετάρτη", ["hr"]="srijeda", ["hu"]="szerda", + ["hy"]="չորեքշաբթի", ["it"]="mercoledì", ["ja"]="水曜日", ["kr"]="수요일", @@ -3172,7 +3642,6 @@ data.labels={ ["nb"]="onsdag", ["nl"]="woensdag", ["nn"]="onsdag", - ["pe"]="چهارشنبه", ["pl"]="środa", ["pt"]="quarta-feira", ["ro"]="miercuri", @@ -3190,21 +3659,37 @@ data.labels={ }, ["wednesday:mnem"]={ ["labels"]={ + ["bg"]="ср", + ["ca"]="dim", + ["cs"]="st", ["de"]="Mi.", ["en"]="wed", - ["sr"]="сре.", - ["sr-latn"]="sre.", + ["eo"]="mer.", + ["es"]="mi", + ["fi"]="Ke", + ["fr"]="mer.", + ["hy"]="չոր", + ["sk"]="st", + ["sr"]="сре", + ["sr-latn"]="sre", }, }, ["year"]={ ["labels"]={ ["bg"]="година", + ["ca"]="any", + ["de"]="Jahr", ["en"]="year", + ["eo"]="jaro", + ["es"]="año", ["et"]="aasta", + ["fa"]="سال", + ["fi"]="Vuosi", + ["fr"]="année", + ["hy"]="Տարի", ["kr"]="년", ["mk"]="година", ["nl"]="jaar", - ["pe"]="سال", ["sr"]="година", ["sr-latn"]="godina", }, @@ -3223,13 +3708,16 @@ data.labels={ ["da"]="Forkortelser", ["de"]="Abkürzungen", ["en"]="Abbreviations", + ["eo"]="Mallongigoj", ["es"]="Abreviaturas", ["et"]="Lühend", + ["fa"]="نشانههای اختصاری", ["fi"]="Lyhennyksi", ["fr"]="Abréviations", ["gr"]="Συντομογραφίες", ["hr"]="Kratice", ["hu"]="Rövidítések", + ["hy"]="Հապավումներ", ["it"]="Abbreviazioni", ["ja"]="略語", ["kr"]="약어", @@ -3239,7 +3727,6 @@ data.labels={ ["nb"]="Forkortelser", ["nl"]="Afkortingen", ["nn"]="Forkortingar", - ["pe"]="نشانههای اختصاری", ["pl"]="Wykaz skrótów", ["pt"]="Abreviaturas", ["ro"]="Abrevieri", @@ -3267,13 +3754,16 @@ data.labels={ ["da"]="Indhold", ["de"]="Inhalt", ["en"]="Contents", + ["eo"]="Enhavo", ["es"]="Contenido", ["et"]="Sisu", + ["fa"]="فهرست مطالب", ["fi"]="Sisällys", ["fr"]="Table des matières", ["gr"]="Περιεχόμενα", ["hr"]="Sadržaj", ["hu"]="Tartalom", + ["hy"]="Բովանդակություն", ["it"]="Indice", ["ja"]="目次", ["kr"]="목차", @@ -3283,7 +3773,6 @@ data.labels={ ["nb"]="Innhold", ["nl"]="Inhoud", ["nn"]="Innhald", - ["pe"]="فهرست مطالب", ["pl"]="Spis treści", ["pt"]="Conteúdo", ["ro"]="Cuprins", @@ -3310,13 +3799,16 @@ data.labels={ ["da"]="Figurer", ["de"]="Abbildungen", ["en"]="Figures", + ["eo"]="Figuroj", ["es"]="Figuras", ["et"]="Arvandmed", + ["fa"]="فهرست اشکال", ["fi"]="Kuvi", ["fr"]="Figures", ["gr"]="Σχήματα", ["hr"]="Slike", ["hu"]="Ábrák", + ["hy"]="Նկարազարդումներ", ["it"]="Figure", ["ja"]="図", ["kr"]="그림 ", @@ -3326,7 +3818,6 @@ data.labels={ ["nb"]="Figurer", ["nl"]="Figuren", ["nn"]="Figurar", - ["pe"]="فهرست اشکال", ["pl"]="Ilustracje", ["pt"]="Figuras", ["ro"]="Figuri", @@ -3347,19 +3838,23 @@ data.labels={ ["af"]="Grafieke", ["ar"]="الرسوم", ["be"]="Графiка", + ["bg"]="Графики", ["ca"]="Gràfiques", ["cn"]="图", ["cs"]="Seznam grafů", ["da"]="Grafik", - ["de"]="Graphiken", + ["de"]="Grafiken", ["en"]="Graphics", + ["eo"]="Grafikoj", ["es"]="Gráficos", ["et"]="Graafika", + ["fa"]="فهرست طرحها", ["fi"]="Grafiikkaoi", ["fr"]="Graphiques", ["gr"]="Γραφικά", ["hr"]="Slike", ["hu"]="Grafikák", + ["hy"]="Գծապատկեր", ["it"]="Grafici", ["ja"]="グラフ", ["kr"]="그래픽 ", @@ -3369,7 +3864,6 @@ data.labels={ ["nb"]="Bilde", ["nl"]="Grafieken", ["nn"]="Bilete", - ["pe"]="فهرست طرحها", ["pl"]="Grafiki", ["pt"]="Gráficos", ["ro"]="Grafice", @@ -3397,13 +3891,16 @@ data.labels={ ["da"]="Indeks", ["de"]="Index", ["en"]="Index", + ["eo"]="Indekso", ["es"]="Índice", ["et"]="Indeks", + ["fa"]="نمایه", ["fi"]="Indeksiluku", ["fr"]="Index", ["gr"]="Ευρετήριο", ["hr"]="Indeks", ["hu"]="Index", + ["hy"]="Այբբենական ցուցիչ", ["it"]="Indice", ["ja"]="目次", ["kr"]="찾아보기", @@ -3413,14 +3910,12 @@ data.labels={ ["nb"]="Register", ["nl"]="Index", ["nn"]="Register", - ["pe"]="نمایه", ["pl"]="Indeks", ["pt"]="Índice", ["ro"]="Index", ["ru"]="Алфавитный указатель", ["sk"]="Zoznam", ["sl"]="Stvarno kazalo", - ["sr"]="Индекс", ["sr"]="Индекс појмова", ["sr-latn"]="Indeks pojmova", ["sv"]="Sakregister", @@ -3435,12 +3930,14 @@ data.labels={ ["af"]="Intermezzos", ["ar"]="فسح", ["be"]="Спіс уставак", + ["bg"]="Интермеца", ["ca"]="Intermedis", ["cn"]="퉣", ["cs"]="Intermezza", ["da"]="Intermezzoer", ["de"]="Intermezzi", ["en"]="Intermezzos", + ["eo"]="Intermezoj", ["es"]="Intermedios", ["et"]="Vahemängud", ["fi"]="Intermezzos", @@ -3448,6 +3945,7 @@ data.labels={ ["gr"]="Παύσεις", ["hr"]="Intermeci", ["hu"]="Intermezzok", + ["hy"]="Ինտերլյուդներ", ["it"]="Intermezzi", ["ja"]="間奏曲", ["kr"]="간주곡", @@ -3463,7 +3961,6 @@ data.labels={ ["ru"]="Список вставок", ["sk"]="Intermezzá", ["sl"]="Intermezzi", - ["sr"]="Интермеззи", ["sr"]="Списак дигресија", ["sr-latn"]="Spisak digresija", ["sv"]="Intermezzon", @@ -3485,13 +3982,16 @@ data.labels={ ["da"]="Logoer", ["de"]="Logos", ["en"]="Logos", + ["eo"]="Markemblemoj", ["es"]="Logotipos", ["et"]="Logos", + ["fa"]="فهرست لوگوها", ["fi"]="Vertauskuva", ["fr"]="Logos", ["gr"]="Λογότυπα", ["hr"]="Logotipi", ["hu"]="Fejlécek", + ["hy"]="Լոգոներ", ["it"]="Logotipi", ["ja"]="理性", ["kr"]="이성", @@ -3501,7 +4001,6 @@ data.labels={ ["nb"]="Logoer", ["nl"]="Logo's", ["nn"]="Logoar", - ["pe"]="فهرست لوگوها", ["pl"]="Znaki", ["pt"]="Logotipos", ["ro"]="Logo-uri", @@ -3525,13 +4024,16 @@ data.labels={ ["da"]="", ["de"]="Literatur", ["en"]="References", + ["eo"]="Referencoj", ["es"]="Bibliografía", ["et"]="Viited", - ["fi"]="", + ["fa"]="کتابنامه", + ["fi"]="Viittet", ["fr"]="Bibliographie", ["gr"]="", ["hr"]="Literatura", ["hu"]="Bibliográfia", + ["hy"]="Գրականութիւն", ["it"]="Bibliografia", ["kr"]="참고문헌", ["la"]="", @@ -3540,7 +4042,6 @@ data.labels={ ["nb"]="", ["nl"]="Literatuur", ["nn"]="", - ["pe"]="کتابنامه", ["pl"]="Bibliografia", ["pt"]="", ["ro"]="", @@ -3567,13 +4068,16 @@ data.labels={ ["da"]="Tabeller", ["de"]="Tabellen", ["en"]="Tables", + ["eo"]="Tabeloj", ["es"]="Tablas", ["et"]="Tabelid", + ["fa"]="فهرست جداول", ["fi"]="Taulukkoj", ["fr"]="Tableaux", ["gr"]="Πίνακες", ["hr"]="Tablice", ["hu"]="Táblázatok", + ["hy"]="Աղյուսակներ", ["it"]="Tabelle", ["ja"]="机", ["kr"]="표 ", @@ -3583,7 +4087,6 @@ data.labels={ ["nb"]="Tabeller", ["nl"]="Tabellen", ["nn"]="Tabellar", - ["pe"]="فهرست جداول", ["pl"]="Tabele", ["pt"]="Tabelas", ["ro"]="Tabele", @@ -3611,13 +4114,16 @@ data.labels={ ["da"]="Enheder", ["de"]="Einheiten", ["en"]="Units", + ["eo"]="Unuoj", ["es"]="Unidades", ["et"]="Ühikud", + ["fa"]="واحدها", ["fi"]="Yksiköt", ["fr"]="Unités", ["gr"]="Μονάδες", ["hr"]="Jedinice", ["hu"]="Mértékegységek", + ["hy"]="Չափման միավորներ", ["it"]="Unità", ["ja"]="ユニッツ", ["kr"]="측정단위", @@ -3627,7 +4133,6 @@ data.labels={ ["nb"]="Enheter", ["nl"]="Eenheden", ["nn"]="Einingar", - ["pe"]="واحدها", ["pl"]="Jednostki", ["pt"]="Unidades", ["ro"]="Unități", @@ -3658,3 +4163,4 @@ functions.atanh = functions.arctanh functions.tg = functions.tan functions.arctg = functions.arctan functions.arctgh = functions.arctanh + diff --git a/Master/texmf-dist/tex/context/base/mkiv/libs-ini.lua b/Master/texmf-dist/tex/context/base/mkiv/libs-ini.lua index 5b8390df2a1..cf696f4e9ea 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/libs-ini.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/libs-ini.lua @@ -17,7 +17,6 @@ local find = string.find -- here we implement the resolver - local nameonly = file.nameonly local joinfile = file.join local addsuffix = file.addsuffix @@ -54,10 +53,10 @@ local function findlib(required) -- todo: cache for i=1,#list do local name = list[i] local found = findfile(name,"lib") - if not found then + if not found or found == "" then found = findfile(addsuffix(name,suffix),"lib") end - if found then + if found and found ~= "" then if trace then report("library %a resolved via %a path to %a",name,"tds lib",found) end @@ -70,9 +69,9 @@ local function findlib(required) -- todo: cache for i=1,#list do local full = joinfile(list[i],base) local found = isfile(full) and full - if found then + if found and found ~= "" then if trace then - report("library %a resolved via %a path to %a",name,"system",found) + report("library %a resolved via %a path to %a",full,"system",found) end return found end @@ -137,7 +136,7 @@ function libraries.optionalloaded(name,libnames) for i=1,#libnames do local libname = libnames[i] local filename = foundlibraries[libname] - if filename then + if filename and filename ~= "" then libnames[i] = filename else report("unable to locate library %a",libname) diff --git a/Master/texmf-dist/tex/context/base/mkiv/lpdf-ano.lua b/Master/texmf-dist/tex/context/base/mkiv/lpdf-ano.lua index a120ff2f4ee..2bc485ff1f6 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/lpdf-ano.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/lpdf-ano.lua @@ -108,6 +108,10 @@ local pdf_named = pdfconstant("Named") local autoprefix = "#" local usedautoprefixes = { } +function codeinjections.setautoprefix(prefix) + autoprefix = prefix ~= "" and prefix or autoprefix +end + local function registerautoprefix(name) local internal = autoprefix .. name if usedautoprefixes[internal] == nil then @@ -1215,24 +1219,24 @@ local pdf_stop = pdfconstant("Stop") local pdf_resume = pdfconstant("Resume") local pdf_pause = pdfconstant("Pause") -local function movie_or_sound(operation,arguments) +local function movie_or_sound(operation,what,arguments) arguments = (type(arguments) == "table" and arguments) or settings_to_array(arguments) return pdfdictionary { S = pdf_movie, - T = format("movie %s",arguments[1] or "noname"), + T = format("%s %s",what,arguments[1] or "noname"), Operation = operation, } end -function executers.startmovie (arguments) return movie_or_sound(pdf_start ,arguments) end -function executers.stopmovie (arguments) return movie_or_sound(pdf_stop ,arguments) end -function executers.resumemovie(arguments) return movie_or_sound(pdf_resume,arguments) end -function executers.pausemovie (arguments) return movie_or_sound(pdf_pause ,arguments) end +function executers.startmovie (arguments) return movie_or_sound(pdf_start ,"movie",arguments) end +function executers.stopmovie (arguments) return movie_or_sound(pdf_stop ,"movie",arguments) end +function executers.resumemovie(arguments) return movie_or_sound(pdf_resume,"movie",arguments) end +function executers.pausemovie (arguments) return movie_or_sound(pdf_pause ,"movie",arguments) end -function executers.startsound (arguments) return movie_or_sound(pdf_start ,arguments) end -function executers.stopsound (arguments) return movie_or_sound(pdf_stop ,arguments) end -function executers.resumesound(arguments) return movie_or_sound(pdf_resume,arguments) end -function executers.pausesound (arguments) return movie_or_sound(pdf_pause ,arguments) end +function executers.startsound (arguments) return movie_or_sound(pdf_start ,"sound",arguments) end +function executers.stopsound (arguments) return movie_or_sound(pdf_stop ,"sound",arguments) end +function executers.resumesound(arguments) return movie_or_sound(pdf_resume,"sound",arguments) end +function executers.pausesound (arguments) return movie_or_sound(pdf_pause ,"sound",arguments) end function specials.action(var) local operation = var.operation diff --git a/Master/texmf-dist/tex/context/base/mkiv/lpdf-fld.lua b/Master/texmf-dist/tex/context/base/mkiv/lpdf-fld.lua index e14968eb8ad..50720c84ad2 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/lpdf-fld.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/lpdf-fld.lua @@ -97,7 +97,7 @@ local pdfcolor = lpdf.color local pdfcolorvalues = lpdf.colorvalues local pdflayerreference = lpdf.layerreference -local hpack_node = node.hpack +local hpack_node = nodes.hpack local submitoutputformat = 0 -- 0=unknown 1=HTML 2=FDF 3=XML => not yet used, needs to be checked diff --git a/Master/texmf-dist/tex/context/base/mkiv/lpdf-ini.lua b/Master/texmf-dist/tex/context/base/mkiv/lpdf-ini.lua index 1098ef8fa38..07e9c8df82b 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/lpdf-ini.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/lpdf-ini.lua @@ -1410,7 +1410,8 @@ do return timestamp end - lpdf.settime(tonumber(resolvers.variable("start_time")) or tonumber(resolvers.variable("SOURCE_DATE_EPOCH"))) -- bah + -- lpdf.settime(tonumber(resolvers.variable("starttime")) or tonumber(resolvers.variable("SOURCE_DATE_EPOCH"))) -- bah + lpdf.settime(tonumber(resolvers.variable("starttime"))) function lpdf.pdftimestamp(str) local t = type(str) diff --git a/Master/texmf-dist/tex/context/base/mkiv/lpdf-mov.lua b/Master/texmf-dist/tex/context/base/mkiv/lpdf-mov.lua index 42ba6fb008f..0f0eefd2f44 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/lpdf-mov.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/lpdf-mov.lua @@ -16,7 +16,9 @@ local pdfconstant = lpdf.constant local pdfdictionary = lpdf.dictionary local pdfarray = lpdf.array local pdfborder = lpdf.border -local write_node = node.write + +-- We should actually make sure that inclusion only happens once. But this mechanism +-- is dropped in pdf anyway so it will go away (read: mapped onto the newer mechanisms). function nodeinjections.insertmovie(specification) -- managed in figure inclusion: width, height, factor, repeat, controls, preview, label, foundname @@ -24,7 +26,7 @@ function nodeinjections.insertmovie(specification) local height = specification.height local factor = specification.factor or number.dimenfactors.bp local moviedict = pdfdictionary { - F = specification.foundname, + F = specification.foundname or specification.file, Aspect = pdfarray { factor * width, factor * height }, Poster = (specification.preview and true) or false, } @@ -37,32 +39,31 @@ function nodeinjections.insertmovie(specification) Subtype = pdfconstant("Movie"), Border = bs, C = bc, - T = format("movie %s",specification.label), + T = format("movie %s",specification.tag or specification.label), Movie = moviedict, A = controldict, } - write_node(nodeinjections.annotation(width,height,0,action())) -- test: context(...) + context(nodeinjections.annotation(width,height,0,action())) -- test: context(...) end function nodeinjections.insertsound(specification) - -- managed in interaction: repeat, label, foundname - local soundclip = interactions.soundclips.soundclip(specification.label) - if soundclip then - local controldict = pdfdictionary { - Mode = (specification["repeat"] and pdfconstant("Repeat")) or nil - } - local sounddict = pdfdictionary { - F = soundclip.filename - } - local bs, bc = pdfborder() - local action = pdfdictionary { - Subtype = pdfconstant("Movie"), - Border = bs, - C = bc, - T = format("sound %s",specification.label), - Movie = sounddict, - A = controldict, + local controldict = nil + if specification["repeat"] then + controldict = pdfdictionary { + Mode = pdfconstant("Repeat") } - write_node(nodeinjections.annotation(0,0,0,action())) -- test: context(...) end + local sounddict = pdfdictionary { + F = specification.foundname or specification.file + } + local bs, bc = pdfborder() + local action = pdfdictionary { + Subtype = pdfconstant("Movie"), + Border = bs, + C = bc, + T = format("sound %s",specification.tag or specification.label), + Movie = sounddict, + A = controldict, + } + context(nodeinjections.annotation(0,0,0,action())) -- test: context(...) end diff --git a/Master/texmf-dist/tex/context/base/mkiv/lpdf-nod.lua b/Master/texmf-dist/tex/context/base/mkiv/lpdf-nod.lua index fcb2d145732..6702ed506b9 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/lpdf-nod.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/lpdf-nod.lua @@ -24,10 +24,11 @@ local register = nodepool.register local whatsit_code = nodecodes.whatsit -local savewhatsit_code = whatsitcodes.save -local restorewhatsit_code = whatsitcodes.restore -local setmatrixwhatsit_code = whatsitcodes.setmatrix -local literalwhatsit_code = whatsitcodes.literal +local savewhatsit_code = whatsitcodes.save +local restorewhatsit_code = whatsitcodes.restore +local setmatrixwhatsit_code = whatsitcodes.setmatrix +local literalwhatsit_code = whatsitcodes.literal +local lateliteralwhatsit_code = whatsitcodes.lateliteral local literalvalues = nodes.literalvalues local originliteral_code = literalvalues.origin @@ -66,6 +67,22 @@ function nodepool.literal(mode,str) end end +-- We only define this for testing as we don't need it: + +local lateliteralnode = register(new_node(whatsit_code, lateliteralwhatsit_code)) + +function nodepool.lateliteral(mode,str) + local t = copy_node(lateliteralnode) + if str then + setfield(t,"mode",literals[mode] and mode or pageliteral_code) + setdata(t,str) + else + setfield(t,"mode",pageliteral_code) + setdata(t,mode) + end + return t +end + local savenode = register(new_node(whatsit_code, savewhatsit_code)) local restorenode = register(new_node(whatsit_code, restorewhatsit_code)) local setmatrixnode = register(new_node(whatsit_code, setmatrixwhatsit_code)) diff --git a/Master/texmf-dist/tex/context/base/mkiv/lpdf-pda.xml b/Master/texmf-dist/tex/context/base/mkiv/lpdf-pda.xml index 2f07fed2def..0de54aa2aae 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/lpdf-pda.xml +++ b/Master/texmf-dist/tex/context/base/mkiv/lpdf-pda.xml @@ -7,21 +7,9 @@ <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> <rdf:Description rdf:about="" xmlns:dc="http://purl.org/dc/elements/1.1/"> <dc:format>application/pdf</dc:format> - <dc:creator> - <rdf:Seq> - <rdf:li xml:lang="x-default"/> - </rdf:Seq> - </dc:creator> - <dc:description> - <rdf:Alt> - <rdf:li xml:lang="x-default"/> - </rdf:Alt> - </dc:description> - <dc:title> - <rdf:Alt> - <rdf:li xml:lang="x-default"/> - </rdf:Alt> - </dc:title> + <dc:creator/> + <dc:description/> + <dc:title/> </rdf:Description> <rdf:Description rdf:about="" xmlns:pdfx="http://ns.adobe.com/pdfx/1.3/"> <pdfx:ID/> diff --git a/Master/texmf-dist/tex/context/base/mkiv/lpdf-pdx.xml b/Master/texmf-dist/tex/context/base/mkiv/lpdf-pdx.xml index 35726a5c051..45349b4d8fc 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/lpdf-pdx.xml +++ b/Master/texmf-dist/tex/context/base/mkiv/lpdf-pdx.xml @@ -2,26 +2,19 @@ <!-- lpdf-pdx.xml --> +<!-- + There was a bug in the iso standard so now we just flush them flat because for some + reason there is no upward compatibulity. It's a sort of useless mess anyway. +--> + <x:xmpmeta xmlns:x="adobe:ns:meta/"> <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> <rdf:Description rdf:about="" xmlns:dc="http://purl.org/dc/elements/1.1/"> <dc:format>application/pdf</dc:format> - <dc:creator> - <rdf:Seq> - <rdf:li xml:lang="x-default"/> - </rdf:Seq> - </dc:creator> - <dc:description> - <rdf:Alt> - <rdf:li xml:lang="x-default"/> - </rdf:Alt> - </dc:description> - <dc:title> - <rdf:Alt> - <rdf:li xml:lang="x-default"/> - </rdf:Alt> - </dc:title> - </rdf:Description> + <dc:creator/> + <dc:description/> + <dc:title/> + </rdf:Description> <rdf:Description rdf:about="" xmlns:pdfx="http://ns.adobe.com/pdfx/1.3/"> <pdfx:ID/> <pdfx:ConTeXt.Jobname/> diff --git a/Master/texmf-dist/tex/context/base/mkiv/lpdf-pua.xml b/Master/texmf-dist/tex/context/base/mkiv/lpdf-pua.xml index f717762b6e6..091a3d40092 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/lpdf-pua.xml +++ b/Master/texmf-dist/tex/context/base/mkiv/lpdf-pua.xml @@ -2,25 +2,24 @@ <!-- lpdf-pua.xml --> +<!-- + There was a bug in the ISO standard so now we just flush them flat because for some + reason there is no upward compatibulity. It's a sort of useless mess anyway. +--> + +<!-- + <dc:creator> <rdf:Seq><rdf:li xml:lang="x-default"/></rdf:Seq></dc:creator> + <dc:description><rdf:Alt><rdf:li xml:lang="x-default"/></rdf:Alt></dc:description> + <dc:title> <rdf:Alt><rdf:li xml:lang="x-default"/></rdf:Alt></dc:title> +--> + <x:xmpmeta xmlns:x="adobe:ns:meta/"> <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> <rdf:Description rdf:about="" xmlns:dc="http://purl.org/dc/elements/1.1/"> <dc:format>application/pdf</dc:format> - <dc:creator> - <rdf:Seq> - <rdf:li xml:lang="x-default"/> - </rdf:Seq> - </dc:creator> - <dc:description> - <rdf:Alt> - <rdf:li xml:lang="x-default"/> - </rdf:Alt> - </dc:description> - <dc:title> - <rdf:Alt> - <rdf:li xml:lang="x-default"/> - </rdf:Alt> - </dc:title> + <dc:creator/> + <dc:description/> + <dc:title/> </rdf:Description> <rdf:Description rdf:about="" xmlns:pdfx="http://ns.adobe.com/pdfx/1.3/"> <pdfx:ID/> diff --git a/Master/texmf-dist/tex/context/base/mkiv/lpdf-wid.lua b/Master/texmf-dist/tex/context/base/mkiv/lpdf-wid.lua index 106eb98cca3..e856ddaf4f6 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/lpdf-wid.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/lpdf-wid.lua @@ -23,6 +23,9 @@ if not modules then modules = { } end modules ['lpdf-wid'] = { -- the other fragile bit. And, now that adobe quits flash in 2020 we're without any -- video anyway. Also, it won't play on all platforms and devices so let's wait for -- html5 media in pdf then. +-- +-- See mail by Michal Vlasák to the mailing list that discusses current support in +-- viewers and also mentions (and submitted) a few fixes wrt embedding media. local tonumber, next = tonumber, next local gmatch, gsub, find, lower = string.gmatch, string.gsub, string.find, string.lower @@ -43,6 +46,8 @@ local context = context local texgetcount = tex.getcount +local hpacknode = nodes.hpack + local nodeinjections = backends.pdf.nodeinjections local codeinjections = backends.pdf.codeinjections local registrations = backends.pdf.registrations @@ -55,6 +60,7 @@ local v_auto = variables.auto local v_embed = variables.embed local v_max = variables.max local v_yes = variables.yes +local v_compress = variables.compress local pdfconstant = lpdf.constant local pdfnull = lpdf.null @@ -64,20 +70,18 @@ local pdfreference = lpdf.reference local pdfunicode = lpdf.unicode local pdfstring = lpdf.string local pdfboolean = lpdf.boolean -local pdfflushobject = lpdf.flushobject -local pdfflushstreamobject = lpdf.flushstreamobject -local pdfflushstreamfileobject = lpdf.flushstreamfileobject -local pdfreserveobject = lpdf.reserveobject -local pdfpagereference = lpdf.pagereference -local pdfshareobjectreference = lpdf.shareobjectreference local pdfaction = lpdf.action local pdfborder = lpdf.border local pdftransparencyvalue = lpdf.transparencyvalue local pdfcolorvalues = lpdf.colorvalues -local hpack_node = node.hpack -local write_node = node.write -- test context(...) instead +local pdfflushobject = lpdf.flushobject +local pdfflushstreamobject = lpdf.flushstreamobject +local pdfflushstreamfileobject = lpdf.flushstreamfileobject +local pdfreserveobject = lpdf.reserveobject +local pdfpagereference = lpdf.pagereference +local pdfshareobjectreference = lpdf.shareobjectreference -- symbols @@ -256,7 +260,7 @@ local function flushembeddedfiles() for tag, reference in sortedhash(filestreams) do if not reference then report_attachment("unreferenced file, tag %a",tag) - elseif referenced[tag] == "hidden" then + elseif referenced[tag] == "hidden" or referenced[tag] == "forced" then e[#e+1] = pdfstring(tag) e[#e+1] = reference -- already a reference f[#f+1] = reference -- collect all file description references @@ -366,6 +370,9 @@ function codeinjections.embedfile(specification) } local r = pdfreference(pdfflushobject(d)) filestreams[hash] = r + if specification.forcereference == true then + referenced[hash] = "forced" + end return r end end @@ -453,7 +460,7 @@ function nodeinjections.attachfile(specification) local width = specification.width or 0 local height = specification.height or 0 local depth = specification.depth or 0 - local box = hpack_node(nodeinjections.annotation(width,height,depth,d())) + local box = hpacknode(nodeinjections.annotation(width,height,depth,d())) box.width = width box.height = height box.depth = depth @@ -554,12 +561,12 @@ function nodeinjections.comment(specification) -- brrr: seems to be done twice Parent = pdfreference(nd), } d.Popup = pdfreference(nc) - box = hpack_node( + box = hpacknode( nodeinjections.annotation(0,0,0,d(),nd), nodeinjections.annotation(width,height,depth,c(),nc) ) else - box = hpack_node(nodeinjections.annotation(width,height,depth,d())) + box = hpacknode(nodeinjections.annotation(width,height,depth,d())) end box.width = width -- redundant box.height = height -- redundant @@ -643,23 +650,21 @@ local function insertrenderingwindow(specification) Subtype = pdfconstant("Screen"), P = pdfreference(pdfpagereference(page)), A = a, -- needed in order to make the annotation clickable (i.e. don't bark) + T = pdfunicode(label), -- for JS Border = bs, C = bc, AA = actions, } local width = specification.width or 0 local height = specification.height or 0 - if height == 0 or width == 0 then - -- todo: sound needs no window - end - write_node(nodeinjections.annotation(width,height,0,d(),r)) -- save ref + context(nodeinjections.annotation(width,height,0,d(),r)) -- save ref return pdfreference(r) end -- some dictionaries can have a MH (must honor) or BE (best effort) capsule local function insertrendering(specification) - local label = specification.label + local label = specification.label local option = settings_to_hash(specification.option) if not mf[label] then local filename = specification.filename @@ -689,21 +694,23 @@ local function insertrendering(specification) -- B = start, -- } -- } - -- local parameters = pdfdictionary { - -- Type = pdfconstant(MediaPermissions), - -- TF = pdfstring("TEMPALWAYS") }, -- TEMPNEVER TEMPEXTRACT TEMPACCESS TEMPALWAYS - -- } + local parameters = pdfdictionary { + Type = pdfconstant("MediaPermissions"), + TF = pdfstring("TEMPALWAYS"), -- TEMPNEVER TEMPEXTRACT TEMPACCESS TEMPALWAYS / needed for acrobat/wmp + } local descriptor = pdfdictionary { Type = pdfconstant("Filespec"), F = filename, } if isurl then descriptor.FS = pdfconstant("URL") + descriptor = pdfreference(pdfflushobject(descriptor)) elseif option[v_embed] then - descriptor.EF = codeinjections.embedfile { - file = filename, - mimetype = mimetype, -- yes or no - compress = false, + descriptor = codeinjections.embedfile { + file = filename, + mimetype = mimetype, -- yes or no + compress = option[v_compress] or false, + forcereference = true, } end local clip = pdfdictionary { @@ -712,13 +719,13 @@ local function insertrendering(specification) N = label, CT = mimetype, Alt = pdfarray { "", "file not found" }, -- language id + message - D = pdfreference(pdfflushobject(descriptor)), - -- P = pdfreference(pdfflushobject(parameters)), + D = descriptor, + P = pdfreference(pdfflushobject(parameters)), } local rendition = pdfdictionary { Type = pdfconstant("Rendition"), S = pdfconstant("MR"), - N = label, + N = pdfunicode(label), C = pdfreference(pdfflushobject(clip)), } mf[label] = pdfreference(pdfflushobject(rendition)) @@ -756,6 +763,21 @@ function codeinjections.processrendering(label) end end +-- needed mapping for access from JS + +local function flushrenderings() + if next(mf) then + local r = pdfarray() + for label, reference in sortedhash(mf) do + r[#r+1] = pdfunicode(label) + r[#r+1] = reference -- already a reference + end + lpdf.addtonames("Renditions",pdfreference(pdfflushobject(pdfdictionary{ Names = r }))) + end +end + +lpdf.registerdocumentfinalizer(flushrenderings,"renderings") + function codeinjections.insertrenderingwindow(specification) local label = specification.label codeinjections.processrendering(label) diff --git a/Master/texmf-dist/tex/context/base/mkiv/lpdf-xmp.lua b/Master/texmf-dist/tex/context/base/mkiv/lpdf-xmp.lua index 508bb19976d..2ca3ab3fea3 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/lpdf-xmp.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/lpdf-xmp.lua @@ -59,10 +59,11 @@ local mapping = { ["Producer"] = { "metadata","rdf:Description/pdf:Producer" }, -- ["Trapped"] = { "pdf", "rdf:Description/pdf:Trapped" }, -- '/False' in /Info, but 'False' in XMP -- Dublin Core schema - ["Author"] = { "metadata","rdf:Description/dc:creator/rdf:Seq/rdf:li" }, ["Format"] = { "metadata","rdf:Description/dc:format" }, -- optional, but nice to have - ["Subject"] = { "metadata","rdf:Description/dc:description/rdf:Alt/rdf:li" }, - ["Title"] = { "metadata","rdf:Description/dc:title/rdf:Alt/rdf:li" }, + -- These were dc:.../rdf:Seq/rdf:li but there was a (invalidating) bug in the iso + ["Author"] = { "metadata","rdf:Description/dc:creator" }, + ["Subject"] = { "metadata","rdf:Description/dc:description" }, + ["Title"] = { "metadata","rdf:Description/dc:title" }, -- XMP Basic schema ["CreateDate"] = { "date", "rdf:Description/xmp:CreateDate" }, ["CreationDate"] = { "date", "rdf:Description/xmp:CreationDate" }, -- dummy diff --git a/Master/texmf-dist/tex/context/base/mkiv/luat-cnf.lua b/Master/texmf-dist/tex/context/base/mkiv/luat-cnf.lua index f1690832125..a67167bb9ff 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/luat-cnf.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/luat-cnf.lua @@ -24,26 +24,9 @@ texconfig.expand_depth = 10000 texconfig.half_error_line = 125 texconfig.max_print_line = 100000 texconfig.max_strings = 500000 -texconfig.hash_extra = 200000 +texconfig.hash_extra = 250000 texconfig.function_size = 32768 texconfig.properties_size = 10000 -texconfig.level_max = 500 -texconfig.level_chr = 46 -- period - -if CONTEXTLMTXMODE > 0 then - -texconfig.max_in_open = 2000 -texconfig.nest_size = 10000 -texconfig.param_size = 100000 -texconfig.save_size = 500000 -texconfig.stack_size = 100000 -texconfig.buffer_size = 10000000 -texconfig.token_size = 10000000 -texconfig.node_size = 50000000 -texconfig.max_pool = 10000000 - -else - texconfig.max_in_open = 1000 texconfig.nest_size = 1000 texconfig.param_size = 25000 @@ -52,29 +35,7 @@ texconfig.stack_size = 10000 texconfig.buf_size = 10000000 texconfig.fix_mem_init = 1000000 -end - -local variablenames = CONTEXTLMTXMODE > 0 and { - error_line = false, - half_error_line = false, - max_print_line = false, - max_in_open = false, - expand_depth = true, - hash_extra = true, - nest_size = true, - max_strings = true, - max_pool = true, - param_size = true, - save_size = true, - stack_size = true, - function_size = true, - properties_size = true, - token_size = true, - node_size = true, - buffer_size = true, - level_max = true, - level_chr = true, -} or { +local variablenames = { error_line = false, half_error_line = false, max_print_line = false, @@ -89,8 +50,6 @@ local variablenames = CONTEXTLMTXMODE > 0 and { function_size = true, properties_size = true, fix_mem_init = true, - level_max = true, - level_chr = true, } local stub = [[ @@ -221,7 +180,7 @@ function texconfig.init() -- local b = callbytecode(i) local e, b = pcall(callbytecode,i) if not e then - print(string.format("\nfatal error : unable to load bytecode register %%i, maybe wipe the cache first\n",i)) + print(string.format("fatal error : unable to load bytecode register %%i, maybe wipe the cache first\n",i)) os.exit() end if b then @@ -250,7 +209,7 @@ function texconfig.init() end -CONTEXTLMTXMODE = %s +CONTEXTLMTXMODE = 0 -- we provide a qualified path @@ -297,9 +256,9 @@ local function makestub() end end t[#t+1] = "" - t[#t+1] = format(stub,firsttable,tostring(CONTEXTLMTXMODE or 0)) + t[#t+1] = format(stub,firsttable) io.savedata(name,concat(t,"\n")) logs.newline() end -lua.registerfinalizer(makestub,"create stub file") +lua.registerinitexfinalizer(makestub,"create stub file") diff --git a/Master/texmf-dist/tex/context/base/mkiv/luat-cod.lua b/Master/texmf-dist/tex/context/base/mkiv/luat-cod.lua index b3abecbbab4..6175302a3de 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/luat-cod.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/luat-cod.lua @@ -33,8 +33,6 @@ texconfig.stack_size = 10000 texconfig.function_size = 32768 texconfig.properties_size = 10000 texconfig.fix_mem_init = 1000000 -texconfig.level_max = 500 -texconfig.level_chr = 46 -- period -- registering bytecode chunks @@ -92,28 +90,6 @@ function lua.registercode(filename,options) end end -local finalizers = { } - -function lua.registerfinalizer(f,comment) - comment = comment or "unknown" - if type(f) == "function" then - finalizers[#finalizers+1] = { action = f, comment = comment } - else - print(format("\nfatal error: invalid finalizer, action: %s\n",comment)) - os.exit() - end -end - -function lua.finalize(logger) - for i=1,#finalizers do - local finalizer = finalizers[i] - finalizer.action() - if logger then - logger("finalize action: %s",finalizer.comment) - end - end -end - -- A first start with environments. This will be overloaded later. environment = environment or { } @@ -170,6 +146,38 @@ environment.jitsupported = JITSUPPORTED environment.initex = INITEXMODE environment.initexmode = INITEXMODE +if INITEXMODE then + + local finalizers = { } + + function lua.registerinitexfinalizer(f,comment) + comment = comment or "unknown" + if type(f) == "function" then + finalizers[#finalizers+1] = { action = f, comment = comment } + else + print(format("\nfatal error: invalid finalizer, action: %s\n",comment)) + os.exit() + end + end + + function lua.finalizeinitex(logger) + for i=1,#finalizers do + local finalizer = finalizers[i] + finalizer.action() + if logger then + logger("finalize action: %s",finalizer.comment) + end + end + end + +else + + function lua.registerinitexfinalizer() end + function lua.finalizeinitex () end + +end + + if not environment.luafilechunk then function environment.luafilechunk(filename) diff --git a/Master/texmf-dist/tex/context/base/mkiv/luat-lib.mkiv b/Master/texmf-dist/tex/context/base/mkiv/luat-lib.mkiv index 6dbcdaf54a3..3df374de9ad 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/luat-lib.mkiv +++ b/Master/texmf-dist/tex/context/base/mkiv/luat-lib.mkiv @@ -45,6 +45,8 @@ \registerctxluafile{util-soc-imp-http} {} \registerctxluafile{util-soc-imp-tp} {} +\registerctxluafile{util-zip}{} + \registerctxluafile{data-ini}{} \registerctxluafile{data-exp}{} \registerctxluafile{data-env}{} @@ -53,13 +55,14 @@ \registerctxluafile{data-res}{} \registerctxluafile{data-inp}{} \registerctxluafile{data-out}{} -\registerctxluafile{data-fil}{} % opener gets overloaded in data-tex +\registerctxluafile{data-fil}{autosuffix} % opener gets overloaded in data-tex \registerctxluafile{data-pre}{} % after data-res \registerctxluafile{data-bin}{} % before data-tex \registerctxluafile{data-tex}{} % after data-pre \registerctxluafile{data-vir}{} \registerctxluafile{data-zip}{} +%registerctxluafile{data-tar}{} %registerctxluafile{data-crl}{} \registerctxluafile{data-sch}{} \registerctxluafile{data-tre}{} @@ -85,6 +88,8 @@ \registerctxluafile{luat-mac}{} %registerctxluafile{luat-prp}{} % for the moment of not much use +\registerctxluafile{util-lib}{} + \registerctxluafile{lxml-tab}{} \registerctxluafile{lxml-lpt}{} \registerctxluafile{lxml-xml}{} diff --git a/Master/texmf-dist/tex/context/base/mkiv/luat-mac.lua b/Master/texmf-dist/tex/context/base/mkiv/luat-mac.lua index 3c50a41f89c..fca59c993ba 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/luat-mac.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/luat-mac.lua @@ -85,6 +85,8 @@ local set = CONTEXTLMTXMODE > 0 and return h .. "-" elseif s == "spacer" then return h .. "*" + elseif s == "keepspacer" then + return h .. "," elseif s == "pickup" then return h .. ":" else @@ -185,16 +187,20 @@ local name = (R("AZ","az") + utf8character)^1 local csname = (R("AZ","az") + S("@?!_:-*") + utf8character)^1 local longname = (longleft/"") * (nolong^1) * (longright/"") local variable = P("#") * Cs(name + longname) +local bcsname = P("csname") +local ecsname = escape * P("endcsname") local escapedname = escape * csname -local definer = escape * (P("def") + S("egx") * P("def")) -- tex +local definer = escape * (P("u")^-1 * S("egx")^-1 * P("def")) -- tex local setter = escape * P("set") * (P("u")^-1 * S("egx")^-1) * P("value") -- context specific --- + escape * P("install") * (1-P("handler"))^1 * P("handler") -- context specific +local defcsname = escape * S("egx")^-1 * P("defcsname") + * (1 - ecsname)^1 + * ecsname local startcode = P("\\starttexdefinition") -- context specific local stopcode = P("\\stoptexdefinition") -- context specific local anything = patterns.anything local always = patterns.alwaysmatched -local definer = escape * (P("u")^-1 * S("egx")^-1 * P("def")) -- tex -- The comment nilling can become an option but it nicely compensates the Lua -- parsing here with less parsing at the TeX end. We keep lines so the errors @@ -206,7 +212,6 @@ local definer = escape * (P("u")^-1 * S("egx")^-1 * P("def")) local commenttoken = P("%") local crorlf = S("\n\r") ------ commentline = commenttoken * ((Carg(1) * C((1-crorlf)^0))/function(strip,s) return strip and "" or s end) local commentline = commenttoken * ((1-crorlf)^0) local leadingcomment = (commentline * crorlf^1)^1 local furthercomment = (crorlf^1 * commentline)^1 @@ -229,7 +234,6 @@ local grammar = { "converter", * startcode * spaces * (csname * spaces)^1 -- new: multiple, new:csname instead of name - -- * (declaration + furthercomment + (1 - newline - space))^0 * ((declaration * (space^0/""))^1 + furthercomment + (1 - newline - space))^0 -- accepts #a #b #c * V("texbody") * stopcode @@ -242,10 +246,12 @@ local grammar = { "converter", + (1 - stopcode) )^0, definition = pushlocal - * definer - * spaces^0 - * escapedname --- * (declaration + furthercomment + commentline + (1-leftbrace))^0 + * (definer * spaces^0 * escapedname) + * (declaration + furthercomment + commentline + csname_endcsname + (1-leftbrace))^0 + * V("braced") + * poplocal, + csnamedef = pushlocal + * defcsname * (declaration + furthercomment + commentline + csname_endcsname + (1-leftbrace))^0 * V("braced") * poplocal, @@ -265,11 +271,11 @@ local grammar = { "converter", + leadingcomment -- new per 2012-05-15 (message on mailing list) + nobrace )^0 - -- * rightbrace^-1, -- the -1 catches errors * (rightbrace + Cmt(always,matcherror)), pattern = leadingcomment + V("definition") + + V("csnamedef") + V("setcode") + V("texcode") + furthercomment diff --git a/Master/texmf-dist/tex/context/base/mkiv/luat-run.lua b/Master/texmf-dist/tex/context/base/mkiv/luat-run.lua index 874287ee1a0..c778ad09457 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/luat-run.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/luat-run.lua @@ -106,7 +106,7 @@ local function pre_dump_actions() for i=1,#dumpactions do dumpactions[i]() end - lua.finalize(trace_lua_dump and report_lua or nil) + lua.finalizeinitex(trace_lua_dump and report_lua or nil) end local function wrapup_synctex() diff --git a/Master/texmf-dist/tex/context/base/mkiv/luat-sto.lua b/Master/texmf-dist/tex/context/base/mkiv/luat-sto.lua index feb5464009b..be5134b84b1 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/luat-sto.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/luat-sto.lua @@ -90,7 +90,7 @@ if environment.initex then storage.max = max end - lua.registerfinalizer(dump,"dump storage") + lua.registerinitexfinalizer(dump,"dump storage") end diff --git a/Master/texmf-dist/tex/context/base/mkiv/lxml-aux.lua b/Master/texmf-dist/tex/context/base/mkiv/lxml-aux.lua index 126df4d82de..fc17371e58f 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/lxml-aux.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/lxml-aux.lua @@ -316,6 +316,37 @@ function xml.replace(root,pattern,whatever) end end +function xml.expand(root,pattern,whatever) + local collected = root and xmlapplylpath(root,pattern) + if collected then + for c=1,#collected do + local e = collected[c] + local p = e.__p__ + if p then + if trace_manipulations then + report('expanding',pattern,c,e) + end + local d = p.dt + local n = e.ni + local t = whatever(e,p) + if t then + if type(t) == "table" then + t = xmlcopy(t) + d[n] = t[1] + for i=2,#t do + n = n + 1 + insert(d,n,t[i]) + end + else + d[n] = t + end + redo_ni(d) -- probably not needed + end + end + end + end +end + local function wrap(e,wrapper) local t = { rn = e.rn, diff --git a/Master/texmf-dist/tex/context/base/mkiv/lxml-css.lua b/Master/texmf-dist/tex/context/base/mkiv/lxml-css.lua index 76cc4891e1d..48177c47cb2 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/lxml-css.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/lxml-css.lua @@ -233,7 +233,7 @@ do end end - function css.size(str,factors) + function css.size(str,factors, pct) local size, unit if type(str) == "table" then size, unit = str[1], str[2] @@ -241,7 +241,9 @@ do size, unit = lpegmatch(p_size,lower(str)) end if size and unit then - if factors then + if unit == "%" and pct then + return size * pct + elseif factors then return (factors[unit] or 1) * size else return size, unit diff --git a/Master/texmf-dist/tex/context/base/mkiv/lxml-ctx.mkiv b/Master/texmf-dist/tex/context/base/mkiv/lxml-ctx.mkiv index 7d44d61bea1..ec782c39591 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/lxml-ctx.mkiv +++ b/Master/texmf-dist/tex/context/base/mkiv/lxml-ctx.mkiv @@ -20,9 +20,9 @@ \unprotect -\settrue \xmllshowbuffer -\setfalse\xmllshowtitle -\settrue \xmllshowwarning +\settrue \xmllshowbuffertoo +\setfalse\xmllshowtitletoo +\settrue \xmllshowwarningtoo \definehead [lshowtitle] @@ -35,10 +35,10 @@ \unexpanded\def\xmllshow#1% {\ctxlua{xml.ctx.tshow { pattern = \!!bs\detokenize{#1}\!!es, - \ifconditional\xmllshowtitle + \ifconditional\xmllshowtitletoo title = "lshowtitle", \fi - \ifconditional\xmllshowwarning + \ifconditional\xmllshowwarningtoo warning = true, \fi } }} @@ -46,11 +46,11 @@ \unexpanded\def\xmllshowbuffer#1#2#3% {\ctxlua{xml.ctx.tshow { pattern = \!!bs\detokenize{#2}\!!es, - \ifconditional\xmllshowbuffer + \ifconditional\xmllshowbuffertoo xmlroot = "#1", attribute = "#3", \fi - \ifconditional\xmllshowwarning + \ifconditional\xmllshowwarningtoo warning = true, \fi } }} diff --git a/Master/texmf-dist/tex/context/base/mkiv/lxml-ini.lua b/Master/texmf-dist/tex/context/base/mkiv/lxml-ini.lua index 43643f71a18..980a83f1a2b 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/lxml-ini.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/lxml-ini.lua @@ -154,6 +154,79 @@ implement { name = "xmlstoptiming", actions = function() statistics.stopt implement { name = "xmlloadentities", actions = characters.registerentities, onceonly = true } +if CONTEXTLMTXMODE > 0 then + + local boolean_code = tokens.values.boolean + + local getid = lxml.getid + local found = xml.found + local empty = xml.empty + local checkedempty = xml.checkedempty + local ifatt = lxml.ifatt + local ifattempty = lxml.ifattempty + + implement { + name = "ifxml", + public = true, + usage = "condition", + arguments = "2 arguments", + actions = function(id,pattern) + return boolean_code, found(getid(id),pattern) and true + end + } + + implement { + name = "ifxmltext", + public = true, + usage = "condition", + arguments = "2 arguments", + actions = function(id,pattern) + return boolean_code, not empty(getid(id),pattern) and true + end + } + + implement { + name = "ifxmlatt", + public = true, + usage = "condition", + arguments = "3 arguments", + actions = function(id,name,value) + return boolean_code, ifatt(getid(id),name,value) + end + } + + implement { + name = "ifxmlattempty", + public = true, + usage = "condition", + arguments = "2 arguments", + actions = function(id,name) + return boolean_code, ifattempty(getid(id),name) + end + } + + implement { + name = "ifxmlempty", + public = true, + usage = "condition", + arguments = "2 arguments", + actions = function(id,pattern) + return boolean_code, not checkedempty(getid(id),pattern) and true + end + } + + implement { + name = "ifxmlselfempty", + public = true, + usage = "condition", + arguments = "argument", + actions = function(id) + return boolean_code, not checkedempty(getid(id)) and true + end + } + +end + -- kind of special (3rd argument is a function) commands.xmlsetfunction = lxml.setaction diff --git a/Master/texmf-dist/tex/context/base/mkiv/lxml-lpt.lua b/Master/texmf-dist/tex/context/base/mkiv/lxml-lpt.lua index 9e4b475fb09..78a9fca2e0a 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/lxml-lpt.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/lxml-lpt.lua @@ -635,7 +635,9 @@ local builtin = { match = "(ll.mi or 1)", namespace = "ll.ns", ns = "ll.ns", - + -- new + -- attribute = "ll.at", + -- at = "ll.at", } local lp_builtin = lpeg.utfchartabletopattern(builtin)/builtin * ((spaces * P("(") * spaces * P(")"))/"") diff --git a/Master/texmf-dist/tex/context/base/mkiv/lxml-tab.lua b/Master/texmf-dist/tex/context/base/mkiv/lxml-tab.lua index 3af4974d300..e18362bd8cd 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/lxml-tab.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/lxml-tab.lua @@ -369,8 +369,7 @@ end local function add_text(text) if text == "" then return - end - if cleanup then + elseif cleanup then if nt > 0 then local s = dt[nt] if type(s) == "string" then @@ -1022,6 +1021,7 @@ local function install(spacenewline,spacing,anything) local text_unparsed = Cs((anything-open)^1) local text_parsed = (Cs((anything-open-ampersand)^1)/add_text + Cs(entity_text)/add_text)^1 +-- local text_parsed = ((Cs(((anything-open-ampersand)^1) + entity_text))/add_text)^1 local somespace = (spacenewline)^1 local optionalspace = (spacenewline)^0 @@ -1043,10 +1043,16 @@ local function install(spacenewline,spacing,anything) local unparsedtext = text_unparsed / add_text local balanced = P { "[" * ((anything - S"[]") + V(1))^0 * "]" } -- taken from lpeg manual, () example + -- todo: combine empty and begin so that we scan attributes only once .. maybe also go for match time captures + local emptyelement = (spacing * open * name * attributes * optionalspace * slash * close) / add_empty local beginelement = (spacing * open * name * attributes * optionalspace * close) / add_begin local endelement = (spacing * open * slash * name * optionalspace * close) / add_end +-- local commonelement = spacing * open * name * attributes * optionalspace * +-- local cemptyelement = (slash * close) / add_empty +-- local cbeginelement = ( * close) / add_begin + -- todo: combine the opens in: local begincomment = open * P("!--") @@ -1103,11 +1109,7 @@ local function install(spacenewline,spacing,anything) local publicdoctype = doctypename * somespace * P("PUBLIC") * somespace * value * somespace * value * somespace * doctypeset local systemdoctype = doctypename * somespace * P("SYSTEM") * somespace * value * somespace * doctypeset local simpledoctype = (anything-close)^1 -- * balanced^0 - local somedoctype = C((somespace * ( - -publicentityfile + - - publicdoctype + systemdoctype + definitiondoctype + simpledoctype) * optionalspace)^0) + local somedoctype = C((somespace * (publicentityfile + publicdoctype + systemdoctype + definitiondoctype + simpledoctype) * optionalspace)^0) local instruction = (spacing * begininstruction * someinstruction * endinstruction) / function(...) add_special("@pi@",...) end local comment = (spacing * begincomment * somecomment * endcomment ) / function(...) add_special("@cm@",...) end @@ -1150,6 +1152,16 @@ publicentityfile + children = parsedtext + V("parent") + emptyelement + comment + cdata + instruction + parsedcrap, } +-- local grammar_parsed_text_two = P { "followup", +-- followup = beginelement * V("children")^0 * endelement * trailer, +-- children = parsedtext + beginelement * V("children")^0 * endelement + emptyelement + comment + cdata + instruction + parsedcrap, +-- } + +-- local grammar_parsed_text_two = P { "followup", +-- followup = commonelement * cbeginelement * V("children")^0 * endelement * trailer, +-- children = parsedtext + commonelement * (cbeginelement * V("children")^0 * endelement + cemptyelement) + comment + cdata + instruction + parsedcrap, +-- } + local grammar_unparsed_text = P { "preamble", preamble = utfbom^0 * instruction^0 * (doctype + comment + instruction)^0 * V("parent") * trailer, parent = beginelement * V("children")^0 * endelement, @@ -1412,7 +1424,7 @@ can speed up things a bit. The second argument is not to be used!</p> -- end -- end -- --- We need to prevent __p__ recursio, so: +-- We need to prevent __p__ recursion, so: local function copy(old,p) if old then @@ -1967,7 +1979,7 @@ function xml.kind(e) local tg = d.tg if tg == "@cd@" then return "cdata" - elseif tg == "@cm" then + elseif tg == "@cm@" then return "comment" elseif tg == "@pi@" then return "instruction" diff --git a/Master/texmf-dist/tex/context/base/mkiv/lxml-tex.lua b/Master/texmf-dist/tex/context/base/mkiv/lxml-tex.lua index 7a79ee15f4d..520797883cd 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/lxml-tex.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/lxml-tex.lua @@ -772,6 +772,8 @@ local tex_element if tokenizedxmlw then +-- local expandmacro = token.expandmacro + tex_element = function(e,handlers) if setfilename then syncfilename(e,"element") @@ -793,6 +795,10 @@ if tokenizedxmlw then addindex(rootname,false,true) ix = e.ix end +-- lmtx only, same performance, a bit more immediate: +-- +-- expandmacro(tokenizedxmlw,ctxcatcodes,true,command,true,rootname.."::"..ix) +-- contextsprint(ctxcatcodes,tokenizedxmlw,"{",command,"}{",rootname,"::",ix,"}") else report_lxml("fatal error: no index for %a",command) @@ -2064,6 +2070,28 @@ do end end + function lxml.ifatt(id,a,value) + local e = getid(id) + if e then + local at = e.at + att = at and at[a] or "" + else + att = "" + end + return att == value + end + + function lxml.ifattempty(id,a) + local e = getid(id) + if e then + local at = e.at + att = at and at[a] or "" + else + att = "" + end + return att == "" + end + function lxml.refatt(id,a) local e = getid(id) if e then @@ -2223,7 +2251,7 @@ function lxml.snippet(id,i) if e then local dt = e.dt if dt then - local dti = dt[i] + local dti = dt[tonumber(i)] -- string in lxml if dti then xmlsprint(dti,e) end @@ -2322,6 +2350,8 @@ do end end + xml.checkedempty = checkedempty + function lxml.doifempty (id,pattern) doif (checkedempty(id,pattern)) end function lxml.doifnotempty (id,pattern) doifnot (checkedempty(id,pattern)) end function lxml.doifelseempty(id,pattern) doifelse(checkedempty(id,pattern)) end @@ -2727,6 +2757,8 @@ do end +-- hm, maybe to ini to, these implements + implement { name = "xmlsetinjectors", actions = xml.setinjectors, diff --git a/Master/texmf-dist/tex/context/base/mkiv/m-fonts-plugins.mkiv b/Master/texmf-dist/tex/context/base/mkiv/m-fonts-plugins.mkiv index ec1c05e7af8..00174d13e8f 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/m-fonts-plugins.mkiv +++ b/Master/texmf-dist/tex/context/base/mkiv/m-fonts-plugins.mkiv @@ -15,15 +15,72 @@ %D Eigner at an NTG meeting, then left it for a while, and sort of finalized it the %D last quarter of 2016. As I don't use this module, apart from maybe testing %D something, it is not guaranteed to work (but fixing should be a no real problem -%D as I expect apis to be stable). Plugins liek this can interfere with other +%D as I expect apis to be stable). Plugins like this can interfere with other %D functionality in \CONTEXT\ so don't expect too much support. The two modules %D mentioned below should work in the generic loader too. It's anyhow an %D illustration of how \type {ffi} be used in a practical application. - -% \enabletrackers[resolvers.ffilib] - -\registerctxluafile{font-txt}{} % generic text handler -\registerctxluafile{font-phb}{} % harfbuzz plugin: binary or library (ffi/optional) +%D +%D I'm not sure if Idris will ever need this but the code has been used for some +%D articles so that's why it's eventually shipped. +%D +%D The library is supposed to be present in +%D +%D \starttyping +%D .../tex/texmf-win64/bin/lib/luatatex/harfbuzz/libharfbuzz-0.dll +%D .../tex/texmf-win64/bin/lib/luametatex/harfbuzz/libharfbuzz-0.dll +%D +%D .../tex/texmf-*/bin/lib/luatatex/harfbuzz/libharfbuzz.so +%D .../tex/texmf-*/bin/lib/luametatex/harfbuzz/libharfbuzz.so +%D \stoptyping +%D +%D It might be found on the system if paths are set but with libraries that render +%D (font) stuff it's best to rely on what you explictly installed. When you install +%D files there make sure to run \type {mtxrun --generate}. Keep in mind that we don't +%D officially support such dependencies (bug-wise). +%D +%D In mkiv we support binary and library, and in lmtx binary and internal where we +%D default to library or internal as binary is not that fast (more meant as a +%D playground I guess). You can track loading with: +%D +%D \starttyping +%D \enabletrackers[resolvers.ffilib] +%D \stoptyping +%D +%D This file has always been in the distribution but per end april 2021 the font-txt, +%D font-phb and font-phb-imp-* files are in the distrinbution too. It's a side effect +%D of some cleanup of the (luametatex) source tree (where the optional module was not +%D yet in sync with the other optional ones). This module is mostly for myself and +%D Idris if only because it is not tested for interferences with all kind of other +%D font code (and it's unlikely to happen), so don't depend on this! + +% \starttext +% +% \definefontfeature [native] [default] +% [mode=plug, +% features=harfbuzz, +% shaper=native] +% +% \definefontfeature [uniscribe] [default] +% [mode=plug, +% features=harfbuzz, +% shaper=uniscribe] +% +% \definefontfeature [binary] [default] +% [mode=plug, +% method=binary, +% features=harfbuzz, +% shaper=uniscribe] +% +% % \nohyphens +% \definedfont[Serif*default] fiets \par % \input tufte \par +% \definedfont[Serif*native] fiets \par % \input tufte \par +% \definedfont[Serif*uniscribe] fiets \par % \input tufte \par +% \definedfont[Serif*binary] fiets \par % \input tufte \par +% +% \stoptext + + +\registerctxluafile{font-phb}{autosuffix} \startluacode diff --git a/Master/texmf-dist/tex/context/base/mkiv/math-act.lua b/Master/texmf-dist/tex/context/base/mkiv/math-act.lua index e1ef751d7ed..d56efbbfd44 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/math-act.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/math-act.lua @@ -6,10 +6,13 @@ if not modules then modules = { } end modules ['math-act'] = { license = "see context related readme files" } --- Here we tweak some font properties (if needed). +-- Here we tweak some font properties (if needed). Per mid octover 2022 we also provide +-- an lmtx emulation mode which means that we removed some other code. Some of that was +-- experimental, some transitional, some is now obsolete). Using emulation mode also +-- means that we are unlikely to test some aspects of the math engines extensively. local type, next = type, next -local fastcopy, insert, remove = table.fastcopy, table.insert, table.remove +local fastcopy, insert, remove, copytable = table.fastcopy, table.insert, table.remove, table.copy local formatters = string.formatters local trace_defining = false trackers.register("math.defining", function(v) trace_defining = v end) @@ -59,6 +62,9 @@ function mathematics.initializeparameters(target,original) if not mathparameters.SpaceBeforeScript then mathparameters.SpaceBeforeScript = mathparameters.SpaceAfterScript end + if not mathparameters.SubscriptShiftDownWithSuperscript then + mathparameters.SubscriptShiftDownWithSuperscript = mathparameters.SubscriptShiftDown * 1.5 + end target.mathparameters = mathparameters end end @@ -75,41 +81,43 @@ local how = { NoLimitSubFactor = "unscaled", } -function mathematics.scaleparameters(target,original) - if not target.properties.math_is_scaled then - local mathparameters = target.mathparameters - if mathparameters and next(mathparameters) then - local parameters = target.parameters - local factor = parameters.factor - local hfactor = parameters.hfactor - local vfactor = parameters.vfactor - for name, value in next, mathparameters do - local h = how[name] - if h == "unscaled" then - -- kept - elseif h == "horizontal" then - value = value * hfactor - elseif h == "vertical"then - value = value * vfactor - else - value = value * factor - end - mathparameters[name] = value +local function scaleparameters(mathparameters,parameters) + if mathparameters and next(mathparameters) and parameters then + local factor = parameters.factor + local hfactor = parameters.hfactor + local vfactor = parameters.vfactor + for name, value in next, mathparameters do + local h = how[name] + if h == "unscaled" then + -- kept + elseif h == "horizontal" then + value = value * hfactor + elseif h == "vertical"then + value = value * vfactor + else + value = value * factor end + mathparameters[name] = value end - target.properties.math_is_scaled = true end end --- AccentBaseHeight vs FlattenedAccentBaseHeight - -function mathematics.checkaccentbaseheight(target,original) - local mathparameters = target.mathparameters - if mathparameters and mathparameters.AccentBaseHeight == 0 then - mathparameters.AccentBaseHeight = target.parameters.x_height -- needs checking +function mathematics.scaleparameters(target,original) + if not target.properties.math_is_scaled then + scaleparameters(target.mathparameters,target.parameters) + target.properties.math_is_scaled = true end end +-- -- AccentBaseHeight vs FlattenedAccentBaseHeight +-- +-- function mathematics.checkaccentbaseheight(target,original) +-- local mathparameters = target.mathparameters +-- if mathparameters and mathparameters.AccentBaseHeight == 0 then +-- mathparameters.AccentBaseHeight = target.parameters.x_height -- needs checking +-- end +-- end + function mathematics.checkprivateparameters(target,original) local mathparameters = target.mathparameters if mathparameters then @@ -150,28 +158,67 @@ function mathematics.overloadparameters(target,original) if trace_defining then report_math("overloading math parameters in %a @ %p",target.properties.fullname,target.parameters.size) end + -- for name, value in next, parameters do + -- local tvalue = type(value) + -- if tvalue == "string" then + -- report_math("comment for math parameter %a: %s",name,value) + -- else + -- local oldvalue = mathparameters[name] + -- local newvalue = oldvalue + -- if oldvalue then + -- if tvalue == "number" then + -- newvalue = value + -- elseif tvalue == "function" then + -- newvalue = value(oldvalue,target,original) + -- elseif not tvalue then + -- newvalue = nil + -- end + -- if trace_defining and oldvalue ~= newvalue then + -- report_math("overloading math parameter %a: %S => %S",name,oldvalue,newvalue) + -- end + -- else + -- -- report_math("invalid math parameter %a",name) + -- end + -- mathparameters[name] = newvalue + -- end + -- end + for name, value in next, parameters do + local tvalue = type(value) + local oldvalue = mathparameters[name] + local newvalue = oldvalue + if tvalue == "number" then + newvalue = value + elseif tvalue == "string" then + -- delay till all set + elseif tvalue == "function" then + newvalue = value(oldvalue,target,original) + elseif not tvalue then + newvalue = nil + end + if trace_defining and oldvalue ~= newvalue then + report_math("overloading math parameter %a: %S => %S",name,oldvalue or 0,newvalue) + end + mathparameters[name] = newvalue + end for name, value in next, parameters do local tvalue = type(value) if tvalue == "string" then - report_math("comment for math parameter %a: %s",name,value) - else - local oldvalue = mathparameters[name] - local newvalue = oldvalue - if oldvalue then - if tvalue == "number" then - newvalue = value - elseif tvalue == "function" then - newvalue = value(oldvalue,target,original) - elseif not tvalue then - newvalue = nil + local newvalue = mathparameters[value] + if not newvalue then + local code = loadstring("return " .. value,"","t",mathparameters) + if type(code) == "function" then + local okay, v = pcall(code) + if okay then + newvalue = v + end end - if trace_defining and oldvalue ~= newvalue then - report_math("overloading math parameter %a: %S => %S",name,oldvalue,newvalue) - end - else - report_math("invalid math parameter %a",name) end - mathparameters[name] = newvalue + if newvalue then + -- split in number and string + mathparameters[name] = newvalue + elseif trace_defining then + report_math("ignoring math parameter %a: %S",name,value) + end end end end @@ -180,29 +227,65 @@ function mathematics.overloadparameters(target,original) end end +local mathtweaks = { subsets = table.setmetatableindex("table") } +mathematics.tweaks = mathtweaks + +local apply_tweaks = true + +directives.register("math.applytweaks", function(v) + apply_tweaks = v; +end) + local function applytweaks(when,target,original) - local goodies = original.goodies - if goodies then - for i=1,#goodies do - local goodie = goodies[i] - local mathematics = goodie.mathematics - local tweaks = mathematics and mathematics.tweaks - if type(tweaks) == "table" then - tweaks = tweaks[when] - if type(tweaks) == "table" then - if trace_defining then - report_math("tweaking math of %a @ %p (%s)",target.properties.fullname,target.parameters.size,when) - end - for i=1,#tweaks do - local tweak= tweaks[i] - local tvalue = type(tweak) - if tvalue == "function" then - tweak(target,original) + if apply_tweaks then + local goodies = original.goodies + if goodies then + local tweaked = target.tweaked or { } + if tweaked[when] then + if trace_defining then + report_math("tweaking math of %a @ %p (%s: %s)",target.properties.fullname,target.parameters.size,when,"done") + end + else + for i=1,#goodies do + local goodie = goodies[i] + local mathematics = goodie.mathematics + local tweaks = mathematics and mathematics.tweaks + if type(tweaks) == "table" then + tweaks = tweaks[when] + if type(tweaks) == "table" then + if trace_defining then + report_math("tweaking math of %a @ %p (%s: %s)",target.properties.fullname,target.parameters.size,when,"okay") + end + for i=1,#tweaks do + local tweak = tweaks[i] + local tvalue = type(tweak) + if type(tweak) == "table" then + local action = mathtweaks[tweak.tweak or ""] + if action then + local feature = tweak.feature + local features = target.specification.features.normal + if not feature or features[feature] == true then + local version = tweak.version + if version and version ~= target.tweakversion then + report_math("skipping tweak %a version %a",tweak.tweak,version) + elseif original then + action(target,original,tweak) + else + action(target,tweak) + end + end + end + end + end end end end + tweaked[when] = true + target.tweaked = tweaked end end + else + report_math("not tweaking math of %a @ %p (%s)",target.properties.fullname,target.parameters.size,when) end end @@ -220,120 +303,132 @@ function mathematics.tweakaftercopyingfont(target,original) end end +sequencers.appendaction("mathparameters","system","mathematics.overloadparameters") sequencers.appendaction("mathparameters","system","mathematics.scaleparameters") -sequencers.appendaction("mathparameters","system","mathematics.checkaccentbaseheight") -- should go in lfg instead +----------.appendaction("mathparameters","system","mathematics.checkaccentbaseheight") -- should go in lfg instead sequencers.appendaction("mathparameters","system","mathematics.checkprivateparameters") -- after scaling ! -sequencers.appendaction("mathparameters","system","mathematics.overloadparameters") sequencers.appendaction("beforecopyingcharacters","system","mathematics.tweakbeforecopyingfont") sequencers.appendaction("aftercopyingcharacters", "system","mathematics.tweakaftercopyingfont") --- no, it's a feature now (see good-mth): --- --- sequencers.appendaction("aftercopyingcharacters", "system","mathematics.overloaddimensions") - --- a couple of predefined tweaks: - -local tweaks = { } -mathematics.tweaks = tweaks - --- function tweaks.fixbadprime(target,original) --- target.characters[0xFE325] = target.characters[0x2032] --- end - --- these could go to math-fbk - --- local virtualized = mathematics.virtualized --- --- local function accent_to_extensible(target,newchr,original,oldchr,height,depth,swap) --- local characters = target.characters --- -- if not characters[newchr] then -- xits needs an enforce --- local addprivate = fonts.helpers.addprivate --- local olddata = characters[oldchr] --- if olddata then --- if swap then --- swap = characters[swap] --- height = swap.depth --- depth = 0 --- else --- height = height or 0 --- depth = depth or 0 --- end --- local correction = swap and { "down", (olddata.height or 0) - height } or { "down", olddata.height } --- local newdata = { --- commands = { correction, { "slot", 1, oldchr } }, --- width = olddata.width, --- height = height, --- depth = depth, --- } --- characters[newchr] = newdata --- local nextglyph = olddata.next --- while nextglyph do --- local oldnextdata = characters[nextglyph] --- local newnextdata = { --- commands = { correction, { "slot", 1, nextglyph } }, --- width = oldnextdata.width, --- height = height, --- depth = depth, --- } --- local newnextglyph = addprivate(target,formatters["original-%H"](nextglyph),newnextdata) --- newdata.next = newnextglyph --- local nextnextglyph = oldnextdata.next --- if nextnextglyph == nextglyph then --- break --- else --- olddata = oldnextdata --- newdata = newnextdata --- nextglyph = nextnextglyph --- end --- end --- local hv = olddata.horiz_variants --- if hv then --- hv = fastcopy(hv) --- newdata.horiz_variants = hv --- for i=1,#hv do --- local hvi = hv[i] --- local oldglyph = hvi.glyph --- local olddata = characters[oldglyph] --- local newdata = { --- commands = { correction, { "slot", 1, oldglyph } }, --- width = olddata.width, --- height = height, --- depth = depth, --- } --- hvi.glyph = addprivate(target,formatters["original-%H"](oldglyph),newdata) --- end --- end --- end --- -- end --- end - --- function tweaks.fixoverline(target,original) --- local height, depth = 0, 0 --- local mathparameters = target.mathparameters --- if mathparameters then --- height = mathparameters.OverbarVerticalGap --- depth = mathparameters.UnderbarVerticalGap --- else --- height = target.parameters.xheight/4 --- depth = height --- end --- accent_to_extensible(target,0x203E,original,0x0305,height,depth) --- -- also crappy spacing for our purpose: push to top of baseline --- accent_to_extensible(target,0xFE3DE,original,0x23DE,height,depth,0x23DF) --- accent_to_extensible(target,0xFE3DC,original,0x23DC,height,depth,0x23DD) --- accent_to_extensible(target,0xFE3B4,original,0x23B4,height,depth,0x23B5) --- -- for symmetry --- target.characters[0xFE3DF] = original.characters[0x23DF] --- target.characters[0xFE3DD] = original.characters[0x23DD] --- target.characters[0xFE3B5] = original.characters[0x23B5] --- -- inspect(fonts.helpers.expandglyph(target.characters,0x203E)) --- -- inspect(fonts.helpers.expandglyph(target.characters,0x23DE)) --- end +do + + -- More than a year of testing, development, tweaking (and improving) fonts has resulted + -- in a math engine in \LUAMETATEX\ that is quite flexible. Basically we can drop italic + -- correction there. In \MKIV\ we can emulate this to some extend but we still need a bit + -- of mix because \LUAMETATEX\ lacks some features. A variant of the tweak below is now + -- also used in the plain code we ship. In \MKIV\ we dropped a few features that were a + -- prelude to this and, because most users switched to \LMTX, it is unlikely that other + -- tweaks wil be backported. There is also no need to adapt \LUATEX\ and eventually all + -- italic code might be removed from \LUAMETATEX\ (unless we want to be able to test the + -- alternative; I can live with a little ballast, especially because it took time to load + -- it). + + local italics = nil + local integrals = table.tohash { + 0x0222B, 0x0222C, 0x0222D, 0x0222E, 0x0222F, 0x02230, 0x02231, 0x02232, 0x02233, + 0x02A0B, 0x02A0C, 0x02A0D, 0x02A0E, 0x02A0F, 0x02A10, 0x02A11, 0x02A12, 0x02A13, + 0x02A14, 0x02A15, 0x02A16, 0x02A17, 0x02A18, 0x02A19, 0x02A1A, 0x02A1B, 0x02A1C, + 0x02320, 0x02321 + } + + function mathtweaks.emulatelmtx(target,original,parameters) + -- gaps are not known yet + if not italic then + italics = { } + local gaps = mathematics.gaps + for name, data in next, characters.blocks do + if data.math and data.italic then + for i=data.first,data.last do + italics[i] = true + local g = gaps[i] + if g then + italics[g] = true + end + end + end + end +-- table.save("temp.log", table.sortedkeys(italics)) + end + -- + local targetcharacters = target.characters + local targetdescriptions = target.descriptions + local factor = target.parameters.factor + local function getllx(u) + local d = targetdescriptions[u] + if d then + local b = d.boundingbox + if b then + local llx = b[1] + if llx < 0 then + return - llx + end + end + end + return false + end + -- beware: here we also do the weird ones + for u, c in next, targetcharacters do + local uc = c.unicode or u + if integrals[uc] then + -- skip this one + else + local accent = c.top_accent + local italic = c.italic + local width = c.width or 0 + local llx = getllx(u) + local bl, br, tl, tr + if llx then + llx = llx * factor + width = width + llx + bl = - llx + tl = bl + c.commands = { rightcommand[llx], charcommand[u] } + if accent then + accent = accent + llx + end + end + if accent then + if italics[uc] then + c.top_accent = accent + else + c.top_accent = nil + end + end + if italic and italic ~= 0 then + width = width + italic + br = - italic + end + c.width = width + if italic then + c.italic = nil + end + if bl or br or tl or tr then + -- watch out: singular and _ because we are post copying / scaling + c.mathkern = { + bottom_left = bl and { { height = 0, kern = bl } } or nil, + bottom_right = br and { { height = 0, kern = br } } or nil, + top_left = tl and { { height = c.height or 0, kern = tl } } or nil, + top_right = tr and { { height = c.height or 0, kern = tr } } or nil, + } + end + end + end + end --- sequencers.appendaction("aftercopyingcharacters", "system","mathematics.tweaks.fixoverline") -- for the moment always + function mathtweaks.parameters(target,original,parameters) + local newparameters = parameters.list + local oldparameters = target.mathparameters + if newparameters and oldparameters then + newparameters = copytable(newparameters) + scaleparameters(newparameters,target.parameters) + for name, newvalue in next, newparameters do + oldparameters[name] = newvalue + end + end + end --- helpers +end local setmetatableindex = table.setmetatableindex @@ -467,87 +562,6 @@ interfaces.implement { end } --- experiment - --- check: when true, only set when present in font --- force: when false, then not set when already set - --- todo: tounicode - --- function mathematics.injectfallbacks(target,original) --- local properties = original.properties --- if properties and properties.hasmath then --- local specification = target.specification --- if specification then --- local fallbacks = specification.fallbacks --- if fallbacks then --- local definitions = fonts.collections.definitions[fallbacks] --- if definitions then --- if trace_collecting then --- report_math("adding fallback characters to font %a",specification.hash) --- end --- local definedfont = fonts.definers.internal --- local copiedglyph = fonts.handlers.vf.math.copy_glyph --- local fonts = target.fonts --- local size = specification.size -- target.size --- local characters = target.characters --- if not fonts then --- fonts = { } --- target.fonts = fonts --- if not CONTEXTLMTXMODE or CONTEXTLMTXMODE == 0 then --- target.type = "virtual" --- target.properties.virtualized = true --- end --- end --- if #fonts == 0 then --- fonts[1] = { id = 0, size = size } -- sel, will be resolved later --- end --- local done = { } --- for i=1,#definitions do --- local definition = definitions[i] --- local name = definition.font --- local start = definition.start --- local stop = definition.stop --- local gaps = definition.gaps --- local check = definition.check --- local force = definition.force --- local rscale = definition.rscale or 1 --- local offset = definition.offset or start --- local id = definedfont { name = name, size = size * rscale } --- local index = #fonts + 1 --- fonts[index] = { id = id, size = size } --- local chars = fontchars[id] --- local function remap(unic,unicode,gap) --- -- local unic = unicode + offset - start --- if check and not chars[unicode] then --- -- not in font --- elseif force or (not done[unic] and not characters[unic]) then --- if trace_collecting then --- report_math("remapping math character, vector %a, font %a, character %C%s%s", --- fallbacks,name,unic,check and ", checked",gap and ", gap plugged") --- end --- characters[unic] = copiedglyph(target,characters,chars,unicode,index) --- done[unic] = true --- end --- end --- for unicode = start, stop do --- local unic = unicode + offset - start --- remap(unic,unicode,false) --- end --- if gaps then --- for unic, unicode in next, gaps do --- remap(unic,unicode,true) --- end --- end --- end --- end --- end --- end --- end --- end --- --- sequencers.appendaction("aftercopyingcharacters", "system","mathematics.finishfallbacks") - local stack = { } function mathematics.registerfallbackid(n,id,name) diff --git a/Master/texmf-dist/tex/context/base/mkiv/math-dim.lua b/Master/texmf-dist/tex/context/base/mkiv/math-dim.lua index 06b4bbd97fd..c46e16faf6e 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/math-dim.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/math-dim.lua @@ -132,7 +132,6 @@ end function mathematics.dimensions(dimens) -- beware, dimens get spoiled if dimens.SpaceAfterScript then - dimens.SubscriptShiftDownWithSuperscript = dimens.SubscriptShiftDown * 1.5 -- move this one return table.fastcopy(dimens), { } elseif dimens.AxisHeight or dimens.axis_height then local t = { } diff --git a/Master/texmf-dist/tex/context/base/mkiv/math-dir.lua b/Master/texmf-dist/tex/context/base/mkiv/math-dir.lua index 38aa44358e2..f0298d2434c 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/math-dir.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/math-dir.lua @@ -36,8 +36,8 @@ local getattr = nuts.getattr local setchar = nuts.setchar local setlist = nuts.setlist -local insert_node_before = nuts.insert_before -local insert_node_after = nuts.insert_after +local insertnodebefore = nuts.insertbefore +local insertnodeafter = nuts.insertafter local nodecodes = nodes.nodecodes local enableaction = nodes.tasks.enableaction @@ -65,8 +65,8 @@ local function processmath(head) local start = nil local stop = nil local function capsulate() - head = insert_node_before(head,start,new_direction(lefttoright_code)) - insert_node_after(head,stop,new_direction(lefttoright_code,true)) + head = insertnodebefore(head,start,new_direction(lefttoright_code)) + insertnodeafter(head,stop,new_direction(lefttoright_code,true)) if trace_directions then report_directions("reversed: %s",nodes.listtoutf(start,false,false,stop)) end @@ -142,6 +142,7 @@ function directions.processmath(head) -- style, penalties return processmath(head) end end + return head end function directions.setmath(n) diff --git a/Master/texmf-dist/tex/context/base/mkiv/math-ext.lua b/Master/texmf-dist/tex/context/base/mkiv/math-ext.lua index 762f1f904ed..1f78d6ad449 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/math-ext.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/math-ext.lua @@ -27,7 +27,7 @@ local mathplus = { } -- todo: store them and skip storage if already stored -- todo: make a char-ctx.lua (or is this already side effect of save in format) -local function addextra(unicode) +function extras.add(unicode) local min = mathematics.extrabase local max = min + 0xFFF if unicode >= min and unicode <= max then @@ -41,8 +41,6 @@ local function addextra(unicode) end end -extras.add = addextra - function extras.copy(target,original) local characters = target.characters local properties = target.properties diff --git a/Master/texmf-dist/tex/context/base/mkiv/math-fbk.lua b/Master/texmf-dist/tex/context/base/mkiv/math-fbk.lua index 6b43a901bdd..b4270462969 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/math-fbk.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/math-fbk.lua @@ -7,6 +7,7 @@ if not modules then modules = { } end modules ['math-fbk'] = { } local next, type = next, type +local floor = math.floor local trace_fallbacks = false trackers.register("math.fallbacks", function(v) trace_fallbacks = v end) @@ -32,6 +33,7 @@ local popcommand = helpers.commands.pop local pushcommand = helpers.commands.push local virtualcharacters = { } +local virtualforced = { } local hashes = fonts.hashes local identifiers = hashes.identifiers @@ -136,7 +138,7 @@ function fallbacks.apply(target,original) local fullname = trace_fallbacks and target.properties.fullname -- for k, v in sortedhash(virtualcharacters) do - if not characters[k] then + if not characters[k] or virtualforced[k] then local tv = type(v) local cd = nil if tv == "table" then @@ -601,9 +603,11 @@ local function actuarian(data) return { -- todo: add alttext -- compromise: lm has large hooks e.g. \actuarial{a} - width = basewidth + 4 * linewidth, - unicode = 0x20E7, - commands = { + width = basewidth + 4 * linewidth, + height = basechar.height, + depth = basechar.depth, + unicode = 0x20E7, + commands = { rightcommand[2 * linewidth], downcommand[- baseheight - 3 * linewidth], { "rule", linewidth, basewidth + 4 * linewidth }, @@ -623,13 +627,15 @@ local function equals(data,unicode,snippet,advance,n) -- mathpair needs them local basechar = characters[snippet] local advance = advance * parameters.quad return { - unicode = unicode, - width = n*basechar.width + (n-1)*advance, - commands = { + unicode = unicode, + width = n*basechar.width - (n-1)*advance, + height = basechar.height, + depth = basechar.depth, + commands = { charcommand[snippet], - rightcommand[advance], + leftcommand[advance], charcommand[snippet], - n > 2 and rightcommand[advance] or nil, + n > 2 and leftcommand[advance] or nil, n > 2 and charcommand[snippet] or nil, }, } @@ -694,3 +700,30 @@ virtualcharacters[0x305] = function(data) } end +local function threedots(data,shift) + local characters = data.target.characters + local parameters = data.target.parameters + local periodchar = characters[0x002E] + local pluschar = characters[0x002B] + local period = charcommand[0x002E] + local periodwd = periodchar.width or 0 + local periodht = periodchar.height or 0 + local perioddp = periodchar.depth or 0 + local offset = 0 + if shift then + local plusht = pluschar.height or 0 + local plusdp = pluschar.depth or 0 + local axis = floor((plusdp + plusht)/2) - plusdp + offset = axis - floor(periodht/2) + periodht = axis + floor(periodht/2) + end + return { + width = 3*periodwd, + height = periodht, + depth = 0, + commands = { upcommand[offset], period, period, period } + } +end + +virtualcharacters[0x2026] = function(data) return threedots(data,false) end virtualforced[0x2026] = true +virtualcharacters[0x22EF] = function(data) return threedots(data, true) end virtualforced[0x22EF] = true diff --git a/Master/texmf-dist/tex/context/base/mkiv/math-frc.lua b/Master/texmf-dist/tex/context/base/mkiv/math-frc.lua index fa3ac515fe1..4a04c920316 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/math-frc.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/math-frc.lua @@ -57,41 +57,3 @@ interfaces.implement { actions = mathfraction, arguments = { "string", "number", "number", "dimen" } } - --- experimental code in lmtx - -if CONTEXTLMTXMODE > 0 then - - local ctx_Uatop = context.Uatop - local ctx_Uover = context.Uover - - local function umathfraction(how,left,right,width) - if how == v_no then - if left == 0x002E and right == 0x002E then - ctx_Uatop() - else - context("\\Uatopwithdelims%s%s",resolved[left],resolved[right]) - end - elseif how == v_yes or how == v_hidden then - local norule = how == v_hidden and " norule " or "" - if left == 0x002E and right == 0x002E then - context("\\Uabove%s%ssp",norule,width) - else - context("\\Uabovewithdelims%s%s%s%ssp",norule,resolved[left],resolved[right],width) - end - else -- v_auto - if left == 0x002E and right == 0x002E then - ctx_Uover() - else - context("\\Uoverwithdelims%s%s",resolved[left],resolved[right]) - end - end - end - - interfaces.implement { - name = "umathfraction", - actions = umathfraction, - arguments = { "string", "number", "number", "dimen" } - } - -end diff --git a/Master/texmf-dist/tex/context/base/mkiv/math-ini.lua b/Master/texmf-dist/tex/context/base/mkiv/math-ini.lua index 19bf868020a..688f682c8ac 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/math-ini.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/math-ini.lua @@ -31,6 +31,8 @@ local ctx_doifelsesomething = commands.doifelsesomething local trace_defining = false trackers.register("math.defining", function(v) trace_defining = v end) +-- trace_defining = true + local report_math = logs.reporter("mathematics","initializing") mathematics = mathematics or { } @@ -55,78 +57,96 @@ local families = allocate { --- to be checked .. afew defaults in char-def that should be alpha local classes = allocate { - ord = 0, -- mathordcomm mathord - op = 1, -- mathopcomm mathop - bin = 2, -- mathbincomm mathbin - rel = 3, -- mathrelcomm mathrel - open = 4, -- mathopencomm mathopen - middle = 4, - close = 5, -- mathclosecomm mathclose - punct = 6, -- mathpunctcomm mathpunct - alpha = 7, -- mathalphacomm firstofoneargument - accent = 8, -- class 0 - radical = 9, - xaccent = 10, -- class 3 - topaccent = 11, -- class 0 - botaccent = 12, -- class 0 - under = 13, - over = 14, - delimiter = 15, - inner = 0, -- mathinnercomm mathinner - nothing = 0, -- mathnothingcomm firstofoneargument - choice = 0, -- mathchoicecomm @@mathchoicecomm - box = 0, -- mathboxcomm @@mathboxcomm - limop = 1, -- mathlimopcomm @@mathlimopcomm - nolop = 1, -- mathnolopcomm @@mathnolopcomm + ord = 0, -- mathordcomm mathord + op = 1, -- mathopcomm mathop + bin = 2, -- mathbincomm mathbin + rel = 3, -- mathrelcomm mathrel + open = 4, -- mathopencomm mathopen + middle = 4, + close = 5, -- mathclosecomm mathclose + punct = 6, -- mathpunctcomm mathpunct + alpha = 7, -- mathalphacomm firstofoneargument + accent = 8, -- class 0 + radical = 9, + xaccent = 10, -- class 3 + topaccent = 11, -- class 0 + botaccent = 12, -- class 0 + under = 13, + over = 14, + delimiter = 15, + division = 15, + inner = 0, -- mathinnercomm mathinner + choice = 0, -- mathchoicecomm @@mathchoicecomm + prime = 0, + differential = 0, + exponential = 0, + limop = 1, -- mathlimopcomm @@mathlimopcomm + nolop = 1, -- mathnolopcomm @@mathnolopcomm -- - ordinary = 0, -- ord - alphabetic = 7, -- alpha - unknown = 0, -- nothing - default = 0, -- nothing - punctuation = 6, -- punct - normal = 0, -- nothing - opening = 4, -- open - closing = 5, -- close - binary = 2, -- bin - relation = 3, -- rel - fence = 0, -- unknown - diacritic = 8, -- accent - large = 1, -- op - variable = 7, -- alphabetic - number = 7, -- alphabetic - root = 16, -- a private one + ordinary = 0, -- ord + alphabetic = 7, -- alpha + punctuation = 6, -- punct + opening = 4, -- open + closing = 5, -- close + binary = 2, -- bin + relation = 3, -- rel + diacritic = 8, -- accent + large = 1, -- op + variable = 7, -- alphabetic + number = 7, -- alphabetic + root = 16, -- a private one } -local open_class = 4 -local middle_class = 4 -local close_class = 5 -local accent_class = 8 -local radical_class = 9 -local topaccent_class = 11 -local botaccent_class = 12 -local under_class = 13 -local over_class = 14 -local delimiter_class = 15 -local root_class = 16 +local engineclasses = table.setmetatableindex(function(t,k) + if k then + local c = tonumber(k) or classes[k] or 0 + local v = c < 8 and c or 0 + t[k] = v + return v + else + return 0 + end +end) + +local ordinary_class = classes.ordinary +local open_class = classes.open +local middle_class = classes.middle +local close_class = classes.close +local accent_class = classes.accent +local radical_class = classes.radical +local topaccent_class = classes.topaccent +local botaccent_class = classes.botaccent +local under_class = classes.under +local over_class = classes.over +local delimiter_class = classes.delimiter +local division_class = classes.division +local root_class = classes.root local accents = allocate { accent = true, -- some can be both - topaccent = true, [11] = true, - botaccent = true, [12] = true, - under = true, [13] = true, - over = true, [14] = true, + topaccent = true, [topaccent_class] = true, + botaccent = true, [botaccent_class] = true, + under = true, [under_class] = true, + over = true, [over_class] = true, unknown = false, } +-- engine subtypes get from elsewhere + local codes = allocate { - ordinary = 0, [0] = "ordinary", - largeoperator = 1, [1] = "largeoperator", - binaryoperator = 2, [2] = "binaryoperator", - relation = 3, [3] = "relation", - openingsymbol = 4, [4] = "openingsymbol", - closingsymbol = 5, [5] = "closingsymbol", - punctuation = 6, [6] = "punctuation", - variable = 7, [7] = "variable", + ordinary = 0, [ 0] = "ordinary", + largeoperator = 1, [ 1] = "largeoperator", + binaryoperator = 2, [ 2] = "binaryoperator", + relation = 3, [ 3] = "relation", + openingsymbol = 4, [ 4] = "openingsymbol", + closingsymbol = 5, [ 5] = "closingsymbol", + punctuation = 6, [ 6] = "punctuation", + -- inner = 7, [ 7] = "inner", + -- undersymbol = 8, [ 8] = "undersymbol", + -- oversymbol = 9, [ 9] = "oversymbol", + -- fractionsymbol = 10, [10] = "fractionsymbol", + -- radicalsymbol = 11, [11] = "radicalsymbol", + middlesymbol = 12, [12] = "middlesymbol", } local extensibles = allocate { @@ -176,257 +196,206 @@ mathematics.codes = codes mathematics.families = families mathematics.virtualized = virtualized --- there will be proper functions soon (and we will move this code in-line) --- no need for " in class and family (saves space) - --- local function mathchar(class,family,slot) --- return formatters['\\Umathchar "%X "%X "%X '](class,family,slot) --- end --- --- local function mathaccent(class,family,slot) --- return formatters['\\Umathaccent "%X "%X "%X '](0,family,slot) -- no class --- end --- --- local function delimiter(class,family,slot) --- return formatters['\\Udelimiter "%X "%X "%X '](class,family,slot) --- end --- --- local function radical(family,slot) --- return formatters['\\Uradical "%X "%X '](family,slot) --- end --- --- local function root(family,slot) --- return formatters['\\Uroot "%X "%X '](family,slot) --- end --- --- local function mathchardef(name,class,family,slot) --- return formatters['\\Umathchardef\\%s "%X "%X "%X '](name,class,family,slot) --- end --- --- local function mathcode(target,class,family,slot) --- return formatters['\\Umathcode%s="%X "%X "%X '](target,class,family,slot) --- end --- --- local function mathtopaccent(class,family,slot) --- return formatters['\\Umathaccent "%X "%X "%X '](0,family,slot) -- no class --- end --- --- local function mathbotaccent(class,family,slot) --- return formatters['\\Umathaccent bottom "%X "%X "%X '](0,family,slot) -- no class --- end --- --- local function mathtopdelimiter(class,family,slot) --- return formatters['\\Udelimiterover "%X "%X '](family,slot) -- no class --- end --- --- local function mathbotdelimiter(class,family,slot) --- return formatters['\\Udelimiterunder "%X "%X '](family,slot) -- no class --- end - local escapes = characters.filters.utf.private.escapes --- not that many so no need to reuse tables +do -local setmathcharacter = function(class,family,slot,unicode,mset,dset) - if mset and codes[class] then -- regular codes < 7 - setmathcode("global",slot,class,family,unicode) - mset = false - end - if dset and class == open_class or class == close_class or class == middle_class then - setdelcode("global",slot,family,unicode,0,0) - dset = false + local setmathcharacter = function(class,family,slot,unicode,mset,dset) + if mset and codes[class] then -- regular codes < 7 + setmathcode("global",slot,class,family,unicode) + mset = false + end + if dset and (class == open_class or class == close_class or class == middle_class or class == division_class) then + setdelcode("global",slot,family,unicode,0,0) + dset = false + end + return mset, dset end - return mset, dset -end - --- todo: make nice setters for this in lua - -local f_accent = formatters[ [[\defUmathtopaccent \%s{%X}{%X}{%X}]] ] -local f_topaccent = formatters[ [[\defUmathtopaccent \%s{%X}{%X}{%X}]] ] -local f_botaccent = formatters[ [[\defUmathbotaccent \%s{%X}{%X}{%X}]] ] -local f_over = formatters[ [[\defUdelimiterover \%s{%X}{%X}{%X}]] ] -local f_under = formatters[ [[\defUdelimiterunder\%s{%X}{%X}{%X}]] ] -local f_fence = formatters[ [[\defUdelimiter \%s{%X}{%X}{%X}]] ] -local f_delimiter = formatters[ [[\defUdelimiter \%s{%X}{%X}{%X}]] ] -local f_radical = formatters[ [[\defUradical \%s{%X}{%X}]] ] -local f_root = formatters[ [[\defUroot \%s{%X}{%X}]] ] -local f_char = formatters[ [[\defUmathchar \%s{%X}{%X}{%X}]] ] - -local texmathchardef = tex.mathchardef - --- local setmathsymbol = function(name,class,family,slot) -- hex is nicer for tracing --- if class == classes.accent then --- ctx_sprint(f_topaccent(name,0,family,slot)) --- elseif class == classes.topaccent then --- ctx_sprint(f_topaccent(name,0,family,slot)) --- elseif class == classes.botaccent then --- ctx_sprint(f_botaccent(name,0,family,slot)) --- elseif class == classes.over then --- ctx_sprint(f_over(name,0,family,slot)) --- elseif class == classes.under then --- ctx_sprint(f_under(name,0,family,slot)) --- elseif class == open_class or class == close_class or class == middle_class then --- setdelcode("global",slot,{family,slot,0,0}) --- ctx_sprint(f_fence(name,class,family,slot)) --- elseif class == classes.delimiter then --- setdelcode("global",slot,{family,slot,0,0}) --- ctx_sprint(f_delimiter(name,0,family,slot)) --- elseif class == classes.radical then --- ctx_sprint(f_radical(name,family,slot)) --- elseif class == classes.root then --- ctx_sprint(f_root(name,family,slot)) --- elseif texmathchardef then --- texmathchardef(name,class,family,slot,"permanent") --- else --- -- beware, open/close and other specials should not end up here --- ctx_sprint(f_char(name,class,family,slot)) --- end --- end -local setmathsymbol = function(name,class,family,slot) -- hex is nicer for tracing - if class == accent_class then - ctx_sprint(f_topaccent(name,0,family,slot)) - elseif class == topaccent_class then - ctx_sprint(f_topaccent(name,0,family,slot)) - elseif class == botaccent_class then - ctx_sprint(f_botaccent(name,0,family,slot)) - elseif class == over_class then - ctx_sprint(f_over(name,0,family,slot)) - elseif class == under_class then - ctx_sprint(f_under(name,0,family,slot)) - elseif class == open_class or class == close_class or class == middle_class then - setdelcode("global",slot,{family,slot,0,0}) - ctx_sprint(f_fence(name,class,family,slot)) - elseif class == delimiter_class then - setdelcode("global",slot,{family,slot,0,0}) - ctx_sprint(f_delimiter(name,0,family,slot)) - elseif class == radical_class then - ctx_sprint(f_radical(name,family,slot)) - elseif class == root_class then - ctx_sprint(f_root(name,family,slot)) - elseif texmathchardef then - texmathchardef(name,class,family,slot,"permanent") - else - -- beware, open/close and other specials should not end up here - ctx_sprint(f_char(name,class,family,slot)) + local function report(class,engine,family,unicode,name) + local nametype = type(name) + if nametype == "string" then + report_math("class %a, engine %a, family %a, char %C, name %a",class,engine,family,unicode,name) + elseif nametype == "number" then + report_math("class %a, engine %a, family %a, char %C, number %U",class,engine,family,unicode,name) + else + report_math("class %a, engine %a, family %a, char %C",class,engine,family,unicode) + end end -end -local function report(class,family,unicode,name) - local nametype = type(name) - if nametype == "string" then - report_math("class name %a, class %a, family %a, char %C, name %a",classname,class,family,unicode,name) - elseif nametype == "number" then - report_math("class name %a, class %a, family %a, char %C, number %U",classname,class,family,unicode,name) - else - report_math("class name %a, class %a, family %a, char %C", classname,class,family,unicode) + local f_accent = formatters[ [[\defUmathtopaccent \%s{%X}{%X}{%X}]] ] + local f_topaccent = formatters[ [[\defUmathtopaccent \%s{%X}{%X}{%X}]] ] + local f_botaccent = formatters[ [[\defUmathbotaccent \%s{%X}{%X}{%X}]] ] + local f_over = formatters[ [[\defUdelimiterover \%s{%X}{%X}{%X}]] ] + local f_under = formatters[ [[\defUdelimiterunder\%s{%X}{%X}{%X}]] ] + local f_fence = formatters[ [[\defUdelimiter \%s{%X}{%X}{%X}]] ] + local f_delimiter = formatters[ [[\defUdelimiter \%s{%X}{%X}{%X}]] ] + local f_radical = formatters[ [[\defUradical \%s{%X}{%X}]] ] + local f_root = formatters[ [[\defUroot \%s{%X}{%X}]] ] + local f_char = formatters[ [[\defUmathchar \%s{%X}{%X}{%X}]] ] + + local texmathchardef = tex.mathchardef + + local setmathsymbol = function(name,class,engine,family,slot) -- hex is nicer for tracing + if class == accent_class then + ctx_sprint(f_topaccent(name,0,family,slot)) + elseif class == topaccent_class then + ctx_sprint(f_topaccent(name,0,family,slot)) + elseif class == botaccent_class then + ctx_sprint(f_botaccent(name,0,family,slot)) + elseif class == over_class then + ctx_sprint(f_over(name,0,family,slot)) + elseif class == under_class then + ctx_sprint(f_under(name,0,family,slot)) + elseif class == open_class or class == close_class or class == middle_class then + setdelcode("global",slot,{family,slot,0,0}) + ctx_sprint(f_fence(name,engine,family,slot)) + elseif class == delimiter_class then + setdelcode("global",slot,{family,slot,0,0}) + ctx_sprint(f_delimiter(name,0,family,slot)) + elseif class == radical_class then + ctx_sprint(f_radical(name,family,slot)) + elseif class == root_class then + ctx_sprint(f_root(name,family,slot)) + elseif texmathchardef then + texmathchardef(name,engine,family,slot,"permanent") + else + -- beware, open/close and other specials should not end up here + ctx_sprint(f_char(name,engine,family,slot)) + end end -end --- there will be a combined \(math)chardef (tracker) - -function mathematics.define(family) - family = family or 0 - family = families[family] or family - local data = characters.data - for unicode, character in sortedhash(data) do - local symbol = character.mathsymbol - local mset = true - local dset = true - if symbol then - local other = data[symbol] - local class = other.mathclass - if class then - class = classes[class] or class -- no real checks needed - if trace_defining then - report(class,family,unicode,symbol) - end - mset, dset = setmathcharacter(class,family,unicode,symbol,mset,dset) + function mathematics.define(family) + family = family or 0 + family = families[family] or family + local data = characters.data + -- + local function remap(first,last) + for unicode=utfbyte(first),utfbyte(last) do + setmathcode("global",unicode,ordinary_class,family,unicode) end - local spec = other.mathspec - if spec then - for i=1,#spec do - local m = spec[i] - local class = m.class - if class then - class = classes[class] or class -- no real checks needed - mset, dset = setmathcharacter(class,family,unicode,symbol,mset,dset) + end + remap("0","9") + remap("A","Z") + remap("a","z") + -- + for unicode, character in sortedhash(data) do + local symbol = character.mathsymbol + local mset = true + local dset = true + if symbol then + local other = data[symbol] + local class = other.mathclass + if class then + local engine = engineclasses[class] + if trace_defining then + report(class,engine,family,unicode,symbol) end + mset, dset = setmathcharacter(engine,family,unicode,symbol,mset,dset) end - end - end - local mathclass = character.mathclass - local mathspec = character.mathspec - if mathspec then - if mathclass then - local name = character.mathname - if name then - report_math("fatal error, conflicting mathclass and mathspec for %C",unicode) - os.exit() - else - local class = classes[mathclass] or mathclass -- no real checks needed - if not class then - if trace_defining then - report("unknown",family,unicode) + local spec = other.mathspec + if spec then + for i=1,#spec do + local m = spec[i] + local class = m.class + if class then + local engine = engineclasses[class] + -- todo: trace + mset, dset = setmathcharacter(engine,family,unicode,symbol,mset,dset) end - else - if trace_defining then - report(class,family,unicode) - end - mset, dset = setmathcharacter(class,family,unicode,unicode,mset,dset) end end end - for i=1,#mathspec do - local m = mathspec[i] - local name = m.name - local class = m.class + local class = character.mathclass + local spec = character.mathspec + local name = character.mathname + if spec then + local done = false if class then - class = classes[class] or class -- no real checks needed if name then + report_math("fatal error, conflicting mathclass and mathspec for %C",unicode) + os.exit() + else + class = classes[class] or ordinary_class + local engine = engineclasses[class] if trace_defining then - report(class,family,unicode,name) + report(class,engine,family,unicode) end - setmathsymbol(name,class,family,unicode) + mset, dset = setmathcharacter(engine,family,unicode,unicode,mset,dset) + done = true + end + end + for i=1,#spec do + local m = spec[i] + local name = m.name + local class = m.class or class + if class then + class = classes[class] or ordinary_class else - name = (class == classes.variable or class == classes.number) and character.adobename -- bad - if name and trace_defining then - report(class,family,unicode,name) + class = ordinary_class + end + if class then + local engine = engineclasses[class] + if name then + if trace_defining then + report(class,engine,family,unicode,name) + end + setmathsymbol(name,class,engine,family,unicode) + else + name = (class == classes.ordinary or class == classes.digit) and character.adobename -- bad + if name and trace_defining then + report(class,engine,family,unicode,name) + end + end + if not done then + mset, dset = setmathcharacter(engine,family,unicode,m.unicode or unicode,mset,dset) -- see solidus + done = true end end - mset, dset = setmathcharacter(class,family,unicode,m.unicode or unicode,mset,dset) -- see solidus - end - end - elseif mathclass then - local name = character.mathname - local class = classes[mathclass] or mathclass -- no real checks needed - if not class then - if trace_defining then - report("unknown",family,unicode,name) end - elseif name == false then - if trace_defining then - report(class,family,unicode,name) - end - mset, dset = setmathcharacter(class,family,unicode,unicode,mset,dset) else - -- if not name then - -- name = character.contextname -- too dangerous, we loose textslash and a few more - -- end - if name then - if trace_defining then - report(class,family,unicode,name) - end - setmathsymbol(name,class,family,unicode) + if class then + class = classes[class] or ordinary_class else + class = ordinary_class + end + if name ~= nil then + local engine = engineclasses[class] + if name == false then + if trace_defining then + report(class,engine,family,unicode,name) + end + mset, dset = setmathcharacter(engine,family,unicode,unicode,mset,dset) + else + -- if not name then + -- name = character.contextname -- too dangerous, we loose textslash and a few more + -- end + if name then + if trace_defining then + report(class,engine,family,unicode,name) + end + setmathsymbol(name,class,engine,family,unicode) + else + if trace_defining then + report(class,engine,family,unicode,character.adobename) + end + end + mset, dset = setmathcharacter(engine,family,unicode,unicode,mset,dset) + end + elseif class ~= ordinary_class then + local engine = engineclasses[class] if trace_defining then - report(class,family,unicode,character.adobename) + report(class,engine,family,unicode,character.adobename) end + mset, dset = setmathcharacter(engine,family,unicode,unicode,mset,dset) end - mset, dset = setmathcharacter(class,family,unicode,unicode,mset,dset) end end + if trace_defining then + logs.stopfilelogging() + end end + end -- needed for mathml analysis diff --git a/Master/texmf-dist/tex/context/base/mkiv/math-ini.mkiv b/Master/texmf-dist/tex/context/base/mkiv/math-ini.mkiv index d0e18ff4b1b..a955e9284f5 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/math-ini.mkiv +++ b/Master/texmf-dist/tex/context/base/mkiv/math-ini.mkiv @@ -324,18 +324,30 @@ % e.g.: \definemathematics[i:mp][setups=i:tight,openup=yes] -\newmuskip\defaultthickmuskip \defaultthickmuskip 5mu plus 5mu -\newmuskip\defaultmedmuskip \defaultmedmuskip 4mu plus 2mu minus 4mu -\newmuskip\defaultthinmuskip \defaultthinmuskip 3mu +\newmuskip\defaultthickmuskip \defaultthickmuskip 5mu plus 5mu +\newmuskip\defaultmedmuskip \defaultmedmuskip 4mu plus 2mu minus 4mu +\newmuskip\defaultthinmuskip \defaultthinmuskip 3mu -\newmuskip\halfthickmuskip \halfthickmuskip 2.5mu plus 2.5mu -\newmuskip\halfmedmuskip \halfmedmuskip 2.0mu plus 1.0mu minus 2.0mu -\newmuskip\halfthinmuskip \halfthinmuskip 1.5mu +\newmuskip\halfthickmuskip \halfthickmuskip 2.5mu plus 2.5mu +\newmuskip\halfmedmuskip \halfmedmuskip 2.0mu plus 1.0mu minus 2.0mu +\newmuskip\halfthinmuskip \halfthinmuskip 1.5mu -\newcount \defaultrelpenalty \defaultrelpenalty 500 -\newcount \defaultbinoppenalty \defaultbinoppenalty 700 -\newcount \defaultprerelpenalty \defaultprerelpenalty -100 -\newcount \defaultprebinoppenalty \defaultprebinoppenalty -100 +\newcount \defaultrelpenalty \defaultrelpenalty 500 +\newcount \defaultbinoppenalty \defaultbinoppenalty 700 +\newcount \defaultprerelpenalty \defaultprerelpenalty -100 +\newcount \defaultprebinoppenalty \defaultprebinoppenalty -100 +\newcount \defaultdisplayprepenalty \defaultdisplayprepenalty -10 + +% For the moment this way: + +% \appendtoks +% \setmathprepenalty \mathbinarycode \defaultdisplayprepenalty +% % \setmathpostpenalty\mathbinarycode \zerocount +% \setmathprepenalty \mathrelationcode \defaultdisplayprepenalty +% % \setmathpostpenalty\mathrelationcode \zerocount +% \setmathpostpenalty\mathtextpunctuationcode\defaultdisplayprepenalty +% % \setmathprepenalty \mathtextpunctuationcode\zerocount +% \to \everybeforedisplayformula % we need to control these otherwise: % @@ -1586,11 +1598,11 @@ % \unexpanded\def\disablemathpunctuation{\setfalse\automathpunctuation} % % \appendtoks -% \doifelse{\mathematicsparameter\v!autopunctuation}\v!yes\settrue\setfalse\automathpunctuation +% \doifelse{\mathematicsparameter\c!autopunctuation}\v!yes\settrue\setfalse\automathpunctuation % \to \everyswitchmathematics % % \setupmathematics -% [\v!autopunctuation=\v!no] +% [\c!autopunctuation=\v!no] % % \def\math_punctuation_next{\ifx\nexttoken\blankspace\signalcharacter\fi} % @@ -1676,9 +1688,9 @@ \let\math_punctuation_yes_period \math_punctuation_nop_period \let\math_punctuation_yes_semicolon\math_punctuation_all_semicolon -\def\math_punctuation_comma_next {\begingroup\Umathcode\c_math_comma \ifx\nexttoken\blankspace\mathordcode\else\mathordcode\fi\zerocount\c_math_comma ,\endgroup} -\def\math_punctuation_period_next {\begingroup\Umathcode\c_math_period \ifx\nexttoken\blankspace\mathordcode\else\mathordcode\fi\zerocount\c_math_period .\endgroup} -\def\math_punctuation_semicolon_next{\begingroup\Umathcode\c_math_semicolon\ifx\nexttoken\blankspace\mathordcode\else\mathordcode\fi\zerocount\c_math_semicolon;\endgroup} +\def\math_punctuation_comma_next {\begingroup\Umathcode\c_math_comma \ifx\nexttoken\blankspace\mathpunctcode\else\mathordcode\fi\zerocount\c_math_comma ,\endgroup} +\def\math_punctuation_period_next {\begingroup\Umathcode\c_math_period \ifx\nexttoken\blankspace\mathpunctcode\else\mathordcode\fi\zerocount\c_math_period .\endgroup} +\def\math_punctuation_semicolon_next{\begingroup\Umathcode\c_math_semicolon\ifx\nexttoken\blankspace\mathpunctcode\else\mathordcode\fi\zerocount\c_math_semicolon;\endgroup} \installcorenamespace {mathautopunctuation} @@ -1745,12 +1757,12 @@ \mathcode\c_math_comma \c_math_special \mathcode\c_math_period \c_math_special \mathcode\c_math_semicolon\c_math_special - \begincsname\??mathautopunctuation\mathematicsparameter\v!autopunctuation\endcsname + \begincsname\??mathautopunctuation\mathematicsparameter\c!autopunctuation\endcsname \to \everymathematics \appendtoks - \ifcsname\??mathautopunctuation\mathematicsparameter\v!autopunctuation\endcsname \else - \letmathematicsparameter\v!autopunctuation\v!no + \ifcsname\??mathautopunctuation\mathematicsparameter\c!autopunctuation\endcsname \else + \letmathematicsparameter\c!autopunctuation\v!no \fi \to \everysetupmathematics @@ -1758,7 +1770,7 @@ \def\disablemathpunctuation{\csname\??mathautopunctuation\v!yes\endcsname} \setupmathematics - [\v!autopunctuation=\v!no] % no | yes | all | comma | yes,semicolon | all,semicolon + [\c!autopunctuation=\v!no] % no | yes | all | comma | yes,semicolon | all,semicolon %D The consequences of setting this are as follows: %D @@ -2931,6 +2943,10 @@ \math_openup_parameter#1{#2}% \fi} +%D For now (needed in asciimath): + +\def\math_relax_limits{\let\limits\relax} + \protect \endinput % % not used (yet) diff --git a/Master/texmf-dist/tex/context/base/mkiv/math-int.mkiv b/Master/texmf-dist/tex/context/base/mkiv/math-int.mkiv index 5876eb7bb25..0920415f902 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/math-int.mkiv +++ b/Master/texmf-dist/tex/context/base/mkiv/math-int.mkiv @@ -68,8 +68,8 @@ \to \everyswitchmathematics \setupmathematics -% [\v!integral=nolimits] - [\v!integral=autolimits] +% [\c!integral=nolimits] + [\c!integral=autolimits] %D The following code is used for fallbacks and might become obsolete once %D we have enough \OPENTYPE\ math fonts. diff --git a/Master/texmf-dist/tex/context/base/mkiv/math-map.lua b/Master/texmf-dist/tex/context/base/mkiv/math-map.lua index 97860b923ba..5f93b43fc6c 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/math-map.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/math-map.lua @@ -689,9 +689,9 @@ local issygreek = regular_tf.symbols local isgreek = merged(islcgreek,isucgreek,issygreek) local greekremapping = { - [1] = { what = "unchanged" }, -- upright - [2] = { what = "upright", it = "tf", bi = "bf" }, -- upright - [3] = { what = "italic", tf = "it", bf = "bi" }, -- italic + { what = "unchanged" }, -- upright + { what = "upright", it = "tf", bi = "bf" }, -- upright + { what = "italic", tf = "it", bf = "bi" }, -- italic } local usedremap = { } diff --git a/Master/texmf-dist/tex/context/base/mkiv/math-noa.lua b/Master/texmf-dist/tex/context/base/mkiv/math-noa.lua index 1fb763a3b6c..fd4b8221583 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/math-noa.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/math-noa.lua @@ -55,7 +55,7 @@ local trace_processing = false registertracker("math.processing", function(v local trace_analyzing = false registertracker("math.analyzing", function(v) trace_analyzing = v end) local trace_normalizing = false registertracker("math.normalizing", function(v) trace_normalizing = v end) local trace_collapsing = false registertracker("math.collapsing", function(v) trace_collapsing = v end) -local trace_fixing = false registertracker("math.fixing", function(v) trace_foxing = v end) +local trace_fixing = false registertracker("math.fixing", function(v) trace_fixing = v end) local trace_patching = false registertracker("math.patching", function(v) trace_patching = v end) local trace_goodies = false registertracker("math.goodies", function(v) trace_goodies = v end) local trace_variants = false registertracker("math.variants", function(v) trace_variants = v end) @@ -134,12 +134,12 @@ local setsup = nuts.setsup local setsubpre = nuts.setsubpre local setsuppre = nuts.setsuppre -local flush_node = nuts.flush +local flushnode = nuts.flush local copy_node = nuts.copy local slide_nodes = nuts.slide local set_visual = nuts.setvisual -local mlist_to_hlist = nuts.mlist_to_hlist +local mlisttohlist = nuts.mlisttohlist local new_kern = nodepool.kern local new_submlist = nodepool.submlist @@ -185,7 +185,7 @@ local opdisplaylimitsnoad_code = noadcodes.opdisplaylimits local oplimitsnoad_code = noadcodes.oplimits local opnolimitsnoad_code = noadcodes.opnolimits local binnoad_code = noadcodes.bin -local relnode_code = noadcodes.rel +local relnoad_code = noadcodes.rel local opennoad_code = noadcodes.open local closenoad_code = noadcodes.close local punctnoad_code = noadcodes.punct @@ -465,7 +465,7 @@ local function errorchar(font,char) return fake else local kind, fake = fonts.checkers.placeholder(font,char) - if not fake or kind ~= "char" then + if not fake or kind ~= "char" then -- Also check for "with" here? fake = 0x3F end cached[font][char] = fake @@ -884,7 +884,7 @@ do end setchar(d,chr) setfam(d,fam) - flush_node(sym) + flushnode(sym) end setattrlist(d,char) setattrlist(f,char) @@ -930,7 +930,7 @@ do if midl then local fence = makefence(middlefence_code,current) setnucleus(current) - flush_node(current) + flushnode(current) middle[current] = nil -- replace_node setlink(prev,fence,next) @@ -956,7 +956,7 @@ do local f_c = makefence(rightfence_code,close) makelist(middle,open,f_o,o_next,c_prev,f_c) setnucleus(close) - flush_node(close) + flushnode(close) -- open is now a list setlink(open,c_next) return open @@ -1795,7 +1795,7 @@ do [oplimitsnoad_code] = true, [opnolimitsnoad_code] = true, [binnoad_code] = true, -- new - [relnode_code] = true, + [relnoad_code] = true, [opennoad_code] = true, -- new [closenoad_code] = true, -- new [punctnoad_code] = true, -- new @@ -1883,7 +1883,7 @@ do end while c ~= l do local n = getnext(c) - flush_node(c) + flushnode(c) c = n end setlink(parent,l) @@ -1930,8 +1930,6 @@ do mathematics.virtualize(movesub) - local options_supported = tokens.defined("Unosuperscript") - local function fixsupscript(parent,current,current_char,new_char) if new_char ~= current_char and new_char ~= true then setchar(current,new_char) @@ -1943,9 +1941,7 @@ do report_fixing("fixing subscript, superscript %U",current_char) end end - if options_supported then - setfield(parent,"options",0x08+0x22) - end + setfield(parent,"options",0x08+0x22) end -- local function movesubscript(parent,current_nucleus,oldchar,newchar) @@ -2097,7 +2093,7 @@ do end setprev(next,pointer) setnext(parent,getnext(next)) - flush_node(next) + flushnode(next) end end end @@ -2116,7 +2112,7 @@ do local classes = { } local colors = { - [relnode_code] = "trace:dr", + [relnoad_code] = "trace:dr", [ordnoad_code] = "trace:db", [binnoad_code] = "trace:dg", [opennoad_code] = "trace:dm", @@ -2175,7 +2171,7 @@ do local permitted = { ordinary = ordnoad_code, binary = binnoad_code, - relation = relnode_code, + relation = relnoad_code, punctuation = punctnoad_code, inner = innernoad_code, } @@ -2350,16 +2346,10 @@ do -- force_penalties = v -- end) - function builders.kernel.mlist_to_hlist(head,style,penalties) - return mlist_to_hlist(head,style,force_penalties or penalties) + function builders.kernel.mlisttohlist(head,style,penalties) + return mlisttohlist(head,style,force_penalties or penalties) end - -- function builders.kernel.mlist_to_hlist(head,style,penalties) - -- local h = mlist_to_hlist(head,style,force_penalties or penalties) - -- inspect(nodes.totree(h,true,true,true)) - -- return h - -- end - implement { name = "setmathpenalties", arguments = "integer", @@ -2374,14 +2364,14 @@ local actions = tasks.actions("math") -- head, style, penalties local starttiming, stoptiming = statistics.starttiming, statistics.stoptiming -function processors.mlist_to_hlist(head,style,penalties) +function processors.mlisttohlist(head,style,penalties) starttiming(noads) head = actions(head,style,penalties) stoptiming(noads) return head end -callbacks.register('mlist_to_hlist',processors.mlist_to_hlist,"preprocessing math list") +callbacks.register('mlist_to_hlist',processors.mlisttohlist,"preprocessing math list") -- tracing diff --git a/Master/texmf-dist/tex/context/base/mkiv/math-ren.lua b/Master/texmf-dist/tex/context/base/mkiv/math-ren.lua index 4628ffe5587..cf429cb3a69 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/math-ren.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/math-ren.lua @@ -33,6 +33,13 @@ mappings["blackboard-to-bold"] = { [0x02124] = 0x1D419, } +mappings["mikaels-favourites"] = { + [0x211D] = 0x1D411, + [0x211A] = 0x1D410, + [0x2124] = 0x1D419, + [0x2115] = 0x1D40D, +} + local function renderset(list) -- order matters local tag = gsub(list," ","") local n = sets[tag] diff --git a/Master/texmf-dist/tex/context/base/mkiv/math-tag.lua b/Master/texmf-dist/tex/context/base/mkiv/math-tag.lua index 41373fcb58b..5bbe5cb3a3b 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/math-tag.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/math-tag.lua @@ -38,7 +38,7 @@ local getnucleus = nuts.getnucleus local getsub = nuts.getsub local getsup = nuts.getsup -local set_attributes = nuts.setattributes +local setattributes = nuts.setattributes local nextnode = nuts.traversers.node @@ -99,7 +99,6 @@ local chardata = characters.data local getmathcodes = tex.getmathcodes local mathcodes = mathematics.codes local ordinary_mathcode = mathcodes.ordinary -local variable_mathcode = mathcodes.variable local fromunicode16 = fonts.mappings.fromunicode16 local fontcharacters = fonts.hashes.characters @@ -226,7 +225,7 @@ process = function(start) -- we cannot use the processor as we have no finalizer local char = getchar(start) local code = getmathcodes(char) local tag - if code == ordinary_mathcode or code == variable_mathcode then + if code == ordinary_mathcode then local ch = chardata[char] local mc = ch and ch.mathclass if mc == "number" then @@ -297,7 +296,7 @@ process = function(start) -- we cannot use the processor as we have no finalizer -- empty list elseif not attr then -- box comes from strange place - set_attributes(list,a_tagged,text) -- only the first node ? + setattributes(list,a_tagged,text) -- only the first node ? else -- Beware, the first node in list is the actual list so we definitely -- need to nest. This approach is a hack, maybe I'll make a proper diff --git a/Master/texmf-dist/tex/context/base/mkiv/math-ttv.lua b/Master/texmf-dist/tex/context/base/mkiv/math-ttv.lua index 151183212a3..662211a0d1c 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/math-ttv.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/math-ttv.lua @@ -61,6 +61,14 @@ mathencodings["large-to-small"] = { [0x02044] = 0x0E, -- / } +mathencodings["large-to-small-private"] = { + [0xFE07A] = 0x7A, -- bracehtipdownleft + [0xFE07B] = 0x7B, -- bracehtipdownright + [0xFE07C] = 0x7C, -- bracehtipupleft + [0xFE07D] = 0x7D, -- bracehtipupright + +} + -- Beware: these are (in cm/lm) below the baseline due to limitations -- in the tfm format but the engine (combined with the mathclass) takes -- care of it. If we need them in textmode, we should make them virtual @@ -429,7 +437,7 @@ mathencodings["tex-sy"] = { [0x027E9] = 0x69, -- >, rangle [0x0007C] = 0x6A, -- |, mid, lvert, rvert [0x02225] = 0x6B, -- parallel - -- [0x0 ] = 0x00, -- Vert, lVert, rVert, arrowvert, Arrowvert + -- [0x0 ] = 0x00, -- Vert, lVert, rVert, arrowvert, Arrowvert [0x02195] = 0x6C, -- updownarrow [0x021D5] = 0x6D, -- Updownarrow [0x0005C] = 0x6E, -- \, backslash, setminus diff --git a/Master/texmf-dist/tex/context/base/mkiv/math-vfu.lua b/Master/texmf-dist/tex/context/base/mkiv/math-vfu.lua index 221bbff8975..5fe9738a218 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/math-vfu.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/math-vfu.lua @@ -284,10 +284,9 @@ local function dots(main,characters,id,size,unicode) } end elseif unicode == 0x22EE then - -- weird height ! characters[unicode] = { width = w, - height = h+(1.4)*size, + height = h+0.8*size, depth = 0, commands = { push, push, slot, pop, up4size, push, slot, pop, up4size, slot, pop, @@ -296,7 +295,7 @@ local function dots(main,characters,id,size,unicode) elseif unicode == 0x22F1 then characters[unicode] = { width = 3*w + 6*size/18, - height = 1.5*size, + height = 0.7*size, depth = 0, commands = { push, @@ -313,7 +312,7 @@ local function dots(main,characters,id,size,unicode) elseif unicode == 0x22F0 then characters[unicode] = { width = 3*w + 6*size/18, - height = 1.5*size, + height = 0.7*size, depth = 0, commands = { push, @@ -422,7 +421,7 @@ local function stack(main,characters,id,size,unicode,u1,d12,u2) local mu = size/18 characters[unicode] = { width = w1, - height = h1 + h2 + d12, + height = h1 + h2 + d12*mu, depth = d1, commands = { { "slot", id, u1 }, @@ -699,7 +698,7 @@ local function copy_glyph(main,target,original,unicode,slot) vvi.glyph = addprivate(main,formatters["M-V-%H"](oldglyph),newdata) end end - return newdata + return glyphdata end end diff --git a/Master/texmf-dist/tex/context/base/mkiv/meta-blb.lua b/Master/texmf-dist/tex/context/base/mkiv/meta-blb.lua index c690f3902e7..c042451f253 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/meta-blb.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/meta-blb.lua @@ -200,7 +200,7 @@ metapost.installplugin { } -- Here follows an example of usage of the above: a more modern --- version of followokens (in meta-imp-txt.mkiv). +-- version of followtokens (in meta-imp-txt.mkiv). local nodecodes = nodes.nodecodes local kerncodes = nodes.kerncodes @@ -221,9 +221,9 @@ local getsubtype = nuts.getsubtype local setlink = nuts.setlink local setlist = nuts.setlist local getnext = nuts.getnext -local flatten_list = nuts.flatten_discretionaries +local flatten_list = nuts.flattendiscretionaries local remove_node = nuts.remove -local flush_node = nuts.flush +local flushnode = nuts.flush local addblob = mp.mf_blob_add local newblob = mp.mf_blob_new @@ -276,7 +276,7 @@ local function initialize(category,box) end setlist(wrap,head) end - flush_node(wrap) + flushnode(wrap) end end diff --git a/Master/texmf-dist/tex/context/base/mkiv/meta-grd.mkiv b/Master/texmf-dist/tex/context/base/mkiv/meta-grd.mkiv index 15a4471e78c..0296c68a6dc 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/meta-grd.mkiv +++ b/Master/texmf-dist/tex/context/base/mkiv/meta-grd.mkiv @@ -140,20 +140,20 @@ save sc, dx, dy, wd, ht, ox, oy, ax, ay ; - sc = \directdummyparameter\c!factor*\directdummyparameter\c!scale ; - dx = \MPdpar\directdummyparameter\c!dx*sc ; - dy = \MPdpar\directdummyparameter\c!dy*sc ; - wd = \directdummyparameter\c!nx*dx ; - ht = \directdummyparameter\c!ny*dy ; - ox = \MPdpar\directdummyparameter\c!xoffset\relax ; - oy = \MPdpar\directdummyparameter\c!yoffset\relax ; + sc := \directdummyparameter\c!factor*\directdummyparameter\c!scale ; + dx := \MPdpar\directdummyparameter\c!dx*sc ; + dy := \MPdpar\directdummyparameter\c!dy*sc ; + wd := \directdummyparameter\c!nx*dx ; + ht := \directdummyparameter\c!ny*dy ; + ox := \MPdpar\directdummyparameter\c!xoffset\relax ; + oy := \MPdpar\directdummyparameter\c!yoffset\relax ; if "\directdummyparameter\c!align" = "\v!middle" : - ax = \MPdpar\directdummyparameter\c!dx/2 - ay = \MPdpar\directdummyparameter\c!dy/2 + ax := \MPdpar\directdummyparameter\c!dx/2 ; + ay := \MPdpar\directdummyparameter\c!dy/2 ; else : - ax = 0 ; - ay = 0 ; + ax := 0 ; + ay := 0 ; fi ; draw image ( diff --git a/Master/texmf-dist/tex/context/base/mkiv/meta-imp-dum.mkiv b/Master/texmf-dist/tex/context/base/mkiv/meta-imp-dum.mkiv index 74a2de8755e..50a07f41554 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/meta-imp-dum.mkiv +++ b/Master/texmf-dist/tex/context/base/mkiv/meta-imp-dum.mkiv @@ -98,7 +98,7 @@ [placeholder] [1=red,2=green,3=blue,4=cyan,5=magenta,6=yellow] -\newcount\c_grph_replacement_n +\newinteger\c_grph_replacement_n \setupexternalfigures [\c!reduction=0, @@ -111,8 +111,8 @@ % \setuppalet[placeholder]% \getpaletsize[placeholder]% \ifnum\c_grph_replacement_n=\zerocount - \getrandomnumber \m_grph_replacement_n\plusone\paletsize - \global\c_grph_replacement_n \m_grph_replacement_n\relax + \getrandomnumber\m_grph_replacement_n\plusone\paletsize + \global\c_grph_replacement_n\m_grph_replacement_n\relax \else \global\advance\c_grph_replacement_n\plusone \fi diff --git a/Master/texmf-dist/tex/context/base/mkiv/meta-imp-mat.mkiv b/Master/texmf-dist/tex/context/base/mkiv/meta-imp-mat.mkiv index e1b5d9d0059..66ac3306327 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/meta-imp-mat.mkiv +++ b/Master/texmf-dist/tex/context/base/mkiv/meta-imp-mat.mkiv @@ -139,35 +139,35 @@ enddef ; \stopMPextensions -\startuniqueMPgraphic{minifun::math:stacker:\number"FE3B4}{axis,ex,em} +\startuniqueMPgraphic{minifun::math:stacker:\number"\ifcase\contextlmtxmode FE3B4\else23B4\fi}{axis,ex,em} math_stacker_draw_accent(math_stacker_bracket_shape(OverlayHeight,false)) ; \stopuniqueMPgraphic -\startuniqueMPgraphic{minifun::math:stacker:\number"FE3B5}{axis,ex,em} +\startuniqueMPgraphic{minifun::math:stacker:\number"\ifcase\contextlmtxmode FE3B5\else23B5\fi}{axis,ex,em} math_stacker_draw_accent(math_stacker_bracket_shape(OverlayDepth,true)) ; \stopuniqueMPgraphic -\startuniqueMPgraphic{minifun::math:stacker:\number"FE3DC}{axis,ex,em} +\startuniqueMPgraphic{minifun::math:stacker:\number"\ifcase\contextlmtxmode FE3DC\else23DC\fi}{axis,ex,em} math_stacker_draw_accent(math_stacker_parent_shape(OverlayHeight,false)) ; \stopuniqueMPgraphic -\startuniqueMPgraphic{minifun::math:stacker:\number"FE3DD}{axis,ex,em} +\startuniqueMPgraphic{minifun::math:stacker:\number"\ifcase\contextlmtxmode FE3DD\else23DD\fi}{axis,ex,em} math_stacker_draw_accent(math_stacker_parent_shape(OverlayDepth,true)) ; \stopuniqueMPgraphic -\startuniqueMPgraphic{minifun::math:stacker:\number"FE3DE}{axis,ex,em} +\startuniqueMPgraphic{minifun::math:stacker:\number"\ifcase\contextlmtxmode FE3DE\else23DE\fi}{axis,ex,em} math_stacker_draw_accent(math_stacker_brace_shape(OverlayHeight,false)) ; \stopuniqueMPgraphic -\startuniqueMPgraphic{minifun::math:stacker:\number"FE3DF}{axis,ex,em} +\startuniqueMPgraphic{minifun::math:stacker:\number"\ifcase\contextlmtxmode FE3DF\else23DF\fi}{axis,ex,em} math_stacker_draw_accent(math_stacker_brace_shape(OverlayDepth,true)) ; \stopuniqueMPgraphic -\startuniqueMPgraphic{minifun::math:stacker:\number"FE33E}{axis,ex,em} +\startuniqueMPgraphic{minifun::math:stacker:\number"\ifcase\contextlmtxmode FE33E\else203E\fi}{axis,ex,em} math_stacker_draw_accent(math_stacker_bar_shape(false)) ; \stopuniqueMPgraphic -\startuniqueMPgraphic{minifun::math:stacker:\number"FE33F}{axis,ex,em} +\startuniqueMPgraphic{minifun::math:stacker:\number"\ifcase\contextlmtxmode FE33F\else203F\fi}{axis,ex,em} math_stacker_draw_accent(math_stacker_bar_shape(true)) ; \stopuniqueMPgraphic @@ -257,5 +257,10 @@ $ \underleftarrow {a+b+c+d} \quad \underrightarrow {a+b+c+d} $ +\blank[2*big] +\setupmathradical[sqrt][alternative=mp,color=darkgreen] +$ + \sqrt[2]{a+b+c+d} \quad +$ \stopTEXpage diff --git a/Master/texmf-dist/tex/context/base/mkiv/meta-imp-txt.mkiv b/Master/texmf-dist/tex/context/base/mkiv/meta-imp-txt.mkiv index 2c28acf7290..8e7af88b72c 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/meta-imp-txt.mkiv +++ b/Master/texmf-dist/tex/context/base/mkiv/meta-imp-txt.mkiv @@ -243,7 +243,7 @@ if head then n = { } s = 0 - head = node.flatten_discretionaries(head) + head = nodes.flattendiscretionaries(head) local current = head while current do local id = current.id diff --git a/Master/texmf-dist/tex/context/base/mkiv/mlib-mpf.lua b/Master/texmf-dist/tex/context/base/mkiv/mlib-mpf.lua index 7452c011187..5e61cf4e11d 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/mlib-mpf.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/mlib-mpf.lua @@ -133,6 +133,25 @@ do n = 1 end + function metapost.getbuffer() + local b = { } + for i=1,n do + b[i] = buffer + end + return b, n + end + + function metapost.setbuffer(b, s) + n = 0 + for i=1,(s or #b) do + local bi = b[i] + if bi then + n = n + 1 + buffer[n] = tostring(bi) + end + end + end + function metapost.runscript(code) nesting = nesting + 1 runs = runs + 1 @@ -247,7 +266,7 @@ do -- writers - local function mpp(value) + local function rawmpp(value) n = n + 1 local t = type(value) if t == "number" then @@ -268,13 +287,13 @@ do local function mpprint(first,second,...) if second == nil then if first ~= nil then - mpp(first) + rawmpp(first) end else for i=1,select("#",first,second,...) do local value = (select(i,first,second,...)) if value ~= nil then - mpp(value) + rawmpp(value) end end end @@ -653,6 +672,25 @@ do for k, v in next, aux do mp[k] = v end + -- mp.print = table.setmetatablecall(aux, function(t,...) + -- mpprint(...) + -- end) + + mp.print = table.setmetatablecall(aux, function(t,first,second,...) + if second == nil then + if first ~= nil then + rawmpp(first) + end + else + for i=1,select("#",first,second,...) do + local value = (select(i,first,second,...)) + if value ~= nil then + rawmpp(value) + end + end + end + end) + end do diff --git a/Master/texmf-dist/tex/context/base/mkiv/mlib-pdf.lua b/Master/texmf-dist/tex/context/base/mkiv/mlib-pdf.lua index e737b5d8688..5c1dc88b8c1 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/mlib-pdf.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/mlib-pdf.lua @@ -23,9 +23,6 @@ local context = context local allocate = utilities.storage.allocate -local copy_node = node.copy -local write_node = node.write - local pen_info = mplib.pen_info local getfields = mplib.getfields or mplib.fields -- todo: in lmtx get them once and then use gettype @@ -91,7 +88,7 @@ end function metapost.flushliteral(d) if savedliterals then - write_node(mpsliteral(savedliterals[d])) + context(mpsliteral(savedliterals[d])) else report_metapost("problem flushing literal %a",d) end @@ -217,7 +214,7 @@ local function flushnormalpath(path, t, open) return t end -local function flushconcatpath(path, t, open) +local function flushconcatpath(path, t, open, transform) local pth, ith, nt local length = #path if t then @@ -226,8 +223,10 @@ local function flushconcatpath(path, t, open) t = { } nt = 0 end - nt = nt + 1 - t[nt] = f_cm(sx,rx,ry,sy,tx,ty) + if transform then + nt = nt + 1 + t[nt] = f_cm(sx,rx,ry,sy,tx,ty) + end for i=1,length do nt = nt + 1 pth = path[i] @@ -602,7 +601,7 @@ function metapost.flush(specification,result) for i=1,#savedpath do local path = savedpath[i] if transformed then - flushconcatpath(path,result,open) + flushconcatpath(path,result,open,i==1) else flushnormalpath(path,result,open) end @@ -612,7 +611,7 @@ function metapost.flush(specification,result) if flush then -- ignore this path elseif transformed then - flushconcatpath(path,result,open) + flushconcatpath(path,result,open,true) else flushnormalpath(path,result,open) end @@ -642,7 +641,7 @@ function metapost.flush(specification,result) for i=1,#savedhtap do local path = savedhtap[i] if transformed then - flushconcatpath(path,result,open) + flushconcatpath(path,result,open,i==1) else flushnormalpath(path,result,open) end @@ -651,7 +650,7 @@ function metapost.flush(specification,result) evenodd = true end if transformed then - flushconcatpath(path,result,open) + flushconcatpath(path,result,open,true) else flushnormalpath(path,result,open) end diff --git a/Master/texmf-dist/tex/context/base/mkiv/mlib-pps.lua b/Master/texmf-dist/tex/context/base/mkiv/mlib-pps.lua index 8a6f4b4f825..c3635d51782 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/mlib-pps.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/mlib-pps.lua @@ -13,7 +13,6 @@ local insert, remove, concat = table.insert, table.remove, table.concat local Cs, Cf, C, Cg, Ct, P, S, V, Carg = lpeg.Cs, lpeg.Cf, lpeg.C, lpeg.Cg, lpeg.Ct, lpeg.P, lpeg.S, lpeg.V, lpeg.Carg local lpegmatch, tsplitat, tsplitter = lpeg.match, lpeg.tsplitat, lpeg.tsplitter local formatters = string.formatters -local exists, savedata = io.exists, io.savedata local mplib = mplib local metapost = metapost @@ -26,8 +25,8 @@ local setmacro = interfaces.setmacro local texsetbox = tex.setbox local textakebox = tex.takebox -- or: nodes.takebox local texrunlocal = tex.runlocal -local copy_list = node.copy_list -local flush_list = node.flush_list +local copylist = nodes.copylist +local flushlist = nodes.flushlist local setmetatableindex = table.setmetatableindex local sortedhash = table.sortedhash @@ -271,7 +270,7 @@ local function stopjob() if top then for slot, content in next, top.textexts do if content then - flush_list(content) + flushlist(content) if trace_textexts then report_textexts("freeing text %s",slot) end @@ -377,7 +376,7 @@ function models.rgb(cr) elseif metapost.reducetogray then if n == 1 then local s = cr[1] - checked_color_pair(f_gray,s,s) + return checked_color_pair(f_gray,s,s) elseif n == 3 then local r = cr[1] local g = cr[2] @@ -1078,7 +1077,7 @@ local tx_reset, tx_process do end box = cache[mp_hash] if box then - box = copy_list(box) + box = copylist(box) else texrunlocal("mptexttoks") box = textakebox("mptextbox") @@ -1463,6 +1462,8 @@ local function tr_process(object,prescript,before,after) sp_specs = concat(sp_specs,",") definemultitonecolor(sp_name,sp_specs,"","") sp_type = "named" + elseif sp_type == "named" then + cs = { 1 } -- factor 1 end if sp_type == "named" then -- we might move this to another namespace .. also, named can be a spotcolor diff --git a/Master/texmf-dist/tex/context/base/mkiv/mtx-context-compare.tex b/Master/texmf-dist/tex/context/base/mkiv/mtx-context-compare.tex index c940270c8ab..16f8a540858 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/mtx-context-compare.tex +++ b/Master/texmf-dist/tex/context/base/mkiv/mtx-context-compare.tex @@ -38,7 +38,6 @@ \stopTEXpage \stoptexdefinition - \startluacode local report = logs.reporter("compare") @@ -70,8 +69,8 @@ local function check(name) return used end -local one = check(fileone) -local two = check(filetwo) +local one = check(fileone) -- can crash +local two = check(filetwo) -- can crash if not one then report("invalid file %a",fileone) diff --git a/Master/texmf-dist/tex/context/base/mkiv/mtx-context-hashed.tex b/Master/texmf-dist/tex/context/base/mkiv/mtx-context-hashed.tex new file mode 100644 index 00000000000..88de10f3f29 --- /dev/null +++ b/Master/texmf-dist/tex/context/base/mkiv/mtx-context-hashed.tex @@ -0,0 +1,136 @@ +%D \module +%D [ file=mtx-context-hashed, +%D version=2009.03.21, +%D title=\CONTEXT\ Extra Trickry, +%D subtitle=Combine Files, +%D author=Hans Hagen, +%D date=\currentdate, +%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}] +%C +%C This module is part of the \CONTEXT\ macro||package and is +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. + +% begin help +% +% usage: context --extra=hashed [options] list-of-files +% +% --database : database to create or extend +% --pattern : file pattern +% --patterns : pattern file +% --compression : apply compression +% +% end help + +% \startluacode +% if not resolvers.finders.helpers.validhashed("hasheddata") then +% resolvers.finders.helpers.createhashed { +% database = "hasheddata", +% pattern = "m4all/**.jpg$", +% compress = false, +% } +% resolvers.finders.helpers.createhashed { +% database = "hasheddata", +% pattern = "m4all/**.png$", +% compress = false, +% } +% resolvers.finders.helpers.createhashed { +% database = "hasheddata", +% pattern = "m4all/**.xml$", +% compress = true, +% } +% end +% \stopluacode + +% \startluacode +% if not resolvers.finders.helpers.validhashed("hasheddata") then +% resolvers.finders.helpers.createhashed { +% database = "hasheddata", +% patterns = { +% { pattern = "m4all/**.jpg$", compress = false }, +% { pattern = "m4all/**.png$", compress = false }, +% { pattern = "m4all/**.xml$", compress = true }, +% }, +% } +% end +% \stopluacode + +% context --extra=hashed --database=hasheddata --pattern=m4all/**.jpg +% context --extra=hashed --database=hasheddata --pattern=m4all/**.png +% context --extra=hashed --database=hasheddata --pattern=m4all/**.xml --compress +% context --extra=hashed --database=hasheddata --pattern=m4all/**.svg --compress + +% -- m4all.lua: +% +% return { +% { pattern = "m4all/**.jpg$", compress = false }, +% { pattern = "m4all/**.png$", compress = false }, +% { pattern = "m4all/**.svg$", compress = true }, +% { pattern = "m4all/**.xml$", compress = true }, +% } +% +% context --extra=hashed --database=hasheddata --patterns=m4all.lua + +% \registerhashedfiles[hasheddata] +% \registerfilescheme[hashed] +% +% \externalfigure[hashed:///m4all/books/chapters/h3/h3-if1/images/highres/casino.jpg] [height=1cm] +% \externalfigure[hashed:///m4all/books/chapters/ha/ha-c4/images/highres/ha-c44-ex2-s1.png][height=1cm] +% \externalfigure[m4all/books/chapters/h3/h3-if1/images/highres/casino.jpg] [height=1cm] +% \externalfigure[m4all/books/chapters/ha/ha-c4/images/highres/ha-c44-ex2-s1.png] [height=1cm] + +\input mtx-context-common.tex + +\noheaderandfooterlines \setupbodyfont[tt] + +\starttext + +\startluacode + + if CONTEXTLMTXMODE > 0 then + + local database = document.arguments.database + + if database then + local metadata = false + if tex.systemmodes["first"] then + metadata = resolvers.finders.helpers.createhashed { + database = database, + pattern = document.arguments.pattern, + compress = document.arguments.compress, + patterns = document.arguments.patterns and table.load(document.arguments.patterns), + } + else + metadata = resolvers.finders.helpers.validhashed(database) + if metadata then + metadata = metadata.metadata + end + end + if metadata then + local function show(what) + context.NC() context(what) + context.EQ() context(metadata[what]) + context.NC() context.NR() + end + context.starttitle { title = "database: " .. database } + context.starttabulate { "||r|" } + show("nofnames") + show("nofpaths") + show("nofblobs") + show("nofcompressed") + context.stoptabulate() + context.stoptitle() + else + context("something went wrong, invalid database") + end + else + context("something went wrong, no database specified") + end + else + context("you need lmtx") + end + +\stopluacode + +\stoptext + diff --git a/Master/texmf-dist/tex/context/base/mkiv/mtx-context-setters.tex b/Master/texmf-dist/tex/context/base/mkiv/mtx-context-setters.tex new file mode 100644 index 00000000000..c90c385c586 --- /dev/null +++ b/Master/texmf-dist/tex/context/base/mkiv/mtx-context-setters.tex @@ -0,0 +1,35 @@ +%D \module +%D [ file=mtx-context-setters, +%D version=0000.00.00, +%D title=\CONTEXT\ Extra Trickry, +%D subtitle=Show Trackers, +%D author=Hans Hagen, +%D date=\currentdate, +%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}] +%C +%C This module is part of the \CONTEXT\ macro||package and is +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. + +% begin help +% +% usage: context --extra=setters [--pattern=] [trackers|directives|experiments] +% +% --pattern : filter by pattern +% --trackers : show trackers +% --directives : show directives +% --experiments : show experiments +% +% end help + +\starttext + +\doifdocumentargument {trackers} { \ctxlua {trackers .show(environment.arguments.pattern) } } +\doifdocumentargument {directives} { \ctxlua {directives .show(environment.arguments.pattern) } } +\doifdocumentargument {experiments} { \ctxlua {experiments.show(environment.arguments.pattern) } } +\doifdocumentargument {showtrackers} { \ctxlua {trackers .show(environment.arguments.pattern) } } +\doifdocumentargument {showdirectives} { \ctxlua {directives .show(environment.arguments.pattern) } } +\doifdocumentargument {showexperiments} { \ctxlua {experiments.show(environment.arguments.pattern) } } + +\stoptext + diff --git a/Master/texmf-dist/tex/context/base/mkiv/mult-aux.mkiv b/Master/texmf-dist/tex/context/base/mkiv/mult-aux.mkiv index d7921bcc290..5992ed39f5e 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/mult-aux.mkiv +++ b/Master/texmf-dist/tex/context/base/mkiv/mult-aux.mkiv @@ -656,11 +656,11 @@ \installparametersethandler {#1}{#2}% \installrootparameterhandler{#1}{#2}} -\protected\def\installbasicautosetuphandler#1#2#3% \??self name \??parent (can be \??self) +\protected\def\installbasicautosetuphandler#1#2% \??self name \??parent (can be \??self) {\installbasicparameterhandler{#1}{#2}% \installautosetuphandler {#1}{#2}} -\protected\def\installstylisticautosetuphandler#1#2#3% \??self name \??parent (can be \??self) +\protected\def\installstylisticautosetuphandler#1#2% \??self name \??parent (can be \??self) {\installbasicparameterhandler{#1}{#2}% \installautosetuphandler {#1}{#2}% \installstyleandcolorhandler {#1}{#2}} diff --git a/Master/texmf-dist/tex/context/base/mkiv/mult-def.lua b/Master/texmf-dist/tex/context/base/mkiv/mult-def.lua index 0f2ef419c17..4ac85137108 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/mult-def.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/mult-def.lua @@ -7,7 +7,11 @@ if not modules then modules = { } end modules ['mult-def'] = { dataonly = true, } --- we can remove some commands, like inleftmargin and so (see typo-mar.mkiv) +-- We can remove some commands, like inleftmargin and so (see typo-mar.mkiv). Also, +-- some keywords are unique for mkiv or lmtx so at some point we might split this +-- file. On the other hand, it's a way to standardize. + +-- StartMovie and StartSound etc can go. return { ["commands"]={ @@ -7271,6 +7275,62 @@ return { ["pe"]="بنویسدرثبت", ["ro"]="scrieinregistru", }, + -- we still need to add some new ones here as i completely forgot that it's + -- needed ... maybe ws has a backlog for setups that we can use + ["definesavebuffer"]={ + ["en"]="startsavebuffer", + }, + ["startnamedtyping"]={ + ["en"]="startnamedtyping", + }, + ["stopnamedtyping"]={ + ["en"]="stopnamedtyping", + }, + ["namedconstruction"]={ + ["en"]="namedconstruction", + }, + ["startnamedconstruction"]={ + ["en"]="startnamedconstruction", + }, + ["stopnamedconstruction"]={ + ["en"]="stopnamedconstruction", + }, + ["nameddescription"]={ + ["en"]="nameddescription", + }, + ["startnameddescription"]={ + ["en"]="startnameddescription", + }, + ["stopnameddescription"]={ + ["en"]="stopnameddescription", + }, + ["namedenumeration"]={ + ["en"]="namedenumeration", + }, + ["startnamedenumeration"]={ + ["en"]="startnamedenumeration", + }, + ["stopnamedenumeration"]={ + ["en"]="stopnamedenumeration", + }, + ["startnamedsection"]={ + ["en"]="startnamedsection", + }, + ["stopnamedsection"]={ + ["en"]="stopnamedsection", + }, + ["startnamedmatrix"]={ + ["en"]="startnamedmatrix", + }, + ["stopnamedmatrix"]={ + ["en"]="stopnamedmatrix", + }, + ["startnamedsubformulas"]={ + ["en"]="startnamedsubformulas", + }, + ["stopnamedsubformulas"]={ + ["en"]="stopnamedsubformulas", + }, }, ["constants"]={ ["action"]={ @@ -7283,6 +7343,12 @@ return { ["pe"]="کنش", ["ro"]="actiune", }, + ["adaptive"]={ + ["en"]="adaptive", + }, + ["freezespacing"]={ + ["en"]="freezespacing", + }, ["address"]={ ["cs"]="adresa", ["de"]="adresse", @@ -7342,6 +7408,12 @@ return { ["en"]="alignbottom", ["fr"]="alignerbas", }, + ["topalign"]={ + ["en"]="topalign", + }, + ["bottomalign"]={ + ["en"]="bottomalign", + }, ["aligncharacter"]={ ["cs"]="aligncharacter", ["de"]="aligncharacter", @@ -7562,6 +7634,22 @@ return { ["pe"]="عرضخودکار", ["ro"]="autolatime", }, + ["autopunctuation"]={ + ["en"]="autopunctuation", + ["fr"]="autoponctuation", + }, + ["autospacing"]={ + ["en"]="autospacing", + ["fr"]="autospacing", + }, + ["autofencing"]={ + ["en"]="autofencing", + ["fr"]="autofencing", + }, + ["autonumbers"]={ + ["en"]="autonumbers", + ["fr"]="autonumbers", + }, ["availableheight"]={ ["en"]="availableheight", ["fr"]="hauteurdisponible", @@ -7821,6 +7909,10 @@ return { ["fr"]="commandebas", ["nl"]="ondercommando", }, + ["bottomcolor"]={ + ["en"]="bottomcolor", + ["nl"]="onderkleur", + }, ["bottomdistance"]={ ["cs"]="vzdalenostspodku", ["de"]="abstandunten", @@ -8264,6 +8356,10 @@ return { ["pe"]="criterium", ["ro"]="criteriu", }, + ["crop"]={ + ["en"]="crop", + ["fr"]="recadre", + }, ["cropoffset"]={ ["en"]="cropoffset", ["fr"]="decalagerecadre", @@ -9159,6 +9255,10 @@ return { ["fr"]="separateurtete", ["nl"]="kopscheider", }, + ["headindenting"]={ + ["en"]="headindenting", + ["nl"]="kopinspringen", + }, ["headstyle"]={ ["cs"]="stylhlavicky", ["de"]="kopfstil", @@ -9385,6 +9485,10 @@ return { ["en"]="instance", ["fr"]="instance", }, + ["integral"]={ + ["en"]="integral", + ["fr"]="integrale", + }, ["intent"]={ ["en"]="intent", ["fr"]="intention", @@ -9972,6 +10076,15 @@ return { ["en"]="mathclass", ["fr"]="classemath", }, + ["leftclass"]={ + ["en"]="leftclass", + }, + ["rightclass"]={ + ["en"]="rightclass", + }, + ["middleclass"]={ + ["en"]="middleclass", + }, ["mathlimits"]={ ["en"]="mathlimits", ["fr"]="limitesmath", @@ -9980,6 +10093,12 @@ return { ["en"]="mathstyle", ["fr"]="stylemath", }, + ["mathnumeratorstyle"]={ + ["en"]="mathnumeratorstyle", + }, + ["mathdenominatorstyle"]={ + ["en"]="mathdenominatorstyle", + }, ["max"]={ ["cs"]="max", ["de"]="max", @@ -10381,6 +10500,9 @@ return { ["pe"]="فاصلهشماره", ["ro"]="numberdistance", }, + ["numberthreshold"]={ + ["en"]="numberthreshold", + }, ["numbering"]={ ["cs"]="cislovani", ["de"]="nummerierung", @@ -10395,6 +10517,10 @@ return { ["en"]="numberorder", ["fr"]="ordrenumero", }, + ["numberlocation"]= + { + ["en"]="numberlocation", + }, ["numberprefix"]={ ["en"]="numberprefix", ["fr"]="prefixenumero", @@ -10805,6 +10931,9 @@ return { ["pe"]="پاراگراف", ["ro"]="paragraf", }, + ["penalties"]={ + ["en"]="penalties", + }, ["period"]={ ["en"]="period", ["fr"]="periode", @@ -11653,6 +11782,12 @@ return { ["en"]="smallcapsfont", ["fr"]="policepetitescaps", }, + ["snap"]={ + ["en"]="snap", + }, + ["snapstep"]={ + ["en"]="snapstep", + }, ["solution"]={ ["en"]="solution", ["fr"]="solution", @@ -11806,6 +11941,10 @@ return { ["pe"]="توده", ["ro"]="stack", }, + ["stacking"]={ + ["en"]="stacking", + ["nl"]="stapels", + }, ["stackname"]={ ["en"]="stackname", ["fr"]="nompile", @@ -11957,6 +12096,9 @@ return { ["en"]="surnamesep", ["fr"]="seprenom", }, + ["synchronize"]={ + ["en"]="synchronize", + }, ["svgstyle"]={ ["en"]="svgstyle", ["fr"]="stylesvg", @@ -12099,6 +12241,10 @@ return { ["en"]="textalign", ["fr"]="alignertexte", }, + ["textalternative"]={ + ["en"]="textalternative", + ["nl"]="tekstvariant", + }, ["textcolor"]={ ["cs"]="barvatextu", ["de"]="textfarbe", @@ -12159,6 +12305,10 @@ return { ["pe"]="حاشیهمتن", ["ro"]="textmargin", }, + ["numbermethod"]={ + ["en"]="numbermethod", + ["nl"]="nummermethode", + }, ["textmethod"]={ ["cs"]="textmethod", ["de"]="textmethod", @@ -12342,6 +12492,10 @@ return { ["fr"]="commandehaut", ["nl"]="bovencommando", }, + ["topcolor"]={ + ["en"]="topcolor", + ["nl"]="bovenkleur", + }, ["topdistance"]={ ["cs"]="vzdalenostvrsku", ["de"]="obenabstand", @@ -12721,6 +12875,21 @@ return { ["pe"]="گاموای", ["ro"]="ystep", }, + ["leftsource"]={ + ["en"]="leftsource", + }, + ["rightsource"]={ + ["en"]="rightsource", + }, + ["middlesource"]={ + ["en"]="middlesource", + }, + ["source"]={ + ["en"]="source", + }, + ["target"]={ + ["en"]="target", + }, }, ["elements"]={ ["answerlines"]={ @@ -12873,6 +13042,12 @@ return { ["pe"]="آرایش", ["ro"]="makeup", }, + ["namedtyping"]={ + ["en"]="namedtyping", + }, + ["namednotation"]={ + ["en"]="namednotation", + }, ["next"]={ ["cs"]="dalsi", ["de"]="folgende", @@ -14491,6 +14666,12 @@ return { ["pe"]="answerarea", ["ro"]="answerarea", }, + ["append"]={ + ["en"]="append", + }, + ["prepend"]={ + ["en"]="prepend", + }, ["appendices"]={ ["cs"]="dodatky", ["de"]="anhaenge", @@ -14609,10 +14790,6 @@ return { ["pe"]="پیشگفتارخودکار", ["ro"]="autointro", }, - ["autopunctuation"]={ - ["en"]="autopunctuation", - ["fr"]="autoponctuation", - }, ["back"]={ ["cs"]="zpet", ["de"]="zurueck", @@ -15311,6 +15488,10 @@ return { ["pe"]="eight", ["ro"]="eight", }, + ["compress"]={ + ["en"]="compress", + ["nl"]="comprimeer", + }, ["embed"]={ ["en"]="embed", ["fr"]="integrer", @@ -15562,6 +15743,12 @@ return { ["pe"]="شناور", ["ro"]="obiectmobil", }, + ["flushforward"]={ + ["en"]="flushforward", + }, + ["flushbackward"]={ + ["en"]="flushbackward", + }, ["flushinner"]={ ["cs"]="flushinner", ["de"]="flushinner", @@ -15979,6 +16166,9 @@ return { ["pe"]="افقی", ["ro"]="orizontal", }, + ["collapsed"]={ + ["en"]="collapsed", + }, ["hyphenated"]={ ["cs"]="hyphenated", ["de"]="hyphenate", @@ -16189,10 +16379,6 @@ return { ["pe"]="درحاشیهراست", ["ro"]="inmargineadreapta", }, - ["integral"]={ - ["en"]="integral", - ["fr"]="integrale", - }, ["interaction"]={ ["cs"]="interakce", ["de"]="interaktion", @@ -16360,6 +16546,10 @@ return { ["pe"]="نگهدار", ["ro"]="mentine", }, + ["keeptogether"]={ + ["en"]="keeptogether", + ["fr"]="conserverensemble", + }, ["kerncharacters"]={ ["en"]="kerncharacters", ["fr"]="approchercaracteres", @@ -16494,6 +16684,16 @@ return { ["pe"]="حاشیهچپ", ["ro"]="marginestanga", }, + ["lefttext"]={ + ["cs"]="textvlevo", + ["de"]="linkertext", + ["en"]="lefttext", + ["fr"]="textegauche", + ["it"]="testosinistro", + ["nl"]="linkertekst", + ["pe"]="متنچپ", + ["ro"]="textstanga", + }, ["leftpage"]={ ["cs"]="levastranka", ["de"]="linkerseite", @@ -17235,6 +17435,12 @@ return { ["pe"]="بدونآویزانکردن", ["ro"]="nothanging", }, + ["explicit"]={ + ["en"]="explicit", + }, + ["notcollapsed"]={ + ["en"]="notcollapsed", + }, ["nothyphenated"]={ ["cs"]="nothyphenated", ["de"]="nothyphenated", @@ -17688,6 +17894,10 @@ return { ["pe"]="محصول", ["ro"]="produs", }, + ["profile"]={ + ["en"]="profile", + ["fr"]="profil", + }, ["program"]={ ["cs"]="program", ["de"]="programm", @@ -17938,6 +18148,16 @@ return { ["pe"]="صفحهراست", ["ro"]="paginadreapta", }, + ["righttext"]={ + ["cs"]="textvpravo", + ["de"]="rechtertext", + ["en"]="righttext", + ["fr"]="textedroite", + ["it"]="testodestro", + ["nl"]="rechtertekst", + ["pe"]="متنراست", + ["ro"]="textdreapta", + }, ["righttoleft"]={ ["cs"]="righttoleft", ["de"]="righttoleft", @@ -18983,6 +19203,9 @@ return { ["pe"]="متن", ["ro"]="text", }, + ["textdisplay"]={ + ["en"]="textdisplay", + }, ["textnote"]={ ["en"]="textnote", ["fr"]="notetexte", diff --git a/Master/texmf-dist/tex/context/base/mkiv/mult-fmt.lua b/Master/texmf-dist/tex/context/base/mkiv/mult-fmt.lua index 0d11a425333..bbcdfd343f4 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/mult-fmt.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/mult-fmt.lua @@ -11,12 +11,12 @@ local concat, sortedhash = table.concat, table.sortedhash local sub, formatters = string.sub, string.formatters local utfsplit = utf.split -local prtcatcodes = catcodes.numbers.prtcatcodes -local contextsprint = context.sprint -local implement = interfaces.implement +local prtcatcodes = catcodes.numbers.prtcatcodes +local contextsprint = context.sprint +local implement = interfaces.implement -local setmacro = token.set_macro -local definedmacro = token.is_defined +local setmacro = token.setmacro or token.set_macro +local definedmacro = token.isdefined or token.is_defined local report = logs.reporter("interface") local report_interface = logs.reporter("interface","initialization") @@ -217,9 +217,9 @@ function interfaces.setuserinterface(interface,response) constant = constant[interface] or constant.en or given constants[constant] = given -- breedte -> width nofconstants = nofconstants + 1 - setmacro("c!" .. given,given,"immutable") + setmacro("c!" .. given,given,"immutable","constant") if reversetoo then - setmacro("k!" .. constant,given,"immutable") + setmacro("k!" .. constant,given,"immutable","constant") end report_constant("%-40s: %s",given,constant) end @@ -232,7 +232,7 @@ function interfaces.setuserinterface(interface,response) variable = variable[interface] or variable.en or given variables[given] = variable -- ja -> yes nofvariables = nofvariables + 1 - setmacro("v!" .. given,variable,"immutable") + setmacro("v!" .. given,variable,"immutable","constant") report_variable("%-40s: %s",given,variable) end logs.stopfilelogging() @@ -244,7 +244,7 @@ function interfaces.setuserinterface(interface,response) element = element[interface] or element.en or given elements[element] = given nofelements = nofelements + 1 - setmacro("e!" .. given,element,"immutable") + setmacro("e!" .. given,element,"immutable","constant") report_element("%-40s: %s",given,element) end logs.stopfilelogging() diff --git a/Master/texmf-dist/tex/context/base/mkiv/mult-fun.lua b/Master/texmf-dist/tex/context/base/mkiv/mult-fun.lua index 4ecbb1abdf4..0926b5d1287 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/mult-fun.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/mult-fun.lua @@ -16,7 +16,7 @@ return { "maxdimensions", "drawoptionsfactor", "dq", "sq", - "crossingscale", "crossingoption", + "crossingscale", "crossingoption", "crossingdebug", "contextlmtxmode", "metafunversion", "minifunversion", -- -- for the moment we put these here as they need to stand out @@ -34,9 +34,22 @@ return { "getparametertext", -- "getparameteroption", "applyparameters", + "mergeparameters", "pushparameters", "popparameters", + "setluaparameter", "definecolor", + -- + "record", "newrecord", "setrecord", "getrecord", "cntrecord", + -- + "anchorxy", "anchorx", "anchory", + "anchorht", "anchordp", + "anchorul", "anchorll", "anchorlr", "anchorur", + "localanchorbox", "localanchorcell", "localanchorspan", + "anchorbox", "anchorcell", "anchorspan", + "matrixbox", "matrixcell", "matrixspan", + -- + "pensilcolor", "pensilstep", }, commands = { "loadfile", "loadimage", "loadmodule", @@ -48,6 +61,7 @@ return { "zmod", "paired", "tripled", "unitcircle", "fulldiamond", "unitdiamond", "fullsquare", "unittriangle", "fulltriangle", + "unitoctagon", "fulloctagon", "unithexagon", "fullhexagon", -- "halfcircle", "quartercircle", "llcircle", "lrcircle", "urcircle", "ulcircle", "tcircle", "bcircle", "lcircle", "rcircle", @@ -72,7 +86,7 @@ return { -- "withshading", "withlinearshading", "withcircularshading", "withfromshadecolor", "withtoshadecolor", "shadedinto", "withshadecolors", "withshadedomain", "withshademethod", "withshadefactor", "withshadevector", - "withshadecenter", "withshadedirection", "withshaderadius", "withshadetransform", + "withshadecenter", "withshadedirection", "withshaderadius", "withshadetransform", "withshadecenterone", "withshadecentertwo", "withshadestep", "withshadefraction", "withshadeorigin", "shownshadevector", "shownshadeorigin", "shownshadedirection", "shownshadecenter", "cmyk", "spotcolor", "multitonecolor", "namedcolor", @@ -85,7 +99,7 @@ return { "checkedbounds", "checkbounds", "strut", "rule", "withmask", "bitmapimage", "colordecimals", "ddecimal", "dddecimal", "ddddecimal", "colordecimalslist", - "textext", "thetextext", "rawtextext", "textextoffset", "texbox", "thetexbox", "rawtexbox", "istextext", + "textext", "thetextext", "rawtextext", "textextoffset", "texbox", "thetexbox", "rawtexbox", "istextext", "infotext", "rawmadetext", "validtexbox", "onetimetextext", "rawfmttext", "thefmttext", "fmttext", "onetimefmttext", "notcached", "keepcached", "verbatim", @@ -94,6 +108,7 @@ return { "transparent", "withtransparency", "withopacity", "property", "properties", "withproperties", "asgroup", + "withpattern", "withpatternscale", "withpatternfloat", "infont", -- redefined using textext -- "set_linear_vector", "set_circular_vector", -- "linear_shade", "circular_shade", @@ -104,7 +119,8 @@ return { "grayscale", "greyscale", "withgray", "withgrey", "colorpart", "colorlike", "readfile", - "clearxy", "unitvector", "center", -- redefined + "clearxy", "unitvector", + "center", -- redefined "epsed", "anchored", "originpath", "infinite", "break", @@ -158,7 +174,7 @@ return { "passvariable", "passarrayvariable", "tostring", "topair", "format", "formatted", "quotation", "quote", "startpassingvariable", "stoppassingvariable", -- - "eofill", "eoclip", "nofill", "dofill", "fillup", "eofillup", "nodraw", "dodraw", + "eofill", "eoclip", "nofill", "dofill", "fillup", "eofillup", "nodraw", "dodraw", "enfill", "area", -- "addbackground", @@ -178,9 +194,17 @@ return { "setmacro", "setdimen", "setcount", "settoks", "setglobalmacro", "setglobaldimen", "setglobalcount", "setglobaltoks", -- - "positionpath", "positioncurve", "positionxy", "positionpxy", - "positionwhd", "positionpage", "positionregion", "positionbox", + "positionpath", "positioncurve", "positionxy", "positionparagraph", "positioncolumn", + "positionwhd", "positionpage", "positionregion", "positionbox", "positionx", "positiony", "positionanchor", "positioninregion", "positionatanchor", + "positioncolumnbox", "overlaycolumnbox", "positioncolumnatx", + -- + "getposboxes", "getmultipars", + "getpospage", "getposparagraph", "getposcolumn", "getposregion", + "getposx", "getposy", "getposwidth", "getposheight", "getposdepth", + "getposleftskip", "getposrightskip", "getposhsize", "getposparindent", "getposhangindent", "getposhangafter", + "getposxy", "getposupperleft", "getposlowerleft", "getposupperright", "getposlowerright", + "getposllx", "getposlly", "getposurx", "getposury", -- "wdpart", "htpart", "dppart", -- @@ -190,19 +214,30 @@ return { -- "utfnum", "utflen", "utfsub", -- - "newhash", "disposehash", "inhash", "tohash", + "newhash", "disposehash", "inhash", "tohash", "fromhash", -- "isarray", "prefix", "isobject", -- "comment", "report", "lua", "lualist", "mp", "MP", "luacall", -- - "mirrored", "mirroredabout", + "mirrored", "mirroredabout", "xslanted", "yslanted", -- "scriptindex", "newscriptindex", -- "newcolor", "newrgbcolor", "newcmykcolor", "newnumeric", "newboolean", "newtransform", "newpath", "newpicture", "newstring", "newpair", - - "mpvar", + -- + "mpvard", "mpvarn", "mpvars", "mpvar", + -- + "withtolerance", + -- + "hatched", "withdashes", + "processpath", "pencilled", + "sortedintersectiontimes", "intersectionpath", "firstintersectionpath", "secondintersectionpath", + "intersectionsfound", "cutbeforefirst", "cutafterfirst", "cutbeforelast", "cutafterlast", + -- + "xnormalized", "ynormalized", "xynormalized", + "phantom", + "scrutinized", }, } diff --git a/Master/texmf-dist/tex/context/base/mkiv/mult-low.lua b/Master/texmf-dist/tex/context/base/mkiv/mult-low.lua index a893d455c1f..686fbfb7aba 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/mult-low.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/mult-low.lua @@ -14,13 +14,16 @@ return { "zerocount", "minusone", "minustwo", "plusone", "plustwo", "plusthree", "plusfour", "plusfive", "plussix", "plusseven", "pluseight", "plusnine", "plusten", "pluseleven", "plustwelve", "plussixteen", "plusfifty", "plushundred", "plusonehundred", "plustwohundred", "plusfivehundred", - "plusthousand", "plustenthousand", "plustwentythousand", "medcard", "maxcard", "maxcardminusone", + "plusthousand", "plustenthousand", "plustwentythousand", "medcard", "maxcard", "maxcardminusone", "maxiterator", "zeropoint", "onepoint", "halfapoint", "onebasepoint", "maxcount", "maxdimen", "scaledpoint", "thousandpoint", "points", "halfpoint", - "zeroskip", + "zeroskip", "centeringskip", "stretchingskip", "shrinkingskip", + "centeringfillskip", "stretchingfillskip", "shrinkingfillskip", "zeromuskip", "onemuskip", "pluscxxvii", "pluscxxviii", "pluscclv", "pluscclvi", "normalpagebox", + "binaryshiftedten", "binaryshiftedtwenty", "binaryshiftedthirty", + "thickermuskip", -- "directionlefttoright", "directionrighttoleft", -- @@ -28,6 +31,8 @@ return { -- "emptytoks", "empty", "undefined", -- + "prerollrun", + -- "voidbox", "emptybox", "emptyvbox", "emptyhbox", -- "bigskipamount", "medskipamount", "smallskipamount", @@ -61,7 +66,7 @@ return { "tabasciicode", "newlineasciicode", "formfeedasciicode", "endoflineasciicode", "endoffileasciicode", "commaasciicode", "spaceasciicode", "periodasciicode", "hashasciicode", "dollarasciicode", "commentasciicode", "ampersandasciicode", - "colonasciicode", "backslashasciicode", "circumflexasciicode", "underscoreasciicode", + "colonasciicode", "semicolonasciicode", "backslashasciicode", "circumflexasciicode", "underscoreasciicode", "leftbraceasciicode", "barasciicode", "rightbraceasciicode", "tildeasciicode", "delasciicode", "leftparentasciicode", "rightparentasciicode", "lessthanasciicode", "morethanasciicode", "doublecommentsignal", @@ -69,12 +74,13 @@ return { "doublequoteasciicode", "singlequoteasciicode", "forwardslashasciicode", "primeasciicode", "hyphenasciicode", "percentasciicode", "leftbracketasciicode", "rightbracketasciicode", -- - "frozenhsizecode", "frozenskipcode", "frozenhangcode", "frozenindentcode", "frozenparfillcode", - "frozenadjustcode", "frozenprotrudecode", "frozentolerancecode", "frozenstretchcode", - "frozenloosenesscode", "frozenlastlinecode", "frozenlinepenaltycode", "frozenclubpenaltycode", - "frozenwidowpenaltycode", "frozendisplaypenaltycode", "frozenbrokenpenaltycode", - "frozendemeritscode", "frozenshapecode", "frozenlinecode", "frozenhyphenationcode", - "frozenallcode", + "hsizefrozenparcode", "skipfrozenparcode", "hangfrozenparcode", "indentfrozenparcode", "parfillfrozenparcode", + "adjustfrozenparcode", "protrudefrozenparcode", "tolerancefrozenparcode", "stretchfrozenparcode", + "loosenessfrozenparcode", "lastlinefrozenparcode", "linepenaltyfrozenparcode", "clubpenaltyfrozenparcode", + "widowpenaltyfrozenparcode", "displaypenaltyfrozenparcode", "brokenpenaltyfrozenparcode", + "demeritsfrozenparcode", "shapefrozenparcode", "linefrozenparcode", "hyphenationfrozenparcode", + "shapingpenaltyfrozenparcode", "orphanpenaltyfrozenparcode", "allfrozenparcode", + "mathpenaltyfrozenparcode", -- "activemathcharcode", -- @@ -85,17 +91,45 @@ return { "bottomlevelgroupcode", "simplegroupcode", "hboxgroupcode", "adjustedhboxgroupcode", "vboxgroupcode", "vtopgroupcode", "aligngroupcode", "noaligngroupcode", "outputgroupcode", "mathgroupcode", "discretionarygroupcode", "insertgroupcode", "vadjustgroupcode", "vcentergroupcode", "mathabovegroupcode", - "mathchoicegroupcode", "semisimplegroupcode", "mathshiftgroupcode", "mathleftgroupcode", + "mathchoicegroupcode", "alsosimplegroupcode", "semisimplegroupcode", "mathshiftgroupcode", "mathleftgroupcode", "localboxgroupcode", "splitoffgroupcode", "splitkeepgroupcode", "preamblegroupcode", "alignsetgroupcode", "finrowgroupcode", "discretionarygroupcode", -- + "markautomigrationcode", "insertautomigrationcode", "adjustautomigrationcode", "preautomigrationcode", "postautomigrationcode", + -- "charnodecode", "hlistnodecode", "vlistnodecode", "rulenodecode", "insertnodecode", "marknodecode", "adjustnodecode", "ligaturenodecode", "discretionarynodecode", "whatsitnodecode", "mathnodecode", "gluenodecode", "kernnodecode", "penaltynodecode", "unsetnodecode", "mathsnodecode", -- - "charifcode", "catifcode", "numifcode", "dimifcode", "oddifcode", "vmodeifcode", "hmodeifcode", - "mmodeifcode", "innerifcode", "voidifcode", "hboxifcode", "vboxifcode", "xifcode", "eofifcode", - "trueifcode", "falseifcode", "caseifcode", "definedifcode", "csnameifcode", "fontcharifcode", + -- "charifcode", "catifcode", "numifcode", "dimifcode", "oddifcode", "vmodeifcode", "hmodeifcode", + -- "mmodeifcode", "innerifcode", "voidifcode", "hboxifcode", "vboxifcode", "xifcode", "eofifcode", + -- "trueifcode", "falseifcode", "caseifcode", "definedifcode", "csnameifcode", "fontcharifcode", + -- + "overrulemathcontrolcode", "underrulemathcontrolcode", "radicalrulemathcontrolcode", "fractionrulemathcontrolcode", + "accentskewhalfmathcontrolcode", "accentskewapplymathcontrolcode", "applyordinarykernpairmathcontrolcode", + "applyverticalitalickernmathcontrolcode", "applyordinaryitalickernmathcontrolcode", "applycharitalickernmathcontrolcode", + "reboxcharitalickernmathcontrolcode", "applyboxeditalickernmathcontrolcode", "staircasekernmathcontrolcode", + "applytextitalickernmathcontrolcode", "applyscriptitalickernmathcontrolcode", + "checkspaceitalickernmathcontrolcode", "checktextitalickernmathcontrolcode", + "analyzescriptnucleuscharmathcontrolcode", "analyzescriptnucleuslistmathcontrolcode", "analyzescriptnucleusboxmathcontrolcode", + "accenttopskewwithoffsetmathcontrolcode", "ignorekerndimensionsmathcontrolcode", "ignoreflataccentsmathcontrolcode", + "extendaccentsmathcontrolcode", "extenddelimitersmathcontrolcode", + -- + "noligaturingglyphoptioncode", "nokerningglyphoptioncode", "noexpansionglyphoptioncode", "noprotrusionglyphoptioncode", + "noleftkerningglyphoptioncode", "noleftligaturingglyphoptioncode", "norightkerningglyphoptioncode", "norightligaturingglyphoptioncode", + "noitaliccorrectionglyphoptioncode", "islargeoperatorglyphoptioncode", "hasitalicshapeglyphoptioncode", + -- + "normalparcontextcode", "vmodeparcontextcode", "vboxparcontextcode", "vtopparcontextcode", "vcenterparcontextcode", + "vadjustparcontextcode", "insertparcontextcode", "outputparcontextcode", "alignparcontextcode", + "noalignparcontextcode", "spanparcontextcode", "resetparcontextcode", + -- + "leftoriginlistanchorcode", "leftheightlistanchorcode", "leftdepthlistanchorcode", + "rightoriginlistanchorcode", "rightheightlistanchorcode", "rightdepthlistanchorcode", + "centeroriginlistanchorcode", "centerheightlistanchorcode", "centerdepthlistanchorcode", + "halfwaytotallistanchorcode", "halfwayheightlistanchorcode", "halfwaydepthlistanchorcode", + "halfwayleftlistanchorcode", "halfwayrightlistanchorcode", + -- + "negatexlistsigncode", "negateylistsigncode", "negatelistsigncode", -- "fontslantperpoint", "fontinterwordspace", "fontinterwordstretch", "fontinterwordshrink", "fontexheight", "fontemwidth", "fontextraspace", "slantperpoint", @@ -130,14 +164,21 @@ return { -- "typescriptone", "typescripttwo", "typescriptthree", "mathsizesuffix", -- - "mathordcode", "mathopcode", "mathbincode", "mathrelcode", "mathopencode", "mathclosecode", - "mathpunctcode", "mathalphacode", "mathinnercode", "mathnothingcode", "mathlimopcode", - "mathnolopcode", "mathboxcode", "mathchoicecode", "mathaccentcode", "mathradicalcode", + "mathordinarycode", "mathordcode", "mathoperatorcode", "mathopcode", "mathbinarycode", "mathbincode", + "mathrelationcode", "mathrelcode", "mathopencode", "mathclosecode", "mathpunctuationcode", + "mathpunctcode", "mathovercode", "mathundercode", "mathinnercode", "mathradicalcode", + "mathfractioncode", "mathmiddlecode", "mathaccentcode", "mathfencedcode", "mathghostcode", + "mathvariablecode", "mathactivecode", "mathvcentercode", "mathconstructcode", "mathwrappedcode", + "mathbegincode", "mathendcode", "mathexplicitcode", "mathdivisioncode", "mathfactorialcode", + "mathdimensioncode", "mathexperimentalcode", "mathtextpunctuationcode", + "mathimaginarycode", "mathdifferentialcode", "mathexponentialcode", "mathellipsiscode", "mathfunctioncode", "mathdigitcode", + -- "mathtopaccentcode", "mathbottomaccentcode", "mathdelimitercode", "mathrootcode", "mathprintcode", -- + "mathalphacode", "mathboxcode", "mathchoicecode", "mathnothingcode", "mathlimopcode", "mathnolopcode", + "mathunsetcode", "mathunspacedcode", "mathallcode", "mathfakecode", "mathunarycode", + "mathmaybeordinarycode", "mathmayberelationcode", "mathmaybebinarycode", "mathnumbergroupcode", -- "constantnumber", "constantnumberargument", "constantdimen", "constantdimenargument", "constantemptyargument", -- - "continueifinputfile", - -- "luastringsep", "!!bs", "!!es", -- "lefttorightmark", "righttoleftmark", "lrm", "rlm", @@ -148,9 +189,9 @@ return { "twoperemspace", "threeperemspace", "fourperemspace", "fiveperemspace", "sixperemspace", "figurespace", "punctuationspace", "hairspace", "enquad", "emquad", "zerowidthspace", "zerowidthnonjoiner", "zerowidthjoiner", "zwnj", "zwj", - "optionalspace", "asciispacechar", "softhyphen", + "optionalspace", "asciispacechar", "softhyphen", "autoinsertedspace", -- - "Ux", "eUx", "Umathaccents", + "Ux", "eUx", -- "parfillleftskip", "parfillrightskip", -- @@ -158,22 +199,42 @@ return { -- "wildcardsymbol", -- - "normalhyphenationmodecode", "automatichyphenationmodecode", "explicithyphenationmodecode", - "syllablehyphenationmodecode", "uppercasehyphenationmodecode", "completehyphenationmodecode", - "compoundhyphenationmodecode", "strictstarthyphenationmodecode", "strictendhyphenationmodecode", - "automaticpenaltyhyphenationmodecode", "explicitpenaltyhyphenationmodecode", - "permitgluehyphenationmodecode", "permitallhyphenationmodecode", "permitmathreplacehyphenationmodecode", - "forcecheckhyphenationmodecode", "lazyligatureshyphenationmodecode", + "normalhyphenationcode", "automatichyphenationcode", "explicithyphenationcode", "syllablehyphenationcode", "uppercasehyphenationcode", + "collapsehyphenationcode", "compoundhyphenationcode", "strictstarthyphenationcode", "strictendhyphenationcode", + "automaticpenaltyhyphenationcode", "explicitpenaltyhyphenationcode", "permitgluehyphenationcode", "permitallhyphenationcode", + "permitmathreplacehyphenationcode", "forcecheckhyphenationcode", "lazyligatureshyphenationcode", "forcehandlerhyphenationcode", + "feedbackcompoundhyphenationcode", "ignoreboundshyphenationcode", "partialhyphenationcode", "completehyphenationcode", + -- + "normalizelinenormalizecode", "parindentskipnormalizecode", "swaphangindentnormalizecode", "swapparsshapenormalizecode", + "breakafterdirnormalizecode", "removemarginkernsnormalizecode", "clipwidthnormalizecode", "flattendiscretionariesnormalizecode", + "discardzerotabskipsnormalizecode", "flattenhleadersnormalizecode", + -- + "normalizeparnormalizeparcode", "flattenvleadersnormalizeparcode", + -- + "nopreslackclassoptioncode", "nopostslackclassoptioncode", + "lefttopkernclassoptioncode", "righttopkernclassoptioncode", "leftbottomkernclassoptioncode", "rightbottomkernclassoptioncode", + "lookaheadforendclassoptioncode", "noitaliccorrectionclassoptioncode", "defaultmathclassoptions", + -- "openfenceclassoptioncode", "closefenceclassoptioncode", "middlefenceclassoptioncode", + "checkligatureclassoptioncode", "checkitaliccorrectionclassoptioncode", "checkkernpairclassoptioncode", + "flattenclassoptioncode", "omitpenaltyclassoptioncode", "unpackclassoptioncode", "raiseprimeclassoptioncode", + "carryoverlefttopkernclassoptioncode", "carryoverleftbottomkernclassoptioncode", "carryoverrighttopkernclassoptioncode", "carryoverrightbottomkernclassoptioncode", + "preferdelimiterdimensionsclassoptioncode", "autoinjectclassoptioncode", "removeitaliccorrectionclassoptioncode", + "operatoritaliccorrectionclassoptioncode", -- - "normalizelinecode", "parindentskipcode", "swaphangindentcode", "swapparsshapecode", "breakafterdircode", "removemarginkernscode", "clipwidthcode", + "noligaturingglyphoptioncode", "nokerningglyphoptioncode", "noleftligatureglyphoptioncode", + "noleftkernglyphoptioncode", "norightligatureglyphoptioncode", "norightkernglyphoptioncode", + "noexpansionglyphoptioncode", "noprotrusionglyphoptioncode", "noitaliccorrectionglyphoptioncode", + -- extras: + "nokerningcode", "noligaturingcode", -- - "noligaturingcode", "nokerningcode", "noleftligaturecode", "noleftkerncode", "norightligaturecode", "norightkerncode", - "noexpansioncode", "noprotrusioncode", + "frozenflagcode", "tolerantflagcode", "protectedflagcode", "primitiveflagcode", "permanentflagcode", "noalignedflagcode", "immutableflagcode", + "mutableflagcode", "globalflagcode", "overloadedflagcode", "immediateflagcode", "conditionalflagcode", "valueflagcode", "instanceflagcode", -- - "frozenflagcode", "tolerantflagcode", "protectedflagcode", "primitiveflagcode", "permanentflagcode", "noalignedflagcode", "immutableflagcode", "mutableflagcode", - "globalflagcode", "overloadedflagcode", "immediateflagcode", "conditionalflagcode", "valueflagcode", "instanceflagcode", + "ordmathflattencode", "binmathflattencode", "relmathflattencode", "punctmathflattencode", "innermathflattencode", -- - "continuewhenlmtxmode" + "normalworddiscoptioncode", "preworddiscoptioncode", "postworddiscoptioncode", + -- + "continueifinputfile", "continuewhenlmtxmode", "continuewhenmkivmode", }, ["helpers"] = { -- @@ -201,6 +262,9 @@ return { "newcount", "newdimen", "newskip", "newmuskip", "newbox", "newtoks", "newread", "newwrite", "newmarks", "newinsert", "newattribute", "newif", "newlanguage", "newfamily", "newfam", "newhelp", -- not used -- + "newinteger", "newdimension", "newgluespec", "newmugluespec", + "aliasinteger", "aliasdimension", + -- "then", "begcsname", -- @@ -221,11 +285,12 @@ return { -- "doglobal", "dodoglobal", "redoglobal", "resetglobal", -- - "donothing", "dontcomplain", "forgetall", + "donothing", "untraceddonothing", "dontcomplain", "moreboxtracing", "lessboxtracing", "noboxtracing", "forgetall", -- "donetrue", "donefalse", "foundtrue", "foundfalse", -- - "inlineordisplaymath","indisplaymath","forcedisplaymath","startforceddisplaymath","stopforceddisplaymath","startpickupmath","stoppickupmath","reqno", + "inlineordisplaymath", "indisplaymath", "forcedisplaymath", "startforceddisplaymath", "stopforceddisplaymath", + "startpickupmath", "stoppickupmath", "reqno", "forceinlinemath", -- "mathortext", -- @@ -243,10 +308,13 @@ return { -- "hglue", "vglue", "hfillneg", "vfillneg", "hfilllneg", "vfilllneg", -- + "hsplit", + -- "ruledhss", "ruledhfil", "ruledhfill", "ruledhfilll", "ruledhfilneg", "ruledhfillneg", "normalhfillneg", "normalhfilllneg", "ruledvss", "ruledvfil", "ruledvfill", "ruledvfilll", "ruledvfilneg", "ruledvfillneg", "normalvfillneg", "normalvfilllneg", - "ruledhbox", "ruledvbox", "ruledvtop", "ruledvcenter", "ruledmbox", - "ruledhpack", "ruledvpack", "ruledtpack", + "ruledhbox", "ruledvbox", "ruledvtop", "ruleddbox", "ruledvcenter", "ruledmbox", + "ruledhpack", "ruledvpack", "ruledtpack", "ruleddpack", + "ruledvsplit", "ruledtsplit", "ruleddsplit", "ruledhskip", "ruledvskip", "ruledkern", "ruledmskip", "ruledmkern", "ruledhglue", "ruledvglue", "normalhglue", "normalvglue", "ruledpenalty", @@ -270,7 +338,9 @@ return { -- "groupedcommand", "groupedcommandcs", "triggergroupedcommand", "triggergroupedcommandcs", - "simplegroupedcommand", "pickupgroupedcommand", + "simplegroupedcommand", "simplegroupedcommandcs", + "pickupgroupedcommand", "pickupgroupedcommandcs", + "mathgroupedcommandcs", -- "usedbaselineskip", "usedlineskip", "usedlineskiplimit", -- @@ -283,7 +353,7 @@ return { -- "givenwidth", "givenheight", "givendepth", "scangivendimensions", -- - "scratchwidth", "scratchheight", "scratchdepth", "scratchoffset", "scratchdistance", "scratchtotal", + "scratchwidth", "scratchheight", "scratchdepth", "scratchoffset", "scratchdistance", "scratchtotal", "scratchitalic", "scratchhsize", "scratchvsize", "scratchxoffset", "scratchyoffset", "scratchhoffset", "scratchvoffset", "scratchxposition", "scratchyposition", @@ -333,7 +403,7 @@ return { -- "quitcondition", "truecondition", "falsecondition", -- - "tracingall", "tracingnone", "loggingall", + "tracingall", "tracingnone", "loggingall", "tracingcatcodes", "showluatokens", -- "aliasmacro", @@ -372,7 +442,8 @@ return { -- "getparameters", "geteparameters", "getgparameters", "getxparameters", "forgetparameters", "copyparameters", -- - "getdummyparameters", "dummyparameter", "directdummyparameter", "setdummyparameter", "letdummyparameter", "setexpandeddummyparameter", + "getdummyparameters", "dummyparameter", "directdummyparameter", "setdummyparameter", "letdummyparameter", + "setexpandeddummyparameter", "resetdummyparameter", "usedummystyleandcolor", "usedummystyleparameter", "usedummycolorparameter", -- "processcommalist", "processcommacommand", "quitcommalist", "quitprevcommalist", @@ -400,8 +471,7 @@ return { "newconstant", "setnewconstant", "setconstant", "setconstantvalue", "newconditional", "settrue", "setfalse", "settruevalue", "setfalsevalue", "setconditional", -- - "newmacro", "setnewmacro", "newfraction", - "newsignal", + "newmacro", "setnewmacro", "newfraction", "newsignal", "newboundary", -- "dosingleempty", "dodoubleempty", "dotripleempty", "doquadrupleempty", "doquintupleempty", "dosixtupleempty", "doseventupleempty", "dosingleargument", "dodoubleargument", "dotripleargument", "doquadrupleargument", "doquintupleargument", "dosixtupleargument", "doseventupleargument", @@ -414,6 +484,8 @@ return { -- "getfirstcharacter", "doifelsefirstchar", "doiffirstcharelse", -- + "mathclassvalue", + -- "startnointerference", "stopnointerference", -- "twodigits","threedigits", @@ -425,42 +497,68 @@ return { "strut", "halfstrut", "quarterstrut", "depthstrut", "halflinestrut", "noheightstrut", "setstrut", "strutbox", "strutht", "strutdp", "strutwd", "struthtdp", "strutgap", "begstrut", "endstrut", "lineheight", "leftboundary", "rightboundary", "signalcharacter", -- - "shiftbox", "vpackbox", "hpackbox", "vpackedbox", "hpackedbox", - -- - "ordordspacing", "ordopspacing", "ordbinspacing", "ordrelspacing", - "ordopenspacing", "ordclosespacing", "ordpunctspacing", "ordinnerspacing", - -- - "opordspacing", "opopspacing", "opbinspacing", "oprelspacing", - "opopenspacing", "opclosespacing", "oppunctspacing", "opinnerspacing", - -- - "binordspacing", "binopspacing", "binbinspacing", "binrelspacing", - "binopenspacing", "binclosespacing", "binpunctspacing", "bininnerspacing", - -- - "relordspacing", "relopspacing", "relbinspacing", "relrelspacing", - "relopenspacing", "relclosespacing", "relpunctspacing", "relinnerspacing", - -- - "openordspacing", "openopspacing", "openbinspacing", "openrelspacing", - "openopenspacing", "openclosespacing", "openpunctspacing", "openinnerspacing", + "aligncontentleft", "aligncontentmiddle", "aligncontentright", -- - "closeordspacing", "closeopspacing", "closebinspacing", "closerelspacing", - "closeopenspacing", "closeclosespacing", "closepunctspacing", "closeinnerspacing", - -- - "punctordspacing", "punctopspacing", "punctbinspacing", "punctrelspacing", - "punctopenspacing", "punctclosespacing", "punctpunctspacing", "punctinnerspacing", + "shiftbox", "vpackbox", "hpackbox", "vpackedbox", "hpackedbox", -- - "innerordspacing", "inneropspacing", "innerbinspacing", "innerrelspacing", - "inneropenspacing", "innerclosespacing", "innerpunctspacing", "innerinnerspacing", + -- "ordordspacing", "ordopspacing", "ordbinspacing", "ordrelspacing", + -- "ordopenspacing", "ordclosespacing", "ordpunctspacing", "ordinnerspacing", + -- "ordfracspacing", "ordradspacing", "ordmiddlespacing", "ordaccentspacing", + -- -- + -- "opordspacing", "opopspacing", "opbinspacing", "oprelspacing", + -- "opopenspacing", "opclosespacing", "oppunctspacing", "opinnerspacing", + -- "opfracspacing", "opradspacing", "opmiddlespacing", "opaccentspacing", + -- -- + -- "binordspacing", "binopspacing", "binbinspacing", "binrelspacing", + -- "binopenspacing", "binclosespacing", "binpunctspacing", "bininnerspacing", + -- "binfracspacing", "binradspacing", "binmiddlespacing", "binaccentspacing", + -- -- + -- "relordspacing", "relopspacing", "relbinspacing", "relrelspacing", + -- "relopenspacing", "relclosespacing", "relpunctspacing", "relinnerspacing", + -- "relfracspacing", "relradspacing", "relmiddlespacing", "relaccentspacing", + -- -- + -- "openordspacing", "openopspacing", "openbinspacing", "openrelspacing", + -- "openopenspacing", "openclosespacing", "openpunctspacing", "openinnerspacing", + -- "openfracspacing", "openradspacing", "openmiddlespacing", "openaccentspacing", + -- -- + -- "closeordspacing", "closeopspacing", "closebinspacing", "closerelspacing", + -- "closeopenspacing", "closeclosespacing", "closepunctspacing", "closeinnerspacing", + -- "closefracspacing", "closeradspacing", "closemiddlespacing", "closeaccentspacing", + -- -- + -- "punctordspacing", "punctopspacing", "punctbinspacing", "punctrelspacing", + -- "punctopenspacing", "punctclosespacing", "punctpunctspacing", "punctinnerspacing", + -- "punctfracspacing", "punctradspacing", "punctmiddlespacing", "punctaccentspacing", + -- -- + -- "innerordspacing", "inneropspacing", "innerbinspacing", "innerrelspacing", + -- "inneropenspacing", "innerclosespacing", "innerpunctspacing", "innerinnerspacing", + -- "innerfracspacing", "innerradspacing", "innermiddlespacing", "inneraccentspacing", + -- -- + -- "fracordspacing", "fracopspacing", "fracbinspacing", "fracrelspacing", + -- "fracopenspacing", "fracclosespacing", "fracpunctspacing", "fracinnerspacing", + -- "fracfracspacing", "fracradspacing", "fracmiddlespacing", "fracaccentspacing", + -- -- + -- "radordspacing", "radopspacing", "radbinspacing", "radrelspacing", + -- "radopenspacing", "radclosespacing", "radpunctspacing", "radinnerspacing", + -- "radfracspacing", "radradspacing", "radmiddlespacing", "radaccentspacing", + -- -- + -- "middleordspacing", "middleopspacing", "middlebinspacing", "middlerelspacing", + -- "middleopenspacing", "middleclosespacing", "middlepunctspacing", "middleinnerspacing", + -- "middlefracspacing", "middleradspacing", "middlemiddlespacing", "middleaccentspacing", + -- -- + -- "accentordspacing", "accentopspacing", "accentbinspacing", "accentrelspacing", + -- "accentopenspacing", "accentclosespacing", "accentpunctspacing", "accentinnerspacing", + -- "accentfracspacing", "accentradspacing", "accentmiddlespacing", "accentaccentspacing", -- "normalreqno", -- "startimath", "stopimath", "normalstartimath", "normalstopimath", "startdmath", "stopdmath", "normalstartdmath", "normalstopdmath", - "normalsuperscript", "normalsubscript", "normalnosuperscript", "normalnosubscript", - "superscript", "subscript", "nosuperscript", "nosubscript", + "normalsuperscript", "normalsubscript", "normalnosuperscript", "normalnosubscript", "normalprimescript", + "superscript", "subscript", "nosuperscript", "nosubscript", "primescript", "superprescript", "subprescript", "nosuperprescript", "nosubsprecript", -- "uncramped", "cramped", - "mathstyletrigger", "triggermathstyle", + "mathstyletrigger", "triggermathstyle", "triggeredmathstyle", "mathstylefont", "mathsmallstylefont", "mathstyleface", "mathsmallstyleface", "mathstylecommand", "mathpalette", "mathstylehbox", "mathstylevbox", "mathstylevcenter", "mathstylevcenteredhbox", "mathstylevcenteredvbox", "mathtext", "setmathsmalltextbox", "setmathtextbox", @@ -499,8 +597,6 @@ return { -- "assumelongusagecs", -- - "Umathbotaccent", "Umathtopaccent", - -- "righttolefthbox", "lefttorighthbox", "righttoleftvbox", "lefttorightvbox", "righttoleftvtop", "lefttorightvtop", "rtlhbox", "ltrhbox", "rtlvbox", "ltrvbox", "rtlvtop", "ltrvtop", "autodirhbox", "autodirvbox", "autodirvtop", @@ -508,8 +604,9 @@ return { "lefttoright", "righttoleft", "checkedlefttoright", "checkedrighttoleft", "synchronizelayoutdirection","synchronizedisplaydirection","synchronizeinlinedirection", "dirlre", "dirrle", "dirlro", "dirrlo", + "rtltext", "ltrtext", -- - "lesshyphens", "morehyphens", "nohyphens", "dohyphens", + "lesshyphens", "morehyphens", "nohyphens", "dohyphens", "dohyphencollapsing", "nohyphencollapsing", "compounddiscretionary", -- "Ucheckedstartdisplaymath", "Ucheckedstopdisplaymath", @@ -548,7 +645,7 @@ return { "prelistbox", "postlistbox", "prelistcopy", "postlistcopy", "setprelistbox", "setpostlistbox", -- "noligaturing", "nokerning", "noexpansion", "noprotrusion", - "noleftkerning", "noleftligaturing", "norightkerning", "norightligaturing", + "noleftkerning", "noleftligaturing", "norightkerning", "norightligaturing", "noitaliccorrection", -- "futureletnexttoken", "defbackslashbreak", "letbackslashbreak", -- @@ -556,8 +653,16 @@ return { -- "suggestedalias", -- + "showboxhere", + -- + "discoptioncodestring", "flagcodestring", "frozenparcodestring", "glyphoptioncodestring", "groupcodestring", + "hyphenationcodestring", "mathcontrolcodestring", "mathflattencodestring", "normalizecodestring", + "parcontextcodestring", + -- "newlocalcount", "newlocaldimen", "newlocalskip", "newlocalmuskip", "newlocaltoks", "newlocalbox", "newlocalwrite", "newlocalread", "setnewlocalcount", "setnewlocaldimen", "setnewlocalskip", "setnewlocalmuskip", "setnewlocaltoks", "setnewlocalbox", + -- + "ifexpression" } } diff --git a/Master/texmf-dist/tex/context/base/mkiv/mult-mps.lua b/Master/texmf-dist/tex/context/base/mkiv/mult-mps.lua index a2a74b3b316..008bcbb9fbf 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/mult-mps.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/mult-mps.lua @@ -3,10 +3,10 @@ return { "btex", "etex", "verbatimtex", }, shortcuts = { - "..", "...", "--", "---", "&", "\\", + "..", "...", "--", "---", "&", "&&", "\\", }, primitives = { -- to be checked - "charcode", "day", "linecap", "linejoin", "miterlimit", "month", "pausing", + "charcode", "day", "linecap", "linejoin", "miterlimit", "stacking", "month", "pausing", "prologues", "showstopping", "time", "tracingcapsules", "tracingchoices", "mpprocset", "tracingcommands", "tracingequations", "tracinglostchars", "tracingmacros", "tracingonline", "tracingoutput", "tracingrestores", @@ -30,7 +30,7 @@ return { "def", "vardef", "enddef", "expr", "suffix", "text", "primary", "secondary", "tertiary", "primarydef", "secondarydef", "tertiarydef", "randomseed", "also", "contour", "doublepath", - "withcolor", "withcmykcolor", "withpen", + "withcolor", "withcmykcolor", "withpen", "withstacking", "dashed", "envelope", "if", "else", "elseif", "fi", "for", "endfor", "forever", "exitif", "within", @@ -50,7 +50,7 @@ return { "message", "delimiters", "turningnumber", "errmessage", "scantokens", "end", "outer", "inner", "write", "to", "readfrom", "closefrom", "withprescript", "withpostscript", - "top", "bot", "lft", "rt", "ulft", "urt", "llft", "lrt", + -- "top", "bot", "lft", "rt", "ulft", "urt", "llft", "lrt", -- "redpart", "greenpart", "bluepart", "cyanpart", "magentapart", "yellowpart", @@ -58,7 +58,7 @@ return { "prescriptpart", "postscriptpart", "rgbcolor", "cmykcolor", -- "greycolor", "graycolor", "colormodel", "graypart", "greypart", "greycolor", "graycolor", - "dashpart", "penpart", + "dashpart", "penpart", "stackingpart", -- "colorpart", "stroked", "filled", "textual", "clipped", "bounded", "pathpart", "expandafter", @@ -68,6 +68,15 @@ return { -- "runscript", "maketext", "numbersystem", "overloadmode", "setproperty", + -- + "intersectiontimeslist", "arcpoint", "arcpointlist", "subarclength", "maxknotpool", "nocycle", + "pathpoint", "pathprecontrol", "pathpostcontrol", "pathdirection", + "deltapoint", "deltaprecontrol", "deltapostcontrol", "deltadirection", + "corner", "xrange", "yrange", + "convexed", "uncontrolled", + "nep", "makenep", + "withmiterlimit", "withlinejoin", "withlinecap", + "centerof", "centerofmass", }, commands = { "on", "off", @@ -84,7 +93,8 @@ return { "pensquare", "penrazor", "penspec", "origin", "quartercircle", "right", "unitsquare", "up", "withdots", - "abs", "bbox", "ceiling", "center", "cutafter", "cutbefore", "dir", + "abs", "bbox", "ceiling", "cutafter", "cutbefore", "dir", + -- "center", "directionpoint", "div", "dotprod", "intersectionpoint", "inverse", "mod", "round", "unitvector", "whatever", "cutdraw", "draw", "drawarrow", "drawdblarrow", "fill", "filldraw", "drawdot", @@ -117,13 +127,15 @@ return { -- "red", "green", "blue", "cyan", "magenta", "yellow", "black", "white", "background", -- - "mm", "pt", "dd", "bp", "cm", "pc", "cc", "in", + "mm", "pt", "dd", "bp", "cm", "pc", "cc", "in", "dk", -- - "triplet", "quadruplet", "totransform", "bymatrix", + "triplet", "quadruplet", "totransform", "bymatrix", "closedcurve", "closedlines", -- "primitive", "permanent", "immutable", "mutable", "frozen", -- "showproperty", "showhashentry", + -- + "top", "bot", "lft", "rt", "ulft", "urt", "llft", "lrt", }, internals = { -- we need to remove duplicates above -- diff --git a/Master/texmf-dist/tex/context/base/mkiv/mult-prm.lua b/Master/texmf-dist/tex/context/base/mkiv/mult-prm.lua index 250a5dfc18d..72da8971821 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/mult-prm.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/mult-prm.lua @@ -32,14 +32,11 @@ return { "iffontchar", "interactionmode", "interlinepenalties", - "lastchkdim", - "lastchknum", "lastlinefit", "lastnodetype", "marks", "muexpr", "mutoglue", - "numericscale", "numexpr", "pagediscards", "parshapedimen", @@ -57,7 +54,6 @@ return { "splitdiscards", "splitfirstmarks", "topmarks", - "tracingalignments", "tracingassigns", "tracinggroups", "tracingifs", @@ -67,165 +63,180 @@ return { "widowpenalties", }, ["luatex"]={ - "UUskewed", - "UUskewedwithdelims", "Uabove", "Uabovewithdelims", "Uatop", "Uatopwithdelims", "Uchar", "Udelcode", - "Udelcodenum", + "Udelimited", "Udelimiter", "Udelimiterover", "Udelimiterunder", "Uhextensible", "Uleft", "Umathaccent", + "Umathaccentbasedepth", "Umathaccentbaseheight", + "Umathaccentbottomovershoot", + "Umathaccentbottomshiftdown", + "Umathaccentextendmargin", + "Umathaccentsuperscriptdrop", + "Umathaccentsuperscriptpercent", + "Umathaccenttopovershoot", + "Umathaccenttopshiftup", + "Umathaccentvariant", + "Umathadapttoleft", + "Umathadapttoright", "Umathaxis", - "Umathbinbinspacing", - "Umathbinclosespacing", - "Umathbininnerspacing", - "Umathbinopenspacing", - "Umathbinopspacing", - "Umathbinordspacing", - "Umathbinpunctspacing", - "Umathbinrelspacing", + "Umathbottomaccentvariant", "Umathchar", "Umathcharclass", "Umathchardef", "Umathcharfam", - "Umathcharnum", - "Umathcharnumdef", "Umathcharslot", "Umathclass", - "Umathclosebinspacing", - "Umathcloseclosespacing", - "Umathcloseinnerspacing", - "Umathcloseopenspacing", - "Umathcloseopspacing", - "Umathcloseordspacing", - "Umathclosepunctspacing", - "Umathcloserelspacing", "Umathcode", - "Umathcodenum", "Umathconnectoroverlapmin", + "Umathdegreevariant", + "Umathdelimiterovervariant", + "Umathdelimiterpercent", + "Umathdelimitershortfall", + "Umathdelimiterundervariant", + "Umathdenominatorvariant", + "Umathdict", + "Umathdictdef", + "Umathdiscretionary", + "Umathextrasubpreshift", + "Umathextrasubprespace", + "Umathextrasubshift", + "Umathextrasubspace", + "Umathextrasuppreshift", + "Umathextrasupprespace", + "Umathextrasupshift", + "Umathextrasupspace", + "Umathflattenedaccentbasedepth", + "Umathflattenedaccentbaseheight", + "Umathflattenedaccentbottomshiftdown", + "Umathflattenedaccenttopshiftup", "Umathfractiondelsize", "Umathfractiondenomdown", "Umathfractiondenomvgap", "Umathfractionnumup", "Umathfractionnumvgap", "Umathfractionrule", - "Umathinnerbinspacing", - "Umathinnerclosespacing", - "Umathinnerinnerspacing", - "Umathinneropenspacing", - "Umathinneropspacing", - "Umathinnerordspacing", - "Umathinnerpunctspacing", - "Umathinnerrelspacing", + "Umathfractionvariant", + "Umathhextensiblevariant", "Umathlimitabovebgap", "Umathlimitabovekern", "Umathlimitabovevgap", "Umathlimitbelowbgap", "Umathlimitbelowkern", "Umathlimitbelowvgap", + "Umathlimits", + "Umathnoaxis", + "Umathnolimits", "Umathnolimitsubfactor", "Umathnolimitsupfactor", - "Umathopbinspacing", - "Umathopclosespacing", - "Umathopenbinspacing", - "Umathopenclosespacing", - "Umathopeninnerspacing", - "Umathopenopenspacing", - "Umathopenopspacing", - "Umathopenordspacing", - "Umathopenpunctspacing", - "Umathopenrelspacing", + "Umathnumeratorvariant", + "Umathopenupdepth", + "Umathopenupheight", "Umathoperatorsize", - "Umathopinnerspacing", - "Umathopopenspacing", - "Umathopopspacing", - "Umathopordspacing", - "Umathoppunctspacing", - "Umathoprelspacing", - "Umathordbinspacing", - "Umathordclosespacing", - "Umathordinnerspacing", - "Umathordopenspacing", - "Umathordopspacing", - "Umathordordspacing", - "Umathordpunctspacing", - "Umathordrelspacing", "Umathoverbarkern", "Umathoverbarrule", "Umathoverbarvgap", "Umathoverdelimiterbgap", + "Umathoverdelimitervariant", "Umathoverdelimitervgap", - "Umathpunctbinspacing", - "Umathpunctclosespacing", - "Umathpunctinnerspacing", - "Umathpunctopenspacing", - "Umathpunctopspacing", - "Umathpunctordspacing", - "Umathpunctpunctspacing", - "Umathpunctrelspacing", + "Umathoverlayaccentvariant", + "Umathoverlinevariant", + "Umathphantom", + "Umathpresubshiftdistance", + "Umathpresupshiftdistance", + "Umathprimeraise", + "Umathprimeraisecomposed", + "Umathprimeshiftdrop", + "Umathprimeshiftup", + "Umathprimespaceafter", + "Umathprimevariant", + "Umathprimewidth", "Umathquad", "Umathradicaldegreeafter", "Umathradicaldegreebefore", "Umathradicaldegreeraise", + "Umathradicalextensibleafter", + "Umathradicalextensiblebefore", "Umathradicalkern", "Umathradicalrule", + "Umathradicalvariant", "Umathradicalvgap", - "Umathrelbinspacing", - "Umathrelclosespacing", - "Umathrelinnerspacing", - "Umathrelopenspacing", - "Umathrelopspacing", - "Umathrelordspacing", - "Umathrelpunctspacing", - "Umathrelrelspacing", + "Umathruledepth", + "Umathruleheight", + "Umathskeweddelimitertolerance", "Umathskewedfractionhgap", "Umathskewedfractionvgap", + "Umathsource", "Umathspaceafterscript", "Umathspacebeforescript", - "Umathspacingmode", "Umathstackdenomdown", "Umathstacknumup", + "Umathstackvariant", "Umathstackvgap", + "Umathsubscriptvariant", + "Umathsubshiftdistance", "Umathsubshiftdown", "Umathsubshiftdrop", "Umathsubsupshiftdown", "Umathsubsupvgap", "Umathsubtopmax", "Umathsupbottommin", + "Umathsuperscriptvariant", + "Umathsupshiftdistance", "Umathsupshiftdrop", "Umathsupshiftup", "Umathsupsubbottommax", + "Umathtopaccentvariant", "Umathunderbarkern", "Umathunderbarrule", "Umathunderbarvgap", "Umathunderdelimiterbgap", + "Umathunderdelimitervariant", "Umathunderdelimitervgap", + "Umathunderlinevariant", + "Umathuseaxis", + "Umathvextensiblevariant", + "Umathvoid", + "Umathxscale", + "Umathyscale", "Umiddle", "Unosubprescript", "Unosubscript", "Unosuperprescript", "Unosuperscript", + "Uoperator", "Uover", "Uoverdelimiter", "Uoverwithdelims", + "Uprimescript", "Uradical", "Uright", "Uroot", + "Urooted", + "Ushiftedsubprescript", + "Ushiftedsubscript", + "Ushiftedsuperprescript", + "Ushiftedsuperscript", "Uskewed", "Uskewedwithdelims", "Ustack", "Ustartdisplaymath", "Ustartmath", + "Ustartmathmode", "Ustopdisplaymath", "Ustopmath", + "Ustopmathmode", + "Ustretched", + "Ustretchedwithdelims", "Ustyle", "Usubprescript", "Usubscript", @@ -240,8 +251,22 @@ return { "afterassigned", "aftergrouped", "aliased", + "aligncontent", "alignmark", + "alignmentcellsource", + "alignmentwrapsource", "aligntab", + "allcrampedstyles", + "alldisplaystyles", + "allmainstyles", + "allmathstyles", + "allscriptscriptstyles", + "allscriptstyles", + "allsplitstyles", + "alltextstyles", + "alluncrampedstyles", + "allunsplitstyles", + "amcode", "atendofgroup", "atendofgrouped", "attribute", @@ -249,48 +274,96 @@ return { "automaticdiscretionary", "automatichyphenpenalty", "automigrationmode", + "autoparagraphmode", "begincsname", "beginlocalcontrol", + "beginmathgroup", + "beginsimplegroup", "boundary", + "boxadapt", + "boxanchor", + "boxanchors", "boxattribute", "boxdirection", + "boxfreeze", + "boxgeometry", "boxorientation", + "boxrepack", + "boxshift", + "boxsource", + "boxtarget", "boxtotal", + "boxvadjust", "boxxmove", "boxxoffset", "boxymove", "boxyoffset", "catcodetable", + "cdef", + "cdefcsname", + "cfcode", "clearmarks", + "constant", + "copymathatomrule", + "copymathparent", + "copymathspacing", "crampeddisplaystyle", "crampedscriptscriptstyle", "crampedscriptstyle", "crampedtextstyle", + "csactive", "csstring", + "currentloopiterator", + "currentloopnesting", + "currentmarks", + "dbox", "defcsname", + "detokenized", "dimensiondef", + "dimexpression", "directlua", + "dpack", + "dsplit", "edefcsname", "efcode", "endlocalcontrol", + "endmathgroup", + "endsimplegroup", "enforced", + "etoks", "etoksapp", "etokspre", + "everybeforepar", + "everymathatom", "everytab", "exceptionpenalty", "expand", + "expandactive", "expandafterpars", "expandafterspaces", "expandcstoken", "expanded", + "expandedafter", + "expandedloop", "expandtoken", "explicitdiscretionary", "explicithyphenpenalty", "firstvalidlanguage", + "flushmarks", + "fontcharta", "fontid", + "fontmathcontrol", + "fontspecdef", + "fontspecid", + "fontspecifiedname", "fontspecifiedsize", + "fontspecscale", + "fontspecxscale", + "fontspecyscale", + "fonttextcontrol", "formatname", "frozen", + "futurecsname", "futuredef", "futureexpand", "futureexpandis", @@ -299,7 +372,9 @@ return { "gleaders", "glet", "gletcsname", + "glettonothing", "gluespecdef", + "glyph", "glyphdatafield", "glyphoptions", "glyphscale", @@ -310,11 +385,16 @@ return { "glyphtextscale", "glyphxoffset", "glyphxscale", + "glyphxscaled", "glyphyoffset", "glyphyscale", + "glyphyscaled", "gtoksapp", "gtokspre", + "hccode", "hjcode", + "hmcode", + "holdingmigrations", "hpack", "hyphenationmin", "hyphenationmode", @@ -323,51 +403,95 @@ return { "ifarguments", "ifboolean", "ifchkdim", + "ifchkdimension", "ifchknum", + "ifchknumber", "ifcmpdim", "ifcmpnum", "ifcondition", "ifcstok", + "ifdimexpression", "ifdimval", "ifempty", "ifflags", + "ifhaschar", "ifhastok", "ifhastoks", "ifhasxtoks", "ifincsname", + "ifinsert", "ifmathparameter", "ifmathstyle", + "ifnumexpression", "ifnumval", "ifparameter", "ifparameters", "ifrelax", "iftok", + "ifzerodim", + "ifzeronum", "ignorearguments", + "ignoredepthcriterium", "ignorepars", "immediate", "immutable", + "indexofcharacter", + "indexofregister", + "inherited", "initcatcodetable", + "insertbox", + "insertcopy", + "insertdepth", + "insertdistance", + "insertheight", "insertheights", - "insertht", + "insertlimit", + "insertmaxdepth", + "insertmode", + "insertmultiplier", + "insertpenalty", + "insertprogress", + "insertstorage", + "insertstoring", + "insertunbox", + "insertuncopy", + "insertwidth", "instance", "integerdef", "lastarguments", + "lastatomclass", + "lastboundary", + "lastchkdim", + "lastchknum", + "lastleftclass", + "lastloopiterator", "lastnamedcs", "lastnodesubtype", + "lastpageextra", + "lastparcontext", + "lastrightclass", "leftmarginkern", "letcharcode", "letcsname", "letfrozen", + "letmathatomrule", + "letmathparent", + "letmathspacing", "letprotected", + "lettonothing", + "linebreakcriterium", "linedirection", - "linepar", - "listcallbackmode", "localbrokenpenalty", "localcontrol", "localcontrolled", + "localcontrolledloop", "localinterlinepenalty", "localleftbox", + "localleftboxbox", + "localmiddlebox", + "localmiddleboxbox", "localrightbox", + "localrightboxbox", "lpcode", "luabytecode", "luabytecodecall", @@ -379,77 +503,185 @@ return { "luatexbanner", "luatexrevision", "luatexversion", - "mathdelimitersmode", + "mathaccent", + "mathatom", + "mathatomglue", + "mathatomskip", + "mathbackwardpenalties", + "mathbeginclass", + "mathbinary", + "mathcheckfencesmode", + "mathclose", + "mathdictgroup", + "mathdictproperties", "mathdirection", + "mathdisplaymode", "mathdisplayskipmode", + "mathdoublescriptmode", + "mathendclass", "matheqnogapstep", - "mathflattenmode", - "mathitalicsmode", + "mathfenced", + "mathfontcontrol", + "mathforwardpenalties", + "mathfraction", + "mathghost", + "mathgluemode", + "mathgroupingmode", + "mathinner", + "mathleftclass", + "mathlimitsmode", + "mathmainstyle", + "mathmiddle", "mathnolimitsmode", + "mathopen", + "mathoperator", + "mathordinary", + "mathoverline", "mathpenaltiesmode", + "mathpunctuation", + "mathradical", + "mathrelation", + "mathrightclass", "mathrulesfam", "mathrulesmode", - "mathrulethicknessmode", "mathscale", - "mathscriptboxmode", - "mathscriptcharmode", "mathscriptsmode", + "mathslackmode", + "mathspacingmode", + "mathstackstyle", "mathstyle", + "mathstylefontid", "mathsurroundmode", "mathsurroundskip", + "maththreshold", + "mathunderline", + "meaningasis", + "meaningfull", + "meaningless", "mugluespecdef", "mutable", "noaligned", + "noatomruling", "noboundary", "nohrule", "norelax", "normalizelinemode", + "normalizeparmode", "nospaces", "novrule", + "numericscale", + "numexpression", "orelse", + "orphanpenalties", + "orphanpenalty", "orunless", "outputbox", "overloaded", "overloadmode", + "overshoot", + "pageboundary", + "pageextragoal", + "pagevsize", "parametercount", - "parattr", + "parametermark", + "parattribute", "pardirection", "permanent", + "pettymuskip", "postexhyphenchar", "posthyphenchar", + "postinlinepenalty", "prebinoppenalty", "predisplaygapfactor", "preexhyphenchar", "prehyphenchar", + "preinlinepenalty", "prerelpenalty", "protrudechars", "protrusionboundary", "pxdimen", + "quitloop", "quitvmode", + "resetmathspacing", + "retokenized", "rightmarginkern", "rpcode", "savecatcodetable", + "scaledemwidth", + "scaledexheight", + "scaledextraspace", + "scaledfontdimen", + "scaledinterwordshrink", + "scaledinterwordspace", + "scaledinterwordstretch", + "scaledmathstyle", + "scaledslantperpoint", "scantextokens", + "semiexpand", + "semiexpanded", + "semiprotected", + "setdefaultmathcodes", "setfontid", + "setmathatomrule", + "setmathdisplaypostpenalty", + "setmathdisplayprepenalty", + "setmathignore", + "setmathoptions", + "setmathpostpenalty", + "setmathprepenalty", + "setmathspacing", + "shapingpenaltiesmode", + "shapingpenalty", "snapshotpar", + "srule", "supmarkmode", "swapcsvalues", + "tabsize", "textdirection", "thewithoutunit", + "tinymuskip", + "todimension", + "tohexadecimal", + "tointeger", "tokenized", "toksapp", "tokspre", "tolerant", + "tomathstyle", + "toscaled", + "tosparsedimension", + "tosparsescaled", "tpack", + "tracingadjusts", + "tracingalignments", + "tracingexpressions", "tracingfonts", + "tracingfullboxes", + "tracinghyphenation", + "tracinginserts", + "tracinglevels", + "tracinglists", + "tracingmarks", "tracingmath", + "tracingnodes", + "tracingpenalties", + "tsplit", + "uleaders", "undent", + "unexpandedloop", + "unhpack", "unletfrozen", "unletprotected", + "untraced", + "unvpack", + "variablefam", + "virtualhrule", + "virtualvrule", "vpack", "wordboundary", "wrapuppar", "xdefcsname", + "xtoks", "xtoksapp", "xtokspre", }, @@ -523,6 +755,7 @@ return { "pdfobjcompresslevel", "pdfomitcharset", "pdfomitcidset", + "pdfomitinfodict", "pdfoutline", "pdfoutput", "pdfpageattr", @@ -583,6 +816,7 @@ return { "accent", "adjdemerits", "advance", + "advanceby", "afterassignment", "aftergroup", "atop", @@ -627,6 +861,7 @@ return { "displaywidowpenalty", "displaywidth", "divide", + "divideby", "doublehyphendemerits", "dp", "dump", @@ -662,12 +897,10 @@ return { "font", "fontdimen", "fontname", - "fontspecifiedname", "futurelet", "gdef", "global", "globaldefs", - "glyph", "halign", "hangafter", "hangindent", @@ -732,16 +965,12 @@ return { "lower", "lowercase", "mark", - "mathaccent", "mathbin", "mathchar", "mathchardef", "mathchoice", - "mathclose", "mathcode", - "mathinner", "mathop", - "mathopen", "mathord", "mathpunct", "mathrel", @@ -749,8 +978,6 @@ return { "maxdeadcycles", "maxdepth", "meaning", - "meaningfull", - "meaningless", "medmuskip", "message", "middle", @@ -760,6 +987,7 @@ return { "moveright", "mskip", "multiply", + "multiplyby", "muskip", "muskipdef", "newlinechar", @@ -774,14 +1002,12 @@ return { "number", "omit", "or", - "ordlimits", "outer", "output", "outputpenalty", "over", "overfullrule", "overline", - "overshoot", "overwithdelims", "pagedepth", "pagefilllstretch", @@ -795,6 +1021,8 @@ return { "parfillleftskip", "parfillskip", "parindent", + "parinitleftskip", + "parinitrightskip", "parshape", "parskip", "patterns", @@ -814,7 +1042,6 @@ return { "righthyphenmin", "rightskip", "romannumeral", - "scaledfontdimen", "scriptfont", "scriptscriptfont", "scriptscriptstyle", @@ -850,14 +1077,11 @@ return { "thickmuskip", "thinmuskip", "time", - "todimension", - "tointeger", "toks", "toksdef", "tolerance", "topmark", "topskip", - "toscaled", "tracingcommands", "tracinglostchars", "tracingmacros", @@ -869,16 +1093,15 @@ return { "tracingstats", "uccode", "uchyph", + "unboundary", "underline", "unhbox", "unhcopy", - "unhpack", "unkern", "unpenalty", "unskip", "unvbox", "unvcopy", - "unvpack", "uppercase", "vadjust", "valign", diff --git a/Master/texmf-dist/tex/context/base/mkiv/mult-prm.mkiv b/Master/texmf-dist/tex/context/base/mkiv/mult-prm.mkiv index 5ffb84d389c..75114c3309c 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/mult-prm.mkiv +++ b/Master/texmf-dist/tex/context/base/mkiv/mult-prm.mkiv @@ -68,7 +68,7 @@ "pdftracingfonts", "pdftrailer", "pdftrailerid", "pdfuniformdeviate", "pdfuniqueresname", "pdfvorigin", "pdfxform", "pdfxformattr", "pdfxformmargin", "pdfxformname", "pdfxformresources", "pdfximage", - "pdfomitcidset", "pdfomitcharset", + "pdfomitcidset", "pdfomitcharset", "pdfomitinfodict", }, aleph = { -- we don't bother "Alephminorversion", "Alephrevision", "Alephversion", diff --git a/Master/texmf-dist/tex/context/base/mkiv/mult-sys.mkiv b/Master/texmf-dist/tex/context/base/mkiv/mult-sys.mkiv index 7e9792720ad..07ec16e2bf6 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/mult-sys.mkiv +++ b/Master/texmf-dist/tex/context/base/mkiv/mult-sys.mkiv @@ -44,10 +44,15 @@ % definesystemconstant {vn} \definesystemconstant {afrikaans} \definesystemconstant {af} +\definesystemconstant {albanian} \definesystemconstant {sq} +\definesystemconstant {armenian} \definesystemconstant {hy} + \definesystemconstant {hye} + \definesystemconstant {hyw} \definesystemconstant {ancientgreek} \definesystemconstant {agr} \definesystemconstant {ancientlatin} \definesystemconstant {ala} \definesystemconstant {arabic} \definesystemconstant {ar} \definesystemconstant {belarussian} \definesystemconstant {be} +\definesystemconstant {bulgarian} \definesystemconstant {bg} \definesystemconstant {bokmal} \definesystemconstant {nb} \definesystemconstant {catalan} \definesystemconstant {ca} \definesystemconstant {chinese} \definesystemconstant {cn} @@ -57,7 +62,7 @@ \definesystemconstant {dutch} \definesystemconstant {nl} \definesystemconstant {english} \definesystemconstant {en} \definesystemconstant {estonian} \definesystemconstant {et} -\definesystemconstant {esperanto} % \definesystemconstant {eo} +\definesystemconstant {esperanto} \definesystemconstant {eo} \definesystemconstant {farsi} \definesystemconstant {fa} % just persian \definesystemconstant {finnish} \definesystemconstant {fi} \definesystemconstant {french} \definesystemconstant {fr} @@ -337,6 +342,8 @@ \definesystemconstant {righthyphenmin} \definesystemconstant {lefthyphenchar} \definesystemconstant {righthyphenchar} +\definesystemconstant {explicitlefthyphenchar} +\definesystemconstant {explicitrighthyphenchar} \definesystemconstant {head} \definesystemconstant {symbol} diff --git a/Master/texmf-dist/tex/context/base/mkiv/node-acc.lua b/Master/texmf-dist/tex/context/base/mkiv/node-acc.lua index d8f4b25bf3a..5849c045c23 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/node-acc.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/node-acc.lua @@ -32,8 +32,8 @@ local nextglyph = nuts.traversers.glyph local nextnode = nuts.traversers.node ----- copy_node = nuts.copy -local insert_after = nuts.insert_after -local copy_no_components = nuts.copy_no_components +local insertafter = nuts.insertafter +local copynocomponents = nuts.components.copynocomponents local nodecodes = nodes.nodecodes local gluecodes = nodes.gluecodes @@ -71,7 +71,7 @@ local function injectspaces(head) if s == spaceskip_code or s == xspaceskip_code then -- unless we don't care about the little bit of overhead -- we can just: local g = copy_node(g) - local g = copy_no_components(p) + local g = copynocomponents(p) local a = getattr(n,a_characters) setchar(g,slot) setlink(p,g,n) @@ -163,8 +163,8 @@ end) -- local str = codes[a] -- local b = pageliteral(format("/Span << /ActualText %s >> BDC", lpdf.tosixteen(str))) -- local e = pageliteral("EMC") --- insert_before(head,n,b) --- insert_after(head,n,e) +-- insertbefore(head,n,b) +-- insertafter(head,n,e) -- done = true -- end -- elseif id == hlist_code or id == vlist_code then diff --git a/Master/texmf-dist/tex/context/base/mkiv/node-aux.lua b/Master/texmf-dist/tex/context/base/mkiv/node-aux.lua index d3c537a3bce..5a98b2ea3a5 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/node-aux.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/node-aux.lua @@ -53,11 +53,11 @@ local traversers = nuts.traversers local nextnode = traversers.node local nextglyph = traversers.glyph -local flush_node = nuts.flush -local flush_list = nuts.flush_list +local flushnode = nuts.flush +local flushlist = nuts.flushlist local hpack_nodes = nuts.hpack -local unset_attribute = nuts.unset_attribute -local first_glyph = nuts.first_glyph +local unsetattribute = nuts.unsetattribute +local firstglyph = nuts.firstglyph local copy_node = nuts.copy local find_tail = nuts.tail local getbox = nuts.getbox @@ -85,7 +85,7 @@ local report_error = logs.reporter("node-aux:error") -- function tex.takebox(id) -- local box = tex.getbox(id) -- if box then --- local copy = node.copy(box) +-- local copy = nodes.copy(box) -- local list = box.list -- copy.list = list -- box.list = nil @@ -129,7 +129,7 @@ end function nuts.takelist(n) local l = getlist(n) setlist(n) - flush_node(n) + flushnode(n) return l end @@ -142,7 +142,7 @@ local function repackhlist(list,...) local temp, b = hpack_nodes(list,...) list = getlist(temp) setlist(temp) - flush_node(temp) + flushnode(temp) return list, b end @@ -153,50 +153,59 @@ function nodes.repackhlist(list,...) return tonode(list), b end -local function set_attributes(head,attr,value) - for n, id in nextnode, head do - setattr(n,attr,value) - if id == hlist_node or id == vlist_node then - set_attributes(getlist(n),attr,value) - end - end -end +if not nuts.setattributes then -local function set_unset_attributes(head,attr,value) - for n, id in nextnode, head do - if not getattr(n,attr) then + local function setattributes(head,attr,value) + for n, id in nextnode, head do setattr(n,attr,value) - end - if id == hlist_code or id == vlist_code then - set_unset_attributes(getlist(n),attr,value) + if id == hlist_node or id == vlist_node then + setattributes(getlist(n),attr,value) + end end end + + nuts .setattributes = setattributes + nodes.setattributes = vianuts(setattributes) + end -local function unset_attributes(head,attr) - for n, id in nextnode, head do - setattr(n,attr,unsetvalue) - if id == hlist_code or id == vlist_code then - unset_attributes(getlist(n),attr) +if not nuts.setunsetattributes then + + local function setunsetattributes(head,attr,value) + for n, id in nextnode, head do + if not getattr(n,attr) then + setattr(n,attr,value) + end + if id == hlist_code or id == vlist_code then + setunsetattributes(getlist(n),attr,value) + end end end + + nuts .setunsetattributes = setunsetattributes + nodes.setunsetattributes = vianuts(setunsetattributes) + end --- for old times sake +if not nuts.unsetattributes then -nuts.setattribute = nuts.setattr nodes.setattribute = nodes.setattr -nuts.getattribute = nuts.getattr nodes.getattribute = nodes.getattr -nuts.unsetattribute = nuts.unset_attribute nodes.unsetattribute = nodes.unset_attribute -nuts.has_attribute = nuts.has_attribute nodes.has_attribute = nodes.has_attribute -nuts.firstglyph = nuts.first_glyph nodes.firstglyph = nodes.first_glyph + local function unsetattributes(head,attr) + for n, id in nextnode, head do + setattr(n,attr,unsetvalue) + if id == hlist_code or id == vlist_code then + unsetattributes(getlist(n),attr) + end + end + end + + nuts .unsetattributes = unsetattributes + nodes.unsetattributes = vianuts(unsetattributes) -nuts.setattributes = set_attributes nodes.setattributes = vianuts(set_attributes) -nuts.setunsetattributes = set_unset_attributes nodes.setunsetattributes = vianuts(set_unset_attributes) -nuts.unsetattributes = unset_attributes nodes.unsetattributes = vianuts(unset_attributes) +end function nuts.firstcharacter(n,untagged) -- tagged == subtype > 255 if untagged then - return first_glyph(n) + return firstglyph(n) else for g in nextglyph ,n do return g @@ -370,7 +379,7 @@ local function rehpack(n,width) local set, order, sign = getboxglue(temp) setboxglue(n,set,order,sign) setlist(temp) - flush_node(temp) + flushnode(temp) return n end @@ -406,7 +415,7 @@ do local getsubtype = nodes.getsubtype - function nodes.start_of_par(n) + function nodes.startofpar(n) local s = getsubtype(n) return s == hmodepar_code or s == vmodepar_code end @@ -423,8 +432,6 @@ if not nuts.getnormalizedline then local getlist = nuts.getlist local getwidth = nuts.getwidth - local direct = node.direct - local nodecodes = nodes.nodecodes local skipcodes = nodes.skipcodes @@ -438,7 +445,7 @@ if not nuts.getnormalizedline then local indentskip_code = skipcodes.indentskip local parfillskip_code = skipcodes.parfillskip - local find_node = direct.find_node or function(h,t,s) + nuts.findnode = node.direct.find_node or function(h,t,s) if h then if s then for node, subtype in traversers[t] do @@ -454,7 +461,6 @@ if not nuts.getnormalizedline then end end - nuts.find_node = find_node function nuts.getnormalizedline(h) if getid(h) == hlist_code and getsubtype(h) == line_code then diff --git a/Master/texmf-dist/tex/context/base/mkiv/node-bck.lua b/Master/texmf-dist/tex/context/base/mkiv/node-bck.lua index ec84a3db5c3..b2c36ea5251 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/node-bck.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/node-bck.lua @@ -52,7 +52,7 @@ local nextnode = nuts.traversers.node local nexthlist = nuts.traversers.hlist local nextlist = nuts.traversers.list -local flush_node_list = nuts.flush_list +local flushnodelist = nuts.flushlist local new_rule = nodepool.rule local new_kern = nodepool.kern @@ -160,7 +160,7 @@ local function add_alignbackgrounds(head,list) local template = getprop(head,"alignmentchecked") if template then list = colored_b(head,list,template[1],hlist_code,template[2]) - flush_node_list(template) + flushnodelist(template) templates[currentrow] = false return list end @@ -238,15 +238,6 @@ function nodes.handlers.backgroundsvbox(head,where) return head end --- interfaces.implement { --- name = "enablebackgroundboxes", --- onlyonce = true, --- actions = enableaction, --- arguments = { "'shipouts'", "'nodes.handlers.backgrounds'" } --- } --- --- doing it in the shipout works as well but this is nicer - local function enable(alignmentstoo) if not enabled then enabled = true diff --git a/Master/texmf-dist/tex/context/base/mkiv/node-bwc.lua b/Master/texmf-dist/tex/context/base/mkiv/node-bwc.lua new file mode 100644 index 00000000000..e287de68e88 --- /dev/null +++ b/Master/texmf-dist/tex/context/base/mkiv/node-bwc.lua @@ -0,0 +1,92 @@ +if not modules then modules = { } end modules ['node-bwc'] = { + version = 1.001, + comment = "companion to node-ini.mkiv", + author = "Hans Hagen, PRAGMA-ADE, Hasselt NL", + copyright = "PRAGMA ADE / ConTeXt Development Team", + license = "see context related readme files" +} + +-- This is a backward compatibility list. + +local nodes = nodes +local nuts = nodes.nuts + +nuts .check_discretionaries = nuts .checkdiscretionaries +nuts .copy_list = nuts .copylist +nuts .copy_node = nuts .copynode +nuts .copy_only = nuts .copyonly +nuts .current_attr = nuts .currentattributes +nuts .effective_glue = nuts .effectiveglue +nuts .end_of_math = nuts .endofmath +nuts .find_attribute = nuts .findattribute +nuts .first_glyph = nuts .firstglyph +nuts .flatten_discretionaries = nuts .flattendiscretionaries +nuts .flush_list = nuts .flushlist +nuts .flush_node = nuts .flushnode +nuts .get_attribute = nuts .getattribute +nuts .get_synctex_fields = nuts .getsynctexfields +nuts .has_attribute = nuts .hasattribute +nuts .has_dimensions = nuts .hasdimensions +nuts .has_field = nuts .hasfield +nuts .has_glyph = nuts .hasglyph +nuts .insert_after = nuts .insertafter +nuts .insert_before = nuts .insertbefore +nuts .is_direct = nuts .isdirect +nuts .is_node = nuts .isnode +nuts .is_nut = nuts .isnut +nuts .is_zero_glue = nuts .iszeroglue +nuts .mlist_to_hlist = nuts .mlisttohlist +nuts .protect_glyph = nuts .protectglyph +nuts .protect_glyphs = nuts .protectglyphs +-----.protrusion_skippable = nuts .protrusionskippable +nuts .set_attribute = nuts .setattribute +-----.set_synctex_fields = nuts .setsynctexfields +nuts .start_of_par = nuts .startofpar +nuts .traverse_id = nuts .traverseid +nuts .traverse_char = nuts .traversechar +nuts .traverse_glyph = nuts .traverseglyph +nuts .traverse_id = nuts .traverseid +nuts .traverse_list = nuts .traverselist +nuts .unprotect_glyph = nuts .unprotectglyph +nuts .unprotect_glyphs = nuts .unprotectglyphs +nuts .unset_attribute = nuts .unsetattribute +nuts .uses_font = nuts .usesfont +nuts .getattr = nuts .getattribute +nuts .getattrs = nuts .getattributes +nuts .getattrlist = nuts .getattributelist + +-----.check_discretionaries = nodes.checkdiscretionaries +nodes.copy_list = nodes.copylist +nodes.copy_node = nodes.copynode +nodes.current_attributes = nodes.currentattributes +nodes.effective_glue = nodes.effectiveglue +nodes.end_of_math = nodes.endofmath +nodes.find_attribute = nodes.findattribute +nodes.first_glyph = nodes.firstglyph +-----.flatten_discretionaries = nodes.flattendiscretionaries +nodes.flush_list = nodes.flushlist +nodes.flush_node = nodes.flushnode +nodes.has_attribute = nodes.hasattribute +nodes.has_field = nodes.hasfield +nodes.has_glyph = nodes.hasglyph +nodes.insert_after = nodes.insertafter +nodes.insert_before = nodes.insertbefore +nodes.is_node = nodes.isnode +nodes.is_direct = nodes.isdirect +nodes.is_nut = nodes.isnut +nodes.is_zero_glue = nodes.iszeroglue +nodes.last_node = nodes.lastnode +nodes.mlist_to_hlist = nodes.mlisttohlist +nodes.protect_glyph = nodes.protectglyph +nodes.protect_glyphs = nodes.protectglyphs +nodes.protrusion_skippable = nodes.protrusionskippable +nodes.set_attribute = nodes.setattribute +nodes.traverse_id = nodes.traverseid +nodes.traverse_char = nodes.traversechar +nodes.traverse_glyph = nodes.traverseglyph +nodes.traverse_id = nodes.traverseid +nodes.traverse_list = nodes.traverselist +nodes.unprotect_glyph = nodes.unprotectglyph +nodes.unprotect_glyphs = nodes.unprotectglyphs +nodes.unset_attribute = nodes.unsetattribute +nodes.uses_font = nodes.usesfont diff --git a/Master/texmf-dist/tex/context/base/mkiv/node-dir.lua b/Master/texmf-dist/tex/context/base/mkiv/node-dir.lua deleted file mode 100644 index 762f20739da..00000000000 --- a/Master/texmf-dist/tex/context/base/mkiv/node-dir.lua +++ /dev/null @@ -1,114 +0,0 @@ -if not modules then modules = { } end modules ['node-dir'] = { - version = 1.001, - comment = "companion to node-ini.mkiv", - author = "Hans Hagen", - copyright = "PRAGMA ADE / ConTeXt Development Team", - license = "see context related readme files" -} - -local nodes = nodes -local nuts = nodes.nuts - -local normaldir_code = nodes.dircodes.normal -local line_code = nodes.listcodes.line -local lefttoright_code = nodes.dirvalues.lefttoright - -local getnext = nuts.getnext -local getlist = nuts.getlist -local getwhd = nuts.getwhd -local getdirection = nuts.getdirection - -local setlist = nuts.setlist - -local nextdir = nuts.traversers.dir -local nexthlist = nuts.traversers.hlist - -local rangedimensions = nuts.rangedimensions -local insert_before = nuts.insert_before - -local new_rule = nuts.pool.rule -local new_kern = nuts.pool.kern - -local setcolor = nodes.tracers.colors.set -local settransparency = nodes.tracers.transparencies.set - --- local function dirdimensions(parent,begindir) -- can be a helper --- local level = 1 --- local enddir = begindir --- local width = 0 --- for current, subtype in nextdir, getnext(begindir) do --- if subtype == normaldir_code then -- todo --- level = level + 1 --- else --- level = level - 1 --- end --- if level == 0 then -- does the type matter --- enddir = current --- width = rangedimensions(parent,begindir,enddir) --- return width, enddir --- end --- end --- if enddir == begindir then --- width = rangedimensions(parent,begindir) --- end --- return width, enddir --- end - -local function dirdimensions(parent,begindir) -- can be a helper - local level = 1 - local lastdir = nil - local width = 0 - for current, subtype in nextdir, getnext(begindir) do - if subtype == normaldir_code then -- todo - level = level + 1 - else - level = level - 1 - end - if level == 0 then -- does the type matter - return (rangedimensions(parent,begindir,current)), current - end - end - return (rangedimensions(parent,begindir)), begindir -end - -nuts.dirdimensions = dirdimensions - -local function colorit(list,current,dir,w,h,d) - local rule = new_rule(w,h,d) - local kern = new_kern(-w) - local color = dir == lefttoright_code and "trace:s" or "trace:o" - setcolor(rule,color) - settransparency(rule,color) - list, current = insert_before(list,current,kern) - list, current = insert_before(list,current,rule) - return list, current -end - -function nodes.tracers.directions(head) - for hlist, subtype in nexthlist, head do - if subtype == line_code then - local list = getlist(hlist) - local w, h, d = getwhd(hlist) - list = colorit(list,list,getdirection(hlist),w,h,d) - for current in nextdir, list do - local dir, cancel = getdirection(current) - if not cancel then - local width = dirdimensions(hlist,current) - list = colorit(list,current,dir,width,h,d) - end - end - setlist(hlist,list) - end - end - return head -end - -local enabled = false - -trackers.register("nodes.directions", function(v) - if not enabled then - enabled = true - nodes.tasks.appendaction("finalizers","after","nodes.tracers.directions",nil,"nut","enabled") - end - nodes.tasks.setaction(v) -end) diff --git a/Master/texmf-dist/tex/context/base/mkiv/node-fin.lua b/Master/texmf-dist/tex/context/base/mkiv/node-fin.lua index 373cce3ce60..b9ba169ddb0 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/node-fin.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/node-fin.lua @@ -17,57 +17,57 @@ local setmetatableindex = table.setmetatableindex local attributes, nodes, node = attributes, nodes, node -local nuts = nodes.nuts -local tonut = nodes.tonut - -local getnext = nuts.getnext -local getid = nuts.getid -local getlist = nuts.getlist -local getleader = nuts.getleader -local getattr = nuts.getattr -local getwidth = nuts.getwidth -local getwhd = nuts.getwhd -local getorientation = nuts.getorientation -local has_dimensions = nuts.has_dimensions -local getbox = nuts.getbox - -local setlist = nuts.setlist -local setleader = nuts.setleader - -local copy_node = nuts.copy -local insert_node_before = nuts.insert_before -local insert_node_after = nuts.insert_after - -local nextnode = nuts.traversers.node - -local nodecodes = nodes.nodecodes -local rulecodes = nodes.rulecodes - -local boxrule_code = rulecodes.box -local imagerule_code = rulecodes.image -local emptyrule_code = rulecodes.empty - -local glyph_code = nodecodes.glyph -local disc_code = nodecodes.disc -local glue_code = nodecodes.glue -local rule_code = nodecodes.rule -local hlist_code = nodecodes.hlist -local vlist_code = nodecodes.vlist - -local texlists = tex.lists -local texgetnest = tex.getnest - -local states = attributes.states -local numbers = attributes.numbers -local a_trigger = attributes.private('trigger') -local triggering = false - -local implement = interfaces.implement - -local starttiming = statistics.starttiming -local stoptiming = statistics.stoptiming -local loadstripped = utilities.lua.loadstripped -local unsetvalue = attributes.unsetvalue +local nuts = nodes.nuts +local tonut = nodes.tonut + +local getnext = nuts.getnext +local getid = nuts.getid +local getlist = nuts.getlist +local getleader = nuts.getleader +local getattr = nuts.getattr +local getwidth = nuts.getwidth +local getwhd = nuts.getwhd +local getorientation = nuts.getorientation +local hasdimensions = nuts.hasdimensions +local getbox = nuts.getbox + +local setlist = nuts.setlist +local setleader = nuts.setleader + +local copy_node = nuts.copy +local insertnodebefore = nuts.insertbefore +local insertnodeafter = nuts.insertafter + +local nextnode = nuts.traversers.node + +local nodecodes = nodes.nodecodes +local rulecodes = nodes.rulecodes + +local boxrule_code = rulecodes.box +local imagerule_code = rulecodes.image +local emptyrule_code = rulecodes.empty + +local glyph_code = nodecodes.glyph +local disc_code = nodecodes.disc +local glue_code = nodecodes.glue +local rule_code = nodecodes.rule +local hlist_code = nodecodes.hlist +local vlist_code = nodecodes.vlist + +local texlists = tex.lists +local texgetnest = tex.getnest + +local states = attributes.states +local numbers = attributes.numbers +local a_trigger = attributes.private('trigger') +local triggering = false + +local implement = interfaces.implement + +local starttiming = statistics.starttiming +local stoptiming = statistics.stoptiming +local loadstripped = utilities.lua.loadstripped +local unsetvalue = attributes.unsetvalue -- these two will be like trackers @@ -163,13 +163,13 @@ function states.finalize(namespace,attribute,head) -- is this one ok? if id == hlist_code or id == vlist_code then local content = getlist(head) if content then - local list = insert_node_before(content,content,copy_node(nsnone)) -- two return values + local list = insertnodebefore(content,content,copy_node(nsnone)) -- two return values if list ~= content then setlist(head,list) end end else - head = insert_node_before(head,head,copy_node(nsnone)) + head = insertnodebefore(head,head,copy_node(nsnone)) end return head, true end @@ -199,20 +199,20 @@ local function process(attribute,head,inheritance,default) -- one attribute if outer then if default and outer == inheritance then if current ~= default then - head = insert_node_before(head,stack,copy_node(nsdata[default])) + head = insertnodebefore(head,stack,copy_node(nsdata[default])) current = default end elseif current ~= outer then - head = insert_node_before(head,stack,copy_node(nsdata[c])) + head = insertnodebefore(head,stack,copy_node(nsdata[c])) -- hm, what is c ... bug current = outer end elseif default and inheritance then if current ~= default then - head = insert_node_before(head,stack,copy_node(nsdata[default])) + head = insertnodebefore(head,stack,copy_node(nsdata[default])) current = default end elseif current > 0 then - head = insert_node_before(head,stack,copy_node(nsnone)) + head = insertnodebefore(head,stack,copy_node(nsnone)) current = 0 end end @@ -236,7 +236,7 @@ local function process(attribute,head,inheritance,default) -- one attribute -- end nested -- end elseif id == rule_code then - check = has_dimensions(stack) + check = hasdimensions(stack) end -- much faster this way than using a check() and nested() function if check then @@ -244,11 +244,11 @@ local function process(attribute,head,inheritance,default) -- one attribute if c then if default and c == inheritance then if current ~= default then - head = insert_node_before(head,stack,copy_node(nsdata[default])) + head = insertnodebefore(head,stack,copy_node(nsdata[default])) current = default end elseif current ~= c then - head = insert_node_before(head,stack,copy_node(nsdata[c])) + head = insertnodebefore(head,stack,copy_node(nsdata[c])) current = c end if leader then @@ -281,11 +281,11 @@ local function process(attribute,head,inheritance,default) -- one attribute end elseif default and inheritance then if current ~= default then - head = insert_node_before(head,stack,copy_node(nsdata[default])) + head = insertnodebefore(head,stack,copy_node(nsdata[default])) current = default end elseif current > 0 then - head = insert_node_before(head,stack,copy_node(nsnone)) + head = insertnodebefore(head,stack,copy_node(nsnone)) current = 0 end check = false @@ -326,7 +326,7 @@ local function selective(attribute,head,inheritance,default) -- two attributes if default and outer == inheritance then if current ~= default then local data = nsdata[default] - head = insert_node_before(head,stack,copy_node(data[nsforced or getattr(stack,nsselector) or nsselector])) + head = insertnodebefore(head,stack,copy_node(data[nsforced or getattr(stack,nsselector) or nsselector])) current = default end else @@ -334,7 +334,7 @@ local function selective(attribute,head,inheritance,default) -- two attributes -- local s = nsforced or getattr(stack,nsselector) if current ~= outer or current_selector ~= s then local data = nsdata[outer] - head = insert_node_before(head,stack,copy_node(data[nsforced or s or nsselector])) + head = insertnodebefore(head,stack,copy_node(data[nsforced or s or nsselector])) current = outer current_selector = s end @@ -342,11 +342,11 @@ local function selective(attribute,head,inheritance,default) -- two attributes elseif default and inheritance then if current ~= default then local data = nsdata[default] - head = insert_node_before(head,stack,copy_node(data[nsforced or getattr(stack,nsselector) or nsselector])) + head = insertnodebefore(head,stack,copy_node(data[nsforced or getattr(stack,nsselector) or nsselector])) current = default end elseif current > 0 then - head = insert_node_before(head,stack,copy_node(nsnone)) + head = insertnodebefore(head,stack,copy_node(nsnone)) current, current_selector = 0, 0 end end @@ -374,7 +374,7 @@ local function selective(attribute,head,inheritance,default) -- two attributes -- so no redundant color stuff (only here, layers for instance should obey) check = false else - check = has_dimensions(stack) + check = hasdimensions(stack) end else end @@ -384,7 +384,7 @@ local function selective(attribute,head,inheritance,default) -- two attributes if default and c == inheritance then if current ~= default then local data = nsdata[default] - head = insert_node_before(head,stack,copy_node(data[nsforced or getattr(stack,nsselector) or nsselector])) + head = insertnodebefore(head,stack,copy_node(data[nsforced or getattr(stack,nsselector) or nsselector])) current = default end else @@ -392,7 +392,7 @@ local function selective(attribute,head,inheritance,default) -- two attributes -- local s = nsforced or getattr(stack,nsselector) if current ~= c or current_selector ~= s then local data = nsdata[c] - head = insert_node_before(head,stack,copy_node(data[nsforced or s or nsselector])) + head = insertnodebefore(head,stack,copy_node(data[nsforced or s or nsselector])) current = c current_selector = s end @@ -419,11 +419,11 @@ local function selective(attribute,head,inheritance,default) -- two attributes elseif default and inheritance then if current ~= default then local data = nsdata[default] - head = insert_node_before(head,stack,copy_node(data[nsforced or getattr(stack,nsselector) or nsselector])) + head = insertnodebefore(head,stack,copy_node(data[nsforced or getattr(stack,nsselector) or nsselector])) current = default end elseif current > 0 then - head = insert_node_before(head,stack,copy_node(nsnone)) + head = insertnodebefore(head,stack,copy_node(nsnone)) current, current_selector = 0, 0 end check = false @@ -470,9 +470,9 @@ local function stacked(attribute,head,default) -- no triggering, no inheritance, if a and current ~= a and nslistwise[a] then -- viewerlayer / needs checking, see below local p = current current = a - head = insert_node_before(head,stack,copy_node(nsdata[a])) + head = insertnodebefore(head,stack,copy_node(nsdata[a])) list = stacked(attribute,content,current) -- two return values - head, stack = insert_node_after(head,stack,copy_node(nsnone)) + head, stack = insertnodeafter(head,stack,copy_node(nsnone)) current = p else list = stacked(attribute,content,current) @@ -485,13 +485,13 @@ local function stacked(attribute,head,default) -- no triggering, no inheritance, end end elseif id == rule_code then - check = has_dimensions(stack) + check = hasdimensions(stack) end if check then local a = getattr(stack,attribute) if a then if current ~= a then - head = insert_node_before(head,stack,copy_node(nsdata[a])) + head = insertnodebefore(head,stack,copy_node(nsdata[a])) depth = depth + 1 current = a end @@ -508,7 +508,7 @@ local function stacked(attribute,head,default) -- no triggering, no inheritance, elseif default > 0 then -- elseif current > 0 then - head = insert_node_before(head,stack,copy_node(nsnone)) + head = insertnodebefore(head,stack,copy_node(nsnone)) depth = depth - 1 current = 0 end @@ -517,7 +517,7 @@ local function stacked(attribute,head,default) -- no triggering, no inheritance, stack = getnext(stack) end while depth > 0 do - head = insert_node_after(head,stack,copy_node(nsnone)) + head = insertnodeafter(head,stack,copy_node(nsnone)) depth = depth - 1 end return head @@ -556,12 +556,12 @@ local function stacker(attribute,head,default) -- no triggering, no inheritance, if nslistwise then local a = getattr(current,attribute) if a and attrib ~= a and nslistwise[a] then -- viewerlayer - head = insert_node_before(head,current,copy_node(nsdata[a])) + head = insertnodebefore(head,current,copy_node(nsdata[a])) list = stacker(attribute,content,a) if list ~= content then setlist(current,list) end - head, current = insert_node_after(head,current,copy_node(nsnone)) + head, current = insertnodeafter(head,current,copy_node(nsnone)) else list = stacker(attribute,content,attrib) if list ~= content then @@ -576,7 +576,7 @@ local function stacker(attribute,head,default) -- no triggering, no inheritance, end end elseif id == rule_code then - check = has_dimensions(current) + check = hasdimensions(current) end if check then @@ -588,7 +588,7 @@ local function stacker(attribute,head,default) -- no triggering, no inheritance, end local n = nsstep(a) if n then - head = insert_node_before(head,current,n) -- a + head = insertnodebefore(head,current,n) -- a end attrib = a if leader then @@ -617,7 +617,7 @@ local function stacker(attribute,head,default) -- no triggering, no inheritance, if stacked then local n = nsend() while n do - head = insert_node_after(head,previous,n) + head = insertnodeafter(head,previous,n) n = nsend() end end diff --git a/Master/texmf-dist/tex/context/base/mkiv/node-fnt.lua b/Master/texmf-dist/tex/context/base/mkiv/node-fnt.lua index f3bb6228fe0..b3a8ccc1ee8 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/node-fnt.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/node-fnt.lua @@ -60,21 +60,19 @@ local setprev = nuts.setprev local isglyph = nuts.isglyph -- unchecked local ischar = nuts.ischar -- checked ------ traverse_id = nuts.traverse_id ------ traverse_char = nuts.traverse_char local nextboundary = nuts.traversers.boundary local nextdisc = nuts.traversers.disc local nextchar = nuts.traversers.char -local flush_node = nuts.flush +local flushnode = nuts.flush local disc_code = nodecodes.disc local boundary_code = nodecodes.boundary local wordboundary_code = boundarycodes.word -local protect_glyphs = nuts.protect_glyphs -local unprotect_glyphs = nuts.unprotect_glyphs +local protectglyphs = nuts.protectglyphs +local unprotectglyphs = nuts.unprotectglyphs local setmetatableindex = table.setmetatableindex @@ -196,7 +194,7 @@ do local a, u, b, r local function protectnone() - protect_glyphs(firstnone,lastnone) + protectglyphs(firstnone,lastnone) firstnone = nil end @@ -392,7 +390,7 @@ do end end end - flush_node(r) + flushnode(r) end end @@ -542,5 +540,5 @@ do end -handlers.protectglyphs = protect_glyphs -handlers.unprotectglyphs = unprotect_glyphs +handlers.protectglyphs = protectglyphs +handlers.unprotectglyphs = unprotectglyphs diff --git a/Master/texmf-dist/tex/context/base/mkiv/node-gcm.lua b/Master/texmf-dist/tex/context/base/mkiv/node-gcm.lua index 5b598f6b033..de0018b4cf3 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/node-gcm.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/node-gcm.lua @@ -8,37 +8,37 @@ if not modules then modules = { } end modules ['node-gmc'] = { local type, tostring = type, tostring -local nodes = nodes -local nodecodes = nodes.nodecodes -local ligature_code = nodes.glyphcodes.ligature -local nuts = nodes.nuts +local nodes = nodes +local nodecodes = nodes.nodecodes +local ligature_code = nodes.glyphcodes.ligature +local nuts = nodes.nuts -local getnext = nuts.getnext -local getsubtype = nuts.getsubtype -local getprev = nuts.getprev -local setlink = nuts.setlink -local nextglyph = nuts.traversers.glyph -local copy_node = nuts.copy -local isglyph = nuts.isglyph +local getnext = nuts.getnext +local getsubtype = nuts.getsubtype +local getprev = nuts.getprev +local setlink = nuts.setlink +local nextglyph = nuts.traversers.glyph +local copynode = nuts.copy +local isglyph = nuts.isglyph -local report_error = logs.reporter("node-aux:error") +local report_error = logs.reporter("node-aux:error") -local get_components = node.direct.getcomponents -local set_components = node.direct.setcomponents +local getcomponents = node.direct.getcomponents +local setcomponents = node.direct.setcomponents -local function copy_no_components(g,copyinjection) - local components = get_components(g) +local function copynocomponents(g,copyinjection) + local components = getcomponents(g) if components then - set_components(g) - local n = copy_node(g) + setcomponents(g) + local n = copynode(g) if copyinjection then copyinjection(n,g) end - set_components(g,components) + setcomponents(g,components) -- maybe also upgrade the subtype but we don't use it anyway return n else - local n = copy_node(g) + local n = copynode(g) if copyinjection then copyinjection(n,g) end @@ -46,11 +46,11 @@ local function copy_no_components(g,copyinjection) end end -local function copy_only_glyphs(current) +local function copyonlyglyphs(current) local head = nil local previous = nil for n in nextglyph, current do - n = copy_node(n) + n = copynode(n) if head then setlink(previous,n) else @@ -63,14 +63,14 @@ end -- start is a mark and we need to keep that one -local function count_components(start,marks) +local function countcomponents(start,marks) local char = isglyph(start) if char then if getsubtype(start) == ligature_code then local n = 0 - local components = get_components(start) + local components = getcomponents(start) while components do - n = n + count_components(components,marks) + n = n + countcomponents(components,marks) components = getnext(components) end return n @@ -81,16 +81,18 @@ local function count_components(start,marks) return 0 end -local function flush_components() +local function flushcomponents() -- this is a no-op in mkiv / generic end -nuts.set_components = set_components -nuts.get_components = get_components -nuts.copy_only_glyphs = copy_only_glyphs -nuts.copy_no_components = copy_no_components -nuts.count_components = count_components -nuts.flush_components = flush_components +nuts.components = { + set = setcomponents, + get = getcomponents, + copyonlyglyphs = copyonlyglyphs, + copynocomponents = copynocomponents, + count = countcomponents, + flush = flushcomponents, +} nuts.setcomponents = function() report_error("unsupported: %a","setcomponents") end nuts.getcomponents = function() report_error("unsupported: %a","getcomponents") end diff --git a/Master/texmf-dist/tex/context/base/mkiv/node-ini.lua b/Master/texmf-dist/tex/context/base/mkiv/node-ini.lua index 701e3efa92c..ef7d4afed2d 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/node-ini.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/node-ini.lua @@ -168,8 +168,9 @@ literalvalues = allocate(swapped(literalvalues,literalvalues)) if not nodecodes.delimiter then -- as in luametatex / lmtx - nodecodes.delimiter = nodecodes.delim - nodecodes[nodecodes.delimiter] = "delimiter" + local d = nodecodes.delim + nodecodes.delimiter = d + nodecodes[d] = "delimiter" nodecodes.delim = nil end @@ -180,6 +181,14 @@ if not nodecodes.par then nodecodes[p] = "par" end +if not nodecodes.insert then + -- as in luametatex / lmtx + local i = nodecodes.ins + nodecodes.insert = i + nodecodes[i] = "insert" + nodecodes.ins = nil +end + if not gluecodes.indentskip then gluecodes.indentskip = gluecodes.userskip gluecodes.lefthangskip = gluecodes.userskip @@ -192,6 +201,7 @@ end if not whatcodes.literal then whatcodes.literal = whatcodes.pdfliteral + whatcodes.lateliteral = whatcodes.pdflateliteral whatcodes.save = whatcodes.pdfsave whatcodes.restore = whatcodes.pdfrestore whatcodes.setmatrix = whatcodes.pdfsetmatrix diff --git a/Master/texmf-dist/tex/context/base/mkiv/node-ini.mkiv b/Master/texmf-dist/tex/context/base/mkiv/node-ini.mkiv index 072cb319aad..10998d0604c 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/node-ini.mkiv +++ b/Master/texmf-dist/tex/context/base/mkiv/node-ini.mkiv @@ -29,7 +29,6 @@ \registerctxluafile{node-snp}{} \registerctxluafile{node-tsk}{} \registerctxluafile{node-tex}{} -\registerctxluafile{node-dir}{} % experimental, not yet (and maybe never) used \registerctxluafile{node-pro}{} \registerctxluafile{node-ser}{} %registerctxluafile{node-ext}{} @@ -38,6 +37,7 @@ \registerctxluafile{node-scn}{} \registerctxluafile{node-syn}{} \registerctxluafile{node-par}{} +\registerctxluafile{node-bwc}{} % might stay \newcount\c_node_tracers_show_box % box number diff --git a/Master/texmf-dist/tex/context/base/mkiv/node-ltp.lua b/Master/texmf-dist/tex/context/base/mkiv/node-ltp.lua index 6cb9e8d102f..f008422e054 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/node-ltp.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/node-ltp.lua @@ -220,7 +220,7 @@ local getpre = nuts.getpre local setpre = nuts.setpre local isglyph = nuts.isglyph -local start_of_par = nuts.start_of_par +local startofpar = nuts.startofpar local setfield = nuts.setfield local setlink = nuts.setlink @@ -240,16 +240,16 @@ local setexpansion = nuts.setexpansion local find_tail = nuts.tail local copy_node = nuts.copy -local flush_node = nuts.flush -local flush_node_list = nuts.flush_list +local flushnode = nuts.flush +local flushnodelist = nuts.flushlist ----- hpack_nodes = nuts.hpack local xpack_nodes = nuts.hpack local replace_node = nuts.replace local remove_node = nuts.remove -local insert_node_after = nuts.insert_after -local insert_node_before = nuts.insert_before -local is_zero_glue = nuts.is_zero_glue -local is_skipable = nuts.protrusion_skippable +local insertnodeafter = nuts.insertafter +local insertnodebefore = nuts.insertbefore +local iszeroglue = nuts.iszeroglue +local protrusionskippable = nuts.protrusionskippable local setattributelist = nuts.setattributelist local find_node = nuts.find_node @@ -267,7 +267,7 @@ local gluecodes = nodes.gluecodes local temp_code = nodecodes.temp local glyph_code = nodecodes.glyph -local ins_code = nodecodes.ins +local insert_code = nodecodes.insert local mark_code = nodecodes.mark local adjust_code = nodecodes.adjust local penalty_code = nodecodes.penalty @@ -386,7 +386,7 @@ local function inject_dirs_at_begin_of_line(stack,current) for i=1,n do local d = new_direction(stack[i]) setattributelist(d,current) - h, current = insert_node_after(h,current,d) + h, current = insertnodeafter(h,current,d) end stack.n = 0 return h @@ -421,14 +421,14 @@ end for i=n,1,-1 do local d = new_direction(stack[i],true) setattributelist(d,start) - h, current = insert_node_after(h,current,d) + h, current = insertnodeafter(h,current,d) end end stack.n = n return current end -local ignore_math_skip = node.direct.ignore_math_skip or function(current) +local ignoremathskip = nuts.ignoremathskip or function(current) local mode = texget("mathskipmode") if mode == 6 or mode == 7 then local b = true @@ -744,7 +744,7 @@ local function find(head) -- do we really want to recurse into an hlist? else return head end - elseif is_skipable(head) then + elseif protrusionskippable(head) then head = getnext(head) else return head @@ -798,7 +798,7 @@ local function find(head,tail) else return tail end - elseif is_skipable(tail) then + elseif protrusionskippable(tail) then tail = getprev(tail) else return tail @@ -1010,7 +1010,7 @@ do end local function used_skip(s) - return s and not is_zero_glue(s) and s + return s and not iszeroglue(s) and s end local function initialize_line_break(head,display) @@ -1357,7 +1357,7 @@ do report_parbuilders('unsupported disc at location %a',3) end if pre then - flush_node_list(pre) + flushnodelist(pre) pre = nil -- signal end if replace then @@ -1368,13 +1368,13 @@ do setdisc(lastnode,pre,post,replace) local pre, post, replace = getdisc(prevlast) if pre then - flush_node_list(pre) + flushnodelist(pre) end if replace then - flush_node_list(replace) + flushnodelist(replace) end if post then - flush_node_list(post) + flushnodelist(post) end setdisc(prevlast) -- nil,nil,nil elseif subtype == firstdisc_code then @@ -1387,7 +1387,7 @@ do setpost(lastnode) end if replace then - flush_node_list(replace) + flushnodelist(replace) end if pre then setlink(prevlast,pre) @@ -1414,7 +1414,7 @@ do lastnode = inject_dirs_at_end_of_line(dirstack,lastnode,getnext(head),current_break.cur_break) local rightbox = current_break.passive_right_box if rightbox then - lastnode = insert_node_after(lastnode,lastnode,copy_node(rightbox)) + lastnode = insertnodeafter(lastnode,lastnode,copy_node(rightbox)) end if not lineend then lineend = lastnode @@ -1495,8 +1495,8 @@ do -- so we inherit attributes, lineend is new pseudo head local k = new_rightmarginkern(copy_node(last_rightmost_char),-w) setattributelist(k,p) --- insert_node_after(c,c,k) - insert_node_after(p,p,k) +-- insertnodeafter(c,c,k) + insertnodeafter(p,p,k) -- if c == lineend then -- lineend = getnext(c) -- end @@ -1512,7 +1512,7 @@ do if not glue_break then local rs = new_rightskip(unpack(rightskip)) setattributelist(rs,lineend) - start, lineend = insert_node_after(start,lineend,rs) + start, lineend = insertnodeafter(start,lineend,rs) end local rs = lineend -- insert leftbox (if needed after parindent) @@ -1520,9 +1520,9 @@ do if leftbox then local first = getnext(start) if first and current_line == (par.first_line + 1) and getid(first) == hlist_code and not getlist(first) then - insert_node_after(start,start,copy_node(leftbox)) + insertnodeafter(start,start,copy_node(leftbox)) else - start = insert_node_before(start,start,copy_node(leftbox)) + start = insertnodebefore(start,start,copy_node(leftbox)) end end if protrude_chars > 0 then @@ -1534,7 +1534,7 @@ do if last_leftmost_char and w ~= 0 then local k = new_rightmarginkern(copy_node(last_leftmost_char),-w) setattributelist(k,p) - start = insert_node_before(start,start,k) + start = insertnodebefore(start,start,k) end end end @@ -1546,7 +1546,7 @@ do -- so we inherit attributes, start is pseudo head and moves back local k = new_leftmarginkern(copy_node(last_leftmost_char),-w) setattributelist(k,p) - start = insert_node_before(start,start,k) + start = insertnodebefore(start,start,k) end end end @@ -1556,7 +1556,7 @@ do -- we could check for non zero but we will normalize anyway ls = new_leftskip(unpack(leftskip)) setattributelist(ls,start) - start = insert_node_before(start,start,ls) + start = insertnodebefore(start,start,ls) end if normalize > 0 then local par = nil @@ -1570,7 +1570,7 @@ do indent = n end elseif id == par_code then - if start_of_par(n) then --- maybe subtype check instead + if startofpar(n) then --- maybe subtype check instead par = n elseif noflocals then noflocals = noflocals + 1 @@ -1635,11 +1635,11 @@ do setattributelist(r,start) if normalize > 3 then -- makes most sense - start = insert_node_after(start,ls,l) - start = insert_node_before(start,rs,r) + start = insertnodeafter(start,ls,l) + start = insertnodebefore(start,rs,r) else - start = insert_node_before(start,ls,l) - start = insert_node_after(start,rs,r) + start = insertnodebefore(start,ls,l) + start = insertnodeafter(start,rs,r) end cur_width = hsize cur_indent = 0 @@ -1740,7 +1740,7 @@ do end if current ~= head then setnext(current) - flush_node_list(getnext(head)) + flushnodelist(getnext(head)) setlink(head,next) end end @@ -1759,7 +1759,7 @@ par.head = head report_parbuilders("no local par node") end end - flush_node(h) + flushnode(h) par.head = nil -- needs checking end current_line = current_line - 1 @@ -1799,7 +1799,7 @@ par.head = head if next then setprev(next) end - flush_node(head) + flushnode(head) end post_line_break(par) reset_meta(par) @@ -2600,7 +2600,7 @@ par.head = head end elseif id == math_code then auto_breaking = getsubtype(current) == endmath_code - if is_zero_glue(current) or ignore_math_skip(current) then + if iszeroglue(current) or ignoremathskip(current) then local v = getnext(current) if auto_breaking and getid(v) == glue_code then p_active, n_active = try_break(0, unhyphenated_code, par, first_p, current, checked_expansion) @@ -2624,7 +2624,7 @@ par.head = head par.internal_right_box = getfield(current,"box_right") par.internal_right_box_width = getfield(current,"box_right_width") elseif trace_unsupported then - if id == mark_code or id == ins_code or id == adjust_code then + if id == mark_code or id == insert_code or id == adjust_code then -- skip else report_parbuilders("node of type %a found in paragraph",type(id)) @@ -3090,7 +3090,7 @@ do end natural = natural + wd elseif id == math_code then - if is_zero_glue(current) or ignore_math_skip(current) then + if iszeroglue(current) or ignoremathskip(current) then natural = natural + getkern(current) else local wd, stretch, shrink, stretch_order, shrink_order = getglue(current) @@ -3098,7 +3098,7 @@ do total_shrink [shrink_order] = total_shrink[shrink_order] + shrink natural = natural + wd end - elseif id == ins_code or id == mark_code then + elseif id == insert_code or id == mark_code then local prev, next = getboth(current) if adjust_tail then -- todo setlink(prev,next) @@ -3272,7 +3272,7 @@ do if p and getid(p) == marginkern_code then found = p end - insert_node_before(head,found,g) + insertnodebefore(head,found,g) end end end diff --git a/Master/texmf-dist/tex/context/base/mkiv/node-met.lua b/Master/texmf-dist/tex/context/base/mkiv/node-met.lua index 31f9a16b28b..45639b5bad3 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/node-met.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/node-met.lua @@ -1,4 +1,4 @@ -if not modules then modules = { } end modules ['node-MET'] = { + if not modules then modules = { } end modules ['node-MET'] = { version = 1.001, comment = "companion to node-ini.mkiv", author = "Hans Hagen, PRAGMA-ADE, Hasselt NL", @@ -10,7 +10,7 @@ if not modules then modules = { } end modules ['node-MET'] = { -- the regular code is proven stable. No support otherwise. -- luatex: todo: copylist should return h, t --- todo: see if using insert_before and insert_after makes sense here +-- todo: see if using insertbefore and insertafter makes sense here -- This file is a side effect of the \LUATEX\ speed optimization project of Luigi -- Scarso and me. As \CONTEXT\ spends over half its time in \LUA, we though that @@ -65,73 +65,75 @@ end -- We start with some helpers and provide all relevant basic functions in the -- node namespace as well. -nodes = nodes or { } -local nodes = nodes - -local nodecodes = nodes.nodecodes - -nodes.tostring = node.tostring or tostring -nodes.copy = node.copy -nodes.copy_node = node.copy -nodes.copy_list = node.copy_list -nodes.delete = node.delete -nodes.dimensions = node.dimensions -nodes.rangedimensions = node.rangedimensions -nodes.end_of_math = node.end_of_math -nodes.flush = node.flush_node -nodes.flush_node = node.flush_node -nodes.flush_list = node.flush_list -nodes.free = node.free -nodes.insert_after = node.insert_after -nodes.insert_before = node.insert_before -nodes.hpack = node.hpack -nodes.new = node.new -nodes.tail = node.tail -nodes.traverse = node.traverse -nodes.traverse_id = node.traverse_id -nodes.traverse_char = node.traverse_char -nodes.traverse_glyph = node.traverse_glyph -nodes.traverse_list = node.traverse_list -nodes.slide = node.slide -nodes.vpack = node.vpack -nodes.fields = node.fields -nodes.is_node = node.is_node -nodes.setglue = node.setglue -nodes.uses_font = node.uses_font - -nodes.first_glyph = node.first_glyph -nodes.has_glyph = node.has_glyph or node.first_glyph - -nodes.current_attributes = node.current_attributes or node.current_attr -nodes.has_field = node.has_field -nodes.last_node = node.last_node -nodes.usedlist = node.usedlist -nodes.protrusion_skippable = node.protrusion_skippable -nodes.check_discretionaries = node.check_discretionaries -nodes.write = node.write -nodes.flatten_discretionaries = node.flatten_discretionaries - -nodes.count = node.count -nodes.length = node.length - -nodes.has_attribute = node.has_attribute -nodes.set_attribute = node.set_attribute -nodes.find_attribute = node.find_attribute -nodes.unset_attribute = node.unset_attribute - -nodes.protect_glyph = node.protect_glyph -nodes.protect_glyphs = node.protect_glyphs -nodes.unprotect_glyph = node.unprotect_glyph -nodes.unprotect_glyphs = node.unprotect_glyphs -nodes.kerning = node.kerning -nodes.ligaturing = node.ligaturing -nodes.hyphenating = node.hyphenating -nodes.mlist_to_hlist = node.mlist_to_hlist - -nodes.effective_glue = node.effective_glue -nodes.getglue = node.getglue -nodes.setglue = node.setglue -nodes.is_zero_glue = node.is_zero_glue +nodes = nodes or { } +local nodes = nodes + +local nodecodes = nodes.nodecodes + +nodes.tostring = node.tostring or tostring +nodes.copy = node.copy +nodes.copynode = node.copy +nodes.copylist = node.copy_list +nodes.delete = node.delete +nodes.dimensions = node.dimensions +nodes.rangedimensions = node.rangedimensions +nodes.endofmath = node.end_of_math +nodes.flush = node.flush_node +nodes.flushnode = node.flush_node +nodes.flushlist = node.flush_list +nodes.free = node.free +nodes.insertafter = node.insert_after +nodes.insertbefore = node.insert_before +nodes.hpack = node.hpack +nodes.new = node.new +nodes.tail = node.tail +nodes.traverse = node.traverse +nodes.traverseid = node.traverse_id +nodes.traversechar = node.traverse_char +nodes.traverseglyph = node.traverse_glyph +nodes.traverselist = node.traverse_list +nodes.slide = node.slide +nodes.vpack = node.vpack +nodes.fields = node.fields +nodes.isnode = node.is_node +nodes.isdirect = node.is_direct +nodes.isnut = node.is_direct +nodes.setglue = node.setglue +nodes.usesfont = node.uses_font + +nodes.firstglyph = node.first_glyph +nodes.hasglyph = node.has_glyph + +nodes.currentattributes = node.current_attributes or node.current_attr +nodes.hasfield = node.has_field +nodes.last_node = node.last_node +nodes.usedlist = node.usedlist +nodes.protrusionskippable = node.protrusion_skippable +nodes.checkdiscretionaries = node.check_discretionaries +nodes.write = node.write +nodes.flattendiscretionaries = node.flatten_discretionaries + +nodes.count = node.count +nodes.length = node.length + +nodes.hasattribute = node.has_attribute +nodes.setattribute = node.set_attribute +nodes.findattribute = node.find_attribute +nodes.unsetattribute = node.unset_attribute + +nodes.protectglyph = node.protect_glyph +nodes.protectglyphs = node.protect_glyphs +nodes.unprotectglyph = node.unprotect_glyph +nodes.unprotectglyphs = node.unprotect_glyphs +nodes.kerning = node.kerning +nodes.ligaturing = node.ligaturing +nodes.hyphenating = node.hyphenating +nodes.mlisttohlist = node.mlist_to_hlist + +nodes.effectiveglue = node.effective_glue +nodes.getglue = node.getglue +nodes.setglue = node.setglue +nodes.iszeroglue = node.iszeroglue nodes.tonode = function(n) return n end nodes.tonut = function(n) return n end @@ -149,7 +151,7 @@ nodes.getfield = n_getfield nodes.setfield = n_setfield nodes.getattr = n_getattr nodes.setattr = n_setattr -nodes.takeattr = nodes.unset_attribute +nodes.takeattr = nodes.unsetattribute local function n_getid (n) return n_getfield(n,"id") end local function n_getsubtype(n) return n_getfield(n,"subtype") end @@ -213,13 +215,13 @@ nodes.setlink = n_setlink nodes.getbox = node.getbox or tex.getbox nodes.setbox = node.setbox or tex.setbox -local n_flush_node = nodes.flush -local n_copy_node = nodes.copy -local n_copy_list = nodes.copy_list -local n_find_tail = nodes.tail -local n_insert_after = nodes.insert_after -local n_insert_before = nodes.insert_before -local n_slide = nodes.slide +local n_flushnode = nodes.flush +local n_copynode = nodes.copy +local n_copylist = nodes.copylist +local n_findtail = nodes.tail +local n_insertafter = nodes.insertafter +local n_insertbefore = nodes.insertbefore +local n_slide = nodes.slide local n_remove_node = node.remove -- not yet nodes.remove @@ -229,7 +231,7 @@ local function remove(head,current,free_too) if not t then -- forget about it elseif free_too then - n_flush_node(t) + n_flushnode(t) t = nil else n_setboth(t) @@ -266,10 +268,10 @@ function nodes.replace(head,current,new) -- no head returned if false if head == current then head = new end - n_flush_node(current) + n_flushnode(current) return head, new else - n_flush_node(current) + n_flushnode(current) return new end end @@ -278,14 +280,14 @@ end function nodes.append(head,current,...) for i=1,select("#",...) do - head, current = n_insert_after(head,current,(select(i,...))) + head, current = n_insertafter(head,current,(select(i,...))) end return head, current end function nodes.prepend(head,current,...) for i=1,select("#",...) do - head, current = n_insert_before(head,current,(select(i,...))) + head, current = n_insertbefore(head,current,(select(i,...))) end return head, current end @@ -300,7 +302,7 @@ function nodes.linked(...) else head = next end - last = n_find_tail(next) -- we could skip the last one + last = n_findtail(next) -- we could skip the last one end end return head @@ -391,7 +393,7 @@ metatable.__concat = function(n1,n2) -- todo: accept nut on one end -- or abort return n2 -- or n2 * 2 else - local tail = n_find_tail(n1) + local tail = n_findtail(n1) n_setlink(tail,n2) return n1 end @@ -406,19 +408,19 @@ metatable.__mul = function(n,multiplier) elseif n_getnext(n) then local head for i=2,multiplier do - local h = n_copy_list(n) + local h = n_copylist(n) if head then - local t = n_find_tail(h) + local t = n_findtail(h) n_setlink(t,head) end head = h end - local t = n_find_tail(n) + local t = n_findtail(n) n_setlink(t,head) else local head for i=2,multiplier do - local c = n_copy_node(n) + local c = n_copynode(n) if head then n_setlink(c,head) end @@ -431,10 +433,10 @@ end metatable.__sub = function(first,second) if type(second) == "number" then - local tail = n_find_tail(first) + local tail = n_findtail(first) for i=1,second do local prev = n_getprev(tail) - n_flush_node(tail) -- can become flushlist/flushnode + n_flushnode(tail) -- can become flushlist/flushnode if prev then tail = prev else @@ -449,15 +451,15 @@ metatable.__sub = function(first,second) end else -- aaaaa - bbb => aaaabbba - local firsttail = n_find_tail(first) + local firsttail = n_findtail(first) local prev = n_getprev(firsttail) if prev then - local secondtail = n_find_tail(second) + local secondtail = n_findtail(second) n_setlink(secondtail,firsttail) n_setlink(prev,second) return first else - local secondtail = n_find_tail(second) + local secondtail = n_findtail(second) n_setlink(secondtail,first) return second end @@ -469,7 +471,7 @@ metatable.__add = function(first,second) local head = second for i=1,first do local second = n_getnext(head) - n_flush_node(head) -- can become flushlist/flushnode + n_flushnode(head) -- can become flushlist/flushnode if second then head = second else @@ -486,7 +488,7 @@ metatable.__add = function(first,second) -- aaaaa + bbb => abbbaaaa local next = n_getnext(first) if next then - local secondtail = n_find_tail(second) + local secondtail = n_findtail(second) n_setlink(first,second) n_setlink(secondtail,next) else @@ -514,12 +516,12 @@ metatable.__pow = function(n,multiplier) local head = nil if n_getnext(n) then if multiplier == 1 then - head = n_copy_list(n) + head = n_copylist(n) else for i=1,multiplier do - local h = n_copy_list(n) + local h = n_copylist(n) if head then - local t = n_find_tail(h) + local t = n_findtail(h) n_setlink(t,head) end head = h @@ -527,10 +529,10 @@ metatable.__pow = function(n,multiplier) end else if multiplier == 1 then - head = n_copy_node(n) + head = n_copynode(n) else for i=2,multiplier do - local c = n_copy_node(n) + local c = n_copynode(n) if head then n_setlink(head,c) end @@ -556,76 +558,3 @@ metatable.__unm = function(head) n_setnext(last) return first end - --- see node-nut.lua for more info on going nuts - --- if not gonuts then --- --- local nuts = { } --- nodes.nuts = nuts --- --- local function dummy(f) return f end --- --- nodes.vianuts = dummy --- nodes.vianodes = dummy --- --- for k, v in next, nodes do --- if type(v) == "function" then --- nuts[k] = v --- end --- end --- --- end - --- also handy - -local tonode = nodes.tonode -local whatsit_code = nodecodes.whatsit -local getfields = node.fields -local sort = table.sort -local whatsitkeys = { } -local keys = { whatsit = whatsitkeys } -local messyhack = table.tohash { -- temporary solution - nodecodes.attributelist, - nodecodes.attribute, - nodecodes.action, -- hm -} - -setmetatableindex(keys,function(t,k) - local v = (k == "attributelist" or k == nodecodes.attributelist) and { } or getfields(k) - if messyhack[k] then - for i=1,#v do - if v[i] == "subtype" then - remove(v,i) - break - end - end - end - if v[ 0] then v[#v+1] = "next" v[ 0] = nil end - if v[-1] then v[#v+1] = "prev" v[-1] = nil end - sort(v) - t[k] = v - return v -end) - -setmetatableindex(whatsitkeys,function(t,k) - local v = getfields(whatsit_code,k) - if v[ 0] then v[#v+1] = "next" v[ 0] = nil end - if v[-1] then v[#v+1] = "prev" v[-1] = nil end - sort(v) - t[k] = v - return v -end) - -local function nodefields(n) - n = tonode(n) - local id = n.id - if id == whatsit_code then - return whatsitkeys[n.subtype] - else - return keys[id] - end -end - -nodes.keys = keys -- [id][subtype] -nodes.fields = nodefields -- (n) diff --git a/Master/texmf-dist/tex/context/base/mkiv/node-mig.lua b/Master/texmf-dist/tex/context/base/mkiv/node-mig.lua index 13414c560c7..06400326982 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/node-mig.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/node-mig.lua @@ -6,8 +6,6 @@ if not modules then modules = { } end modules ['node-mig'] = { license = "see context related readme files" } --- todo: insert_after - local format = string.format local trace_migrations = false trackers.register("nodes.migrations", function(v) trace_migrations = v end) diff --git a/Master/texmf-dist/tex/context/base/mkiv/node-nut.lua b/Master/texmf-dist/tex/context/base/mkiv/node-nut.lua index 9909194e7ae..dcd08f31766 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/node-nut.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/node-nut.lua @@ -1,4 +1,4 @@ -if not modules then modules = { } end modules ['node-nut'] = { + if not modules then modules = { } end modules ['node-nut'] = { version = 1.001, comment = "companion to node-ini.mkiv", author = "Hans Hagen, PRAGMA-ADE, Hasselt NL", @@ -88,131 +88,106 @@ if not modules then modules = { } end modules ['node-nut'] = { local type, rawget = type, rawget -local nodes = nodes -local direct = node.direct +local nodes = nodes +local direct = node.direct -local fastcopy = table.fastcopy +local fastcopy = table.fastcopy -local nodecodes = nodes.nodecodes -local hlist_code = nodecodes.hlist -local vlist_code = nodecodes.vlist -local glyph_code = nodecodes.glyph +local nodecodes = nodes.nodecodes +local hlist_code = nodecodes.hlist +local vlist_code = nodecodes.vlist +local glyph_code = nodecodes.glyph -local nuts = nodes.nuts or { } -nodes.nuts = nuts +local nuts = nodes.nuts or { } +nodes.nuts = nuts -nodes.is_node = direct.is_node or function() return true end -nodes.is_direct = direct.is_direct or function() return false end -nodes.is_nut = nodes.is_direct +nodes.isnode = direct.isnode or function() return true end +nodes.isdirect = direct.isdirect or function() return false end +nodes.isnut = nodes.isdirect -- casters -local tonode = direct.tonode or function(n) return n end -local tonut = direct.todirect or function(n) return n end +local tonode = direct.tonode or function(n) return n end +local tonut = direct.todirect or function(n) return n end -nuts.tonode = tonode -nuts.tonut = tonut +nuts.tonode = tonode +nuts.tonut = tonut -nodes.tonode = tonode -nodes.tonut = tonut - --- -- some tracing: --- --- local hash = table.setmetatableindex("number") --- local ga = direct.get_attribute --- function direct.get_attribute(n,a) --- hash[a] = hash[a] + 1 --- return ga(n,a) --- end --- function nuts.reportattr() --- inspect(hash) --- end - --- local function track(name) --- local n = 0 --- local f = direct[name] --- direct[name] = function(...) --- n = n + 1 --- if n % 1000 == 0 then --- print(name,n) --- end --- return f(...) --- end --- end --- track("getfield") +nodes.tonode = tonode +nodes.tonut = tonut -- helpers local nuts = nodes.nuts -nuts.check_discretionaries = direct.check_discretionaries +nuts.checkdiscretionaries = direct.check_discretionaries nuts.copy = direct.copy -nuts.copy_node = direct.copy -nuts.copy_only = direct.copy_only or direct.copy -nuts.copy_list = direct.copy_list +nuts.copynode = direct.copy +nuts.copyonly = direct.copy_only or direct.copy +nuts.copylist = direct.copy_list nuts.count = direct.count -nuts.current_attr = direct.current_attr +nuts.currentattribute = direct.current_attr +nuts.currentattr = direct.current_attr nuts.delete = direct.delete nuts.dimensions = direct.dimensions -nuts.end_of_math = direct.end_of_math -nuts.find_attribute = direct.find_attribute -nuts.first_glyph = direct.first_glyph -nuts.flatten_discretionaries = direct.flatten_discretionaries +nuts.endofmath = direct.end_of_math +nuts.findattribute = direct.find_attribute +nuts.firstglyph = direct.first_glyph +nuts.flattendiscretionaries = direct.flatten_discretionaries nuts.flush = direct.flush_node -nuts.flush_list = direct.flush_list -nuts.flush_node = direct.flush_node +nuts.flushlist = direct.flush_list +nuts.flushnode = direct.flush_node nuts.free = direct.free -nuts.get_synctex_fields = direct.get_synctex_fields -nuts.has_attribute = direct.has_attribute -nuts.has_field = direct.has_field -nuts.has_glyph = direct.has_glyph or direct.first_glyph +nuts.getsynctexfields = direct.get_synctex_fields +nuts.hasattribute = direct.has_attribute +nuts.hasfield = direct.has_field +nuts.hasglyph = direct.has_glyph or direct.first_glyph nuts.hpack = direct.hpack -nuts.insert_after = direct.insert_after -nuts.insert_before = direct.insert_before -nuts.is_direct = direct.is_direct -nuts.is_node = direct.is_node -nuts.is_nut = direct.is_direct +nuts.insertafter = direct.insert_after +nuts.insertbefore = direct.insert_before +nuts.isdirect = direct.is_direct +nuts.isnode = direct.is_node +nuts.isnut = direct.is_direct nuts.kerning = direct.kerning nuts.hyphenating = direct.hyphenating -nuts.last_node = direct.last_node +nuts.lastnode = direct.last_node nuts.length = direct.length nuts.ligaturing = direct.ligaturing nuts.new = direct.new -nuts.protect_glyph = direct.protect_glyph -nuts.protect_glyphs = direct.protect_glyphs -nuts.flush_components = direct.flush_components -nuts.protrusion_skippable = direct.protrusion_skippable +nuts.protectglyph = direct.protect_glyph +nuts.protectglyphs = direct.protect_glyphs +nuts.protrusionskippable = direct.protrusion_skippable nuts.rangedimensions = direct.rangedimensions -nuts.set_attribute = direct.set_attribute -nuts.set_synctex_fields = direct.set_synctex_fields +nuts.setattribute = direct.set_attribute +nuts.setsynctexfields = direct.set_synctex_fields nuts.slide = direct.slide nuts.tail = direct.tail nuts.tostring = direct.tostring nuts.traverse = direct.traverse -nuts.traverse_char = direct.traverse_char -nuts.traverse_glyph = direct.traverse_glyph -nuts.traverse_id = direct.traverse_id -nuts.traverse_list = direct.traverse_list -nuts.unprotect_glyph = direct.unprotect_glyph -nuts.unprotect_glyphs = direct.unprotect_glyphs -nuts.unset_attribute = direct.unset_attribute -nuts.unset_attribute = direct.unset_attribute +nuts.traversechar = direct.traverse_char +nuts.traverseglyph = direct.traverse_glyph +nuts.traverseid = direct.traverse_id +nuts.traverselist = direct.traverse_list +nuts.unprotectglyph = direct.unprotect_glyph +nuts.unprotectglyphs = direct.unprotect_glyphs +nuts.unsetattribute = direct.unset_attribute +nuts.unsetattribute = direct.unset_attribute nuts.usedlist = direct.usedlist -nuts.uses_font = direct.uses_font +nuts.usesfont = direct.uses_font nuts.vpack = direct.vpack nuts.write = direct.write -nuts.mlist_to_hlist = direct.mlist_to_hlist -nuts.has_dimensions = direct.has_dimensions -nuts.start_of_par = direct.start_of_par +nuts.mlisttohlist = direct.mlist_to_hlist +nuts.hasdimensions = direct.has_dimensions +nuts.startofpar = direct.start_of_par nuts.migrate = direct.migrate -if not nuts.mlist_to_hlist then +if not nuts.mlisttohlist then - local n_mlist_to_hlist = node.mlist_to_hlist + local n_mlisttohlist = node.mlist_to_hlist - function nuts.mlist_to_hlist(head,...) + function nuts.mlisttohlist(head,...) if head then - local head = n_mlist_to_hlist(tonode(head),...) + local head = n_mlisttohlist(tonode(head),...) if head then return tonut(head) end @@ -221,11 +196,11 @@ if not nuts.mlist_to_hlist then end -if not nuts.has_dimensions then +if not nuts.hasdimensions then local getwhd = direct.getwhd - function nuts.has_dimensions(n) + function nuts.hasdimensions(n) local wd, ht, dp = getwhd(n) return wd ~= 0 or (ht + dp) ~= 0 end @@ -246,16 +221,20 @@ nuts.getid = direct.getid nuts.getprev = direct.getprev nuts.setprev = direct.setprev -local get_attribute = direct.get_attribute -local set_attribute = direct.set_attribute -local unset_attribute = direct.unset_attribute +local getattribute = direct.get_attribute +local setattribute = direct.set_attribute +local unsetattribute = direct.unset_attribute + +nuts.getattr = getattribute +nuts.setattr = setattribute +nuts.takeattr = unsetattribute -- ? -nuts.getattr = get_attribute -nuts.setattr = set_attribute -nuts.takeattr = unset_attribute -- ? +nuts.getattribute = getattribute +nuts.setattribute = setattribute +nuts.unsetattribute = unsetattribute -- ? -nuts.is_zero_glue = direct.is_zero_glue -nuts.effective_glue = direct.effective_glue +nuts.iszeroglue = direct.is_zero_glue +nuts.effectiveglue = direct.effective_glue nuts.getglue = direct.getglue nuts.setglue = direct.setglue @@ -302,8 +281,8 @@ nuts.gettotal = direct.gettotal nuts.getorientation = direct.getorientation or function() end nuts.setorientation = direct.setorientation or function() end -nuts.getglyphdata = direct.getglyphdata or get_attribute -nuts.setglyphdata = direct.setglyphdata or function(n,d) set_attribute(n,0,d) end +nuts.getglyphdata = direct.getglyphdata or getattribute +nuts.setglyphdata = direct.setglyphdata or function(n,d) setattribute(n,0,d) end nuts.getruledata = direct.getglyphdata and getdata or function(n) return getfield(n,"transform") end nuts.setruledata = direct.setglyphdata and setdata or function(n,d) return setfield(n,"transform",d) end @@ -381,20 +360,16 @@ nuts.setbox = direct.setbox nuts.ischar = direct.is_char nuts.isglyph = direct.is_glyph -----.is_char = nuts.ischar -----.is_glyph = nuts.isglyph - local d_remove_node = direct.remove -local d_flush_node = direct.flush_node +local d_flushnode = direct.flush_node local d_getnext = direct.getnext local d_getprev = direct.getprev local d_getid = direct.getid local d_getlist = direct.getlist local d_find_tail = direct.tail -local d_insert_after = direct.insert_after -local d_insert_before = direct.insert_before +local d_insertafter = direct.insert_after +local d_insertbefore = direct.insert_before local d_slide = direct.slide ------ d_copy_node = direct.copy local d_traverse = direct.traverse local d_setlink = direct.setlink local d_setboth = direct.setboth @@ -404,7 +379,7 @@ local remove = function(head,current,free_too) if current then local h, c = d_remove_node(head,current) if free_too then - d_flush_node(current) + d_flushnode(current) return h, c else d_setboth(current) @@ -416,7 +391,7 @@ end -- for now -if not nuts.start_of_par then +if not nuts.startofpar then local parcodes = nodes.parcodes local hmodepar_code = parcodes.vmode_par @@ -424,7 +399,7 @@ if not nuts.start_of_par then local getsubtype = nuts.getsubtype - function nuts.start_of_par(n) + function nuts.startofpar(n) local s = getsubtype(n) return s == hmodepar_code or s == vmodepar_code end @@ -467,9 +442,9 @@ if not nuts.getpre then function nuts.getpost (n) local _, h, _, _, t, _ = d_getdisc(n,true) return h, t end function nuts.getreplace(n) local _, _, h, _, _, t = d_getdisc(n,true) return h, t end - function nuts.setpre (n,h) d_setfield(d,"pre", h) end - function nuts.setpost (n,h) d_setfield(d,"post", h) end - function nuts.setreplace(n,h) d_setfield(d,"replace",h) end + function nuts.setpre (n,h) d_setfield(n,"pre", h) end + function nuts.setpost (n,h) d_setfield(n,"post", h) end + function nuts.setreplace(n,h) d_setfield(n,"replace",h) end end @@ -507,10 +482,10 @@ function nuts.replace(head,current,new) -- no head returned if false if head == current then head = new end - d_flush_node(current) + d_flushnode(current) return head, new else - d_flush_node(current) + d_flushnode(current) return new end end @@ -542,14 +517,14 @@ end function nuts.append(head,current,...) for i=1,select("#",...) do - head, current = d_insert_after(head,current,(select(i,...))) + head, current = d_insertafter(head,current,(select(i,...))) end return head, current end function nuts.prepend(head,current,...) for i=1,select("#",...) do - head, current = d_insert_before(head,current,(select(i,...))) + head, current = d_insertbefore(head,current,(select(i,...))) end return head, current end @@ -604,43 +579,7 @@ function nodes.vianodes(f) return function(n,...) return tonut (f(tonode(n),...) nuts.vianuts = nodes.vianuts nuts.vianodes = nodes.vianodes --- function nodes.insert_before(h,c,n) --- if c then --- if c == h then --- n_setfield(n,"next",h) --- n_setfield(n,"prev",nil) --- n_setfield(h,"prev",n) --- else --- local cp = n_getprev(c) --- n_setfield(n,"next",c) --- n_setfield(n,"prev",cp) --- if cp then --- n_setfield(cp,"next",n) --- end --- n_setfield(c,"prev",n) --- return h, n --- end --- end --- return n, n --- end - --- function nodes.insert_after(h,c,n) --- if c then --- local cn = n_getnext(c) --- if cn then --- n_setfield(n,"next",cn) --- n_setfield(cn,"prev",n) --- else --- n_setfield(n,"next",nil) --- end --- n_setfield(c,"next",n) --- n_setfield(n,"prev",c) --- return h, n --- end --- return n, n --- end - -function nodes.insert_list_after(h,c,n) +function nodes.insertlistafter(h,c,n) local t = n_tail(n) if c then local cn = n_getnext(c) @@ -658,41 +597,7 @@ function nodes.insert_list_after(h,c,n) return n, t end --- function nuts.insert_before(h,c,n) --- if c then --- if c == h then --- d_setnext(n,h) --- d_setprev(n) --- d_setprev(h,n) --- else --- local cp = d_getprev(c) --- d_setnext(n,c) --- d_setprev(n,cp) --- if cp then --- d_setnext(cp,n) --- end --- d_setprev(c,n) --- return h, n --- end --- end --- return n, n --- end - --- function nuts.insert_after(h,c,n) --- if c then --- local cn = d_getnext(c) --- if cn then --- d_setlink(n,cn) --- else --- d_setnext(n,nil) --- end --- d_setlink(c,n) --- return h, n --- end --- return n, n --- end - -function nuts.insert_list_after(h,c,n) +function nuts.insertlistafter(h,c,n) local t = d_tail(n) if c then local cn = d_getnext(c) @@ -909,8 +814,8 @@ nuts.getstate = getstate local getscript = direct.getscript or function(n,v) end -- elsewhere local setscript = direct.setscript or function(n,v) end -- elsewhere -nuts.setscript = getscript -nuts.getscript = setscript +nuts.setscript = setscript +nuts.getscript = getscript function nuts.isdone(n,k) local p = propertydata[n] diff --git a/Master/texmf-dist/tex/context/base/mkiv/node-ppt.lua b/Master/texmf-dist/tex/context/base/mkiv/node-ppt.lua index 485e742b64a..35dc07d55a8 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/node-ppt.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/node-ppt.lua @@ -77,7 +77,7 @@ local function register(where,data,...) end end -local writenode = node.write +local writenode = nodes.write local flushnode = context.nodes.flush function commands.deferredproperty(...) diff --git a/Master/texmf-dist/tex/context/base/mkiv/node-pro.lua b/Master/texmf-dist/tex/context/base/mkiv/node-pro.lua index 4d748af89bd..8c8356e0424 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/node-pro.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/node-pro.lua @@ -65,11 +65,9 @@ do end -processors.enabled = true -- this will become a proper state (like trackers) - do - local has_glyph = nodes.has_glyph + local hasglyph = nodes.hasglyph local count_nodes = nodes.countall local texget = tex.get @@ -77,7 +75,7 @@ do local tracer = processors.tracer local function pre_linebreak_filter(head,groupcode) - local found = force_processors or has_glyph(head) + local found = force_processors or hasglyph(head) if found then if trace_callbacks then local before = count_nodes(head,true) @@ -95,7 +93,7 @@ do end local function hpack_filter(head,groupcode,size,packtype,direction,attributes) - local found = force_processors or has_glyph(head) + local found = force_processors or hasglyph(head) if found then -- -- yes or no or maybe an option @@ -148,7 +146,7 @@ do end do - -- Beware, these are packaged boxes so no first_glyph test needed. Maybe some day I'll add a hash + -- Beware, these are packaged boxes so no firstglyph test needed. Maybe some day I'll add a hash -- with valid groupcodes. Watch out, much can pass twice, for instance vadjust passes two times, local actions = tasks.actions("finalizers") -- head, where diff --git a/Master/texmf-dist/tex/context/base/mkiv/node-ref.lua b/Master/texmf-dist/tex/context/base/mkiv/node-ref.lua index 098ed50c28e..2cade31ded3 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/node-ref.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/node-ref.lua @@ -78,7 +78,8 @@ local getdimensions = nuts.dimensions local getrangedimensions = nuts.rangedimensions local traverse = nuts.traverse local find_node_tail = nuts.tail -local start_of_par = nuts.start_of_par + +local startofpar = nuts.startofpar local nodecodes = nodes.nodecodes local gluecodes = nodes.gluecodes @@ -107,7 +108,7 @@ local new_rule = nodepool.rule local new_kern = nodepool.kern local new_hlist = nodepool.hlist -local flush_node = nuts.flush +local flushnode = nuts.flush local tosequence = nodes.tosequence @@ -135,7 +136,7 @@ local function vlist_dimensions(start,stop) -- also needs the stretch and so local v = vpack_list(start) local w, h, d = getwhd(v) setlist(v) -- not needed - flush_node(v) + flushnode(v) if temp then setnext(stop,temp) end @@ -421,7 +422,7 @@ local function inject_areas(head,attribute,make,stack,done,skip,parent,pardir,tx local direction, pop = getdirection(current) txtdir = not pop and direction -- we might need a stack elseif id == par_code then - if start_of_par(current) then + if startofpar(current) then pardir = getdirection(current) end elseif id == glue_code and getsubtype(current) == leftskip_code then -- any glue at the left? diff --git a/Master/texmf-dist/tex/context/base/mkiv/node-res.lua b/Master/texmf-dist/tex/context/base/mkiv/node-res.lua index 478a46906e0..5c669f9da0e 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/node-res.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/node-res.lua @@ -99,7 +99,7 @@ local setdata = nuts.setdata local setruledata = nuts.setruledata local setvalue = nuts.setvalue -local copy_nut = nuts.copy_only or nuts.copy +local copy_nut = nuts.copy local new_nut = nuts.new local flush_nut = nuts.flush @@ -173,19 +173,10 @@ local savepos = register_nut(new_nut(whatsit_code,whatsitcodes.savepos local user_node = new_nut(whatsit_code,whatsitcodes.userdefined) -if CONTEXTLMTXMODE == 0 then - setfield(user_node,"type",usercodes.number) -end - -local left_margin_kern, right_margin_kern +setfield(user_node,"type",usercodes.number) -if CONTEXTLMTXMODE > 0 then - left_margin_kern = register_nut(new_nut(kern_code,kerncodes.leftmargincode)) - right_margin_kern = register_nut(new_nut(kern_code,kerncodes.rightmargincode)) -else - left_margin_kern = register_nut(new_nut(nodecodes.marginkern,0)) - right_margin_kern = register_nut(new_nut(nodecodes.marginkern,1)) -end +local left_margin_kern = register_nut(new_nut(nodecodes.marginkern,0)) +local right_margin_kern = register_nut(new_nut(nodecodes.marginkern,1)) local lineskip = register_nut(new_nut(glue_code,gluecodes.lineskip)) local baselineskip = register_nut(new_nut(glue_code,gluecodes.baselineskip)) @@ -429,27 +420,15 @@ function nutpool.savepos() return copy_nut(savepos) end -if CONTEXTLMTXMODE == 0 then - - function nutpool.latelua(code) - local n = copy_nut(latelua) - if type(code) == "table" then - local action = code.action - local specification = code.specification or code - code = function() action(specification) end - end - setdata(n,code) - return n - end - -else - - function nutpool.latelua(code) - local n = copy_nut(latelua) - nodeproperties[n] = { data = code } - return n +function nutpool.latelua(code) + local n = copy_nut(latelua) + if type(code) == "table" then + local action = code.action + local specification = code.specification or code + code = function() action(specification) end end - + setdata(n,code) + return n end function nutpool.leftmarginkern(glyph,width) @@ -575,7 +554,7 @@ local function cleanup(nofboxes) -- todo return nr, nl, nofboxes -- can be nil end -local usage = CONTEXTLMTXMODE > 0 and node.inuse or function() +local function usage() local t = { } for n, tag in gmatch(status.node_mem_usage,"(%d+) ([a-z_]+)") do t[tag] = tonumber(n) or 0 @@ -583,7 +562,7 @@ local usage = CONTEXTLMTXMODE > 0 and node.inuse or function() return t end -local stock = CONTEXTLMTXMODE > 0 and node.instock or { } +local stock = { } nutpool .cleanup = cleanup nodepool.cleanup = cleanup @@ -611,25 +590,25 @@ statistics.register("node memory usage", function() -- comes after cleanup ! end end) -lua.registerfinalizer(cleanup, "cleanup reserved nodes") +lua.registerinitexfinalizer(cleanup, "cleanup reserved nodes") -- experiment do - local glyph = tonode(glyph) - local traverse_id = nodes.traverse_id + local glyph = tonode(glyph) + local traverseid = nodes.traverseid - local traversers = table.setmetatableindex(function(t,k) - local v = traverse_id(type(k) == "number" and k or nodecodes[k],glyph) + local traversers = table.setmetatableindex(function(t,k) + local v = traverseid(type(k) == "number" and k or nodecodes[k],glyph) t[k] = v return v end) - traversers.node = nodes.traverse (glyph) - traversers.char = nodes.traverse_char (glyph) - if nodes.traverse_glyph then traversers.glyph = nodes.traverse_glyph(glyph) end - if nodes.traverse_list then traversers.list = nodes.traverse_list (glyph) end + traversers.node = nodes.traverse (glyph) + traversers.char = nodes.traversechar (glyph) + if nodes.traverseglyph then traversers.glyph = nodes.traverseglyph(glyph) end + if nodes.traverselist then traversers.list = nodes.traverselist (glyph) end nodes.traversers = traversers @@ -637,20 +616,20 @@ end do - local glyph = glyph - local traverse_id = nuts.traverse_id + local glyph = glyph + local traverseid = nuts.traverseid - local traversers = table.setmetatableindex(function(t,k) - local v = traverse_id(type(k) == "number" and k or nodecodes[k],glyph) + local traversers = table.setmetatableindex(function(t,k) + local v = traverseid(type(k) == "number" and k or nodecodes[k],glyph) t[k] = v return v end) - traversers.node = nuts.traverse (glyph) - traversers.char = nuts.traverse_char (glyph) - if nuts.traverse_glyph then traversers.glyph = nuts.traverse_glyph (glyph) end - if nuts.traverse_list then traversers.list = nuts.traverse_list (glyph) end - if nuts.traverse_content then traversers.content = nuts.traverse_content(glyph) end + traversers.node = nuts.traverse (glyph) + traversers.char = nuts.traversechar (glyph) + if nuts.traverseglyph then traversers.glyph = nuts.traverseglyph (glyph) end + if nuts.traverselist then traversers.list = nuts.traverselist (glyph) end + if nuts.traversecontent then traversers.content = nuts.traversecontent(glyph) end nuts.traversers = traversers diff --git a/Master/texmf-dist/tex/context/base/mkiv/node-rul.lua b/Master/texmf-dist/tex/context/base/mkiv/node-rul.lua index f60fb2406a7..7ef58e97062 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/node-rul.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/node-rul.lua @@ -57,15 +57,15 @@ local getruledata = nuts.getruledata local isglyph = nuts.isglyph -local flushlist = nuts.flush_list -local effective_glue = nuts.effective_glue -local insert_node_after = nuts.insert_after -local insert_node_before = nuts.insert_before +local flushlist = nuts.flushlist +local effectiveglue = nuts.effectiveglue +local insertnodeafter = nuts.insertafter +local insertnodebefore = nuts.insertbefore local find_tail = nuts.tail local setglue = nuts.setglue local getrangedimensions = nuts.rangedimensions local hpack_nodes = nuts.hpack -local copy_list = nuts.copy_list +local copylist = nuts.copylist local nexthlist = nuts.traversers.hlist @@ -317,7 +317,7 @@ local function flush_ruled(head,f,l,d,level,parent,strip) -- not that fast but a setattr(r,a_viewerlayer,layer) end if empty then - head = insert_node_before(head,f,r) + head = insertnodebefore(head,f,r) setlink(r,getnext(l)) setprev(f) setnext(l) @@ -325,12 +325,12 @@ local function flush_ruled(head,f,l,d,level,parent,strip) -- not that fast but a else local k = new_kern(-wd) if foreground then - insert_node_after(head,l,k) - insert_node_after(head,k,r) + insertnodeafter(head,l,k) + insertnodeafter(head,k,r) l = r else - head = insert_node_before(head,f,r) - insert_node_after(head,r,k) + head = insertnodebefore(head,f,r) + insertnodeafter(head,r,k) end end if trace_ruled then @@ -356,7 +356,7 @@ local function flush_ruled(head,f,l,d,level,parent,strip) -- not that fast but a else local tx = d.text if tx then - local l = copy_list(tx) + local l = copylist(tx) if d["repeat"] == v_yes then l = new_leader(wd,l) setattrlist(l,tx) @@ -603,7 +603,7 @@ function linefillers.handler(head) if head then local indentation = iskip and getwidth(iskip) or 0 local leftfixed = lskip and getwidth(lskip) or 0 - local lefttotal = lskip and effective_glue(lskip,current) or 0 + local lefttotal = lskip and effectiveglue(lskip,current) or 0 local width = lefttotal - (leftlocal and leftfixed or 0) + indentation - distance if width > threshold then if iskip then @@ -612,13 +612,13 @@ function linefillers.handler(head) if lskip then setglue(lskip,leftlocal and getwidth(lskip) or nil) if distance > 0 then - insert_node_after(list,lskip,new_kern(distance)) + insertnodeafter(list,lskip,new_kern(distance)) end - insert_node_after(list,lskip,linefiller(current,data,width,"left")) + insertnodeafter(list,lskip,linefiller(current,data,width,"left")) else - insert_node_before(list,head,linefiller(current,data,width,"left")) + insertnodebefore(list,head,linefiller(current,data,width,"left")) if distance > 0 then - insert_node_before(list,head,new_kern(distance)) + insertnodebefore(list,head,new_kern(distance)) end end end @@ -642,9 +642,9 @@ function linefillers.handler(head) end if tail then local rightfixed = rskip and getwidth(rskip) or 0 - local righttotal = rskip and effective_glue(rskip,current) or 0 + local righttotal = rskip and effectiveglue(rskip,current) or 0 local parfixed = pskip and getwidth(pskip) or 0 - local partotal = pskip and effective_glue(pskip,current) or 0 + local partotal = pskip and effectiveglue(pskip,current) or 0 local width = righttotal - (rightlocal and rightfixed or 0) + partotal - distance if width > threshold then if pskip then @@ -653,13 +653,13 @@ function linefillers.handler(head) if rskip then setglue(rskip,rightlocal and getwidth(rskip) or nil) if distance > 0 then - insert_node_before(list,rskip,new_kern(distance)) + insertnodebefore(list,rskip,new_kern(distance)) end - insert_node_before(list,rskip,linefiller(current,data,width,"right")) + insertnodebefore(list,rskip,linefiller(current,data,width,"right")) else - insert_node_after(list,tail,linefiller(current,data,width,"right")) + insertnodeafter(list,tail,linefiller(current,data,width,"right")) if distance > 0 then - insert_node_after(list,tail,new_kern(distance)) + insertnodeafter(list,tail,new_kern(distance)) end end end diff --git a/Master/texmf-dist/tex/context/base/mkiv/node-rul.mkiv b/Master/texmf-dist/tex/context/base/mkiv/node-rul.mkiv index 660c0d4e617..84463f21f2c 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/node-rul.mkiv +++ b/Master/texmf-dist/tex/context/base/mkiv/node-rul.mkiv @@ -341,16 +341,17 @@ [undergraphic] [\c!mp=rules:under:dash, \c!offset=-.2, + \c!continue=\v!yes, \c!order=\v!background] \definebar[underrandom] [undergraphic][\c!mp=rules:under:random] -\definebar[underrandoms][underrandom] [\c!continue=\v!yes] +\definebar[underrandoms][underrandom] [\c!continue=\v!no] \definebar[underdash] [undergraphic][\c!mp=rules:under:dash] -\definebar[underdashes] [underdash] [\c!continue=\v!yes] +\definebar[underdashes] [underdash] [\c!continue=\v!no] \definebar[underdot] [undergraphic][\c!mp=rules:under:dots] -\definebar[underdots] [underdot] [\c!continue=\v!yes] +\definebar[underdots] [underdot] [\c!continue=\v!no] %D This will move: (a bit duplicated) diff --git a/Master/texmf-dist/tex/context/base/mkiv/node-scn.lua b/Master/texmf-dist/tex/context/base/mkiv/node-scn.lua index 0ec1ba387c9..55f39a74b6a 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/node-scn.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/node-scn.lua @@ -21,8 +21,6 @@ local getsubtype = nuts.getsubtype local getlist = nuts.getlist local setlist = nuts.setlist -local end_of_math = nuts.end_of_math - local nodecodes = nodes.nodecodes local gluecodes = nodes.gluecodes local kerncodes = nodes.kerncodes @@ -122,7 +120,9 @@ local function processwords(attribute,data,flush,head,parent,skip) -- we have hl local continue, leaders, done, strip, level = false, false, false, true, -1 while n do local id = getid(n) - if id == glyph_code or id == rule_code or (id == hlist_code and getattr(n,a_runningtext)) then + if id == glyph_code or id == rule_code or (id == hlist_code and getattr(n,a_runningtext)) +or id == disc_code or id == boundary_code + then local aa = getattr(n,attribute) if aa and aa ~= skip then if aa == a then @@ -164,10 +164,10 @@ local function processwords(attribute,data,flush,head,parent,skip) -- we have hl setlist(n,(processwords(attribute,data,flush,list,n,aa))) -- watch () end end - elseif id == disc_code or id == boundary_code then - if f then - l = n - end +-- elseif id == disc_code or id == boundary_code then +-- if f then +-- l = n +-- end elseif id == kern_code and getsubtype(n) == fontkern_code then if f then l = n diff --git a/Master/texmf-dist/tex/context/base/mkiv/node-ser.lua b/Master/texmf-dist/tex/context/base/mkiv/node-ser.lua index 25a6dd6c39d..ee2abe0d24e 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/node-ser.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/node-ser.lua @@ -17,14 +17,11 @@ local allocate = utilities.storage.allocate local context = context local nodes = nodes -local node = node - -local is_node = nodes.is_node +local isnode = nodes.isnode local nodecodes = nodes.nodecodes local subtcodes = nodes.codes local getfields = nodes.fields - local tonode = nodes.tonode local tonut = nodes.tonut @@ -130,13 +127,13 @@ end nodes.astable = astable -setinspector("node",function(v) if is_node(v) then printtable(astable(v),tostring(v)) return true end end) +setinspector("node",function(v) if isnode(v) then printtable(astable(v),tostring(v)) return true end end) -- under construction: local function totable(n,flat,verbose,noattributes) -- nicest: n,true,true,true local function to_table(n,flat,verbose,noattributes) -- no need to pass - local f = getfields(n) + local f = getfields(n.id) local tt = { } for k=1,#f do local v = f[k] diff --git a/Master/texmf-dist/tex/context/base/mkiv/node-shp.lua b/Master/texmf-dist/tex/context/base/mkiv/node-shp.lua index 58dc944951a..b867f564a9e 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/node-shp.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/node-shp.lua @@ -121,7 +121,7 @@ local removables = { -- -- handlers.cleanuppage = cleanup_redundant -- nut -handlers.cleanuppage = nuts.flatten_discretionaries +handlers.cleanuppage = nuts.flattendiscretionaries local function cleanup_flushed(head) -- rough local start = head diff --git a/Master/texmf-dist/tex/context/base/mkiv/node-syn.lua b/Master/texmf-dist/tex/context/base/mkiv/node-syn.lua index d9c653abbb0..4014445b0a5 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/node-syn.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/node-syn.lua @@ -125,7 +125,7 @@ if not modules then modules = { } end modules ['node-syn'] = { local type, rawset = type, rawset local concat = table.concat local formatters = string.formatters -local replacesuffix, suffixonly, nameonly = file.replacesuffix, file.suffix, file.nameonly +local replacesuffix, suffixonly, nameonly, collapsepath = file.replacesuffix, file.suffix, file.nameonly, file.collapsepath local openfile, renamefile, removefile = io.open, os.rename, os.remove local report_system = logs.reporter("system") @@ -159,8 +159,8 @@ local fontkern_code = kerncodes.fontkern local cancel_code = nodes.dircodes.cancel -local insert_before = nuts.insert_before -local insert_after = nuts.insert_after +local insertbefore = nuts.insertbefore +local insertafter = nuts.insertafter local nodepool = nuts.pool local new_latelua = nodepool.latelua @@ -170,7 +170,7 @@ local new_kern = nodepool.kern local getdimensions = nuts.dimensions local getrangedimensions = nuts.rangedimensions -local getsynctexfields = nuts.getsynctexfields or nuts.get_synctex_fields +local getsynctexfields = nuts.getsynctexfields local forcesynctextag = tex.forcesynctextag or tex.force_synctex_tag local forcesynctexline = tex.forcesynctexline or tex.force_synctex_line local getsynctexline = tex.getsynctexline or tex.get_synctex_line @@ -231,7 +231,8 @@ local blockedsuffixes = { -- lfg = true, } -local sttags = table.setmetatableindex(function(t,name) +local sttags = table.setmetatableindex(function(t,fullname) + local name = collapsepath(fullname) if blockedsuffixes[suffixonly(name)] then -- Just so that I don't get the ones on my development tree. nofblocked = nofblocked + 1 @@ -247,6 +248,9 @@ local sttags = table.setmetatableindex(function(t,name) else noftags = noftags + 1 t[name] = noftags + if name ~= fullname then + t[fullname] = noftags + end stnums[noftags] = name return noftags end @@ -391,27 +395,27 @@ end -- end -- -- local function b_vlist(head,current,t,l,w,h,d) --- return insert_before(head,current,new_latelua(function() doaction(f_vlist,t,l,w,h,d) end)) +-- return insertbefore(head,current,new_latelua(function() doaction(f_vlist,t,l,w,h,d) end)) -- end -- -- local function b_hlist(head,current,t,l,w,h,d) --- return insert_before(head,current,new_latelua(function() doaction(f_hlist,t,l,w,h,d) end)) +-- return insertbefore(head,current,new_latelua(function() doaction(f_hlist,t,l,w,h,d) end)) -- end -- -- local function e_vlist(head,current) --- return insert_after(head,current,new_latelua(noaction(s_vlist))) +-- return insertafter(head,current,new_latelua(noaction(s_vlist))) -- end -- -- local function e_hlist(head,current) --- return insert_after(head,current,new_latelua(noaction(s_hlist))) +-- return insertafter(head,current,new_latelua(noaction(s_hlist))) -- end -- -- local function x_vlist(head,current,t,l,w,h,d) --- return insert_before(head,current,new_latelua(function() doaction(f_vlist_1,t,l,w,h,d) end)) +-- return insertbefore(head,current,new_latelua(function() doaction(f_vlist_1,t,l,w,h,d) end)) -- end -- -- local function x_hlist(head,current,t,l,w,h,d) --- return insert_before(head,current,new_latelua(function() doaction(f_hlist_1,t,l,w,h,d) end)) +-- return insertbefore(head,current,new_latelua(function() doaction(f_hlist_1,t,l,w,h,d) end)) -- end -- -- generic @@ -466,7 +470,7 @@ local x_hlist do x_hlist = function(head,current,t,l,w,h,d) if filehandle then - return insert_before(head,current,new_latelua(function() doaction(t,l,w,h,d) end)) + return insertbefore(head,current,new_latelua(function() doaction(t,l,w,h,d) end)) else return head end @@ -502,8 +506,8 @@ local function inject(head,first,last,tag,line) d = depth end if trace then - head = insert_before(head,first,new_rule(w,fulltrace and h or traceheight,fulltrace and d or tracedepth)) - head = insert_before(head,first,new_kern(-w)) + head = insertbefore(head,first,new_rule(w,fulltrace and h or traceheight,fulltrace and d or tracedepth)) + head = insertbefore(head,first,new_kern(-w)) end head = x_hlist(head,first,tag,line,w,h,d) return head @@ -569,8 +573,8 @@ local function inject(parent,head,first,last,tag,line) d = depth end if trace then - head = insert_before(head,first,new_rule(w,fulltrace and h or traceheight,fulltrace and d or tracedepth)) - head = insert_before(head,first,new_kern(-w)) + head = insertbefore(head,first,new_rule(w,fulltrace and h or traceheight,fulltrace and d or tracedepth)) + head = insertbefore(head,first,new_kern(-w)) end head = x_hlist(head,first,tag,line,w,h,d) return head diff --git a/Master/texmf-dist/tex/context/base/mkiv/node-tra.lua b/Master/texmf-dist/tex/context/base/mkiv/node-tra.lua index 83c072c19b0..67435f1c78f 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/node-tra.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/node-tra.lua @@ -50,8 +50,6 @@ local getglue = nuts.getglue local isglyph = nuts.isglyph local getdirection = nuts.getdirection local getwidth = nuts.getwidth - -local flush_list = nuts.flush_list local count_nodes = nuts.countall local used_nodes = nuts.usedlist @@ -79,11 +77,12 @@ local rule_code = nodecodes.rule local dir_code = nodecodes.dir local par_code = nodecodes.par local whatsit_code = nodecodes.whatsit +local passive_code = nodecodes.passive local dimenfactors = number.dimenfactors local formatters = string.formatters -local start_of_par = nuts.start_of_par +local startofpar = nuts.startofpar -- this will be reorganized: @@ -154,7 +153,7 @@ local function tosequence(start,stop,compact) elseif id == dir_code then local d, p = getdirection(start) n = n + 1 ; t[n] = "[<" .. (p and "-" or "+") .. d .. ">]" -- todo l2r etc - elseif id == par_code and start_of_par(current) then + elseif id == par_code and startofpar(current) then n = n + 1 ; t[n] = "[<" .. getdirection(start) .. ">]" -- todo l2r etc elseif compact then n = n + 1 ; t[n] = "[]" @@ -305,57 +304,68 @@ end nodes.showsimplelist = function(h,depth) showsimplelist(h,depth,0) end local function listtoutf(h,joiner,textonly,last,nodisc) - local w = { } - local n = 0 - local g = formatters["<%i>"] - local d = formatters["[%s|%s|%s]"] - while h do - local c, id = isglyph(h) - if c then - n = n + 1 ; w[n] = c >= 0 and utfchar(c) or g(c) - if joiner then - n = n + 1 ; w[n] = joiner - end - elseif id == disc_code then - local pre, pos, rep = getdisc(h) - if not nodisc then - n = n + 1 ; w[n] = d( - pre and listtoutf(pre,joiner,textonly) or "", - pos and listtoutf(pos,joiner,textonly) or "", - rep and listtoutf(rep,joiner,textonly) or "" - ) - elseif rep then - n = n + 1 ; w[n] = listtoutf(rep,joiner,textonly) or "" - end - if joiner then - n = n + 1 ; w[n] = joiner - end - elseif textonly then - if id == glue_code then - if getwidth(h) > 0 then - n = n + 1 ; w[n] = " " + if h then + local w = { } + local n = 0 + local g = formatters["<%i>"] + local d = formatters["[%s|%s|%s]"] + while h do + local c, id = isglyph(h) + if c then + n = n + 1 ; w[n] = c >= 0 and utfchar(c) or g(c) + if joiner then + n = n + 1 ; w[n] = joiner + end + elseif id == disc_code then + local pre, pos, rep = getdisc(h) + if not nodisc then + n = n + 1 ; w[n] = d( + pre and listtoutf(pre,joiner,textonly) or "", + pos and listtoutf(pos,joiner,textonly) or "", + rep and listtoutf(rep,joiner,textonly) or "" + ) + elseif rep then + n = n + 1 ; w[n] = listtoutf(rep,joiner,textonly) or "" + end + if joiner then + n = n + 1 ; w[n] = joiner end - elseif id == hlist_code or id == vlist_code then - n = n + 1 ; w[n] = "[" - n = n + 1 ; w[n] = listtoutf(getlist(h),joiner,textonly,last,nodisc) - n = n + 1 ; w[n] = "]" + elseif id == passive_code then + -- smells like a bug in luatex + print("weird: passive node in listtoutf") + return "" + elseif textonly then + if id == glue_code then + if getwidth(h) > 0 then + n = n + 1 ; w[n] = " " + end + elseif id == hlist_code or id == vlist_code then + local l = getlist(h) + n = n + 1 ; w[n] = "[" + if l then + n = n + 1 ; w[n] = listtoutf(l,joiner,textonly,last,nodisc) + end + n = n + 1 ; w[n] = "]" + end + else + n = n + 1 ; w[n] = "[-]" + end + if h == last then + break + else + h = getnext(h) end - else - n = n + 1 ; w[n] = "[-]" - end - if h == last then - break - else - h = getnext(h) end + return concat(w,"",1,(w[n] == joiner) and (n-1) or n) + else + return "" end - return concat(w,"",1,(w[n] == joiner) and (n-1) or n) end function nodes.listtoutf(h,joiner,textonly,last,nodisc) if h then local joiner = joiner == true and utfchar(0x200C) or joiner -- zwnj - return listtoutf(tonut(h),joiner,textonly,last and tonut(last),nodisc) + return listtoutf(tonut(h),joiner,textonly,last and tonut(last) or nil,nodisc) else return "" end diff --git a/Master/texmf-dist/tex/context/base/mkiv/node-tsk.lua b/Master/texmf-dist/tex/context/base/mkiv/node-tsk.lua index ca7c7fee45b..9e263df9136 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/node-tsk.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/node-tsk.lua @@ -663,6 +663,7 @@ tasks.new { "before", "normalizers", "builders", + "finalizers", "after", }, templates = { diff --git a/Master/texmf-dist/tex/context/base/mkiv/node-tst.lua b/Master/texmf-dist/tex/context/base/mkiv/node-tst.lua index 0dacff37532..c28086f8146 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/node-tst.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/node-tst.lua @@ -16,11 +16,7 @@ local glue_code = nodecodes.glue local penalty_code = nodecodes.penalty local kern_code = nodecodes.kern local glyph_code = nodecodes.glyph -local whatsit_code = nodecodes.whatsit -local hlist_code = nodecodes.hlist -local leftskip_code = gluecodes.leftskip -local rightskip_code = gluecodes.rightskip local abovedisplayshortskip_code = gluecodes.abovedisplayshortskip local belowdisplayshortskip_code = gluecodes.belowdisplayshortskip @@ -35,52 +31,16 @@ local getkern = nuts.getkern local getpenalty = nuts.getpenalty local getwidth = nuts.getwidth -local find_node_tail = nuts.tail - -function nuts.leftmarginwidth(n) -- todo: three values - while n do - local id = getid(n) - if id == glue_code then - return getsubtype(n) == leftskip_code and getwidth(n) or 0 - elseif id == whatsit_code then - n = getnext(n) - elseif id == hlist_code then - return getwidth(n) - else - break - end - end - return 0 -end - -function nuts.rightmarginwidth(n) - if n then - n = find_node_tail(n) - while n do - local id = getid(n) - if id == glue_code then - return getsubtype(n) == rightskip_code and getwidth(n) or 0 - elseif id == whatsit_code then - n = getprev(n) - else - break - end - end - end - return false -end - function nuts.somespace(n,all) if n then local id = getid(n) if id == glue_code then return (all or (getwidth(n) ~= 0)) and glue_code -- temp: or 0 elseif id == kern_code then - return (all or (getkern(n) ~= 0)) and kern + return (all or (getkern(n) ~= 0)) and kern_code elseif id == glyph_code then - local category = chardata[getchar(n)].category -- maybe more category checks are needed - return (category == "zs") and glyph_code + return (chardata[getchar(n)].category == "zs") and glyph_code end end return false diff --git a/Master/texmf-dist/tex/context/base/mkiv/node-typ.lua b/Master/texmf-dist/tex/context/base/mkiv/node-typ.lua index adf0d18c005..46494fef396 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/node-typ.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/node-typ.lua @@ -20,7 +20,6 @@ local setchar = nuts.setchar local setattrlist = nuts.setattrlist local getfont = nuts.getfont -local getattrlist = nuts.getattrlist local hpack_node_list = nuts.hpack local vpack_node_list = nuts.vpack @@ -32,23 +31,18 @@ local new_glue = nodepool.glue local utfvalues = utf.values -local currentfont = font.current -- mabe nicer is fonts .current -local currentattributes = node.current_attributes -- mabe nicer is attributes.current - +local currentfont = font.current +local currentattributes = nodes.currentattributes local fontparameters = fonts.hashes.parameters -if not currentattributes then currentattributes = node.current_attr end -- CONTEXTLMTXMODE == 0 - -- when attrid == true then take from glyph or current else use the given value +-- todo: glyphscale etc + local function tonodes(str,fontid,spacing,templateglyph,attrid) -- quick and dirty local head, prev = nil, nil if not fontid then - if templateglyph then - fontid = getfont(templateglyph) - else - fontid = currentfont() - end + fontid = templateglyph and getfont(templateglyph) or currentfont() end if attrid == true then if templateglyph then @@ -107,7 +101,7 @@ local function tohbox(str,fontid,spacing) end local function tovpack(str,fontid,spacing) - -- vpack is just a hack, and a proper implemtation is on the agenda + -- vpack is just a hack, and a proper implementation is on the agenda -- as it needs more info etc than currently available return vpack_node_list(tonodes(str,fontid,spacing)) end @@ -133,9 +127,9 @@ typesetters.hpack = typesetters.tohpack -- obsolete typesetters.hbox = typesetters.tohbox -- obsolete typesetters.vpack = typesetters.tovpack -- obsolete --- node.write(nodes.typesetters.tohpack("Hello World!")) --- node.write(nodes.typesetters.tohbox ("Hello World!")) --- node.write(nodes.typesetters.tohpack("Hello World!",1,100*1024*10)) --- node.write(nodes.typesetters.tohbox ("Hello World!",1,100*1024*10)) +-- context(nodes.typesetters.tohpack("Hello World!")) +-- context(nodes.typesetters.tohbox ("Hello World!")) +-- context(nodes.typesetters.tohpack("Hello World!",1,100*1024*10)) +-- context(nodes.typesetters.tohbox ("Hello World!",1,100*1024*10)) string.tonodes = function(...) return tonode(tonodes(...)) end -- quite convenient diff --git a/Master/texmf-dist/tex/context/base/mkiv/pack-cut.mkiv b/Master/texmf-dist/tex/context/base/mkiv/pack-cut.mkiv index 84c14d648e5..533440efdc7 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/pack-cut.mkiv +++ b/Master/texmf-dist/tex/context/base/mkiv/pack-cut.mkiv @@ -102,9 +102,8 @@ \vss}% \hss}} -\unexpanded\def\makecutbox#1% - {\bgroup - \d_pack_cutmarks_height\ht#1% +\unexpanded\def\makecutbox#1% not grouped ! + {\d_pack_cutmarks_height\ht#1% \d_pack_cutmarks_depth \dp#1% \d_pack_cutmarks_width \wd#1% \setbox#1\hpack @@ -155,8 +154,7 @@ \box#1}% \wd#1\d_pack_cutmarks_width \ht#1\d_pack_cutmarks_height - \dp#1\d_pack_cutmarks_depth - \egroup} + \dp#1\d_pack_cutmarks_depth} \unexpanded\def\cuthbox{\hpack\bgroup\dowithnextbox{\makecutbox\nextbox\flushnextbox\egroup}\hbox} \unexpanded\def\cutvbox{\vpack\bgroup\dowithnextbox{\makecutbox\nextbox\flushnextbox\egroup}\vbox} diff --git a/Master/texmf-dist/tex/context/base/mkiv/pack-rul.lua b/Master/texmf-dist/tex/context/base/mkiv/pack-rul.lua index 8e410f0cfc0..98117867c91 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/pack-rul.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/pack-rul.lua @@ -57,7 +57,7 @@ local getboxglue = nuts.getboxglue local hpack = nuts.hpack local getdimensions = nuts.dimensions -local flush_node = nuts.flush +local flushnode = nuts.flush local traversers = nuts.traversers local nexthlist = traversers.hlist @@ -131,7 +131,7 @@ local function doreshapeframedbox(n) local set, order, sign = getboxglue(p) setboxglue(h,set,order,sign) setlist(p) - flush_node(p) + flushnode(p) elseif checkformath and subtype == equationlist_code then -- display formulas use a shift if nofnonzero == 1 then @@ -165,7 +165,7 @@ local function doreshapeframedbox(n) texsetdimen("global","framedaveragewidth",averagewidth) end -local function doanalyzeframedbox(n) -- traverse_list +local function doanalyzeframedbox(n) local box = getbox(n) local noflines = 0 local firstheight = nil diff --git a/Master/texmf-dist/tex/context/base/mkiv/page-app.mkiv b/Master/texmf-dist/tex/context/base/mkiv/page-app.mkiv index cdb964ab06e..1a82e178d06 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/page-app.mkiv +++ b/Master/texmf-dist/tex/context/base/mkiv/page-app.mkiv @@ -204,7 +204,7 @@ {\bgroup \setupexternalfigure[\v!page:\v!figure][\c!offset=\v!overlay,#2]% \startTEXpage[\c!offset=\namedexternalfigureparameter{\v!page:\v!figure}\c!offset]% - \externalfigure[#1]\ignorespaces} % so we can put some text below the graphic + \externalfigure[#1][\v!page:\v!figure]\ignorespaces} % so we can put some text below the graphic \unexpanded\def\stoppagefigure {\stopTEXpage diff --git a/Master/texmf-dist/tex/context/base/mkiv/page-cst.lua b/Master/texmf-dist/tex/context/base/mkiv/page-cst.lua index a6315ff05f9..5106f1fef92 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/page-cst.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/page-cst.lua @@ -37,8 +37,7 @@ local tonode = nuts.tonode local tonut = nuts.tonut local vpack = nuts.vpack -local flushlist = nuts.flush_list ------ removenode = nuts.remove +local flushlist = nuts.flushlist local setlink = nuts.setlink local setlist = nuts.setlist @@ -62,7 +61,7 @@ local takebox = nuts.takebox local takelist = nuts.takelist local splitbox = nuts.splitbox local getattribute = nuts.getattribute -local copylist = nuts.copy_list +local copylist = nuts.copylist local getbox = nuts.getbox local getcount = tex.getcount diff --git a/Master/texmf-dist/tex/context/base/mkiv/page-flt.lua b/Master/texmf-dist/tex/context/base/mkiv/page-flt.lua index b1f729f7a6d..7c222084035 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/page-flt.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/page-flt.lua @@ -12,7 +12,7 @@ if not modules then modules = { } end modules ['page-flt'] = { local next = next local tostring = tostring local insert, remove = table.insert, table.remove -local find = string.find +local find, topattern = string.find, string.topattern local abs = math.abs local trace_floats = false trackers.register("floats.caching", function(v) trace_floats = v end) @@ -21,7 +21,7 @@ local trace_collecting = false trackers.register("floats.collecting", function( local report_floats = logs.reporter("floats","caching") local report_collecting = logs.reporter("floats","collecting") -local C, S, P, lpegmatch = lpeg.C, lpeg.S, lpeg.P, lpeg.match +local C, Cc, S, P, lpegmatch = lpeg.C, lpeg.Cc, lpeg.S, lpeg.P, lpeg.match -- we use floatbox, floatwidth, floatheight -- text page leftpage rightpage (todo: top, bottom, margin, order) @@ -119,7 +119,7 @@ local function get(stack,n,bylabel) if bylabel then for i=1,#stack do local s = stack[i] - local n = string.topattern(tostring(n)) -- to be sure + local n = topattern(tostring(n)) -- to be sure if find(s.data.label,n) then return s, s.box, i end @@ -326,16 +326,18 @@ end -- todo: check for digits ! +local digits = lpeg.patterns.digits +local nothing = Cc("") local method = C((1-S(", :"))^1) -local position = P(":") * C((1-S("*,"))^1) * (P("*") * C((1-S(","))^1))^0 +local position = P(":") * C(digits^1) * (P("*") * C(digits^1) + nothing) local label = P(":") * C((1-S(",*: "))^0) local pattern = method * ( - label * position * C("") - + C("") * position * C("") - + label * C("") * C("") - + C("") * C("") * C("") -) + C("") * C("") * C("") * C("") + label * position + + nothing * position + + label * nothing * nothing + + nothing * nothing * nothing +) + nothing * nothing * nothing * nothing -- inspect { lpegmatch(pattern,"somewhere:blabla,crap") } -- inspect { lpegmatch(pattern,"somewhere:1*2") } diff --git a/Master/texmf-dist/tex/context/base/mkiv/page-imp.mkiv b/Master/texmf-dist/tex/context/base/mkiv/page-imp.mkiv index 829ed24f427..ec249d65228 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/page-imp.mkiv +++ b/Master/texmf-dist/tex/context/base/mkiv/page-imp.mkiv @@ -102,6 +102,15 @@ \installshipoutmethod \v!none {\page_shipouts_ignore} +% \setuppaper[method=rotate,rotation=15] \showframe +% \starttext \dorecurse{10}{\input knuth\endgraf} \stoptext + +\installshipoutmethod\v!rotate + {\page_shipouts_rotate} + +\protected\def\page_shipouts_rotate#1% + {\invokepagehandler\v!normal{\rotate[\c!rotation=\rootlayouttargetparameter\c!rotation]{#1}}} + % extension mechanism \newcount\c_page_boxes_flush_n % set at the lua end diff --git a/Master/texmf-dist/tex/context/base/mkiv/page-ini.lua b/Master/texmf-dist/tex/context/base/mkiv/page-ini.lua index 924e01b2aa8..bcabc0d6b02 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/page-ini.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/page-ini.lua @@ -6,6 +6,8 @@ if not modules then modules = { } end modules ['page-ini'] = { license = "see context related readme files" } +-- Some day I need to make this more efficient. + local tonumber, rawget, rawset, type, next = tonumber, rawget, rawset, type, next local match = string.match local sort, tohash, insert, remove, sortedkeys = table.sort, table.tohash, table.insert, table.remove, table.sortedkeys @@ -13,7 +15,12 @@ local settings_to_array, settings_to_hash = utilities.parsers.settings_to_array, local texgetcount = tex.getcount +local tonut = nodes.tonut +local nextlist = nodes.nuts.traversers.list +local texlists = tex.lists + local context = context +local ctx_doif = commands.doif local ctx_doifelse = commands.doifelse local implement = interfaces.implement @@ -23,16 +30,22 @@ local last = 0 local pages = structures.pages local autolist = { } local report = logs.reporter("pages","mark") +local active = false local trace = false trackers.register("pages.mark",function(v) trace = v end) -function pages.mark(name,list) +function pages.mark(name,list,settings) + active = true + -- local realpage = texgetcount("realpageno") + if type(settings) == "string" then + settings = settings_to_hash(settings) + end if not list or list == "" then if trace then report("marking current page %i as %a",realpage,name) end - data[realpage][name] = true + data[realpage][name] = settings or true return end if type(list) == "string" then @@ -51,7 +64,7 @@ function pages.mark(name,list) report("marking page %i upto %i as %a",f,t,name) end for page=f,t do - data[page][name] = true + data[page][name] = settings or true end end page = false @@ -74,7 +87,7 @@ function pages.mark(name,list) if trace then report("marking page %i as %a",page,name) end - data[page][name] = true + data[page][name] = settings or true end end end @@ -83,30 +96,51 @@ function pages.mark(name,list) if trace then report("marking current page %i as %a",realpage,name) end - data[realpage][name] = true + data[realpage][name] = settings or true end end local tobemarked = { } function pages.markedlist(realpage) - if realpage then + if active and realpage then local m = rawget(tobemarked,realpage) or rawget(data,realpage) return m and next(m) and sortedkeys(m) end end local function marked(name) - local realpage = texgetcount("realpageno") - for i=last,realpage-1 do - local di = data[i] - if di then - tobemarked[i] = di - rawset(data,i,nil) + if active then + local realpage = texgetcount("realpageno") + if last ~= 0 then + for i=last,realpage-1 do + -- print(last) + local di = data[i] + if di then + tobemarked[i] = di + rawset(data,i,nil) + end + end + last = 0 -- needs checking + end + local pagedata = rawget(data,realpage) + return pagedata and pagedata[name] and true or false + else + return false + end +end + +local function markedparameter(name,key) + if active then + local pagedata = rawget(data,texgetcount("realpageno")) + if pagedata then + pagedata = pagedata[name] + if pagedata then + pagedata = pagedata[key] + end end + return pagedata end - local pagedata = rawget(data,realpage) - return pagedata and pagedata[name] and true or false end local function toranges(marked) @@ -124,12 +158,14 @@ local function toranges(marked) last = page end list[#list+1] = { first, last } + -- + active = true end return list end local function allmarked(list) - if list then + if active and list then local collected = pages.collected if collected then if type(list) == "string" then @@ -175,26 +211,77 @@ pages.allmarked = allmarked -- An alternative is to use an attribute and identify the state by parsing the node -- list but that's a bit overkill for a hardly used feature like this. -luatex.registerpageactions(function() +-- Page actions are bound to a real page. When we set one, we need to bind to the +-- current page unless we just flushed. So we also need to check the current page. + +-- \page ... \start : sync realpage +-- \page \start : sync realpage +-- \page \stop : reset synced because no content yet +-- \page ... \stop : keep sync + +local function autopageaction() + if active then + local nofauto = #autolist + if nofauto > 0 then + local realpage = texgetcount("realpageno") + for i=1,nofauto do + local entry = autolist[i] + local names = entry[1] + local settings = entry[2] + for j=1,#names do + local name = names[j] + local list = data[realpage] + if not list[name] then + if trace then + report("automatically marking page %i as %a",realpage,name) + end + list[name] = settings or true + end + end + end + end + end +end + +local function startmarked(name,settings) + active = true + -- + insert(autolist, { settings_to_array(name), settings_to_hash(settings) }) + autopageaction(true) +end + +local function stopmarked() local nofauto = #autolist if nofauto > 0 then - local realpage = texgetcount("realpageno") - for i=1,nofauto do - local names = autolist[i] - for j=1,#names do - local name = names[j] - data[realpage][name] = true - if trace then - report("automatically marking page %i as %a",realpage,name) + if not texlists.pagehead then + local realpage = texgetcount("realpageno") + for i=1,nofauto do + local entry = autolist[i] + local names = entry[1] + for j=1,#names do + local name = names[j] + local list = data[realpage] + if list[name] then + if trace then + report("automatically unmarking page %i as %a",realpage,name) + end + list[name] = nil + end end end end + remove(autolist) end -end) +end + +implement { + name = "checkmarkedpages", + actions = autopageaction, +} implement { name = "markpage", - arguments = "2 strings", + arguments = "3 strings", actions = pages.mark } @@ -205,6 +292,23 @@ implement { } implement { + name = "doifmarkedpage", + arguments = "string", + actions = { marked, ctx_doif } +} + +implement { + name = "markedpageparameter", + arguments = "strings", + actions = function(name,key) + local value = markedparameter(name,key) + if value then + context(value) + end + end +} + +implement { name = "markedpages", arguments = "string", actions = function(name) @@ -217,20 +321,13 @@ implement { implement { name = "startmarkpages", - arguments = "string", - actions = function(name) - insert(autolist,settings_to_array(name)) - end + arguments = "2 strings", + actions = startmarked, } implement { - name = "stopmarkpages", - arguments = "string", - actions = function(name) - if #autolist > 0 then - remove(autolist) - end - end + name = "stopmarkpages", + actions = stopmarked, } local tonut = nodes.tonut diff --git a/Master/texmf-dist/tex/context/base/mkiv/page-ini.mkiv b/Master/texmf-dist/tex/context/base/mkiv/page-ini.mkiv index e56c3ac0404..0c444ffc2fc 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/page-ini.mkiv +++ b/Master/texmf-dist/tex/context/base/mkiv/page-ini.mkiv @@ -333,10 +333,10 @@ \installcorenamespace{markedpage} \unexpanded\def\markpage - {\dodoubleempty\page_mark} + {\dotripleempty\page_mark} -\def\page_mark[#1][#2]% - {\clf_markpage{#1}{#2}} +\def\page_mark[#1][#2][#3]% + {\clf_markpage{#1}{#2}{#3}} \def\markedpages[#1]% expandable {\clf_markedpages{#1}} @@ -344,12 +344,28 @@ \unexpanded\def\doifelsemarkedpage#1% {\clf_doifelsemarkedpage{#1}} -\unexpanded\def\startmarkpages[#1]% - {\clf_startmarkpages{#1}} +\unexpanded\def\doifmarkedpage#1% + {\clf_doifmarkedpage{#1}} + +\unexpanded\def\startmarkpages + {\dodoubleempty\page_start_marked} + +\def\page_start_marked[#1][#2]% + {\clf_startmarkpages{#1}{#2}} \unexpanded\def\stopmarkpages {\clf_stopmarkpages} +\unexpanded\def\checkmarkedpages + {\clf_checkmarkedpages} + +\def\markedpageparameter#1#2% + {\clf_markedpageparameter{#1}{#2}} + +\appendtoks + \checkmarkedpages +\to \everyaftershipout + %D Experimental: \newconstant\c_page_force_strut_depth_trace_mode diff --git a/Master/texmf-dist/tex/context/base/mkiv/page-inj.mkvi b/Master/texmf-dist/tex/context/base/mkiv/page-inj.mkvi index f1b520f5e3e..0adfca92d33 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/page-inj.mkvi +++ b/Master/texmf-dist/tex/context/base/mkiv/page-inj.mkvi @@ -33,8 +33,14 @@ \let\page_boxes_flush_after \clf_flushpageinjectionsafter \def\page_injections_flush_indeed - {\scrn_canvas_synchronize_set{\pageinjectionparameter\c!width}{\pageinjectionparameter\c!height}% - \invokepagehandler\v!normal{\inheritedpageinjectionframed{\texsetup\p_page_injectionalternative_rederingsetup}}% + {\begingroup + \setbox\scratchbox\normalhpack + {\inheritedpageinjectionframed{\texsetup\p_page_injectionalternative_rederingsetup}}% + \printpaperwidth \wd\scratchbox + \printpaperheight\ht\scratchbox + \scrn_canvas_synchronize_only + \invokepagehandler\v!normal{\box\scratchbox}% + \endgroup \scrn_canvas_synchronize_reset} \def\page_injections_flush_saved#name#parameters% diff --git a/Master/texmf-dist/tex/context/base/mkiv/page-lin.lua b/Master/texmf-dist/tex/context/base/mkiv/page-lin.lua index 06983ef5c6f..d3ff2cdadcb 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/page-lin.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/page-lin.lua @@ -84,7 +84,6 @@ local nextvlist = nuts.traversers.vlist local copy_node = nuts.copy ----- hpack_nodes = nuts.hpack local is_display_math = nuts.is_display_math -local leftmarginwidth = nuts.leftmarginwidth ----- nodepool = nuts.pool ----- new_kern = nodepool.kern diff --git a/Master/texmf-dist/tex/context/base/mkiv/page-lin.mkvi b/Master/texmf-dist/tex/context/base/mkiv/page-lin.mkvi index e355e3e6017..3a54d1ef5eb 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/page-lin.mkvi +++ b/Master/texmf-dist/tex/context/base/mkiv/page-lin.mkvi @@ -352,7 +352,9 @@ \def\page_lines_add_numbers_to_box#box#column#max#nesting% {\bgroup - \strc_tags_enable_indeed + \ifconditional\c_strc_tags_enabled + \strc_tags_enable_indeed + \fi \b_page_lines_number #box\relax \c_page_lines_column #column\relax \c_page_lines_last_column#max\relax diff --git a/Master/texmf-dist/tex/context/base/mkiv/page-mix.lua b/Master/texmf-dist/tex/context/base/mkiv/page-mix.lua index dacc829d7e6..a4e08063d50 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/page-mix.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/page-mix.lua @@ -33,7 +33,7 @@ local vlist_code = nodecodes.vlist local kern_code = nodecodes.kern local glue_code = nodecodes.glue local penalty_code = nodecodes.penalty -local insert_code = nodecodes.ins +local insert_code = nodecodes.insert local mark_code = nodecodes.mark local rule_code = nodecodes.rule @@ -59,9 +59,9 @@ local getnext = nuts.getnext local getprev = nuts.getprev local getid = nuts.getid local getlist = nuts.getlist -local getsubtype = nuts.getsubtype +local getindex = nuts.getindex or nuts.getsubtype -- luatex catch local getbox = nuts.getbox -local getattribute = nuts.getattribute +local getattr = nuts.getattr local getwhd = nuts.getwhd local getkern = nuts.getkern local getpenalty = nuts.getpenalty @@ -79,6 +79,8 @@ local new_glue = nodepool.glue local points = number.points +local setinsertcontent = tex.setinsertcontent or tex.setbox + local settings_to_hash = utilities.parsers.settings_to_hash local variables = interfaces.variables @@ -121,7 +123,7 @@ local function collectinserts(result,nxt,nxtid) i = i + 1 result.i = i inserttotal = inserttotal + getheight(nxt) -- height includes depth (hm, still? needs checking) - local s = getsubtype(nxt) + local s = getindex(nxt) local c = inserts[s] if trace_details then report_state("insert of class %s found",s) @@ -249,12 +251,19 @@ local function preparesplit(specification) -- a rather large function report_state("fatal error, no list") return end - local head = getlist(list) or specification.originalhead + local head = nil + if getid(list) == hlist_code then + head = list + else + head = getlist(list) or specification.originalhead + end if not head then report_state("fatal error, no head") return end + slidenodes(head) -- we can have set prev's to nil to prevent backtracking + local discarded = { } local originalhead = head local originalwidth = specification.originalwidth or getwidth(list) @@ -439,6 +448,7 @@ local function preparesplit(specification) -- a rather large function if column == nofcolumns then column = 0 -- nicer in trace rest = head +-- rest = nil return false, 0 else local skipped @@ -589,7 +599,7 @@ local function preparesplit(specification) -- a rather large function if penalty == 0 then unlock(2,penalty) elseif penalty == forcedbreak then - local needed = getattribute(current,a_checkedbreak) + local needed = getattr(current,a_checkedbreak) local proceed = not needed or needed == 0 if not proceed then local available = target - height @@ -770,7 +780,6 @@ local function preparesplit(specification) -- a rather large function specification.rest = rest specification.overflow = overflow specification.discarded = discarded - setlist(getbox(specification.box)) return specification @@ -897,6 +906,7 @@ local function getsplit(result,n) end setprev(h) -- move up + local strutht = result.strutht local strutdp = result.strutdp local lineheight = strutht + strutdp @@ -905,6 +915,19 @@ local function getsplit(result,n) local v = new_vlist() setlist(v,h) + -- safeguard ... i need to figure this out some day + + local c = r.head + while c do + if c == result.rest then + report_state("flush, column %s, %s",n,"suspicous rest") + result.rest = nil + break + else + c = getnext(c) + end + end + -- local v = vpack(h,"exactly",height) if isglobal then -- option @@ -985,8 +1008,8 @@ local function getsplit(result,n) for i=1,#list-1 do setdepth(list[i],0) end - local b = vpack(l) -- multiple arguments, todo: fastvpack - setbox("global",c,b) -- when we wrap in a box + local b = vpack(l) -- multiple arguments, todo: fastvpack + setinsertcontent(c,tonode(b)) -- when we wrap in a box r.inserts[c] = nil end @@ -1064,7 +1087,10 @@ implement { arguments = "integer", actions = function(n) if result then - context(tonode(getsplit(result,n))) + local list = getsplit(result,n) + if list then + context(tonode(list)) + end end end, } @@ -1082,7 +1108,10 @@ implement { name = "mixflushrest", actions = function() if result then - context(tonode(getrest(result))) + local rest = getrest(result) + if rest then + context(tonode(rest)) + end end end } @@ -1091,7 +1120,10 @@ implement { name = "mixflushlist", actions = function() if result then - context(tonode(getlist(result))) + local list = getlist(result) + if list then + context(tonode(list)) + end end end } diff --git a/Master/texmf-dist/tex/context/base/mkiv/page-mix.mkiv b/Master/texmf-dist/tex/context/base/mkiv/page-mix.mkiv index e38ad74068d..2bca9cbf56c 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/page-mix.mkiv +++ b/Master/texmf-dist/tex/context/base/mkiv/page-mix.mkiv @@ -31,10 +31,6 @@ % offsets (inner ones, so we change the hsize ... needed with backgrounds % when no content we currently loose the page -% luatex buglet: -% -% \ctxlua{tex.setbox("global",0,node.hpack(nodes.pool.glyph("a",font.current())))}\box0 - \registerctxluafile{page-mix}{} \unprotect diff --git a/Master/texmf-dist/tex/context/base/mkiv/page-one.mkiv b/Master/texmf-dist/tex/context/base/mkiv/page-one.mkiv index 54e53035f51..567a19884d5 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/page-one.mkiv +++ b/Master/texmf-dist/tex/context/base/mkiv/page-one.mkiv @@ -63,6 +63,22 @@ % \fi % \fi} +% \unexpanded\def\page_one_command_set_vsize +% {\ifgridsnapping +% \ifcase\layoutlines +% \getrawnoflines\textheight +% \else +% \noflines\layoutlines +% \fi +% \global\vsize\noflines\openlineheight +% \else +% \global\vsize\textheight +% \fi +% \global\advance\vsize\d_page_adapts_delta +% % alternatively we could set it in builders.buildpage_filter +% % \ifdim\pagegoal<\maxdimen .. \fi +% \pagegoal\dimexpr\vsize-\d_page_floats_inserted_top-\d_page_floats_inserted_bottom\relax} + \unexpanded\def\page_one_command_set_vsize {\ifgridsnapping \ifcase\layoutlines @@ -75,10 +91,10 @@ \global\vsize\textheight \fi \global\advance\vsize\d_page_adapts_delta - % alternatively we could set it in builders.buildpage_filter - % \ifdim\pagegoal<\maxdimen .. \fi - \pagegoal\dimexpr\vsize-\d_page_floats_inserted_top-\d_page_floats_inserted_bottom\relax} - + % \pagegoal\dimexpr\vsize-\d_page_floats_inserted_top-\d_page_floats_inserted_bottom\relax} + % per 2021/9/9 : otherwise weird notes overlap with side floats + \settotalinsertionheight + \pagegoal\dimexpr\vsize-\totalinsertionheight\relax} % 1 = partial page, 2 = whole page, 3 = partial page @@ -356,13 +372,13 @@ \def\page_one_command_flush_bottom_insertions_indeed {\ifgridsnapping - % \floatparameter\c!bottombefore + % \rootfloatparameter\c!bottombefore \snaptogrid\hbox{\box\namedinsertionnumber\s!bottomfloat}% - % \floatparameter\c!bottomafter + % \rootfloatparameter\c!bottomafter \else - \floatparameter\c!bottombefore + \rootfloatparameter\c!bottombefore \unvbox\namedinsertionnumber\s!bottomfloat - \floatparameter\c!bottomafter + \rootfloatparameter\c!bottomafter \fi} \unexpanded\def\page_one_command_flush_floats diff --git a/Master/texmf-dist/tex/context/base/mkiv/page-pcl.mkiv b/Master/texmf-dist/tex/context/base/mkiv/page-pcl.mkiv index 43ba4feb326..262ee71ab1a 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/page-pcl.mkiv +++ b/Master/texmf-dist/tex/context/base/mkiv/page-pcl.mkiv @@ -246,8 +246,8 @@ \page_marks_synchronize_column\plusone\c_page_col_n_of_columns\recurselevel\scratchbox % backgrounds \anch_mark_column_box\scratchbox\recurselevel - \mixedcolumnseparatorheight\ht\scratchbox - \mixedcolumnseparatordepth \dp\scratchbox + \pagecolumnseparatorheight\ht\scratchbox + \pagecolumnseparatordepth \dp\scratchbox \inheritedpagecolumnsframedbox\recurselevel\scratchbox} \def\page_col_routine_package diff --git a/Master/texmf-dist/tex/context/base/mkiv/page-sid.mkiv b/Master/texmf-dist/tex/context/base/mkiv/page-sid.mkiv index e6c1be985d7..88e4fb1164b 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/page-sid.mkiv +++ b/Master/texmf-dist/tex/context/base/mkiv/page-sid.mkiv @@ -292,7 +292,7 @@ \box\floatbox % somehow we need this \scratchbox magic, but at least it's the same as the % tracer now - \setbox\scratchbox\emptybox + \setbox\scratchbox\emptyhbox \wd\scratchbox\hsize \ht\scratchbox\d_page_sides_bottomtotal \box\scratchbox diff --git a/Master/texmf-dist/tex/context/base/mkiv/page-str.lua b/Master/texmf-dist/tex/context/base/mkiv/page-str.lua index 73f1782d0b6..64e593e27e2 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/page-str.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/page-str.lua @@ -24,11 +24,12 @@ local nuts = nodes.nuts local tonut = nodes.tonut local slide_node_list = nuts.slide local write_node = nuts.write -local flush_node = nuts.flush -local copy_node_list = nuts.copy_list +local flushnode = nuts.flush +local copy_node_list = nuts.copylist local vpack_node_list = nuts.vpack +local new_rule = nuts.pool.rule -local getbox = nuts.getbox +----- getbox = nuts.getbox local setlink = nuts.setlink local getlist = nuts.getlist local setlist = nuts.setlist @@ -40,7 +41,6 @@ local settings_to_array = utilities.parsers.settings_to_array local enableaction = nodes.tasks.enableaction local texgetdimen = tex.getdimen ------ texgetbox = tex.getbox local trace_collecting = false trackers.register("streams.collecting", function(v) trace_collecting = v end) local trace_flushing = false trackers.register("streams.flushing", function(v) trace_flushing = v end) @@ -146,7 +146,7 @@ function streams.flush(name,copy) -- problem: we need to migrate afterwards if di then write_node(getlist(di)) -- list, will be option setlist(di) - flush_node(di) + flushnode(di) end end end @@ -226,9 +226,11 @@ function streams.synchronize(list) -- this is an experiment ! local delta = delta_height -- for tracing while delta > 0 do -- we need to add some interline penalties - local line = copy_node_list(getbox("strutbox")) - setwhd(line,false,strutht,strutdp) + -- local line = copy_node_list(getbox("strutbox")) + -- setwhd(line,false,strutht,strutdp) + local line = new_rule(0,strutht,strutdp) -- no tracing if tail then + -- todo: inject at a better place setlink(tail,line) end tail = line @@ -237,7 +239,7 @@ function streams.synchronize(list) -- this is an experiment ! end dana[m] = vpack_node_list(getlist(vbox)) setlist(vbox) - flush_node(vbox) + flushnode(vbox) if trace_flushing then report_streams("slot %s:%s with delta (%p,%p) is compensated by %s lines",m,i,delta_height,delta_depth,n) end diff --git a/Master/texmf-dist/tex/context/base/mkiv/phys-dim.lua b/Master/texmf-dist/tex/context/base/mkiv/phys-dim.lua index e0cea7babde..91803e4fdcd 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/phys-dim.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/phys-dim.lua @@ -1008,7 +1008,7 @@ implement { protected = true, arguments = { "optional", "string" }, actions = function(filler, digits) - digits = gsub(digits,"(%d)","%1\\digitsbreak") + digits = gsub(digits,"(%d)","%1\\digitsbreak ") -- space needed for following letters digits = gsub(digits,"\\-$",filler) context(digits) end diff --git a/Master/texmf-dist/tex/context/base/mkiv/phys-dim.mkiv b/Master/texmf-dist/tex/context/base/mkiv/phys-dim.mkiv index b390ce64aef..a05300cce3c 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/phys-dim.mkiv +++ b/Master/texmf-dist/tex/context/base/mkiv/phys-dim.mkiv @@ -170,9 +170,8 @@ % \definesymbol[units][times][\ifmmode\cdot\else\kern.2\emwidth\cdot\kern.2\emwidth\fi] \unexpanded\def\digitstextbinop#1% assumes preceding - {\ifmmode#1\else\fourperemspace\nobreak#1\fourperemspace\fi} + {\ifmmode\mathord{#1}\else\nobreak#1\fi} -%def\digitstimessymbol{\ifmmode\cdot\else\digitstextbinop\cdot\fi} \def\digitstimessymbol{\digitstextbinop\times} \unexpanded\def\digitszeropadding {\hphantom{0}} @@ -406,8 +405,13 @@ % \endcsname} \unexpanded\def\phys_units_separator - {\edef\currentunitsseparator{\unitparameter\c!separator}% no longer needed - \ifcsname\??unitseparator\currentunitsseparator\endcsname\lastnamedcs\else\cdot\fi} + {\ifcsname\??unitseparator\unitparameter\c!separator\endcsname + \lastnamedcs + \else + \csname\??unitseparator\v!normal\endcsname + \fi} + +\installunitsseparator\v!normal{\ifmmode\mathord{\cdot}\else\cdot\fi} \installunitsseparator\v!normal {\cdot} \installunitsseparator\v!big {\unitsbigspace} @@ -521,9 +525,6 @@ {\edef\p_order{\unitparameter\c!order}% \ifx\p_order\v!reverse\expandafter\clf_unit_reverse\else\expandafter\clf_unit_normal\fi{\detokenize{#1}}} -\unexpanded\def\digitstextbinnop#1% - {\ifmmode#1\else#1\fourperemspace\fi} - \unexpanded\def\unitsPUS#1#2#3{\phys_units_next\prefixtext{#1}\unittext{#2}\unitsraise{\suffixtext{#3}}\c_phys_units_state\plusone} % suffix \unexpanded\def\unitsPU #1#2{\phys_units_next\prefixtext{#1}\unittext{#2}\c_phys_units_state\plusthree} % unit \unexpanded\def\unitsPS #1#2{\phys_units_next\prefixtext{#1}\unitsraise{\suffixtext{#2}}\c_phys_units_state\plusone} % suffix diff --git a/Master/texmf-dist/tex/context/base/mkiv/publ-aut.lua b/Master/texmf-dist/tex/context/base/mkiv/publ-aut.lua index 123a67009d4..64fecb3d5b0 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/publ-aut.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/publ-aut.lua @@ -503,6 +503,7 @@ local function btxauthor(dataset,tag,field,settings) ctx_btxsetup(combiner) ctx_btxstopauthor() end + if index then oneauthor(index) elseif max == 1 then @@ -515,9 +516,11 @@ local function btxauthor(dataset,tag,field,settings) oneauthor(absmax,true) end end + else report("ignored field %a of tag %a, used field %a is no author",field,tag,usedfield) end + end implement { @@ -995,6 +998,22 @@ publications.sortmethods.authoryear = { }, } +publications.sortmethods.authortitle = { + sequence = { + { field = "author", default = "", unknown = "" }, + { field = "title", default = "", unknown = "" }, + { field = "booktitle", default = "", unknown = "" }, -- if this is an untitled section (e.g., introduction, foreword, preface) of a book or a review of a book + { field = "maintitle", default = "", unknown = "" }, -- if this is an untitled section or volume in a multivolume collection + { field = "volume", default = "", unknown = "" }, + { field = "part", default = "", unknown = "" }, + { field = "date", default = "9998-13-32", unknown = "9999-14-33" }, -- some specifications allow date instead of year, month, day + { field = "year", default = "9998", unknown = "9999" }, + { field = "month", default = "13", unknown = "14" }, + { field = "day", default = "32", unknown = "33" }, + { field = "index", default = "", unknown = "" }, + }, +} + implement { name = "btxremapauthor", arguments = "2 strings", diff --git a/Master/texmf-dist/tex/context/base/mkiv/publ-dat.lua b/Master/texmf-dist/tex/context/base/mkiv/publ-dat.lua index f09e97a8d9f..64aaaf4603e 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/publ-dat.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/publ-dat.lua @@ -379,6 +379,7 @@ function publications.new(name) suffixes = { }, xmldata = xmlconvert(xmlplaceholder), details = { }, + missing = { }, ordered = { }, nofbytes = 0, entries = nil, -- empty == all @@ -632,13 +633,13 @@ do local r_value = reference * Carg(1) / resolve local balanced = P { - [1] = ((escape * (left+right)) + (collapsed + r_value + 1 - (left+right))^1 + V(2))^0, - [2] = left * V(1) * right, + ((escape * (left+right)) + (collapsed + r_value + 1 - (left+right))^1 + V(2))^0, + left * V(1) * right, } -- local unbalanced = P { - -- [1] = left * V(2) * right, - -- [2] = ((escape * (left+right)) + (collapsed + 1 - (left+right))^1 + V(1))^0, + -- left * V(2) * right, + -- ((escape * (left+right)) + (collapsed + 1 - (left+right))^1 + V(1))^0, -- } local unbalanced = (left/"") * balanced * (right/"") * P(-1) @@ -732,6 +733,7 @@ do end end end +-- inspect(luadata) statistics.stoptiming(publications) end @@ -1172,18 +1174,31 @@ do end end - function savers.lua(dataset,filename,tobesaved) - local list = { } - local n = 0 - for tag, data in next, tobesaved do + function savers.lua(dataset,filename,tobesaved,options) + local list = { } + local n = 0 + + local function totable(data,category) local t = { } for key, value in next, data do if not privates[key] then - d[key] = value + t[key] = value end end - list[tag] = t + t.category = category n = n + 1 + return t + end + + if options.category then + setmetatableindex(list,"table") + for tag, data in next, tobesaved do + list[data.category or "unknown"][tag] = totable(data) + end + else + for tag, data in next, tobesaved do + list[tag] = totable(data,data.category) + end end report("%s entries from dataset %a saved in %a",n,dataset,filename) table.save(filename,list) @@ -1200,6 +1215,7 @@ do local filename = specification.filename local filetype = specification.filetype local criterium = specification.criterium + local options = settings_to_hash(specification.options or "") statistics.starttiming(publications) if not filename or filename == "" then report("no filename for saving given") @@ -1229,7 +1245,7 @@ do end end end - saver(dataset,filename,tobesaved) + saver(dataset,filename,tobesaved,options) else report("unknown format %a for saving %a",filetype,dataset) end @@ -1250,6 +1266,7 @@ do { "filename" }, { "filetype" }, { "criterium" }, + { "options" }, } } } diff --git a/Master/texmf-dist/tex/context/base/mkiv/publ-fnd.lua b/Master/texmf-dist/tex/context/base/mkiv/publ-fnd.lua index 32d0c11beed..5ba173365d1 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/publ-fnd.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/publ-fnd.lua @@ -147,8 +147,8 @@ local p_expression = P("match")/"" * Cs(p_compare) ) / test_key_value local pattern = Cs { - [1] = V(2) * (p_combine * V(2))^0, - [2] = p_expression, + V(2) * (p_combine * V(2))^0, + p_expression, } -- -- -- -- -- -- -- -- -- -- -- -- -- diff --git a/Master/texmf-dist/tex/context/base/mkiv/publ-imp-apa.mkvi b/Master/texmf-dist/tex/context/base/mkiv/publ-imp-apa.mkvi index c7c00fd1436..b4ac74258bb 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/publ-imp-apa.mkvi +++ b/Master/texmf-dist/tex/context/base/mkiv/publ-imp-apa.mkvi @@ -1078,8 +1078,10 @@ \btxlabeltext{In} \btxspace \doifnot {\btxfoundname{author}} {editor} { - \texdefinition{btx:apa:author-or-editor} {ineditor} - \btxcomma + \btxdoif {ineditor} { + \texdefinition{btx:apa:author-or-editor} {ineditor} + \btxcomma + } } \texdefinition{btx:apa:composed-title}{booktitle} \btxperiod diff --git a/Master/texmf-dist/tex/context/base/mkiv/publ-imp-aps-prb.mkvi b/Master/texmf-dist/tex/context/base/mkiv/publ-imp-aps-prb.mkvi new file mode 100644 index 00000000000..19735b94967 --- /dev/null +++ b/Master/texmf-dist/tex/context/base/mkiv/publ-imp-aps-prb.mkvi @@ -0,0 +1,40 @@ +%D \module +%D [ file=publ-imp-aps-prb, +%D version=2015.03.22, +%D title=Phys. Rev. B APS bibliography style, +%D subtitle=Publications, +%D author=Alan Braslau and Hans Hagen, +%D date=\currentdate, +%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}] +%C +%C This module is part of the \CONTEXT\ macro||package and is therefore copyrighted +%D by \PRAGMA. See mreadme.pdf for details. + +\startbtxrenderingdefinitions[aps-prb] + +\loadbtxdefinitionfile[aps] + +\setupbtxlist + [aps] + [\c!alternative=\v!paragraph, + \c!width=\v!auto, + \c!distance=\zeropoint, + \c!numberalign=\v!flushright] + +\setupbtx + [aps:list:numbering:num] + [\c!command=\high, + \c!left=, + \c!right=, + \c!stopper=] + +\setupbtx + [aps:cite:num] + [\c!command=\high, + \c!left=, + \c!right=] + +%\setupbtx +% [\c!specification=aps] + +\stopbtxrenderingdefinitions diff --git a/Master/texmf-dist/tex/context/base/mkiv/publ-imp-author.mkvi b/Master/texmf-dist/tex/context/base/mkiv/publ-imp-author.mkvi index 8ee7835996f..ea824a2b53b 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/publ-imp-author.mkvi +++ b/Master/texmf-dist/tex/context/base/mkiv/publ-imp-author.mkvi @@ -118,6 +118,14 @@ \fastsetup{\s!btx:\s!cite:\s!author:others} \stopsetups +\startsetups \s!btx:\s!cite:\s!author:invertedfirst + \ifnum\currentbtxauthorindex>\plusone + \fastsetup{\s!btx:\s!cite:\s!author:normal} + \else + \fastsetup{\s!btx:\s!cite:\s!author:inverted} + \fi +\stopsetups + \startsetups \s!btx:\s!cite:\s!author:invertedshort \fastsetup{\s!btx:\s!cite:\s!author:concat} \ifx\currentbtxvons\empty \else @@ -258,6 +266,14 @@ \fastsetup{\s!btx:\s!list:\s!author:others} \stopsetups +\startsetups \s!btx:\s!list:\s!author:invertedfirst + \ifnum\currentbtxauthorindex>\plusone + \fastsetup{\s!btx:\s!list:\s!author:normal} + \else + \fastsetup{\s!btx:\s!list:\s!author:inverted} + \fi +\stopsetups + \startsetups \s!btx:\s!list:\s!author:invertedshort \fastsetup{\s!btx:\s!list:\s!author:concat} \ifx\currentbtxvons\empty \else diff --git a/Master/texmf-dist/tex/context/base/mkiv/publ-imp-cite.mkvi b/Master/texmf-dist/tex/context/base/mkiv/publ-imp-cite.mkvi index 721985499b6..c9afdbf42dc 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/publ-imp-cite.mkvi +++ b/Master/texmf-dist/tex/context/base/mkiv/publ-imp-cite.mkvi @@ -85,7 +85,8 @@ \startsetups btx:cite:invalid \btxcitereference - {\tt <\currentbtxreference>} + % {\tt <\currentbtxreference>} + {\tt <\currentbtxmissingreference>} \stopsetups \startsetups btx:cite:concat diff --git a/Master/texmf-dist/tex/context/base/mkiv/publ-ini.lua b/Master/texmf-dist/tex/context/base/mkiv/publ-ini.lua index ec36be89ad7..dac0ab441d0 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/publ-ini.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/publ-ini.lua @@ -32,7 +32,7 @@ local sortedkeys, sortedhash = table.sortedkeys, table.sortedhash local setmetatableindex = table.setmetatableindex local lpegmatch = lpeg.match local P, S, C, Ct, Cs, R, Carg = lpeg.P, lpeg.S, lpeg.C, lpeg.Ct, lpeg.Cs, lpeg.R, lpeg.Carg -local upper = characters.upper +local upper, lower = characters.upper, characters.lower local report = logs.reporter("publications") local report_cite = logs.reporter("publications","cite") @@ -54,6 +54,8 @@ local detailed = publications.detailed local enhancer = publications.enhancer local enhancers = publications.enhancers +if not publications.btx then publications.btx = { } end -- user space + local tracers = publications.tracers or { } publications.tracers = tracers @@ -691,6 +693,49 @@ local findallused do end } + implement { + name = "btxmissing", + arguments = "2 strings", + actions = function(dataset,tag) + local dataset = datasets[dataset] + if dataset then + local missing = dataset.missing + local message = missing[tag] + if message == nil then + local luadata = dataset.luadata + local entry = luadata[tag] + if not entry then + local t = lower(tag) + if luadata[t] then + message = t + else + t = upper(tag) + if luadata[t] then + message = t + else + for k, v in next, luadata do + if t == upper(k) then + message = k + break + end + end + end + end + end + if not message then + message = false + end + missing[tag] = message + end + if message then + context("%s vs %s",tag,message) + return + end + end + context(tag) + end + } + end local function unknowncite(reference) @@ -2166,18 +2211,18 @@ do function lists.combiinlist(dataset,tag) local rendering = renderings[dataset] - local list = rendering.list + -- local list = rendering.list local toindex = rendering.tagtolistindex return toindex and toindex[tag] end function lists.flushcombi(dataset,tag) local rendering = renderings[dataset] - local list = rendering.list local toindex = rendering.tagtolistindex local listindex = toindex and toindex[tag] if listindex then - local li = list[listindex] + local list = rendering.list + local li = list[listindex] if li then local data = datasets[dataset] local luadata = data.luadata @@ -2406,6 +2451,10 @@ do s = k break end + -- weird + if type(s) == "table" then + return citevariants.default + end end if s then s = specifications[s] @@ -2650,6 +2699,8 @@ do -- a bit redundant access to datasets + local creported = setmetatableindex("table") + local function processcite(presets,specification) -- if specification then @@ -2676,9 +2727,15 @@ do -- if not found or #found == 0 then -- if not list or #list == 0 then - report("no entry %a found in dataset %a",reference,dataset) + if not creported[dataset][reference] then + report("no entry %a found in dataset %a",reference,dataset) + creported[dataset][reference] = true + end elseif not setup then - report("invalid reference for %a",reference) + if not creported[""][reference] then + report("invalid reference for %a",reference) + creported[""][reference] = true + end else if trace_cite then report("processing reference %a",reference) @@ -3505,3 +3562,34 @@ do end end + +do + + -- no caching for now + + interfaces.implement { -- shared with mkiv so no public + name = "btxdoifelsecitedone", + protected = true, + -- public = true, + -- arguments = "2 arguments", + arguments = "2 strings", + actions = function(dataset,tag) + -- dataset ignored + local list = structures.lists.tobesaved + local done = false + for i=1,#list do + local l = list[i] + local m = l.metadata + if m and m.kind == "btx" then + local u = l.userdata + if u and u.btxref == tag then + done = true + break + end + end + end + ctx_doifelse(done) + end + } + +end diff --git a/Master/texmf-dist/tex/context/base/mkiv/publ-ini.mkiv b/Master/texmf-dist/tex/context/base/mkiv/publ-ini.mkiv index dfed53c7374..6e34d3ab5e5 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/publ-ini.mkiv +++ b/Master/texmf-dist/tex/context/base/mkiv/publ-ini.mkiv @@ -799,9 +799,13 @@ \unexpanded\def\btxdoifelsecombiinlist#1#2% {\clf_btxdoifelsecombiinlist{#1}{#2}} +\unexpanded\def\btxdoifelsecitedone#1#2% + {\clf_btxdoifelsecitedone{#1}{#2}} + \let\btxdoifsameaspreviouscheckedelse\btxdoifelsesameaspreviouschecked \let\btxdoifsameaspreviouselse \btxdoifelsesameasprevious \let\btxdoifcombiinlistelse \btxdoifelsecombiinlist +\let\btxdoifcitedoneelse \btxdoifelsecitedone \def\publ_place_list_indeed#1#2[#3][#4]% {\begingroup diff --git a/Master/texmf-dist/tex/context/base/mkiv/publ-sor.lua b/Master/texmf-dist/tex/context/base/mkiv/publ-sor.lua index 30a0d9bddf8..ed944ed9d9e 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/publ-sor.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/publ-sor.lua @@ -370,9 +370,17 @@ table.setmetatableindex(sorters,function(t,k) return anything end) publications.lists.sorters = sorters --- publications.sortmethods.key = { --- sequence = { --- { field = "key", default = "", unknown = "" }, --- { field = "index", default = "", unknown = "" }, --- }, --- } +publications.sortmethods.key = { + sequence = { + { field = "key", default = "", unknown = "" }, + { field = "index", default = 0, unknown = 0 }, + }, +} + +publications.sortmethods.index = { + sequence = { + { field = "index", default = 0, unknown = 0 }, + }, +} + +publications.sortmethods.dataset = publications.sortmethods.index diff --git a/Master/texmf-dist/tex/context/base/mkiv/regi-ini.lua b/Master/texmf-dist/tex/context/base/mkiv/regi-ini.lua index 8d4f2bfd5a1..2a3b2caafa5 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/regi-ini.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/regi-ini.lua @@ -16,7 +16,6 @@ runtime.</p> local commands, context = commands, context - local tostring = tostring local utfchar = utf.char local P, Cs, Cc, lpegmatch = lpeg.P, lpeg.Cs, lpeg.Cc, lpeg.match diff --git a/Master/texmf-dist/tex/context/base/mkiv/scrn-hlp.lua b/Master/texmf-dist/tex/context/base/mkiv/scrn-hlp.lua index 8f6f6f746db..a11ad48d285 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/scrn-hlp.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/scrn-hlp.lua @@ -18,8 +18,8 @@ local formatters = string.formatters local a_help = attributes.private("help") -local copy_node_list = node.copy_list -local hpack_node_list = node.hpack +local copy_node_list = nodes.copylist +local hpack_node_list = nodes.hpack local register_list = nodes.pool.register diff --git a/Master/texmf-dist/tex/context/base/mkiv/scrn-ini.lua b/Master/texmf-dist/tex/context/base/mkiv/scrn-ini.lua index ce9f9f71b06..9c9a9f1b487 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/scrn-ini.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/scrn-ini.lua @@ -33,7 +33,7 @@ interfaces.implement { arguments = { { { "title" }, - { "subtitle" }, + { "subtitle"}, { "author" }, { "creator" }, { "date" }, @@ -41,3 +41,11 @@ interfaces.implement { } } } + +interfaces.implement { + name = "setautoprefix", + actions = function(prefix) + backends.codeinjections.setautoprefix(prefix) + end, + arguments = "string", +} diff --git a/Master/texmf-dist/tex/context/base/mkiv/scrn-ini.mkvi b/Master/texmf-dist/tex/context/base/mkiv/scrn-ini.mkvi index 39fef740c24..4651956a564 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/scrn-ini.mkvi +++ b/Master/texmf-dist/tex/context/base/mkiv/scrn-ini.mkvi @@ -251,4 +251,8 @@ \c!keyword=, \c!date=] +\appendtoks + \clf_setautoprefix{\interactionparameter\c!prefix}% +\to \everysetupinteraction + \protect \endinput diff --git a/Master/texmf-dist/tex/context/base/mkiv/scrn-wid.lua b/Master/texmf-dist/tex/context/base/mkiv/scrn-wid.lua index 17c9ebddc4a..e92be778f1e 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/scrn-wid.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/scrn-wid.lua @@ -231,13 +231,15 @@ function soundclips.register(specification) end end -function soundclips.insert(tag) - local sc = soundclips[tag] - if not sc then - -- todo: message - return soundclips.register { tag = tag } - else - return sc +function soundclips.insert(specification) + local tag = specification.tag + if tag and tag ~= "" then + local sc = soundclips[tag] + if not sc then + -- todo: message + sc = soundclips.register { tag = tag } + end + nodeinjections.insertsound(sc) end end @@ -298,7 +300,6 @@ implement { actions = renderings.register, arguments = { { - { "type" }, { "label" }, { "mime" }, { "filename" }, @@ -321,6 +322,8 @@ implement { { "height", "dimen" }, { "option" }, { "page", "integer" }, + { "openpage" }, + { "closepage" }, } } } diff --git a/Master/texmf-dist/tex/context/base/mkiv/scrn-wid.mkvi b/Master/texmf-dist/tex/context/base/mkiv/scrn-wid.mkvi index d0b0fb006a2..d9f7940cd8f 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/scrn-wid.mkvi +++ b/Master/texmf-dist/tex/context/base/mkiv/scrn-wid.mkvi @@ -665,6 +665,7 @@ \letrenderingwindowparameter\c!closepageaction\empty \setrenderingwindowparameter\c!width {\d_scrn_rendering_width }% \setrenderingwindowparameter\c!height {\d_scrn_rendering_height}% + \letrenderingwindowparameter\c!align \v!flushleft \to \everypresetrenderingwindow \unexpanded\def\placerenderingwindow diff --git a/Master/texmf-dist/tex/context/base/mkiv/scrp-cjk.lua b/Master/texmf-dist/tex/context/base/mkiv/scrp-cjk.lua index 9e6e24f4d02..0667e8031f0 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/scrp-cjk.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/scrp-cjk.lua @@ -17,59 +17,60 @@ if not modules then modules = { } end modules ['scrp-cjk'] = { -- endofline turned into spaces (would not make sense either because otherwise a -- wanted space at the end of a line would have to be a hard coded ones. -local nuts = nodes.nuts +local nuts = nodes.nuts -local insert_node_after = nuts.insert_after -local insert_node_before = nuts.insert_before -local copy_node = nuts.copy -local remove_node = nuts.remove -local nextglyph = nuts.traversers.glyph +local copy_node = nuts.copy +local remove_node = nuts.remove +local nextglyph = nuts.traversers.glyph -local getnext = nuts.getnext -local getprev = nuts.getprev -local getfont = nuts.getfont -local getchar = nuts.getchar -local getid = nuts.getid -local getsubtype = nuts.getsubtype -local getwidth = nuts.getwidth +local getnext = nuts.getnext +local getprev = nuts.getprev +local getfont = nuts.getfont +local getchar = nuts.getchar +local getid = nuts.getid +local getsubtype = nuts.getsubtype +local getwidth = nuts.getwidth -local setchar = nuts.setchar +local setchar = nuts.setchar -local nodepool = nuts.pool -local new_glue = nodepool.glue -local new_kern = nodepool.kern -local new_penalty = nodepool.penalty +local nodepool = nuts.pool +local new_glue = nodepool.glue +local new_kern = nodepool.kern +local new_penalty = nodepool.penalty -local nodecodes = nodes.nodecodes -local gluecodes = nodes.gluecodes +local nodecodes = nodes.nodecodes +local gluecodes = nodes.gluecodes -local glyph_code = nodecodes.glyph -local glue_code = nodecodes.glue +local glyph_code = nodecodes.glyph +local glue_code = nodecodes.glue -local userskip_code = gluecodes.userskip -local spaceskip_code = gluecodes.spaceskip -local xspaceskip_code = gluecodes.xspaceskip +local userskip_code = gluecodes.userskip +local spaceskip_code = gluecodes.spaceskip +local xspaceskip_code = gluecodes.xspaceskip -local hash = scripts.hash +local hash = characters.scripthash -local getscriptstatus = scripts.getstatus -local getscriptdata = scripts.getdata -local scriptcolors = scripts.colors +local getscriptstatus = scripts.getstatus +local getscriptdata = scripts.getdata +local scriptcolors = scripts.colors -local fonthashes = fonts.hashes -local quaddata = fonthashes.quads -local spacedata = fonthashes.spaces +local fonthashes = fonts.hashes +local quaddata = fonthashes.quads +local spacedata = fonthashes.spaces -local decomposed = characters.hangul.decomposed +local decomposed = characters.hangul.decomposed -local trace_details = false trackers.register("scripts.details", function(v) trace_details = v end) +local trace_details = false trackers.register("scripts.details", function(v) trace_details = v end) -local report_details = logs.reporter("scripts","detail") +local report_details = logs.reporter("scripts","detail") -- raggedleft is controlled by leftskip and we might end up with a situation where -- the intercharacter spacing interferes with this; the solution is to patch the -- nodelist but better is to use veryraggedleft +local insertnodeafter = scripts.helpers.insertnodeafter +local insertnodebefore = scripts.helpers.insertnodebefore + local inter_char_shrink = 0 local inter_char_stretch = 0 local inter_char_half_shrink = 0 @@ -133,206 +134,206 @@ local function nobreak(head,current) if trace_details then trace_detail(current,"break") end - insert_node_before(head,current,new_penalty(10000)) + insertnodebefore(head,current,new_penalty(10000)) end local function stretch_break(head,current) if trace_details then trace_detail(current,"stretch break") end - insert_node_before(head,current,new_glue(0,inter_char_stretch,0)) + insertnodebefore(head,current,new_glue(0,inter_char_stretch,0)) end local function shrink_break(head,current) if trace_details then trace_detail(current,"shrink break") end - insert_node_before(head,current,new_glue(0,0,inter_char_half_shrink)) + insertnodebefore(head,current,new_glue(0,0,inter_char_half_shrink)) end local function nobreak_stretch(head,current) if trace_details then trace_detail(current,"no break stretch") end - insert_node_before(head,current,new_penalty(10000)) - insert_node_before(head,current,new_glue(0,inter_char_stretch,0)) + insertnodebefore(head,current,new_penalty(10000)) + insertnodebefore(head,current,new_glue(0,inter_char_stretch,0)) end local function korean_break(head,current) if trace_details then trace_detail(current,"korean break") end - insert_node_before(head,current,new_penalty(inter_char_hangul_penalty)) + insertnodebefore(head,current,new_penalty(inter_char_hangul_penalty)) end local function nobreak_shrink(head,current) if trace_details then trace_detail(current,"nobreak shrink") end - insert_node_before(head,current,new_penalty(10000)) - insert_node_before(head,current,new_glue(0,0,inter_char_half_shrink)) + insertnodebefore(head,current,new_penalty(10000)) + insertnodebefore(head,current,new_glue(0,0,inter_char_half_shrink)) end local function nobreak_autoshrink(head,current) if trace_details then trace_detail(current,"nobreak autoshrink") end - insert_node_before(head,current,new_penalty(10000)) - insert_node_before(head,current,new_glue(0,0,inter_char_half_shrink)) + insertnodebefore(head,current,new_penalty(10000)) + insertnodebefore(head,current,new_glue(0,0,inter_char_half_shrink)) end local function nobreak_stretch_nobreak_shrink(head,current) if trace_details then trace_detail(current,"nobreak stretch nobreak shrink") end - insert_node_before(head,current,new_penalty(10000)) - insert_node_before(head,current,new_glue(0,inter_char_stretch,0)) - insert_node_before(head,current,new_penalty(10000)) - insert_node_before(head,current,new_glue(0,0,inter_char_half_shrink)) + insertnodebefore(head,current,new_penalty(10000)) + insertnodebefore(head,current,new_glue(0,inter_char_stretch,0)) + insertnodebefore(head,current,new_penalty(10000)) + insertnodebefore(head,current,new_glue(0,0,inter_char_half_shrink)) end local function nobreak_stretch_nobreak_autoshrink(head,current) if trace_details then trace_detail(current,"nobreak stretch nobreak autoshrink") end - insert_node_before(head,current,new_penalty(10000)) - insert_node_before(head,current,new_glue(0,inter_char_stretch,0)) - insert_node_before(head,current,new_penalty(10000)) - insert_node_before(head,current,new_glue(0,0,inter_char_half_shrink)) + insertnodebefore(head,current,new_penalty(10000)) + insertnodebefore(head,current,new_glue(0,inter_char_stretch,0)) + insertnodebefore(head,current,new_penalty(10000)) + insertnodebefore(head,current,new_glue(0,0,inter_char_half_shrink)) end local function nobreak_shrink_nobreak_stretch(head,current) if trace_details then trace_detail(current,"nobreak shrink nobreak stretch") end - insert_node_before(head,current,new_penalty(10000)) - insert_node_before(head,current,new_glue(0,0,inter_char_half_shrink)) - insert_node_before(head,current,new_penalty(10000)) - insert_node_before(head,current,new_glue(0,inter_char_stretch,0)) + insertnodebefore(head,current,new_penalty(10000)) + insertnodebefore(head,current,new_glue(0,0,inter_char_half_shrink)) + insertnodebefore(head,current,new_penalty(10000)) + insertnodebefore(head,current,new_glue(0,inter_char_stretch,0)) end local function nobreak_autoshrink_nobreak_stretch(head,current) if trace_details then trace_detail(current,"nobreak autoshrink nobreak stretch") end - insert_node_before(head,current,new_penalty(10000)) - insert_node_before(head,current,new_glue(0,0,inter_char_half_shrink)) - insert_node_before(head,current,new_penalty(10000)) - insert_node_before(head,current,new_glue(0,inter_char_stretch,0)) + insertnodebefore(head,current,new_penalty(10000)) + insertnodebefore(head,current,new_glue(0,0,inter_char_half_shrink)) + insertnodebefore(head,current,new_penalty(10000)) + insertnodebefore(head,current,new_glue(0,inter_char_stretch,0)) end local function nobreak_shrink_break_stretch(head,current) if trace_details then trace_detail(current,"nobreak shrink break stretch") end - insert_node_before(head,current,new_penalty(10000)) - insert_node_before(head,current,new_glue(0,0,inter_char_half_shrink)) - insert_node_before(head,current,new_glue(0,inter_char_stretch,0)) + insertnodebefore(head,current,new_penalty(10000)) + insertnodebefore(head,current,new_glue(0,0,inter_char_half_shrink)) + insertnodebefore(head,current,new_glue(0,inter_char_stretch,0)) end local function nobreak_autoshrink_break_stretch(head,current) if trace_details then trace_detail(current,"nobreak autoshrink break stretch") end - insert_node_before(head,current,new_penalty(10000)) - insert_node_before(head,current,new_glue(0,0,inter_char_half_shrink)) - insert_node_before(head,current,new_glue(0,inter_char_stretch,0)) + insertnodebefore(head,current,new_penalty(10000)) + insertnodebefore(head,current,new_glue(0,0,inter_char_half_shrink)) + insertnodebefore(head,current,new_glue(0,inter_char_stretch,0)) end local function nobreak_shrink_break_stretch_nobreak_shrink(head,current) if trace_details then trace_detail(current,"nobreak shrink break stretch nobreak shrink") end - insert_node_before(head,current,new_penalty(10000)) - insert_node_before(head,current,new_glue(0,0,inter_char_half_shrink)) - insert_node_before(head,current,new_glue(0,inter_char_stretch,0)) - insert_node_before(head,current,new_penalty(10000)) - insert_node_before(head,current,new_glue(0,inter_char_stretch,0)) + insertnodebefore(head,current,new_penalty(10000)) + insertnodebefore(head,current,new_glue(0,0,inter_char_half_shrink)) + insertnodebefore(head,current,new_glue(0,inter_char_stretch,0)) + insertnodebefore(head,current,new_penalty(10000)) + insertnodebefore(head,current,new_glue(0,inter_char_stretch,0)) end local function japanese_between_full_close_open(head,current) -- todo: check width if trace_details then trace_detail(current,"japanese between full close open") end - insert_node_before(head,current,new_kern(-half_char_width)) - insert_node_before(head,current,new_glue(half_char_width,0,inter_char_half_shrink)) - insert_node_before(head,current,new_kern(-half_char_width)) + insertnodebefore(head,current,new_kern(-half_char_width)) + insertnodebefore(head,current,new_glue(half_char_width,0,inter_char_half_shrink)) + insertnodebefore(head,current,new_kern(-half_char_width)) end local function japanese_between_full_close_full_close(head,current) -- todo: check width if trace_details then trace_detail(current,"japanese between full close full close") end - insert_node_before(head,current,new_kern(-half_char_width)) - -- insert_node_before(head,current,new_glue(half_char_width,0,inter_char_half_shrink)) + insertnodebefore(head,current,new_kern(-half_char_width)) + -- insertnodebefore(head,current,new_glue(half_char_width,0,inter_char_half_shrink)) end local function japanese_before_full_width_punct(head,current) -- todo: check width if trace_details then trace_detail(current,"japanese before full width punct") end - insert_node_before(head,current,new_penalty(10000)) - insert_node_before(head,current,new_glue(quarter_char_width,0,inter_char_quarter_shrink)) - insert_node_before(head,current,new_kern(-quarter_char_width)) + insertnodebefore(head,current,new_penalty(10000)) + insertnodebefore(head,current,new_glue(quarter_char_width,0,inter_char_quarter_shrink)) + insertnodebefore(head,current,new_kern(-quarter_char_width)) end local function japanese_after_full_width_punct(head,current) -- todo: check width if trace_details then trace_detail(current,"japanese after full width punct") end - insert_node_before(head,current,new_kern(-quarter_char_width)) - insert_node_before(head,current,new_glue(quarter_char_width,0,inter_char_quarter_shrink)) + insertnodebefore(head,current,new_kern(-quarter_char_width)) + insertnodebefore(head,current,new_glue(quarter_char_width,0,inter_char_quarter_shrink)) end local function nobreak_autoshrink_break_stretch_nobreak_autoshrink(head,current) if trace_details then trace_detail(current,"nobreak autoshrink break stretch nobreak autoshrink") end - insert_node_before(head,current,new_penalty(10000)) - insert_node_before(head,current,new_glue(0,0,inter_char_half_shrink)) - insert_node_before(head,current,new_glue(0,inter_char_stretch,0)) - insert_node_before(head,current,new_penalty(10000)) - insert_node_before(head,current,new_glue(0,0,inter_char_half_shrink)) + insertnodebefore(head,current,new_penalty(10000)) + insertnodebefore(head,current,new_glue(0,0,inter_char_half_shrink)) + insertnodebefore(head,current,new_glue(0,inter_char_stretch,0)) + insertnodebefore(head,current,new_penalty(10000)) + insertnodebefore(head,current,new_glue(0,0,inter_char_half_shrink)) end local function nobreak_autoshrink_break_stretch_nobreak_shrink(head,current) if trace_details then trace_detail(current,"nobreak autoshrink break stretch nobreak shrink") end - insert_node_before(head,current,new_penalty(10000)) - insert_node_before(head,current,new_glue(0,0,inter_char_half_shrink)) - insert_node_before(head,current,new_glue(0,inter_char_stretch,0)) - insert_node_before(head,current,new_penalty(10000)) - insert_node_before(head,current,new_glue(0,0,inter_char_half_shrink)) + insertnodebefore(head,current,new_penalty(10000)) + insertnodebefore(head,current,new_glue(0,0,inter_char_half_shrink)) + insertnodebefore(head,current,new_glue(0,inter_char_stretch,0)) + insertnodebefore(head,current,new_penalty(10000)) + insertnodebefore(head,current,new_glue(0,0,inter_char_half_shrink)) end local function nobreak_shrink_break_stretch_nobreak_autoshrink(head,current) if trace_details then trace_detail(current,"nobreak shrink break stretch nobreak autoshrink") end - insert_node_before(head,current,new_penalty(10000)) - insert_node_before(head,current,new_glue(0,0,inter_char_half_shrink)) - insert_node_before(head,current,new_glue(0,inter_char_stretch,0)) - insert_node_before(head,current,new_penalty(10000)) - insert_node_before(head,current,new_glue(0,inter_char_stretch,0)) + insertnodebefore(head,current,new_penalty(10000)) + insertnodebefore(head,current,new_glue(0,0,inter_char_half_shrink)) + insertnodebefore(head,current,new_glue(0,inter_char_stretch,0)) + insertnodebefore(head,current,new_penalty(10000)) + insertnodebefore(head,current,new_glue(0,inter_char_stretch,0)) end local function nobreak_stretch_break_shrink(head,current) if trace_details then trace_detail(current,"nobreak stretch break shrink") end - insert_node_before(head,current,new_penalty(10000)) - insert_node_before(head,current,new_glue(0,inter_char_stretch,0)) - insert_node_before(head,current,new_glue(0,0,inter_char_half_shrink)) + insertnodebefore(head,current,new_penalty(10000)) + insertnodebefore(head,current,new_glue(0,inter_char_stretch,0)) + insertnodebefore(head,current,new_glue(0,0,inter_char_half_shrink)) end local function nobreak_stretch_break_autoshrink(head,current) if trace_details then trace_detail(current,"nobreak stretch break autoshrink") end - insert_node_before(head,current,new_penalty(10000)) - insert_node_before(head,current,new_glue(0,inter_char_stretch,0)) - insert_node_before(head,current,new_glue(0,0,inter_char_half_shrink)) + insertnodebefore(head,current,new_penalty(10000)) + insertnodebefore(head,current,new_glue(0,inter_char_stretch,0)) + insertnodebefore(head,current,new_glue(0,0,inter_char_half_shrink)) end -- Korean: hangul @@ -514,7 +515,7 @@ end scripts.installmethod { name = "hangul", injector = process, - datasets = { -- todo: metatables + datasets = { -- todo: metatables and maybe some stretch and shrink factor default = { inter_char_shrink_factor = 0.50, -- of quad inter_char_stretch_factor = 0.50, -- of quad @@ -524,6 +525,15 @@ scripts.installmethod { inter_char_quarter_stretch_factor = 0.50, -- of quad inter_char_hangul_penalty = 50, }, + tight = { + inter_char_shrink_factor = 0.10, -- of quad + inter_char_stretch_factor = 0.10, -- of quad + inter_char_half_shrink_factor = 0.10, -- of quad + inter_char_half_stretch_factor = 0.10, -- of quad + inter_char_quarter_shrink_factor = 0.10, -- of quad + inter_char_quarter_stretch_factor = 0.10, -- of quad + inter_char_hangul_penalty = 50, + }, }, } @@ -535,11 +545,11 @@ function scripts.decomposehangul(head) setchar(current,lead_consonant) local m = copy_node(current) setchar(m,medial_vowel) - head, current = insert_node_after(head,current,m) + head, current = insertnodeafter(head,current,m) if tail_consonant then local t = copy_node(current) setchar(t,tail_consonant) - head, current = insert_node_after(head,current,t) + head, current = insertnodeafter(head,current,t) end done = true end @@ -685,6 +695,7 @@ local chinese_8 = { hiragana = stretch_break, -- nobreak_autoshrink_break_stretch, katakana = stretch_break, -- nobreak_autoshrink_break_stretch, half_width_open = nobreak_autoshrink_break_stretch_nobreak_autoshrink, +half_width_open = stretch_break, half_width_close = nobreak_autoshrink_nobreak_stretch, full_width_open = nobreak_autoshrink_break_stretch_nobreak_shrink, full_width_close = nobreak_autoshrink_nobreak_stretch, @@ -961,7 +972,7 @@ local function process(head,first,last) end previous = current -- elseif id == math_code then - -- upcoming = getnext(end_of_math(current)) + -- upcoming = getnext(endofmath(current)) -- previous = "start" else -- glue local p = getprev(first) diff --git a/Master/texmf-dist/tex/context/base/mkiv/scrp-ini.lua b/Master/texmf-dist/tex/context/base/mkiv/scrp-ini.lua index ab6fca4dbef..60282ae1106 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/scrp-ini.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/scrp-ini.lua @@ -23,68 +23,65 @@ local report_preprocessing = logs.reporter("scripts","preprocessing") local report_splitting = logs.reporter("scripts","splitting") -local attributes = attributes -local nodes = nodes -local context = context +local attributes = attributes +local nodes = nodes +local context = context -local nodecodes = nodes.nodecodes +local nodecodes = nodes.nodecodes -local implement = interfaces.implement +local implement = interfaces.implement -local glyph_code = nodecodes.glyph -local glue_code = nodecodes.glue +local glyph_code = nodecodes.glyph +local glue_code = nodecodes.glue -local emwidths = fonts.hashes.emwidths -local exheights = fonts.hashes.exheights +local emwidths = fonts.hashes.emwidths +local exheights = fonts.hashes.exheights -local a_script = attributes.private('script') +local a_script = attributes.private('script') -local fontdata = fonts.hashes.identifiers -local allocate = utilities.storage.allocate -local setnodecolor = nodes.tracers.colors.set +local fontdata = fonts.hashes.identifiers +local allocate = utilities.storage.allocate +local setnodecolor = nodes.tracers.colors.set -local enableaction = nodes.tasks.enableaction -local disableaction = nodes.tasks.disableaction +local enableaction = nodes.tasks.enableaction +local disableaction = nodes.tasks.disableaction -local nuts = nodes.nuts +local nuts = nodes.nuts -local getnext = nuts.getnext -local getchar = nuts.getchar -local getfont = nuts.getfont -local getid = nuts.getid -local getglyphdata = nuts.getglyphdata -local setglyphdata = nuts.setglyphdata +local getnext = nuts.getnext +local getchar = nuts.getchar +local getfont = nuts.getfont +local getid = nuts.getid +local getglyphdata = nuts.getglyphdata +local setglyphdata = nuts.setglyphdata -local isglyph = nuts.isglyph +local isglyph = nuts.isglyph -local insert_node_after = nuts.insert_after -local insert_node_before = nuts.insert_before +local firstglyph = nuts.firstglyph -local first_glyph = nuts.first_glyph +local nextglyph = nuts.traversers.glyph +local nextchar = nuts.traversers.char -local nextglyph = nuts.traversers.glyph -local nextchar = nuts.traversers.char +local nodepool = nuts.pool -local nodepool = nuts.pool +local new_glue = nodepool.glue +local new_rule = nodepool.rule +local new_penalty = nodepool.penalty -local new_glue = nodepool.glue -local new_rule = nodepool.rule -local new_penalty = nodepool.penalty +scripts = scripts or { } +local scripts = scripts -scripts = scripts or { } -local scripts = scripts +local handlers = allocate() +scripts.handlers = handlers -scripts.hash = scripts.hash or { } -local hash = scripts.hash +local injectors = allocate() +scripts.injectors = handlers -local handlers = allocate() -scripts.handlers = handlers +local splitters = allocate() +scripts.splitters = splitters -local injectors = allocate() -scripts.injectors = handlers - -local splitters = allocate() -scripts.splitters = splitters +local helpers = allocate() +scripts.helpers = helpers -- we need to fake it in luatex @@ -116,165 +113,34 @@ if not getscript then end -local hash = { -- we could put these presets in char-def.lua - -- - -- half width opening parenthesis - -- - [0x0028] = "half_width_open", - [0x005B] = "half_width_open", - [0x007B] = "half_width_open", - [0x2018] = "half_width_open", -- ‘ - [0x201C] = "half_width_open", -- “ - -- - -- full width opening parenthesis - -- - [0x3008] = "full_width_open", -- 〈 Left book quote - [0x300A] = "full_width_open", -- 《 Left double book quote - [0x300C] = "full_width_open", -- 「 left quote - [0x300E] = "full_width_open", -- 『 left double quote - [0x3010] = "full_width_open", -- 【 left double book quote - [0x3014] = "full_width_open", -- 〔 left book quote - [0x3016] = "full_width_open", --〖 left double book quote - [0x3018] = "full_width_open", -- left tortoise bracket - [0x301A] = "full_width_open", -- left square bracket - [0x301D] = "full_width_open", -- reverse double prime qm - [0xFF08] = "full_width_open", -- ( left parenthesis - [0xFF3B] = "full_width_open", -- [ left square brackets - [0xFF5B] = "full_width_open", -- { left curve bracket - -- - -- half width closing parenthesis - -- - [0x0029] = "half_width_close", - [0x005D] = "half_width_close", - [0x007D] = "half_width_close", - [0x2019] = "half_width_close", -- ’ right quote, right - [0x201D] = "half_width_close", -- ” right double quote - -- - -- full width closing parenthesis - -- - [0x3009] = "full_width_close", -- 〉 book quote - [0x300B] = "full_width_close", -- 》 double book quote - [0x300D] = "full_width_close", -- 」 right quote, right - [0x300F] = "full_width_close", -- 』 right double quote - [0x3011] = "full_width_close", -- 】 right double book quote - [0x3015] = "full_width_close", -- 〕 right book quote - [0x3017] = "full_width_close", -- 〗 right double book quote - [0x3019] = "full_width_close", -- right tortoise bracket - [0x301B] = "full_width_close", -- right square bracket - [0x301E] = "full_width_close", -- double prime qm - [0x301F] = "full_width_close", -- low double prime qm - [0xFF09] = "full_width_close", -- ) right parenthesis - [0xFF3D] = "full_width_close", -- ] right square brackets - [0xFF5D] = "full_width_close", -- } right curve brackets - -- - [0xFF62] = "half_width_open", -- left corner bracket - [0xFF63] = "half_width_close", -- right corner bracket - -- - -- vertical opening vertical - -- - -- 0xFE35, 0xFE37, 0xFE39, 0xFE3B, 0xFE3D, 0xFE3F, 0xFE41, 0xFE43, 0xFE47, - -- - -- vertical closing - -- - -- 0xFE36, 0xFE38, 0xFE3A, 0xFE3C, 0xFE3E, 0xFE40, 0xFE42, 0xFE44, 0xFE48, - -- - -- half width opening punctuation - -- - -- <empty> - -- - -- full width opening punctuation - -- - -- 0x2236, -- ∶ - -- 0xFF0C, -- , - -- - -- half width closing punctuation_hw - -- - [0x0021] = "half_width_close", -- ! - [0x002C] = "half_width_close", -- , - [0x002E] = "half_width_close", -- . - [0x003A] = "half_width_close", -- : - [0x003B] = "half_width_close", -- ; - [0x003F] = "half_width_close", -- ? - [0xFF61] = "half_width_close", -- hw full stop - -- - -- full width closing punctuation - -- - [0x3001] = "full_width_close", -- 、 - [0x3002] = "full_width_close", -- 。 - [0xFF0C] = "full_width_close", -- , - [0xFF0E] = "full_width_close", -- - -- - -- depends on font - -- - [0xFF01] = "full_width_close", -- ! - [0xFF1F] = "full_width_close", -- ? - -- - [0xFF1A] = "full_width_punct", -- : - [0xFF1B] = "full_width_punct", -- ; - -- - -- non starter - -- - [0x3005] = "non_starter", [0x3041] = "non_starter", [0x3043] = "non_starter", [0x3045] = "non_starter", [0x3047] = "non_starter", - [0x3049] = "non_starter", [0x3063] = "non_starter", [0x3083] = "non_starter", [0x3085] = "non_starter", [0x3087] = "non_starter", - [0x308E] = "non_starter", [0x3095] = "non_starter", [0x3096] = "non_starter", [0x309B] = "non_starter", [0x309C] = "non_starter", - [0x309D] = "non_starter", [0x309E] = "non_starter", [0x30A0] = "non_starter", [0x30A1] = "non_starter", [0x30A3] = "non_starter", - [0x30A5] = "non_starter", [0x30A7] = "non_starter", [0x30A9] = "non_starter", [0x30C3] = "non_starter", [0x30E3] = "non_starter", - [0x30E5] = "non_starter", [0x30E7] = "non_starter", [0x30EE] = "non_starter", [0x30F5] = "non_starter", [0x30F6] = "non_starter", - [0x30FC] = "non_starter", [0x30FD] = "non_starter", [0x30FE] = "non_starter", [0x31F0] = "non_starter", [0x31F1] = "non_starter", - [0x31F2] = "non_starter", [0x31F3] = "non_starter", [0x31F4] = "non_starter", [0x31F5] = "non_starter", [0x31F6] = "non_starter", - [0x31F7] = "non_starter", [0x31F8] = "non_starter", [0x31F9] = "non_starter", [0x31FA] = "non_starter", [0x31FB] = "non_starter", - [0x31FC] = "non_starter", [0x31FD] = "non_starter", [0x31FE] = "non_starter", [0x31FF] = "non_starter", - -- - [0x301C] = "non_starter", [0x303B] = "non_starter", [0x303C] = "non_starter", [0x309B] = "non_starter", [0x30FB] = "non_starter", - [0x30FE] = "non_starter", - -- hyphenation - -- - [0x2026] = "hyphen", -- … ellipsis - [0x2014] = "hyphen", -- — hyphen - -- - [0x1361] = "ethiopic_word", - [0x1362] = "ethiopic_sentence", - -- - -- tibetan: - -- - [0x0F0B] = "breaking_tsheg", - [0x0F0C] = "nonbreaking_tsheg", +local insertnodebefore, insertnodeafter do -} + local insertafter = nuts.insertafter + local insertbefore = nuts.insertbefore + local setattributelist = nuts.setattributelist -local function provide(t,k) - local v - if not tonumber(k) then v = false - elseif (k >= 0x03040 and k <= 0x030FF) - or (k >= 0x031F0 and k <= 0x031FF) - or (k >= 0x032D0 and k <= 0x032FE) - or (k >= 0x0FF00 and k <= 0x0FFEF) then v = "katakana" - elseif (k >= 0x03400 and k <= 0x04DFF) - or (k >= 0x04E00 and k <= 0x09FFF) - or (k >= 0x0F900 and k <= 0x0FAFF) - or (k >= 0x20000 and k <= 0x2A6DF) - or (k >= 0x2F800 and k <= 0x2FA1F) then v = "chinese" - elseif (k >= 0x0AC00 and k <= 0x0D7A3) then v = "korean" - elseif (k >= 0x01100 and k <= 0x0115F) then v = "jamo_initial" - elseif (k >= 0x01160 and k <= 0x011A7) then v = "jamo_medial" - elseif (k >= 0x011A8 and k <= 0x011FF) then v = "jamo_final" - elseif (k >= 0x01200 and k <= 0x0139F) then v = "ethiopic_syllable" - elseif (k >= 0x00F00 and k <= 0x00FFF) then v = "tibetan" - else v = false + insertnodebefore = function (head,current,what) + head, current = insertbefore(head,current,what) + setattributelist(what,current) + return head, current end - t[k] = v - return v -end -setmetatableindex(hash,provide) -- should come from char-def + insertnodeafter = function(head,current,what) + head, current = insertafter(head,current,what) + setattributelist(what,current) + return head, current + end + + helpers.insertnodebefore = insertnodebefore + helpers.insertnodeafter = insertnodeafter + +end -scripts.hash = hash +local hash = characters.scripthash local numbertodataset = allocate() local numbertohandler = allocate() ---~ storage.register("scripts/hash", hash, "scripts.hash") - scripts.numbertodataset = numbertodataset scripts.numbertohandler = numbertohandler @@ -511,7 +377,7 @@ local function traced_process(head,first,last,process,a) end function scripts.injectors.handler(head) - local start = first_glyph(head) -- we already have glyphs here (subtype 1) + local start = firstglyph(head) -- we already have glyphs here (subtype 1) if not start then return head else @@ -791,7 +657,7 @@ end local tree, attr, proc -function splitters.handler(head) -- todo: also first_glyph test +function splitters.handler(head) -- todo: also firstglyph test local current = head while current do if getid(current) == glyph_code then @@ -848,9 +714,9 @@ end local function marker(head,current,font,color) -- could become: nodes.tracers.marker local ex = exheights[font] local em = emwidths [font] - head, current = insert_node_after(head,current,new_penalty(10000)) - head, current = insert_node_after(head,current,new_glue(-0.05*em)) - head, current = insert_node_after(head,current,new_rule(0.05*em,1.5*ex,0.5*ex)) + head, current = insertnodeafter(head,current,new_penalty(10000)) + head, current = insertnodeafter(head,current,new_glue(-0.05*em)) + head, current = insertnodeafter(head,current,new_rule(0.05*em,1.5*ex,0.5*ex)) setnodecolor(current,color) return head, current end @@ -871,7 +737,7 @@ function splitters.insertafter(handler,head,first,last,detail) if ignore then return head, last else - return insert_node_after(head,last,new_glue(0,last_s)) + return insertnodeafter(head,last,new_glue(0,last_s)) end end @@ -1046,30 +912,30 @@ do scripts.inserters = { space_before = function(head,current) - return insert_node_before(head,current,space_glue(current)) + return insertnodebefore(head,current,space_glue(current)) end, space_after = function(head,current) - return insert_node_after(head,current,space_glue(current)) + return insertnodeafter(head,current,space_glue(current)) end, zerowidthspace_before = function(head,current) - return insert_node_before(head,current,new_glue(0)) + return insertnodebefore(head,current,new_glue(0)) end, zerowidthspace_after = function(head,current) - return insert_node_after(head,current,new_glue(0)) + return insertnodeafter(head,current,new_glue(0)) end, nobreakspace_before = function(head,current) local g = space_glue(current) local p = new_penalty(10000) - head, current = insert_node_before(head,current,p) - return insert_node_before(head,current,g) + head, current = insertnodebefore(head,current,p) + return insertnodebefore(head,current,g) end, nobreakspace_after = function(head,current) local g = space_glue(current) local p = new_penalty(10000) - head, current = insert_node_after(head,current,g) - return insert_node_after(head,current,p) + head, current = insertnodeafter(head,current,g) + return insertnodeafter(head,current,p) end, } diff --git a/Master/texmf-dist/tex/context/base/mkiv/scrp-ini.mkiv b/Master/texmf-dist/tex/context/base/mkiv/scrp-ini.mkiv index 4eb3f29e373..f677eceef6c 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/scrp-ini.mkiv +++ b/Master/texmf-dist/tex/context/base/mkiv/scrp-ini.mkiv @@ -61,6 +61,8 @@ % \setuevalue\currentscript{\setscript[\currentscript]}% % \to \everydefinescript +% \ctxlua{inspect(scripts.handlers.hangul.datasets)} + \unexpanded\def\scripts_basics_set {\clf_setscript{\currentscript}{\scriptparameter\c!method}{\scriptparameter\c!preset}} diff --git a/Master/texmf-dist/tex/context/base/mkiv/spac-ali.lua b/Master/texmf-dist/tex/context/base/mkiv/spac-ali.lua index 2e2650f3b7a..448b0162b93 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/spac-ali.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/spac-ali.lua @@ -68,7 +68,7 @@ local nofrealigned = 0 -- raggedright 0 0 fil -- raggedcenter 0 + 0 + - -local function handler(head,leftpage,realpageno) -- traverse_list +local function handler(head,leftpage,realpageno) -- traverselist local current = head while current do local id = getid(current) diff --git a/Master/texmf-dist/tex/context/base/mkiv/spac-ali.mkiv b/Master/texmf-dist/tex/context/base/mkiv/spac-ali.mkiv index 2467f83525b..a54c44b72f8 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/spac-ali.mkiv +++ b/Master/texmf-dist/tex/context/base/mkiv/spac-ali.mkiv @@ -184,6 +184,9 @@ \unexpanded\def\leftorrightvbox{\ifconditional\displaylefttoright\expandafter\lefttorightvbox\else\expandafter\righttoleftvbox\fi} \unexpanded\def\leftorrightvtop{\ifconditional\displaylefttoright\expandafter\lefttorightvtop\else\expandafter\righttoleftvtop\fi} +\unexpanded\def\rtltext{\groupedcommand{\dontleavehmode\righttoleft\ignorespaces}\removeunwantedspaces} +\unexpanded\def\ltrtext{\groupedcommand{\dontleavehmode\lefttoright\ignorespaces}\removeunwantedspaces} + % Tolerance and hyphenation \ifdefined\lesshyphens \else \let\lesshyphens\relax \fi diff --git a/Master/texmf-dist/tex/context/base/mkiv/spac-chr.lua b/Master/texmf-dist/tex/context/base/mkiv/spac-chr.lua index fa6eb18a576..5bc8ae8f617 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/spac-chr.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/spac-chr.lua @@ -28,7 +28,10 @@ local nodes, node = nodes, node local nuts = nodes.nuts +local getid = nuts.getid local getboth = nuts.getboth +local getsubtype = nuts.getsubtype +local setsubtype = nuts.setsubtype local getnext = nuts.getnext local getprev = nuts.getprev local getattr = nuts.getattr @@ -37,16 +40,13 @@ local getlanguage = nuts.getlanguage local setchar = nuts.setchar local setattrlist = nuts.setattrlist local getfont = nuts.getfont -local setsubtype = nuts.setsubtype local isglyph = nuts.isglyph local setcolor = nodes.tracers.colors.set -local insert_node_before = nuts.insert_before -local insert_node_after = nuts.insert_after +local insertnodebefore = nuts.insertbefore +local insertnodeafter = nuts.insertafter local remove_node = nuts.remove ------ traverse_id = nuts.traverse_id ------ traverse_char = nuts.traverse_char local nextchar = nuts.traversers.char local nextglyph = nuts.traversers.glyph @@ -62,10 +62,12 @@ local nodecodes = nodes.nodecodes local gluecodes = nodes.gluecodes local glyph_code = nodecodes.glyph +local glue_code = nodecodes.glue local spaceskip_code = gluecodes.spaceskip local chardata = characters.data -local is_punctuation = characters.is_punctuation +local ispunctuation = characters.is_punctuation +local canhavespace = characters.can_have_space local typesetters = typesetters @@ -95,7 +97,7 @@ local function inject_quad_space(unicode,head,current,fraction) setattrlist(glue,current) setattrlist(current) -- why reset all setattr(glue,a_character,unicode) - return insert_node_after(head,current,glue) + return insertnodeafter(head,current,glue) end local function inject_char_space(unicode,head,current,parent) @@ -105,7 +107,7 @@ local function inject_char_space(unicode,head,current,parent) setattrlist(glue,current) setattrlist(current) -- why reset all setattr(glue,a_character,unicode) - return insert_node_after(head,current,glue) + return insertnodeafter(head,current,glue) end local function inject_nobreak_space(unicode,head,current,space,spacestretch,spaceshrink) @@ -114,23 +116,23 @@ local function inject_nobreak_space(unicode,head,current,space,spacestretch,spac setattrlist(glue,current) setattrlist(current) -- why reset all setattr(glue,a_character,unicode) -- bombs - head, current = insert_node_after(head,current,penalty) + head, current = insertnodeafter(head,current,penalty) if trace_nbsp then local rule = new_rule(space) local kern = new_kern(-space) local penalty = new_penalty(10000) setcolor(rule,"orange") - head, current = insert_node_after(head,current,rule) - head, current = insert_node_after(head,current,kern) - head, current = insert_node_after(head,current,penalty) + head, current = insertnodeafter(head,current,rule) + head, current = insertnodeafter(head,current,kern) + head, current = insertnodeafter(head,current,penalty) end - return insert_node_after(head,current,glue) + return insertnodeafter(head,current,glue) end local function nbsp(head,current) local para = fontparameters[getfont(current)] local attr = getattr(current,a_alignstate) or 0 - if attr >= 1 or attr <= 3 then -- flushright + if attr >= 1 and attr <= 3 then -- flushright head, current = inject_nobreak_space(0x00A0,head,current,para.space,0,0) else head, current = inject_nobreak_space(0x00A0,head,current,para.space,para.spacestretch,para.spaceshrink) @@ -148,7 +150,7 @@ end function characters.replacenbspaces(head) local wipe = false - for current, char, font in nextglyph, head do -- can be anytime so no traverse_char + for current, char, font in nextglyph, head do -- can be anytime so no traversechar if char == 0x00A0 then if wipe then head = remove_node(h,current,true) @@ -184,18 +186,34 @@ local methods = { -- maybe also 0x0008 : backspace + -- Watch out: a return value means "remove"! + + [0x001E] = function(head,current) -- kind of special + local next = getnext(current) + if next and getid(next) == glue_code and getsubtype(next) == spaceskip_code then + local nextnext = getnext(next) + if nextnext then + local char, font = isglyph(nextnext) + if char and not canhavespace[char] then + head, current = remove_node(head,next,true) + end + end + end + return head, current + end, + [0x001F] = function(head,current) -- kind of special local next = getnext(current) if next then local char, font = isglyph(next) if char then - head, current = remove_node(head,current,true) - if not is_punctuation[char] then + if not ispunctuation[char] then local p = fontparameters[font] - head, current = insert_node_before(head,current,new_glue(p.space,p.space_stretch,p.space_shrink)) + head, current = insertnodebefore(head,current,new_glue(p.space,p.space_stretch,p.space_shrink)) end end end + return head, current end, [0x00A0] = function(head,current) -- nbsp @@ -226,7 +244,7 @@ local methods = { end, [0x00AD] = function(head,current) -- softhyphen - return insert_node_after(head,current,languages.explicithyphen(current)) + return insertnodeafter(head,current,languages.explicithyphen(current)) end, [0x2000] = function(head,current) -- enquad @@ -322,3 +340,30 @@ function characters.handler(head) end return head end + +-- function characters.handler(head) +-- local wiped = false +-- for current, char in nextchar, head do +-- local method = methods[char] +-- if method then +-- if wiped then +-- wiped[#wiped+1] = current +-- else +-- wiped = { current } +-- end +-- if trace_characters then +-- report_characters("replacing character %C, description %a",char,lower(chardata[char].description)) +-- end +-- local h = method(head,current) +-- if h then +-- head = h +-- end +-- end +-- end +-- if wiped then +-- for i=1,#wiped do +-- head = remove_node(head,wiped[i],true) +-- end +-- end +-- return head +-- end diff --git a/Master/texmf-dist/tex/context/base/mkiv/spac-chr.mkiv b/Master/texmf-dist/tex/context/base/mkiv/spac-chr.mkiv index 9113dc6a110..4c7cc9492eb 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/spac-chr.mkiv +++ b/Master/texmf-dist/tex/context/base/mkiv/spac-chr.mkiv @@ -95,7 +95,8 @@ \popoverloadmode -\chardef\optionalspace"1F % will be space unless before punctuation +\chardef\optionalspace "1F % will be space unless before punctuation +\chardef\autoinsertedspace"1E % a more clever \autoinsertspace % Shortcuts: diff --git a/Master/texmf-dist/tex/context/base/mkiv/spac-hor.mkiv b/Master/texmf-dist/tex/context/base/mkiv/spac-hor.mkiv index 16a1a0d4e9a..5d9cef07962 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/spac-hor.mkiv +++ b/Master/texmf-dist/tex/context/base/mkiv/spac-hor.mkiv @@ -621,6 +621,7 @@ \unexpanded\def\thinspace {\kern .16667\emwidth} \unexpanded\def\negthinspace{\kern-.16667\emwidth} \unexpanded\def\enspace {\kern .5\emwidth} + \unexpanded\def\emspace {\kern \emwidth} \fi @@ -635,8 +636,6 @@ \unexpanded\def\negenspace{\kern-.5\emwidth} \unexpanded\def\negemspace{\kern- \emwidth} -\let\emspace\quad - \unexpanded\def\charspace{ } % the unexpandable \space (as space can also be delimiter for numbers) \unexpanded\def\quads diff --git a/Master/texmf-dist/tex/context/base/mkiv/spac-ver.lua b/Master/texmf-dist/tex/context/base/mkiv/spac-ver.lua index 2fc9263213c..8baf2518413 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/spac-ver.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/spac-ver.lua @@ -148,14 +148,15 @@ local setdepth = nuts.setdepth local getdepth = nuts.getdepth local find_node_tail = nuts.tail -local flush_node = nuts.flush_node -local insert_node_after = nuts.insert_after -local insert_node_before = nuts.insert_before +local flushnode = nuts.flushnode +local insertnodeafter = nuts.insertafter +local insertnodebefore = nuts.insertbefore local remove_node = nuts.remove local count_nodes = nuts.countall local hpack_node = nuts.hpack local vpack_node = nuts.vpack -local start_of_par = nuts.start_of_par + +local startofpar = nuts.startofpar local nextnode = nuts.traversers.node local nexthlist = nuts.traversers.hlist @@ -171,7 +172,7 @@ local nodepool = nuts.pool local new_penalty = nodepool.penalty local new_kern = nodepool.kern -local new_glue = nodepool.glue +----- new_glue = nodepool.glue local new_rule = nodepool.rule local nodecodes = nodes.nodecodes @@ -293,7 +294,7 @@ end local function validvbox(parentid,list) if parentid == hlist_code then local id = getid(list) - if id == par_code and start_of_par(list) then + if id == par_code and startofpar(list) then list = getnext(list) if not next then return nil @@ -329,7 +330,7 @@ local function already_done(parentid,list,a_snapmethod) -- todo: done when only -- problem: any snapped vbox ends up in a line if list and parentid == hlist_code then local id = getid(list) - if id == par_code and start_of_par(list) then + if id == par_code and startofpar(list) then list = getnext(list) if not list then return false @@ -709,19 +710,19 @@ local function snap_topskip(current,method) return w, 0 end -local categories = { - [0] = "discard", - [1] = "largest", - [2] = "force", - [3] = "penalty", - [4] = "add", - [5] = "disable", - [6] = "nowhite", - [7] = "goback", - [8] = "packed", - [9] = "overlay", - [10] = "enable", - [11] = "notopskip", +local categories = { [0] = + "discard", + "largest", + "force", + "penalty", + "add", + "disable", + "nowhite", + "goback", + "packed", + "overlay", + "enable", + "notopskip", } categories = allocate(table.swapped(categories,categories)) @@ -1021,14 +1022,14 @@ do if width == 0 then -- do nothing elseif where == "after" then - head, current = insert_node_after(head,current,new_rule(w,h,d)) - head, current = insert_node_after(head,current,new_kern(width)) - head, current = insert_node_after(head,current,new_rule(w,h,d)) + head, current = insertnodeafter(head,current,new_rule(w,h,d)) + head, current = insertnodeafter(head,current,new_kern(width)) + head, current = insertnodeafter(head,current,new_rule(w,h,d)) else local c = current - head, current = insert_node_before(head,current,new_rule(w,h,d)) - head, current = insert_node_before(head,current,new_kern(width)) - head, current = insert_node_before(head,current,new_rule(w,h,d)) + head, current = insertnodebefore(head,current,new_rule(w,h,d)) + head, current = insertnodebefore(head,current,new_kern(width)) + head, current = insertnodebefore(head,current,new_rule(w,h,d)) current = c end if trace then @@ -1203,10 +1204,10 @@ do texsetdimen("global","d_spac_overlay",-delta) -- for tracing -- we should adapt pagetotal ! (need a hook for that) .. now we have the wrong pagebreak local k = new_kern(-delta) - head = insert_node_before(head,n,k) + head = insertnodebefore(head,n,k) if n_ht > p_ht then local k = new_kern(n_ht-p_ht) - head = insert_node_before(head,p,k) + head = insertnodebefore(head,p,k) end if trace_vspacing then report_vspacing("overlaying, prev height: %p, prev depth: %p, next height: %p, skips: %p, move up: %p",p_ht,p_dp,n_ht,skips,delta) @@ -1375,13 +1376,13 @@ do if penalty_data >= 10000 then -- or whatever threshold? local prev = getprev(current) if getid(prev) == glue_code then -- maybe go back more, or maybe even push back before any glue - -- tricky case: spacing/grid-007.tex: glue penalty glue - head = insert_node_before(head,prev,p) + -- tricky case: spacing/grid-007.tex: glue penalty glue + head = insertnodebefore(head,prev,p) else - head = insert_node_before(head,current,p) + head = insertnodebefore(head,current,p) end else - head = insert_node_before(head,current,p) + head = insertnodebefore(head,current,p) end -- if penalty_data > special_penalty_min and penalty_data < special_penalty_max then local props = properties[p] @@ -1400,22 +1401,22 @@ do trace_done("flushed due to forced " .. why,glue_data) end head = forced_skip(head,current,getwidth(glue_data,width),"before",trace) - flush_node(glue_data) + flushnode(glue_data) else local width, stretch, shrink = getglue(glue_data) if width ~= 0 then if trace then trace_done("flushed due to non zero " .. why,glue_data) end - head = insert_node_before(head,current,glue_data) + head = insertnodebefore(head,current,glue_data) elseif stretch ~= 0 or shrink ~= 0 then if trace then trace_done("flushed due to stretch/shrink in" .. why,glue_data) end - head = insert_node_before(head,current,glue_data) + head = insertnodebefore(head,current,glue_data) else -- report_vspacing("needs checking (%s): %p",gluecodes[getsubtype(glue_data)],w) - flush_node(glue_data) + flushnode(glue_data) end end end @@ -1545,7 +1546,7 @@ do if trace then trace_done("flush",glue_data) end - head = insert_node_before(head,current,glue_data) + head = insertnodebefore(head,current,glue_data) if trace then trace_natural("natural",current) end @@ -1634,7 +1635,7 @@ do trace_skip("force",sc,so,sp,current) end glue_order = so - flush_node(glue_data) + flushnode(glue_data) head, current, glue_data = remove_node(head,current) elseif glue_order == so then -- is now exclusive, maybe support goback as combi, else why a set @@ -1645,7 +1646,7 @@ do if trace then trace_skip("largest",sc,so,sp,current) end - flush_node(glue_data) + flushnode(glue_data) head, current, glue_data = remove_node(head,current) else if trace then @@ -1657,7 +1658,7 @@ do if trace then trace_skip("goback",sc,so,sp,current) end - flush_node(glue_data) + flushnode(glue_data) head, current, glue_data = remove_node(head,current) elseif sc == force then -- last one counts, some day we can provide an accumulator and largest etc @@ -1665,13 +1666,13 @@ do if trace then trace_skip("force",sc,so,sp,current) end - flush_node(glue_data) + flushnode(glue_data) head, current, glue_data = remove_node(head,current) elseif sc == penalty then if trace then trace_skip("penalty",sc,so,sp,current) end - flush_node(glue_data) + flushnode(glue_data) glue_data = nil head, current = remove_node(head,current,true) elseif sc == add then @@ -1881,7 +1882,7 @@ do end if force_glue then head, tail = forced_skip(head,tail,getwidth(glue_data),"after",trace) - flush_node(glue_data) + flushnode(glue_data) glue_data = nil elseif tail then setlink(tail,glue_data) @@ -2004,10 +2005,7 @@ do function vspacing.vboxhandler(head,where) if head and not ignore[where] and getnext(head) then - if getnext(head) then -- what if a one liner and snapping? - head = collapser(head,"vbox",where,trace_vbox_vspacing,true,a_snapvbox) -- todo: local snapper - return head - end + head = collapser(head,"vbox",where,trace_vbox_vspacing,true,a_snapvbox) -- todo: local snapper end return head end @@ -2128,19 +2126,20 @@ do end end - local trace = false - local last = nil - local vmode_code = tex.modelevels.vertical - local temp_code = nodecodes.temp - local getnest = tex.getnest - local getlist = tex.getlist + local trace = false + local last = nil + local vmode_code = tex.modelevels.vertical + local temp_code = nodecodes.temp + local texgetnest = tex.getnest + local texgetlist = tex.getlist + local getnodetail = nodes.tail trackers.register("vspacing.forcestrutdepth",function(v) trace = v end) -- abs : negative is inner function vspacing.checkstrutdepth(depth) - local nest = getnest() + local nest = texgetnest() if abs(nest.mode) == vmode_code and nest.head then local tail = nest.tail local id = tail.id @@ -2149,10 +2148,10 @@ do tail.depth = depth end nest.prevdepth = depth - elseif id == temp_code and getnest("ptr") == 0 then - local head = getlist("page_head") + elseif id == temp_code and texgetnest("ptr") == 0 then + local head = texgetlist("page_head") if head then - tail = nodes.tail(head) + tail = getnodetail(head) if tail and tail.id == hlist_code then if tail.depth < depth then tail.depth = depth diff --git a/Master/texmf-dist/tex/context/base/mkiv/status-files.pdf b/Master/texmf-dist/tex/context/base/mkiv/status-files.pdf Binary files differindex e890fa88c93..5e4560e8410 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/status-files.pdf +++ b/Master/texmf-dist/tex/context/base/mkiv/status-files.pdf diff --git a/Master/texmf-dist/tex/context/base/mkiv/status-lua.pdf b/Master/texmf-dist/tex/context/base/mkiv/status-lua.pdf Binary files differindex ffeb01fef65..c403fd6c524 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/status-lua.pdf +++ b/Master/texmf-dist/tex/context/base/mkiv/status-lua.pdf diff --git a/Master/texmf-dist/tex/context/base/mkiv/strc-blk.lua b/Master/texmf-dist/tex/context/base/mkiv/strc-blk.lua index 6717c37773a..f627ad3eaf7 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/strc-blk.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/strc-blk.lua @@ -95,8 +95,11 @@ function blocks.setstate(state,name,tag) end end -function blocks.select(state,name,tag,criterium) - criterium = criterium or "text" + +local function selectblocks(state,name,tag,criterium,action) + if not criterium or criterium == "" then + criterium = "text" + end if find(tag,"=",1,true) then tag = "" end @@ -115,14 +118,19 @@ function blocks.select(state,name,tag,criterium) local metadata = ri.metadata if names[metadata.name] then if all then - printblock(ri.index,name,ri.data,hide) + if action(ri.index,name,ri.data,hide) then + return + end else local mtags = metadata.tags if mtags then for tag, sta in next, tags do if mtags[tag] then - printblock(ri.index,name,ri.data,hide) - break + if action(ri.index,name,ri.data,hide) then + return + else + break + end end end end @@ -131,6 +139,20 @@ function blocks.select(state,name,tag,criterium) end end +function blocks.select(state,name,tag,criterium) + selectblocks(state,name,tag,criterium,printblock) +end + +function blocks.empty(state,name,tag,criterium) + local found = false + local function checkempty(_,_,data) + found = type(data) == "string" and find(data,"%S") + return found + end + selectblocks(state,name,tag,criterium,checkempty) + return not found +end + function blocks.save(name,tag,userdata,buffer) -- wrong, not yet adapted local data = buffers.getcontent(buffer) local tags = settings_to_set(tag) @@ -183,6 +205,7 @@ function blocks.save(name,tag,userdata,buffer) -- wrong, not yet adapted buffers.erase(buffer) end + -- interface implement { name = "definestructureblock", actions = blocks.define, arguments = "string" } @@ -190,3 +213,11 @@ implement { name = "savestructureblock", actions = blocks.save, implement { name = "selectstructureblock", actions = blocks.select, arguments = "4 strings" } implement { name = "setstructureblockstate", actions = blocks.setstate, arguments = "3 strings" } implement { name = "structureblockuservariable", actions = blocks.uservariable, arguments = { "integer", "string" } } + +implement { + name = "doifelsestructureblocksempty", + arguments = "3 strings", + actions = function(name,tag,criterium) + commands.doifelse(blocks.empty(false,name,tag,criterium)) + end, +} diff --git a/Master/texmf-dist/tex/context/base/mkiv/strc-blk.mkiv b/Master/texmf-dist/tex/context/base/mkiv/strc-blk.mkiv index e521987212d..3541d28524c 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/strc-blk.mkiv +++ b/Master/texmf-dist/tex/context/base/mkiv/strc-blk.mkiv @@ -177,4 +177,6 @@ \unexpanded\def\processblocks{\doquadrupleempty\strc_blocks_select [process]} \unexpanded\def\selectblocks {\doquadrupleempty\strc_blocks_select [use]} +\unexpanded\def\doifelseblocksempty{\clf_doifelsestructureblocksempty} % {name}{tag}{criterium} + \protect \endinput diff --git a/Master/texmf-dist/tex/context/base/mkiv/strc-doc.lua b/Master/texmf-dist/tex/context/base/mkiv/strc-doc.lua index 5cb207c38bf..0592ad7d515 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/strc-doc.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/strc-doc.lua @@ -40,6 +40,8 @@ local v_all = variables.all local v_positive = variables.positive local v_current = variables.current +local texgetcount = tex.getcount + local trace_sectioning = false trackers.register("structures.sectioning", function(v) trace_sectioning = v end) local trace_details = false trackers.register("structures.details", function(v) trace_details = v end) @@ -48,6 +50,7 @@ local report_used = logs.reporter("structure") local context = context local commands = commands +local ctx_doifelse = commands.doifelse local structures = structures local helpers = structures.helpers @@ -165,9 +168,9 @@ end local lastsaved = 0 function sections.save(sectiondata) -local sectiondata = helpers.simplify(sectiondata) -- maybe done earlier - local numberdata = sectiondata.numberdata - local ntobesaved = #tobesaved + local sectiondata = helpers.simplify(sectiondata) -- maybe done earlier + local numberdata = sectiondata.numberdata + local ntobesaved = #tobesaved if not numberdata or sectiondata.metadata.nolist then -- stay else @@ -523,26 +526,76 @@ end -- this one will become: return catcode, d (etc) +-- function sections.structuredata(depth,key,default,honorcatcodetable) -- todo: spec table and then also depth +-- if depth then +-- depth = levelmap[depth] or tonumber(depth) +-- end +-- if not depth or depth == 0 then +-- depth = data.depth +-- end +-- local data = data.status[depth] +-- local d +-- if data then +-- if find(key,".",1,true) then +-- d = accesstable(key,data) +-- else +-- d = data.titledata +-- d = d and d[key] +-- end +-- end +-- if d and type(d) ~= "table" then +-- if honorcatcodetable == true or honorcatcodetable == v_auto then +-- local metadata = data.metadata +-- local catcodes = metadata and metadata.catcodes +-- if catcodes then +-- ctx_sprint(catcodes,d) +-- else +-- context(d) +-- end +-- elseif not honorcatcodetable or honorcatcodetable == "" then +-- context(d) +-- else +-- local catcodes = catcodenumbers[honorcatcodetable] +-- if catcodes then +-- ctx_sprint(catcodes,d) +-- else +-- context(d) +-- end +-- end +-- elseif default then +-- context(default) +-- end +-- end + function sections.structuredata(depth,key,default,honorcatcodetable) -- todo: spec table and then also depth + local detail = false + if type(depth) == "string" then + depth, detail = string.splitup(depth,":") + end if depth then depth = levelmap[depth] or tonumber(depth) end if not depth or depth == 0 then depth = data.depth end - local data = data.status[depth] + local useddata + if detail == "+" then + useddata = structures.lists.collected[#structures.lists.tobesaved+1] + else + useddata = data.status[depth] + end local d - if data then + if useddata then if find(key,".",1,true) then - d = accesstable(key,data) + d = accesstable(key,useddata) else - d = data.titledata + d = useddata.titledata d = d and d[key] end end if d and type(d) ~= "table" then if honorcatcodetable == true or honorcatcodetable == v_auto then - local metadata = data.metadata + local metadata = useddata.metadata local catcodes = metadata and metadata.catcodes if catcodes then ctx_sprint(catcodes,d) @@ -564,20 +617,50 @@ function sections.structuredata(depth,key,default,honorcatcodetable) -- todo: sp end end +-- function sections.userdata(depth,key,default) +-- if depth then +-- depth = levelmap[depth] or tonumber(depth) +-- end +-- if not depth or depth == 0 then +-- depth = data.depth +-- end +-- if depth > 0 then +-- local userdata = data.status[depth] +-- userdata = userdata and userdata.userdata +-- userdata = (userdata and userdata[key]) or default +-- if userdata then +-- context(userdata) +-- end +-- end +-- end + function sections.userdata(depth,key,default) + local detail = false + if type(depth) == "string" then + depth, detail = string.splitup(depth,":") + end if depth then - depth = levelmap[depth] or tonumber(depth) + depth = levelmap[depth] + end + if not depth then + depth = tonumber(depth) end if not depth or depth == 0 then depth = data.depth end - if depth > 0 then - local userdata = data.status[depth] - userdata = userdata and userdata.userdata - userdata = (userdata and userdata[key]) or default + local userdata + if detail == "+" then + userdata = structures.lists.collected[#structures.lists.tobesaved+1] if userdata then - context(userdata) + userdata = userdata.userdata end + elseif depth > 0 then + userdata = data.status[depth] + userdata = userdata and userdata.userdata + end + userdata = (userdata and userdata[key]) or default + if userdata then + context(userdata) end end @@ -772,6 +855,7 @@ function sections.typesetnumber(entry,kind,...) applyprocessor(starter) end end +-- inspect(entry) if prefixlist and (kind == "section" or kind == "prefix" or kind == "direct") then -- find valid set (problem: for sectionnumber we should pass the level) -- no holes @@ -780,6 +864,8 @@ function sections.typesetnumber(entry,kind,...) local bb = 0 local ee = 0 -- find last valid number +-- print("index >>",b,e) +-- inspect(prefixlist) for k=e,b,-1 do local prefix = prefixlist[k] local index = sections.getlevel(prefix) or k @@ -1208,3 +1294,80 @@ implement { name = "popsectionblock", actions = sections.popblock, } + +interfaces.implement { + name = "doifelsefirstsectionpage", + arguments = "1 argument", + public = true, + protected = true, + actions = function(name) + local found = false + -- local list = structures.lists.collected + local list = lists.collected + if list then + local realpage = texgetcount("realpageno") + for i=1,#list do + local listdata = list[i] + local metadata = listdata.metadata + if metadata and metadata.kind == "section" and metadata.name == name then + -- local current = structures.documents.data.status[metadata.level] + local current = data.status[metadata.level] + if current and current.references.internal == listdata.references.internal then + found = listdata.references.realpage == realpage + break + end + end + end + end + ctx_doifelse(found) + end, +} + +-- could be faster (in huge lists) + +-- local firstpages = table.setmetatableindex(function(t,name) +-- -- local list = structures.lists.collected +-- local list = lists.collected +-- local pages = { } +-- if list then +-- for i=1,#list do +-- local listdata = list[i] +-- local metadata = listdata.metadata +-- if metadata and metadata.kind == "section" and metadata.name == name then +-- local references = listdata.references +-- if references then +-- pages[references.internal] = listdata +-- end +-- end +-- end +-- end +-- t[name] = pages +-- return pages +-- end) +-- +-- interfaces.implement { +-- name = "doifelsefirstsectionpage", +-- arguments = "1 argument", +-- public = true, +-- protected = true, +-- actions = function(name) +-- local found = firstpages[name] +-- if found then +-- local level = structures.sections.levelmap[name] +-- if level then +-- -- local current = structures.documents.data.status[level] +-- local current = data.status[level] +-- if current then +-- local realpage = texgetcount("realpageno") +-- found = found[current.references.internal] +-- found = found and found.references.realpage == realpage +-- else +-- found = false +-- end +-- else +-- found = false +-- end +-- end +-- ctx_doifelse(found) +-- end, +-- } diff --git a/Master/texmf-dist/tex/context/base/mkiv/strc-enu.mkvi b/Master/texmf-dist/tex/context/base/mkiv/strc-enu.mkvi index 4680a3981df..4ad417a3e9b 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/strc-enu.mkvi +++ b/Master/texmf-dist/tex/context/base/mkiv/strc-enu.mkvi @@ -305,16 +305,22 @@ \endgroup} \unexpanded\def\strc_enumerations_inject_symbol % todo check - {\constructionparameter\c!left + {\begingroup + \useconstructionstyleandcolor\c!numberstyle\c!numbercolor + \constructionparameter\c!left \constructionparameter\c!symbol - \constructionparameter\c!right} + \constructionparameter\c!right + \endgroup} \unexpanded\def\strc_enumerations_inject_number - {\constructionparameter\c!left + {\begingroup + \useconstructionstyleandcolor\c!numberstyle\c!numbercolor + \constructionparameter\c!left \constructionparameter\c!starter \clf_savedlistprefixednumber{\currentconstructionmain}\currentconstructionlistentry\relax \constructionparameter\c!stopper - \constructionparameter\c!right} + \constructionparameter\c!right + \endgroup} \unexpanded\def\strc_enumerations_inject_text_and_number {\constructionparameter\c!numbercommand diff --git a/Master/texmf-dist/tex/context/base/mkiv/strc-flt.mkvi b/Master/texmf-dist/tex/context/base/mkiv/strc-flt.mkvi index d9fd359c668..464b6ab520f 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/strc-flt.mkvi +++ b/Master/texmf-dist/tex/context/base/mkiv/strc-flt.mkvi @@ -1111,6 +1111,35 @@ \def\strc_floats_group_index {\numexpr\clf_listgroupindex{\currentfloat}{\currentfloatgroup}\relax} +%D A lightweight subnumber feature: +%D +%D \starttyping +%D \startplacefigure [location=none] +%D \startsubfloatnumbering +%D \startfloatcombination [nx=3] +%D \startplacefigure [title=Left] \externalfigure \stopplacefigure +%D \startplacefigure [title=Middle] \externalfigure \stopplacefigure +%D \startplacefigure [title=Right] \externalfigure \stopplacefigure +%D \stopfloatcombination +%D \stopsubfloatnumbering +%D \stopplacefigure +%D \stoptyping + +\glet\currentsubfloatcounter\empty + +\unexpanded\def\startsubfloatnumbering + {\glet\currentsubfloatcounter\s!unknown} + +\unexpanded\def\stopsubfloatnumbering + {\strc_counters_reset_sub\currentsubfloatcounter\plustwo + \glet\currentsubfloatcounter\empty} + +\defineconversionset[subfloats][number,characters] + +\setupcaptions + %[figure] + [\c!numberconversionset=subfloats] + \def\strc_floats_place_packaged_boxes {\expandafter\strc_floats_place_packaged_boxes_indeed\expandafter{\m_strc_floats_saved_userdata}} @@ -1127,7 +1156,17 @@ \ifx\currentfloatgroup\empty % independent \iftrialtypesetting\strc_counters_save\currentfloatcounter\fi - \strc_counters_increment\currentfloatcounter + \ifx\empty\currentsubfloatcounter + \strc_counters_increment\currentfloatcounter + \strc_counters_reset_sub\currentfloatcounter\plustwo + \else + \ifcase\strc_counters_raw_sub\currentfloatcounter\plustwo\relax + \strc_counters_increment\currentfloatcounter + \strc_counters_reset_sub\currentfloatcounter\plustwo + \fi + \strc_counters_increment_sub\currentfloatcounter\plustwo + \glet\currentsubfloatcounter\currentfloatcounter + \fi \else\ifcase\strc_floats_group_index % first in group \iftrialtypesetting\strc_counters_save\currentfloatcounter\fi diff --git a/Master/texmf-dist/tex/context/base/mkiv/strc-lst.lua b/Master/texmf-dist/tex/context/base/mkiv/strc-lst.lua index a6799d80f1a..41d09f073a1 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/strc-lst.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/strc-lst.lua @@ -37,6 +37,8 @@ local conditionals = tex.conditionals local ctx_latelua = context.latelua +local cheat = true + local structures = structures local lists = structures.lists local sections = structures.sections @@ -96,7 +98,10 @@ local v_reference = variables.reference local v_local = variables["local"] local v_default = variables.default --- for the moment not public -- +local cheats = { + [variables.fit] = true, + [variables.tight] = true, +} local function zerostrippedconcat(t,separator) local f = 1 @@ -193,8 +198,13 @@ local function finalizer() if r then local i = r.internal local f = flaginternals[i] + local v = usedviews[i] + if cheat and v and cheats[v] then -- cheats check added, to be tested by RKB + -- this permits runs=2 with interactivity + r.view = v + end if f then - r.used = usedviews[i] or true + r.used = v or true end end end @@ -232,7 +242,7 @@ function lists.addto(t) -- maybe more more here (saves parsing at the tex end) if numberdata then local numbers = numberdata.numbers if type(numbers) == "string" then - numberdata.numbers = counters.compact(numbers,nil,true) + counters.compact(numberdata,numbers,numberdata.level) end end local group = numberdata and numberdata.group @@ -256,6 +266,14 @@ function lists.addto(t) -- maybe more more here (saves parsing at the tex end) if r and not r.section then r.section = structures.sections.currentid() end + local b = r and t.block + if r and not b then + local s = r.section + if s then + s = structures.sections.tobesaved[s] + r.block = s and s.block or nil + end + end local i = r and r.internal or 0 -- brrr if r and kind and name then local tag = tags.getid(kind,name) @@ -445,7 +463,8 @@ local function filtercollected(specification) elseif not wantedcriterium then block = documents.data.block else - block, criterium = wantedblock, wantedcriterium + block = wantedblock + criterium = wantedcriterium end if block == "" then block = false @@ -468,6 +487,10 @@ local function filtercollected(specification) specification.block = block specification.all = all -- + if specification.atmost then + criterium = v_text + end + -- if trace_lists then report_lists("filtering names %,t, criterium %a, block %a",sortedkeys(names), criterium, block or "*") end @@ -476,6 +499,31 @@ local function filtercollected(specification) report_lists("criterium %a, block %a, found %a",specification.criterium, specification.block or "*", #result) end -- + local levels = tonumber(specification.levels) + if levels then + local minlevel = 1000 + local found = result + local nofresult = #result + for i=1,nofresult do + local v = found[i] + local l = v.metadata.level or 1 + if l < minlevel then + minlevel = l + end + end + local maxlevel = minlevel + levels - 1 + result = { } + nofresult = 0 + for i=1,#found do + local v = found[i] + local l = v.metadata.level or 1 + if l >= minlevel and l <= maxlevel then + nofresult = nofresult + 1 + result[nofresult] = v + end + end + end + -- if sortorder then -- experiment local sorter = listsorters[sortorder] if sorter then @@ -495,7 +543,7 @@ end filters[v_intro] = function(specification) local collected = specification.collected local result = { } - local nofresult = #result + local nofresult = 0 local all = specification.all local names = specification.names for i=1,#collected do @@ -515,7 +563,7 @@ end filters[v_reference] = function(specification) local collected = specification.collected local result = { } - local nofresult = #result + local nofresult = 0 local names = specification.names local sections = sections.collected local reference = specification.reference @@ -554,7 +602,7 @@ end filters[v_all] = function(specification) local collected = specification.collected local result = { } - local nofresult = #result + local nofresult = 0 local block = specification.block local all = specification.all local forced = specification.forced @@ -566,7 +614,7 @@ filters[v_all] = function(specification) if r and (not block or not r.block or block == r.block) then local metadata = v.metadata if metadata then - local name = metadata.name or false + local name = metadata.name or false local sectionnumber = (r.section == 0) or sections[r.section] if forced[name] or (sectionnumber and not metadata.nolist and (all or names[name])) then -- and not sectionnumber.hidenumber then nofresult = nofresult + 1 @@ -588,7 +636,7 @@ filters[v_current] = function(specification) end local collected = specification.collected local result = { } - local nofresult = #result + local nofresult = 0 local depth = specification.depth local block = specification.block local all = specification.all @@ -634,7 +682,7 @@ filters[v_here] = function(specification) end local collected = specification.collected local result = { } - local nofresult = #result + local nofresult = 0 local depth = specification.depth local block = specification.block local all = specification.all @@ -679,7 +727,7 @@ filters[v_previous] = function(specification) end local collected = specification.collected local result = { } - local nofresult = #result + local nofresult = 0 local block = specification.block local all = specification.all local names = specification.names @@ -740,7 +788,7 @@ filters[v_component] = function(specification) -- special case, no structure yet local collected = specification.collected local result = { } - local nofresult = #result + local nofresult = 0 local all = specification.all local names = specification.names local component = resolvers.jobs.currentcomponent() or "" @@ -766,7 +814,7 @@ end filters[v_default] = function(specification) -- is named local collected = specification.collected local result = { } - local nofresult = #result + local nofresult = 0 ----- depth = specification.depth local block = specification.block local criterium = specification.criterium @@ -797,6 +845,7 @@ filters[v_default] = function(specification) -- is named for i=1,#collected do local v = collected[i] local r = v.references +-- inspect(v) if r and (not block or not r.block or pblock == r.block) then local sectionnumber = sections[r.section] if sectionnumber then @@ -839,13 +888,23 @@ function lists.process(specification) local total = #result lists.result = result if total > 0 then + local usedinternals = references.usedinternals + local usedviews = references.usedviews local specials = settings_to_set(specification.extras or "") specials = next(specials) and specials or nil for i=1,total do - local r = result[i] - local m = r.metadata - local s = specials and r.numberdata and specials[zerostrippedconcat(r.numberdata.numbers,".")] or "" - context.strclistsentryprocess(m.name,m.kind,i,s) + local listentry = result[i] + local metadata = listentry.metadata + local numberdata = listentry.numberdata + local references = listentry.references + local special = specials and numberdata and specials[zerostrippedconcat(numberdata.numbers,".")] or "" + if cheat and references then + -- this permits runs=2 with interactivity + local internal = references.internal + usedinternals[internal] = true + usedviews [internal] = references.view + end + context.strclistsentryprocess(metadata.name,metadata.kind,i,special) end end end @@ -943,6 +1002,18 @@ function lists.hasnumberdata(name,n) return false end +function lists.rawnumber(n,name) + local data = lists.result[n] + if data then + local numberdata = data.numberdata + if numberdata then + numberdata = numberdata.numbers + return numberdata and numberdata[getsectionlevel(name)] or numberdata[name] or 0 + end + end + return 0 +end + function lists.prefix(name,n,spec) helpers.prefix(lists.result[n],spec) end @@ -1068,6 +1139,7 @@ implement { } }, { "numberdata", { + { "level", "integer" }, { "numbers" }, { "groupsuffix" }, { "group" }, @@ -1111,6 +1183,7 @@ implement { { "reference" }, { "extras" }, { "order" }, + { "levels" }, } } } @@ -1278,6 +1351,12 @@ implement { arguments = "integer" } +implement { + name = "rawlistnumber", + actions = { lists.rawnumber, context }, + arguments = { "integer", "string" }, +} + -- new and experimental and therefore off by default lists.autoreorder = false -- true diff --git a/Master/texmf-dist/tex/context/base/mkiv/strc-mar.lua b/Master/texmf-dist/tex/context/base/mkiv/strc-mar.lua index f7953c416e0..dd6c0a93d69 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/strc-mar.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/strc-mar.lua @@ -43,7 +43,7 @@ local lateluawhatsit_code = whatsitcodes.latelua local texsetattribute = tex.setattribute -local a_marks = attributes.private("structure","marks") +local a_marks = attributes.private("marks") local trace_set = false trackers.register("marks.set", function(v) trace_set = v end) local trace_get = false trackers.register("marks.get", function(v) trace_get = v end) diff --git a/Master/texmf-dist/tex/context/base/mkiv/strc-mat.mkiv b/Master/texmf-dist/tex/context/base/mkiv/strc-mat.mkiv index 7f5a1915445..d0d4066526f 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/strc-mat.mkiv +++ b/Master/texmf-dist/tex/context/base/mkiv/strc-mat.mkiv @@ -204,7 +204,10 @@ \relax \relax \relax [\c!name=\v!formula,\s!counter=\v!formula,% \s!hascaption=\v!yes,\s!hastitle=\v!yes,\s!hasnumber=\v!yes,%\s!haslevel=#6,% - \c!reference=#1,\c!title=\namedformulaentry,\c!bookmark=]% + \c!reference=#1,% + \c!title=\namedformulaentry,% + \c!list=\currentplaceformulalist,% + \c!bookmark=\currentplaceformulabookmark]% [#2]% \glet\namedformulaentry\empty % \relax \glet#3\m_strc_counters_last_registered_index @@ -620,7 +623,6 @@ \setvalue{\??mathdisplayspacemodel\v!after:1}% old {\prevdepth .5\strutdp - \edef\p_spaceafter{\formulaparameter\c!spaceafter}% \ifx\p_spaceafter\v!none % nothing \else @@ -637,7 +639,6 @@ \setvalue{\??mathdisplayspacemodel\v!after:2}% old {\prevdepth\lineheight - \edef\p_spaceafter{\formulaparameter\c!spaceafter}% \ifx\p_spaceafter\v!none % nothing \else @@ -668,11 +669,11 @@ \else\ifx\p_spacebefore\empty \directvspacing\currentvspacing \else - \directvspacing{\p_spacebefore,\the\scratchdimen}% + \directvspacing\p_spacebefore \fi\fi \else \ifx\p_spacebefore\v!none - \directvspacing{\m_spacebefore}% + \directvspacing\m_spacebefore \else\ifx\p_spacebefore\empty \directvspacing{\m_spacebefore,\currentvspacing}% \else @@ -706,7 +707,7 @@ \else\ifx\p_spacebefore\empty \directvspacing\currentvspacing \else - \directvspacing{\p_spacebefore,\the\scratchdimen}% + \directvspacing\p_spacebefore \fi\fi \fi \else @@ -975,6 +976,7 @@ \rawprocesscommalist[\p_direct]\strc_formulas_option \fi % not : \def\strc_formulas_formula[##1]##2{\mathematics{##2}}% + \useformulastyleandcolor\c!style\c!color \mathematics{#2}% \endgroup} @@ -1227,13 +1229,20 @@ %\doifelsenextbgroup\strc_formulas_place_yes\strc_formulas_place_nop} % [ref]{} \strc_formulas_place_nop} +\let\currentplaceformulabookmark\empty +\let\currentplaceformulalist \empty + \def\strc_formulas_start_place_parameters[#1]% {\letdummyparameter\c!title \empty \letdummyparameter\c!reference\empty + \letdummyparameter\c!bookmark \empty + \letdummyparameter\c!list \empty \letdummyparameter\c!suffix \empty \getdummyparameters[#1]% \edef\currentplaceformulatitle {\dummyparameter\c!title}% \edef\currentplaceformulareference{\dummyparameter\c!reference}% + \edef\currentplaceformulalist {\dummyparameter\c!list}% + \edef\currentplaceformulabookmark {\dummyparameter\c!bookmark}% \edef\currentplaceformulasuffix {\dummyparameter\c!suffix}% \ifx\currentplaceformulatitle\empty\else \normalexpanded{\setformulalistentry{\currentplaceformulatitle}}% diff --git a/Master/texmf-dist/tex/context/base/mkiv/strc-not.mkvi b/Master/texmf-dist/tex/context/base/mkiv/strc-not.mkvi index f29cb38ba16..469a57a15db 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/strc-not.mkvi +++ b/Master/texmf-dist/tex/context/base/mkiv/strc-not.mkvi @@ -24,9 +24,6 @@ \ifdefined\dotagsetnotesymbol \else \let\dotagsetnotesymbol\relax \fi \ifdefined\dotagsetnotation \else \let\dotagsetnotation \relax \fi -\unexpanded\def\unvboxed {\ifvmode\unvbox \else\box \fi} % will change or used more often -\unexpanded\def\unvcopied{\ifvmode\unvcopy\else\copy\fi} % will change or used more often - %D \LMTX\ testcase: %D %D \starttyping @@ -1507,7 +1504,12 @@ {\starthboxestohbox \iftrialtypesetting\unvcopy\else\unvbox\fi\currentnoteinsertionnumber \stophboxestohbox}} - {\iftrialtypesetting\unvcopied\else\unvboxed\fi\currentnoteinsertionnumber}% + {\iftrialtypesetting + \ifvmode\unvcopy\else\copy\fi + \else + \ifvmode\unvbox \else\box \fi + \fi + \currentnoteinsertionnumber}% \endgroup} %D Supporting end notes is surprisingly easy. Even better, we can combine this diff --git a/Master/texmf-dist/tex/context/base/mkiv/strc-num.lua b/Master/texmf-dist/tex/context/base/mkiv/strc-num.lua index 25e575a56f7..3339819a22f 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/strc-num.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/strc-num.lua @@ -270,18 +270,36 @@ function counters.raw(name) return counterdata[name] end -function counters.compact(name,level,onlynumbers) +function counters.compact(target,name,level) local cd = counterdata[name] if cd then - local data = cd.data - local compact = { } - for i=1,level or #data do + local data = cd.data + local numbers = { } + local ownnumbers = { } + local depth = #data + if not level or level == 0 then + level = depth + elseif level > depth then + level = depth + end + + for i=1,level do local d = data[i] - if d.number ~= 0 then - compact[i] = (onlynumbers and d.number) or d + if d then + local n = d.number + local o = d.own + if n ~= 0 then + numbers[i] = n + end + if o ~= "" then + ownnumbers[i] = o + end end end - return compact + target.numbers = numbers + if next(ownnumbers) then + target.ownnumbers = ownnumbers + end end end @@ -357,8 +375,9 @@ end local function reset(name,n) local cd = counterdata[name] if cd then - for i=n or 1,#cd.data do - local d = cd.data[i] + local data = cd.data + for i=n or 1,#data do + local d = data[i] savevalue(name,i) local number = d.start or 0 d.number = number diff --git a/Master/texmf-dist/tex/context/base/mkiv/strc-pag.lua b/Master/texmf-dist/tex/context/base/mkiv/strc-pag.lua index 9c040104db4..d26f4adcfe2 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/strc-pag.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/strc-pag.lua @@ -255,7 +255,7 @@ function helpers.analyze(entry,specification) if not section then return entry, false, "no section" end - local sectiondata = sections.collected[references.section] + local sectiondata = references.sectiondata or sections.collected[references.section] -- so we use an already resolved external one if not sectiondata then return entry, false, "no section data" end @@ -272,7 +272,7 @@ function helpers.analyze(entry,specification) return entry, sectiondata, "okay" end -function helpers.prefix(data,prefixspec,nosuffix) +function helpers.prefix(data,prefixspec,nosuffix) -- not only page if data then local _, prefixdata, status = helpers.analyze(data,prefixspec) if prefixdata then @@ -322,10 +322,6 @@ function pages.on_right(n) end end -function pages.has_changed() - return texconditionals.layouthaschanged -end - function pages.in_body(n) return texgetcount("pagebodymode") > 0 end diff --git a/Master/texmf-dist/tex/context/base/mkiv/strc-ref.lua b/Master/texmf-dist/tex/context/base/mkiv/strc-ref.lua index bca36ccef43..8d081c923d3 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/strc-ref.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/strc-ref.lua @@ -435,9 +435,21 @@ end references.synchronizepage = synchronizepage local function enhancereference(specification) - local l = tobesaved[specification.prefix][specification.tag] - if l then - synchronizepage(l.references) + local prefix = specification.prefix + if prefix then + local entry = tobesaved[prefix] + if entry then + entry = entry[specification.tag] + if entry then + synchronizepage(entry.references) + else + -- normally a bug + end + else + -- normally a bug + end + else + -- normally a bug end end @@ -1027,6 +1039,7 @@ local function loadexternalreferences(name,utilitydata) local external = struc.references.collected -- direct references local lists = struc.lists.collected -- indirect references (derived) local pages = struc.pages.collected -- pagenumber data + local sections = struc.sections.collected -- a bit weird one, as we don't have the externals in the collected for prefix, set in next, external do if prefix == "" then @@ -1062,6 +1075,15 @@ local function loadexternalreferences(name,utilitydata) if prefix == "" then prefix = name -- this can clash! end + local section = references.section + if section then + -- we have to make sure that the right section is used, see helpers.prefix + if sections then + references.sectiondata = sections[section] + else + -- warning + end + end local target = external[prefix] if not target then target = { } @@ -2084,7 +2106,7 @@ function references.setandgetattribute(data) -- maybe do internal automatically if ndat then local numbers = ndat.numbers if type(numbers) == "string" then - ndat.numbers = counters.compact(numbers,nil,true) + counters.compact(ndat,numbers) end data.numberdata = helpers.simplify(ndat) end @@ -2650,7 +2672,6 @@ end implement { name = "referenceposx", actions = function() context("%p",referencepos("x")) end } implement { name = "referenceposy", actions = function() context("%p",referencepos("y")) end } - implement { name = "referencecolumn", actions = function() diff --git a/Master/texmf-dist/tex/context/base/mkiv/strc-ref.mkvi b/Master/texmf-dist/tex/context/base/mkiv/strc-ref.mkvi index 3bf33963851..5032c20c473 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/strc-ref.mkvi +++ b/Master/texmf-dist/tex/context/base/mkiv/strc-ref.mkvi @@ -1125,7 +1125,7 @@ \def\strc_references_handle_page_state_yes {\markreferencepage - \ifcase\referencepagedetail + \ifcase\referencepagedetail\relax \expandafter\sixthofsixarguments \or \expandafter\thirdofsixarguments \or \expandafter\firstofsixarguments \or diff --git a/Master/texmf-dist/tex/context/base/mkiv/strc-ren.mkiv b/Master/texmf-dist/tex/context/base/mkiv/strc-ren.mkiv index 359bd6aecc0..8926dfe8d70 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/strc-ren.mkiv +++ b/Master/texmf-dist/tex/context/base/mkiv/strc-ren.mkiv @@ -381,6 +381,7 @@ \noindentation \else \ignoreparskip + \doindentation \fi\fi} % nice testcase diff --git a/Master/texmf-dist/tex/context/base/mkiv/strc-syn.lua b/Master/texmf-dist/tex/context/base/mkiv/strc-syn.lua index c0ebb556cc7..8933baea155 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/strc-syn.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/strc-syn.lua @@ -29,6 +29,12 @@ local splitter = sorters.splitters.utf synonyms.collected = collected synonyms.tobesaved = tobesaved +local progressions = { } -- false=not_yet_shown true=shown + +local variables = interfaces.variables +local v_all = variables.all +local v_current = variables.current + local function initializer() collected = synonyms.collected tobesaved = synonyms.tobesaved @@ -86,12 +92,6 @@ function synonyms.register(class,kind,spec) local tag = definition.tag or "" data.metadata.kind = kind -- runtime, not saved in format (yet) if not hash[tag] then - if definition.used == nil then - definition.used = false - end - if definition.shown == nil then - definition.shown = false - end local entries = data.entries entries[#entries+1] = spec hash[tag] = spec @@ -121,24 +121,58 @@ end function synonyms.isused(class,tag) local data = tobesaved[class] local okay = data.hash[tag] - return okay and okay.definition.used + return okay and okay.definition.used or false end function synonyms.isshown(class,tag) local data = tobesaved[class] local okay = data.hash[tag] - return okay and okay.definition.shown + return okay and okay.definition.shown or false +end + +local function resetused(class) + for tag, data in next, tobesaved[class].hash do + data.definition.used = nil + end +end + +local function resetshown(class) + for tag, data in next, tobesaved[class].hash do + data.definition.shown = nil + end end -function synonyms.resetused(class) +local function resetlist(class) for tag, data in next, tobesaved[class].hash do - data.definition.used = false + data.definition.list = nil end end -function synonyms.resetshown(class) +local function resetall(class) for tag, data in next, tobesaved[class].hash do - data.definition.shown = false + local definition = data.definition + definition.used = nil + definition.shown = nil + definition.list = nil + end +end + +synonyms.resetused = resetused +synonyms.resetshown = resetshown +synonyms.resetlist = resetlist +synonyms.resetall = resetall + +function synonyms.reset(class,what) + if what == "progress" then + progressions = { } + elseif what == "used" then + resetused(class) + elseif what == "shown" then + resetshown(class) + elseif what == "list" then + resetlist(class) + else + resetall(class) end end @@ -151,6 +185,9 @@ function synonyms.synonym(class,tag) definition.list = true context(definition.synonym) end + if progressions[tag] == nil then + progressions[tag] = false -- not yet shown + end end function synonyms.meaning(class,tag) @@ -167,10 +204,10 @@ end synonyms.compare = sorters.comparers.basic -- (a,b) function synonyms.filter(data,options) - local result = { } - local entries = data.entries - local all = options and options.criterium == interfaces.variables.all - if all then + local result = { } + local entries = data.entries + local criterium = options and options.criterium + if criterium == v_all then for i=1,#entries do result[i] = entries[i] end @@ -179,9 +216,17 @@ function synonyms.filter(data,options) local entry = entries[i] local definition = entry.definition if definition.list then - result[#result+1] = entry + local tag = definition.tag + local done = progressions[tag] + if done == false then + result[#result+1] = entry + progressions[tag] = true + end end end + if criterium == v_current then + progressions = { } + end end data.result = result end @@ -193,9 +238,12 @@ function synonyms.prepare(data) local entry = result[i] local definition = entry.definition if definition then - local tag = definition.tag - local key = tag ~= "" and tag or definition.synonym - entry.split = splitter(strip(key)) + local srt = definition.sortkey or "" + local tag = definition.tag or "" + local key = (srt ~= "" and srt) or (tag ~= "" and tag) or definition.synonym + if key then + entry.split = splitter(strip(key)) + end end end end @@ -277,8 +325,10 @@ implement { name = "registerusedsynonym", actions = synonyms.registerused, arg implement { name = "registershownsynonym", actions = synonyms.registershown, arguments = "2 strings" } implement { name = "synonymmeaning", actions = synonyms.meaning, arguments = "2 strings" } implement { name = "synonymname", actions = synonyms.synonym, arguments = "2 strings" } -implement { name = "resetusedsynonyms", actions = synonyms.resetused, arguments = "string" } -implement { name = "resetshownsynonyms", actions = synonyms.resetshown, arguments = "string" } +-- { name = "resetusedsynonyms", actions = resetused, arguments = "string" } +-- { name = "resetshownsynonyms", actions = resetshown, arguments = "string" } +-- { name = "resetlistsynonyms", actions = resetlist, arguments = "string" } +implement { name = "resetsynonyms", actions = synonyms.reset, arguments = "2 strings" } implement { name = "doifelsesynonymused", @@ -310,6 +360,7 @@ implement { { "tag" }, { "synonym" }, { "meaning" }, + { "sortkey" }, { "used", "boolean" } } } diff --git a/Master/texmf-dist/tex/context/base/mkiv/strc-syn.mkiv b/Master/texmf-dist/tex/context/base/mkiv/strc-syn.mkiv index cdede1d0da0..e93141bde11 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/strc-syn.mkiv +++ b/Master/texmf-dist/tex/context/base/mkiv/strc-syn.mkiv @@ -101,6 +101,31 @@ %D %D The lists are constructions (like descriptions are) and can be set up %D likewise. +%D +%D You can show the currently accessed entries as follows: +%D +%D \starttyping +%D \startchapter[title=One] +%D test \FIRST\ test test \THIRD\ test \blank +%D \placelistofsynonyms[myabbreviation] +%D \resetsynonymsprogress[myabbreviation] % reset state +%D \stopchapter +%D +%D \startchapter[title=Two] +%D test \FIRST\ test test \SECOND\ test \blank +%D \placelistofsynonyms[myabbreviation][criterium=current] +%D \resetsynonymsprogress[myabbreviation] % reset state +%D \stopchapter +%D +%D \startchapter[title=Three] +%D test test test test test test \blank +%D \placelistofsynonyms[myabbreviation][criterium=current] % also reset state +%D \stopchapter +%D +%D \startchapter[title=All] +%D \placelistofsynonyms[myabbreviation][criterium=all] +%D \stopchapter +%D \stoptyping % todo: add 'define only' option to descriptions, then add sorting (also based on key) % and call to definition -> replaces this module @@ -319,8 +344,11 @@ \unexpanded\def\currentsynonymmeaning {\clf_synonymmeaning {\currentsimplelist}{\currentsynonymtag}} \unexpanded\def\doifelsecurrentsynonymused {\clf_doifelsesynonymused {\currentsimplelist}{\currentsynonymtag}} \unexpanded\def\doifelsecurrentsynonymshown{\clf_doifelsesynonymshown{\currentsimplelist}{\currentsynonymtag}} -\unexpanded\def\resetusedsynonyms [#1]{\clf_resetusedsynonyms {#1}} -\unexpanded\def\resetshownsynonyms [#1]{\clf_resetshownsynonyms {#1}} +\unexpanded\def\resetusedsynonyms [#1]{\clf_resetsynonyms{#1}{used}} +\unexpanded\def\resetshownsynonyms [#1]{\clf_resetsynonyms{#1}{shown}} +\unexpanded\def\resetlistsynonyms [#1]{\clf_resetsynonyms{#1}{list}} +\unexpanded\def\resetsynonyms [#1]{\clf_resetsynonyms{#1}{all}} +\unexpanded\def\resetsynonymsprogress [#1]{\clf_resetsynonyms{#1}{progress}} \let\rawsynonymname \clf_synonymname \let\rawsynonymmeaning\clf_synonymmeaning diff --git a/Master/texmf-dist/tex/context/base/mkiv/strc-usr.mkiv b/Master/texmf-dist/tex/context/base/mkiv/strc-usr.mkiv index 97b656fa087..cbf91061633 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/strc-usr.mkiv +++ b/Master/texmf-dist/tex/context/base/mkiv/strc-usr.mkiv @@ -91,21 +91,16 @@ \installcommandhandler \????userdata {userdata} \????userdata \installcommandhandler \????userdataalternative {userdataalternative} \????userdataalternative +\appendtoks + \setuevalue{\e!start\currentuserdata}{\dodoubleempty\userdata_start_instance[\currentuserdata]}% + \setuevalue{\e!stop \currentuserdata}{\userdata_stop_instance}% +\to \everydefineuserdata + \unexpanded\def\startuserdata {\begingroup \let\currentuserdata\empty \doifelsenextoptionalcs\userdata_start_delayed\userdata_start_indeed} -% This variant works only when the userdata instance exists while the assignment check -% can also be used with undefined instances which falls back to the global settings. -% -% \def\userdata_start_delayed[#1]% -% {\ifcsname\nameduserdatahash{\detokenize\expandafter{\normalexpanded{#1}}}\s!parent\endcsname -% \expandafter\userdata_start_delayed_name -% \else -% \expandafter\userdata_start_delayed_parameters -% \fi[#1]} - \def\userdata_start_delayed[#1]% {\doifelseassignmentcs{#1}% \userdata_start_delayed_parameters @@ -121,26 +116,27 @@ \checkuserdataparent \doifelsenextoptionalcs\userdata_start_delayed_parameters\userdata_start_indeed} +\unexpanded\def\userdata_start_instance[#1][#2]% + {\begingroup + \edef\currentuserdata{#1}% + \setupcurrentuserdata[#2]% + \grabbufferdatadirect + {\s!userdata:\currentuserdata}% + {\e!start\currentuserdata}% + {\e!stop \currentuserdata}} + \def\userdata_start_indeed - {\grabbufferdatadirect\s!userdata{\csstring\startuserdata}{\csstring\stopuserdata}} - -% \unexpanded\def\stopuserdata -% {\useuserdatastyleandcolor\c!style\c!color -% \usealignparameter\userdataparameter -% \edef\currentuserdataalternative{\userdataparameter\c!alternative}% -% \ifcsname\currentuserdataalternativehash\s!parent\endcsname \else -% \let\currentuserdataalternative\s!default -% \fi -% \edef\p_renderingsetup{\userdataalternativeparameter\c!renderingsetup}% -% \directsetup\p_renderingsetup -% \endgroup} + {\grabbufferdatadirect + {\s!userdata:\currentuserdata}% + {\csstring\startuserdata}% + {\csstring\stopuserdata}} \unexpanded\def\stopuserdata - {\userdataparameter\c!before % HH: moved, so we obey the outer spacing - \dostarttagged\t!userdata\currentuserdata % HH: added, maybe move up ? + {\userdataparameter\c!before + \dostarttagged\t!userdata\currentuserdata \begingroup \useuserdatastyleandcolor\c!style\c!color - \usealignparameter\userdataparameter % HH: added + \usealignparameter\userdataparameter \edef\currentuserdataalternative{\userdataparameter\c!alternative}% \ifcsname\currentuserdataalternativehash\s!parent\endcsname \else \let\currentuserdataalternative\s!default @@ -150,14 +146,13 @@ \directsetup\p_renderingsetup \endgroup \dostoptagged - \userdataparameter\c!after % HH: moved + \userdataparameter\c!after \endgroup} -\unexpanded\def\getuserdata - {\getbufferdata[\s!userdata]} +\let\userdata_stop_instance\stopuserdata -\unexpanded\def\getinlineuserdata - {\inlinebuffer[\s!userdata]} +\unexpanded\def\getuserdata {\getbufferdata[\s!userdata]} +\unexpanded\def\getinlineuserdata{\inlinebuffer[\s!userdata]} \defineuserdataalternative [\s!default] diff --git a/Master/texmf-dist/tex/context/base/mkiv/supp-box.lua b/Master/texmf-dist/tex/context/base/mkiv/supp-box.lua index 4914b6818f1..2e7ca59244a 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/supp-box.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/supp-box.lua @@ -7,8 +7,6 @@ if not modules then modules = { } end modules ['supp-box'] = { license = "see context related readme files" } --- this is preliminary code, use insert_before etc - local report_hyphenation = logs.reporter("languages","hyphenation") local tonumber, next, type = tonumber, next, type @@ -69,15 +67,15 @@ local setshift = nuts.setshift local setsplit = nuts.setsplit local setattrlist = nuts.setattrlist -local flush_node = nuts.flush_node -local flush_list = nuts.flush_list +local flushnode = nuts.flushnode +local flushlist = nuts.flushlist local copy_node = nuts.copy -local copy_list = nuts.copy_list +local copylist = nuts.copylist local find_tail = nuts.tail local getdimensions = nuts.dimensions local hpack = nuts.hpack local vpack = nuts.vpack -local traverse_id = nuts.traverse_id +local traverseid = nuts.traverseid local traverse = nuts.traverse local free = nuts.free local findtail = nuts.tail @@ -118,7 +116,7 @@ local function hyphenatedlist(head,usecolor) setlistcolor(post,"darkyellow") end if replace then - flush_list(replace) + flushlist(replace) end setdisc(current) if pre then @@ -152,9 +150,9 @@ implement { -- for n in nextdisc, tonut(head) do -- local hyphen = getfield(n,"pre") -- if hyphen then --- flush_list(hyphen) +-- flushlist(hyphen) -- end --- setfield(n,"pre",copy_list(pre)) +-- setfield(n,"pre",copylist(pre)) -- end -- end -- @@ -173,7 +171,7 @@ implement { arguments = "integer", actions = function(n) -- we just hyphenate (as we pass a hpack) .. a bit too much casting but ... - local l = languages.hyphenators.handler(tonode(checkedlist(n))) + local l = languages.hyphenators.handler(checkedlist(n)) report_hyphenation("show: %s",listtoutf(l,false,true)) end } @@ -200,7 +198,7 @@ local function applytowords(current,doaction,noaction,nested) local id = getid(current) if id == glue_code then if start then - doaction(tonode(copy_list(start,current))) + doaction(tonode(copylist(start,current))) start = nil end noaction(tonode(copy_node(current))) @@ -214,7 +212,7 @@ local function applytowords(current,doaction,noaction,nested) current = getnext(current) end if start then - doaction(tonode(copy_list(start))) + doaction(tonode(copylist(start))) end end @@ -348,7 +346,7 @@ implement { else tail = prev end - flush_node(temp) + flushnode(temp) end -- done setnext(tail) @@ -430,7 +428,7 @@ local function setboxtonaturalwd(n) local old = takebox(n) local new = hpack(getlist(old)) setlist(old,nil) - flush_node(old) + flushnode(old) setbox(n,new) end @@ -482,20 +480,20 @@ end do - local nuts = nodes.nuts - local tonode = nuts.tonode - local takebox = nuts.takebox - local flush_list = nuts.flush_list - local copy_list = nuts.copy_list - local getwhd = nuts.getwhd - local setbox = nuts.setbox - local new_hlist = nuts.pool.hlist - - local boxes = { } - nodes.boxes = boxes - local cache = table.setmetatableindex("table") - local report = logs.reporter("boxes","cache") - local trace = false + local nuts = nodes.nuts + local tonode = nuts.tonode + local takebox = nuts.takebox + local flushlist = nuts.flushlist + local copylist = nuts.copylist + local getwhd = nuts.getwhd + local setbox = nuts.setbox + local new_hlist = nuts.pool.hlist + + local boxes = { } + nodes.boxes = boxes + local cache = table.setmetatableindex("table") + local report = logs.reporter("boxes","cache") + local trace = false trackers.register("nodes.boxes",function(v) trace = v end) @@ -528,7 +526,7 @@ do if not b then -- do nothing, maybe trace elseif copy then - b = copy_list(b) + b = copylist(b) else c[name] = false end @@ -545,13 +543,13 @@ do local c = cache[category] local b = takebox(box) if b then - flush_list(b) + flushlist(b) end local b = c[name] if not b then -- do nothing, maybe trace elseif copy then - b = copy_list(b) + b = copylist(b) else c[name] = false end @@ -577,7 +575,7 @@ do if name and name ~= "" then local b = c[name] if b then - flush_list(b) + flushlist(b) c[name] = false end if trace then @@ -586,7 +584,7 @@ do else for k, b in next, c do if b then - flush_list(b) + flushlist(b) end end cache[category] = { } @@ -697,7 +695,7 @@ local function stripglue(list) if first and first ~= list then -- we have discardables setsplit(getprev(first),first) - flush_list(list) + flushlist(list) list = first done = true end @@ -714,7 +712,7 @@ local function stripglue(list) end if last ~= tail then -- we have discardables - flush_list(getnext(last)) + flushlist(getnext(last)) setnext(last) done = true end @@ -767,7 +765,7 @@ local function limitate(t) -- don't pack the result ! else maxleft = maxleft - swidth end - for n in traverse_id(glue_code,list) do + for n in traverseid(glue_code,list) do local width = getdimensions(list,n) if width > maxleft then if not last then @@ -779,7 +777,7 @@ local function limitate(t) -- don't pack the result ! end end if last and maxright > 0 then - for n in traverse_id(glue_code,last) do + for n in traverseid(glue_code,last) do local width = getdimensions(n) if width < maxright then first = n @@ -808,7 +806,7 @@ local function limitate(t) -- don't pack the result ! end setlink(last,sentinel) setprev(rest) - flush_list(rest) + flushlist(rest) end end end diff --git a/Master/texmf-dist/tex/context/base/mkiv/symb-imp-was.mkiv b/Master/texmf-dist/tex/context/base/mkiv/symb-imp-was.mkiv new file mode 100644 index 00000000000..424e60b653f --- /dev/null +++ b/Master/texmf-dist/tex/context/base/mkiv/symb-imp-was.mkiv @@ -0,0 +1,206 @@ +%D \module +%D [ file=symb-was, +%D version=2005.10.15, +%D title=\CONTEXT\ Symbol Libraries, +%D subtitle=Roland Waldi's Symbols (wasy-2), +%D author=Henning Hraban Ramm, +%D date=\currentdate, +%D copyright={Public Domain}] +%C +%C This module is in the public domain. + +%D Converted to \MKIV\ by Hans but not yet complete. + +\unprotect + +\definefontsynonym [WaldiSymbol] [wasy10] +\definefontsynonym [WaldiSymbolBold] [wasyb10] + +% \def\wasy@over#1#2{{\setbox0\hbox{$#2$}\hbox to \wd0{\hss$#1$\hss}\kern-\wd0\box0}} + +\def\WaldiSymbol {\getnamedglyphdirect{WaldiSymbol}} % #1 +\def\WaldiSymbol#1{\getglyph{WaldiSymbol}{\fontchar{#1}}} + +% general symbols + +\startsymbolset [wasy general] + \definesymbol [male] [\WaldiSymbol{male}] + \definesymbol [female] [\WaldiSymbol{female}] + \definesymbol [currency] [\WaldiSymbol{currency}] + \definesymbol [cent] [\WaldiSymbol{cent}] + \definesymbol [lozenge] [\WaldiSymbol{lozenge}] + \definesymbol [kreuz] [\WaldiSymbol{kreuz}] + \definesymbol [smiley] [\WaldiSymbol{smiley}] + \definesymbol [blacksmiley] [\WaldiSymbol{blacksmil}] + \definesymbol [frownie] [\WaldiSymbol{frownie}] + \definesymbol [sun] [\WaldiSymbol{sun}] + \definesymbol [checked] [\WaldiSymbol{checked}] + \definesymbol [brokenvert] [\WaldiSymbol{brokenver}] + \definesymbol [diameter] [\WaldiSymbol{diameter}] + \definesymbol [invdiameter] [\WaldiSymbol{invdiamet}] + \definesymbol [phone] [\WaldiSymbol{phone}] + \definesymbol [recorder] [\WaldiSymbol{recorder}] + \definesymbol [clock] [\WaldiSymbol{clock}] + \definesymbol [permil] [\WaldiSymbol{permil}] + \definesymbol [bell] [\WaldiSymbol{bell}] + \definesymbol [ataribox] [\WaldiSymbol{ataribox}] + \definesymbol [pointer] [\WaldiSymbol{pointer}] + \definesymbol [lightning] [\WaldiSymbol{lightning}] + \definesymbol [agemO] [\WaldiSymbol{agemO}] +\stopsymbolset + +\startsymbolset [wasy music] + \definesymbol [eighthnote] [\WaldiSymbol{eighthnote}] + \definesymbol [quarternote] [\WaldiSymbol{quarternote}] + \definesymbol [halfnote] [\WaldiSymbol{halfnote}] + \definesymbol [fullnote] [\WaldiSymbol{fullnote}] + \definesymbol [twonotes] [\WaldiSymbol{twonotes}] +\stopsymbolset + +\startsymbolset [wasy astronomy] + \definesymbol [ascnode] [\WaldiSymbol{ascnode}] + \definesymbol [descnode] [\WaldiSymbol{descnode}] + \definesymbol [astrosun] [\WaldiSymbol{astrosun}] + \definesymbol [sun] [\WaldiSymbol{sun}] + \definesymbol [newmoon] [\WaldiSymbol{newmoon}] + \definesymbol [fullmoon] [\WaldiSymbol{fullmoon}] + \definesymbol [rightmoon] [\WaldiSymbol{rightmoon}] + \definesymbol [leftmoon] [\WaldiSymbol{leftmoon}] + \definesymbol [vernal] [\WaldiSymbol{vernal}] + \definesymbol [mercury] [\WaldiSymbol{mercury}] + \definesymbol [mars] [\WaldiSymbol{mars}] + \definesymbol [saturn] [\WaldiSymbol{saturn}] + \definesymbol [neptune] [\WaldiSymbol{neptune}] + \definesymbol [earth] [\WaldiSymbol{earth}] + \definesymbol [venus] [\WaldiSymbol{venus}] + \definesymbol [jupiter] [\WaldiSymbol{jupiter}] + \definesymbol [uranus] [\WaldiSymbol{uranus}] + \definesymbol [pluto] [\WaldiSymbol{pluto}] +\stopsymbolset + +\startsymbolset [wasy astrology] + \definesymbol [conjunction] [\WaldiSymbol{conjunction}] + \definesymbol [opposition] [\WaldiSymbol{opposition}] + \definesymbol [aries] [\WaldiSymbol{aries}] + \definesymbol [libra] [\WaldiSymbol{libra}] + \definesymbol [taurus] [\WaldiSymbol{taurus}] + \definesymbol [scorpio] [\WaldiSymbol{scorpio}] + \definesymbol [gemini] [\WaldiSymbol{gemini}] + \definesymbol [sagittarius] [\WaldiSymbol{sagittarius}] + \definesymbol [cancer] [\WaldiSymbol{cancer}] + \definesymbol [capricornus] [\WaldiSymbol{capricornus}] + \definesymbol [leo] [\WaldiSymbol{leo}] + \definesymbol [aquarius] [\WaldiSymbol{aquarius}] + \definesymbol [virgo] [\WaldiSymbol{virgo}] + \definesymbol [pisces] [\WaldiSymbol{pisces}] +\stopsymbolset + +\startsymbolset [wasy geometry] + \definesymbol [fivestar] [\WaldiSymbol{fivestar}] % HHR additional + \definesymbol [hexstar] [\WaldiSymbol{hexstar}] + \definesymbol [varhexstar] [\WaldiSymbol{varhexstar}] + \definesymbol [davidsstar] [\WaldiSymbol{davidsstar}] + \definesymbol [Circle] [\WaldiSymbol{Circle}] + \definesymbol [CIRCLE] [\WaldiSymbol{CIRCLE}] + \definesymbol [Leftcircle] [\WaldiSymbol{Leftcircle}] + \definesymbol [LEFTCIRCLE] [\WaldiSymbol{LEFTCIRCLE}] + \definesymbol [Rightcircle] [\WaldiSymbol{Rightcircle}] + \definesymbol [RIGHTCIRCLE] [\WaldiSymbol{RIGHTCIRCLE}] +% \definesymbol [LEFTcircle] [\dontleavehmode\hbox to \zeropoint{\WaldiSymbol {LEFTCIRCLE}\hss}\WaldiSymbol{Circle}] +% \definesymbol [RIGHTcircle] [\dontleavehmode\hbox to \zeropoint{\WaldiSymbol{RIGHTCIRCLE}\hss}\WaldiSymbol{Circle}] + \definesymbol [LEFTarrow] [\WaldiSymbol{LEFTarrow}] + \definesymbol [RIGHTarrow] [\WaldiSymbol{RIGHTarrow}] + \definesymbol [UParrow] [\WaldiSymbol{UParrow}] + \definesymbol [DOWNarrow] [\WaldiSymbol{DOWNarrow}] + \definesymbol [Box] [\WaldiSymbol{Box}] + \definesymbol [APLbox] [\WaldiSymbol{APLbox}] + \definesymbol [XBox] [\WaldiSymbol{XBox}] + \definesymbol [Bowtie] [\WaldiSymbol{Bowtie}] + \definesymbol [Diamond] [\WaldiSymbol{Diamond}] + \definesymbol [octagon] [\WaldiSymbol{octagon}] + \definesymbol [hexagon] [\WaldiSymbol{hexagon}] + \definesymbol [varhexagon] [\WaldiSymbol{varhexagon}] + \definesymbol [pentagon] [\WaldiSymbol{pentagon}] +% \definesymbol [pentastar] [\dontleavehmode\hbox to \zeropoint{\WaldiSymbol{pentagon}\hss}\lower.04em\hbox{\WaldiSymbol{fivestar}}] +\stopsymbolset + +% \startsymbolset [wasy physics] +% \definesymbol [varangle] [\WaldiSymbol{30}] +% \definesymbol [invneg] [\WaldiSymbol{24}] +% \definesymbol [leftturn] [\WaldiSymbol{34}] +% \definesymbol [rightturn] [\WaldiSymbol{33}] +% \definesymbol [diameter] [\WaldiSymbol{31}] +% \definesymbol [invdiameter] [\WaldiSymbol{21}] % additional +% \definesymbol [therefore] [\WaldiSymbol {5}] +% \definesymbol [AC] [\mbox{\kern.05em\WaldiSymbol{58}\kern.05em}] +% \definesymbol [HF] [\dontleavehmode +% \lower.09em\hbox to \zeropoint{\kern.05em\WaldiSymbol{58}\hss}% +% \raise.09em\hbox{\kern.05em\WaldiSymbol{58}\kern.05em}] +% \definesymbol [VHF] [\WaldiSymbol{64}] +% \definesymbol [photon] [\hbox{\WaldiSymbol{58}\WaldiSymbol{58}\WaldiSymbol{58}\WaldiSymbol{58}}] +% \definesymbol [gluon] [\hbox{\WaldiSymbol{80}\WaldiSymbol{80}\WaldiSymbol{80}\WaldiSymbol{80}\WaldiSymbol{80}\WaldiSymbol{80}}] +% \stopsymbolset + +% \startsymbolset [wasy apl] +% \definesymbol [APLup] [\WaldiSymbol{0}] +% \definesymbol [APLdown] [\WaldiSymbol{70}] +% \definesymbol [APLbox] [\WaldiSymbol{126}] +% \definesymbol [APLinv] [\dontleavehmode\hbox to \zeropoint{$\div$\hss}\WaldiSymbol{126}] +% \definesymbol [APLleftarrowbox] [\WaldiSymbol{112}] +% \definesymbol [APLrightarrowbox][\WaldiSymbol{113}] +% \definesymbol [APLuparrowbox] [\WaldiSymbol{110}] +% \definesymbol [APLdownarrowbox] [\WaldiSymbol{111}] +% \definesymbol [APLinput] [\WaldiSymbol{125}] +% \definesymbol [APLminus] [\dontleavehmode\raise.7ex\hbox{$-$}] +% \definesymbol [APLlog] [\WaldiSymbol{22}] +% \definesymbol [APLstar] [\WaldiSymbol{69}] +% \definesymbol [APLcomment] [\WaldiSymbol{127}] +% % \definesymbol [notslash] [\wasy@over{/}{-}] +% % \definesymbol [notbackslash] [\wasy@over{\backslash}{-}] +% % % +% % %definesymbol [APLvert] [\WaldiSymbol{}] +% % %definesymbol [APLnot] [\WaldiSymbol{}] +% % %definesymbol [APLcirc] [\WaldiSymbol{}] +% % % +% % % HH: messy, best define all combinations (todo) +% % % +% % \def\APLnot #1{\wasy@over{\sim }{#1}} +% % \def\APLcirc#1{\wasy@over{\circ}{#1}} +% % \def\APLvert#1{\wasy@over{\vert}{#1}} +% % % +% \stopsymbolset + +\protect + +\continueifinputfile{symb-imp-was.mkiv} + +\usemodule[article-basic] + +\starttext + +\starttitle[title=Regular] + + \startsubject[title={wasy general}] \showsymbolset[wasy general] \stopsubject + \startsubject[title={wasy music}] \showsymbolset[wasy music] \stopsubject + \startsubject[title={wasy astronomy}] \showsymbolset[wasy astronomy] \stopsubject + \startsubject[title={wasy astrology}] \showsymbolset[wasy astrology] \stopsubject + \startsubject[title={wasy geometry}] \showsymbolset[wasy geometry] \stopsubject + +\stoptitle + +\starttitle[title=Bold] + + \startsubject[title={wasy general}] \start \bf \showsymbolset[wasy general] \stop \stopsubject + \startsubject[title={wasy music}] \start \bf \showsymbolset[wasy music] \stop \stopsubject + \startsubject[title={wasy astronomy}] \start \bf \showsymbolset[wasy astronomy] \stop \stopsubject + \startsubject[title={wasy astrology}] \start \bf \showsymbolset[wasy astrology] \stop \stopsubject + \startsubject[title={wasy geometry}] \start \bf \showsymbolset[wasy geometry] \stop \stopsubject + +\stoptitle + + +% \startsubject[title={wasy physics}] \showsymbolset[wasy physics] \stopsubject +% \startsubject[title={wasy apl}] \showsymbolset[wasy apl] \stopsubject + +\stoptext + diff --git a/Master/texmf-dist/tex/context/base/mkiv/syst-aux.mkiv b/Master/texmf-dist/tex/context/base/mkiv/syst-aux.mkiv index 194f1de2cb1..44668dcc98d 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/syst-aux.mkiv +++ b/Master/texmf-dist/tex/context/base/mkiv/syst-aux.mkiv @@ -1470,10 +1470,20 @@ % replaces prev +% \protected\def\syst_helpers_do_if_in_string_else#1#2% ##2 can be {abc} +% {\expandafter\def\expandafter\syst_helpers_do_do_if_in_string_else +% \expandafter##\expandafter1#1##2##3^^^^0004{\unless\if##2@}% expand #1 here +% \expandafter\syst_helpers_do_do_if_in_string_else\normalexpanded{#2#1}@@^^^^0004} % expand #2 here + \protected\def\syst_helpers_do_if_in_string_else#1#2% ##2 can be {abc} {\expandafter\def\expandafter\syst_helpers_do_do_if_in_string_else - \expandafter##\expandafter1#1##2##3^^^^0004{\unless\if##2@}% expand #1 here - \expandafter\syst_helpers_do_do_if_in_string_else\normalexpanded{#2#1}@@^^^^0004} % expand #2 here + \expandafter##\expandafter1#1##2##3^^^^0004{\unless\ifx##2^^^^0003}% expand #1 here + \expandafter\syst_helpers_do_do_if_in_string_else\normalexpanded{#2#1}^^^^0003^^^^0003^^^^0004} % expand #2 here + +% \protected\def\syst_helpers_do_if_in_string_else#1#2% ##2 can be {abc} +% {\normalexpanded{\def\noexpand\syst_helpers_do_do_if_in_string_else +% ##1#1##2##3}^^^^0004{\unless\ifx##2^^^^0003}% expand #1 here +% \normalexpanded{\noexpand\syst_helpers_do_do_if_in_string_else#2#1}^^^^0003^^^^0003^^^^0004} % expand #2 here %D The next alternative proved to be upto twice as fast on tasks like checking %D reserved words in pretty verbatim typesetting! This is mainly due to the fact @@ -1486,10 +1496,15 @@ %D Where \type {\doifinstringelse} does as much expansion as possible, the latter %D alternative does minimal (one level) expansion. +% \protected\def\syst_helpers_do_if_in_csname_else#1#2% +% {\def\syst_helpers_do_do_if_in_csname_else##1#1##2##3^^^^0004% +% {\unless\if##2@}% +% \expandafter\syst_helpers_do_do_if_in_csname_else#2#1@@^^^^0004} + \protected\def\syst_helpers_do_if_in_csname_else#1#2% {\def\syst_helpers_do_do_if_in_csname_else##1#1##2##3^^^^0004% - {\unless\if##2@}% - \expandafter\syst_helpers_do_do_if_in_csname_else#2#1@@^^^^0004} + {\unless\ifx##2^^^^0003}% + \expandafter\syst_helpers_do_do_if_in_csname_else#2#1^^^^0003^^^^0003^^^^0004} \protected\def\doifelseincsname#1#2% {\normalexpanded{\syst_helpers_do_if_in_csname_else{#1}}{#2}% diff --git a/Master/texmf-dist/tex/context/base/mkiv/syst-con.lua b/Master/texmf-dist/tex/context/base/mkiv/syst-con.lua index 6e998bdfd5e..6a11fa8d3c6 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/syst-con.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/syst-con.lua @@ -35,7 +35,7 @@ local f_uchexnumber = formatters["%X"] local f_lchexnumbers = formatters["%02x"] local f_uchexnumbers = formatters["%02X"] local f_octnumber = formatters["%03o"] -local nicenumber = formatters["%0.6F"] +local nicenumber = formatters["%0.6F"] -- or N local lchexnumber = function(n) if n < 0 then n = 0x100000000 + n end return f_lchexnumber (n) end local uchexnumber = function(n) if n < 0 then n = 0x100000000 + n end return f_uchexnumber (n) end @@ -74,7 +74,7 @@ implement { name = "tand", actions = { math.tand, nicenumber, context }, argumen function commands.format(fmt,...) context((gsub(fmt,"@","%%")),...) end implement { - name = "formatone", + name = "formatone", -- used as such so no name change here public = true, protected = true, arguments = "2 strings", diff --git a/Master/texmf-dist/tex/context/base/mkiv/syst-ini.mkiv b/Master/texmf-dist/tex/context/base/mkiv/syst-ini.mkiv index aafbc787e5e..ae1978eb6d7 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/syst-ini.mkiv +++ b/Master/texmf-dist/tex/context/base/mkiv/syst-ini.mkiv @@ -589,7 +589,7 @@ \protected\def\defUmathbotaccent #1#2#3#4{\global\instance\protected\def#1{\Umathbotaccent "#2 "#3 "#4 }} \protected\def\defUdelimiterover #1#2#3#4{\global\instance\protected\def#1{\Udelimiterover "#2 "#3 }} \protected\def\defUdelimiterunder #1#2#3#4{\global\instance\protected\def#1{\Udelimiterunder "#2 "#3 }} -\protected\def\defUdelimiter #1#2#3#4{\global\instance\protected\def#1{\Udelimiter "#2 "#2 "#4 }} +\protected\def\defUdelimiter #1#2#3#4{\global\instance\protected\def#1{\Udelimiter "#2 "#3 "#4 }} \protected\def\defUradical #1#2#3{\global\instance\protected\def#1{\Uradical "#2 "#3 }} \protected\def\defUroot #1#2#3{\global\instance\protected\def#1{\Uroot "#2 "#3 }} \protected\def\defUmathchar #1#2#3#4{\global\instance\Umathchardef #1 "#2 "#3 "#4 } @@ -1240,4 +1240,25 @@ \let\nexttoken\relax +%D We need to disable this feature (comes from pdftex) because it not only messes up +%D the nested content and wrappers (like in the page builder) but also is rather +%D confusing wrt grouping. In \CONTEXT\ we don't redefine \type {\par} anyway, so +%D best not expose this feature. + +\ifdefined\partokenname + \let\partokencontext\relax + \newcount\partokencontext + \let\partokenname\gobbleoneargument +\fi + +%D In case we load \LMTX\ code. + +\ifdefined\autoparagraphmode \else + \newcount\autoparagraphmode +\fi + +\let\advanceby \advance +\let\multiplyby\multiply +\let\divideby \divide + \protect \endinput diff --git a/Master/texmf-dist/tex/context/base/mkiv/syst-lua.lua b/Master/texmf-dist/tex/context/base/mkiv/syst-lua.lua index 085f75eca92..fa980aa7682 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/syst-lua.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/syst-lua.lua @@ -17,18 +17,15 @@ local xcomplex = xcomplex or { } local cmd = tokens.commands -local scan_next = token.scan_next or token.get_next -local scan_cmdchr = token.scan_cmdchr_expanded +local scannext = token.scan_next or token.get_next -local get_command = token.get_command -local get_mode = token.get_mode -local get_index = token.get_index -local get_csname = token.get_csname -local get_macro = token.get_macro - -local put_next = token.put_next - -local scan_token = token.scan_token or token.get_token +local getcommand = token.get_command +local getmode = token.get_mode +local getindex = token.get_index +local getcsname = token.get_csname +local getmacro = token.get_macro +local putnext = token.put_next +local scantoken = token.scan_token or token.get_token local getdimen = tex.getdimen local getglue = tex.getglue @@ -194,7 +191,9 @@ implement { do - local result = { "return " } + local result = CONTEXTLMTXMODE > 0 and + { "local xmath = xmath local xcomplex = xcomplex return " } + or { "local xmath = math local xcomplex = { } return " } local word = { } local r = 1 local w = 0 @@ -209,12 +208,12 @@ do local w = 0 local r = 1 while true do - local t = scan_next() - local n = get_command(t) + local t = scannext() + local n = getcommand(t) local c = cmd[n] -- todo, helper: returns number if c == "letter" then - w = w + 1 ; word[w] = utfchar(get_mode(t)) + w = w + 1 ; word[w] = utfchar(getmode(t)) else if w > 0 then local s = concat(word,"",1,w) @@ -233,23 +232,23 @@ do w = 0 end if c == "other_char" then - r = r + 1 ; result[r] = utfchar(get_mode(t)) + r = r + 1 ; result[r] = utfchar(getmode(t)) elseif c == "spacer" then -- r = r + 1 ; result[r] = " " elseif c == "relax" then break elseif c == "assign_int" then - r = r + 1 ; result[r] = getcount(get_index(t)) + r = r + 1 ; result[r] = getcount(getindex(t)) elseif c == "assign_dimen" then - r = r + 1 ; result[r] = getdimen(get_index(t)) + r = r + 1 ; result[r] = getdimen(getindex(t)) elseif c == "assign_glue" then - r = r + 1 ; result[r] = getglue(get_index(t)) + r = r + 1 ; result[r] = getglue(getindex(t)) elseif c == "assign_toks" then - r = r + 1 ; result[r] = gettoks(get_index(t)) + r = r + 1 ; result[r] = gettoks(getindex(t)) elseif c == "char_given" or c == "math_given" or c == "xmath_given" then - r = r + 1 ; result[r] = get_mode(t) + r = r + 1 ; result[r] = getmode(t) elseif c == "last_item" then - local n = get_csname(t) + local n = getcsname(t) if n then local s = gettex(n) if s then @@ -261,9 +260,9 @@ do unexpected(c) end elseif c == "call" then - local n = get_csname(t) + local n = getcsname(t) if n then - local s = get_macro(n) + local s = getmacro(n) if s then r = r + 1 ; result[r] = s else @@ -273,8 +272,8 @@ do unexpected(c) end elseif c == "the" or c == "convert" or c == "lua_expandable_call" then - put_next(t) - scan_token() -- expands + putnext(t) + scantoken() -- expands else unexpected(c) end diff --git a/Master/texmf-dist/tex/context/base/mkiv/syst-lua.mkiv b/Master/texmf-dist/tex/context/base/mkiv/syst-lua.mkiv index f0902eaf58b..327d1d407f6 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/syst-lua.mkiv +++ b/Master/texmf-dist/tex/context/base/mkiv/syst-lua.mkiv @@ -73,8 +73,8 @@ %D We can omit the tex.ctxcatcodes here as nowadays we seldom change the regime at %D the \TEX\ end: -%def\luaexpr#1{\ctxlua{context (tostring(#1))}} % more efficient: -\def\luaexpr#1{\ctxlua{tex.print(tostring(#1))}} % no use is shortcutting has to be compiled +%def\luaexpr#1{\ctxlua{context (tostring(#1))}} % more efficient: +\def\luaexpr#1{\ctxlua{tex.print(tostring(#1))}} % no use in shortcutting has to be compiled %D But as we only use write 16 we could as well do all in \LUA\ and ignore the rest. %D Okay, we still can do writes here but only when not blocked. diff --git a/Master/texmf-dist/tex/context/base/mkiv/tabl-xtb.lua b/Master/texmf-dist/tex/context/base/mkiv/tabl-xtb.lua index c9dd1e4e519..32770141bac 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/tabl-xtb.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/tabl-xtb.lua @@ -73,9 +73,9 @@ local setlink = nuts.setlink local setdirection = nuts.setdirection local setshift = nuts.setshift -local copy_node_list = nuts.copy_list -local hpack_node_list = nuts.hpack -local flush_node_list = nuts.flush_list +local copynodelist = nuts.copylist +local hpacknodelist = nuts.hpack +local flushnodelist = nuts.flushlist local takebox = nuts.takebox local nodepool = nuts.pool @@ -273,7 +273,7 @@ function xtables.set_reflow_width() local tb = getbox("b_tabl_x") local drc = row[c] -- - drc.list = true -- we don't need to keep the content around as we're in trial mode (no: copy_node_list(tb)) + drc.list = true -- we don't need to keep the content around as we're in trial mode (no: copynodelist(tb)) -- local width, height, depth = getwhd(tb) -- @@ -561,7 +561,7 @@ function xtables.reflow_width() for c=1,nofcolumns do local drc = row[c] if drc.list then - -- flush_node_list(drc.list) + -- flushnodelist(drc.list) drc.list = false end end @@ -853,7 +853,7 @@ function xtables.construct() if list then local w, h, d = getwhd(list) setshift(list,h+d) - -- list = hpack_node_list(list) -- is somehow needed + -- list = hpacknodelist(list) -- is somehow needed -- setwhd(list,0,0,0) -- faster: local h = new_hlist(list) @@ -900,9 +900,9 @@ function xtables.construct() end nofr = nofr + 1 local rp = rowproperties[r] - -- we have a direction issue here but hpack_node_list(list,0,"exactly") cannot be used + -- we have a direction issue here but hpacknodelist(list,0,"exactly") cannot be used -- due to the fact that we need the width - local hbox = hpack_node_list(list) + local hbox = hpacknodelist(list) setdirection(hbox,lefttoright_code) result[nofr] = { hbox, @@ -949,7 +949,7 @@ end local function inject(row,copy,package) local list = row[1] if copy then - row[1] = copy_node_list(list) + row[1] = copynodelist(list) end if package then ctx_beginvbox() @@ -1186,7 +1186,7 @@ end function xtables.cleanup() for mode, result in next, data.results do for _, r in next, result do - flush_node_list(r[1]) + flushnodelist(r[1]) end end diff --git a/Master/texmf-dist/tex/context/base/mkiv/tabl-xtb.mkvi b/Master/texmf-dist/tex/context/base/mkiv/tabl-xtb.mkvi index c5042a405bd..c340efdfad0 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/tabl-xtb.mkvi +++ b/Master/texmf-dist/tex/context/base/mkiv/tabl-xtb.mkvi @@ -267,7 +267,7 @@ }% else whitespace mess \def\tabl_x_get_buffer - {\clf_gettexbuffer{\tabl_x_current_buffer}} + {\clf_getbuffertex{\tabl_x_current_buffer}} \let\tabl_x_start_row_yes \relax \let\tabl_x_start_row_nop \relax @@ -392,11 +392,24 @@ % in text flow: headers and footers get repeated -\setvalue{\??xtableflushsplit\v!repeat}% +% \setvalue{\??xtableflushsplit\v!repeat}% +% {\doloop +% {\clf_x_table_flush +% method {\v!split}% +% height \ifdim\pagegoal=\maxdimen\textheight\else\pagegoal\fi +% \relax +% \ifcase\c_tabl_x_state +% \exitloop +% \else +% \page +% \fi}} + +\defcsname\??xtableflushsplit\v!repeat\endcsname {\doloop - {\clf_x_table_flush + {\testpage[5]% for now hard coded, just as the \lineheight below, see mail end of april 2021 + \clf_x_table_flush method {\v!split}% - height \ifdim\pagegoal=\maxdimen\textheight\else\pagegoal\fi + height \ifdim\pagegoal=\maxdimen\textheight\else\dimexpr\pagegoal-\pagetotal-\lineheight\relax\fi \relax \ifcase\c_tabl_x_state \exitloop diff --git a/Master/texmf-dist/tex/context/base/mkiv/task-ini.lua b/Master/texmf-dist/tex/context/base/mkiv/task-ini.lua index 3e78fb2f9c8..3697a4086e7 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/task-ini.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/task-ini.lua @@ -65,13 +65,8 @@ appendaction("processors", "lists", "typesetters.kerns.handler", appendaction("processors", "lists", "typesetters.digits.handler", nil, "nut", "disabled" ) appendaction("processors", "lists", "typesetters.italics.handler", nil, "nut", "disabled" ) appendaction("processors", "lists", "languages.visualizediscretionaries", nil, "nut", "disabled" ) - -if CONTEXTLMTXMODE == 0 then - appendaction("processors", "lists", "nodes.handlers.migrate", nil, "nut", "disabled" ) -end - appendaction("processors", "after", "typesetters.marksuspects", nil, "nut", "disabled" ) appendaction("shipouts", "normalizers", "nodes.handlers.cleanuppage", nil, "nut", "production") @@ -120,16 +115,14 @@ appendaction("math", "normalizers", "noads.handlers.italics", appendaction("math", "normalizers", "noads.handlers.kernpairs", nil, "nonut", "disabled" ) appendaction("math", "normalizers", "noads.handlers.classes", nil, "nonut", "disabled" ) -appendaction("math", "builders", "builders.kernel.mlist_to_hlist", nil, "nut", "enabled" ) -- mandate +appendaction("math", "builders", "builders.kernel.mlisttohlist", nil, "nut", "enabled" ) -- mandate appendaction("math", "builders", "typesetters.directions.processmath", nil, "nut", "disabled" ) appendaction("math", "builders", "noads.handlers.makeup", nil, "nonut", "disabled" ) appendaction("math", "builders", "noads.handlers.align", nil, "nonut", "enabled" ) -if CONTEXTLMTXMODE == 0 then - appendaction("finalizers", "lists", "typesetters.paragraphs.normalize", nil, "nut", "enabled" ) -- "disabled" - -end +appendaction("finalizers", "lists", "nodes.handlers.showhyphenation", nil, "nut", "disabled" ) +appendaction("finalizers", "lists", "nodes.handlers.visualizehyphenation", nil, "nut", "disabled" ) appendaction("finalizers", "lists", "typesetters.margins.localhandler", nil, "nut", "disabled" ) appendaction("finalizers", "lists", "builders.paragraphs.keeptogether", nil, "nut", "disabled" ) @@ -137,9 +130,11 @@ appendaction("finalizers", "fonts", "builders.paragraphs.solutions.split appendaction("finalizers", "lists", "builders.paragraphs.tag", nil, "nut", "disabled" ) appendaction("finalizers", "lists", "nodes.linefillers.handler", nil, "nut", "disabled" ) + appendaction("contributers", "normalizers", "nodes.handlers.flattenline", nil, "nut", "disabled" ) appendaction("contributers", "normalizers", "nodes.handlers.textbackgrounds", nil, "nut", "disabled" ) + appendaction("vboxbuilders", "normalizers", "nodes.handlers.backgroundsvbox", nil, "nut", "disabled" ) ------------("vboxbuilders", "normalizers", "typesetters.margins.localhandler", nil, "nut", "disabled" ) appendaction("vboxbuilders", "normalizers", "builders.vspacing.vboxhandler", nil, "nut", "enabled" ) diff --git a/Master/texmf-dist/tex/context/base/mkiv/toks-ini.lua b/Master/texmf-dist/tex/context/base/mkiv/toks-ini.lua index 7120b47c3cd..96bf7d7b90c 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/toks-ini.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/toks-ini.lua @@ -22,49 +22,49 @@ local commands = token.commands() tokens.commands = utilities.storage.allocate(table.swapped(commands,commands)) tokens.values = { } -local scan_toks = token.scan_toks -local scan_string = token.scan_string -local scan_argument = token.scan_argument -local scan_delimited = token.scan_delimited -local scan_tokenlist = token.scan_tokenlist or scan_string -local scan_integer = token.scan_integer or token.scan_int -local scan_cardinal = token.scan_cardinal -local scan_code = token.scan_code -local scan_token_code = token.scan_token_code -local scan_dimen = token.scan_dimen -local scan_glue = token.scan_glue -local scan_skip = token.scan_skip -local scan_keyword = token.scan_keyword -local scan_keyword_cs = token.scan_keyword_cs or scan_keyword -local scan_token = token.scan_token -local scan_box = token.scan_box -local scan_word = token.scan_word -local scan_letters = token.scan_letters or scan_word -- lmtx -local scan_key = token.scan_key -local scan_value = token.scan_value -local scan_char = token.scan_char -local scan_number = token.scan_number -- not defined -local scan_csname = token.scan_csname -local scan_real = token.scan_real -local scan_float = token.scan_float -local scan_luanumber = token.scan_luanumber or scan_float -- only lmtx -local scan_luainteger = token.scan_luainteger or scan_integer -- only lmtx -local scan_luacardinal = token.scan_luacardinal or scan_cardinal -- only lmtx - -local set_macro = token.set_macro -local set_char = token.set_char -local set_lua = token.set_lua - -local create_token = token.create -local new_token = token.new -local is_defined = token.is_defined -local is_token = token.is_token - -tokens.new = new_token -tokens.create = create_token -tokens.istoken = is_token -tokens.isdefined = is_defined -tokens.defined = is_defined +local scantoks = token.scan_toks +local scanstring = token.scan_string +local scanargument = token.scan_argument +local scandelimited = token.scan_delimited +local scantokenlist = token.scan_tokenlist or scanstring +local scaninteger = token.scan_integer or token.scan_int +local scancardinal = token.scan_cardinal +local scancode = token.scan_code +local scantokencode = token.scan_token_code +local scandimen = token.scan_dimen +local scanglue = token.scan_glue +local scanskip = token.scan_skip +local scankeyword = token.scan_keyword +local scankeywordcs = token.scan_keyword_cs or scankeyword +local scantoken = token.scan_token +local scanbox = token.scan_box +local scanword = token.scan_word +local scanletters = token.scan_letters or scanword -- lmtx +local scankey = token.scan_key +local scanvalue = token.scan_value +local scanchar = token.scan_char +local scannumber = token.scan_number -- not defined +local scancsname = token.scan_csname +local scanreal = token.scan_real +local scanfloat = token.scan_float +local scanluanumber = token.scan_luanumber or scanfloat -- only lmtx +local scanluainteger = token.scan_luainteger or scaninteger -- only lmtx +local scanluacardinal = token.scan_luacardinal or scancardinal -- only lmtx + +local setmacro = token.set_macro +local setchar = token.set_char +local setlua = token.set_lua + +local createtoken = token.create +local newtoken = token.new +local isdefined = token.is_defined +local istoken = token.is_token + +tokens.new = newtoken +tokens.create = createtoken +tokens.istoken = istoken +tokens.isdefined = isdefined +tokens.defined = isdefined local bits = { escape = 0x00000001, -- 2^00 @@ -98,10 +98,10 @@ tokens.bits = bits -- words are space or \relax terminated and the trailing space is gobbled; a word -- can contain any non-space letter/other (see archive for implementation in lua) -if not scan_number then +if not scannumber then - scan_number = function(base) - local s = scan_word() + scannumber = function(base) + local s = scanword() if not s then return nil elseif base then @@ -113,8 +113,8 @@ if not scan_number then end -local function scan_boolean() - local kw = scan_word() +local function scanboolean() + local kw = scanword() if kw == "true" then return true elseif kw == "false" then @@ -124,64 +124,64 @@ local function scan_boolean() end end -local function scan_verbatim() - return scan_argument(false) +local function scanverbatim() + return scanargument(false) end -if not scan_box then +if not scanbox then - local scan_list = token.scan_list - local put_next = token.put_next + local scanlist = token.scan_list + local putnext = token.put_next - scan_box = function(s) + scanbox = function(s) if s == "hbox" or s == "vbox" or s == "vtop" then - put_next(create_token(s)) + putnext(createtoken(s)) end - return scan_list() + return scanlist() end - token.scan_box = scan_box + token.scanbox = scanbox end tokens.scanners = { -- these expand - token = scan_token, - toks = scan_toks, - tokens = scan_toks, - box = scan_box, - hbox = function() return scan_box("hbox") end, - vbox = function() return scan_box("vbox") end, - vtop = function() return scan_box("vtop") end, - dimen = scan_dimen, - dimension = scan_dimen, - glue = scan_glue, - gluevalues = function() return scan_glue(false,false,true) end, - gluespec = scan_skip, - integer = scan_integer, - cardinal = scan_cardinal, - real = scan_real, - float = scan_float, - luanumber = scan_luanumber, - luainteger = scan_luainteger, - luacardinal = scan_luacardinal, - count = scan_integer, - string = scan_string, - argument = scan_argument, - delimited = scan_delimited, - tokenlist = scan_tokenlist, - verbatim = scan_verbatim, -- detokenize - code = scan_code, - tokencode = scan_token_code, - word = scan_word, - letters = scan_letters, - key = scan_key, - value = scan_value, - char = scan_char, - number = scan_number, - boolean = scan_boolean, - keyword = scan_keyword, - keywordcs = scan_keyword_cs, - csname = scan_csname, + token = scantoken, + toks = scantoks, + tokens = scantoks, + box = scanbox, + hbox = function() return scanbox("hbox") end, + vbox = function() return scanbox("vbox") end, + vtop = function() return scanbox("vtop") end, + dimen = scandimen, + dimension = scandimen, + glue = scanglue, + gluevalues = function() return scanglue(false,false,true) end, + gluespec = scanskip, + integer = scaninteger, + cardinal = scancardinal, + real = scanreal, + float = scanfloat, + luanumber = scanluanumber, + luainteger = scanluainteger, + luacardinal = scanluacardinal, + count = scaninteger, + string = scanstring, + argument = scanargument, + delimited = scandelimited, + tokenlist = scantokenlist, + verbatim = scanverbatim, -- detokenize + code = scancode, + tokencode = scantokencode, + word = scanword, + letters = scanletters, + key = scankey, + value = scanvalue, + char = scanchar, + number = scannumber, + boolean = scanboolean, + keyword = scankeyword, + keywordcs = scankeywordcs, + csname = scancsname, next = token.scan_next, nextexpanded = token.scan_next_expanded, @@ -214,9 +214,9 @@ tokens.getters = { -- these don't expand } tokens.setters = { - macro = set_macro, - char = set_char, - lua = set_lua, + macro = setmacro, + char = setchar, + lua = setlua, count = tex.setcount, dimen = tex.setdimen, skip = tex.setglue, @@ -226,7 +226,7 @@ tokens.setters = { box = tex.setbox, } -token.accessors = { +tokens.accessors = { command = token.get_command, cmd = token.get_command, cmdname = token.get_cmdname, @@ -243,33 +243,12 @@ token.accessors = { range = token.get_range, } --- static int run_scan_token(lua_State * L) --- { --- saved_tex_scanner texstate; --- save_tex_scanner(texstate); --- get_x_token(); --- make_new_token(L, cur_cmd, cur_chr, cur_cs); --- unsave_tex_scanner(texstate); --- return 1; --- } --- --- static int run_get_future(lua_State * L) --- { --- /* saved_tex_scanner texstate; */ --- /* save_tex_scanner(texstate); */ --- get_token(); --- make_new_token(L, cur_cmd, cur_chr, cur_cs); --- back_input(); --- /* unsave_tex_scanner(texstate); */ --- return 1; --- } - if setinspector then local simple = { letter = "letter", other_char = "other" } local astable = function(t) - if t and is_token(t) then + if t and istoken(t) then local cmdname = t.cmdname local simple = simple[cmdname] if simple then @@ -304,10 +283,10 @@ if setinspector then end tokens.cache = table.setmetatableindex(function(t,k) - if not is_defined(k) then - set_macro(k,"","global") + if not isdefined(k) then + setmacro(k,"","global") end - local v = create_token(k) + local v = createtoken(k) t[k] = v return v end) diff --git a/Master/texmf-dist/tex/context/base/mkiv/trac-ctx.lua b/Master/texmf-dist/tex/context/base/mkiv/trac-ctx.lua index a808778b316..f3243d39856 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/trac-ctx.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/trac-ctx.lua @@ -66,9 +66,9 @@ implement { } implement { - name = "installtextracker", + name = "installtextracker", arguments = "3 strings", - actions = function(tag,enable,disable) + actions = function(tag,enable,disable) install(textrackers,trackers.register,tag,enable,disable) end, } diff --git a/Master/texmf-dist/tex/context/base/mkiv/trac-deb.lua b/Master/texmf-dist/tex/context/base/mkiv/trac-deb.lua index 07865e4bf50..88d7e54c660 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/trac-deb.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/trac-deb.lua @@ -191,9 +191,11 @@ function tracers.printerror(specification) report_str(tracers.showlines(filename,linenumber,offset,tonumber(luaerrorline))) report_nl() end - local errname = file.addsuffix(tex.jobname .. "-error","log") if quitonerror then - table.save(errname,specification) + local name = tex.jobname or "" + if name ~= "" then + table.save(name .. "-error.log",specification) + end local help = specification.lasttexhelp if help and #help > 0 then report_nl() diff --git a/Master/texmf-dist/tex/context/base/mkiv/trac-fil.lua b/Master/texmf-dist/tex/context/base/mkiv/trac-fil.lua index f422c9f6b83..15aee6725c0 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/trac-fil.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/trac-fil.lua @@ -45,7 +45,7 @@ patterns.timestamp = timestamp loggers = loggers or { } -local timeformat = format("[%%s%s]",os.timezone(true)) +local timeformat = format("[%%s%s]",os.timezone()) local dateformat = "!%Y-%m-%d %H:%M:%S" function loggers.makeline(t) diff --git a/Master/texmf-dist/tex/context/base/mkiv/trac-jus.lua b/Master/texmf-dist/tex/context/base/mkiv/trac-jus.lua index aec1844ec5a..5f53b4c9941 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/trac-jus.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/trac-jus.lua @@ -28,7 +28,7 @@ local findtail = nuts.tail local nexthlist = nuts.traversers.hlist local getdimensions = nuts.dimensions -local copy_list = nuts.copy_list +local copylist = nuts.copylist local tracedrule = nodes.tracers.pool.nuts.rule @@ -100,7 +100,7 @@ function checkers.handler(head) setlist(current,rule) elseif alignstate == 2 then local lrule = new_hlist(tracedrule(-delta/2,naturalheight,naturaldepth,"trace:dy")) - local rrule = copy_list(lrule) + local rrule = copylist(lrule) setlink(lrule,list) setlink(findtail(list),new_kern(delta/2),rrule) setlist(current,lrule) diff --git a/Master/texmf-dist/tex/context/base/mkiv/trac-set.lua b/Master/texmf-dist/tex/context/base/mkiv/trac-set.lua index 3974830fab0..0441f386b39 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/trac-set.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/trac-set.lua @@ -165,6 +165,9 @@ local function register_setter(t,what,...) end local s = fnc -- else wrong reference fnc = function(value) set(t,s,value) end + elseif typ == "table" then + functions.values = fnc + fnc = nil elseif typ ~= "function" then fnc = nil end @@ -216,35 +219,42 @@ local function list_setter(t) -- pattern return user, system end -local function show_setter(t) +local function show_setter(t,pattern) local list = list_setter(t) t.report() for k=1,#list do local name = list[k] - local functions = t.data[name] - if functions then - local value = functions.value - local default = functions.default - local modules = #functions - if default == nil then - default = "unset" - elseif type(default) == "table" then - default = concat(default,"|") - else - default = tostring(default) + if not pattern or find(name,pattern) then + local functions = t.data[name] + if functions then + local value = functions.value + local default = functions.default + local values = functions.values + local modules = #functions + if default == nil then + default = "unset" + elseif type(default) == "table" then + default = concat(default,"|") + else + default = tostring(default) + end + if value == nil then + value = "unset" + elseif type(value) == "table" then + value = concat(value,"|") + else + value = tostring(value) + end + t.report(name) + t.report(" modules : %i",modules) + t.report(" default : %s",default) + t.report(" value : %s",value) + if values then + local v = { } for i=1,#values do v[i] = tostring(values[i]) end + t.report(" values : % t",v) end - if value == nil then - value = "unset" - elseif type(value) == "table" then - value = concat(value,"|") - else - value = tostring(value) + t.report() end - t.report(name) - t.report(" modules : %i",modules) - t.report(" default : %s",default) - t.report(" value : %s",value) - t.report() end end end @@ -272,6 +282,11 @@ local function setter_value(setter,name) return d and (d.value or d.default) end +local function setter_values(setter,name) + local d = setter.data[name] + return d and d.values +end + local function new_setter(name) -- we could use foo:bar syntax (but not used that often) local setter -- we need to access it in setter itself setter = { @@ -286,6 +301,7 @@ local function new_setter(name) -- we could use foo:bar syntax (but not used tha show = function(...) show_setter (setter,...) end, default = function(...) return setter_default (setter,...) end, value = function(...) return setter_value (setter,...) end, + values = function(...) return setter_values (setter,...) end, } data[name] = setter return setter @@ -393,7 +409,7 @@ if texconfig then -- this happens too late in ini mode but that is no problem local function set(k,v) - v = tonumber(v) + local v = tonumber(v) if v then texconfig[k] = v end diff --git a/Master/texmf-dist/tex/context/base/mkiv/trac-vis.lua b/Master/texmf-dist/tex/context/base/mkiv/trac-vis.lua index fb5ef98d939..3bfbd1c76e2 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/trac-vis.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/trac-vis.lua @@ -70,14 +70,14 @@ local isglyph = nuts.isglyph local hpack_nodes = nuts.hpack local vpack_nodes = nuts.vpack -local copy_list = nuts.copy_list -local copy_node = nuts.copy_node -local flush_node_list = nuts.flush_list -local insert_node_before = nuts.insert_before -local insert_node_after = nuts.insert_after +local copylist = nuts.copylist +local copy_node = nuts.copy +local insertnodebefore = nuts.insertbefore +local insertnodeafter = nuts.insertafter local apply_to_nodes = nuts.apply local find_tail = nuts.tail -local effectiveglue = nuts.effective_glue +local effectiveglue = nuts.effectiveglue +local flushnodelist = nuts.flushlist local hpack_string = nuts.typesetters.tohpack @@ -500,7 +500,7 @@ local fontkern, italickern, marginkern, mathlistkern do setattr(info,a_layer,layer) f_cache[kern] = info end - head = insert_node_before(head,current,copy_list(info)) + head = insertnodebefore(head,current,copylist(info)) return head, current end @@ -548,7 +548,7 @@ local glyphexpansion do setattr(info,a_layer,l_expansion) f_cache[extra] = info end - head = insert_node_before(head,current,copy_list(info)) + head = insertnodebefore(head,current,copylist(info)) return head, current end return head, current @@ -584,7 +584,7 @@ local kernexpansion do setattr(info,a_layer,l_expansion) f_cache[extra] = info end - head = insert_node_before(head,current,copy_list(info)) + head = insertnodebefore(head,current,copylist(info)) return head, current end return head, current @@ -621,7 +621,7 @@ local whatsit do setattr(info,a_layer,l_whatsit) w_cache[what] = info end - head, current = insert_node_after(head,current,copy_list(info)) + head, current = insertnodeafter(head,current,copylist(info)) return head, current end @@ -694,7 +694,7 @@ local user do setattr(info,a_layer,l_user) u_cache[what] = info end - head, current = insert_node_after(head,current,copy_list(info)) + head, current = insertnodeafter(head,current,copylist(info)) return head, current end @@ -733,7 +733,7 @@ local math do setattr(info,a_layer,l_math) m_cache[tag][skip] = info end - head, current = insert_node_after(head,current,copy_list(info)) + head, current = insertnodeafter(head,current,copylist(info)) return head, current end @@ -791,7 +791,7 @@ local ruledbox do end -- we need to trigger the right mode (else sometimes no whatits) local info = setlink( - this and copy_list(this) or nil, + this and copylist(this) or nil, (dp == 0 and outlinerule and outlinerule(wd,ht,dp,linewidth)) or userrule { width = wd, height = ht, @@ -812,7 +812,7 @@ local ruledbox do elseif trace_origin then local size = 2*size local origin = o_cache[size] - origin = copy_list(origin) + origin = copylist(origin) if getid(parent) == vlist_code then setshift(origin,-shift) info = setlink(current,new_kern(-size),origin,new_kern(-size-dp),info) @@ -832,7 +832,7 @@ local ruledbox do elseif trace_origin then local size = 2*size local origin = o_cache[size] - origin = copy_list(origin) + origin = copylist(origin) if getid(parent) == vlist_code then info = setlink(current,new_kern(-wd-size-shift),origin,new_kern(-size+shift),info) else @@ -1012,11 +1012,11 @@ local ruledglue do end (vertical and g_cache_v or g_cache_h)[amount] = info end - info = copy_list(info) + info = copylist(info) if vertical then info = vpack_nodes(info) end - head, current = insert_node_before(head,current,info) + head, current = insertnodebefore(head,current,info) return head, getnext(current) end @@ -1032,8 +1032,8 @@ local ruledglue do -- info = sometext(amount,l_glue,c_space) -- g_cache_h[amount] = info -- end - -- info = copy_list(info) - -- head, current = insert_node_before(head,current,info) + -- info = copylist(info) + -- head, current = insertnodebefore(head,current,info) -- return head, getnext(current) -- else -- return head, current @@ -1061,8 +1061,8 @@ local ruledglue do g_cache_x[width] = info end end - info = copy_list(info) - head, current = insert_node_before(head,current,info) + info = copylist(info) + head, current = insertnodebefore(head,current,info) return head, getnext(current) else return head, current @@ -1091,11 +1091,11 @@ local ruledkern do end cache[kern] = info end - info = copy_list(info) + info = copylist(info) if vertical then info = vpack_nodes(info) end - head, current = insert_node_before(head,current,info) + head, current = insertnodebefore(head,current,info) return head, getnext(current) end @@ -1119,8 +1119,8 @@ local ruleditalic do end i_cache[kern] = info end - info = copy_list(info) - head, current = insert_node_before(head,current,info) + info = copylist(info) + head, current = insertnodebefore(head,current,info) return head, getnext(current) end @@ -1144,8 +1144,8 @@ local ruledmarginkern do end m_cache[kern] = info end - info = copy_list(info) - head, current = insert_node_before(head,current,info) + info = copylist(info) + head, current = insertnodebefore(head,current,info) return head, getnext(current) end @@ -1169,8 +1169,8 @@ local ruledmathlistkern do end l_cache[kern] = info end - info = copy_list(info) - head, current = insert_node_before(head,current,info) + info = copylist(info) + head, current = insertnodebefore(head,current,info) return head, getnext(current) end @@ -1192,7 +1192,7 @@ local ruleddiscretionary do d = new_hlist(kern) d_cache[true] = d end - insert_node_after(head,current,copy_list(d)) + insertnodeafter(head,current,copylist(d)) return head, current end @@ -1223,13 +1223,13 @@ local ruledpenalty do end (vertical and p_cache_v or p_cache_h)[penalty] = info end - info = copy_list(info) + info = copylist(info) if vertical then info = vpack_nodes(info) elseif raisepenalties then setshift(info,-65536*4) end - head, current = insert_node_before(head,current,info) + head, current = insertnodebefore(head,current,info) return head, getnext(current) end @@ -1503,7 +1503,7 @@ do local function cleanup() for tag, cache in next, caches do for k, v in next, cache do - flush_node_list(v) + flushnodelist(v) end end cleanup = function() diff --git a/Master/texmf-dist/tex/context/base/mkiv/type-set.mkiv b/Master/texmf-dist/tex/context/base/mkiv/type-set.mkiv index 68cd939d769..c87129e9441 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/type-set.mkiv +++ b/Master/texmf-dist/tex/context/base/mkiv/type-set.mkiv @@ -59,81 +59,91 @@ \fi -\definefilesynonym [type-imp-latin-modern.mkiv] [type-imp-latinmodern.mkiv] -\definefilesynonym [type-imp-modern-latin.mkiv] [type-imp-modernlatin.mkiv] - -\definefilesynonym [type-imp-lucida.mkiv] [type-imp-lucida-typeone.mkiv] -\definefilesynonym [type-imp-lucidaot.mkiv] [type-imp-lucida-opentype.mkiv] -\definefilesynonym [type-imp-lucidadk.mkiv] [type-imp-lucida-opentype.mkiv] - -\definefilesynonym [type-imp-dejavu-condensed.mkiv] [type-imp-dejavu.mkiv] - -\definefilesynonym [type-imp-palatino.mkiv] [type-imp-texgyre.mkiv] -\definefilesynonym [type-imp-courier.mkiv] [type-imp-texgyre.mkiv] -\definefilesynonym [type-imp-avantgarde.mkiv] [type-imp-texgyre.mkiv] -\definefilesynonym [type-imp-helvetica.mkiv] [type-imp-texgyre.mkiv] -\definefilesynonym [type-imp-chancery.mkiv] [type-imp-texgyre.mkiv] -\definefilesynonym [type-imp-bookman.mkiv] [type-imp-texgyre.mkiv] -\definefilesynonym [type-imp-schoolbook.mkiv] [type-imp-texgyre.mkiv] -\definefilesynonym [type-imp-times.mkiv] [type-imp-texgyre.mkiv] - -\definefilesynonym [type-imp-cursor.mkiv] [type-imp-texgyre.mkiv] -\definefilesynonym [type-imp-adventor.mkiv] [type-imp-texgyre.mkiv] -\definefilesynonym [type-imp-heros.mkiv] [type-imp-texgyre.mkiv] -\definefilesynonym [type-imp-chorus.mkiv] [type-imp-texgyre.mkiv] -\definefilesynonym [type-imp-bonum.mkiv] [type-imp-texgyre.mkiv] -\definefilesynonym [type-imp-schola.mkiv] [type-imp-texgyre.mkiv] -\definefilesynonym [type-imp-pagella.mkiv] [type-imp-texgyre.mkiv] -\definefilesynonym [type-imp-termes.mkiv] [type-imp-texgyre.mkiv] - -\definefilesynonym [type-imp-mscoretimes.mkiv] [type-imp-mscore.mkiv] -\definefilesynonym [type-imp-mscorearial.mkiv] [type-imp-mscore.mkiv] -\definefilesynonym [type-imp-mscorecourier.mkiv] [type-imp-mscore.mkiv] -\definefilesynonym [type-imp-mscoreverdana.mkiv] [type-imp-mscore.mkiv] - -\definefilesynonym [type-imp-candara.mkiv] [type-imp-cleartype.mkiv] -\definefilesynonym [type-imp-consolas.mkiv] [type-imp-cleartype.mkiv] -\definefilesynonym [type-imp-constantia.mkiv] [type-imp-cleartype.mkiv] -\definefilesynonym [type-imp-corbel.mkiv] [type-imp-cleartype.mkiv] -\definefilesynonym [type-imp-calibri.mkiv] [type-imp-cleartype.mkiv] - -\definefilesynonym [type-imp-antykwa-poltawskiego.mkiv] [type-imp-antykwapoltawskiego.mkiv] - -%definefilesynonym [type-imp-mac.mkiv] [type-imp-osx.mkiv] -%definefilesynonym [type-imp-win.mkiv] [type-imp-mscore.mkiv] - -\definefilesynonym [type-imp-eulernovum.mkiv] [type-imp-euler.mkiv] -\definefilesynonym [type-imp-eulernova.mkiv] [type-imp-euler.mkiv] - -\definefilesynonym [type-imp-euler-with-pagella.mkiv] [type-imp-euler.mkiv] -\definefilesynonym [type-imp-pagella-with-euler.mkiv] [type-imp-euler.mkiv] - -\definefilesynonym [type-imp-mdbch.mkiv] [type-imp-mathdesign.mkiv] -\definefilesynonym [type-imp-mdugm.mkiv] [type-imp-mathdesign.mkiv] -\definefilesynonym [type-imp-mdput.mkiv] [type-imp-mathdesign.mkiv] -\definefilesynonym [type-imp-mdici.mkiv] [type-imp-mathdesign.mkiv] -\definefilesynonym [type-imp-mdpgd.mkiv] [type-imp-mathdesign.mkiv] -\definefilesynonym [type-imp-mdpus.mkiv] [type-imp-mathdesign.mkiv] - -\definefilesynonym [type-imp-mathdesignch.mkiv] [type-imp-mathdesign.mkiv] -\definefilesynonym [type-imp-mathdesigngm.mkiv] [type-imp-mathdesign.mkiv] -\definefilesynonym [type-imp-mathdesignut.mkiv] [type-imp-mathdesign.mkiv] -\definefilesynonym [type-imp-mathdesignci.mkiv] [type-imp-mathdesign.mkiv] -\definefilesynonym [type-imp-mathdesigngd.mkiv] [type-imp-mathdesign.mkiv] -\definefilesynonym [type-imp-mathdesignus.mkiv] [type-imp-mathdesign.mkiv] - -\definefilesynonym [type-imp-mathdesigncharter.mkiv] [type-imp-mathdesign.mkiv] -\definefilesynonym [type-imp-mathdesigngaramond.mkiv] [type-imp-mathdesign.mkiv] -\definefilesynonym [type-imp-mathdesignutopia.mkiv] [type-imp-mathdesign.mkiv] - -\definefilesynonym [type-imp-cows.mkiv] [type-imp-koeielettersot.mkiv] -\definefilesynonym [type-imp-sheep.mkiv] [type-imp-koeielettersot.mkiv] -\definefilesynonym [type-imp-coloredcows.mkiv] [type-imp-koeielettersot.mkiv] -\definefilesynonym [type-imp-coloredsheep.mkiv] [type-imp-koeielettersot.mkiv] -\definefilesynonym [type-imp-koeieletters.mkiv] [type-imp-koeielettersot.mkiv] - -\definefilesynonym [type-imp-stixtwo.mkiv] [type-imp-stix.mkiv] - -\definefilesynonym [type-imp-ibmplex.mkiv] [type-imp-plex.mkiv] +\definefilesynonym [type-imp-latin-modern.mkiv] [type-imp-latinmodern.mkiv] +\definefilesynonym [type-imp-modern-latin.mkiv] [type-imp-modernlatin.mkiv] + +\definefilesynonym [type-imp-lucida-opentype.mkiv] [type-imp-lucida.mkiv] +\definefilesynonym [type-imp-lucidaot.mkiv] [type-imp-lucida.mkiv] +\definefilesynonym [type-imp-lucidadk.mkiv] [type-imp-lucida.mkiv] + +\definefilesynonym [type-imp-dejavu-condensed.mkiv] [type-imp-dejavu.mkiv] + +\definefilesynonym [type-imp-palatino.mkiv] [type-imp-texgyre.mkiv] +\definefilesynonym [type-imp-courier.mkiv] [type-imp-texgyre.mkiv] +\definefilesynonym [type-imp-avantgarde.mkiv] [type-imp-texgyre.mkiv] +\definefilesynonym [type-imp-helvetica.mkiv] [type-imp-texgyre.mkiv] +\definefilesynonym [type-imp-chancery.mkiv] [type-imp-texgyre.mkiv] +\definefilesynonym [type-imp-bookman.mkiv] [type-imp-texgyre.mkiv] +\definefilesynonym [type-imp-schoolbook.mkiv] [type-imp-texgyre.mkiv] +\definefilesynonym [type-imp-times.mkiv] [type-imp-texgyre.mkiv] + +\definefilesynonym [type-imp-cursor.mkiv] [type-imp-texgyre.mkiv] +\definefilesynonym [type-imp-adventor.mkiv] [type-imp-texgyre.mkiv] +\definefilesynonym [type-imp-heros.mkiv] [type-imp-texgyre.mkiv] +\definefilesynonym [type-imp-chorus.mkiv] [type-imp-texgyre.mkiv] +\definefilesynonym [type-imp-bonum.mkiv] [type-imp-texgyre.mkiv] +\definefilesynonym [type-imp-schola.mkiv] [type-imp-texgyre.mkiv] +\definefilesynonym [type-imp-pagella.mkiv] [type-imp-texgyre.mkiv] +\definefilesynonym [type-imp-termes.mkiv] [type-imp-texgyre.mkiv] + +\definefilesynonym [type-imp-mscoretimes.mkiv] [type-imp-mscore.mkiv] +\definefilesynonym [type-imp-mscorearial.mkiv] [type-imp-mscore.mkiv] +\definefilesynonym [type-imp-mscorecourier.mkiv] [type-imp-mscore.mkiv] +\definefilesynonym [type-imp-mscoreverdana.mkiv] [type-imp-mscore.mkiv] + +\definefilesynonym [type-imp-candara.mkiv] [type-imp-cleartype.mkiv] +\definefilesynonym [type-imp-consolas.mkiv] [type-imp-cleartype.mkiv] +\definefilesynonym [type-imp-constantia.mkiv] [type-imp-cleartype.mkiv] +\definefilesynonym [type-imp-corbel.mkiv] [type-imp-cleartype.mkiv] +\definefilesynonym [type-imp-calibri.mkiv] [type-imp-cleartype.mkiv] + +\definefilesynonym [type-imp-antykwa-poltawskiego.mkiv] [type-imp-antykwapoltawskiego.mkiv] + +%definefilesynonym [type-imp-mac.mkiv] [type-imp-osx.mkiv] +%definefilesynonym [type-imp-win.mkiv] [type-imp-mscore.mkiv] + +\definefilesynonym [type-imp-eulernovum.mkiv] [type-imp-euler.mkiv] +\definefilesynonym [type-imp-eulernova.mkiv] [type-imp-euler.mkiv] + +\definefilesynonym [type-imp-euler-with-pagella.mkiv] [type-imp-euler.mkiv] +\definefilesynonym [type-imp-pagella-with-euler.mkiv] [type-imp-euler.mkiv] + +\definefilesynonym [type-imp-mdbch.mkiv] [type-imp-mathdesign.mkiv] +\definefilesynonym [type-imp-mdugm.mkiv] [type-imp-mathdesign.mkiv] +\definefilesynonym [type-imp-mdput.mkiv] [type-imp-mathdesign.mkiv] +\definefilesynonym [type-imp-mdici.mkiv] [type-imp-mathdesign.mkiv] +\definefilesynonym [type-imp-mdpgd.mkiv] [type-imp-mathdesign.mkiv] +\definefilesynonym [type-imp-mdpus.mkiv] [type-imp-mathdesign.mkiv] + +\definefilesynonym [type-imp-mathdesignch.mkiv] [type-imp-mathdesign.mkiv] +\definefilesynonym [type-imp-mathdesigngm.mkiv] [type-imp-mathdesign.mkiv] +\definefilesynonym [type-imp-mathdesignut.mkiv] [type-imp-mathdesign.mkiv] +\definefilesynonym [type-imp-mathdesignci.mkiv] [type-imp-mathdesign.mkiv] +\definefilesynonym [type-imp-mathdesigngd.mkiv] [type-imp-mathdesign.mkiv] +\definefilesynonym [type-imp-mathdesignus.mkiv] [type-imp-mathdesign.mkiv] + +\definefilesynonym [type-imp-mathdesigncharter.mkiv] [type-imp-mathdesign.mkiv] +\definefilesynonym [type-imp-mathdesigngaramond.mkiv] [type-imp-mathdesign.mkiv] +\definefilesynonym [type-imp-mathdesignutopia.mkiv] [type-imp-mathdesign.mkiv] + +\definefilesynonym [type-imp-cows.mkiv] [type-imp-koeielettersot.mkiv] +\definefilesynonym [type-imp-sheep.mkiv] [type-imp-koeielettersot.mkiv] +\definefilesynonym [type-imp-coloredcows.mkiv] [type-imp-koeielettersot.mkiv] +\definefilesynonym [type-imp-coloredsheep.mkiv] [type-imp-koeielettersot.mkiv] +\definefilesynonym [type-imp-koeieletters.mkiv] [type-imp-koeielettersot.mkiv] + +%definefilesynonym [type-imp-xits.mkiv] [type-imp-stix.mkiv] +\definefilesynonym [type-imp-stixtwo.mkiv] [type-imp-stix.mkiv] + +\definefilesynonym [type-imp-ibmplex.mkiv] [type-imp-plex.mkiv] + +\definefilesynonym [type-imp-newcomputermodern-book.mkiv] [type-imp-newcomputermodern.mkiv] + +\definefilesynonym [type-imp-kpfonts-light.mkiv] [type-imp-kpfonts.mkiv] +\definefilesynonym [type-imp-kpfonts-bold.mkiv] [type-imp-kpfonts.mkiv] +\definefilesynonym [type-imp-kpfonts-sans.mkiv] [type-imp-kpfonts.mkiv] + +\definefilesynonym [type-imp-gentiumplus.mkiv] [type-imp-gentium.mkiv] +\definefilesynonym [type-imp-gentiumbook.mkiv] [type-imp-gentium.mkiv] \protect \endinput diff --git a/Master/texmf-dist/tex/context/base/mkiv/typo-bld.lua b/Master/texmf-dist/tex/context/base/mkiv/typo-bld.lua index 30503277212..36371aa104b 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/typo-bld.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/typo-bld.lua @@ -46,7 +46,7 @@ local nodeidstostring = nodes.idstostring local nodepool = nodes.pool local new_baselineskip = nodepool.baselineskip local new_lineskip = nodepool.lineskip -local insert_node_before = nodes.insert_before +local insertnodebefore = nodes.insertbefore local hpack_node = nodes.hpack local nuts = nodes.nuts @@ -157,9 +157,9 @@ function parbuilders.constructors.methods.oneline(head,followed_by_display) t.prevdepth = h.depth t.prevgraf = 1 if d < texget("lineskiplimit") then - return insert_node_before(h,h,new_lineskip(texget("lineskip",false))) -- no stretch etc + return insertnodebefore(h,h,new_lineskip(texget("lineskip",false))) -- no stretch etc else - return insert_node_before(h,h,new_baselineskip(d)) + return insertnodebefore(h,h,new_baselineskip(d)) end end diff --git a/Master/texmf-dist/tex/context/base/mkiv/typo-brk.lua b/Master/texmf-dist/tex/context/base/mkiv/typo-brk.lua index 89eb7e52d33..68d9f2f5410 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/typo-brk.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/typo-brk.lua @@ -46,13 +46,13 @@ local setprev = nuts.setprev local setboth = nuts.setboth local setsubtype = nuts.setsubtype -local copy_node = nuts.copy_node -local copy_node_list = nuts.copy_list -local flush_node = nuts.flush_node -local insert_node_before = nuts.insert_before -local insert_node_after = nuts.insert_after +local copy_node = nuts.copy +local copy_node_list = nuts.copylist +local flushnode = nuts.flushnode +local insertnodebefore = nuts.insertbefore +local insertnodeafter = nuts.insertafter local remove_node = nuts.remove -local end_of_math = nuts.end_of_math +local endofmath = nuts.endofmath local tonodes = nuts.tonodes @@ -116,15 +116,15 @@ local function insert_break(head,start,stop,before,after,kern) local g = new_glue() setattrlist(p,start) setattrlist(g,start) - insert_node_before(head,start,p) - insert_node_before(head,start,g) + insertnodebefore(head,start,p) + insertnodebefore(head,start,g) end local p = new_penalty(after) local g = new_glue() setattrlist(p,start) setattrlist(g,start) - insert_node_after(head,stop,g) - insert_node_after(head,stop,p) + insertnodeafter(head,stop,g) + insertnodeafter(head,stop,p) end methods[1] = function(head,start,stop,settings,kern) @@ -170,7 +170,7 @@ methods[2] = function(head,start) -- ( => (- local hyphen = copy_node(post) setchar(hyphen,languages.prehyphenchar(getlanguage(post))) setlink(post,hyphen) - head, start = insert_node_before(head,start,new_disc(nil,post,replace)) + head, start = insertnodebefore(head,start,new_disc(nil,post,replace)) setattrlist(start,replace) insert_break(head,start,start,10000,10000) end @@ -186,7 +186,7 @@ methods[3] = function(head,start) -- ) => -) local hyphen = copy_node(pre) setchar(hyphen,languages.prehyphenchar(getlanguage(pre))) setlink(hyphen,pre) - head, start = insert_node_before(head,start,new_disc(hyphen,nil,replace)) -- so not pre ! + head, start = insertnodebefore(head,start,new_disc(hyphen,nil,replace)) -- so not pre ! setattrlist(start,tmp) insert_break(head,start,start,10000,10000) end @@ -198,7 +198,7 @@ methods[4] = function(head,start) -- - => - - - if p and n then local tmp head, start, tmp = remove_node(head,start) - head, start = insert_node_before(head,start,new_disc()) + head, start = insertnodebefore(head,start,new_disc()) setattrlist(start,tmp) setdisc(start,copy_node(tmp),copy_node(tmp),tmp) insert_break(head,start,start,10000,10000) @@ -211,7 +211,7 @@ methods[5] = function(head,start,stop,settings) -- x => p q r if p and n then local tmp head, start, tmp = remove_node(head,start) - head, start = insert_node_before(head,start,new_disc()) + head, start = insertnodebefore(head,start,new_disc()) local attr = getattrlist(tmp) local font = getfont(tmp) local left = settings.left @@ -228,7 +228,7 @@ methods[5] = function(head,start,stop,settings) -- x => p q r end setdisc(start,left,right,middle) setattrlist(start,attr) - flush_node(tmp) + flushnode(tmp) insert_break(head,start,start,10000,10000) end return head, start @@ -302,7 +302,7 @@ function breakpoints.handler(head) end elseif id == math_code then attr = nil - current = end_of_math(current) + current = endofmath(current) if current then current = getnext(current) end diff --git a/Master/texmf-dist/tex/context/base/mkiv/typo-cap.lua b/Master/texmf-dist/tex/context/base/mkiv/typo-cap.lua index 3d0d6055a77..b6338ce4024 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/typo-cap.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/typo-cap.lua @@ -36,9 +36,9 @@ local setchar = nuts.setchar local setfont = nuts.setfont local copy_node = nuts.copy -local end_of_math = nuts.end_of_math -local insert_after = nuts.insert_after -local find_attribute = nuts.find_attribute +local endofmath = nuts.endofmath +local insertafter = nuts.insertafter +local findattribute = nuts.findattribute local nextglyph = nuts.traversers.glyph @@ -132,7 +132,7 @@ local function replacer(start,codes) else local g = copy_node(start) setchar(g,chr) - insert_after(start,start,g) + insertafter(start,start,g) end end elseif ifc[dc] then @@ -237,7 +237,7 @@ local function mixed(start,attr,lastfont,n,count,where,first) if fp ~= fc then local k = fonts.getkern(fontdata[fp],getchar(p),c) if k ~= 0 then - insert_after(p,p,newkern(k)) + insertafter(p,p,newkern(k)) end end else @@ -410,7 +410,7 @@ function cases.handler(head) -- not real fast but also not used on much data count = count + 1 end elseif id == math_code then - start = end_of_math(start) + start = endofmath(start) count = 0 elseif prev_id == kern_code and getsubtype(prev) == fontkern_code then -- still inside a word ...normally kerns are added later @@ -427,7 +427,7 @@ function cases.handler(head) -- not real fast but also not used on much data end -- function cases.handler(head) -- not real fast but also not used on much data --- local attr, start = find_attribute(head,a_cases) +-- local attr, start = findattribute(head,a_cases) -- if not start then -- return head, false -- end @@ -520,7 +520,7 @@ end -- count = count + 1 -- end -- elseif id == math_code then --- start = end_of_math(start) +-- start = endofmath(start) -- count = 0 -- elseif prev_id == kern_code and getsubtype(prev) == fontkern_code then -- -- still inside a word ...normally kerns are added later @@ -536,7 +536,7 @@ end -- end -- end -- if start then --- attr, start = find_attribute(start,a_cases) +-- attr, start = findattribute(start,a_cases) -- end -- end -- return head diff --git a/Master/texmf-dist/tex/context/base/mkiv/typo-chr.lua b/Master/texmf-dist/tex/context/base/mkiv/typo-chr.lua index bb3883b3308..c9ba0c7b9da 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/typo-chr.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/typo-chr.lua @@ -99,8 +99,8 @@ local wordboundary_code = boundarycodes.word local texgetnest = tex.getnest -- to be used local texsetcount = tex.setcount -local flush_node = nodes.flush_node -local flush_list = nodes.flush_list +local flushnode = nodes.flushnode +local flushlist = nodes.flushlist local settexattribute = tex.setattribute local punctuation = characters.is_punctuation @@ -140,7 +140,7 @@ local actions = { remove = function(specification) local n = pickup() if n then - flush_node(n) + flushnode(n) end end, push = function(specification) @@ -175,7 +175,7 @@ local function pickup(head,tail,str) while true do local prev = first.prev if prev and prev[a_marked] == attr then - if prev.id == par_code then -- and start_of_par(prev) + if prev.id == par_code then -- and startofpar(prev) break else first = prev @@ -212,7 +212,7 @@ local actions = { list.tail = prev prev.next = nil end - flush_list(first) + flushlist(first) end end end, diff --git a/Master/texmf-dist/tex/context/base/mkiv/typo-cln.lua b/Master/texmf-dist/tex/context/base/mkiv/typo-cln.lua index b9b0e7d6cb7..469859162fb 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/typo-cln.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/typo-cln.lua @@ -10,6 +10,8 @@ if not modules then modules = { } end modules ['typo-cln'] = { -- this case Dream Theaters' Octavium). Of course extensions will take -- more time. +-- This feature is probably never used so we can get rid of it. + local tonumber = tonumber local utfbyte = utf.byte diff --git a/Master/texmf-dist/tex/context/base/mkiv/typo-del.mkiv b/Master/texmf-dist/tex/context/base/mkiv/typo-del.mkiv index 9720326be14..726c6d4bae2 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/typo-del.mkiv +++ b/Master/texmf-dist/tex/context/base/mkiv/typo-del.mkiv @@ -525,10 +525,11 @@ \usedelimitedtextstyleandcolor\c!style\c!color % \begingroup - \edef\p_delimited_left {\delimitedtextparameter{\c!left}}% - \edef\p_delimited_right {\delimitedtextparameter{\c!right}}% - \edef\p_delimited_nextleft {\delimitedtextparameter{\c!nextleft}}% - \edef\p_delimited_nextright{\delimitedtextparameter{\c!nextright}}% + \usealignparameter\delimitedtextparameter + \edef\p_delimited_left {\delimitedtextparameter\c!left}% + \edef\p_delimited_right {\delimitedtextparameter\c!right}% + \edef\p_delimited_nextleft {\delimitedtextparameter\c!nextleft}% + \edef\p_delimited_nextright{\delimitedtextparameter\c!nextright}% % \leftdelimitedtextmark % diff --git a/Master/texmf-dist/tex/context/base/mkiv/typo-dha.lua b/Master/texmf-dist/tex/context/base/mkiv/typo-dha.lua index ac72ae39488..176ed78670b 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/typo-dha.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/typo-dha.lua @@ -62,11 +62,12 @@ local setprop = nuts.setprop local setstate = nuts.setstate local setchar = nuts.setchar -local insert_node_before = nuts.insert_before -local insert_node_after = nuts.insert_after +local insertnodebefore = nuts.insertbefore +local insertnodeafter = nuts.insertafter local remove_node = nuts.remove -local end_of_math = nuts.end_of_math -local start_of_par = nuts.start_of_par +local endofmath = nuts.endofmath + +local startofpar = nuts.startofpar local nodepool = nuts.pool @@ -160,7 +161,7 @@ local function process(start) local id = getid(current) local next = getnext(current) if id == math_code then - current = getnext(end_of_math(next)) + current = getnext(endofmath(next)) elseif getprop(current,"direction") then -- this handles unhbox etc current = next @@ -332,7 +333,7 @@ local function process(start) end textdir = autodir setprop(current,"direction",true) - elseif id == par_code and start_of_par(current) then + elseif id == par_code and startofpar(current) then local direction = getdirection(current) if direction == righttoleft_code then autodir = -1 @@ -376,13 +377,13 @@ local function process(start) local id = getid(current) if id == math_code then -- todo: this might be tricky nesting - current = getnext(end_of_math(getnext(current))) + current = getnext(endofmath(getnext(current))) else local cp = getprop(current,"direction") if cp == "n" then local swap = state == "r" if swap then - head = insert_node_before(head,current,startdir(lefttoright_code)) + head = insertnodebefore(head,current,startdir(lefttoright_code)) end setprop(current,"direction",true) while true do @@ -395,14 +396,14 @@ local function process(start) end end if swap then - head, current = insert_node_after(head,current,stopdir(lefttoright_code)) + head, current = insertnodeafter(head,current,stopdir(lefttoright_code)) end elseif cp == "l" then if state ~= "l" then if state == "r" then - head = insert_node_before(head,last or current,stopdir(righttoleft_code)) + head = insertnodebefore(head,last or current,stopdir(righttoleft_code)) end - head = insert_node_before(head,current,startdir(lefttoright_code)) + head = insertnodebefore(head,current,startdir(lefttoright_code)) state = "l" done = true end @@ -410,9 +411,9 @@ local function process(start) elseif cp == "r" then if state ~= "r" then if state == "l" then - head = insert_node_before(head,last or current,stopdir(lefttoright_code)) + head = insertnodebefore(head,last or current,stopdir(lefttoright_code)) end - head = insert_node_before(head,current,startdir(righttoleft_code)) + head = insertnodebefore(head,current,startdir(righttoleft_code)) state = "r" done = true end @@ -425,9 +426,9 @@ local function process(start) end else if state == "r" then - head = insert_node_before(head,current,stopdir(righttoleft_code)) + head = insertnodebefore(head,current,stopdir(righttoleft_code)) elseif state == "l" then - head = insert_node_before(head,current,stopdir(lefttoright_code)) + head = insertnodebefore(head,current,stopdir(lefttoright_code)) end state = false last = false @@ -441,9 +442,9 @@ local function process(start) local sd = (state == "r" and stopdir(righttoleft_code)) or (state == "l" and stopdir(lefttoright_code)) if sd then if id == glue_code and getsubtype(current) == parfillskip_code then - head = insert_node_before(head,current,sd) + head = insertnodebefore(head,current,sd) else - head = insert_node_after(head,current,sd) + head = insertnodeafter(head,current,sd) end end break diff --git a/Master/texmf-dist/tex/context/base/mkiv/typo-dig.lua b/Master/texmf-dist/tex/context/base/mkiv/typo-dig.lua index a9294a38dae..bbc9311c408 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/typo-dig.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/typo-dig.lua @@ -33,10 +33,9 @@ local setlink = nuts.setlink local setnext = nuts.setnext local setprev = nuts.setprev -local hpack_node = nuts.hpack -local traverse_id = nuts.traverse_id -local insert_node_before = nuts.insert_before -local insert_node_after = nuts.insert_after +local hpacknode = nuts.hpack +local insertnodebefore = nuts.insertbefore +local insertnodeafter = nuts.insertafter local texsetattribute = tex.setattribute local unsetvalue = attributes.unsetvalue @@ -73,16 +72,16 @@ local a_digits = attributes.private("digits") function nodes.aligned(head,start,stop,width,how) if how == "flushright" or how == "middle" then - head, start = insert_node_before(head,start,new_glue(0,65536,65536)) + head, start = insertnodebefore(head,start,new_glue(0,65536,65536)) end if how == "flushleft" or how == "middle" then - head, stop = insert_node_after(head,stop,new_glue(0,65536,65536)) + head, stop = insertnodeafter(head,stop,new_glue(0,65536,65536)) end local prv = getprev(start) local nxt = getnext(stop) setprev(start) setnext(stop) - local packed = hpack_node(start,width,"exactly") -- no directional mess here, just lr + local packed = hpacknode(start,width,"exactly") -- no directional mess here, just lr if prv then setlink(prv,packed) end diff --git a/Master/texmf-dist/tex/context/base/mkiv/typo-drp.lua b/Master/texmf-dist/tex/context/base/mkiv/typo-drp.lua index ddc6d68ae82..79cda3ab96c 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/typo-drp.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/typo-drp.lua @@ -59,10 +59,11 @@ local nodecodes = nodes.nodecodes local nodepool = nuts.pool local new_kern = nodepool.kern -local insert_before = nuts.insert_before -local insert_after = nuts.insert_after +local insertbefore = nuts.insertbefore +local insertafter = nuts.insertafter local remove_node = nuts.remove -local start_of_par = nuts.start_of_par + +local startofpar = nuts.startofpar local nextnode = nuts.traversers.node local nextglyph = nuts.traversers.glyph @@ -72,6 +73,7 @@ local v_default = variables.default local v_margin = variables.margin local v_auto = variables.auto local v_first = variables.first +local v_keep = variables.keep local v_last = variables.last local texget = tex.get @@ -132,6 +134,7 @@ interfaces.implement { -- a page so this has a low priority actions[v_default] = function(head,setting) + local skip = false -- begin of par local first = getnext(head) local indent = false @@ -195,6 +198,9 @@ actions[v_default] = function(head,setting) else -- keep quote etc with initial local next = getnext(first) + if next and method[v_keep] then + skip = first + end if not next then -- don't start with a quote or so return head @@ -244,7 +250,7 @@ actions[v_default] = function(head,setting) local id = getid(current) if id == kern_code then setkern(current,0) - elseif id == glyph_code then + elseif id == glyph_code and skip ~= current then local next = getnext(current) if font then setfont(current,font) @@ -300,7 +306,11 @@ actions[v_default] = function(head,setting) -- local hoffset = width + hoffset + distance + (indent and parindent or 0) for current in nextglyph, first do - setoffsets(current,-hoffset,-voffset) -- no longer - height here + if skip == current then + setoffsets(current,-hoffset,0) + else + setoffsets(current,-hoffset,-voffset) -- no longer - height here + end if current == last then break end @@ -325,7 +335,7 @@ actions[v_default] = function(head,setting) texset("hangindent",hangindent) end if indent then - insert_after(first,first,new_kern(-parindent)) + insertafter(first,first,new_kern(-parindent)) end end return head @@ -334,7 +344,7 @@ end -- we can count ... when all done, we can disable ... function initials.handler(head) - if getid(head) == par_code and start_of_par(head) then + if getid(head) == par_code and startofpar(head) then local settings = getprop(head,a_initial) if settings then disableaction("processors","typesetters.initials.handler") diff --git a/Master/texmf-dist/tex/context/base/mkiv/typo-dua.lua b/Master/texmf-dist/tex/context/base/mkiv/typo-dua.lua index 5e1d4c109ae..dd7515a370a 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/typo-dua.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/typo-dua.lua @@ -83,9 +83,10 @@ local setdirection = nuts.setdirection ----- setattrlist = nuts.setattrlist local remove_node = nuts.remove -local insert_node_after = nuts.insert_after -local insert_node_before = nuts.insert_before -local start_of_par = nuts.start_of_par +local insertnodeafter = nuts.insertafter +local insertnodebefore = nuts.insertbefore + +local startofpar = nuts.startofpar local nodepool = nuts.pool local new_direction = nodepool.direction @@ -337,7 +338,7 @@ local function get_baselevel(head,list,size,direction) -- This is an adapted version: if direction == lefttoright_code or direction == righttoleft_code then return direction, true - elseif getid(head) == par_code and start_of_par(head) then + elseif getid(head) == par_code and startofpar(head) then direction = getdirection(head) if direction == lefttoright_code or direction == righttoleft_code then return direction, true @@ -765,16 +766,16 @@ local function apply_to_list(list,size,head,pardir) local d = new_direction(enddir,true) -- setprop(d,"directions",true) -- setattrlist(d,current) - head = insert_node_before(head,current,d) + head = insertnodebefore(head,current,d) enddir = false end elseif begindir then - if id == par_code and start_of_par(current) then + if id == par_code and startofpar(current) then -- par should always be the 1st node local d = new_direction(begindir) -- setprop(d,"directions",true) -- setattrlist(d,current) - head, current = insert_node_after(head,current,d) + head, current = insertnodeafter(head,current,d) begindir = nil end end @@ -782,7 +783,7 @@ local function apply_to_list(list,size,head,pardir) local d = new_direction(begindir) -- setprop(d,"directions",true) -- setattrlist(d,current) - head = insert_node_before(head,current,d) + head = insertnodebefore(head,current,d) end local skip = entry.skip if skip and skip > 0 then @@ -795,7 +796,7 @@ local function apply_to_list(list,size,head,pardir) local d = new_direction(enddir,true) -- setprop(d,"directions",true) -- setattrlist(d,current) - head, current = insert_node_after(head,current,d) + head, current = insertnodeafter(head,current,d) end if not entry.remove then current = getnext(current) diff --git a/Master/texmf-dist/tex/context/base/mkiv/typo-dub.lua b/Master/texmf-dist/tex/context/base/mkiv/typo-dub.lua index 88b3361da4a..dc45a278513 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/typo-dub.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/typo-dub.lua @@ -71,9 +71,10 @@ local setdirection = nuts.setdirection local setattrlist = nuts.setattrlist local remove_node = nuts.remove -local insert_node_after = nuts.insert_after -local insert_node_before = nuts.insert_before -local start_of_par = nuts.start_of_par +local insertnodeafter = nuts.insertafter +local insertnodebefore = nuts.insertbefore + +local startofpar = nuts.startofpar local nodepool = nuts.pool local new_direction = nodepool.direction @@ -398,7 +399,7 @@ end local function get_baselevel(head,list,size,direction) if direction == lefttoright_code or direction == righttoleft_code then return direction, true - elseif getid(head) == par_code and start_of_par(head) then + elseif getid(head) == par_code and startofpar(head) then direction = getdirection(head) if direction == lefttoright_code or direction == righttoleft_code then return direction, true @@ -898,16 +899,16 @@ local function apply_to_list(list,size,head,pardir) local d = new_direction(enddir,true) -- setprop(d,"directions",true) -- setattrlist(d,current) - head = insert_node_before(head,current,d) + head = insertnodebefore(head,current,d) enddir = false end elseif begindir then - if id == par_code and start_of_par(current) then + if id == par_code and startofpar(current) then -- par should always be the 1st node local d = new_direction(begindir) -- setprop(d,"directions",true) -- setattrlist(d,current) - head, current = insert_node_after(head,current,d) + head, current = insertnodeafter(head,current,d) begindir = nil end end @@ -915,7 +916,7 @@ local function apply_to_list(list,size,head,pardir) local d = new_direction(begindir) -- setprop(d,"directions",true) -- setattrlist(d,current) - head = insert_node_before(head,current,d) + head = insertnodebefore(head,current,d) end local skip = entry.skip if skip and skip > 0 then @@ -928,7 +929,7 @@ local function apply_to_list(list,size,head,pardir) local d = new_direction(enddir,true) -- setprop(d,"directions",true) -- setattrlist(d,current) - head, current = insert_node_after(head,current,d) + head, current = insertnodeafter(head,current,d) end if not entry.remove then current = getnext(current) diff --git a/Master/texmf-dist/tex/context/base/mkiv/typo-duc.lua b/Master/texmf-dist/tex/context/base/mkiv/typo-duc.lua index 6e4f27de257..614defeb687 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/typo-duc.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/typo-duc.lua @@ -76,9 +76,10 @@ local setattrlist = nuts.setattrlist local properties = nodes.properties.data local remove_node = nuts.remove -local insert_node_after = nuts.insert_after -local insert_node_before = nuts.insert_before -local start_of_par = nuts.start_of_par +local insertnodeafter = nuts.insertafter +local insertnodebefore = nuts.insertbefore + +local startofpar = nuts.startofpar local nodepool = nuts.pool local new_direction = nodepool.direction @@ -416,7 +417,7 @@ end local function get_baselevel(head,list,size,direction) if direction == lefttoright_code or direction == righttoleft_code then return direction, true - elseif getid(head) == par_code and start_of_par(head) then + elseif getid(head) == par_code and startofpar(head) then direction = getdirection(head) if direction == lefttoright_code or direction == righttoleft_code then return direction, true @@ -959,18 +960,18 @@ local function apply_to_list(list,size,head,pardir) c = p end -- there is always a par nodes so head will stay - head = insert_node_before(head,c,new_direction(enddir,true)) + head = insertnodebefore(head,c,new_direction(enddir,true)) enddir = false end elseif begindir then - if id == par_code and start_of_par(current) then + if id == par_code and startofpar(current) then -- par should always be the 1st node - head, current = insert_node_after(head,current,new_direction(begindir)) + head, current = insertnodeafter(head,current,new_direction(begindir)) begindir = nil end end if begindir then - head = insert_node_before(head,current,new_direction(begindir)) + head = insertnodebefore(head,current,new_direction(begindir)) end local skip = entry.skip if skip and skip > 0 then @@ -985,7 +986,7 @@ local function apply_to_list(list,size,head,pardir) end end if enddir then - head, current = insert_node_after(head,current,new_direction(enddir,true)) + head, current = insertnodeafter(head,current,new_direction(enddir,true)) end if not entry.remove then current = getnext(current) diff --git a/Master/texmf-dist/tex/context/base/mkiv/typo-fkr.lua b/Master/texmf-dist/tex/context/base/mkiv/typo-fkr.lua index 1fd08526c3a..faaa09891e5 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/typo-fkr.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/typo-fkr.lua @@ -18,7 +18,7 @@ local glyph_code = nodecodes.glyph local fontdata = fonts.hashes.identifiers local getkernpair = fonts.handlers.otf.getkern -local insert_before = nuts.insert_before +local insertbefore = nuts.insertbefore local new_kern = nuts.pool.fontkern local enableaction = nodes.tasks.enableaction @@ -56,7 +56,7 @@ function typesetters.fontkerns.handler(head) kern = (kern1 + kern2)/2 -- mixed end if kern ~= 0 then - head, current = insert_before(head,current,new_kern(kern)) + head = insertbefore(head,current,new_kern(kern)) end lastdata = data else @@ -68,7 +68,7 @@ function typesetters.fontkerns.handler(head) end local kern = getkernpair(lastdata,lastchar,char) if kern ~= 0 then - head, current = insert_before(head,current,new_kern(kern)) + head = insertbefore(head,current,new_kern(kern)) end end lastchar = char diff --git a/Master/texmf-dist/tex/context/base/mkiv/typo-fln.lua b/Master/texmf-dist/tex/context/base/mkiv/typo-fln.lua index 3941e65efaa..0ee77fe870e 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/typo-fln.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/typo-fln.lua @@ -63,15 +63,15 @@ local spaceskip_code = nodes.gluecodes.spaceskip local nextglyph = nuts.traversers.glyph local nextdisc = nuts.traversers.disc -local flush_node_list = nuts.flush_list -local flush_node = nuts.flush_node -local copy_node_list = nuts.copy_list -local insert_node_before = nuts.insert_before -local insert_node_after = nuts.insert_after +local flushnodelist = nuts.flushlist +local flushnode = nuts.flushnode +local copy_node_list = nuts.copylist +local insertnodebefore = nuts.insertbefore +local insertnodeafter = nuts.insertafter local remove_node = nuts.remove local getdimensions = nuts.dimensions local hpack_node_list = nuts.hpack -local start_of_par = nuts.start_of_par +local startofpar = nuts.startofpar local nodepool = nuts.pool local newpenalty = nodepool.penalty @@ -182,7 +182,7 @@ actions[v_line] = function(head,setting) -- temp = typesetters.kerns.handler(temp) -- maybe when enabled -- temp = typesetters.cases.handler(temp) -- maybe when enabled local width = getdimensions(temp) - flush_node_list(temp) + flushnodelist(temp) return width end @@ -230,7 +230,7 @@ actions[v_line] = function(head,setting) end end - flush_node_list(temp) + flushnodelist(temp) local start = head local n = 0 @@ -296,11 +296,11 @@ actions[v_line] = function(head,setting) end end setdisc(disc,pre,post,replace) - flush_node(disc) + flushnode(disc) elseif id == glue_code then n = n + 1 if linebreak ~= n then - head = insert_node_before(head,start,newpenalty(10000)) -- nobreak + head = insertnodebefore(head,start,newpenalty(10000)) -- nobreak end end local next = getnext(start) @@ -308,11 +308,11 @@ actions[v_line] = function(head,setting) if start ~= head then local where = id == glue_code and getprev(start) or start if trace_firstlines then - head, where = insert_node_after(head,where,newpenalty(10000)) -- nobreak - head, where = insert_node_after(head,where,newkern(-65536)) - head, where = insert_node_after(head,where,tracerrule(65536,4*65536,2*65536,"darkblue")) + head, where = insertnodeafter(head,where,newpenalty(10000)) -- nobreak + head, where = insertnodeafter(head,where,newkern(-65536)) + head, where = insertnodeafter(head,where,tracerrule(65536,4*65536,2*65536,"darkblue")) end - head, where = insert_node_after(head,where,newpenalty(-10000)) -- break + head, where = insertnodeafter(head,where,newpenalty(-10000)) -- break end start = next break @@ -372,7 +372,7 @@ end actions[v_default] = actions[v_line] function firstlines.handler(head) - if getid(head) == par_code and start_of_par(head) then + if getid(head) == par_code and startofpar(head) then local settings = getprop(head,a_firstline) if settings then disableaction("processors","typesetters.firstlines.handler") diff --git a/Master/texmf-dist/tex/context/base/mkiv/typo-inj.lua b/Master/texmf-dist/tex/context/base/mkiv/typo-inj.lua index 44b6c0a147e..ef344ec4b0b 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/typo-inj.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/typo-inj.lua @@ -41,26 +41,45 @@ function injectors.reset(name) list[name] = nil end +local function activate(injector,name) + if not injector.active then + ctx_doactivateinjector(name) + injector.active = true + if showall then + -- in case we already enabled tracing + injector.show = true + end + end +end + function injectors.set(name,numbers,command) local injector = list[name] - local actions = injector.actions - local places = settings_to_array(numbers) + local actions = injector.actions + local places = settings_to_array(numbers) for i=1,#places do actions[tonumber(places[i])] = command end - if not injector.active then - ctx_doactivateinjector(name) - injector.active = true - end + -- not: injector.show = true + activate(injector,name) end function injectors.show(name) if not name or name == "" then showall = true + local names = settings_to_array(name) + for name, injector in next, list do + injector.show = true + activate(injector,name) + end else - local list = settings_to_array(name) - for i=1,#list do - list[list[i]].show = true + local names = settings_to_array(name) + for i=1,#names do + local name = names[i] + local injector = list[name] + if injector then + injector.show = true + activate(injector,name) + end end end end diff --git a/Master/texmf-dist/tex/context/base/mkiv/typo-itc.lua b/Master/texmf-dist/tex/context/base/mkiv/typo-itc.lua index c3a583fe494..0cf847846a0 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/typo-itc.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/typo-itc.lua @@ -44,9 +44,9 @@ local setkern = nuts.setkern local getkern = nuts.getkern local getheight = nuts.getheight -local insert_node_after = nuts.insert_after +local insertnodeafter = nuts.insertafter local remove_node = nuts.remove -local end_of_math = nuts.end_of_math +local endofmath = nuts.endofmath local texgetattribute = tex.getattribute local texsetattribute = tex.setattribute @@ -182,7 +182,7 @@ local enablemath = false local enabletext = false local function domath(head,current) - current = end_of_math(current) + current = endofmath(current) local next = getnext(current) if next then local char, id = isglyph(next) @@ -251,7 +251,7 @@ local function domath(head,current) if trace_italics then report_italics("%s italic %p between math %C and non punctuation %C","adding",a,getchar(glyph),char) end - insert_node_after(head,glyph,correction_kern(a,glyph)) + insertnodeafter(head,glyph,correction_kern(a,glyph)) end end end @@ -309,7 +309,7 @@ local function texthandler(head) if font ~= lastfont then if previtalic ~= 0 then if okay(data,current,font,prevchar,previtalic,char,"glyph") then - insert_node_after(prevhead,prev,correction_kern(previtalic,current)) + insertnodeafter(prevhead,prev,correction_kern(previtalic,current)) end elseif previnserted and data then if trace_italics then @@ -320,7 +320,7 @@ local function texthandler(head) -- if replaceitalic ~= 0 then if okay(data,replace,font,replacechar,replaceitalic,char,"replace") then - insert_node_after(replacehead,replace,correction_kern(replaceitalic,current)) + insertnodeafter(replacehead,replace,correction_kern(replaceitalic,current)) end replaceitalic = 0 elseif replaceinserted and data then @@ -332,7 +332,7 @@ local function texthandler(head) -- if postitalic ~= 0 then if okay(data,post,font,postchar,postitalic,char,"post") then - insert_node_after(posthead,post,correction_kern(postitalic,current)) + insertnodeafter(posthead,post,correction_kern(postitalic,current)) end postitalic = 0 elseif postinserted and data then @@ -484,7 +484,7 @@ local function texthandler(head) end previnserted = correction_glue(previtalic,current) -- maybe just add ? else problem with penalties previtalic = 0 - insert_node_after(prevhead,prev,previnserted) + insertnodeafter(prevhead,prev,previnserted) else if replaceitalic ~= 0 then if trace_italics then @@ -492,7 +492,7 @@ local function texthandler(head) end replaceinserted = correction_kern(replaceitalic,current) -- needs to be a kern replaceitalic = 0 - insert_node_after(replacehead,replace,replaceinserted) + insertnodeafter(replacehead,replace,replaceinserted) end if postitalic ~= 0 then if trace_italics then @@ -500,7 +500,7 @@ local function texthandler(head) end postinserted = correction_kern(postitalic,current) -- needs to be a kern postitalic = 0 - insert_node_after(posthead,post,postinserted) + insertnodeafter(posthead,post,postinserted) end end elseif id == math_code then @@ -514,14 +514,14 @@ local function texthandler(head) if mathokay then current = domath(head,current) else - current = end_of_math(current) + current = endofmath(current) end else if previtalic ~= 0 then if trace_italics then report_italics("inserting %p between %s italic %C and whatever",previtalic,"glyph",prevchar) end - insert_node_after(prevhead,prev,correction_kern(previtalic,current)) + insertnodeafter(prevhead,prev,correction_kern(previtalic,current)) previnserted = nil previtalic = 0 replaceinserted = nil @@ -533,7 +533,7 @@ local function texthandler(head) if trace_italics then report_italics("inserting %p between %s italic %C and whatever",replaceitalic,"replace",replacechar) end - insert_node_after(replacehead,replace,correction_kern(replaceitalic,current)) + insertnodeafter(replacehead,replace,correction_kern(replaceitalic,current)) previnserted = nil previtalic = 0 replaceinserted = nil @@ -545,7 +545,7 @@ local function texthandler(head) if trace_italics then report_italics("inserting %p between %s italic %C and whatever",postitalic,"post",postchar) end - insert_node_after(posthead,post,correction_kern(postitalic,current)) + insertnodeafter(posthead,post,correction_kern(postitalic,current)) previnserted = nil previtalic = 0 replaceinserted = nil @@ -562,19 +562,19 @@ local function texthandler(head) if trace_italics then report_italics("inserting %p between %s italic %C and end of list",previtalic,"glyph",prevchar) end - insert_node_after(prevhead,prev,correction_kern(previtalic,current)) + insertnodeafter(prevhead,prev,correction_kern(previtalic,current)) else if replaceitalic ~= 0 then if trace_italics then report_italics("inserting %p between %s italic %C and end of list",replaceitalic,"replace",replacechar) end - insert_node_after(replacehead,replace,correction_kern(replaceitalic,current)) + insertnodeafter(replacehead,replace,correction_kern(replaceitalic,current)) end if postitalic ~= 0 then if trace_italics then report_italics("inserting %p between %s italic %C and end of list",postitalic,"post",postchar) end - insert_node_after(posthead,post,correction_kern(postitalic,current)) + insertnodeafter(posthead,post,correction_kern(postitalic,current)) end end end diff --git a/Master/texmf-dist/tex/context/base/mkiv/typo-krn.lua b/Master/texmf-dist/tex/context/base/mkiv/typo-krn.lua index 489375e9be7..58d6c091ca4 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/typo-krn.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/typo-krn.lua @@ -1,4 +1,4 @@ -if not modules then modules = { } end modules ['typo-krn'] = { + if not modules then modules = { } end modules ['typo-krn'] = { version = 1.001, comment = "companion to typo-krn.mkiv", author = "Hans Hagen, PRAGMA-ADE, Hasselt NL", @@ -24,10 +24,9 @@ local nodepool = nuts.pool -- check what is used local find_node_tail = nuts.tail -local flush_node = nuts.flush_node -local insert_node_before = nuts.insert_before -local insert_node_after = nuts.insert_after -local end_of_math = nuts.end_of_math +local insertnodebefore = nuts.insertbefore +local insertnodeafter = nuts.insertafter +local endofmath = nuts.endofmath local copy_node = nuts.copy local getnext = nuts.getnext @@ -129,7 +128,7 @@ local factors = kerns.factors -- make sure it runs after all others -- there will be a width adaptor field in nodes so this will change -- todo: interchar kerns / disc nodes / can be made faster --- todo: use insert_before etc +-- todo: use insertbefore etc local gluefactor = 4 -- assumes quad = .5 enspace @@ -331,7 +330,7 @@ local function process_list(head,keeptogether,krn,font,okay) -- if kerns then -- print("it happens indeed, basemode kerns not yet injected") -- end - insert_node_before(head,start,new_kern((kerns and kerns[char] or 0) + kern)) + insertnodebefore(head,start,new_kern((kerns and kerns[char] or 0) + kern)) okay = true end end @@ -412,7 +411,7 @@ function kerns.handler(head) setattr(n,a_kerns,attr) -- we took away the attr end setchar(n,unicode[i]) - insert_node_after(head,s,n) + insertnodeafter(head,s,n) s = n end end @@ -444,10 +443,10 @@ function kerns.handler(head) local data = chardata[font][prevchar] local kerns = data and data.kerns local kern = (kerns and kerns[char] or 0) + quaddata[font]*krn - insert_node_before(head,start,kern_injector(fillup,kern)) + insertnodebefore(head,start,kern_injector(fillup,kern)) end else - insert_node_before(head,start,kern_injector(fillup,quaddata[font]*krn)) + insertnodebefore(head,start,kern_injector(fillup,quaddata[font]*krn)) end end prev = start @@ -557,16 +556,16 @@ function kerns.handler(head) -- special case local b, f = closest_bound(start,getprev) if b then - insert_node_before(head,start,kern_injector(fillup,quaddata[f]*krn)) + insertnodebefore(head,start,kern_injector(fillup,quaddata[f]*krn)) end local b, f = closest_bound(start,getnext) if b then - insert_node_after(head,start,kern_injector(fillup,quaddata[f]*krn)) + insertnodeafter(head,start,kern_injector(fillup,quaddata[f]*krn)) end end bound = false elseif id == math_code then - start = end_of_math(start) + start = endofmath(start) bound = false end if start then diff --git a/Master/texmf-dist/tex/context/base/mkiv/typo-lin.lua b/Master/texmf-dist/tex/context/base/mkiv/typo-lin.lua index 84d622e1e9c..40247c45711 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/typo-lin.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/typo-lin.lua @@ -74,8 +74,8 @@ local tonut = nodes.tonut local tonode = nodes.tonode local nexthlist = nuts.traversers.hlist -local insert_before = nuts.insert_before -local insert_after = nuts.insert_after +local insertbefore = nuts.insertbefore +local insertafter = nuts.insertafter local find_tail = nuts.tail local rehpack = nuts.rehpack ----- remove_node = nuts.remove @@ -99,7 +99,7 @@ local setwidth = nuts.setwidth local setprop = nuts.setprop local getprop = nuts.rawprop -- getprop -local effectiveglue = nuts.effective_glue +local effectiveglue = nuts.effectiveglue local nodepool = nuts.pool local new_kern = nodepool.kern @@ -147,9 +147,9 @@ local function finalize(prop,key) -- delayed calculations end local kern1 = new_kern(delta) local kern2 = new_kern(-delta) - head = insert_before(head,head,kern1) - head = insert_before(head,head,pack) - head = insert_before(head,head,kern2) + head = insertbefore(head,head,kern1) + head = insertbefore(head,head,pack) + head = insertbefore(head,head,kern2) setlist(line,head) local where = { pack = pack, @@ -207,11 +207,11 @@ local function normalize(line,islocal) -- assumes prestine lines, nothing pre/ap if addskips then if rightskip and not leftskip then leftskip = new_leftskip(lskip) - head = insert_before(head,head,leftskip) + head = insertbefore(head,head,leftskip) end if leftskip and not rightskip then rightskip = new_rightskip(0) - head, tail = insert_after(head,tail,rightskip) + head, tail = insertafter(head,tail,rightskip) end end if head ~= oldhead then @@ -267,7 +267,7 @@ function paragraphs.normalize(head,islocal) current = getnext(current) end if current then - head, current = insert_before(head,current,new_glue(l_width,l_stretch,l_shrink)) + head, current = insertbefore(head,current,new_glue(l_width,l_stretch,l_shrink)) if head == current then setlist(last,head) end @@ -303,10 +303,10 @@ local function addtoline(n,list,option) if trace_anchors and not line.traced then line.traced = true local rule = new_rule(2*65536,2*65536,1*65536) - local list = insert_before(rule,rule,new_kern(-1*65536)) + local list = insertbefore(rule,rule,new_kern(-1*65536)) addtoline(n,list) local rule = new_rule(2*65536,6*65536,-3*65536) - local list = insert_before(rule,rule,new_kern(-1*65536)) + local list = insertbefore(rule,rule,new_kern(-1*65536)) addtoline(n,list,"internal") else line.traced = true @@ -329,14 +329,14 @@ local function addtoline(n,list,option) -- optimize now .. we can also decide to put each blob in a hlist local kern = new_kern(delta) if tail then - head, tail = insert_after(head,tail,kern) + head, tail = insertafter(head,tail,kern) else head, tail = kern, kern setlist(where.pack,head) end - head, tail = insert_after(head,tail,blob) + head, tail = insertafter(head,tail,blob) local kern = new_kern(-delta) - head, tail = insert_after(head,tail,kern) + head, tail = insertafter(head,tail,kern) -- where.head = head where.tail = tail @@ -366,7 +366,7 @@ local function addanchortoline(n,anchor) end if where.tail then local head = where.head - insert_before(head,head,anchor) + insertbefore(head,head,anchor) else where.tail = anchor end diff --git a/Master/texmf-dist/tex/context/base/mkiv/typo-mar.lua b/Master/texmf-dist/tex/context/base/mkiv/typo-mar.lua index 7e69162a900..56324c79041 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/typo-mar.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/typo-mar.lua @@ -61,9 +61,9 @@ local v_line = variables.line local nuts = nodes.nuts local tonode = nuts.tonode -local hpack_nodes = nuts.hpack -local traverse_id = nuts.traverse_id -local flush_node_list = nuts.flush_list +local hpacknodes = nuts.hpack +local traverseid = nuts.traverseid +local flushnodelist = nuts.flushlist local getnext = nuts.getnext local getprev = nuts.getprev @@ -251,7 +251,7 @@ function margins.save(t) local si = store[i] if si.name == name then local s = remove(store,i) - flush_node_list(s.box) + flushnodelist(s.box) end end else @@ -259,7 +259,7 @@ function margins.save(t) local si = store[i] if si.name == name then local s = remove(store,i) - flush_node_list(s.box) + flushnodelist(s.box) end end end @@ -270,8 +270,8 @@ function margins.save(t) if t.number then local leftmargindistance = texgetdimen("naturalleftmargindistance") local rightmargindistance = texgetdimen("naturalrightmargindistance") - local strutbox = getbox("strutbox") - local _, strutht, strutdp = getwhd(strutbox) + local strutht = texgetdimen("strutht") + local strutdp = texgetdimen("strutdp") -- better make a new table and make t entry in t t.box = content t.n = nofsaved @@ -492,9 +492,9 @@ local function markovershoot(current) -- todo: alleen als offset > line v_anchors = v_anchors + 1 cache[v_anchors] = fastcopy(stacked) local anchor = setanchor(v_anchors) - -- local list = hpack_nodes(setlink(anchor,getlist(current))) -- not ok, we need to retain width + -- local list = hpacknodes(setlink(anchor,getlist(current))) -- not ok, we need to retain width -- local list = setlink(anchor,getlist(current)) -- why not this ... better play safe - local list = hpack_nodes(setlink(anchor,getlist(current)),getwidth(current),"exactly")-- + local list = hpacknodes(setlink(anchor,getlist(current)),getwidth(current),"exactly")-- if trace_marginstack then report_margindata("marking anchor %a",v_anchors) end @@ -790,7 +790,7 @@ local function flushed(scope,parent) -- current is hlist if done then local a = getattr(head,a_linenumber) -- hack .. we need a more decent critical attribute inheritance mechanism if false then - local l = hpack_nodes(head,getwidth(parent),"exactly") + local l = hpacknodes(head,getwidth(parent),"exactly") setlist(parent,l) if a then setattr(l,a_linenumber,a) @@ -905,7 +905,7 @@ end local function finalhandler(head) if nofdelayed > 0 then local current = head - while current and nofdelayed > 0 do -- traverse_list + while current and nofdelayed > 0 do local id = getid(current) if id == hlist_code then -- only lines? local a = getprop(current,"margindata") diff --git a/Master/texmf-dist/tex/context/base/mkiv/typo-pag.lua b/Master/texmf-dist/tex/context/base/mkiv/typo-pag.lua index ea4b1574caf..b6a27f16731 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/typo-pag.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/typo-pag.lua @@ -39,7 +39,7 @@ local setpenalty = nuts.setpenalty local getwidth = nuts.getwidth local getdepth = nuts.getdepth -local insert_node_after = nuts.insert_after +local insertnodeafter = nuts.insertafter local new_penalty = nuts.pool.penalty local trace_keeptogether = false @@ -129,7 +129,7 @@ local function keeptogether(start,a,specification) if getid(previous) == penalty_code then setpenalty(previous,10000) else - insert_node_after(head,previous,new_penalty(10000)) + insertnodeafter(head,previous,new_penalty(10000)) end else break @@ -144,7 +144,7 @@ local function keeptogether(start,a,specification) if getid(previous) == penalty_code then setpenalty(previous,10000) else - insert_node_after(head,previous,new_penalty(10000)) + insertnodeafter(head,previous,new_penalty(10000)) end else break @@ -158,7 +158,7 @@ local function keeptogether(start,a,specification) if getid(previous) == penalty_code then setpenalty(previous,10000) else - insert_node_after(head,previous,new_penalty(10000)) + insertnodeafter(head,previous,new_penalty(10000)) end else break diff --git a/Master/texmf-dist/tex/context/base/mkiv/typo-pnc.lua b/Master/texmf-dist/tex/context/base/mkiv/typo-pnc.lua index 732970884f2..79ca4f57770 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/typo-pnc.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/typo-pnc.lua @@ -21,7 +21,7 @@ local glue_code = nodecodes.glue local spaceskip_code = gluecodes.spaceskip local new_kern = nuts.pool.kern -local insert_after = nuts.insert_after +local insertafter = nuts.insertafter local nextglyph = nuts.traversers.glyph @@ -89,7 +89,7 @@ function periodkerns.handler(head) if factor ~= 0 then fontspace = parameters[getfont(current)].space -- can be sped up inserted = factor * fontspace - insert_after(head,current,new_kern(inserted)) + insertafter(head,current,new_kern(inserted)) if trace then report("inserting space at %C . [%p] %C .",pchar,inserted,nchar) end diff --git a/Master/texmf-dist/tex/context/base/mkiv/typo-rep.lua b/Master/texmf-dist/tex/context/base/mkiv/typo-rep.lua index 2538a014d10..a116a3f5d0f 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/typo-rep.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/typo-rep.lua @@ -38,6 +38,7 @@ local chardata = characters.data local collected = false local a_stripping = attributes.private("stripping") + local texsetattribute = tex.setattribute local unsetvalue = attributes.unsetvalue diff --git a/Master/texmf-dist/tex/context/base/mkiv/typo-rub.lua b/Master/texmf-dist/tex/context/base/mkiv/typo-rub.lua index 6c6ab9a3334..14acfdbd7fb 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/typo-rub.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/typo-rub.lua @@ -49,7 +49,6 @@ local getwidth = nuts.getwidth local setwidth = nuts.setwidth local hpack = nuts.hpack -local insert_after = nuts.insert_after local takebox = nuts.takebox local nexthlist = nuts.traversers.hlist @@ -368,7 +367,7 @@ local function whatever(current) end end -attach = function(head) -- traverse_list +attach = function(head) for current in nexthlist, head do whatever(current) end diff --git a/Master/texmf-dist/tex/context/base/mkiv/typo-spa.lua b/Master/texmf-dist/tex/context/base/mkiv/typo-spa.lua index 78fc2296443..db05963eb8a 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/typo-spa.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/typo-spa.lua @@ -29,10 +29,10 @@ local getprev = nuts.getprev local takeattr = nuts.takeattr local isglyph = nuts.isglyph -local insert_node_before = nuts.insert_before -local insert_node_after = nuts.insert_after +local insertnodebefore = nuts.insertbefore +local insertnodeafter = nuts.insertafter local remove_node = nuts.remove -local end_of_math = nuts.end_of_math +local endofmath = nuts.endofmath local nodepool = nuts.pool local new_penalty = nodepool.penalty @@ -116,8 +116,8 @@ function spacings.handler(head) if trace_spacing then report_spacing("inserting penalty and space before %C (left)",char) end - insert_node_before(head,start,new_penalty(10000)) - insert_node_before(head,start,new_glue(left*quad)) + insertnodebefore(head,start,new_penalty(10000)) + insertnodebefore(head,start,new_glue(left*quad)) end end local next = getnext(start) @@ -152,15 +152,15 @@ function spacings.handler(head) if trace_spacing then report_spacing("inserting penalty and space after %C (right)",char) end - insert_node_after(head,start,new_glue(right*quad)) - insert_node_after(head,start,new_penalty(10000)) + insertnodeafter(head,start,new_glue(right*quad)) + insertnodeafter(head,start,new_penalty(10000)) end end end end end elseif id == math_code then - start = end_of_math(start) -- weird, can return nil .. no math end? + start = endofmath(start) -- weird, can return nil .. no math end? end if start then start = getnext(start) diff --git a/Master/texmf-dist/tex/context/base/mkiv/typo-sus.lua b/Master/texmf-dist/tex/context/base/mkiv/typo-sus.lua index bb5b03912ce..993f4c7982d 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/typo-sus.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/typo-sus.lua @@ -57,9 +57,9 @@ local setattr = nuts.setattr local setlist = nuts.setlist local setcolor = nodes.tracers.colors.set -local insert_before = nuts.insert_before -local insert_after = nuts.insert_after -local end_of_math = nuts.end_of_math +local insertbefore = nuts.insertbefore +local insertafter = nuts.insertafter +local endofmath = nuts.endofmath local nodepool = nuts.pool @@ -123,22 +123,22 @@ local function mark(head,current,id,color) local width = getwidth(current) local rule = new_rule(width) local kern = new_kern(-width) - head = insert_before(head,current,rule) - head = insert_before(head,current,kern) + head = insertbefore(head,current,rule) + head = insertbefore(head,current,kern) setcolor(rule,color) -- elseif id == kern_code then -- local width = getkern(current) -- local rule = new_rule(width) -- local kern = new_kern(-width) - -- head = insert_before(head,current,rule) - -- head = insert_before(head,current,kern) + -- head = insertbefore(head,current,rule) + -- head = insertbefore(head,current,kern) -- setcolor(rule,color) else local width, height, depth = getwhd(current) local extra = fonts.hashes.xheights[getfont(current)] / 2 local rule = new_rule(width,height+extra,depth+extra) local hlist = new_hlist(rule) - head = insert_before(head,current,hlist) + head = insertbefore(head,current,hlist) setcolor(rule,color) setcolor(current,"white") end @@ -226,7 +226,7 @@ function typesetters.marksuspects(head) end current = getnext(current) elseif id == math_code then - current = getnext(end_of_math(current)) + current = getnext(endofmath(current)) elseif id == glue_code then local a = getattr(current,a_characters) if a then @@ -270,7 +270,7 @@ local function showsuspects(head) head, current = mark(head,current,id,colors[a]) end elseif id == math_code then - current = end_of_math(current) + current = endofmath(current) elseif id == hlist_code or id == vlist_code then local list = getlist(current) if list then diff --git a/Master/texmf-dist/tex/context/base/mkiv/typo-tal.lua b/Master/texmf-dist/tex/context/base/mkiv/typo-tal.lua index db605a4916d..b827b8ef9ab 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/typo-tal.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/typo-tal.lua @@ -47,8 +47,8 @@ local isglyph = nuts.isglyph local setattr = nuts.setattr local setchar = nuts.setchar -local insert_node_before = nuts.insert_before -local insert_node_after = nuts.insert_after +local insertnodebefore = nuts.insertbefore +local insertnodeafter = nuts.insertafter local nextglyph = nuts.traversers.glyph local getdimensions = nuts.dimensions @@ -376,46 +376,46 @@ function characteralign.handler(head,where) local new_kern = trace_split and traced_kern or new_kern if b_start then if before < maxbefore then - head = insert_node_before(head,b_start,new_kern(maxbefore-before)) + head = insertnodebefore(head,b_start,new_kern(maxbefore-before)) end if not c then -- print("[before]") if dataset.hasseparator then local width = fontcharacters[getfont(b_start)][separator].width - insert_node_after(head,b_stop,new_kern(maxafter+width)) + insertnodeafter(head,b_stop,new_kern(maxafter+width)) end elseif a_start then -- print("[before] [separator] [after]") if after < maxafter then - insert_node_after(head,a_stop,new_kern(maxafter-after)) + insertnodeafter(head,a_stop,new_kern(maxafter-after)) end else -- print("[before] [separator]") if maxafter > 0 then - insert_node_after(head,c,new_kern(maxafter)) + insertnodeafter(head,c,new_kern(maxafter)) end end elseif a_start then if c then -- print("[separator] [after]") if maxbefore > 0 then - head = insert_node_before(head,c,new_kern(maxbefore)) + head = insertnodebefore(head,c,new_kern(maxbefore)) end else -- print("[after]") local width = fontcharacters[getfont(b_stop)][separator].width - head = insert_node_before(head,a_start,new_kern(maxbefore+width)) + head = insertnodebefore(head,a_start,new_kern(maxbefore+width)) end if after < maxafter then - insert_node_after(head,a_stop,new_kern(maxafter-after)) + insertnodeafter(head,a_stop,new_kern(maxafter-after)) end elseif c then -- print("[separator]") if maxbefore > 0 then - head = insert_node_before(head,c,new_kern(maxbefore)) + head = insertnodebefore(head,c,new_kern(maxbefore)) end if maxafter > 0 then - insert_node_after(head,c,new_kern(maxafter)) + insertnodeafter(head,c,new_kern(maxafter)) end end return head diff --git a/Master/texmf-dist/tex/context/base/mkiv/typo-wrp.lua b/Master/texmf-dist/tex/context/base/mkiv/typo-wrp.lua index f2ca43b56ef..4ba3c3afff0 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/typo-wrp.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/typo-wrp.lua @@ -53,6 +53,8 @@ local report = logs.reporter("paragraphs","wrappers") -- If needed we can extend this checker for other cases but then we will also -- use attributes. +-- we can actually do better in lmtx + local function remove_dangling_crlf(head,tail) if head and tail and getid(tail) == glue_code and getsubtype(tail) == parfillskip_code then tail = getprev(tail) diff --git a/Master/texmf-dist/tex/context/base/mkiv/typo-wrp.mkiv b/Master/texmf-dist/tex/context/base/mkiv/typo-wrp.mkiv index 4e9ecf2e128..3a3bb4fafad 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/typo-wrp.mkiv +++ b/Master/texmf-dist/tex/context/base/mkiv/typo-wrp.mkiv @@ -49,7 +49,7 @@ \ignorespaces} \unexpanded\def\spac_crlf_placeholder - {\strut} + {\wordboundary\strut} % or \endstrut \unexpanded\def\spac_crlf_placeholder_show {\wordboundary diff --git a/Master/texmf-dist/tex/context/base/mkiv/util-deb.lua b/Master/texmf-dist/tex/context/base/mkiv/util-deb.lua index bd94b6d01ed..10e5731b036 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/util-deb.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/util-deb.lua @@ -346,3 +346,25 @@ debugger.showtraceback = showtraceback -- debug.showtraceback = showtraceback -- showtraceback() + +-- For now also here because we want it in mtxrun (taken from lmt file): + +if luac then + + local show, dump = luac.print, string.dump + + function luac.inspect(v) + if type(v) == "function" then + local ok, str = xpcall(dump,function() end,v) + if ok then + v = str + end + end + if type(v) == "string" then + show(v,true) + else + print(v) + end + end + +end diff --git a/Master/texmf-dist/tex/context/base/mkiv/util-evo-imp-server.lua b/Master/texmf-dist/tex/context/base/mkiv/util-evo-imp-server.lua index f4dd5b3f7fc..b2672012825 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/util-evo-imp-server.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/util-evo-imp-server.lua @@ -65,6 +65,13 @@ function evohome.server(specification) local port = specification.port or (presets.server and presets.server.port) or 8068 local host = specification.host or (presets.server and presets.server.host) or "*" + if presets.initial == "alloff" then + report("turning all zones off") + evohome.actions.alloff(presets) + else + report("using default initial state") + end + package.extraluapath(presets.filepath) local socket = socket or require("socket") diff --git a/Master/texmf-dist/tex/context/base/mkiv/util-evo.lua b/Master/texmf-dist/tex/context/base/mkiv/util-evo.lua index dfb395e082b..75c2282f0f2 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/util-evo.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/util-evo.lua @@ -44,7 +44,7 @@ local formatters = string.formatters local floor, div = math.floor, math.div local resultof, ostime, osdate, ossleep = os.resultof, os.time, os.date, os.sleep local jsontolua, jsontostring = json.tolua, json.tostring -local savetable, loadtable, sortedkeys = table.save, table.load, table.sortedkeys +local savetable, loadtable, sortedkeys, sortedhash = table.save, table.load, table.sortedkeys, table.sortedhash local setmetatableindex, setmetatablenewindex = table.setmetatableindex, table.setmetatablenewindex local replacer = utilities.templates.replacer local lower = string.lower -- no utf support yet (encoding needs checking in evohome) @@ -172,9 +172,11 @@ local function loadedtable(filename) return { } end -local function savedtable(filename,data) +local function savedtable(filename,data,trace) savetable(filename,data) - report("file %a saved",filename) + if trace then + report("file %a saved",filename) + end end local function loadpresets(filename) @@ -823,11 +825,12 @@ local function settask(presets,when,tag,action) done = false, category = category, action = action, + tag = tag, } else list[tag] = nil end - savedtable(presets.files.schedules,list) + savedtable(presets.files.schedules,list,false) end end @@ -990,6 +993,15 @@ local function poller(presets) return step, process, presets end +local function alloff(presets) + local zones = getzonenames(presets) + if zones then + for i=1,#zones do + setzonestate(presets,zones[i],5,true) + end + end +end + -- evohome = { @@ -1023,6 +1035,8 @@ evohome = { schedule = schedule, -- presets, name permanent = permanent, -- presets, name -- + alloff = alloff, -- presets + -- settomorrow = settomorrow, -- presets, tag, function resettomorrow = resettomorrow, -- presets, tag tomorrowset = tomorrowset, -- presets, tag diff --git a/Master/texmf-dist/tex/context/base/mkiv/util-fil.lua b/Master/texmf-dist/tex/context/base/mkiv/util-fil.lua index 183f7bea81f..0b20264ecc9 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/util-fil.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/util-fil.lua @@ -203,23 +203,23 @@ function files.readinteger4le(f) end function files.readfixed2(f) - local a, b = byte(f:read(2),1,2) - if a >= 0x80 then - tonumber((a - 0x100) .. "." .. b) - else - tonumber(( a ) .. "." .. b) + local n1, n2 = byte(f:read(2),1,2) + if n1 >= 0x80 then + n1 = n1 - 0x100 end + return n1 + n2/0xFF end -- (real) (n>>16) + ((n&0xffff)/65536.0)) but no cast in lua (we could use unpack) function files.readfixed4(f) local a, b, c, d = byte(f:read(4),1,4) - if a >= 0x80 then - tonumber((0x100 * a + b - 0x10000) .. "." .. (0x100 * c + d)) - else - tonumber((0x100 * a + b ) .. "." .. (0x100 * c + d)) + local n1 = 0x100 * a + b + local n2 = 0x100 * c + d + if n1 >= 0x8000 then + n1 = n1 - 0x10000 end + return n1 + n2/0xFFFF end -- (real) ((n<<16)>>(16+14)) + ((n&0x3fff)/16384.0)) diff --git a/Master/texmf-dist/tex/context/base/mkiv/util-jsn.lua b/Master/texmf-dist/tex/context/base/mkiv/util-jsn.lua index 8da35189793..6d12c520aeb 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/util-jsn.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/util-jsn.lua @@ -17,6 +17,10 @@ if not modules then modules = { } end modules ['util-jsn'] = { -- -- Upgraded for handling the somewhat more fax server templates. +if utilities and utilities.json then + return json +end + local P, V, R, S, C, Cc, Cs, Ct, Cf, Cg = lpeg.P, lpeg.V, lpeg.R, lpeg.S, lpeg.C, lpeg.Cc, lpeg.Cs, lpeg.Ct, lpeg.Cf, lpeg.Cg local lpegmatch = lpeg.match local format, gsub = string.format, string.gsub @@ -265,6 +269,8 @@ do k = lpegmatch(escaper,k) or k v = lpegmatch(escaper,v) or v n = n + 1 t[n] = f_key_val_str(depth,k,v) + elseif i > 1 then + n = n - 1 end elseif tv == "table" then local l = #v @@ -280,6 +286,9 @@ do end elseif next(v) then tojsonpp(v,k,depth,level+1,0) + elseif i > 1 then + n = n - 1 + -- we don't know if we have a hash or string end elseif tv == "boolean" then if tk == "number" then @@ -297,6 +306,8 @@ do else t[n] = f_key_val_nop(depth,k) end + elseif i > 1 then + n = n - 1 end else if tk == "number" then @@ -306,6 +317,8 @@ do k = lpegmatch(escaper,k) or k n = n + 1 t[n] = f_key_val_null(depth,k) + elseif i > 1 then + n = n - 1 end end end @@ -440,4 +453,8 @@ end -- inspect(l) -- print(s==l.s) +-- if not package.loaded.json then +-- package.loaded.json = json +-- end + return json diff --git a/Master/texmf-dist/tex/context/base/mkiv/util-lib-imp-gm.lua b/Master/texmf-dist/tex/context/base/mkiv/util-lib-imp-gm.lua index d1ffde87903..99c62451c81 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/util-lib-imp-gm.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/util-lib-imp-gm.lua @@ -6,6 +6,10 @@ if not modules then modules = { } end modules ['util-lib-imp-gm'] = { license = "see context related readme files", } +if true then + logs.report("warning","swiglib is no longer supported") +end + local graphicmagick = utilities.graphicmagick or { } utilities.graphicmagick = graphicmagick diff --git a/Master/texmf-dist/tex/context/base/mkiv/util-lib-imp-gs.lua b/Master/texmf-dist/tex/context/base/mkiv/util-lib-imp-gs.lua index 0eceda7aa5d..305f4103b19 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/util-lib-imp-gs.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/util-lib-imp-gs.lua @@ -6,6 +6,10 @@ if not modules then modules = { } end modules ['util-lib-imp-gs'] = { license = "see context related readme files", } +if true then + logs.report("warning","swiglib is no longer supported") +end + local insert = table.insert local formatters = string.formatters diff --git a/Master/texmf-dist/tex/context/base/mkiv/util-lib.lua b/Master/texmf-dist/tex/context/base/mkiv/util-lib.lua index be763d92e91..77ec7cd7e20 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/util-lib.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/util-lib.lua @@ -245,6 +245,8 @@ end resolvers.locatelib = locate -- for now +-- swiglib is no longer officially supported + do local report_swiglib = logs.reporter("swiglib") diff --git a/Master/texmf-dist/tex/context/base/mkiv/util-prs.lua b/Master/texmf-dist/tex/context/base/mkiv/util-prs.lua index 6d2f8c19e06..635b610e072 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/util-prs.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/util-prs.lua @@ -55,9 +55,13 @@ local nobracket = 1 - (lbracket + rbracket) local escape, left, right = P("\\"), P('{'), P('}') +-- lpegpatterns.balanced = P { +-- [1] = ((escape * (left+right)) + (1 - (left+right)) + V(2))^0, +-- [2] = left * V(1) * right +-- } lpegpatterns.balanced = P { - [1] = ((escape * (left+right)) + (1 - (left+right)) + V(2))^0, - [2] = left * V(1) * right + ((escape * (left+right)) + (1 - (left+right)) + V(2))^0, + left * V(1) * right } local nestedbraces = P { lbrace * (nobrace + V(1))^0 * rbrace } @@ -67,11 +71,12 @@ local spaces = space^0 local argument = Cs((lbrace/"") * ((nobrace + nestedbraces)^0) * (rbrace/"")) local content = (1-endofstring)^0 -lpegpatterns.nestedbraces = nestedbraces -- no capture -lpegpatterns.nestedparents = nestedparents -- no capture -lpegpatterns.nested = nestedbraces -- no capture -lpegpatterns.argument = argument -- argument after e.g. = -lpegpatterns.content = content -- rest after e.g = +lpegpatterns.nestedbraces = nestedbraces -- no capture +lpegpatterns.nestedparents = nestedparents -- no capture +lpegpatterns.nestedbrackets = nestedbrackets -- no capture +lpegpatterns.nested = nestedbraces -- no capture +lpegpatterns.argument = argument -- argument after e.g. = +lpegpatterns.content = content -- rest after e.g = local value = lbrace * C((nobrace + nestedbraces)^0) * rbrace + C((nestedbraces + (1-comma))^0) @@ -568,9 +573,9 @@ end -- "1","2","3","4" -- "5","6","7","8" -- ]] --- + -- local mycsvsplitter = parsers.csvsplitter { numbers = true } --- + -- local list = mycsvsplitter(crap) inspect(list) -- and this is a slightly patched version of a version posted by Philipp Gesang @@ -617,12 +622,6 @@ end -- local list, names = mycsvsplitter(crap,true) inspect(list) inspect(names) -- local list, names = mycsvsplitter(crap) inspect(list) inspect(names) --- parsers.stepper("1,7-",9,function(i) print(">>>",i) end) --- parsers.stepper("1-3,7,8,9") --- parsers.stepper("1-3,6,7",function(i) print(">>>",i) end) --- parsers.stepper(" 1 : 3, ,7 ") --- parsers.stepper("1:4,9:13,24:*",30) - local function ranger(first,last,n,action) if not first then -- forget about it @@ -639,7 +638,7 @@ local function ranger(first,last,n,action) end end -local cardinal = lpegpatterns.cardinal / tonumber +local cardinal = (lpegpatterns.hexadecimal + lpegpatterns.cardinal) / tonumber local spacers = lpegpatterns.spacer^0 local endofstring = lpegpatterns.endofstring @@ -650,14 +649,29 @@ local stepper = spacers * ( cardinal * ( spacers * S(":-") * spacers * ( cardin * Carg(1) * Carg(2) / ranger * S(", ")^0 )^1 * endofstring -- we're sort of strict (could do without endofstring) function parsers.stepper(str,n,action) + local ts = type(str) if type(n) == "function" then - lpegmatch(stepper,str,1,false,n or print) - else + if ts == "number" then + n(str) + elseif ts == "table" then + for i=1,#str do + n(str[i]) + end + else + lpegmatch(stepper,str,1,false,n or print) + end + elseif ts == "string" then lpegmatch(stepper,str,1,n,action or print) end end --- +-- parsers.stepper("1,7-",9,function(i) print(">>>",i) end) +-- parsers.stepper("1-3,7,8,9") +-- parsers.stepper("1-3,6,7",function(i) print(">>>",i) end) +-- parsers.stepper(" 1 : 3, ,7 ") +-- parsers.stepper("1:4,9:13,24:*",30) +-- parsers.stepper(1,print) +-- parsers.stepper({1,3,4},print) local pattern_math = Cs((P("%")/"\\percent " + P("^") * Cc("{") * lpegpatterns.integer * Cc("}") + anything)^0) local pattern_text = Cs((P("%")/"\\percent " + (P("^")/"\\high") * Cc("{") * lpegpatterns.integer * Cc("}") + anything)^0) @@ -681,7 +695,7 @@ local spaces = lpegpatterns.space^0 local dummy = function() end setmetatableindex(cache,function(t,k) - local separator = P(k) + local separator = S(k) -- was P local value = (1-separator)^0 local pattern = spaces * C(value) * separator^0 * Cp() t[k] = pattern @@ -801,11 +815,20 @@ local pattern = Cf( Ct("") * ( Cg(Cc("day") * cardinal) * S("-/") * Cg(Cc("month") * cardinal) * S("-/") * Cg(Cc("year") * p_year) + ) + + ( Cg(Cc("year") * p_year) + * S("-/") * Cg(Cc("month") * cardinal) + ) + + ( Cg(Cc("month") * cardinal) + * S("-/") * Cg(Cc("year") * p_year) ) ) - * P(" ") * Cg(Cc("hour") * cardinal) + * ( + P(" ") * Cg(Cc("hour") * cardinal) * P(":") * Cg(Cc("min") * cardinal) * (P(":") * Cg(Cc("sec") * cardinal))^-1 + + P(-1) ) + , rawset) lpegpatterns.splittime = pattern @@ -814,6 +837,8 @@ function parsers.totime(str) return lpegmatch(pattern,str) end +-- inspect(parsers.totime("2019-03-05")) +-- inspect(parsers.totime("2019-03-05 12:12:12")) -- print(os.time(parsers.totime("2019-03-05 12:12:12"))) -- print(os.time(parsers.totime("2019/03/05 12:12:12"))) -- print(os.time(parsers.totime("05-03-2019 12:12:12"))) diff --git a/Master/texmf-dist/tex/context/base/mkiv/util-rnd.lua b/Master/texmf-dist/tex/context/base/mkiv/util-rnd.lua new file mode 100644 index 00000000000..7504965b21a --- /dev/null +++ b/Master/texmf-dist/tex/context/base/mkiv/util-rnd.lua @@ -0,0 +1,116 @@ +if not modules then modules = { } end modules ['util-rnd'] = { + version = 1.001, + comment = "companion to luat-lib.mkiv", + author = "Tamara, Adriana, Tomáš Hála & Hans Hagen", + copyright = "ConTeXt Development Team", -- umbrella + license = "see context related readme files" +} + +-- The rounding code is a variant on Tomáš Hála <tomas.hala@mendelu.cz; mendelu@thala.cz> +-- code that is used in the statistical module. We use local variables and a tolerant name +-- resolver that also permits efficient local aliases. With code like this one +-- really have to make sure that locals are used because changing the rounding +-- can influence other code. + +local floor, ceil, pow = math.floor, math.ceil, math.pow +local rawget, type = rawget, type +local gsub, lower = string.gsub, string.lower + +local rounding = { } + +local methods = { + no = function(num) + -- no rounding + return num + end, + up = function(num,coef) + -- ceiling rounding + coef = coef and pow(10,coef) or 1 + return ceil(num * coef) / coef + end, + down = function(num,coef) + -- floor rounding + coef = coef and pow(10,coef) or 1 + return floor(num * coef) / coef + end, + halfup = function(num,coef) + -- rounds decimal numbers as usual, numbers with 0.5 up, too (e.g. number -0.5 will be rounded to 0) + coef = coef and pow(10,coef) or 1 + return floor(num * coef + 0.5) / coef + end, + halfdown = function(num,coef) + -- rounds decimal numbers as usual, numbers with 0.5 down, too (e.g. number 0.5 will be rounded to 0) + coef = coef and pow(10,coef) or 1 + return ceil(num * coef -0.5) / coef + end, + halfabsup = function(num,coef) + -- rounds deciaml numbers as usual, numbers with 0.5 away from zero, e.g. numbers -0.5 and 0.5 will be rounded to -1 and 1 + coef = coef and pow(10,coef) or 1 + return (num >= 0 and floor(num * coef + 0.5) or ceil(num * coef - 0.5)) / coef + end, + halfabsdown = function(num,coef) + -- rounds deciaml numbers as usual, numbers with 0.5 towards zero, e.g. numbers -0.5 and 0.5 will be rounded both to 0 + coef = coef and pow(10,coef) or 1 + return (num < 0 and floor(num * coef + 0.5) or ceil(num * coef - 0.5)) / coef + end, + halfeven = function(num,coef) + -- rounds deciaml numbers as usual, numbers with 0.5 to the nearest even, e.g. numbers 1.5 and 2.5 will be rounded both to 2 + coef = coef and pow(10,coef) or 1 + num = num*coef + return floor(num + (((num - floor(num)) ~= 0.5 and 0.5) or ((floor(num) % 2 == 1) and 1) or 0)) / coef + end, + halfodd = function(num,coef) + -- rounds deciaml numbers as usual, numbers with 0.5 to the nearest odd (e.g. numbers 1.5 and 2.5 will be rounded to 1 and 3 + coef = coef and pow(10,coef) or 1 + num = num * coef + return floor(num + (((num - floor(num)) ~= 0.5 and 0.5) or ((floor(num) % 2 == 1) and 0) or 1)) / coef + end, +} + +methods.default = methods.halfup + +rounding.methods = table.setmetatableindex(methods,function(t,k) + local s = gsub(lower(k),"[^a-z]","") + local v = rawget(t,s) + if not v then + v = t.halfup + end + t[k] = v + return v +end) + +-- If needed I can make a high performance one. + +local defaultmethod = methods.halfup + +rounding.round = function(num,dec,mode) + if type(dec) == "string" then + mode = dec + dec = 1 + end + return (mode and methods[mode] or defaultmethods)(num,dec) +end + +number.rounding = rounding + +-- -- Tomáš' test numbers: + +-- local list = { 5.49, 5.5, 5.51, 6.49, 6.5, 6.51, 0.5, 12.45 } +-- +-- for method, round in table.sortedhash(number.rounding.methods) do +-- for i=1,#list do +-- local n = list[i] +-- print(n,method,round(n,k),round(n,k,3)) +-- end +-- end +-- +-- local myround = number.rounding.methods["HALF ABS DOWN"] +-- +-- for i=1,#list do +-- local n = list[i] +-- print(n,"Half Abs Down",number.rounding.round(n,1,"Half Abs Down")) +-- print(n,"HALF_ABS_DOWN",number.rounding.round(n,1,"HALF_ABS_DOWN")) +-- print(n,"HALF_ABS_DOWN",myround(n,1)) +-- end + +return rounding diff --git a/Master/texmf-dist/tex/context/base/mkiv/util-sac.lua b/Master/texmf-dist/tex/context/base/mkiv/util-sac.lua index a8851f4c835..36daef81673 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/util-sac.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/util-sac.lua @@ -262,12 +262,11 @@ function streams.readfixed2(f) local i = f[2] local j = i + 1 f[2] = j + 1 - local a, b = byte(f[1],i,j) - if a >= 0x80 then - return tonumber((a - 0x100) .. "." .. b) or 0 - else - return tonumber((a ) .. "." .. b) or 0 + local n1, n2 = byte(f[1],i,j) + if n1 >= 0x80 then + n1 = n1 - 0x100 end + return n1 + n2/0xFF end function streams.readfixed4(f) @@ -275,11 +274,12 @@ function streams.readfixed4(f) local j = i + 3 f[2] = j + 1 local a, b, c, d = byte(f[1],i,j) - if a >= 0x80 then - return tonumber((0x100 * a + b - 0x10000) .. "." .. (0x100 * c + d)) or 0 - else - return tonumber((0x100 * a + b ) .. "." .. (0x100 * c + d)) or 0 + local n1 = 0x100 * a + b + local n2 = 0x100 * c + d + if n1 >= 0x8000 then + n1 = n1 - 0x10000 end + return n1 + n2/0xFFFF end if bit32 then @@ -377,10 +377,10 @@ if sio and sio.readcardinal2 then f[2] = i + 4 return readfixed4(f[1],i) end - function streams.read2dot4(f) + function streams.read2dot14(f) local i = f[2] f[2] = i + 2 - return read2dot4(f[1],i) + return read2dot14(f[1],i) end function streams.readbytes(f,n) local i = f[2] @@ -507,10 +507,10 @@ do function io.newreader(str,method) local f, m if method == "string" then - f = openstring(str) + f = openstring(str,true) m = streams elseif method == "stream" then - f = openstream(str) + f = openstream(str,true) m = streams else f = openfile(str,"rb") @@ -522,6 +522,7 @@ do __index = function(t,k) local r = m[k] if k == "close" then + -- maybe use __toclose if f then m.close(f) f = nil @@ -543,3 +544,39 @@ do end end + +if bit32 and not streams.tocardinal1 then + + local extract = bit32.extract + local char = string.char + + streams.tocardinal1 = char + function streams.tocardinal2(n) return char(extract( 8,8),extract( 0,8)) end + function streams.tocardinal3(n) return char(extract(16,8),extract( 8,8),extract(0,8)) end + function streams.tocardinal4(n) return char(extract(24,8),extract(16,8),extract(8,8),extract(0,8)) end + + streams.tocardinal1le = char + function streams.tocardinal2le(n) return char(extract(0,8),extract(8,8)) end + function streams.tocardinal3le(n) return char(extract(0,8),extract(8,8),extract(16,8)) end + function streams.tocardinal4le(n) return char(extract(0,8),extract(8,8),extract(16,8),extract(24,8)) end + +end + +if not streams.readcstring then + + local readchar = streams.readchar + local concat = table.concat + + function streams.readcstring(f) + local t = { } + while true do + local c = readchar(f) + if c and c ~= "\0" then + t[#t+1] = c + else + return concat(t) + end + end + end + +end diff --git a/Master/texmf-dist/tex/context/base/mkiv/util-sbx.lua b/Master/texmf-dist/tex/context/base/mkiv/util-sbx.lua index cd282009e0a..066ca30237e 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/util-sbx.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/util-sbx.lua @@ -330,7 +330,7 @@ local function validcommand(name,program,template,checkers,defaults,variables,re -- for now, we will have a "flags" checker else local checker = validators[chktype] - if checker then + if checker and type(value) == "string" then value = checker(unquoted(value),strict) if value then variables[variable] = optionalquoted(value) @@ -350,7 +350,7 @@ local function validcommand(name,program,template,checkers,defaults,variables,re local chktype = checkers[variable] if chktype == "verbose" then -- for now, we will have a "flags" checker - else + elseif type(default) == "string" then local checker = validators[chktype] if checker then default = checker(unquoted(default),strict) diff --git a/Master/texmf-dist/tex/context/base/mkiv/util-sci.lua b/Master/texmf-dist/tex/context/base/mkiv/util-sci.lua index 778991ea69d..67528c74e0a 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/util-sci.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/util-sci.lua @@ -23,6 +23,7 @@ do lexerroot = file.dirname(resolvers.findfile("scite-context-lexer.lua")) -- end if lfs.isdir(lexerroot) then + -- pushluapath package.extraluapath(lexerroot) package.extraluapath(lexerroot.."/themes") package.extraluapath(lexerroot.."/data") @@ -58,14 +59,14 @@ local knownlexers = { -- todo: pat/hyp ori } -lexer = nil -- main lexer, global (for the moment needed for themes) +lexers = nil -- main lexer, global (for the moment needed for themes) local function loadscitelexer() - if not lexer then - lexer = require("scite-context-lexer") - require("scite-context-theme") -- uses lexer - if lexer then - lexer.context.disablewordcheck() + if not lexers then + lexers = require("scite-context-lexer") + lexers.styles = require("scite-context-theme") -- uses lexer + if lexers then + (lexers.disablewordcheck or lexers.context.disablewordcheck)() end end return lexer @@ -74,7 +75,7 @@ end local loadedlexers = setmetatableindex(function(t,k) local l = knownlexers[k] or k loadscitelexer() - local v = lexer.load(formatters["scite-context-lexer-%s"](l)) + local v = lexers.load(formatters["scite-context-lexer-%s"](l)) t[l] = v t[k] = v return v @@ -124,7 +125,7 @@ local function exportcsslexing() return (#f == 0 and f[1] == 0) or ((f[1] == f[2]) and (f[2] == f[3]) and (f[3] == 0)) end local result, r = { }, 0 - for k, v in table.sortedhash(lexer.context.styles) do + for k, v in table.sortedhash(lexers.context.styles) do local bold = v.bold local fore = v.fore r = r + 1 @@ -149,7 +150,7 @@ local function exportwhites() end local function exportstyled(lexer,text,numbered) - local result = lexer.lex(lexer,text,0) + local result = lexers.lex(lexer,text,0) local start = 1 local whites = exportwhites() local buffer = { } diff --git a/Master/texmf-dist/tex/context/base/mkiv/util-sql-imp-ffi.lua b/Master/texmf-dist/tex/context/base/mkiv/util-sql-imp-ffi.lua index f440695023d..cbfd7bcf5f6 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/util-sql-imp-ffi.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/util-sql-imp-ffi.lua @@ -8,8 +8,7 @@ if not modules then modules = { } end modules ['util-sql-imp-ffi'] = { -- I looked at luajit-mysql to see how the ffi mapping was done but it didn't work -- out that well (at least not on windows) but I got the picture. As I have somewhat --- different demands I simplified / redid the ffi bit and just took the swiglib --- variant and adapted that. +-- different demands I simplified. local tonumber = tonumber local concat = table.concat diff --git a/Master/texmf-dist/tex/context/base/mkiv/util-sql-imp-sqlite.lua b/Master/texmf-dist/tex/context/base/mkiv/util-sql-imp-sqlite.lua index a88035f683a..781c92c896d 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/util-sql-imp-sqlite.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/util-sql-imp-sqlite.lua @@ -22,20 +22,6 @@ local preparetemplate = helpers.preparetemplate local setmetatable = setmetatable local formatters = string.formatters ------ sqlite = require("swiglib.sqlite.core") ------ swighelpers = require("swiglib.helpers.core") ------ ------ get_list_item = sqlite.char_p_array_getitem ------ is_okay = sqlite.SQLITE_OK ------ execute_query = sqlite.sqlite3_exec_lua_callback ------ error_message = sqlite.sqlite3_errmsg ------ ------ new_db = sqlite.new_sqlite3_p_array ------ open_db = sqlite.sqlite3_open ------ get_db = sqlite.sqlite3_p_array_getitem ------ close_db = sqlite.sqlite3_close ------ dispose_db = sqlite.delete_sqlite3_p_array - local ffi = require("ffi") ffi.cdef [[ diff --git a/Master/texmf-dist/tex/context/base/mkiv/util-sql-imp-swiglib.lua b/Master/texmf-dist/tex/context/base/mkiv/util-sql-imp-swiglib.lua index 786b4bffc2b..16f6d533a5e 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/util-sql-imp-swiglib.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/util-sql-imp-swiglib.lua @@ -6,6 +6,10 @@ if not modules then modules = { } end modules ['util-sql-imp-swiglib'] = { license = "see context related readme files" } +if true then + logs.report("warning","swiglib is no longer supported") +end + -- As the regular library is flawed (i.e. there are crashes in the table -- construction code) and also not that efficient, Luigi Scarso looked into -- a swig binding. This is a bit more low level approach but as we stay diff --git a/Master/texmf-dist/tex/context/base/mkiv/util-sql-tickets.lua b/Master/texmf-dist/tex/context/base/mkiv/util-sql-tickets.lua index 3258fb186d8..d852212bcc5 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/util-sql-tickets.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/util-sql-tickets.lua @@ -18,7 +18,7 @@ local ostime, uuid, osfulltime = os.time, os.uuid, os.fulltime local random = math.random local concat = table.concat -if not utilities.sql then require("util-sql") end +-- if not utilities.sql then require("util-sql") end local sql = utilities.sql local tickets = { } diff --git a/Master/texmf-dist/tex/context/base/mkiv/util-sql-tracers.lua b/Master/texmf-dist/tex/context/base/mkiv/util-sql-tracers.lua index 44e32d256c6..0780f4d5bf2 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/util-sql-tracers.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/util-sql-tracers.lua @@ -10,7 +10,7 @@ local sql = utilities.sql local tracers = { } sql.tracers = tracers -sql.setmethod("swiglib") +sql.setmethod("library") local gsub, lower = string.gsub, string.lower diff --git a/Master/texmf-dist/tex/context/base/mkiv/util-sql.lua b/Master/texmf-dist/tex/context/base/mkiv/util-sql.lua index 36f3eab1935..55c4961f7da 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/util-sql.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/util-sql.lua @@ -26,7 +26,6 @@ if not modules then modules = { } end modules ['util-sql'] = { -- util-sql-imp-client.lua -- util-sql-imp-library.lua --- util-sql-imp-swiglib.lua -- util-sql-imp-lmxsql.lua -- local sql = require("util-sql") @@ -36,8 +35,7 @@ if not modules then modules = { } end modules ['util-sql'] = { -- { name = "data",type = "string" }, -- } -- --- local execute = sql.methods.swiglib.execute --- -- local execute = sql.methods.library.execute +-- local execute = sql.methods.library.execute -- -- local execute = sql.methods.client.execute -- -- local execute = sql.methods.lmxsql.execute -- @@ -114,7 +112,6 @@ if optional then local methods = { ffi = "mysql", library = "mysql", - swiglib = "mysql", postgress = "postgress", sqlite = "sqlite", sqlite3 = "sqlite", @@ -124,7 +121,7 @@ if optional then local m = methods[k] if m then report_state("start loading method %a as %a",k,m) - require("libs-imp-" .. m) + require("libs-imp-" .. m .. ".lmt") -- brrr report_state("loading method %a done",k) return rawget(t,m) else @@ -192,8 +189,7 @@ local function makeconverter(entries,celltemplate,wraptemplate) assignments[#assignments+1] = format("[%q] = %s,",name,value) end end - local code = format(wraptemplate,concat(shortcuts,"\n"),key and "{ }" or "data",key or "i",concat(assignments,"\n ")) - -- print(code) + local code = format(wraptemplate,concat(shortcuts,"\n"),key and "{ }" or "data",key or "i",concat(assignments,"\n ")) local func = load(code) return func and func() end diff --git a/Master/texmf-dist/tex/context/base/mkiv/util-str.lua b/Master/texmf-dist/tex/context/base/mkiv/util-str.lua index 0d1f39de9d7..b5c721a41d2 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/util-str.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/util-str.lua @@ -10,12 +10,13 @@ utilities = utilities or { } utilities.strings = utilities.strings or { } local strings = utilities.strings -local format, gsub, rep, sub, find = string.format, string.gsub, string.rep, string.sub, string.find +local format, gsub, rep, sub, find, char = string.format, string.gsub, string.rep, string.sub, string.find, string.char local load, dump = load, string.dump local tonumber, type, tostring, next, setmetatable = tonumber, type, tostring, next, setmetatable local unpack, concat = table.unpack, table.concat local P, V, C, S, R, Ct, Cs, Cp, Carg, Cc = lpeg.P, lpeg.V, lpeg.C, lpeg.S, lpeg.R, lpeg.Ct, lpeg.Cs, lpeg.Cp, lpeg.Carg, lpeg.Cc local patterns, lpegmatch = lpeg.patterns, lpeg.match +local tsplitat = lpeg.tsplitat local utfchar, utfbyte, utflen = utf.char, utf.byte, utf.len ----- loadstripped = utilities.lua.loadstripped @@ -622,7 +623,7 @@ local template = [[ return function(%s) return %s end ]] --- this might move +-- We only use fast serialize in controlled cases. local pattern = Cs(Cc('"') * ( (1-S('"\\\n\r'))^1 @@ -632,12 +633,43 @@ local pattern = Cs(Cc('"') * ( + P('\r') / '\\r' )^0 * Cc('"')) +-- -- I need to do more experiments with this: +-- +-- local pattern = Cs(Cc('"') * ( +-- (1-S('"\\\n\r'))^1 +-- + P('"') / '\\034' +-- + P('\\') / '\\092' +-- + P('\n') / '\\013' +-- + P('\r') / '\\010' +-- )^0 * Cc('"')) + patterns.escapedquotes = pattern function string.escapedquotes(s) return lpegmatch(pattern,s) end +local pattern = (1 - P("\\"))^1 ; pattern = Cs ( + pattern + * ( (P("\\") / "" * (digit^-3 / function(s) return char(tonumber(s)) end)) + pattern )^1 +) + +patterns.unescapedquotes = pattern + +function string.unescapedquotes(s) + return lpegmatch(pattern,s) or s +end + +-- function string.longifneeded(s) +-- if find(s,'["\\\n\r]') then +-- return "[===[" .. s .. "]===]" +-- else +-- return '"' .. s ..'"' +-- end +-- end + +string.texnewlines = lpeg.replacer(patterns.newline,"\r",true) + -- print(string.escapedquotes('1\\23\n"')) -- but for now here @@ -1476,7 +1508,7 @@ end if not string.explode then - local tsplitat = lpeg.tsplitat + -- local tsplitat = lpeg.tsplitat local p_utf = patterns.utf8character local p_check = C(p_utf) * (P("+") * Cc(true))^0 @@ -1499,3 +1531,24 @@ if not string.explode then end end + + +do + + local p_whitespace = patterns.whitespace^1 + + local cache = setmetatable({ }, { __index = function(t,k) + local p = tsplitat(p_whitespace * P(k) * p_whitespace) + local v = function(s) + return lpegmatch(p,s) + end + t[k] = v + return v + end }) + + function string.wordsplitter(s) + return cache[s] + end + +end + diff --git a/Master/texmf-dist/tex/context/base/mkiv/util-tab.lua b/Master/texmf-dist/tex/context/base/mkiv/util-tab.lua index 9f7112eb915..58ca3bcb10e 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/util-tab.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/util-tab.lua @@ -417,9 +417,9 @@ if JITSUPPORTED then else - local f_v = formatters["[%q]=%q,"] - local f_t = formatters["[%q]="] - local f_q = formatters["%q,"] + -- local f_v = formatters["[%q]=%q,"] + -- local f_t = formatters["[%q]="] + -- local f_q = formatters["%q,"] function table.fastserialize(t,prefix) -- todo, move local function out local r = { type(prefix) == "string" and prefix or "return" } @@ -432,7 +432,7 @@ else local v = t[0] if v then m = m + 1 - r[m] = "[0]='" + r[m] = "[0]=" if type(v) == "table" then fastserialize(v) else @@ -720,6 +720,7 @@ local function serialize(root,name,specification) local t -- = { } local n = 1 + -- local m = 0 -- no gain local unknown = false local function do_serialize(root,name,depth,level,indexed) @@ -850,6 +851,12 @@ local function serialize(root,name,specification) n = n + 1 t[n] = f_key_str_value_str(depth,tostring(k),tostring(v)) end end + -- if n > 100000 then -- no gain + -- local k = m + 1 + -- t[k] = concat(t,"\n",k,n) + -- n = k + -- m = k + -- end end end if level > 0 then @@ -898,6 +905,7 @@ local function serialize(root,name,specification) n = n + 1 t[n] = f_table_finish() return concat(t,"\n") + -- return concat(t,"\n",1,n) -- no gain end table.serialize = serialize @@ -970,3 +978,43 @@ end -- return remove(t,random(1,n)) -- end -- end + +function combine(target,source) + -- no copy so if that is needed one needs to deepcopy source first + if target then + for k, v in next, source do + if type(v) == "table" then + target[k] = combine(target[k],source[k]) + else + target[k] = v + end + end + return target + else + return source + end +end + +table.combine = combine + +-- If needed we can add something (some discussion on the list but I'm not sure if +-- it makes sense because merging such mixed tables is quite unusual. +-- +-- function table.himerged(...) +-- local result = { } +-- local r = 0 +-- for i=1,select("#",...) do +-- local s = select(i,...) +-- if s then +-- for k, v in next, s do +-- if type(k) == "number" then +-- r = r + 1 +-- result[r] = v +-- else +-- result[k] = v +-- end +-- end +-- end +-- end +-- return result +-- end diff --git a/Master/texmf-dist/tex/context/base/mkiv/util-tar.lua b/Master/texmf-dist/tex/context/base/mkiv/util-tar.lua new file mode 100644 index 00000000000..c8a8536a71f --- /dev/null +++ b/Master/texmf-dist/tex/context/base/mkiv/util-tar.lua @@ -0,0 +1,359 @@ +if not modules then modules = { } end modules ['util-tar'] = { + version = 1.001, + comment = "companion to luat-lib.mkiv", + author = "Hans Hagen, PRAGMA-ADE, Hasselt NL", + copyright = "PRAGMA ADE / ConTeXt Development Team", + license = "see context related readme files" +} + +local type, tonumber = type, tonumber +local gsub, escapedpattern = string.gsub, string.escapedpattern +local nameonly, dirname, makedirs = file.nameonly, file.dirname, dir.makedirs +local savedata = io.savedata +local newreader = io.newreader + +local report = logs.reporter("tar") + +local types = { + ["0"] = "file", + ["\0"] = "regular", + ["1"] = "link", + ["2"] = "symbolic", -- reserved + ["3"] = "character", + ["4"] = "block", + ["5"] = "directory", + ["6"] = "fifo", + ["7"] = "continuation", -- reserved + ["x"] = "extended", -- header +} + +local function asstring(str) + return str and gsub(str,"[\0 ]+$","") or nil +end + +local function asnumber(str) + str = gsub(str,"\0$","") + return tonumber(str,8) +end + +local function opentar(whatever,filename) + local f = newreader(filename,whatever) + if f then + f.metadata = { + nofpaths = 0, + noffiles = 0, + noflinks = 0, + nofbytes = 0, + } + return f + end +end + +local function readheader(t) + -- checksum + local p = t:getposition() + local h = t:readbytetable(512) + t:setposition(p) + for i=149,156 do -- nasty, one less + h[i] = 0 + end + local c = 256 + for i=1,512 do + c = c + h[i] + end + -- + local header = { + name = asstring(t:readstring(100)), -- 0 + mode = asnumber(t:readstring( 8)), -- 100 -- when we write: 0775 octal + uid = asnumber(t:readstring( 8)), -- 108 + gid = asnumber(t:readstring( 8)), -- 116 + size = asnumber(t:readstring( 12)), -- 124 + mtime = asnumber(t:readstring( 12)), -- 136 + checksum = asnumber(t:readstring( 6)), -- 148 -- actually 6 with space and \0 + dummy = t:skip (2) , + typeflag = t:readstring( 1) , -- 156 + linkname = asstring(t:readstring(100)), -- 157 + -- magic = asstring(t:readstring( 6)), -- 257 -- ustar\0 + -- version = 2 -- 263 + -- uname = 32 -- 265 + -- gname = 32 -- 297 + -- devmajor = 8 -- 329 + -- devminor = 8 -- 337 + -- prefix = 155 -- 345 + padding = t:skip (255) , -- 500 + } + local typeflag = header.typeflag + if typeflag then + header.filetype = types[typeflag] + if c == header.checksum then + return header + end + end +end + +local readers = { + + directory = function(t,h) + local metadata = t.metadata + local filename = h.name + if metadata.verbose then + report("%8s %s","",filename) + end + metadata.nofpaths = metadata.nofpaths + 1 + return true + end, + + file = function(t,h) + local metadata = t.metadata + local filename = h.name + local filesize = h.size + local pathname = dirname(filename) + if metadata.verbose then + report("% 8i : %s",filesize,filename) + end + if makedirs(pathname) then + savedata(filename,t:readstring(filesize)) + else + t.skip(filesize) + end + local position = t:getposition() + local target = position + (512 - position % 512) % 512 + t:setposition(target) + metadata.noffiles = metadata.noffiles + 1 + metadata.nofbytes = metadata.nofbytes + filesize + return true + end, + + symbolic = function(t,h) + local metadata = t.metadata + local filename = h.name + local linkname = h.linkname + if metadata.verbose then + report("%8s %s => %s","",linkname,filename) + end + metadata.noflinks = metadata.noflinks + 1 + return true + end, + +} + +local skippers = { + + directory = function(t,h) + return true + end, + + file = function(t,h) + local filesize = h.size + local fileoffset = t:getposition() + local position = filesize + fileoffset + local target = position + (512 - position % 512) % 512 + t:setposition(target) + return fileoffset + end, + + symbolic = function(t,h) + return true + end, + +} + +local writers = { + -- nothing here (yet) +} + +local function saveheader(t,h) + local filetype = h.filetype + local reader = readers[filetype] + if reader then + return filetype, reader(t,h) + else + report("no reader for %s",filetype) + end +end + +local function skipheader(t,h) + local filetype = h.filetype + local skipper = skippers[filetype] + if skipper then + return filetype, skipper(t,h) + else + report("no skipper for %s",filetype) + end +end + +local function unpacktar(whatever,filename,verbose) + local t = opentar(whatever,filename) + if t then + local metadata = t.metadata + statistics.starttiming(metadata) + if verbose then + if whatever == "string" then + report("unpacking: %i bytes",#filename) + else + report("unpacking: %s",filename) + end + report("") + metadata.verbose = verbose + end + while true do + local h = readheader(t) + if not h then + break + else + local filetype, saved = saveheader(t,h) + if not saved then + break + end + end + end + statistics.stoptiming(metadata) + metadata.runtime = statistics.elapsed(metadata) + if verbose then + report("") + report("number of paths : %i",metadata.nofpaths) + report("number of files : %i",metadata.noffiles) + report("number of links : %i",metadata.noflinks) + report("number of bytes : %i",metadata.nofbytes) + report("") + report("runtime needed : %s",statistics.elapsedseconds(metadata)) + report("") + end + t.close() + return metadata + end +end + +local function listtar(whatever,filename,onlyfiles) + local t = opentar(whatever,filename) + if t then + local list, n = { }, 0 + while true do + local h = readheader(t) + if not h then + break + else + local filetype, offset = skipheader(t,h) + if not offset then + break + elseif filetype == "file" then + n = n + 1 ; list[n] = { filetype, h.name, h.size } + elseif filetype == "link" then + n = n + 1 ; list[n] = { filetype, h.name, h.linkfile } + elseif not onlyfiles then + n = n + 1 ; list[n] = { filetype, h.name } + end + end + end + t.close() + -- can be an option + table.sort(list,function(a,b) return a[2] < b[2] end) + return list + end +end + +local function hashtar(whatever,filename,strip) + local t = opentar(whatever,filename) + if t then + local list = { } + if strip then + strip = "^" .. escapedpattern(nameonly(nameonly(strip))) .. "/" + end + while true do + local h = readheader(t) + if not h then + break + else + local filetype, offset = skipheader(t,h) + if not offset then + break + else + local name = h.name + if strip then + name = gsub(name,strip,"") + end + if filetype == "file" then + list[name] = { offset, h.size } + elseif filetype == "link" then + list[name] = h.linkname + end + end + end + end + t.close() + return list + end +end + +-- weak table ? + +local function fetchtar(whatever,archive,filename,list) + if not list then + list = hashtar(whatever,archive) + end + if list then + local what = list[filename] + if type(what) == "string" then + what = list[what] -- a link + end + if what then + local t = opentar(whatever,archive) + if t then + t:setposition(what[1]) + return t:readstring(what[2]) + end + end + end +end + +local function packtar(whatever,filename,verbose) + report("packing will be implemented when we need it") +end + +local tar = { + files = { + unpack = function(...) return unpacktar("file", ...) end, + pack = function(...) return packtar ("file", ...) end, + list = function(...) return listtar ("file", ...) end, + hash = function(...) return hashtar ("file", ...) end, + fetch = function(...) return fetchtar ("file", ...) end, + }, + strings = { + unpack = function(...) return unpacktar("string",...) end, + pack = function(...) return packtar ("string",...) end, + list = function(...) return listtar ("string",...) end, + hash = function(...) return hashtar ("string",...) end, + fetch = function(...) return fetchtar ("string",...) end, + }, + streams = { + unpack = function(...) return unpacktar("stream",...) end, + pack = function(...) return packtar ("stream",...) end, + list = function(...) return listtar ("stream",...) end, + hash = function(...) return hashtar ("stream",...) end, + fetch = function(...) return fetchtar ("stream",...) end, + }, +} + +utilities.tar = tar + +-- tar.files .unpack("e:/luatex/luametatex-source.tar",true) +-- tar.streams.unpack("e:/luatex/luametatex-source.tar",true) +-- tar.strings.unpack(io.loaddata("e:/luatex/luametatex-source.tar"),true) + +-- inspect(tar.files .unpack("e:/luatex/luametatex-source.tar")) +-- inspect(tar.streams.unpack("e:/luatex/luametatex-source.tar")) +-- inspect(tar.strings.unpack(io.loaddata("e:/luatex/luametatex-source.tar"))) + +-- inspect(tar.files .list("e:/luatex/luametatex-source.tar",true)) +-- inspect(tar.streams.list("e:/luatex/luametatex-source.tar",true)) +-- inspect(tar.strings.list(io.loaddata("e:/luatex/luametatex-source.tar"),true)) + +-- local c = os.clock() +-- local l = tar.files.hash("e:/luatex/luametatex-source.tar") +-- for i=1,500 do +-- local s = tar.files.fetch("e:/luatex/luametatex-source.tar", "luametatex-source/source/tex/texbuildpage.c", l) +-- local s = tar.files.fetch( "e:/luatex/luametatex-source.tar","luametatex-source/source/lua/lmtlibrary.c", l) +-- end +-- print(os.clock()-c) + +return tar diff --git a/Master/texmf-dist/tex/context/base/mkiv/util-tbs.lua b/Master/texmf-dist/tex/context/base/mkiv/util-tbs.lua new file mode 100644 index 00000000000..339abcfccd8 --- /dev/null +++ b/Master/texmf-dist/tex/context/base/mkiv/util-tbs.lua @@ -0,0 +1,131 @@ +if not modules then modules = { } end modules ['util-tbs'] = { + version = 1.001, + comment = "companion to luat-lib.mkiv", + author = "Hans Hagen, PRAGMA-ADE, Hasselt NL", + copyright = "PRAGMA ADE / ConTeXt Development Team", + license = "see context related readme files" +} + +local tonumber, type, rawget = tonumber, type, rawget + +utilities = utilities or {} +local tablestore = { } +utilities.tablestore = tablestore + +local loaded = { } +local current = nil + +function tablestore.load(namespace,filename) + local data = loaded[namespace] + if not data then + if type(filename) == "table" then + data = filename + else + local fullname = resolvers.findfile(filename) + if fullname and fullname ~= "" then + if file.suffix(fullname,"json") and utilities.json then + data = io.loaddata(fullname) + if data then + data = utilities.json.tolua(data) + else + -- error + end + else + data = table.load(fullname) + end + end + end + if not data then + data = { } + end + loaded[namespace] = data + if metapost then + metapost.setparameterset(namespace,data) + end + end + current = data + return data +end + +function tablestore.loaded(namespace) + return (namespace and loaded[namespace]) or current or { } +end + +function tablestore.known(namespace) + return namespace and rawget(loaded,namespace) or false +end + +do + + local find, gmatch, formatters = string.find, string.gmatch, string.formatters + + local P, C, Ct, Cc, R = lpeg.P, lpeg.C, lpeg.Ct, lpeg.Cc, lpeg.R + + local separator = P(".") + local equal = P("=") + local digit = R("09") + local lbracket = P("[") + local rbracket = P("]") + local index = Ct(Cc("index") * lbracket * (digit^1 / tonumber) * rbracket) + local test = Ct(Cc("test") * lbracket * C((1-equal)^1) * equal * C((1-rbracket)^1) * rbracket) + local entry = Ct(Cc("entry") * C((1-lbracket-separator)^1)) + + local specifier = Ct ((entry + (separator + index + test))^1) + + local function field(namespace,name,default) + local data = loaded[namespace] or current + if data then + -- if find(name,"%[") then + local t = lpeg.match(specifier,name) + for i=1,#t do + local ti = t[i] + local t1 = ti[1] + local k = ti[2] + if t1 == "test" then + local v = ti[3] + for j=1,#data do + local dj = data[j] + if dj[k] == v then + data = dj + goto OKAY + end + end + return + else + data = data[k] + if not data then + return + end + end + ::OKAY:: + end + -- else + -- for s in gmatch(name,"[^%.]+") do + -- data = data[s] or data[tonumber(s) or 0] + -- if not data then + -- return + -- end + -- end + -- end + return data + end + end + + + function length(namespace,name,default) + local data = field(namespace,name) + return type(data) == "table" and #data or 0 + end + + function formatted(namespace,name,fmt) + local data = field(namespace,name) + if data then + return formatters[fmt](data) + end + end + + tablestore.field = field + tablestore.length = length + tablestore.formatted = formatted + +end diff --git a/Master/texmf-dist/tex/context/base/mkiv/util-zip.lua b/Master/texmf-dist/tex/context/base/mkiv/util-zip.lua index f87e391a181..4ceec7afdbb 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/util-zip.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/util-zip.lua @@ -13,13 +13,23 @@ if not modules then modules = { } end modules ['util-zip'] = { -- keep some hybrid functionality. local type, tostring, tonumber = type, tostring, tonumber -local sort = table.sort +local sort, concat = table.sort, table.concat local find, format, sub, gsub = string.find, string.format, string.sub, string.gsub local osdate, ostime, osclock = os.date, os.time, os.clock local ioopen = io.open local loaddata, savedata = io.loaddata, io.savedata local filejoin, isdir, dirname, mkdirs = file.join, lfs.isdir, file.dirname, dir.mkdirs +local suffix, suffixes = file.suffix, file.suffixes +local openfile = io.open + +gzip = gzip or { } -- so in luatex we keep the old ones too + +if not zlib then + zlib = xzip -- in luametatex we shadow the old one +elseif not xzip then + xzip = zlib +end local files = utilities.files local openfile = files.open @@ -34,32 +44,18 @@ local band = bit32.band local rshift = bit32.rshift local lshift = bit32.lshift -local decompress, expandsize, calculatecrc - --- if flate then --- --- decompress = flate.flate_decompress --- calculatecrc = flate.update_crc32 --- --- else +local zlibdecompress = zlib.decompress +local zlibdecompresssize = zlib.decompresssize +local zlibchecksum = zlib.crc32 - local zlibdecompress = zlib.decompress - local zlibexpandsize = zlib.expandsize - local zlibchecksum = zlib.crc32 - - decompress = function(source) - return zlibdecompress(source,-15) -- auto - end - - expandsize = zlibexpandsize and function(source,targetsize) - return zlibexpandsize(source,targetsize,-15) -- auto - end or decompress - - calculatecrc = function(buffer,initial) - return zlibchecksum(initial or 0,buffer) - end +if not CONTEXTLMTXMODE or CONTEXTLMTXMODE == 0 then + local cs = zlibchecksum + zlibchecksum = function(str,n) return cs(n or 0, str) end +end --- end +local decompress = function(source) return zlibdecompress (source,-15) end -- auto +local decompresssize = function(source,targetsize) return zlibdecompresssize(source,targetsize,-15) end -- auto +local calculatecrc = function(buffer,initial) return zlibchecksum (initial or 0,buffer) end local zipfiles = { } utilities.zipfiles = zipfiles @@ -201,8 +197,8 @@ local openzipfile, closezipfile, unzipfile, foundzipfile, getziphash, getziplist setposition(handle,position) local result = readstring(handle,compressed) if data.method == 8 then - if expandsize then - result = expandsize(result,data.uncompressed) + if decompresssize then + result = decompresssize(result,data.uncompressed) else result = decompress(result) end @@ -516,48 +512,173 @@ if xzip then -- flate then do end -zipfiles.gunzipfile = gzip.load +-- todo: compress/decompress that work with offset in string --- if flate then --- --- local streams = utilities.streams --- local openfile = streams.open --- local closestream = streams.close --- local setposition = streams.setposition --- local getsize = streams.size --- local readcardinal4 = streams.readcardinal4le --- local getstring = streams.getstring --- local decompress = flate.gz_decompress --- --- -- id1=1 id2=1 method=1 flags=1 mtime=4(le) extra=1 os=1 --- -- flags:8 comment=...<nul> flags:4 name=...<nul> flags:2 extra=...<nul> flags:1 crc=2 --- -- data:? --- -- crc=4 size=4 --- --- function zipfiles.gunzipfile(filename) --- local strm = openfile(filename) --- if strm then --- setposition(strm,getsize(strm) - 4 + 1) --- local size = readcardinal4(strm) --- local data = decompress(getstring(strm),size) --- closestream(strm) --- return data --- end --- end +-- We only have a few official methods here: -- --- elseif gzip then +-- local decompressed = gzip.load (filename) +-- local resultsize = gzip.save (filename,compresslevel) +-- local compressed = gzip.compress (str,compresslevel) +-- local decompressed = gzip.decompress (str) +-- local iscompressed = gzip.compressed (str) +-- local suffix, okay = gzip.suffix (filename) -- --- local openfile = gzip.open +-- In LuaMetaTeX we have only xzip which implements a very few methods: -- --- function zipfiles.gunzipfile(filename) --- local g = openfile(filename,"rb") --- if g then --- local d = g:read("*a") --- d:close() --- return d --- end --- end --- --- end +-- compress (str,level,method,window,memory,strategy) +-- decompress (str,window) +-- adler32 (str,checksum) +-- crc32 (str,checksum) + +local pattern = "^\x1F\x8B\x08" +local gziplevel = 3 + +function gzip.suffix(filename) + local suffix, extra = suffixes(filename) + local gzipped = extra == "gz" + return suffix, gzipped +end + +function gzip.compressed(s) + return s and find(s,pattern) +end + +local getdecompressed +local putcompressed + +if gzip.compress then + + local gzipwindow = 15 + 16 -- +16: gzip, +32: gzip|zlib + + local compress = zlib.compress + local decompress = zlib.decompress + + getdecompressed = function(str) + return decompress(str,gzipwindow) -- pass offset + end + + putcompressed = function(str,level) + return compress(str,level or gziplevel,nil,gzipwindow) + end + +else + + -- Special window values are: flate: -15, zlib: 15, gzip : -15 + + local gzipwindow = -15 -- miniz needs this + local identifier = "\x1F\x8B" + + local compress = zlib.compress + local decompress = zlib.decompress + local zlibchecksum = zlib.crc32 + + if not CONTEXTLMTXMODE or CONTEXTLMTXMODE == 0 then + local cs = zlibchecksum + zlibchecksum = function(str,n) return cs(n or 0, str) end + end + + local streams = utilities.streams + local openstream = streams.openstring + local closestream = streams.close + local getposition = streams.getposition + local readbyte = streams.readbyte + local readcardinal4 = streams.readcardinal4le + local readcardinal2 = streams.readcardinal2le + local readstring = streams.readstring + local readcstring = streams.readcstring + local skipbytes = streams.skip + + local tocardinal1 = streams.tocardinal1 + local tocardinal4 = streams.tocardinal4le + + getdecompressed = function(str) + local s = openstream(str) + local identifier = readstring(s,2) + local method = readbyte(s,1) + local flags = readbyte(s,1) + local timestamp = readcardinal4(s) + local compression = readbyte(s,1) + local operating = readbyte(s,1) + -- local isjusttext = (flags & 0x01 ~= 0) and true or false + -- local extrasize = (flags & 0x04 ~= 0) and readcardinal2(s) or 0 + -- local filename = (flags & 0x08 ~= 0) and readcstring(s) or "" + -- local comment = (flags & 0x10 ~= 0) and readcstring(s) or "" + -- local checksum = (flags & 0x02 ~= 0) and readcardinal2(s) or 0 + local isjusttext = band(flags,0x01) ~= 0 and true or false + local extrasize = band(flags,0x04) ~= 0 and readcardinal2(s) or 0 + local filename = band(flags,0x08) ~= 0 and readcstring(s) or "" + local comment = band(flags,0x10) ~= 0 and readcstring(s) or "" + local checksum = band(flags,0x02) ~= 0 and readcardinal2(s) or 0 + local compressed = readstring(s,#str) + local data = decompress(compressed,gzipwindow) -- pass offset + return data + end + + putcompressed = function(str,level,originalname) + return concat { + identifier, -- 2 identifier + tocardinal1(0x08), -- 1 method + tocardinal1(0x08), -- 1 flags + tocardinal4(os.time()), -- 4 mtime + tocardinal1(0x02), -- 1 compression (2 or 4) + tocardinal1(0xFF), -- 1 operating + (originalname or "unknownname") .. "\0", + compress(str,level,nil,gzipwindow), + tocardinal4(zlibchecksum(str)), -- 4 + tocardinal4(#str), -- 4 + } + end + +end + +function gzip.load(filename) + local f = openfile(filename,"rb") + if not f then + -- invalid file + else + local data = f:read("*all") + f:close() + if data and data ~= "" then + if suffix(filename) == "gz" then + data = getdecompressed(data) + end + return data + end + end +end + +function gzip.save(filename,data,level,originalname) + if suffix(filename) ~= "gz" then + filename = filename .. ".gz" + end + local f = openfile(filename,"wb") + if f then + data = putcompressed(data or "",level or gziplevel,originalname) + f:write(data) + f:close() + return #data + end +end + +function gzip.compress(s,level) + if s and not find(s,pattern) then + if not level then + level = gziplevel + elseif level <= 0 then + return s + elseif level > 9 then + level = 9 + end + return putcompressed(s,level or gziplevel) or s + end +end + +function gzip.decompress(s) + if s and find(s,pattern) then + return getdecompressed(s) + else + return s + end +end return zipfiles |