diff options
Diffstat (limited to 'tex/context/base/mkxl')
52 files changed, 1390 insertions, 2197 deletions
diff --git a/tex/context/base/mkxl/cont-new.mkxl b/tex/context/base/mkxl/cont-new.mkxl index 53ccef0b6..9f4678349 100644 --- a/tex/context/base/mkxl/cont-new.mkxl +++ b/tex/context/base/mkxl/cont-new.mkxl @@ -13,7 +13,7 @@ % \normalend % uncomment this to get the real base runtime -\newcontextversion{2023.04.01 09:28} +\newcontextversion{2023.04.11 22:45} %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/tex/context/base/mkxl/context.mkxl b/tex/context/base/mkxl/context.mkxl index 6f4b7d052..19cc4ee85 100644 --- a/tex/context/base/mkxl/context.mkxl +++ b/tex/context/base/mkxl/context.mkxl @@ -29,7 +29,7 @@ %D {YYYY.MM.DD HH:MM} format. \immutable\edef\contextformat {\jobname} -\immutable\edef\contextversion{2023.04.01 09:28} +\immutable\edef\contextversion{2023.04.11 22:45} %overloadmode 1 % check frozen / warning %overloadmode 2 % check frozen / error diff --git a/tex/context/base/mkxl/core-uti.lmt b/tex/context/base/mkxl/core-uti.lmt index e4b6606e3..dbfa82ed7 100644 --- a/tex/context/base/mkxl/core-uti.lmt +++ b/tex/context/base/mkxl/core-uti.lmt @@ -377,16 +377,15 @@ function job.loadother(filename) local jobname = environment.jobname if filename == jobname then return - else - report_passes("integrating list %a into %a",filename,jobname) end - statistics.starttiming(loadedfiles) filename = file.addsuffix(filename,"tuc") local unpacked = othercache[filename] if not unpacked then - -- so we can register the same name twice(in loading order) + -- so we can register the same name twice (in loading order) ... needs checking if we want this + statistics.starttiming(loadedfiles) local utilitydata = load(filename) if utilitydata then + report_passes("integrating list %a into %a",filename,jobname) local jobpacker = utilitydata.job.packed unpacknumberdata(jobpacker.index) unpacked = { } @@ -401,14 +400,15 @@ function job.loadother(filename) end unpacked.job.packed = nil -- nicer in inspecting othercache[filename] = unpacked - -- + -- + utilitydata.components, utilitydata.namestack = collectstructure(utilitydata.job.structure.collected) + -- structures.lists .integrate(utilitydata) structures.registers .integrate(utilitydata) structures.references.integrate(utilitydata) - -- end + statistics.stoptiming(loadedfiles) end - statistics.stoptiming(loadedfiles) return unpacked end diff --git a/tex/context/base/mkxl/driv-shp.lmt b/tex/context/base/mkxl/driv-shp.lmt index 09928f303..18a12eff7 100644 --- a/tex/context/base/mkxl/driv-shp.lmt +++ b/tex/context/base/mkxl/driv-shp.lmt @@ -69,11 +69,11 @@ local parameters = fonthashes.parameters local nodecodes = nodes.nodecodes local whatsitcodes = nodes.whatsitcodes local gluecodes = nodes.gluecodes -local dirvalues = nodes.dirvalues local subtypes = nodes.subtypes -local lefttoright_code = dirvalues.lefttoright -local righttoleft_code = dirvalues.righttoleft +local directioncodes = tex.directioncodes +local lefttoright_code = directioncodes.lefttoright +local righttoleft_code = directioncodes.righttoleft local glyph_code = nodecodes.glyph local kern_code = nodecodes.kern diff --git a/tex/context/base/mkxl/driv-usr.lmt b/tex/context/base/mkxl/driv-usr.lmt index 0542228aa..df381f35f 100644 --- a/tex/context/base/mkxl/driv-usr.lmt +++ b/tex/context/base/mkxl/driv-usr.lmt @@ -40,10 +40,10 @@ local dirdimensions = nuts.dirdimensions local nodecodes = nodes.nodecodes local whatsitcodes = nodes.whatsitcodes -local dirvalues = nodes.dirvalues -local lefttoright_code = dirvalues.lefttoright -local righttoleft_code = dirvalues.righttoleft +local directioncodes = tex.directioncodes +local lefttoright_code = directioncodes.lefttoright +local righttoleft_code = directioncodes.righttoleft local glyph_code = nodecodes.glyph local kern_code = nodecodes.kern diff --git a/tex/context/base/mkxl/file-job.lmt b/tex/context/base/mkxl/file-job.lmt index e117b914e..c3906468b 100644 --- a/tex/context/base/mkxl/file-job.lmt +++ b/tex/context/base/mkxl/file-job.lmt @@ -13,7 +13,7 @@ local next, rawget, tostring, tonumber = next, rawget, tostring, tonumber local gsub, match, gmatch, ind = string.gsub, string.match, string.gmatch, string.find local insert, remove, concat, unique, imerged = table.insert, table.remove, table.concat, table.unique, table.imerged local validstring, formatters = string.valid, string.formatters -local sortedhash = table.sortedhash +local sortedhash, copytable = table.sortedhash, table.copy local setmetatableindex, setmetatablenewindex = table.setmetatableindex, table.setmetatablenewindex local commands = commands @@ -24,10 +24,12 @@ local ctx_doifelse = commands.doifelse local implement = interfaces.implement -local trace_jobfiles = false trackers.register("system.jobfiles", function(v) trace_jobfiles = v end) +local trace_jobfiles = false trackers.register("system.jobfiles", function(v) trace_jobfiles = v end) +local trace_structure = false trackers.register("system.structure", function(v) trace_structure = v end) local report = logs.reporter("system") local report_jobfiles = logs.reporter("system", "jobfiles") +local report_structure = logs.reporter("system", "structure") local report_functions = logs.reporter("system", "functions") local texsetcount = tex.setcount @@ -69,6 +71,12 @@ local v_product = variables.product local v_component = variables.component local v_yes = variables.yes +local v_local = variables["local"] +local v_global = variables["global"] + +local e_start = elements.start +local e_stop = elements.stop + -- main code .. there is some overlap .. here we have loc:// local function findctxfile(name) -- loc ? any ? @@ -402,7 +410,7 @@ local c_textlevel = tex.iscount("textlevel") local function dummyfunction() end local function startstoperror() - report("invalid \\%s%s ... \\%s%s structure",elements.start,v_text,elements.stop,v_text) + report("invalid \\%s%s ... \\%s%s structure",e_start,v_text,e_stop,v_text) startstoperror = dummyfunction end @@ -528,6 +536,10 @@ local tree = { type = "text", name = "", branches = { } } local treestack = { } local top = tree.branches local root = tree +local namestack = { } +local namelist = { } +local namehash = { } +local nametop = false local project_stack = { } local product_stack = { } @@ -550,6 +562,15 @@ local function pushtree(what,name) top = t end +local function pushcurrent(what,name) + if what == v_product or what == v_component or what == v_text then + insert(namestack,name) + nametop = copytable(namestack) + namelist[#namelist+1] = nametop + insert(namehash,#namelist) + end +end + local function poptree() top = remove(treestack) if #top[#top].branches == 0 then @@ -557,6 +578,13 @@ local function poptree() end end +local function popcurrent(what) + if what == v_product or what == v_component then + remove(namestack) + remove(namehash) + end +end + do local function log_tree(report,top,depth) @@ -600,22 +628,75 @@ job.structure = jobstructure jobstructure.collected = jobstructure.collected or { } jobstructure.tobesaved = root jobstructure.components = { } +jobstructure.namestack = { } -local function initialize() - local function collect(root,result) +function collectstructure(collected) + local namestack = { } + local n = 0 + local function collect(root,result,stack) local branches = root.branches if branches then + local s = copytable(stack) + local m = #s + 1 for i=1,#branches do local branch = branches[i] - if branch.type == "component" then + local what = branch.type + if what == v_component then result[#result+1] = branch.name end - collect(branch,result) + s[m] = branch.name + if what == v_product or what == v_component then + n = n + 1 + namestack[n] = copytable(s) + end + collect(branch,result,s) end end return result end - jobstructure.components = collect(jobstructure.collected,{}) + local components = collect(collected,{},{}) +-- inspect(namestack) + return components, namestack +end + +local function initialize() + jobstructure.components, jobstructure.namestack = collectstructure(jobstructure.collected) +end + +function jobresolvers.collectstructure(collected) + return collectstructure(collected or jobstructure.collected) +end + +do + local reported = { } + + function jobresolvers.currentstructure() +-- inspect(namehash) + local n = namehash[#namehash] + if trace_structure and not reported[n] then + local namestack = jobstructure.namestack + local new = namelist [n] + local old = namestack[n] + new = new and concat(new," ") or "" + old = old and concat(old," ") or "" + if old == new then + report_structure("%02i : %a",n,old) + else + report_structure("%02i : %a <> %a",n,old,new) + end + reported[n] = true + end + return n, namelist[n] + end + +end + +function jobresolvers.namelist(n,utilitydata) + if utilitydata then + return utilitydata.namestack[n] + else + return namelist[n] or jobstructure.namestack[n] + end end job.register('job.structure.collected',root,initialize) @@ -836,36 +917,32 @@ implement { name = "usecomponent", public = true, protected = true, actions = -- [v_environment] = context.stopenvironmentindeed, -- } -local start = { - [v_project] = "startprojectindeed", - [v_product] = "startproductindeed", - [v_component] = "startcomponentindeed", - [v_environment] = "startenvironmentindeed", -} +-- local start = { +-- [v_project] = "startprojectindeed", +-- [v_product] = "startproductindeed", +-- [v_component] = "startcomponentindeed", +-- [v_environment] = "startenvironmentindeed", +-- } -local stop = { - [v_project] = "stopprojectindeed", - [v_product] = "stopproductindeed", - [v_component] = "stopcomponentindeed", - [v_environment] = "stopenvironmentindeed", -} +-- local stop = { +-- [v_project] = "stopprojectindeed", +-- [v_product] = "stopproductindeed", +-- [v_component] = "stopcomponentindeed", +-- [v_environment] = "stopenvironmentindeed", +-- } -local function gotonextlevel(what,name) -- todo: something with suffix name +local function gotonextlevel(what,how,name) -- todo: something with suffix name insert(stacks[what],name) insert(typestack,currenttype) currenttype = what pushtree(what,name) - if start[what] then - -- start[what]() - token.expandmacro(start[what]) - end + pushcurrent(what,name) + token.expandmacro(e_start..":"..what..":"..how) end -local function gotopreviouslevel(what) - if stop[what] then - token.expandmacro(stop[what]) - -- stop[what]() -- not immediate - end +local function gotopreviouslevel(what,how) + token.expandmacro(e_stop..":"..what..":"..how) + popcurrent(what) poptree() currenttype = remove(typestack) or v_text remove(stacks[what]) -- not currenttype ... weak recovery @@ -881,20 +958,22 @@ local function autoname() return name end -implement { name = "startproject", public = true, protected = true, actions = function() gotonextlevel(v_project, autoname()) end } -implement { name = "startproduct", public = true, protected = true, actions = function() gotonextlevel(v_product, autoname()) end } -implement { name = "startcomponent", public = true, protected = true, actions = function() gotonextlevel(v_component, autoname()) end } -implement { name = "startenvironment", public = true, protected = true, actions = function() gotonextlevel(v_environment,autoname()) end } - -implement { name = "stopproject", public = true, protected = true, actions = function() gotopreviouslevel(v_project ) end } -implement { name = "stopproduct", public = true, protected = true, actions = function() gotopreviouslevel(v_product ) end } -implement { name = "stopcomponent", public = true, protected = true, actions = function() gotopreviouslevel(v_component ) end } -implement { name = "stopenvironment", public = true, protected = true, actions = function() gotopreviouslevel(v_environment) end } - -implement { name = "currentproject", public = true, actions = function() context(topofstack(v_project )) end } -implement { name = "currentproduct", public = true, actions = function() context(topofstack(v_product )) end } -implement { name = "currentcomponent", public = true, actions = function() context(topofstack(v_component )) end } -implement { name = "currentenvironment", public = true, actions = function() context(topofstack(v_environment)) end } +implement { name = "startproject", public = true, protected = true, actions = function() gotonextlevel(v_project, v_global, autoname()) end } +implement { name = "startproduct", public = true, protected = true, actions = function() gotonextlevel(v_product, v_global, autoname()) end } +implement { name = "startcomponent", public = true, protected = true, actions = function() gotonextlevel(v_component, v_global, autoname()) end } +implement { name = "startlocalcomponent", public = true, protected = true, actions = function() gotonextlevel(v_component, v_local, autoname()) end } +implement { name = "startenvironment", public = true, protected = true, actions = function() gotonextlevel(v_environment, v_global, autoname()) end } + +implement { name = "stopproject", public = true, protected = true, actions = function() gotopreviouslevel(v_project, v_global) end } +implement { name = "stopproduct", public = true, protected = true, actions = function() gotopreviouslevel(v_product, v_global) end } +implement { name = "stopcomponent", public = true, protected = true, actions = function() gotopreviouslevel(v_component, v_global) end } +implement { name = "stoplocalcomponent", public = true, protected = true, actions = function() gotopreviouslevel(v_component, v_local ) end } +implement { name = "stopenvironment", public = true, protected = true, actions = function() gotopreviouslevel(v_environment, v_global) end } + +implement { name = "currentproject", public = true, actions = function() context(topofstack(v_project )) end } +implement { name = "currentproduct", public = true, actions = function() context(topofstack(v_product )) end } +implement { name = "currentcomponent", public = true, actions = function() context(topofstack(v_component )) end } +implement { name = "currentenvironment", public = true, actions = function() context(topofstack(v_environment)) end } -- -- -- this will move -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- diff --git a/tex/context/base/mkxl/file-job.mklx b/tex/context/base/mkxl/file-job.mklx index 76b679bd6..1c57a832d 100644 --- a/tex/context/base/mkxl/file-job.mklx +++ b/tex/context/base/mkxl/file-job.mklx @@ -184,43 +184,54 @@ \newsystemmode\v!component \newsystemmode\v!environment -\permanent\protected\def\startprojectindeed +\permanent\protected\defcsname\e!start:\v!project:\v!global\endcsname {%starttext \pushsystemmode\v!project \setsystemmode\v!project} -\permanent\protected\def\stopprojectindeed +\permanent\protected\defcsname\e!stop:\v!project:\v!global\endcsname {\popsystemmode\v!project %stoptext \endinput} -\permanent\protected\def\startproductindeed +\permanent\protected\defcsname\e!start:\v!product:\v!global\endcsname {\starttext \pushsystemmode\v!product \setsystemmode\v!product} -\permanent\protected\def\stopproductindeed +\permanent\protected\defcsname\e!stop:\v!product:\v!global\endcsname {\popsystemmode\v!product \stoptext \endinput} -\permanent\protected\def\startcomponentindeed +\permanent\protected\defcsname\e!start:\v!component:\v!global\endcsname {\starttext \pushreferenceprefix\currentcomponent \pushsystemmode\v!component \setsystemmode\v!component} -\permanent\protected\def\stopcomponentindeed +\permanent\protected\defcsname\e!stop:\v!component:\v!global\endcsname {\popsystemmode\v!component \popreferenceprefix \stoptext \endinput} -\permanent\protected\def\startenvironmentindeed +\permanent\protected\defcsname\e!start:\v!component:\v!local\endcsname + {\starttext + \pushreferenceprefix\currentcomponent + \pushsystemmode\v!component + \setsystemmode\v!component} + +\permanent\protected\defcsname\e!stop:\v!component:\v!local\endcsname + {\popsystemmode\v!component + \popreferenceprefix + \stoptext} + +\permanent\protected\defcsname\e!start:\v!environment:\v!global\endcsname {\pushsystemmode\v!environment \setsystemmode\v!environment} -\permanent\protected\def\stopenvironmentindeed +\permanent\protected\defcsname\e!stop:\v!environment:\v!global\endcsname {\popsystemmode\v!environment \endinput} diff --git a/tex/context/base/mkxl/font-con.lmt b/tex/context/base/mkxl/font-con.lmt index 5a887d61d..599641e2c 100644 --- a/tex/context/base/mkxl/font-con.lmt +++ b/tex/context/base/mkxl/font-con.lmt @@ -589,6 +589,14 @@ function constructors.scale(tfmdata,specification) if changed then local c = changed[unicode] if c and c ~= unicode then + local cc = changed[c] + if cc then + while cc do + c = cc + cc = changed[c] + end + end + -- check not needed: if c then description = descriptions[c] or descriptions[unicode] or character character = characters[c] or character diff --git a/tex/context/base/mkxl/font-lib.mklx b/tex/context/base/mkxl/font-lib.mklx index 6caf1daf8..9214a8b52 100644 --- a/tex/context/base/mkxl/font-lib.mklx +++ b/tex/context/base/mkxl/font-lib.mklx @@ -52,7 +52,7 @@ \registerctxluafile{font-oti}{} % otf initialization \registerctxluafile{font-ott}{} % otf tables (first) \registerctxluafile{font-otl}{autosuffix} -\registerctxluafile{font-oto}{} +\registerctxluafile{font-oto}{autosuffix} \registerctxluafile{font-otj}{autosuffix} \registerctxluafile{font-oup}{} \registerctxluafile{font-ota}{autosuffix} diff --git a/tex/context/base/mkxl/font-mat.mklx b/tex/context/base/mkxl/font-mat.mklx index 54473a347..a93174e37 100644 --- a/tex/context/base/mkxl/font-mat.mklx +++ b/tex/context/base/mkxl/font-mat.mklx @@ -533,7 +533,12 @@ \else \c_math_m_scaled\numericscale#1\relax \fi - \scaledmathstyle\c_math_m_scaled + \scaledmathstyle + \ifnum\glyphscale=\plusthousand + \c_math_m_scaled + \else + \numexpr(\c_math_m_scaled*\glyphscale)/\plusthousand\relax + \fi \fi} %D This is nasty, as the engine only stores the last set family parameters (per style) which diff --git a/tex/context/base/mkxl/font-oto.lmt b/tex/context/base/mkxl/font-oto.lmt new file mode 100644 index 000000000..f22696273 --- /dev/null +++ b/tex/context/base/mkxl/font-oto.lmt @@ -0,0 +1,556 @@ +if not modules then modules = { } end modules ['font-oto'] = { -- original tex + version = 1.001, + comment = "companion to font-ini.mkiv", + author = "Hans Hagen, PRAGMA-ADE, Hasselt NL", + copyright = "PRAGMA ADE / ConTeXt Development Team", + license = "see context related readme files" +} + +local concat, unpack = table.concat, table.unpack +local insert, remove = table.insert, table.remove +local format, gmatch, gsub, find, match, lower, strip = string.format, string.gmatch, string.gsub, string.find, string.match, string.lower, string.strip +local type, next, tonumber, tostring = type, next, tonumber, tostring + +local trace_baseinit = false trackers.register("otf.baseinit", function(v) trace_baseinit = v end) +local trace_singles = false trackers.register("otf.singles", function(v) trace_singles = v end) +local trace_multiples = false trackers.register("otf.multiples", function(v) trace_multiples = v end) +local trace_alternatives = false trackers.register("otf.alternatives", function(v) trace_alternatives = v end) +local trace_ligatures = false trackers.register("otf.ligatures", function(v) trace_ligatures = v end) +local trace_kerns = false trackers.register("otf.kerns", function(v) trace_kerns = v end) +local trace_preparing = false trackers.register("otf.preparing", function(v) trace_preparing = v end) + +local report_prepare = logs.reporter("fonts","otf prepare") + +local fonts = fonts +local otf = fonts.handlers.otf + +local otffeatures = otf.features +local registerotffeature = otffeatures.register + +otf.defaultbasealternate = "none" -- first last + +local getprivate = fonts.constructors.getprivate + +local wildcard = "*" +local default = "dflt" + +local formatters = string.formatters +local f_unicode = formatters["%U"] +local f_uniname = formatters["%U (%s)"] +local f_unilist = formatters["% t (% t)"] + +local function gref(descriptions,n) + if type(n) == "number" then + local name = descriptions[n].name + if name then + return f_uniname(n,name) + else + return f_unicode(n) + end + elseif n then + local num = { } + local nam = { } + local j = 0 + for i=1,#n do + local ni = n[i] + if tonumber(ni) then -- first is likely a key + j = j + 1 + local di = descriptions[ni] + num[j] = f_unicode(ni) + nam[j] = di and di.name or "-" + end + end + return f_unilist(num,nam) + else + return "<error in base mode tracing>" + end +end + +local function cref(feature,sequence) + return formatters["feature %a, type %a, (chain) lookup %a"](feature,sequence.type,sequence.name) +end + +local function report_substitution(feature,sequence,descriptions,unicode,substitution) + if unicode == substitution then + report_prepare("%s: base substitution %s maps onto itself", + cref(feature,sequence), + gref(descriptions,unicode)) + else + report_prepare("%s: base substitution %s => %S", + cref(feature,sequence), + gref(descriptions,unicode), + gref(descriptions,substitution)) + end +end + +local function report_alternate(feature,sequence,descriptions,unicode,replacement,value,comment) + if unicode == replacement then + report_prepare("%s: base alternate %s maps onto itself", + cref(feature,sequence), + gref(descriptions,unicode)) + else + report_prepare("%s: base alternate %s => %s (%S => %S)", + cref(feature,sequence), + gref(descriptions,unicode), + replacement and gref(descriptions,replacement), + value, + comment) + end +end + +local function report_ligature(feature,sequence,descriptions,unicode,ligature) + report_prepare("%s: base ligature %s => %S", + cref(feature,sequence), + gref(descriptions,ligature), + gref(descriptions,unicode)) +end + +local function report_kern(feature,sequence,descriptions,unicode,otherunicode,value) + report_prepare("%s: base kern %s + %s => %S", + cref(feature,sequence), + gref(descriptions,unicode), + gref(descriptions,otherunicode), + value) +end + +-- We need to make sure that luatex sees the difference between base fonts that have +-- different glyphs in the same slots in fonts that have the same fullname (or filename). +-- LuaTeX will merge fonts eventually (and subset later on). If needed we can use a more +-- verbose name as long as we don't use <()<>[]{}/%> and the length is < 128. + +local basehash, basehashes, applied = { }, 1, { } + +local function registerbasehash(tfmdata) + local properties = tfmdata.properties + local hash = concat(applied," ") + local base = basehash[hash] + if not base then + basehashes = basehashes + 1 + base = basehashes + basehash[hash] = base + end + properties.basehash = base + properties.fullname = (properties.fullname or properties.name) .. "-" .. base + -- report_prepare("fullname base hash '%a, featureset %a",tfmdata.properties.fullname,hash) + applied = { } +end + +local function registerbasefeature(feature,value) + applied[#applied+1] = feature .. "=" .. tostring(value) +end + +-- The original basemode ligature builder used the names of components and did some expression +-- juggling to get the chain right. The current variant starts with unicodes but still uses +-- names to make the chain. This is needed because we have to create intermediates when needed +-- but use predefined snippets when available. To some extend the current builder is more stupid +-- but I don't worry that much about it as ligatures are rather predicatable. +-- +-- Personally I think that an ff + i == ffi rule as used in for instance latin modern is pretty +-- weird as no sane person will key that in and expect a glyph for that ligature plus the following +-- character. Anyhow, as we need to deal with this, we do, but no guarantes are given. +-- +-- latin modern dejavu +-- +-- f+f 102 102 102 102 +-- f+i 102 105 102 105 +-- f+l 102 108 102 108 +-- f+f+i 102 102 105 +-- f+f+l 102 102 108 102 102 108 +-- ff+i 64256 105 64256 105 +-- ff+l 64256 108 +-- +-- As you can see here, latin modern is less complete than dejavu but +-- in practice one will not notice it. +-- +-- The while loop is needed because we need to resolve for instance pseudo names like +-- hyphen_hyphen to endash so in practice we end up with a bit too many definitions but the +-- overhead is neglectable. We can have changed[first] or changed[second] but it quickly becomes +-- messy if we need to take that into account. + +local function makefake(tfmdata,name,present) + local private = getprivate(tfmdata) + local character = { intermediate = true, ligatures = { } } + tfmdata.resources.unicodes[name] = private + tfmdata.characters[private] = character + tfmdata.descriptions[private] = { name = name } + present[name] = private + return character +end + +local function make_1(present,tree,name) + 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 + d[#d+1] = v + end + end +end + +local function make_2(present,tfmdata,characters,tree,name,preceding,unicode,done) + 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 + local code = present[name] or unicode + local name = name .. "_" .. k + make_2(present,tfmdata,characters,v,name,code,k,done) + end + end + end +end + +local function preparesubstitutions(tfmdata,feature,value,validlookups,lookuplist) + local characters = tfmdata.characters + local descriptions = tfmdata.descriptions + local resources = tfmdata.resources + local changed = tfmdata.changed + + 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 cleaner because + -- we can have shared changes and such. + + if not changed then + changed = { } + tfmdata.changed = changed + end + + for i=1,#lookuplist do + local sequence = lookuplist[i] + local steps = sequence.steps + local kind = sequence.type + if kind == "gsub_single" then + for i=1,#steps do + for unicode, data in next, steps[i].coverage do + if unicode ~= data and not changed[unicode] then + changed[unicode] = data + end + if trace_singles then + report_substitution(feature,sequence,descriptions,unicode,data) + end + end + end + elseif kind == "gsub_alternate" then + for i=1,#steps do + for unicode, data in next, steps[i].coverage do + local replacement = data[alternate] + if replacement then + if unicode ~= replacement and not changed[unicode] then + changed[unicode] = replacement + end + if trace_alternatives then + report_alternate(feature,sequence,descriptions,unicode,replacement,value,"normal") + end + elseif defaultalt == "first" then + replacement = data[1] + if unicode ~= replacement and not changed[unicode] then + changed[unicode] = replacement + end + if trace_alternatives then + report_alternate(feature,sequence,descriptions,unicode,replacement,value,defaultalt) + end + elseif defaultalt == "last" then + replacement = data[#data] + if unicode ~= replacement and not changed[unicode] then + changed[unicode] = replacement + end + if trace_alternatives then + report_alternate(feature,sequence,descriptions,unicode,replacement,value,defaultalt) + end + else + if trace_alternatives then + report_alternate(feature,sequence,descriptions,unicode,replacement,value,"unknown") + end + end + end + end + elseif kind == "gsub_ligature" then + for i=1,#steps do + for unicode, data in next, steps[i].coverage do + ligatures[#ligatures+1] = { unicode, data, "" } -- lookupname } + if trace_ligatures then + report_ligature(feature,sequence,descriptions,unicode,data) + end + end + end + end + end + + local nofligatures = #ligatures + + if nofligatures > 0 then + local characters = tfmdata.characters + local present = { } + local done = trace_baseinit and trace_ligatures and { } + + for i=1,nofligatures do + local ligature = ligatures[i] + local unicode = ligature[1] + local tree = ligature[2] + make_1(present,tree,"ctx_"..unicode) + end + + for i=1,nofligatures do + local ligature = ligatures[i] + local unicode = ligature[1] + local tree = ligature[2] + local lookupname = ligature[3] + make_2(present,tfmdata,characters,tree,"ctx_"..unicode,unicode,unicode,done,sequence) + end + + end + +end + +local function preparepositionings(tfmdata,feature,value,validlookups,lookuplist) + local characters = tfmdata.characters + local descriptions = tfmdata.descriptions + local resources = tfmdata.resources + local properties = tfmdata.properties + local traceindeed = trace_baseinit and trace_kerns + -- check out this sharedkerns trickery + for i=1,#lookuplist do + local sequence = lookuplist[i] + local steps = sequence.steps + local kind = sequence.type + local format = sequence.format + if kind == "gpos_pair" then + for i=1,#steps do + local step = steps[i] + local format = step.format + if format == "kern" or format == "move" then + for unicode, data in next, steps[i].coverage do + local character = characters[unicode] + local kerns = character.kerns + if not kerns then + kerns = { } + character.kerns = kerns + end + if traceindeed then + for otherunicode, kern in next, data do + if not kerns[otherunicode] and kern ~= 0 then + kerns[otherunicode] = kern + report_kern(feature,sequence,descriptions,unicode,otherunicode,kern) + end + end + else + for otherunicode, kern in next, data do + if not kerns[otherunicode] and kern ~= 0 then + kerns[otherunicode] = kern + end + end + end + end + else + for unicode, data in next, steps[i].coverage do + local character = characters[unicode] + local kerns = character.kerns + for otherunicode, kern in next, data do + -- kern[2] is true (all zero) or a table + local other = kern[2] + if other == true or (not other and not (kerns and kerns[otherunicode])) then + local kern = kern[1] + if kern == true then + -- all zero + elseif kern[1] ~= 0 or kern[2] ~= 0 or kern[4] ~= 0 then + -- a complex pair not suitable for basemode + else + kern = kern[3] + if kern ~= 0 then + if kerns then + kerns[otherunicode] = kern + else + kerns = { [otherunicode] = kern } + character.kerns = kerns + end + if traceindeed then + report_kern(feature,sequence,descriptions,unicode,otherunicode,kern) + end + end + end + end + end + end + end + end + end + end + +end + +local function initializehashes(tfmdata) + -- already done +end + +local function checkmathreplacements(tfmdata,fullname,fixitalics) + if tfmdata.mathparameters then + local characters = tfmdata.characters + local changed = tfmdata.changed + if next(changed) then + if trace_preparing or trace_baseinit then + report_prepare("checking math replacements for %a",fullname) + end + for unicode, replacement in next, changed do + local u = characters[unicode] + local r = characters[replacement] + if u and r then + local n = u.next + local v = u.vert_variants + local h = u.horiz_variants + if fixitalics then + -- quite some warnings on stix ... + local ui = u.italic + if ui and not r.italic then + if trace_preparing then + report_prepare("using %i units of italic correction from %C for %U",ui,unicode,replacement) + end + r.italic = ui -- print(ui,ri) + end + end + if n and not r.next then + if trace_preparing then + report_prepare("forcing %s for %C substituted by %U","incremental step",unicode,replacement) + end + r.next = n + end + if v and not r.vert_variants then + if trace_preparing then + report_prepare("forcing %s for %C substituted by %U","vertical variants",unicode,replacement) + end + r.vert_variants = v + end + if h and not r.horiz_variants then + if trace_preparing then + report_prepare("forcing %s for %C substituted by %U","horizontal variants",unicode,replacement) + end + r.horiz_variants = h + end + else + if trace_preparing then + report_prepare("error replacing %C by %U",unicode,replacement) + end + end + end + end + end +end + +local function featuresinitializer(tfmdata,value) + if true then -- value then + local starttime = trace_preparing and os.clock() + local features = tfmdata.shared.features + local fullname = tfmdata.properties.fullname or "?" + if features then + initializehashes(tfmdata) + local collectlookups = otf.collectlookups + local rawdata = tfmdata.shared.rawdata + local properties = tfmdata.properties + local script = properties.script + local language = properties.language + local rawresources = rawdata.resources + local rawfeatures = rawresources and rawresources.features + local basesubstitutions = rawfeatures and rawfeatures.gsub + local basepositionings = rawfeatures and rawfeatures.gpos + local substitutionsdone = false + local positioningsdone = false + -- + if basesubstitutions or basepositionings then + local sequences = tfmdata.resources.sequences + for s=1,#sequences do + local sequence = sequences[s] + local sfeatures = sequence.features + if sfeatures then + local order = sequence.order + if order then + for i=1,#order do -- + local feature = order[i] + 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 + if trace_preparing then + report_prepare("filtering base %s feature %a for %a with value %a","sub",feature,fullname,value) + end + preparesubstitutions(tfmdata,feature,value,validlookups,lookuplist) + registerbasefeature(feature,value) + substitutionsdone = true + elseif basepositionings and basepositionings[feature] then + if trace_preparing then + report_prepare("filtering base %a feature %a for %a with value %a","pos",feature,fullname,value) + end + preparepositionings(tfmdata,feature,value,validlookups,lookuplist) + registerbasefeature(feature,value) + positioningsdone = true + end + end + end + end + end + end + end + -- + if substitutionsdone then + checkmathreplacements(tfmdata,fullname,features.fixitalics) + end + -- + registerbasehash(tfmdata) + end + if trace_preparing then + report_prepare("preparation time is %0.3f seconds for %a",os.clock()-starttime,fullname) + end + end +end + +registerotffeature { + name = "features", + description = "features", + default = true, + initializers = { + -- position = 1, -- after setscript (temp hack ... we need to force script / language to 1 + base = featuresinitializer, + } +} + +otf.basemodeinitializer = featuresinitializer diff --git a/tex/context/base/mkxl/font-ots.lmt b/tex/context/base/mkxl/font-ots.lmt index 0e99de6d1..9e7fdb1ab 100644 --- a/tex/context/base/mkxl/font-ots.lmt +++ b/tex/context/base/mkxl/font-ots.lmt @@ -252,8 +252,8 @@ local math_code = nodecodes.math local dir_code = nodecodes.dir local par_code = nodecodes.par -local lefttoright_code = nodes.dirvalues.lefttoright -local righttoleft_code = nodes.dirvalues.righttoleft +local lefttoright_code = tex.directioncodes.lefttoright +local righttoleft_code = tex.directioncodes.righttoleft local discretionarydisc_code = nodes.disccodes.discretionary diff --git a/tex/context/base/mkxl/font-txt.lmt b/tex/context/base/mkxl/font-txt.lmt index aae69ddd3..c42a3a655 100644 --- a/tex/context/base/mkxl/font-txt.lmt +++ b/tex/context/base/mkxl/font-txt.lmt @@ -122,7 +122,7 @@ local math_code = nodecodes.math local dir_code = nodecodes.dir local par_code = nodecodes.par -local righttoleft_code = nodes.dirvalues.righttoleft +local righttoleft_code = tex.directioncodes.righttoleft local txtdirstate = otf.helpers.txtdirstate local pardirstate = otf.helpers.pardirstate diff --git a/tex/context/base/mkxl/lpdf-ano.lmt b/tex/context/base/mkxl/lpdf-ano.lmt index 2e19ffd5e..4d9af002c 100644 --- a/tex/context/base/mkxl/lpdf-ano.lmt +++ b/tex/context/base/mkxl/lpdf-ano.lmt @@ -26,11 +26,12 @@ local rep, format, find = string.rep, string.format, string.find local min = math.min local lpegmatch = lpeg.match local formatters = string.formatters -local sortedkeys, concat = table.sortedkeys, table.concat +local sortedkeys, concat, swapped = table.sortedkeys, table.concat, table.swapped local trace_references = false trackers.register("references.references", function(v) trace_references = v end) local trace_destinations = false trackers.register("references.destinations", function(v) trace_destinations = v end) local trace_bookmarks = false trackers.register("references.bookmarks", function(v) trace_bookmarks = v end) +local trace_externals = false trackers.register("references.externals", function(v) trace_externals = v end) local log_destinations = false directives.register("destinations.log", function(v) log_destinations = v end) local untex_urls = true directives.register("references.untexurls", function(v) untex_urls = v end) @@ -510,59 +511,65 @@ function nodeinjections.destination(width,height,depth,names,view) if method == v_page then for n=1,#names do local name = names[n] - local used = usedviews[name] - if used and used ~= true then - -- already done, maybe a warning - elseif type(name) == "number" then - -- if noview then - -- usedviews[name] = view - -- names[n] = false - -- else + if name then + local used = usedviews[name] + if used and used ~= true then + -- already done, maybe a warning + elseif type(name) == "number" then + -- if noview then + -- usedviews[name] = view + -- names[n] = false + -- else + usedviews[name] = view + names[n] = false + -- end + else usedviews[name] = view - names[n] = false - -- end - else - usedviews[name] = view + end end end elseif method == v_name then for n=1,#names do local name = names[n] - local used = usedviews[name] - if used and used ~= true then - -- already done, maybe a warning - elseif type(name) == "number" then - local used = usedinternals[name] - usedviews[name] = view - names[n] = registerautoprefix(name) - doview = true - else - usedviews[name] = view - doview = true + if name then + local used = usedviews[name] + if used and used ~= true then + -- already done, maybe a warning + elseif type(name) == "number" then + local used = usedinternals[name] + usedviews[name] = view + names[n] = registerautoprefix(name) + doview = true + else + usedviews[name] = view + doview = true + end end end else for n=1,#names do local name = names[n] - if usedviews[name] then - -- already done, maybe a warning - elseif type(name) == "number" then - if noview then - usedviews[name] = view - names[n] = false - else - local used = usedinternals[name] - if used and used ~= defaultview then + if name then + if usedviews[name] then + -- already done, maybe a warning + elseif type(name) == "number" then + if noview then usedviews[name] = view - names[n] = registerautoprefix(name) - doview = true - else names[n] = false + else + local used = usedinternals[name] + if used and used ~= defaultview then + usedviews[name] = view + names[n] = registerautoprefix(name) + doview = true + else + names[n] = false + end end + else + usedviews[name] = view + doview = true end - else - usedviews[name] = view - doview = true end end end @@ -634,20 +641,95 @@ end -- annotations -local function pdffilelink(filename,destination,page,actions) - if not filename or filename == "" or file.basename(filename) == tex.jobname then - return false - end - filename = file.addsuffix(filename,"pdf") - if (not destination or destination == "") or (references.outermethod == v_page) then - destination = pdfarray { (page or 1) - 1, pdf_fit } +local pdffilelink do + + local valid = table.setmetatableindex(function(t,filename) + local found = false + if lfs.isfile(filename) then + report_destinations("loading destinations from file %a",filename) + local pdffile = lpdf.epdf.load(filename) + if pdffile then + local pages = pdffile.pages + local nofpages = pdffile.nofpages + local destinations = pdffile.destinations + if pages and nofpages > 0 and destinations then + local reverse = swapped(pages) + local total = 0 + found = { } + for k, v in next, destinations do + local D = v.D + if D then + found[k] = reverse[D[1]] + total = total + 1 + end + end + t[filename] = found + report_destinations("%i destinations on %i pages found",total,nofpages) + end + end + end + return found + end) + + local pagefromhash = structures.references.pagefromhash + + pdffilelink = function(filename,destination,page,actions) + if not filename or filename == "" or file.basename(filename) == tex.jobname then + return false + end + filename = file.addsuffix(filename,"pdf") + -- page auto name + local forcepage = false + if not destination or destination == "" then + forcepage = true + elseif references.outermethod == v_page then + if not page then + local hash = valid[filename] + page = hash and hash[destination] + if not page or trace_externals then + report_destinations("no %s destination %a in file %a","page",destination,filename) + end + end + forcepage = true + else -- name or auto, maybe only check with auto + local hash = valid[filename] + if hash then + local p = nil + p, destination = pagefromhash(hash,destination,page,actions) + if p then + if references.outermethod == v_name then + -- keep destination string + elseif page then + if p ~= page then + report_destinations("page %i for destination %a in %a conflicts, %i expected",page,destination,filename,p) + page = p + end + forcepage = true + elseif p then + page = p + forcepage = true + end + else + if not page or trace_externals then + report_destinations("no %s destination %a in file %a","name",destination,filename) + end + forcepage = true + end + -- else + -- keep destination string + end + end + if forcepage then + destination = pdfarray { (page or 1) - 1, pdf_fit } + end + return pdfdictionary { + S = pdf_gotor, -- can also be pdf_launch + F = filename, + D = destination or defaultdestination, + NewWindow = actions.newwindow and true or nil, + } end - return pdfdictionary { - S = pdf_gotor, -- can also be pdf_launch - F = filename, - D = destination or defaultdestination, - NewWindow = actions.newwindow and true or nil, - } + end local untex = references.urls.untex @@ -981,6 +1063,9 @@ runners["outer"] = function(var,actions) end runners["outer with inner"] = function(var,actions) + if var.r then + actions.realpage = var.r + end return pdffilelink(references.checkedfile(var.outer),var.inner,var.r,actions) end diff --git a/tex/context/base/mkxl/lpdf-rul.lmt b/tex/context/base/mkxl/lpdf-rul.lmt index 4efa17bb0..ce90488bd 100644 --- a/tex/context/base/mkxl/lpdf-rul.lmt +++ b/tex/context/base/mkxl/lpdf-rul.lmt @@ -21,7 +21,7 @@ local ruleactions = nuts.rules.ruleactions local getwhd = nuts.getwhd -local lefttoright_code = nodes.dirvalues.lefttoright +local lefttoright_code = tex.directioncodes.lefttoright local mpcolor = attributes.colors.mpcolor diff --git a/tex/context/base/mkxl/luat-run.lmt b/tex/context/base/mkxl/luat-run.lmt index f6b2ea063..c53817697 100644 --- a/tex/context/base/mkxl/luat-run.lmt +++ b/tex/context/base/mkxl/luat-run.lmt @@ -211,6 +211,14 @@ function luatex.currentfile() return stack[#stack] or tex.jobname end +function luatex.currentlevel() + return level +end + +function luatex.currenttotal() + return total +end + local function report_start(name,rest) if rest then -- luatex diff --git a/tex/context/base/mkxl/math-acc.mklx b/tex/context/base/mkxl/math-acc.mklx index c3c4a5d34..8c5a1adfa 100644 --- a/tex/context/base/mkxl/math-acc.mklx +++ b/tex/context/base/mkxl/math-acc.mklx @@ -32,6 +32,35 @@ %D Older implementations are kept in the \MKII\ and \MKIV\ modules for educational %D purposes. +%D Only very few fonts provide flat accents but we emulate them for those that don't +%D have them. We also need to fix the related font parameter for a few fonts like +%D Lucida and Garamond. + +% \startbuffer +% \im{ +% \dostepwiserecurse{`A}{`Z}{1}{ +% \blackrule[height=\the\Umathflattenedaccentbaseheight\textstyle,depth=0pt,width=0.05ts] +% \hat{\char#1} +% } +% } +% \stopbuffer +% +% \start % TEXpage[offset=1ts] +% \showglyphs +% \switchtobodyfont[modern] \getbuffer\par +% \switchtobodyfont[erewhon] \getbuffer\par +% \switchtobodyfont[concrete] \getbuffer\par +% \switchtobodyfont[libertinus] \getbuffer\par +% \switchtobodyfont[stixtwo] \getbuffer\par +% \switchtobodyfont[kpfonts] \getbuffer\par +% \switchtobodyfont[minion] \getbuffer\par +% \switchtobodyfont[schola] \getbuffer\par +% \switchtobodyfont[lucida] \getbuffer\par +% \switchtobodyfont[xcharter] \getbuffer\par +% \switchtobodyfont[libertinus] \getbuffer\par +% \switchtobodyfont[termes] \getbuffer\par +% \stop %TEXpage + \installcorenamespace{mathaccents} \installcommandhandler \??mathaccents {mathaccent} \??mathaccents @@ -166,7 +195,7 @@ \definemathtopaccent[\v!top][acute] ["0301] \definemathtopaccent[\v!top][hat] ["0302] \definemathtopaccent[\v!top][tilde] ["0303] -\definemathtopaccent[\v!top][bar] ["0304] +\definemathtopaccent[\v!top][bar] ["0305] %definemathtopaccent[\v!top][overbar] ["0305]% We expect overbar to stretch, so later \definemathtopaccent[\v!top][breve] ["0306] \definemathtopaccent[\v!top][dot] ["0307] diff --git a/tex/context/base/mkxl/math-act.lmt b/tex/context/base/mkxl/math-act.lmt index 4a46baff9..e8310ef2b 100644 --- a/tex/context/base/mkxl/math-act.lmt +++ b/tex/context/base/mkxl/math-act.lmt @@ -296,7 +296,7 @@ local function report_tweak(fmt,target,original,...) metadata and metadata.fontname or "unknown", parameters.size or 655360, parameters.mathsize or 1, - string.formatters[fmt](...) + formatters[fmt](...) ) else print("something is wrong") @@ -1701,7 +1701,8 @@ do accent = { [0x0300] = over, -- widegrave [0x0308] = over, -- wideddot - [0x0304] = over, -- widebar + [0x0304] = over, -- macron (bar) + [0x0305] = over, -- widebar [0x0301] = over, -- wideacute [0x0302] = over, -- widehat [0x030C] = over, -- widecheck @@ -2116,7 +2117,7 @@ do local force = false experiments.register("math.arrows", function(v) force = v end) local function tighten(target,unicode,left,right,squeeze,yoffset) - local name = string.formatters["math tightened %U %.3N %.3N %.3N %.3N"](unicode,left,right,squeeze,yoffset) + local name = formatters["math tightened %U %.3N %.3N %.3N %.3N"](unicode,left,right,squeeze,yoffset) local slot = privateslot(target,name) if not slot then local characters = target.characters @@ -2654,17 +2655,17 @@ do -- see pagella for an extensive example local nps = fonts.helpers.newprivateslot local mapping = { - [0x0300] = { 0x0060, false, nps("flat 0x0060 1") }, - [0x0308] = { 0x00A8, false, nps("flat 0x00A8 1") }, - [0x0304] = { 0x00AF, false, nps("flat 0x00AF 1") }, - [0x0301] = { 0x00B4, false, nps("flat 0x00B4 1") }, - [0x0302] = { 0x02C6, true, nps("flat 0x02C6 1") }, - [0x030C] = { 0x02C7, true, nps("flat 0x02C7 1") }, - [0x0306] = { 0x02D8, false, nps("flat 0x02D8 1") }, - [0x0307] = { 0x02D9, false, nps("flat 0x02D9 1") }, - [0x030A] = { 0x02DA, false, nps("flat 0x02DA 1") }, - [0x0303] = { 0x02DC, true, nps("flat 0x02DC 1") }, - [0x20DB] = { 0x20DB, false, nps("flat 0x20DB 1") }, + [0x0300] = { 0x0060, false }, + [0x0308] = { 0x00A8, false }, + [0x0304] = { 0x00AF, false }, -- 305 + [0x0301] = { 0x00B4, false }, + [0x0302] = { 0x02C6, true }, + [0x030C] = { 0x02C7, true }, + [0x0306] = { 0x02D8, false }, + [0x0307] = { 0x02D9, false }, + [0x030A] = { 0x02DA, false }, + [0x0303] = { 0x02DC, true }, + [0x20DB] = { 0x20DB, false }, } datasets.fixaccents = mapping @@ -2686,6 +2687,15 @@ do -- see pagella for an extensive example stretchingdata.advance = 0 stretchingdata.topanchor = topanchor stretchingdata.commands = { rightcommand[width + topanchor], charcommand[stretching] } +-- local flat = stretchingdata.flataccent +-- if flat then +-- -- Nasty! xoffset needed. Check this when we patch vf. +-- local flatdata = characters[flat] +-- flatdata.width = width +-- flatdata.advance = 0 +-- flatdata.topanchor = topanchor +-- flatdata.xoffset = width + topanchor +-- end if not trace_tweaking then done = true elseif done then @@ -2753,20 +2763,23 @@ do -- see pagella for an extensive example -- offset factor 0.9|calculated -- squeeze factor 0.1|calculated + local f_flat = formatters["flat accent %05X"] + function mathtweaks.flattenaccents(target,original,parameters) local characters = target.characters local force = parameters.force - local squeeze = parameters.squeeze or 0.8 - local ofactor = parameters.offset or (squeeze/2) + local squeeze = parameters.squeeze or 0.85 + local ofactor = parameters.offset or (squeeze/8.5) local hfactor = parameters.height or (1 - ofactor) local done = false for stretching, entry in sortedhash(mapping) do + local code = stretching local last = characters[stretching] while last do if force or not last.flataccent then - local slot = entry[3] + local slot = nps(f_flat(code)) local data = copytable(last) - local height = data.height or 0 + local height = data.height or 0 data.effect = { squeeze = squeeze } data.height = hfactor * height data.yoffset = ofactor * height @@ -2780,9 +2793,9 @@ do -- see pagella for an extensive example done = { [stretching] = true } end end - local n = last.next - if n then - last = characters[n] + code = last.next + if code then + last = characters[code] else break end diff --git a/tex/context/base/mkxl/math-fen.mkxl b/tex/context/base/mkxl/math-fen.mkxl index a69cafb97..a01f589e5 100644 --- a/tex/context/base/mkxl/math-fen.mkxl +++ b/tex/context/base/mkxl/math-fen.mkxl @@ -981,7 +981,11 @@ \protected\def\math_choosemathbig_math#1#2% so we accept \big{||} as well {\math_fenced_force_size\bigmathdelimitervariant{#1}\relax - \Uvextensible#2\relax + \Uvextensible + \s!axis + \s!exact + #2% + \relax \c_attr_mathsize\attributeunsetvalue} \protected\def\math_choosemathbig_text#1#2% so we accept \big{||} as well @@ -996,7 +1000,11 @@ \permanent\protected\def\mathdelimiterstep#1#2% not used, only in example {\begingroup \math_fenced_force_size\plusone{#1}% - \Uvextensible#2\relax + \Uvextensible + \s!axis + \s!exact + #2% + \relax \endgroup} \definemathcommand [big] {\choosemathbig1} diff --git a/tex/context/base/mkxl/math-ini.mkxl b/tex/context/base/mkxl/math-ini.mkxl index 6f2dfc1c2..2529890d7 100644 --- a/tex/context/base/mkxl/math-ini.mkxl +++ b/tex/context/base/mkxl/math-ini.mkxl @@ -1422,20 +1422,20 @@ \inherited\setmathspacing \mathtextpunctuationcode \mathdifferentialcode \allmathstyles \mathinterwordmuskip \inherited\setmathspacing \mathtextpunctuationcode \mathpunctuationcode \allmathstyles \mathinterwordmuskip % - \inherited\setmathspacing \mathordinarycode \mathtextpunctuationcode \allmathstyles \tinymuskip - \inherited\setmathspacing \mathoperatorcode \mathtextpunctuationcode \allmathstyles \tinymuskip - \inherited\setmathspacing \mathbinarycode \mathtextpunctuationcode \allmathstyles \tinymuskip - \inherited\setmathspacing \mathrelationcode \mathtextpunctuationcode \allmathstyles \tinymuskip - \inherited\setmathspacing \mathopencode \mathtextpunctuationcode \allmathstyles \tinymuskip - \inherited\setmathspacing \mathmiddlecode \mathtextpunctuationcode \allmathstyles \tinymuskip - \inherited\setmathspacing \mathclosecode \mathtextpunctuationcode \allmathstyles \tinymuskip - \inherited\setmathspacing \mathpunctuationcode \mathtextpunctuationcode \allmathstyles \tinymuskip - \inherited\setmathspacing \mathconstructcode \mathtextpunctuationcode \allmathstyles \tinymuskip - \inherited\setmathspacing \mathellipsiscode \mathtextpunctuationcode \allmathstyles \tinymuskip - \inherited\setmathspacing \mathfractioncode \mathtextpunctuationcode \allmathstyles \tinymuskip - \inherited\setmathspacing \mathradicalcode \mathtextpunctuationcode \allmathstyles \tinymuskip - \inherited\setmathspacing \mathdifferentialcode \mathtextpunctuationcode \allmathstyles \tinymuskip - \inherited\setmathspacing \mathpunctuationcode \mathtextpunctuationcode \allmathstyles \tinymuskip + \inherited\setmathspacing \mathordinarycode \mathtextpunctuationcode \allmathstyles \pettymuskip + \inherited\setmathspacing \mathoperatorcode \mathtextpunctuationcode \allmathstyles \pettymuskip + \inherited\setmathspacing \mathbinarycode \mathtextpunctuationcode \allmathstyles \pettymuskip + \inherited\setmathspacing \mathrelationcode \mathtextpunctuationcode \allmathstyles \pettymuskip + \inherited\setmathspacing \mathopencode \mathtextpunctuationcode \allmathstyles \pettymuskip + \inherited\setmathspacing \mathmiddlecode \mathtextpunctuationcode \allmathstyles \pettymuskip + \inherited\setmathspacing \mathclosecode \mathtextpunctuationcode \allmathstyles \pettymuskip + \inherited\setmathspacing \mathpunctuationcode \mathtextpunctuationcode \allmathstyles \pettymuskip + \inherited\setmathspacing \mathconstructcode \mathtextpunctuationcode \allmathstyles \pettymuskip + \inherited\setmathspacing \mathellipsiscode \mathtextpunctuationcode \allmathstyles \pettymuskip + \inherited\setmathspacing \mathfractioncode \mathtextpunctuationcode \allmathstyles \pettymuskip + \inherited\setmathspacing \mathradicalcode \mathtextpunctuationcode \allmathstyles \pettymuskip + \inherited\setmathspacing \mathdifferentialcode \mathtextpunctuationcode \allmathstyles \pettymuskip + \inherited\setmathspacing \mathpunctuationcode \mathtextpunctuationcode \allmathstyles \pettymuskip \stopsetups \directsetup{math:spacing:default} diff --git a/tex/context/base/mkxl/math-noa.lmt b/tex/context/base/mkxl/math-noa.lmt index f64783ed9..ef75ac4c4 100644 --- a/tex/context/base/mkxl/math-noa.lmt +++ b/tex/context/base/mkxl/math-noa.lmt @@ -881,52 +881,49 @@ do local method = div(a,100) local size = a % 100 setattr(pointer,a_mathsize,0) - local delimiter = getdelimiter(pointer) - if delimiter then - local oldchar, font, fam = getcharspec(delimiter) - if oldchar > 0 and font > 0 then - local ht = getheight(pointer) - local dp = getdepth(pointer) - local data = fontdata[font] - local characters = data.characters - local olddata = characters[oldchar] - if olddata then --- local oldheight = olddata.height or 0 --- local olddepth = olddata.depth or 0 - local template = olddata.varianttemplate - local newchar = mathematics.big(data,template or oldchar,size,method) - local newdata = characters[newchar] - local newheight = newdata.height or 0 - local newdepth = newdata.depth or 0 - if template then --- local ratio = (newheight + newdepth) / (oldheight + olddepth) --- setheight(pointer,ratio * oldheight) --- setdepth(pointer,ratio * olddepth) - setheight(pointer,newheight) - setdepth(pointer,newdepth) - if not olddata.extensible then - -- check this on bonum and antykwa - setoptions(pointer,0) - end - if trace_fences then --- report_fences("replacing %C using method %a, size %a, template %C and ratio %.3f",newchar,method,size,template,ratio) - report_fences("replacing %C using method %a, size %a and template %C",newchar,method,size,template) - end - else - -- 1 scaled point is a signal, for now - if ht == 1 then + if size ~= 0 then + local delimiter = getdelimiter(pointer) + if delimiter then + local oldchar, font, fam = getcharspec(delimiter) + if oldchar > 0 and font > 0 then + local ht = getheight(pointer) + local dp = getdepth(pointer) + local data = fontdata[font] + local characters = data.characters + local olddata = characters[oldchar] + if olddata then + local template = olddata.varianttemplate + local newchar = mathematics.big(data,template or oldchar,size,method) + local newdata = characters[newchar] + local newheight = newdata.height or 0 + local newdepth = newdata.depth or 0 + if template then setheight(pointer,newheight) - end - if dp == 1 then setdepth(pointer,newdepth) + if not olddata.extensible then + -- check this on bonum and antykwa + setoptions(pointer,0) + end + setoptions(pointer,getoptions(pointer)| tex.noadoptioncodes.scale ) + if trace_fences then + report_fences("replacing %C using method %a, size %a and template %C",newchar,method,size,template) + end + else + -- 1 scaled point is a signal, for now + if ht == 1 then + setheight(pointer,newheight) + end + if dp == 1 then + setdepth(pointer,newdepth) + end + setchar(delimiter,newchar) + if trace_fences then + report_fences("replacing %C by %C using method %a and size %a",oldchar,char,method,size) + end end - setchar(delimiter,newchar) - if trace_fences then - report_fences("replacing %C by %C using method %a and size %a",oldchar,char,method,size) - end + elseif trace_fences then + report_fences("not replacing %C using method %a and size %a",oldchar,method,size) end - elseif trace_fences then - report_fences("not replacing %C using method %a and size %a",oldchar,method,size) end end end @@ -1556,18 +1553,22 @@ do local attributes = mathalternates.attributes local registered = mathalternates.registered local hashes = mathalternates.hashes + local newchar = nil for i=1,#registered do local r = registered[i] if (a & r) ~= 0 then - local char = getchar(pointer) + local char = newchar or getchar(pointer) local alt = hashes[i][char] if alt == nil then local what = attributes[r] +local list = what.list +if not list or list[char] then alt = otf.getalternate(fontdata[fontid],char,what.feature,what.value) or false if alt == char then alt = false end hashes[i][char] = alt +end end if alt then if trace_alternates then @@ -1575,11 +1576,15 @@ do report_alternates("alternate %a, value %a, replacing glyph %U by glyph %U", tostring(what.feature),tostring(what.value),char,alt) end - setchar(pointer,alt) - break + -- setchar(pointer,alt) + -- break + newchar = alt end end end + if newchar then + setchar(pointer,newchar) + end end end end diff --git a/tex/context/base/mkxl/math-ttv.lmt b/tex/context/base/mkxl/math-ttv.lmt index 3393ecc03..06d92e8b9 100644 --- a/tex/context/base/mkxl/math-ttv.lmt +++ b/tex/context/base/mkxl/math-ttv.lmt @@ -144,7 +144,8 @@ mathencodings["tex-mr"] = { -- [0x002C7] = 0x14, -- [math]check -- [0x002D8] = 0x15, -- [math]breve -- [0x000AF] = 0x16, -- [math]bar --- [0x00021] = 0x21, -- ! +[0x00021] = 0x21, -- ! -- MS +[0x00026] = 0x26, -- & -- MS [0x00028] = 0x28, -- ( [0x00029] = 0x29, -- ) [0x0002B] = 0x2B, -- + diff --git a/tex/context/base/mkxl/math-vfu.lmt b/tex/context/base/mkxl/math-vfu.lmt index 1639517b5..237b39d9f 100644 --- a/tex/context/base/mkxl/math-vfu.lmt +++ b/tex/context/base/mkxl/math-vfu.lmt @@ -745,6 +745,7 @@ local function copy_glyph(main,target,original,unicode,slot) kerns = olddata.kerns, mathkerns = olddata.mathkerns, tounicode = olddata.tounicode, +-- smaller = olddata.smaller, commands = { slotcommand[slot][unicode] }, } local glyphdata = newdata @@ -1058,7 +1059,7 @@ function vfmath.define(specification,set,goodies) mathparameters.axisheight = newparameters[22] or 0 -- axisheight : height of fraction lines above the baseline -- report_virtual("loading and virtualizing font %a at size %p, setting sy parameters",name,size) end - -- We no longer care about kerns and ligatures here. We use backmack because we need to know + -- We no longer care about kerns and ligatures here. We use backmap because we need to know -- the original order and the loader has made a unicode font of it and weird glyph names have -- spoiled that a bit too. if ss.overlay then diff --git a/tex/context/base/mkxl/node-dir.lmt b/tex/context/base/mkxl/node-dir.lmt index 246bf34e4..5692fddb7 100644 --- a/tex/context/base/mkxl/node-dir.lmt +++ b/tex/context/base/mkxl/node-dir.lmt @@ -14,7 +14,8 @@ local hlist_code = nodecodes.hlist local vlist_code = nodecodes.vlist local normaldir_code = nodes.dircodes.normal local line_code = nodes.listcodes.line -local lefttoright_code = nodes.dirvalues.lefttoright + +local lefttoright_code = tex.directioncodes.lefttoright local getnext = nuts.getnext local getlist = nuts.getlist diff --git a/tex/context/base/mkxl/node-ini.lmt b/tex/context/base/mkxl/node-ini.lmt index 38f55c160..435f3bf7e 100644 --- a/tex/context/base/mkxl/node-ini.lmt +++ b/tex/context/base/mkxl/node-ini.lmt @@ -23,7 +23,7 @@ local allocate = utilities.storage.allocate local formatcolumns = utilities.formatters.formatcolumns local getsubtypes = node.subtypes -local getvalues = node.values +----- getvalues = node.values local listcodes = mark(getsubtypes("list")) local rulecodes = mark(getsubtypes("rule")) @@ -45,10 +45,6 @@ local choicecodes = mark(getsubtypes("choice")) local parcodes = mark(getsubtypes("par")) local attributecodes = mark(getsubtypes("attribute")) -local fillvalues = mark(getvalues("fill")) -local dirvalues = mark(getvalues("dir")) -local mathvalues = mark(getvalues("math")) - local function simplified(t) local r = { } for k, v in next, t do @@ -57,17 +53,17 @@ local function simplified(t) return r end -local noadoptions = allocate { - set = 0x08, - unused_1 = 0x00 + 0x08, - unused_2 = 0x01 + 0x08, - axis = 0x02 + 0x08, - no_axis = 0x04 + 0x08, - exact = 0x10 + 0x08, - left = 0x11 + 0x08, - middle = 0x12 + 0x08, - right = 0x14 + 0x08, -} +-- local noadoptions = allocate { +-- set = 0x08, +-- unused_1 = 0x00 + 0x08, +-- unused_2 = 0x01 + 0x08, +-- axis = 0x02 + 0x08, +-- no_axis = 0x04 + 0x08, +-- exact = 0x10 + 0x08, +-- left = 0x11 + 0x08, +-- middle = 0x12 + 0x08, +-- right = 0x14 + 0x08, +-- } local nodecodes = simplified(node.types()) @@ -90,11 +86,6 @@ choicecodes = allocate(swapped(choicecodes,choicecodes)) parcodes = allocate(swapped(parcodes,parcodes)) attributecodes = allocate(swapped(attributecodes,attributecodes)) rulecodes = allocate(swapped(rulecodes,rulecodes)) -noadoptions = allocate(swapped(noadoptions,noadoptions)) - -dirvalues = allocate(swapped(dirvalues,dirvalues)) -fillvalues = allocate(swapped(fillvalues,fillvalues)) -mathvalues = allocate(swapped(mathvalues,mathvalues)) nodes.gluecodes = gluecodes nodes.dircodes = dircodes @@ -115,24 +106,26 @@ nodes.parcodes = parcodes nodes.attributecodes = attributecodes nodes.rulecodes = rulecodes -nodes.noadoptions = noadoptions -nodes.fillvalues = fillvalues -nodes.fillcodes = fillvalues -- for now -nodes.dirvalues = dirvalues -nodes.mathvalues = mathvalues +nodes.nodecodes = nodecodes + +-- these are now in tex namespace but we keep them for old times sake -nodes.nodecodes = nodecodes +nodes.fillvalues = tex.fillcodes +nodes.fillcodes = tex.fillcodes +nodes.dirvalues = tex.directioncodes +nodes.directionvalues = tex.directioncodes +nodes.mathvalues = tex.mathparametercodes -- we will transition to more verbose subtypes (after other math is done) -noadcodes.ord = noadcodes.ord or noadcodes.ordinary -noadcodes.operator = noadcodes.op or noadcodes.operator -noadcodes.bin = noadcodes.bin or noadcodes.binary -noadcodes.rel = noadcodes.rel or noadcodes.relation -noadcodes.punct = noadcodes.punct or noadcodes.punctuation -noadcodes.rad = noadcodes.rad or noadcodes.radical -noadcodes.frac = noadcodes.frac or noadcodes.fraction -noadcodes.acc = noadcodes.acc or noadcodes.accent +noadcodes.ord = noadcodes.ord or noadcodes.ordinary +noadcodes.operator = noadcodes.op or noadcodes.operator +noadcodes.bin = noadcodes.bin or noadcodes.binary +noadcodes.rel = noadcodes.rel or noadcodes.relation +noadcodes.punct = noadcodes.punct or noadcodes.punctuation +noadcodes.rad = noadcodes.rad or noadcodes.radical +noadcodes.frac = noadcodes.frac or noadcodes.fraction +noadcodes.acc = noadcodes.acc or noadcodes.accent -- so for now: @@ -188,8 +181,6 @@ nodes.skipcodes = gluecodes nodes.directioncodes = dircodes nodes.discretionarycodes = disccodes -nodes.directionvalues = dirvalues - glyphcodes.glyph = glyphcodes.character gluecodes.parfillrightskip = gluecodes.parfillrightskip or gluecodes.parfillskip @@ -201,18 +192,6 @@ listcodes.column = listcodes.alignment kerncodes.kerning = kerncodes.fontkern kerncodes.italiccorrection = kerncodes.italiccorrection or 1 -- new -nodes.noadoptions = { - set = 0x08, - unused_1 = 0x00 + 0x08, - unused_2 = 0x01 + 0x08, - axis = 0x02 + 0x08, - no_axis = 0x04 + 0x08, - exact = 0x10 + 0x08, - left = 0x11 + 0x08, - middle = 0x12 + 0x08, - right = 0x14 + 0x08, -} - -- We use the real node code numbers. local texsetintegervalue = tex.setintegervalue diff --git a/tex/context/base/mkxl/node-ref.lmt b/tex/context/base/mkxl/node-ref.lmt index 15c35cba9..18bda16e9 100644 --- a/tex/context/base/mkxl/node-ref.lmt +++ b/tex/context/base/mkxl/node-ref.lmt @@ -96,9 +96,9 @@ local nodecodes = nodes.nodecodes local gluecodes = nodes.gluecodes local listcodes = nodes.listcodes -local dirvalues = nodes.dirvalues -local lefttoright_code = dirvalues.lefttoright -local righttoleft_code = dirvalues.righttoleft +local directioncodes = tex.directioncodes +local lefttoright_code = directioncodes.lefttoright +local righttoleft_code = directioncodes.righttoleft local hlist_code = nodecodes.hlist local vlist_code = nodecodes.vlist @@ -689,7 +689,8 @@ do local function setdestination(n,h,d,name,view) -- n = grouplevel, name == table topofstack = topofstack + 1 - stack[topofstack] = { n, h, d, name, view } + -- stack[topofstack] = { n, h, d, name, view } + stack[topofstack] = { n, h or false, d or false, name, view } return topofstack end diff --git a/tex/context/base/mkxl/node-res.lmt b/tex/context/base/mkxl/node-res.lmt index 2d2c31965..b514a3568 100644 --- a/tex/context/base/mkxl/node-res.lmt +++ b/tex/context/base/mkxl/node-res.lmt @@ -174,7 +174,7 @@ local cleader = register_nut(copy_nut(glue)) setsubtype(cleader,glueco -- the dir field needs to be set otherwise crash: -local lefttoright_code = nodes.dirvalues.lefttoright +local lefttoright_code = tex.directioncodes.lefttoright local rule = register_nut(new_nut(rule_code)) -- setdirection(rule, lefttoright_code) local emptyrule = register_nut(new_nut(rule_code,rulecodes.empty)) -- setdirection(rule, lefttoright_code) diff --git a/tex/context/base/mkxl/node-tra.lmt b/tex/context/base/mkxl/node-tra.lmt index fe212f787..4aa476ce5 100644 --- a/tex/context/base/mkxl/node-tra.lmt +++ b/tex/context/base/mkxl/node-tra.lmt @@ -65,7 +65,7 @@ local new_rule = nutpool.rule local nodecodes = nodes.nodecodes local whatsitcodes = nodes.whatsitcodes -local fillcodes = nodes.fillcodes +local fillcodes = tex.fillcodes local subtypes = nodes.subtypes diff --git a/tex/context/base/mkxl/phys-dim.mkxl b/tex/context/base/mkxl/phys-dim.mkxl index 1d5e7fff6..2dc6e7e1e 100644 --- a/tex/context/base/mkxl/phys-dim.mkxl +++ b/tex/context/base/mkxl/phys-dim.mkxl @@ -706,9 +706,16 @@ \fi :} +% \permanent\protected\def\unitsSOLIDUS +% {\ifnum\c_phys_units_state=\plusone % suffix +% \unitsbackspace +% \fi +% {/}% +% }%\unitsbackspace} + \permanent\protected\def\unitsSOLIDUS {\ifnum\c_phys_units_state=\plusone % suffix - \unitsbackspace + \ifmmode\else\unitsbackspace\fi % we have advanced solidus handling in math \fi {/}% }%\unitsbackspace} diff --git a/tex/context/base/mkxl/spac-ali.lmt b/tex/context/base/mkxl/spac-ali.lmt index 9fa024672..0eeda643a 100644 --- a/tex/context/base/mkxl/spac-ali.lmt +++ b/tex/context/base/mkxl/spac-ali.lmt @@ -22,7 +22,8 @@ local takeattr = nuts.takeattr local getwidth = nuts.getwidth local findtail = nuts.tail -local righttoleft_code = nodes.dirvalues.righttoleft +local righttoleft_code = tex.directioncodes.righttoleft + local linelist_code = nodes.listcodes.line local hpack_nodes = nuts.hpack diff --git a/tex/context/base/mkxl/strc-lst.lmt b/tex/context/base/mkxl/strc-lst.lmt index d54129f29..312a815cd 100644 --- a/tex/context/base/mkxl/strc-lst.lmt +++ b/tex/context/base/mkxl/strc-lst.lmt @@ -37,7 +37,8 @@ local conditionals = tex.conditionals local ctx_latelua = context.latelua -local cheat = true +----- cheat = true -- fragile when we have a multi-component document with cross references +local cheat = false -- so this will become a directive or maybe even just an experiment local structures = structures local lists = structures.lists @@ -259,27 +260,34 @@ function lists.addto(t) -- maybe more more here (saves parsing at the tex end) numberdata.numbers = cached[groupindex].numberdata.numbers end end - local setcomponent = references.setcomponent - if setcomponent then - setcomponent(t) -- can be inlined - end + -- +-- local setcomponent = references.setcomponent +-- if setcomponent then +-- setcomponent(t) -- can be inlined, will be replaced by setstructure below +-- end + -- local r = t.references - 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) - if tag and tag ~= "?" then - r.tag = tag -- todo: use internal ... is unique enough + if r then + if not r.section then + r.section = structures.sections.currentid() + end + if not r.structure then + r.structure = resolvers.jobs.currentstructure() + end + local b = r and t.block + if 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 + if kind and name then + local tag = tags.getid(kind,name) + if tag and tag ~= "?" then + r.tag = tag -- todo: use internal ... is unique enough + end end end local p = pushed[i] @@ -597,7 +605,7 @@ filters[v_intro] = function(specification) return result end -filters[v_reference] = function(specification) +filters[v_reference] = function(specification) -- this will go away local collected = specification.collected local result = { } local nofresult = 0 @@ -954,7 +962,6 @@ 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 @@ -1016,10 +1023,9 @@ function lists.process(specification) local references = listentry.references local special = specials and numberdata and specials[zerostrippedconcat(numberdata.numbers,".")] or "" local view = usedviews[i] - -- if cheat and references then - -- -- HH: I still need to test this patch: +-- if cheat and references and cheats[view] then if cheat and references and view and cheats[view] then - -- this permits runs=2 with interactivity + -- this permits runs=2 with interactivity local internal = references.internal usedinternals[internal] = true usedviews [internal] = references.view @@ -1591,6 +1597,12 @@ function lists.integrate(utilitydata) -- references.internal = nil -- references.realpage = nil -- references.section = nil + if references.view then + references.view = nil + end + if references.used then + references.used = nil + end if references.x then references.x = nil end diff --git a/tex/context/base/mkxl/strc-ref.lmt b/tex/context/base/mkxl/strc-ref.lmt index 945364b18..6a320f141 100644 --- a/tex/context/base/mkxl/strc-ref.lmt +++ b/tex/context/base/mkxl/strc-ref.lmt @@ -30,6 +30,7 @@ local trace_referencing = false trackers.register("structures.referencing", local trace_analyzing = false trackers.register("structures.referencing.analyzing", function(v) trace_analyzing = v end) local trace_identifying = false trackers.register("structures.referencing.identifying", function(v) trace_identifying = v end) local trace_importing = false trackers.register("structures.referencing.importing", function(v) trace_importing = v end) +local trace_external = false trackers.register("structures.referencing.external", function(v) trace_external = v end) local trace_empty = false trackers.register("structures.referencing.empty", function(v) trace_empty = v end) local check_duplicates = true @@ -39,6 +40,7 @@ directives.register("structures.referencing.checkduplicates", function(v) check_ local report_references = logs.reporter("references") local report_identifying = logs.reporter("references","identifying") local report_importing = logs.reporter("references","importing") +local report_external = logs.reporter("references","external") local report_empty = logs.reporter("references","empty") local report = report_references @@ -174,6 +176,11 @@ local function initializer() -- can we use a tobesaved as metatable for collecte if i then internals[i] = data usedinternals[i] = r.used + local structure = r.structure + if structure then + structure = resolvers.jobs.namelist(structure,namestack) + r.namestack = structure + end end end end @@ -347,26 +354,37 @@ local function currentorder(kind,name) return orders[kind] and orders[kind][name] or lastorder end -local function setcomponent(data) - -- we might consider doing this at the tex end, just like prefix - local component = productcomponent() - if component then - local references = data and data.references - if references then - references.component = component - if references.prefix == component then - references.prefix = nil - end - end - return component - end - -- but for the moment we do it here (experiment) -end +-- local function setstructure(data) +-- local structure = resolvers.jobs.currentnamehash() +-- if structure then +-- local references = data and data.references +-- if references then +-- references.structure = structure +-- end +-- end +-- end + +-- local function setcomponent(data) +-- -- we might consider doing this at the tex end, just like prefix +-- local component = productcomponent() -- todo: maybe a list +-- -- local component = resolvers.jobs.currentcomponent() +-- if component then +-- local references = data and data.references +-- if references then +-- references.component = component +-- if references.prefix == component then +-- references.prefix = nil +-- end +-- end +-- return component +-- end +-- end references.setnextorder = setnextorder references.setnextinternal = setnextinternal references.currentorder = currentorder -references.setcomponent = setcomponent +references.setstructure = resolvers.jobs.currentstructure -- yes or no here +----------.setcomponent = setcomponent -- implement { -- name = "setnextreferenceorder", @@ -405,6 +423,9 @@ function references.set(data) -- report_references("invalid reference") -- harmless return 0 end + -- + references.structure = resolvers.jobs.currentstructure() + -- local prefix = references.prefix or "" local pd = tobesaved[prefix] -- nicer is a metatable if not pd then @@ -497,31 +518,82 @@ implement { -- no metatable here .. better be sparse -local function register_from_list(collected,derived,external) +local function register_from_list(collected,derived,external,namestack) local derived_g = derived[""] -- global local derived_p = nil local derived_c = nil local prefix = nil - local component = nil +-- local component = nil local entry = nil if not derived_g then derived_g = { } derived[""] = derived_g end - local function action(s) - if trace_referencing then - report_references("list entry %a provides %a reference %a on realpage %a",i,kind,s,realpage) - end - if derived_p and not derived_p[s] then - derived_p[s] = entry - end - if derived_c and not derived_c[s] then - derived_c[s] = entry + local action = trace_external and + function(s) + if structure then + for i=1,#structure do + local si = structure[i] + -- if si == component then + -- -- skipped + -- elseif si == prefix then + -- -- skipped + -- else + local ds = derived[si] + if not ds then + derived[si] = { [s] = entry } + report_external("reference %a, %s %a",s,"structure",si) + elseif not ds[s] then + ds[s] = entry + report_external("reference %a, %s %a",s,"structure",si) + end + -- end + end + end + if derived_p and not derived_p[s] then + report_external("reference %a, %s %a",s,"prefix",prefix) + derived_p[s] = entry + + end +-- if derived_c and not derived_c[s] then +-- report_external("reference %a, %s %a",s,"component",component) +-- derived_c[s] = entry +-- end + if not derived_g[s] then + report_external("reference %a, %s %a",s,"global","") + derived_g[s] = entry -- first wins + end end - if not derived_g[s] then - derived_g[s] = entry -- first wins + or + function(s) + if derived_p and not derived_p[s] then + derived_p[s] = entry + end +-- if derived_c and not derived_c[s] then +-- derived_c[s] = entry +-- end + if not derived_g[s] then + derived_g[s] = entry -- first wins + end + if structure then + for i=1,#structure do + local si = structure[i] + if si == component then + -- skipped + elseif si == prefix then + -- skipped + else + local ds = derived[si] + if not ds then + derived[si] = { [s] = entry } + elseif not ds[s] then + ds[s] = entry + end + end + end + end end - end + -- for i=1,#collected do entry = collected[i] local metadata = entry.metadata @@ -535,20 +607,32 @@ local function register_from_list(collected,derived,external) local realpage = references.realpage if realpage then prefix = references.prefix - component = references.component +-- component = references.component if prefix and prefix ~= "" then derived_p = derived[prefix] if not derived_p then derived_p = { } derived[prefix] = derived_p end + else + derived_p = nil end - if component and component ~= "" and component ~= prefix then - derived_c = derived[component] - if not derived_c then - derived_c = { } - derived[component] = derived_c - end +-- if component and component ~= "" and component ~= prefix then +-- derived_c = derived[component] +-- if not derived_c then +-- derived_c = { } +-- derived[component] = derived_c +-- end +-- else +-- derived_c = nil +-- end + structure = references.structure + if structure then + structure = resolvers.jobs.namelist(structure,namestack) + references.namestack = structure + end + if trace_referencing or trace_external then + report_references("list entry %a provides %a reference %a on realpage %a",i,kind,reference,realpage) end process_settings(reference,action) end @@ -567,7 +651,7 @@ function references.integrate(utilitydata) if structures then local lists = structures.lists.collected if lists then - register_from_list(lists,derived,filename) + register_from_list(lists,derived,filename,utilitydata) end end end @@ -575,7 +659,7 @@ end references.registerinitializer(function() -- the main document - register_from_list(lists.collected,derived) + register_from_list(lists.collected,derived) -- false, false end) -- tracing @@ -652,10 +736,10 @@ end) -- urls -local urls = references.urls or { } -references.urls = urls -local urldata = urls.data or { } -urls.data = urldata +local urls = references.urls or { } +references.urls = urls +local urldata = urls.data or { } +urls.data = urldata local p_untexurl = Cs ( ( P("\\")/"" * (P("%")/"%%" + P(1)) @@ -1097,13 +1181,6 @@ local function loadexternalreferences(name,utilitydata) target = { } external[prefix] = target end - -- for s in gmatch(reference,"%s*([^,]+)") do - -- if trace_importing then - -- report_importing("registering %s reference, kind %a, name %a, prefix %a, reference %a", - -- "external",kind,name,prefix,s) - -- end - -- target[s] = target[s] or entry - -- end local function action(s) if trace_importing then report_importing("registering %s reference, kind %a, name %a, prefix %a, reference %a", @@ -1147,7 +1224,7 @@ setmetatableindex(externals, function(t,k) -- either or not automatically return false end) -local productdata = allocate { +local productdata = allocate { -- will go productreferences = { }, componentreferences = { }, components = { }, @@ -1196,6 +1273,13 @@ local function loadproductreferences(productname,componentname,utilitydata) if kind and realpage then local prefix = references.prefix or "" local component = references.component + + -- local structure = references.structure + -- print("!!!!!!!!",structure) + -- if structure then + -- inspect(resolvers.job.namelist(structure)) + -- end + local ctarget, ptarget if not component or component == componentname then -- skip @@ -1327,7 +1411,7 @@ function references.loadpresets(product,component) -- we can consider a special loadproductvariables (product,component,utilitydata) loadproductcomponents(product,component,utilitydata) loadproductreferences(product,component,utilitydata) --- loadproductcomponents(product,component,utilitydata) + -- loadproductcomponents(product,component,utilitydata) end end end @@ -1483,11 +1567,20 @@ end -- foo:bar -> foo == prefix (first we try the global one) -- -:bar -> ignore prefix -local function finish_inner(var,p,i) - var.kind = "inner" +local function finish_inner(set,var,p,i) + local external = i.references.external + local realpage = (i.references and i.references.realpage) or (i.pagedata and i.pagedata.realpage) or 1 + if external then + var.kind = "outer with inner" + var.external = true + var.outer = external + set.external = true -- probably not needed + else + var.kind = "inner" + var.p = p + end + var.r = realpage var.i = i - var.p = p - var.r = (i.references and i.references.realpage) or (i.pagedata and i.pagedata.realpage) or 1 return var end @@ -1506,7 +1599,7 @@ local function identify_inner(set,var,prefix,collected,derived) if i then i = i[splitinner] if i then - return finish_inner(var,"",i) + return finish_inner(set,var,"",i) end end end @@ -1514,7 +1607,7 @@ local function identify_inner(set,var,prefix,collected,derived) if i then i = i[splitinner] if i then - return finish_inner(var,splitprefix,i) + return finish_inner(set,var,splitprefix,i) end end if derived then @@ -1522,11 +1615,13 @@ local function identify_inner(set,var,prefix,collected,derived) -- using the prefix that is active at this moment (so we overload the given -- these are taken from other data structures (like lists) if splitprefix == "-" then +-- loop over the current structure list reversed +-- and end with "" .. needs example local i = derived[""] if i then i = i[splitinner] if i then - return finish_inner(var,"",i) + return finish_inner(set,var,"",i) end end end @@ -1534,7 +1629,7 @@ local function identify_inner(set,var,prefix,collected,derived) if i then i = i[splitinner] if i then - return finish_inner(var,splitprefix,i) + return finish_inner(set,var,splitprefix,i) end end end @@ -1545,7 +1640,7 @@ local function identify_inner(set,var,prefix,collected,derived) if i then i = i[inner] if i then - return finish_inner(var,prefix,i) + return finish_inner(set,var,prefix,i) end end if not i and derived then @@ -1554,7 +1649,22 @@ local function identify_inner(set,var,prefix,collected,derived) if i then i = i[inner] if i then - return finish_inner(var,prefix,i) + return finish_inner(set,var,prefix,i) + end + end + -- + local n, list = resolvers.jobs.currentstructure() + if list then + for i=#list,1,-1 do + local l = list[i] + local i = derived[l] + if i then + i = i[inner] + if i then + -- return finish_inner(set,var,"",i) + return finish_inner(set,var,l,i) + end + end end end end @@ -1571,10 +1681,7 @@ local function unprefixed_inner(set,var,prefix,collected,derived,tobesaved) (derived and derived [""] and derived [""][inner]) or (tobesaved and tobesaved[""] and tobesaved[""][inner]) if i then - var.kind = "inner" - var.p = "" - var.i = i - var.r = (i.references and i.references.realpage) or (i.pagedata and i.pagedata.realpage) or 1 + finish_inner(set,var,"",i) else var.error = "unknown inner or special" end @@ -1611,13 +1718,13 @@ local function identify_auto(set,var,i) end end -- escape from prefix --- local pdata = odata[""] --- if pdata then --- local r = pdata[inner] --- if r then --- return okay(o,"2h") --- end --- end + -- local pdata = odata[""] + -- if pdata then + -- local r = pdata[inner] + -- if r then + -- return okay(o,"2h") + -- end + -- end else for p, pdata in sortedhash(odata) do local r = pdata[inner] @@ -1765,7 +1872,6 @@ end local function identify_inner_or_outer(set,var,i) -- here we fall back on product data local inner = var.inner - if inner and inner ~= "" then -- first we look up in collected and derived using the current prefix @@ -1780,7 +1886,8 @@ local function identify_inner_or_outer(set,var,i) return v end - if var.inner == var.reference and identify_auto(set,var,i) and var.outer and var.outer ~= "" then +-- if var.inner == var.reference and identify_auto(set,var,i) and var.outer and var.outer ~= "" then + if var.inner == var.reference and var.outer and var.outer ~= "" then return identify_outer(set,var,i) end @@ -1804,7 +1911,6 @@ local function identify_inner_or_outer(set,var,i) end -- as a last resort we will consult the global lists - local v = unprefixed_inner(set,var,"",collected,derived,tobesaved) if v then if trace_identifying then @@ -1873,6 +1979,7 @@ local function identify_inner_or_outer(set,var,i) end end end + var.error = "unknown inner" else var.error = "no inner" @@ -1896,40 +2003,51 @@ local function identify_inner_component(set,var,i) return var end +local function identify_outer_component_step(set,var,vi,i,component,where) + if vi then + var.outer = component + var.i = vi + var.kind = "outer with inner" + set.external = true + if trace_identifying then + report_identify_outer(set,var,i,where) + end + return true + end +end + local function identify_outer_component(set,var,i) local component = var.component - local inner = var.inner + local inner = var.inner + -- local data = productdata.componentreferences[component] if data then local d = data[""] - local vi = d and d[inner] - if vi then - var.inner = inner - var.outer = component - var.i = vi - var.kind = "outer with inner" - set.external = true - if trace_identifying then - report_identify_outer(set,var,i,"6a") - end + local d = d and d[inner] + if d and identify_outer_component_step(set,var,d,i,component,"6a") then return var end end + -- local data = productdata.productreferences[component] if data then - local vi = data[inner] - if vi then - var.inner = inner - var.outer = component - var.i = vi - var.kind = "outer with inner" - set.external = true - if trace_identifying then - report_identify_outer(set,var,i,"6b") - end + local d = data[inner] + if d and identify_outer_component_step(set,var,d,i,component,"6b") then + return var + end + end + -- +if texconditionals.autocrossfilereferences then + references.loadpresets(component,component) + local data = productdata.productreferences[component] + if data then + local d = data[inner] + if d and identify_outer_component_step(set,var,d,i,component,"6c") then return var end end +end + -- var.error = "unknown component" if trace_identifying then report_identify_outer(set,var,i,"6c") @@ -1962,6 +2080,8 @@ local function identify(prefix,reference) var = identify_outer(set,var,i) elseif var.arguments then var = identify_arguments(set,var,i) +-- else +-- var = identify_inner_or_outer(set,var,i) elseif not var.component then var = identify_inner_or_outer(set,var,i) elseif productcomponent() then @@ -2691,6 +2811,7 @@ function references.analyze(actions,position,spread) actions.pagestate = checkedpagestate(actions.n,realpage,actions,position,spread) end end +-- inspect(actions) return actions end @@ -2698,6 +2819,8 @@ local function referencepagestate(position,detail,spread) local actions = references.currentset if not actions then return 0 + elseif actions.external then + return 0 else local pagestate = actions.pagestate for i=1,#actions do @@ -3067,3 +3190,32 @@ implement { name = "popreferenceprefix", actions = { popreferenceprefix, context }, -- we can use setmacro } + +-- a bit weird one, used for checkinh in the backend + +function references.pagefromhash(hash,destination,page,actions) + local r = actions[1] + if type(r) == "table" then + r = r.i + if r then + r = r.references + if r then + local structure = r.structure + if structure then + local namestack = r.namestack + if namestack then + for i=#namestack,1,-1 do + local d = namestack[i] .. ":" .. destination + page = hash[d] + if page then + destination = d + break + end + end + end + end + end + end + end + return page, destination +end diff --git a/tex/context/base/mkxl/strc-reg.lmt b/tex/context/base/mkxl/strc-reg.lmt index 27d7e2586..a8a7d0a90 100644 --- a/tex/context/base/mkxl/strc-reg.lmt +++ b/tex/context/base/mkxl/strc-reg.lmt @@ -585,8 +585,10 @@ local function storeregister(rawdata) -- metadata, references, entries rawdata.userdata = touserdata(userdata) end -- - references.section = currentid() - metadata.level = currentlevel() + references.block = structures.sections.currentblock() + references.structure = resolvers.jobs.currentstructure() + references.section = currentid() + metadata.level = currentlevel() -- local data = notsaved and collected[name] or tobesaved[name] local entries = data.entries diff --git a/tex/context/base/mkxl/supp-box.lmt b/tex/context/base/mkxl/supp-box.lmt index a5bfe1394..093cac164 100644 --- a/tex/context/base/mkxl/supp-box.lmt +++ b/tex/context/base/mkxl/supp-box.lmt @@ -481,9 +481,9 @@ local doifelse = commands.doifelse do - local dirvalues = nodes.dirvalues - local lefttoright_code = dirvalues.lefttoright - local righttoleft_code = dirvalues.righttoleft + local directioncodes = tex.directioncodes + local lefttoright_code = directioncodes.lefttoright + local righttoleft_code = directioncodes.righttoleft local function firstdirinbox(n) local b = getbox(n) diff --git a/tex/context/base/mkxl/tabl-xtb.lmt b/tex/context/base/mkxl/tabl-xtb.lmt index c475d6233..50f321c0d 100644 --- a/tex/context/base/mkxl/tabl-xtb.lmt +++ b/tex/context/base/mkxl/tabl-xtb.lmt @@ -87,7 +87,7 @@ local new_glue = nodepool.glue local new_kern = nodepool.kern local new_hlist = nodepool.hlist -local lefttoright_code = nodes.dirvalues.lefttoright +local lefttoright_code = tex.directioncodes.lefttoright local v_stretch = variables.stretch local v_normal = variables.normal diff --git a/tex/context/base/mkxl/toks-aux.lmt b/tex/context/base/mkxl/toks-aux.lmt index 83e714d77..2027ed78e 100644 --- a/tex/context/base/mkxl/toks-aux.lmt +++ b/tex/context/base/mkxl/toks-aux.lmt @@ -197,6 +197,9 @@ tex.listsigncodes = getthem(tex.getlistsignvalues, "listsigncode tex.classoptioncodes = getthem(tex.getmathclassoptionvalues, "classoptioncode") ---.alignmentcontextcodes = getthem(tex.getalignmentcontextvalues ) -- only at lua end tex.specialmathclasscodes = getthem(tex.getspecialmathclassvalues ) -- only at lua end +tex.directioncodes = getthem(tex.getdirectionvalues ) -- only at lua end (todo tex) +tex.fillcodes = getthem(tex.getfillvalues ) -- only at lua end (todo tex) +tex.mathparametercodes = getthem(tex.getmathparametervalues ) -- only at lua end (todo tex) function tex.stringtocodesbitmap(str,codes) local bitmap = 0 diff --git a/tex/context/base/mkxl/trac-inf.lmt b/tex/context/base/mkxl/trac-inf.lmt index feef3714f..649fef30b 100644 --- a/tex/context/base/mkxl/trac-inf.lmt +++ b/tex/context/base/mkxl/trac-inf.lmt @@ -304,6 +304,9 @@ local registered = false local enabled = false local finished = false +local status = status -- needed for --sandbox +local mplib = mplib -- needed for --sandbox + function statistics.showusage(when) if finished and when == "finish" then return diff --git a/tex/context/base/mkxl/trac-vis.lmt b/tex/context/base/mkxl/trac-vis.lmt index c9b68b407..9b467de29 100644 --- a/tex/context/base/mkxl/trac-vis.lmt +++ b/tex/context/base/mkxl/trac-vis.lmt @@ -760,16 +760,16 @@ end local ruleddir, ruledpar do - local dircodes = nodes.dircodes - local dirvalues = nodes.dirvalues + local dircodes = nodes.dircodes + local directioncodes = tex.directioncodes -- nodes.dirvalues - local cancel_code = dircodes.cancel - local l2r_code = dirvalues.l2r - local r2l_code = dirvalues.r2l + local cancel_code = dircodes.cancel + local l2r_code = directioncodes.l2r + local r2l_code = directioncodes.r2l - local d_cache = caches["dir"] + local d_cache = caches["dir"] - local getdirection = nuts.getdirection + local getdirection = nuts.getdirection local tags = { l2r = "L2R", @@ -1295,7 +1295,7 @@ local ruledglue, ruledmathglue do -- we sometimes pass previous as we can have issues in math (not watertight for all) - local mathvalues = nodes.mathvalues + local mathvalues = tex.mathparametercodes -- nodes.mathvalues mathvalues[-1] = "left" mathvalues[-2] = "right" diff --git a/tex/context/base/mkxl/type-imp-bengali.mkxl b/tex/context/base/mkxl/type-imp-bengali.mkxl deleted file mode 100644 index 84a0b6402..000000000 --- a/tex/context/base/mkxl/type-imp-bengali.mkxl +++ /dev/null @@ -1,73 +0,0 @@ -%D \module -%D [ file=type-imp-bengali, -%D version=2022.02.02, -%D title=\CONTEXT\ Typescript Macros, -%D subtitle=Bengali, -%D author=śrīrāma (Sreeram), -%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. - -\starttypescriptcollection[bengali] - - \doifunknownfontfeature {bengali-bold-30} {\definefontfeature[bengali-bold-30][boldened-30]} - - % Symbolic names for fonts: - - \starttypescript [\s!serif] [murty-bangla] - \definefontsynonym [MurtyBengali-Regular] [\s!name:murtybanglaregular] [\s!features=bengali-two] - \definefontsynonym [MurtyBengali-Bold] [\s!name:murtybanglaregular] [\s!features={bengali-two,bengali-bold-30}] - \stoptypescript - - \starttypescript [\s!sans] [baloo-da, baloo-da-extrabold] - \definefontsynonym [BalooDa2-Regular] [\s!name:balooda2regular] [\s!features=bengali-two] - \definefontsynonym [BalooDa2-Medium] [\s!name:balooda2medium] [\s!features=bengali-two] - \definefontsynonym [BalooDa2-Semibold] [\s!name:balooda2semibold] [\s!features=bengali-two] - \definefontsynonym [BalooDa2-Bold] [\s!name:balooda2bold] [\s!features=bengali-two] - \definefontsynonym [BalooDa2-Extrabold] [\s!name:balooda2extrabold] [\s!features=bengali-two] - \stoptypescript - - % Grouping of styles: - - \starttypescript [\s!sans] [baloo-da] [\s!name] - \setups[\s!font:\s!fallback:\s!serif] - \definefontsynonym [\s!Sans] [BalooDa2-Regular] - \definefontsynonym [\s!SansSlanted] [BalooDa2-Medium] - \definefontsynonym [\s!SansBold] [BalooDa2-Bold] - \definefontsynonym [\s!SansBoldSlanted] [BalooDa2-Semibold] - \stoptypescript - - \starttypescript [\s!sans] [baloo-da-extrabold] [\s!name] - \setups[\s!font:\s!fallback:\s!serif] - \definefontsynonym [\s!Sans] [BalooDa2-Medium] - \definefontsynonym [\s!SansSlanted] [BalooDa2-Semibold] - \definefontsynonym [\s!SansBold] [BalooDa2-Extrabold] - \definefontsynonym [\s!SansBoldSlanted] [BalooDa2-Bold] - \stoptypescript - - \starttypescript [\s!serif] [murty-bangla] [\s!name] - \setups[\s!font:\s!fallback:\s!serif] - \definefontsynonym [\s!Serif] [MurtyBengali-Regular] - \definefontsynonym [\s!SerifBold] [MurtyBengali-Bold] - \stoptypescript - - % Typefaces: - - \starttypescript [baloo-da, baloo-da-extrabold] - \definetypeface [\typescriptone] [\s!ss] [\s!sans] [\typescriptone] [\s!default] [\s!rscale=1.1] - \definetypeface [\typescriptone] [\s!rm] [\s!serif] [dejavu] [\s!default] - \definetypeface [\typescriptone] [\s!mm] [\s!math] [dejavu] [\s!default] - \definetypeface [\typescriptone] [\s!tt] [\s!mono] [dejavu] [\s!default] - \stoptypescript - - \starttypescript [murty-bangla] - \definetypeface [murty-bangla] [\s!rm] [\s!serif] [murty-bangla] [\s!default] [\s!rscale=1.1] - \definetypeface [\typescriptone] [\s!ss] [\s!sans] [dejavu] [\s!default] - \definetypeface [\typescriptone] [\s!mm] [\s!math] [dejavu] [\s!default] - \definetypeface [\typescriptone] [\s!tt] [\s!mono] [dejavu] [\s!default] - \stoptypescript - -\stoptypescriptcollection diff --git a/tex/context/base/mkxl/type-imp-braille.mkxl b/tex/context/base/mkxl/type-imp-braille.mkxl deleted file mode 100644 index 17209d50c..000000000 --- a/tex/context/base/mkxl/type-imp-braille.mkxl +++ /dev/null @@ -1,88 +0,0 @@ -%D \module -%D [ file=type-imp-vraille, -%D version=2021.11.17, -%D title=\CONTEXT\ Typescript Macros, -%D subtitle=Braille (using Dejavu fonts), -%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. - -\continuewhenlmtxmode - -%D There is no need to waste money on a commercial braille font if we have dejavu. After -%D all it's just dots. We also don't need features. - -\registerctxluafile{font-imp-braille}{autosuffix} - -% todo : not fallback, just replace directly .. special case anyway .. now inefficient and slow - -\starttypescriptcollection[braille] - - \doifunknownfontfeature {dejavu-math-bold} {\definefontfeature[dejavu-math-bold][boldened]} - - \definefontfeature[brailletext] [braille=text] % no ligatures, no kerning etc - \definefontfeature[braillemath] [braille=math] % no ligatures, no kerning etc - \definefontfeature[serifbraille] [features=none] % no ligatures, no kerning etc - \definefontfeature[sansbraille] [features=none] % no ligatures, no kerning etc - \definefontfeature[monobraille] [features=none] % no ligatures, no kerning etc - \definefontfeature[mathbraille] [features=none] % [compactmath=yes] % no ssty so compact anyway - - % Maybe some day sans and mono will also have braille but it doesn't really matter because we - % don't really need sans and for mono we only need the fixed spacing. - - \definefontfallback[BrailleMono] [\s!name:dejavuserif*brailletext][0x0000-0x1FFFF][force=yes] - \definefontfallback[BrailleSerif][\s!name:dejavuserif*brailletext][0x0000-0x1FFFF][force=yes] - \definefontfallback[BrailleSans] [\s!name:dejavuserif*brailletext][0x0000-0x1FFFF][force=yes] - %\definefontfallback[BrailleMath] [\s!name:dejavuserif*braillemath][0x0000-0x1FFFF][force=yes] - - \definefontfallback[BrailleMonoBold] [\s!name:dejavuserifbold*brailletext][0x0000-0x1FFFF][force=yes] - \definefontfallback[BrailleSerifBold][\s!name:dejavuserifbold*brailletext][0x0000-0x1FFFF][force=yes] - \definefontfallback[BrailleSansBold] [\s!name:dejavuserifbold*brailletext][0x0000-0x1FFFF][force=yes] - - \starttypescript [\s!serif] [braille] [\s!name] - \definefontsynonym [\s!Serif] [\s!name:dejavuserif] [\s!features=serifbraille,\s!fallbacks=BrailleSerif] - \definefontsynonym [\s!SerifBold] [\s!name:dejavuserifbold][\s!features=serifbraille,\s!fallbacks=BrailleSerifBold] - \definefontsynonym [\s!SerifItalic] [\s!Serif] - \definefontsynonym [\s!SerifBoldItalic] [\s!SerifBold] - \definefontsynonym [\s!SerifSlanted] [\s!Serif] - \definefontsynonym [\s!SerifBoldSlanted][\s!SerifBold] - \stoptypescript - - \starttypescript [\s!sans] [braille] [\s!name] - \definefontsynonym [\s!Sans] [\s!name:dejavusans] [\s!features=sansbraille,\s!fallbacks=BrailleSans] - \definefontsynonym [\s!SansBold] [\s!name:dejavusansbold][\s!features=sansbraille,\s!fallbacks=BrailleSansBold] - \definefontsynonym [\s!SansItalic] [\s!Sans] - \definefontsynonym [\s!SansBoldItalic] [\s!SansBold] - \definefontsynonym [\s!SansSlanted] [\s!Sans] - \definefontsynonym [\s!SansBoldSlanted][\s!SansBold] - \stoptypescript - - \starttypescript [\s!mono] [braille] [\s!name] - \definefontsynonym [\s!Mono] [\s!name:dejavusansmono] [\s!features=monobraille,\s!fallbacks=BrailleMono] - \definefontsynonym [\s!MonoBold] [\s!name:dejavusansmonobold][\s!features=monobraille,\s!fallbacks=BrailleMonoBold] - \definefontsynonym [\s!MonoItalic] [\s!Mono] - \definefontsynonym [\s!MonoBoldItalic] [\s!MonoBold] - \definefontsynonym [\s!MonoSlanted] [\s!Mono] - \definefontsynonym [\s!MonoBoldSlanted][\s!MonoBold] - \stoptypescript - - \starttypescript [\s!math][braille] [\s!name] - \loadfontgoodies[dejavu-math] - %\definefontsynonym[\s!MathRoman] [\s!file:texgyredejavu-math][\s!features={mathbraille,\s!math\mathsizesuffix},\s!fallbacks=BrailleMath] - %\definefontsynonym[\s!MathRomanBold][\s!file:texgyredejavu-math][\s!features={mathbraille,\s!math\mathsizesuffix,dejavu-math-bold},\s!fallbacks=BrailleMath] - \definefontsynonym[\s!MathRoman] [\s!file:texgyredejavu-math][\s!features={braillemath,\s!math\mathsizesuffix},\s!goodies=dejavu-math] - \definefontsynonym[\s!MathRomanBold][\s!file:texgyredejavu-math][\s!features={braillemath,\s!math\mathsizesuffix,dejavu-math-bold},\s!goodies=dejavu-math] - \stoptypescript - - \starttypescript[braille] - \definetypeface [braille] [\s!rm] [\s!serif] [braille] [\s!default] - \definetypeface [braille] [\s!ss] [\s!sans] [braille] [\s!default] - \definetypeface [braille] [\s!tt] [\s!mono] [braille] [\s!default] - \definetypeface [braille] [\s!mm] [\s!math] [braille] [\s!default] - \stoptypescript - -\stoptypescriptcollection diff --git a/tex/context/base/mkxl/type-imp-devanagari.mkxl b/tex/context/base/mkxl/type-imp-devanagari.mkxl deleted file mode 100644 index 4fb082094..000000000 --- a/tex/context/base/mkxl/type-imp-devanagari.mkxl +++ /dev/null @@ -1,244 +0,0 @@ -%D \module -%D [ file=type-imp-devanagari, -%D version=2022.02.02, -%D title=\CONTEXT\ Typescript Macros, -%D subtitle=Devanagari, -%D author=śrīrāma (Sreeram), -%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. - -%D This collection uses rscaling so that the fonts can be used alongside. - -\starttypescriptcollection[devanagari] - - \definefontfeature - [shobhikafeatures] - [devanagari-two] - [goodies=shobhika.lfg, - indic={movematra=auto,conjuncts=quit}, - sanitizer=dev2rkrf] - - \definefontfeature - [baloofeatures] - [shobhikafeatures] - - \definefontfeature - [amitafeatures] - [devanagari-two] - [goodies=shobhika.lfg, - sanitizer=dev2rkrf] - - \definefontfeature - [jainifeatures] - [shobhikafeatures] - [\s!ss01=yes,ss05=yes] - - \definefontfeature - [adishilafeatures] - [devanagari-one] - [indic={movematra=auto,conjuncts=quit}] - - % Symbolic names for fonts: - - \starttypescript [\s!serif] [adishila] - \definefontsynonym [Adishila-Regular] [\s!name:adishilaregular] [\s!features=adishilafeatures] - \definefontsynonym [Adishila-Bold] [\s!name:adishilabold] [\s!features=adishilafeatures] - \definefontsynonym [Adishila-Italic] [\s!name:adishilaitalic] [\s!features=adishilafeatures] - \definefontsynonym [Adishila-BoldItalic] [\s!name:adishilabolditalic] [\s!features=adishilafeatures] - \stoptypescript - - \starttypescript [\s!serif] [adishila-semibold] - \definefontsynonym [AdishilaSemibold-Regular] [\s!name:adishilasemiboldregular] [\s!features=adishilafeatures] - \definefontsynonym [AdishilaSemibold-Italic] [\s!name:adishilasemibolditalic] [\s!features=adishilafeatures] - \stoptypescript - - \starttypescript [\s!serif] [adishila-heavy] - \definefontsynonym [AdishilaHeavy-Regular] [\s!name:adishilaheavyregular] [\s!features=adishilafeatures] - \definefontsynonym [AdishilaHeavy-Italic] [\s!name:adishilaheavyitalic] [\s!features=adishilafeatures] - \stoptypescript - - \starttypescript [\s!serif] [adishila-dev] - \definefontsynonym [AdishilaDev-Regular] [\s!name:adishiladevregular] [\s!features=adishilafeatures] - \definefontsynonym [AdishilaDev-Bold] [\s!name:adishiladevbold] [\s!features=adishilafeatures] - \stoptypescript - - \starttypescript [\s!serif] [adishila-dev-guru] - \definefontsynonym [AdishilaDev-Guru] [\s!name:adishiladevguru] [\s!features=adishilafeatures] - \stoptypescript - - \starttypescript [\s!serif] [adishila-san] - \definefontsynonym [AdishilaSan-Regular] [\s!name:adishilasanregular] [\s!features=adishilafeatures] - \definefontsynonym [AdishilaSan-Bold] [\s!name:adishilasanbold] [\s!features=adishilafeatures] - \definefontsynonym [AdishilaSan-Italic] [\s!name:adishilasanitalic] [\s!features=adishilafeatures] - \definefontsynonym [AdishilaSan-BoldItalic] [\s!name:adishilasanbolditalic] [\s!features=adishilafeatures] - \stoptypescript - - \starttypescript [\s!serif] [adishila-san-letterpress] - \definefontsynonym [AdishilaSanLetterpress-Regular] [\s!name:adishilasanletterpressregular] [\s!features=adishilafeatures] - \definefontsynonym [AdishilaSanLetterpress-Bold] [\s!name:adishilasanletterpressbold] [\s!features=adishilafeatures] - \definefontsynonym [AdishilaSanLetterpress-Italic] [\s!name:adishilasanletterpressitalic] [\s!features=adishilafeatures] - \definefontsynonym [AdishilaSanLetterpress-BoldItalic] [\s!name:adishilasanletterpressbolditalic] [\s!features=adishilafeatures] - \stoptypescript - - \starttypescript [\s!serif] [shobhika] - \definefontsynonym [Shobhika-Regular] [\s!name:shobhikaregular] [\s!features=shobhikafeatures] - \definefontsynonym [Shobhika-Bold] [\s!name:shobhikabold] [\s!features=shobhikafeatures] - \stoptypescript - - \starttypescript [\s!sans] [baloo,baloo-extrabold] - \definefontsynonym [Baloo2-Regular] [\s!name:baloo2regular] [\s!features=baloofeatures] - \definefontsynonym [Baloo2-Medium] [\s!name:baloo2medium] [\s!features=baloofeatures] - \definefontsynonym [Baloo2-Semibold] [\s!name:baloo2semibold] [\s!features=baloofeatures] - \definefontsynonym [Baloo2-Bold] [\s!name:baloo2bold] [\s!features=baloofeatures] - \definefontsynonym [Baloo2-Extrabold] [\s!name:baloo2extrabold] [\s!features=baloofeatures] - \stoptypescript - - \starttypescript [\s!serif] [jaini] - \definefontsynonym [Jaini-Regular] [\s!name:jainiregular] [\s!features=jainifeatures] - \stoptypescript - - \starttypescript [\s!serif] [jaini-purva] - \definefontsynonym [JainiPurva-Regular] [\s!name:jainipurvaregular] [\s!features=jainifeatures] - \stoptypescript - - \starttypescript [\s!serif] [amita] - \definefontsynonym [Amita-Regular] [\s!name:amitaregular] [\s!features=amitafeatures] - \definefontsynonym [Amita-Bold] [\s!name:amitabold] [\s!features=amitafeatures] - \stoptypescript - - % Grouping of styles: - - \starttypescript [\s!serif] [adishila] [\s!name] - \definefontsynonym [\s!Serif] [Adishila-Regular] - \definefontsynonym [\s!SerifBold] [Adishila-Bold] - \definefontsynonym [\s!SerifItalic] [Adishila-Italic] - \definefontsynonym [\s!SerifBoldItalic] [Adishila-BoldItalic] - \stoptypescript - - \starttypescript [\s!serif] [adishila-semibold] [\s!name] - \definefontsynonym [\s!Serif] [AdishilaSemibold-Regular] - \definefontsynonym [\s!SerifItalic] [AdishilaSemibold-Italic] - \stoptypescript - - \starttypescript [\s!serif] [adishila-heavy] [\s!name] - \definefontsynonym [\s!Serif] [AdishilaHeavy-Regular] - \definefontsynonym [\s!SerifItalic] [AdishilaHeavy-Italic] - \stoptypescript - - \starttypescript [\s!serif] [adishila-dev] [\s!name] - \definefontsynonym [\s!Serif] [AdishilaDev-Regular] - \definefontsynonym [\s!SerifBold] [AdishilaDev-Bold] - \stoptypescript - - \starttypescript [\s!serif] [adishila-dev-guru] [\s!name] - \definefontsynonym [\s!Serif] [AdishilaDev-Guru] - \stoptypescript - - \starttypescript [\s!serif] [adishila-san] [\s!name] - \definefontsynonym [\s!Serif] [AdishilaSan-Regular] - \definefontsynonym [\s!SerifBold] [AdishilaSan-Bold] - \definefontsynonym [\s!SerifItalic] [AdishilaSan-Italic] - \definefontsynonym [\s!SerifBoldItalic] [AdishilaSan-BoldItalic] - \stoptypescript - - \starttypescript [\s!serif] [adishila-san-letterpress] [\s!name] - \definefontsynonym [\s!Serif] [AdishilaSanLetterpress-Regular] - \definefontsynonym [\s!SerifBold] [AdishilaSanLetterpress-Bold] - \definefontsynonym [\s!SerifItalic] [AdishilaSanLetterpress-Italic] - \definefontsynonym [\s!SerifBoldItalic] [AdishilaSanLetterpress-BoldItalic] - \stoptypescript - - \starttypescript [\s!serif] [shobhika] [\s!name] - \definefontsynonym [\s!Serif] [Shobhika-Regular] - \definefontsynonym [\s!SerifBold] [Shobhika-Bold] - \stoptypescript - - \starttypescript [\s!sans] [baloo] [\s!name] - \definefontsynonym [\s!Sans] [Baloo2-Regular] - \definefontsynonym [\s!SansBold] [Baloo2-Bold] - \definefontsynonym [\s!SansItalic] [Baloo2-Medium] - \definefontsynonym [\s!SansBoldItalic] [Baloo2-Semibold] - \stoptypescript - - \starttypescript [\s!sans] [baloo-extrabold] [\s!name] - \definefontsynonym [\s!Sans] [Baloo2-Medium] - \definefontsynonym [\s!SansItalic] [Baloo2-Semibold] - \definefontsynonym [\s!SansBoldItalic] [Baloo2-Bold] - \definefontsynonym [\s!SansBold] [Baloo2-Extrabold] - \stoptypescript - - \starttypescript [\s!serif] [jaini] [\s!name] - \definefontsynonym [\s!Serif] [Jaini-Regular] - \stoptypescript - - \starttypescript [\s!serif] [jaini-purva] [\s!name] - \definefontsynonym [\s!Serif] [JainiPurva-Regular] - \stoptypescript - - \starttypescript [\s!serif] [amita] [\s!name] - \definefontsynonym [\s!Serif] [Amita-Regular] - \definefontsynonym [\s!SerifBold] [Amita-Bold] - \stoptypescript - - % Typefaces: - - \starttypescript [adishila] - \definetypeface [\typescriptone] [\s!rm] [\s!serif] [\typescriptone] [\s!default] [\s!rscale=1.42] - \definetypeface [\typescriptone] [\s!ss] [\s!sans] [dejavu] [\s!default] - \definetypeface [\typescriptone] [\s!mm] [\s!math] [dejavu] [\s!default] - \definetypeface [\typescriptone] [\s!tt] [\s!mono] [dejavu] [\s!default] - \stoptypescript - \starttypescript [adishila-semibold,adishila-heavy] - \definetypeface [\typescriptone] [\s!rm] [\s!serif] [\typescriptone] [\s!default] [\s!rscale=1.46] - \definetypeface [\typescriptone] [\s!ss] [\s!sans] [dejavu] [\s!default] - \definetypeface [\typescriptone] [\s!mm] [\s!math] [dejavu] [\s!default] - \definetypeface [\typescriptone] [\s!tt] [\s!mono] [dejavu] [\s!default] - \stoptypescript - - \starttypescript [adishila-dev] - \definetypeface [\typescriptone] [\s!rm] [\s!serif] [\typescriptone] [\s!default] [\s!rscale=1.65] - \definetypeface [\typescriptone] [\s!ss] [\s!sans] [dejavu] [\s!default] - \definetypeface [\typescriptone] [\s!mm] [\s!math] [dejavu] [\s!default] - \definetypeface [\typescriptone] [\s!tt] [\s!mono] [dejavu] [\s!default] - \stoptypescript - - \starttypescript [adishila-dev-guru,adishila-san,adishila-san-letterpress] - \definetypeface [\typescriptone] [\s!rm] [\s!serif] [\typescriptone] [\s!default] [\s!rscale=1.62] - \definetypeface [\typescriptone] [\s!ss] [\s!sans] [dejavu] [\s!default] - \definetypeface [\typescriptone] [\s!mm] [\s!math] [dejavu] [\s!default] - \definetypeface [\typescriptone] [\s!tt] [\s!mono] [dejavu] [\s!default] - \stoptypescript - - \starttypescript [shobhika] - \definetypeface [\typescriptone] [\s!rm] [\s!serif] [\typescriptone] [\s!default] - \definetypeface [\typescriptone] [\s!ss] [\s!sans] [dejavu] [\s!default] - \definetypeface [\typescriptone] [\s!mm] [\s!math] [dejavu] [\s!default] - \definetypeface [\typescriptone] [\s!tt] [\s!mono] [dejavu] [\s!default] - \stoptypescript - - \starttypescript [baloo,baloo-extrabold] - \definetypeface [\typescriptone] [\s!ss] [\s!sans] [\typescriptone] [\s!default] - \definetypeface [\typescriptone] [\s!rm] [\s!serif] [dejavu] [\s!default] - \definetypeface [\typescriptone] [\s!mm] [\s!math] [dejavu] [\s!default] - \definetypeface [\typescriptone] [\s!tt] [\s!mono] [dejavu] [\s!default] - \stoptypescript - - \starttypescript [jaini,jaini-purva] - \definetypeface [\typescriptone] [\s!rm] [\s!serif] [\typescriptone] [\s!default] [\s!rscale=1.5] - \definetypeface [\typescriptone] [\s!ss] [\s!sans] [dejavu] [\s!default] - \definetypeface [\typescriptone] [\s!mm] [\s!math] [dejavu] [\s!default] - \definetypeface [\typescriptone] [\s!tt] [\s!mono] [dejavu] [\s!default] - \stoptypescript - - \starttypescript [amita] - \definetypeface [\typescriptone] [\s!rm] [\s!serif] [\typescriptone] [\s!default] [\s!rscale=1.2] - \definetypeface [\typescriptone] [\s!ss] [\s!sans] [dejavu] [\s!default] - \definetypeface [\typescriptone] [\s!mm] [\s!math] [dejavu] [\s!default] - \definetypeface [\typescriptone] [\s!tt] [\s!mono] [dejavu] [\s!default] - \stoptypescript - -\stoptypescriptcollection diff --git a/tex/context/base/mkxl/type-imp-euler.mkxl b/tex/context/base/mkxl/type-imp-euler.mkxl deleted file mode 100644 index a2e066f6b..000000000 --- a/tex/context/base/mkxl/type-imp-euler.mkxl +++ /dev/null @@ -1,71 +0,0 @@ -%D \module -%D [ file=type-otf, -%D version=2007.07.30, -%D title=\CONTEXT\ Typescript Macros, -%D subtitle=Euler, -%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. - -% Instead of euler.otf we now use euler-math.otf which is a copy of the version -% that Daniel Flipo maintains now. We will also make an euler-regular.otf for -% text usage (which might have slighty different metrics then). - -\loadtypescriptfile[texgyre] -\loadtypescriptfile[dejavu] - -\definefontfeature[pagellaovereuler][pagellaovereuler=yes] -\definefontfeature[euleroverpagella][euleroverpagella=yes] - -\starttypescriptcollection[pagella-eulernova] - - \starttypescript [\s!serif] [eulernova] [\s!name] - \setups[\s!font:\s!fallback:\s!serif] - \definefontsynonym [\s!Serif] [\s!file:euler-math.otf] [\s!features=\s!default] - \stoptypescript - - \starttypescript [\s!math] [eulernova] [\s!name] - \definefontsynonym [\s!MathRoman] [\s!file:euler-math.otf] [\s!features={\s!math\mathsizesuffix,mathextra},\s!goodies=euler-math] - \stoptypescript - - \starttypescript [pagella-eulernova] - \definetypeface [\typescriptone] [\s!rm] [\s!serif] [pagella] [\s!default] - \definetypeface [\typescriptone] [\s!tt] [\s!mono] [dejavu] [\s!default] [\s!rscale=0.9] - \definetypeface [\typescriptone] [\s!mm] [\s!math] [eulernova] [\s!default] - \quittypescriptscanning - \stoptypescript - - \starttypescript [eulernova] - \definetypeface [\typescriptone] [\s!rm] [\s!serif] [eulernova] [\s!default] - \definetypeface [\typescriptone] [\s!tt] [\s!mono] [dejavu] [\s!default] [\s!rscale=0.9] - \definetypeface [\typescriptone] [\s!mm] [\s!math] [eulernova] [\s!default] - \quittypescriptscanning - \stoptypescript - - \starttypescript [\s!math] [euleroverpagella] [\s!name] - \definefontsynonym [\s!MathRoman] [texgyrepagella-math] [\s!features={\s!math\mathsizesuffix,euleroverpagella,mathextra},\s!fallbacks=euleroverpagella,\s!goodies=pagella-math] - \stoptypescript - - \starttypescript [\s!math] [pagellaovereuler] [\s!name] - \definefontsynonym [\s!MathRoman] [\s!file:euler-math.otf] [\s!features={\s!math\mathsizesuffix,pagellaovereuler,mathextra},\s!fallbacks=pagellaovereuler,\s!goodies=euler-math] - \stoptypescript - - \starttypescript [pagella-with-euler,euleroverpagella] - \definetypeface [\typescriptone] [\s!rm] [\s!serif] [pagella] [\s!default] - \definetypeface [\typescriptone] [\s!tt] [\s!mono] [dejavu] [\s!default] [\s!rscale=0.9] - \definetypeface [\typescriptone] [\s!mm] [\s!math] [euleroverpagella] [\s!default] - \quittypescriptscanning - \stoptypescript - - \starttypescript [euler-with-pagella,pagellaovereuler] - \definetypeface [\typescriptone] [\s!rm] [\s!serif] [eulernova] [\s!default] - \definetypeface [\typescriptone] [\s!tt] [\s!mono] [dejavu] [\s!default] [\s!rscale=0.9] - \definetypeface [\typescriptone] [\s!mm] [\s!math] [pagellaovereuler] [\s!default] - \quittypescriptscanning - \stoptypescript - -\stoptypescriptcollection diff --git a/tex/context/base/mkxl/type-imp-gujarati.mkxl b/tex/context/base/mkxl/type-imp-gujarati.mkxl deleted file mode 100644 index d7f3f7072..000000000 --- a/tex/context/base/mkxl/type-imp-gujarati.mkxl +++ /dev/null @@ -1,77 +0,0 @@ -%D \module -%D [ file=type-imp-gujarati, -%D version=2022.02.02, -%D title=\CONTEXT\ Typescript Macros, -%D subtitle=Gujarati, -%D author=śrīrāma (Sreeram), -%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. - -\starttypescriptcollection[gujarati] - - \definefontfeature - [baloobhaifeatures] - [gujarati-two] - [goodies=bhai.lfg, - indic={movematra=auto,conjuncts=quit}, - sanitizer=gjr2rkrf] - - % Symbolic names for fonts: - \starttypescript [\s!serif] [noto-serif-gujarati] - \definefontsynonym [NotoSerifGujarati-Regular] [\s!name:notoserifgujaratiregular] [\s!features=baloobhaifeatures] - \definefontsynonym [NotoSerifGujarati-Bold] [\s!name:notoserifgujaratibold] [\s!features=baloobhaifeatures] - \stoptypescript - - \starttypescript [\s!sans] [baloo-bhai, baloo-bhai-extrabold] - \definefontsynonym [BalooBhai2-Regular] [\s!name:baloobhai2regular] [\s!features=baloobhaifeatures] - \definefontsynonym [BalooBhai2-Medium] [\s!name:baloobhai2medium] [\s!features=baloobhaifeatures] - \definefontsynonym [BalooBhai2-Semibold] [\s!name:baloobhai2semibold] [\s!features=baloobhaifeatures] - \definefontsynonym [BalooBhai2-Bold] [\s!name:baloobhai2bold] [\s!features=baloobhaifeatures] - \definefontsynonym [BalooBhai2-Extrabold] [\s!name:baloobhai2extrabold] [\s!features=baloobhaifeatures] - \stoptypescript - - % Grouping of styles: - - \starttypescript [\s!serif] [noto-serif-gujarati] [\s!name] - \setups[\s!font:\s!fallback:\s!serif] - \definefontsynonym [\s!Serif] [NotoSerifGujarati-Regular] - \definefontsynonym [\s!SerifBold] [NotoSerifGujarati-Bold] - \stoptypescript - - \starttypescript [\s!sans] [baloo-bhai] [\s!name] - \setups[\s!font:\s!fallback:\s!serif] - \definefontsynonym [\s!Sans] [BalooBhai2-Regular] - \definefontsynonym [\s!SansSlanted] [BalooBhai2-Medium] - \definefontsynonym [\s!SansBold] [BalooBhai2-Bold] - \definefontsynonym [\s!SansBoldSlanted] [BalooBhai2-Semibold] - \stoptypescript - - \starttypescript [\s!sans] [baloo-bhai-extrabold] [\s!name] - \setups[\s!font:\s!fallback:\s!serif] - \definefontsynonym [\s!Sans] [BalooBhai2-Medium] - \definefontsynonym [\s!SansSlanted] [BalooBhai2-Semibold] - \definefontsynonym [\s!SansBold] [BalooBhai2-Extrabold] - \definefontsynonym [\s!SansBoldSlanted] [BalooBhai2-Bold] - \stoptypescript - - % Typefaces: - - \starttypescript [baloo-bhai, baloo-bhai-extrabold] - \definetypeface [\typescriptone] [\s!ss] [\s!sans] [\typescriptone] [\s!default] [\s!rscale=1.1] - \definetypeface [\typescriptone] [\s!rm] [\s!serif] [dejavu] [\s!default] - \definetypeface [\typescriptone] [\s!mm] [\s!math] [dejavu] [\s!default] - \definetypeface [\typescriptone] [\s!tt] [\s!mono] [dejavu] [\s!default] - \stoptypescript - - \starttypescript [noto-serif-gujarati] - \definetypeface [\typescriptone] [\s!rm] [\s!serif] [\typescriptone] [\s!default] [\s!rscale=1.1] - \definetypeface [\typescriptone] [\s!ss] [\s!sans] [dejavu] [\s!default] - \definetypeface [\typescriptone] [\s!mm] [\s!math] [dejavu] [\s!default] - \definetypeface [\typescriptone] [\s!tt] [\s!mono] [dejavu] [\s!default] - \stoptypescript - -\stoptypescriptcollection diff --git a/tex/context/base/mkxl/type-imp-indic.mkxl b/tex/context/base/mkxl/type-imp-indic.mkxl deleted file mode 100644 index aeda08337..000000000 --- a/tex/context/base/mkxl/type-imp-indic.mkxl +++ /dev/null @@ -1,800 +0,0 @@ -%D \module -%D [ file=type-imp-indic, -%D version=2022.02.02, -%D title=\CONTEXT\ Typescript Macros, -%D subtitle=A Collection of Indic Fonts, -%D author=Sreeram & Hans, -%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. - -%D This file is a compation to the other indic typescript that evolved out -%D of a series of experiments with fonts and extensive research by Sreeram -%D with respect to them either or not supporting level one and level two -%D features. When there are issues, just ask on the mailing list. - -\definefilesynonym [type-imp-adishila.mkxl] [type-imp-devanagari.mkxl] -\definefilesynonym [type-imp-adishila-semibold.mkxl] [type-imp-devanagari.mkxl] -\definefilesynonym [type-imp-adishila-heavy.mkxl] [type-imp-devanagari.mkxl] -\definefilesynonym [type-imp-adishila-dev.mkxl] [type-imp-devanagari.mkxl] -\definefilesynonym [type-imp-adishila-dev-guru.mkxl] [type-imp-devanagari.mkxl] -\definefilesynonym [type-imp-adishila-san.mkxl] [type-imp-devanagari.mkxl] -\definefilesynonym [type-imp-adishila-san-letterpress.mkxl] [type-imp-devanagari.mkxl] -\definefilesynonym [type-imp-shobhika.mkxl] [type-imp-devanagari.mkxl] -\definefilesynonym [type-imp-baloo-extrabold.mkxl] [type-imp-devanagari.mkxl] -\definefilesynonym [type-imp-baloo.mkxl] [type-imp-devanagari.mkxl] -\definefilesynonym [type-imp-jaini.mkxl] [type-imp-devanagari.mkxl] -\definefilesynonym [type-imp-jaini-purva.mkxl] [type-imp-devanagari.mkxl] -\definefilesynonym [type-imp-amita.mkxl] [type-imp-devanagari.mkxl] - -\definefilesynonym [type-imp-rit-rachana.mkxl] [type-imp-malayalam.mkxl] -\definefilesynonym [type-imp-panmana.mkxl] [type-imp-malayalam.mkxl] -\definefilesynonym [type-imp-ezhuthu.mkxl] [type-imp-malayalam.mkxl] -\definefilesynonym [type-imp-karumbi.mkxl] [type-imp-malayalam.mkxl] -\definefilesynonym [type-imp-chilanka.mkxl] [type-imp-malayalam.mkxl] -\definefilesynonym [type-imp-anjali-oldlipi.mkxl] [type-imp-malayalam.mkxl] -\definefilesynonym [type-imp-dyuthi.mkxl] [type-imp-malayalam.mkxl] -\definefilesynonym [type-imp-tn-joy.mkxl] [type-imp-malayalam.mkxl] -\definefilesynonym [type-imp-tn-joy-extrabold.mkxl] [type-imp-malayalam.mkxl] -\definefilesynonym [type-imp-gayathri.mkxl] [type-imp-malayalam.mkxl] -\definefilesynonym [type-imp-gayathri-thin.mkxl] [type-imp-malayalam.mkxl] -\definefilesynonym [type-imp-manjari.mkxl] [type-imp-malayalam.mkxl] -\definefilesynonym [type-imp-manjari-thin.mkxl] [type-imp-malayalam.mkxl] -\definefilesynonym [type-imp-baloo-chettan.mkxl] [type-imp-malayalam.mkxl] -\definefilesynonym [type-imp-baloo-chettan-extrabold.mkxl] [type-imp-malayalam.mkxl] -\definefilesynonym [type-imp-rit-sundar.mkxl] [type-imp-malayalam.mkxl] - -\definefilesynonym [type-imp-baloo-tammudu.mkxl] [type-imp-telugu.mkxl] -\definefilesynonym [type-imp-baloo-tammudu-extrabold.mkxl] [type-imp-telugu.mkxl] -\definefilesynonym [type-imp-murty-telugu.mkxl] [type-imp-telugu.mkxl] - -\definefilesynonym [type-imp-murty-kannada.mkxl] [type-imp-kannada.mkxl] - -\definefilesynonym [type-imp-baloo-thambi.mkxl] [type-imp-tamil.mkxl] -\definefilesynonym [type-imp-baloo-thambi-extrabold.mkxl] [type-imp-tamil.mkxl] - -\definefilesynonym [type-imp-baloo-bhai.mkxl] [type-imp-gujarati.mkxl] -\definefilesynonym [type-imp-baloo-bhai-extrabold.mkxl] [type-imp-gujarati.mkxl] -\definefilesynonym [type-imp-noto-serif-gujarati.mkxl] [type-imp-gujarati.mkxl] - -\definefilesynonym [type-imp-baloo-da.mkxl] [type-imp-bengali.mkxl] -\definefilesynonym [type-imp-baloo-da-extrabold.mkxl] [type-imp-bengali.mkxl] -\definefilesynonym [type-imp-murty-bangla.mkxl] [type-imp-bengali.mkxl] - -\continueifinputfile{type-imp-indic.mkxl} - -% \usetypescriptfile[type-imp-indic] - -\usemodule[article-basics] - -\setupbodyfont - [pagella] - -\setuphead - [title] - [alternative=middle, - hidenumber=yes, - after={\blank[halfline]}, - before={\blank[line]}, - page=no, - style=\bfb] - -\definedescription - [fs] - [alternative=left, - title=yes, - width=3cm, - distance=0cm, - before=, - after=, - headstyle={\switchtobodyfont[pagella]}] - -\usetransliteration - [indic] - -\definetransliteration - [devatoiast] - [color=blue, - vector={deva to iast}, - before=] - -\definetransliteration - [devatomlym] - [vector={deva to mlym}] - -\definetransliteration - [devatotlgu] - [vector={deva to tlgu}] - -\definetransliteration - [devatoknda] - [vector={deva to knda}] - -\definetransliteration - [devatogujr] - [vector={deva to gujr}] - -\definetransliteration - [devatobngl] - [vector={deva to bngl}] - -\definebuffer[words] -\definebuffer[iastbuffer] - -\language[sa] - -\starttext - -\startbuffer[words] -दंष्ट्रा श्रेयस्करी त्रेता विक्रेता तच्छ्री अङ्कित शृङ्गार क्व्य शार्ङ्ग निरृति -क्रतुवित्त बर्हिस् प्रेप्सित अङ्घ्रि पङ्क्ति कर्त्तव्य कर्तव्य श्लाघ्यम् -अवप्लुतम् युङ्क्ष्वा क्षेत्रज्ञ अग्निमीळे चँद्र हर्त्रे श्री आर्द्रं -\stopbuffer - -\startbuffer -\getbuffer[words] -\stopbuffer - - -% \startbuffer[iastbuffer] -% \startdevatoiast[before=\blank,after=\blank] -% \getbuffer -% \stopdevatoiast -% \stopbuffer -% -% \getbuffer[iastbuffer] - -% -% -% Devanagari -% -% -\starttitle[title={Adishila}] - \start - \switchtobodyfont[adishila] - \startfs{Regular} - \getbuffer - \stopfs - \startfs{Bold} - {\bf\getbuffer} - \stopfs - \startfs{Italic} - {\it\getbuffer} - \stopfs - \startfs{Bold Italic} - {\bi\getbuffer} - \stopfs - \stop -\stoptitle - -\starttitle[title={Adishila Semibold}] - \start - \switchtobodyfont[adishila-semibold] - \startfs{Regular} - \getbuffer - \stopfs - \startfs{Italic} - {\it\getbuffer} - \stopfs - \stop -\stoptitle - -\starttitle[title={Adishila Heavy}] - \start - \switchtobodyfont[adishila-heavy] - \startfs{Regular} - \getbuffer - \stopfs - \startfs{Italic} - {\it\getbuffer} - \stopfs - \stop -\stoptitle - -\starttitle[title={Adishila Dev}] - \start - \switchtobodyfont[adishila-dev] - \startfs{Regular} - \getbuffer - \stopfs - \startfs{Bold} - {\bf\getbuffer} - \stopfs - \stop -\stoptitle - -\starttitle[title={Adishila Dev}] - \start - \switchtobodyfont[adishila-dev-guru] - \startfs{Guru} - \getbuffer - \stopfs - \stop -\stoptitle - -\starttitle[title={Adishila San}] - \start - \switchtobodyfont[adishila-san] - \startfs{Regular} - \getbuffer - \stopfs - \startfs{Bold} - {\bf\getbuffer} - \stopfs - \startfs{Italic} - {\it\getbuffer} - \stopfs - \startfs{Bold Italic} - {\bi\getbuffer} - \stopfs - \stop -\stoptitle - -\starttitle[title={Adishila San Letterpress}] - \start - \switchtobodyfont[adishila-san-letterpress] - \startfs{Regular} - \getbuffer - \stopfs - \startfs{Bold} - {\bf\getbuffer} - \stopfs - \startfs{Italic} - {\it\getbuffer} - \stopfs - \startfs{Bold Italic} - {\bi\getbuffer} - \stopfs - \stop -\stoptitle - -\starttitle[title={Shobhika}] - \start - \switchtobodyfont[shobhika] - \startfs{Regular} - \getbuffer - \stopfs - \startfs{Bold} - {\bf\getbuffer} - \stopfs - \stop -\stoptitle - -\starttitle[title={Baloo 2 Extra Bold}] - \start - \switchtobodyfont[baloo-extrabold] - \startfs{Regular} - \getbuffer - \stopfs - \startfs{Bold} - {\bf\getbuffer} - \stopfs - \startfs{Italic} - {\it\getbuffer} - \stopfs - \startfs{Bold Italic} - {\bi\getbuffer} - \stopfs - \stop -\stoptitle - -\starttitle[title={Baloo 2}] - \start - \switchtobodyfont[baloo] - \startfs{Regular} - \getbuffer - \stopfs - \startfs{Bold} - {\bf\getbuffer} - \stopfs - \startfs{Italic} - {\it\getbuffer} - \stopfs - \startfs{Bold Italic} - {\bi\getbuffer} - \stopfs - \stop -\stoptitle - -\starttitle[title={Jaini}] - \start - \switchtobodyfont[jaini] - \startfs{Regular} - \getbuffer - \stopfs - \stop -\stoptitle - -\starttitle[title={Jaini Purva}] - \start - \switchtobodyfont[jaini-purva] - \startfs{Regular} - \getbuffer - \stopfs - \stop -\stoptitle - -\starttitle[title={Amita}] - \start - \switchtobodyfont[amita] - \startfs{Regular} - \getbuffer - \stopfs - \startfs{Bold} - {\bf\getbuffer} - \stopfs - \stop -\stoptitle -% -% -% Malayalam -% -% -\startbuffer -\startdevatomlym -\getbuffer[words] -\stopdevatomlym -\stopbuffer - -\starttitle[title={RIT Rachana}] - \start - \switchtobodyfont[rit-rachana] - \startfs{Regular} - \getbuffer - \stopfs - \startfs{Bold} - {\bf\getbuffer} - \stopfs - \startfs{Italic} - {\it\getbuffer} - \stopfs - \startfs{Bold Italic} - {\bi\getbuffer} - \stopfs - \stop -\stoptitle - -\starttitle[title={Panmana}] - \start - \switchtobodyfont[panmana] - \startfs{Regular} - \getbuffer - \stopfs - \startfs{Bold} - {\bf\getbuffer} - \stopfs - \stop -\stoptitle - -\starttitle[title={Ezhuthu}] - \start - \switchtobodyfont[ezhuthu] - \startfs{Regular} - \getbuffer - \stopfs - \startfs{Bold} - {\bf\getbuffer} - \stopfs - \startfs{Slanted} - {\sl\getbuffer} - \stopfs - \startfs{Bold Slanted} - {\bs\getbuffer} - \stopfs - \stop -\stoptitle - -\starttitle[title={Karumbi}] - \start - \switchtobodyfont[karumbi] - \startfs{Regular} - \getbuffer - \stopfs - \stop -\stoptitle - -\starttitle[title={Chilanka}] - \start - \switchtobodyfont[chilanka] - \startfs{Regular} - \getbuffer - \stopfs - \stop -\stoptitle - -\starttitle[title={Anjali Old Lipi}] - \start - \switchtobodyfont[anjali-oldlipi] - \startfs{Regular} - \getbuffer - \stopfs - \stop -\stoptitle - -\starttitle[title={Dyuthi}] - \start - \switchtobodyfont[dyuthi] - \startfs{Regular} - \getbuffer - \stopfs - \stop -\stoptitle - -\starttitle[title={TN Joy}] - \start - \switchtobodyfont[tn-joy] - \startfs{Regular} - \getbuffer - \stopfs - \startfs{Bold} - {\bf\getbuffer} - \stopfs - \stop -\stoptitle - -\starttitle[title={TN Joy Extrabold}] - \start - \switchtobodyfont[tn-joy-extrabold] - \startfs{Regular} - \getbuffer - \stopfs - \startfs{Bold} - {\bf\getbuffer} - \stopfs - \stop -\stoptitle - -\starttitle[title={Gayathri}] - \start - \switchtobodyfont[gayathri] - \startfs{Regular} - \getbuffer - \stopfs - \startfs{Bold} - {\sl\getbuffer} - \stopfs - \startfs{Bold} - {\bf\getbuffer} - \stopfs - \stop -\stoptitle - -\starttitle[title={Gayathri Thin}] - \start - \switchtobodyfont[gayathri-thin] - \startfs{Thin (R)} - \getbuffer - \stopfs - \startfs{Bold*} - {\bf\getbuffer} - \stopfs - \stop -\stoptitle - -\starttitle[title={Manjari}] - \start - \switchtobodyfont[manjari] - \startfs{Regular} - \getbuffer - \stopfs - \startfs{Bold} - {\bf\getbuffer} - \stopfs - \stop -\stoptitle - -\starttitle[title={Manjari Thin}] - \start - \switchtobodyfont[manjari-thin] - \startfs{Regular} - \getbuffer - \stopfs - \startfs{Bold} - {\bf\getbuffer} - \stopfs - \stop -\stoptitle - -\starttitle[title={Baloo Chettan 2}] - \start - \switchtobodyfont[baloo-chettan] - \startfs{Regular} - \getbuffer - \stopfs - \startfs{Bold} - {\bf\getbuffer} - \stopfs - \startfs{Medium \type{\sl}} - {\sl\getbuffer} - \stopfs - \startfs{Semibold \type{\bs}} - {\bs\getbuffer} - \stopfs - \stop -\stoptitle - -\starttitle[title={Baloo Chettan 2 Extrabold}] - \start - \switchtobodyfont[baloo-chettan-extrabold] - \startfs{Medium \type{\tf}} - \getbuffer - \stopfs - \startfs{Extrabold \type{\bf}} - {\bf\getbuffer} - \stopfs - \startfs{Semibold \type{\sl}} - {\sl\getbuffer} - \stopfs - \startfs{Bold \type{\bs}} - {\bs\getbuffer} - \stopfs - \stop -\stoptitle - -\starttitle[title={RIT Sundar}] - \start - \switchtobodyfont[rit-sundar] - \startfs{Regular} - \getbuffer - \stopfs - \startfs{Bold} - {\bf\getbuffer} - \stopfs - \stop -\stoptitle -% -% -% Telugu -% -% -\startbuffer -\startdevatotlgu -\getbuffer[words] -\stopdevatotlgu -\stopbuffer - -\starttitle[title={Baloo Tammudu 2}] - \start - \switchtobodyfont[baloo-tammudu] - \startfs{Regular} - \getbuffer - \stopfs - \startfs{Bold} - {\bf\getbuffer} - \stopfs - \startfs{Slanted} - {\sl\getbuffer} - \stopfs - \startfs{Bold Slanted} - {\bs\getbuffer} - \stopfs - \stop -\stoptitle - -\starttitle[title={Baloo Tammudu 2 Extrabold}] - \start - \switchtobodyfont[baloo-tammudu-extrabold] - \startfs{Regular} - \getbuffer - \stopfs - \startfs{Bold} - {\bf\getbuffer} - \stopfs - \startfs{Italic} - {\sl\getbuffer} - \stopfs - \startfs{Bold Italic} - {\bs\getbuffer} - \stopfs - \stop -\stoptitle - -\starttitle[title={Murty Telugu}] - \start - \switchtobodyfont[murty-telugu] - \startfs{Regular} - \getbuffer - \stopfs - \startfs{Regular} - {\sl\getbuffer} - \stopfs - \startfs{Regular} - {\bf\getbuffer} - \stopfs - \startfs{Regular} - {\bs\getbuffer} - \stopfs - \stop -\stoptitle -% -% -% Kannada -% -% -\startbuffer -\startdevatoknda -\getbuffer[words] -\stopdevatoknda -\stopbuffer - -\starttitle[title={Murty Kannada}] - \start - \switchtobodyfont[murty-kannada] - \startfs{Regular} - \getbuffer - \stopfs - \startfs{Regular} - {\bf\getbuffer} - \stopfs - \stop -\stoptitle -% -% -% Tamil -% -% -\start -\language[ta] -\startbuffer -சிற்றமபலம் புயல் காற்று முன்னர் அதே எதெ அதை ஔவையார் -தொடர்கதை கிழால்லி அழைப்பு வாயிலாக இயற்கை நுழைவாயில் -இளமை காஞ்சி கச்சி இல்க்கியம் ஸ்ரீ -\stopbuffer - -\starttitle[title={Baloo Thambi 2}] - \start - \switchtobodyfont[baloo-thambi] - \startfs{Regular} - \getbuffer - \stopfs - \startfs{ஂMedium \type{\sl}} - {\sl\getbuffer} - \stopfs - \startfs{Semibold \type{\bs}} - {\bs\getbuffer} - \stopfs - \startfs{Bold} - {\bf\getbuffer} - \stopfs - \stop -\stoptitle - -\starttitle[title={Baloo Thambi 2 Extrabold}] - \start - \switchtobodyfont[baloo-thambi-extrabold] - \startfs{Medium} - \getbuffer - \stopfs - \startfs{Semibold \type{\sl}} - {\sl\getbuffer} - \stopfs - \startfs{Bold \type{\bs}} - {\bs\getbuffer} - \stopfs - \startfs{Extrabold} - {\bf\getbuffer} - \stopfs - \stop -\stoptitle -\stop -% -% -% Gujarati -% -% -\startbuffer -\startdevatogujr -\getbuffer[words] -\stopdevatogujr -\stopbuffer - -\starttitle[title={Baloo Bhai 2}] - \start - \switchtobodyfont[baloo-bhai] - \startfs{Regular} - \getbuffer - \stopfs - \startfs{ஂMedium \type{\sl}} - {\sl\getbuffer} - \stopfs - \startfs{Semibold \type{\bs}} - {\bs\getbuffer} - \stopfs - \startfs{Bold} - {\bf\getbuffer} - \stopfs - \stop -\stoptitle - -\starttitle[title={Baloo Bhai 2 Extrabold}] - \start - \switchtobodyfont[baloo-bhai-extrabold] - \startfs{Medium} - \getbuffer - \stopfs - \startfs{Semibold \type{\sl}} - {\sl\getbuffer} - \stopfs - \startfs{Bold \type{\bs}} - {\bs\getbuffer} - \stopfs - \startfs{Extrabold} - {\bf\getbuffer} - \stopfs - \stop -\stoptitle - -\starttitle[title={Noto Serif Gujarati}] - \start - \switchtobodyfont[noto-serif-gujarati] - \startfs{Medium} - \getbuffer - \stopfs - \startfs{Extrabold} - {\bf\getbuffer} - \stopfs - \stop -\stoptitle -% -% -% Bengali -% -% -\startbuffer -\startdevatobngl -\getbuffer[words] -\stopdevatobngl -\stopbuffer - -\starttitle[title={Baloo Da 2}] - \start - \switchtobodyfont[baloo-da] - \startfs{Regular} - \getbuffer - \stopfs - \startfs{Medium \type{\sl}} - {\sl\getbuffer} - \stopfs - \startfs{Semibold \type{\bs}} - {\bs\getbuffer} - \stopfs - \startfs{Bold} - {\bf\getbuffer} - \stopfs - \stop -\stoptitle - -\starttitle[title={Baloo Da 2 Extrabold}] - \start - \switchtobodyfont[baloo-da-extrabold] - \startfs{Medium} - \getbuffer - \stopfs - \startfs{Semibold \type{\sl}} - {\sl\getbuffer} - \stopfs - \startfs{Bold \type{\bs}} - {\bs\getbuffer} - \stopfs - \startfs{Extrabold} - {\bf\getbuffer} - \stopfs - \stop -\stoptitle - -\starttitle[title={Murty Bengali}] - \start - \switchtobodyfont[murty-bangla] - \startfs{Regular} - \getbuffer - \stopfs - \startfs{Regular} - {\bf\getbuffer} - \stopfs - \stop -\stoptitle - -\stoptext diff --git a/tex/context/base/mkxl/type-imp-kannada.mkxl b/tex/context/base/mkxl/type-imp-kannada.mkxl deleted file mode 100644 index 4838075b2..000000000 --- a/tex/context/base/mkxl/type-imp-kannada.mkxl +++ /dev/null @@ -1,73 +0,0 @@ -%D \module -%D [ file=type-imp-kannada, -%D version=2022.01.27, -%D title=\CONTEXT\ Typescript Macros, -%D subtitle=Dekannada, -%D author=śrīrāma (Sreeram), -%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. - -\starttypescriptcollection[kannada] - - \doifunknownfontfeature {kannada-bold-30} {\definefontfeature[kannada-bold-30][boldened-30]} - - % Symbolic names for fonts: - - \starttypescript [\s!serif] [murty-kannada] - \definefontsynonym [MurtyKannada-Regular] [\s!name:murtykannadaregular] [\s!features=kannada-two] - \definefontsynonym [MurtyKannada-Bold] [\s!name:murtykannadaregular] [\s!features={kannada-two,kannada-bold-30}] - \stoptypescript - - \starttypescript [\s!sans] [baloo-tamma, baloo-tamma-extrabold] - \definefontsynonym [BalooTamma2-Regular] [\s!name:balootamma2regular] [\s!features=kannada-two] - \definefontsynonym [BalooTamma2-Medium] [\s!name:balootamma2medium] [\s!features=kannada-two] - \definefontsynonym [BalooTamma2-Semibold] [\s!name:balootamma2semibold] [\s!features=kannada-two] - \definefontsynonym [BalooTamma2-Bold] [\s!name:balootamma2bold] [\s!features=kannada-two] - \definefontsynonym [BalooTamma2-Extrabold] [\s!name:balootamma2extrabold] [\s!features=kannada-two] - \stoptypescript - - % Grouping of styles: - - \starttypescript [\s!sans] [baloo-tamma] [\s!name] - \setups[\s!font:\s!fallback:\s!serif] - \definefontsynonym [\s!Sans] [BalooTamma2-Regular] - \definefontsynonym [\s!SansSlanted] [BalooTamma2-Medium] - \definefontsynonym [\s!SansBold] [BalooTamma2-Bold] - \definefontsynonym [\s!SansBoldSlanted] [BalooTamma2-Semibold] - \stoptypescript - - \starttypescript [\s!sans] [baloo-tamma-extrabold] [\s!name] - \setups[\s!font:\s!fallback:\s!serif] - \definefontsynonym [\s!Sans] [BalooTamma2-Medium] - \definefontsynonym [\s!SansSlanted] [BalooTamma2-Semibold] - \definefontsynonym [\s!SansBold] [BalooTamma2-Extrabold] - \definefontsynonym [\s!SansBoldSlanted] [BalooTamma2-Bold] - \stoptypescript - - \starttypescript [\s!serif] [murty-kannada] [\s!name] - \setups[\s!font:\s!fallback:\s!serif] - \definefontsynonym [\s!Serif] [MurtyKannada-Regular] - \definefontsynonym [\s!SerifBold] [MurtyKannada-Bold] - \stoptypescript - - % Typefaces: - - \starttypescript [baloo-tamma, baloo-tamma-extrabold] - \definetypeface [\typescriptone] [\s!ss] [\s!sans] [\typescriptone] [\s!default] - \definetypeface [\typescriptone] [\s!rm] [\s!serif] [dejavu] [\s!default] - \definetypeface [\typescriptone] [\s!mm] [\s!math] [dejavu] [\s!default] - \definetypeface [\typescriptone] [\s!tt] [\s!mono] [dejavu] [\s!default] - \stoptypescript - - \starttypescript [murty-kannada] - \definetypeface [murty-kannada] [\s!rm] [\s!serif] [murty-kannada] [\s!default] - \definetypeface [\typescriptone] [\s!ss] [\s!sans] [dejavu] [\s!default] - \definetypeface [\typescriptone] [\s!mm] [\s!math] [dejavu] [\s!default] - \definetypeface [\typescriptone] [\s!tt] [\s!mono] [dejavu] [\s!default] - \stoptypescript - -\stoptypescriptcollection diff --git a/tex/context/base/mkxl/type-imp-malayalam.mkxl b/tex/context/base/mkxl/type-imp-malayalam.mkxl deleted file mode 100644 index 67a35d472..000000000 --- a/tex/context/base/mkxl/type-imp-malayalam.mkxl +++ /dev/null @@ -1,224 +0,0 @@ -%D \module -%D [ file=type-imp-malayam, -%D version=2022.01.27, -%D title=\CONTEXT\ Typescript Macros, -%D subtitle=Demalayalam, -%D author=śrīrāma (Sreeram), -%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. - -%D This collection uses rscaling so that the fonts can be used alongside. - -\starttypescriptcollection[malayalam] - - \doifunknownfontfeature {malayalam-bold-30} {\definefontfeature[malayalam-bold-30][boldened-30]} - - % Symbolic names for fonts: - - \starttypescript [\s!serif] [rit-rachana] - \definefontsynonym [RITRachana-Regular] [\s!name:ritrachanaregular] [\s!features=malayalam-two] - \definefontsynonym [RITRachana-Bold] [\s!name:ritrachanabold] [\s!features=malayalam-two] - \definefontsynonym [RITRachana-Italic] [\s!name:ritrachanaitalic] [\s!features=malayalam-two] - \definefontsynonym [RITRachana-BoldItalic] [\s!name:ritrachanabolditalic] [\s!features=malayalam-two] - \stoptypescript - - \starttypescript [\s!serif] [panmana] - \definefontsynonym [Panmana-Regular] [\s!name:panmanaregular] [\s!features=malayalam-two] - \definefontsynonym [Panmana-Bold] [\s!name:panmanaregular] [\s!features={malayalam-two,malayalam-bold-30}] - \stoptypescript - - \starttypescript [\s!serif] [rit-sundar] - \definefontsynonym [RITSundar-Regular] [\s!name:ritsundarbold] [\s!features=malayalam-two] - \definefontsynonym [RITSundar-Bold] [\s!name:ritsundarbold] [\s!features={malayalam-two,malayalam-bold-30}] - \stoptypescript - - \starttypescript [\s!sans] [tn-joy, tn-joy-extrabold] - \definefontsynonym [TNJoy-Regular] [\s!name:tnjoyregular] [\s!features=malayalam-two] - \definefontsynonym [TNJoy-Bold] [\s!name:tnjoybold] [\s!features=malayalam-two] - \definefontsynonym [TNJoy-Extrabold] [\s!name:tnjoyextrabold] [\s!features=malayalam-two] - \stoptypescript - - \starttypescript [\s!sans] [ezhuthu] - \definefontsynonym [Ezhuthu-Regular] [\s!name:ezhuthuregular] [\s!features=malayalam-two] - \definefontsynonym [Ezhuthu-Bold] [\s!name:ezhuthuregular] [\s!features={malayalam-two,malayalam-bold-30}] - \stoptypescript - - \starttypescript [\s!sans] [baloo-chettan,baloo-chettan-extrabold] - \definefontsynonym [BalooChettan2-Regular] [\s!name:baloochettan2regular] [\s!features=malayalam-two] - \definefontsynonym [BalooChettan2-Medium] [\s!name:baloochettan2medium] [\s!features=malayalam-two] - \definefontsynonym [BalooChettan2-Semibold] [\s!name:baloochettan2semibold] [\s!features=malayalam-two] - \definefontsynonym [BalooChettan2-Bold] [\s!name:baloochettan2bold] [\s!features=malayalam-two] - \definefontsynonym [BalooChettan2-Extrabold] [\s!name:baloochettan2extrabold] [\s!features=malayalam-two] - \stoptypescript - - \starttypescript [\s!sans] [gayathri, gayathri-thin] - \definefontsynonym [Gayathri-Regular] [\s!name:gayathriregular] [\s!features=malayalam-two] - \definefontsynonym [Gayathri-Bold] [\s!name:gayathribold] [\s!features=malayalam-two] - \definefontsynonym [Gayathri-Thin] [\s!name:gayathrithin] [\s!features=malayalam-two] - \stoptypescript - - \starttypescript [\s!sans] [manjari,manjari-thin] - \definefontsynonym [Manjari-Regular] [\s!name:manjariregular] [\s!features=malayalam-two] - \definefontsynonym [Manjari-Bold] [\s!name:manjaribold] [\s!features=malayalam-two] - \definefontsynonym [Manjari-Thin] [\s!name:manjarithin] [\s!features=malayalam-two] - \stoptypescript - - \starttypescript [\s!sans] [karumbi] - \definefontsynonym [Karumbi-Regular] [\s!name:karumbiregular] [\s!features=malayalam-two] - \stoptypescript - - \starttypescript [\s!sans] [chilanka] - \definefontsynonym [Chilanka-Regular] [\s!name:chilankaregular] [\s!features=malayalam-two] - \stoptypescript - - \starttypescript [\s!sans] [anjali-oldlipi] - \definefontsynonym [Anjali-Oldlipi-Regular] [\s!name:anjalioldlipiregular] [\s!features=malayalam-two] - \stoptypescript - - \starttypescript [\s!sans] [dyuthi] - \definefontsynonym [Dyuthi-Regular] [\s!name:dyuthiregular] [\s!features=malayalam-two] - \stoptypescript - - % Grouping of styles: - - \starttypescript [\s!serif] [rit-rachana] [\s!name] - \setups[\s!font:\s!fallback:\s!serif] - \definefontsynonym [\s!Serif] [RITRachana-Regular] - \definefontsynonym [\s!SerifBold] [RITRachana-Bold] - \definefontsynonym [\s!SerifItalic] [RITRachana-Italic] - \definefontsynonym [\s!SerifBoldItalic] [RITRachana-BoldItalic] - \stoptypescript - - \starttypescript [\s!serif] [panmana] [\s!name] - \setups[\s!font:\s!fallback:\s!serif] - \definefontsynonym [\s!Serif] [Panmana-Regular] - \definefontsynonym [\s!SerifBold] [Panmana-Bold] - \stoptypescript - - \starttypescript [\s!serif] [rit-sundar] [\s!name] - \setups[\s!font:\s!fallback:\s!serif] - \definefontsynonym [\s!Serif] [RITSundar-Regular] - \definefontsynonym [\s!SerifBold] [RITSundar-Bold] - \stoptypescript - - \starttypescript [\s!sans] [tn-joy] [\s!name] - \setups[\s!font:\s!fallback:\s!sans] - \definefontsynonym [\s!Sans] [TNJoy-Regular] - \definefontsynonym [\s!SansBold] [TNJoy-Bold] - \stoptypescript - - \starttypescript [\s!sans] [tn-joy-extrabold] [\s!name] - \setups[\s!font:\s!fallback:\s!sans] - \definefontsynonym [\s!Sans] [TNJoy-Bold] - \definefontsynonym [\s!SansBold] [TNJoy-Extrabold] - \stoptypescript - - \starttypescript [\s!sans] [ezhuthu] [\s!name] - \setups[\s!font:\s!fallback:\s!sans] - \definefontsynonym [\s!Sans] [Ezhuthu-Regular] - \definefontsynonym [\s!SansBold] [Ezhuthu-Bold] - \stoptypescript - - \starttypescript [\s!sans] [karumbi] [\s!name] - \setups[\s!font:\s!fallback:\s!sans] - \definefontsynonym [\s!Sans] [Karumbi-Regular] - \definefontsynonym [\s!SansBold] [Karumbi-Bold] - \stoptypescript - - \starttypescript [\s!sans] [chilanka] [\s!name] - \setups[\s!font:\s!fallback:\s!sans] - \definefontsynonym [\s!Sans] [Chilanka-Regular] - \stoptypescript - - \starttypescript [\s!sans] [anjali-oldlipi] [\s!name] - \setups[\s!font:\s!fallback:\s!sans] - \definefontsynonym [\s!Sans] [Anjali-Oldlipi-Regular] - \stoptypescript - - \starttypescript [\s!sans] [dyuthi] [\s!name] - \setups[\s!font:\s!fallback:\s!sans] - \definefontsynonym [\s!Sans] [Dyuthi-Regular] - \stoptypescript - - \starttypescript [\s!sans] [gayathri] [\s!name] - \setups[\s!font:\s!fallback:\s!sans] - \definefontsynonym [\s!Sans] [Gayathri-Regular] - \definefontsynonym [\s!SansBold] [Gayathri-Bold] - \stoptypescript - - \starttypescript [\s!sans] [gayathri-thin] [\s!name] - \setups[\s!font:\s!fallback:\s!sans] - \definefontsynonym [\s!Sans] [Gayathri-Thin] - \definefontsynonym [\s!SansBold] [Gayathri-Regular] - \stoptypescript - - \starttypescript [\s!sans] [manjari] [\s!name] - \setups[\s!font:\s!fallback:\s!sans] - \definefontsynonym [\s!Sans ] [Manjari-Regular] - \definefontsynonym [\s!SansBold] [Manjari-Bold] - \stoptypescript - - \starttypescript [\s!sans] [manjari-thin] [\s!name] - \setups[\s!font:\s!fallback:\s!sans] - \definefontsynonym [\s!Sans] [Manjari-Thin] - \definefontsynonym [\s!SansBold] [Manjari-Regular] - \stoptypescript - - \starttypescript [\s!sans] [baloo-chettan] [\s!name] - \setups[\s!font:\s!fallback:\s!sans] - \definefontsynonym [\s!Sans] [BalooChettan2-Regular] - \definefontsynonym [\s!SansBold] [BalooChettan2-Bold] - \definefontsynonym [\s!SansSlanted] [BalooChettan2-Medium] - \definefontsynonym [\s!SansBoldSlanted] [BalooChettan2-Semibold] - \stoptypescript - - \starttypescript [\s!sans] [baloo-chettan-extrabold] [name] - \setups[\s!font:\s!fallback:\s!sans] - \definefontsynonym [\s!Sans] [BalooChettan2-Medium] - \definefontsynonym [\s!SansSlanted] [BalooChettan2-Semibold] - \definefontsynonym [\s!SansBoldSlanted] [BalooChettan2-Bold] - \definefontsynonym [\s!SansBold] [BalooChettan2-Extrabold] - \stoptypescript - - % Typefaces: - - \starttypescript [rit-rachana,rit-sundar,panmana] - \definetypeface [\typescriptone] [\s!rm] [\s!serif] [\typescriptone] [\s!default] [\s!rscale=1.25] - \definetypeface [\typescriptone] [\s!ss] [\s!sans] [dejavu] [\s!default] - \definetypeface [\typescriptone] [\s!mm] [\s!math] [dejavu] [\s!default] - \definetypeface [\typescriptone] [\s!tt] [\s!mono] [dejavu] [\s!default] - \stoptypescript - - \starttypescript [ezhuthu,karumbi,tn-joy,tn-joy-extrabold] - \definetypeface [\typescriptone] [\s!ss] [\s!sans] [\typescriptone] [\s!default] [\s!rscale=1.25] - \definetypeface [\typescriptone] [\s!rm] [\s!serif] [dejavu] [\s!default] - \definetypeface [\typescriptone] [\s!mm] [\s!math] [dejavu] [\s!default] - \definetypeface [\typescriptone] [\s!tt] [\s!mono] [dejavu] [\s!default] - \stoptypescript - - \starttypescript [chilanka,anjali-oldlipi] - \definetypeface [\typescriptone] [\s!ss] [\s!sans] [\typescriptone] [\s!default] - \definetypeface [\typescriptone] [\s!rm] [\s!serif] [dejavu] [\s!default] - \definetypeface [\typescriptone] [\s!mm] [\s!math] [dejavu] [\s!default] - \definetypeface [\typescriptone] [\s!tt] [\s!mono] [dejavu] [\s!default] - \stoptypescript - - \starttypescript [dyuthi,gayathri,gayathri-thin,manjari,manjari-thin] - \definetypeface [\typescriptone] [\s!ss] [\s!sans] [\typescriptone] [\s!default] [\s!rscale=1.1] - \definetypeface [\typescriptone] [\s!rm] [\s!serif] [dejavu] [\s!default] - \definetypeface [\typescriptone] [\s!mm] [\s!math] [dejavu] [\s!default] - \definetypeface [\typescriptone] [\s!tt] [\s!mono] [dejavu] [\s!default] - \stoptypescript - - \starttypescript [baloo-chettan,baloo-chettan-extrabold] - \definetypeface [\typescriptone] [\s!ss] [\s!sans] [baloo-chettan] [\s!default] - \definetypeface [\typescriptone] [\s!rm] [\s!serif] [dejavu] [\s!default] - \definetypeface [\typescriptone] [\s!mm] [\s!math] [dejavu] [\s!default] - \definetypeface [\typescriptone] [\s!tt] [\s!mono] [dejavu] [\s!default] - \stoptypescript - -\stoptypescriptcollection diff --git a/tex/context/base/mkxl/type-imp-tamil.mkxl b/tex/context/base/mkxl/type-imp-tamil.mkxl deleted file mode 100644 index 90516365e..000000000 --- a/tex/context/base/mkxl/type-imp-tamil.mkxl +++ /dev/null @@ -1,53 +0,0 @@ -%D \module -%D [ file=type-imp-tamil, -%D version=2022.02.02, -%D title=\CONTEXT\ Typescript Macros, -%D subtitle=Tamil, -%D author=śrīrāma (Sreeram), -%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. - -\starttypescriptcollection[tamil] - - % Symbolic names for fonts: - - \starttypescript [\s!sans] [baloo-thambi, baloo-thambi-extrabold] - \definefontsynonym [BalooThambi2-Regular] [\s!name:baloothambi2regular] [\s!features=tamil-two] - \definefontsynonym [BalooThambi2-Medium] [\s!name:baloothambi2medium] [\s!features=tamil-two] - \definefontsynonym [BalooThambi2-Semibold] [\s!name:baloothambi2semibold] [\s!features=tamil-two] - \definefontsynonym [BalooThambi2-Bold] [\s!name:baloothambi2bold] [\s!features=tamil-two] - \definefontsynonym [BalooThambi2-Extrabold] [\s!name:baloothambi2extrabold] [\s!features=tamil-two] - \stoptypescript - - % Grouping of styles: - - \starttypescript [\s!sans] [baloo-thambi] [\s!name] - \setups[\s!font:\s!fallback:\s!serif] - \definefontsynonym [\s!Sans] [BalooThambi2-Regular] - \definefontsynonym [\s!SansSlanted] [BalooThambi2-Medium] - \definefontsynonym [\s!SansBold] [BalooThambi2-Bold] - \definefontsynonym [\s!SansBoldSlanted] [BalooThambi2-Semibold] - \stoptypescript - - \starttypescript [\s!sans] [baloo-thambi-extrabold] [\s!name] - \setups[\s!font:\s!fallback:\s!serif] - \definefontsynonym [\s!Sans] [BalooThambi2-Medium] - \definefontsynonym [\s!SansSlanted] [BalooThambi2-Semibold] - \definefontsynonym [\s!SansBold] [BalooThambi2-Extrabold] - \definefontsynonym [\s!SansBoldSlanted] [BalooThambi2-Bold] - \stoptypescript - - % Typefaces: - - \starttypescript [baloo-thambi, baloo-thambi-extrabold] - \definetypeface [\typescriptone] [\s!ss] [\s!sans] [\typescriptone] [\s!default] - \definetypeface [\typescriptone] [\s!rm] [\s!serif] [dejavu] [\s!default] - \definetypeface [\typescriptone] [\s!mm] [\s!math] [dejavu] [\s!default] - \definetypeface [\typescriptone] [\s!tt] [\s!mono] [dejavu] [\s!default] - \stoptypescript - -\stoptypescriptcollection diff --git a/tex/context/base/mkxl/type-imp-telugu.mkxl b/tex/context/base/mkxl/type-imp-telugu.mkxl deleted file mode 100644 index 33d07664c..000000000 --- a/tex/context/base/mkxl/type-imp-telugu.mkxl +++ /dev/null @@ -1,74 +0,0 @@ -%D \module -%D [ file=type-imp-telugu, -%D version=2022.01.27, -%D title=\CONTEXT\ Typescript Macros, -%D subtitle=Telugu, -%D author=śrīrāma (Sreeram), -%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. - -\starttypescriptcollection[telugu] - - \doifunknownfontfeature {telugu-bold-30} {\definefontfeature[telugu-bold-30][boldened-30]} - \doifunknownfontfeature {telugu-slant} {\definefontfeature[telugu-slant][slant=0.25]} - - % Symbolic names for fonts: - - \starttypescript [\s!serif] [murty-telugu] - \definefontsynonym [MurtyTelugu-Regular] [\s!name:murtyteluguregular] [\s!features=telugu-two] - \definefontsynonym [MurtyTelugu-Bold] [\s!name:murtyteluguregular] [\s!features={telugu-two,telugu-bold-30}] - \stoptypescript - - \starttypescript [\s!sans] [baloo-tammudu, baloo-tammudu-extrabold] - \definefontsynonym [BalooTammudu2-Regular] [\s!name:balootammudu2regular] [\s!features=telugu-two] - \definefontsynonym [BalooTammudu2-Medium] [\s!name:balootammudu2medium] [\s!features=telugu-two] - \definefontsynonym [BalooTammudu2-Semibold] [\s!name:balootammudu2semibold] [\s!features=telugu-two] - \definefontsynonym [BalooTammudu2-Bold] [\s!name:balootammudu2bold] [\s!features=telugu-two] - \definefontsynonym [BalooTammudu2-Extrabold] [\s!name:balootammudu2extrabold] [\s!features=telugu-two] - \stoptypescript - - % Grouping of styles: - - \starttypescript [\s!sans] [baloo-tammudu] [\s!name] - \setups[\s!font:\s!fallback:\s!serif] - \definefontsynonym [\s!Sans] [BalooTammudu2-Regular] - \definefontsynonym [\s!SansSlanted] [BalooTammudu2-Medium] - \definefontsynonym [\s!SansBold] [BalooTammudu2-Bold] - \definefontsynonym [\s!SansBoldSlanted] [BalooTammudu2-Semibold] - \stoptypescript - - \starttypescript [\s!sans] [baloo-tammudu-extrabold] [\s!name] - \setups[\s!font:\s!fallback:\s!serif] - \definefontsynonym [\s!Sans] [BalooTammudu2-Medium] - \definefontsynonym [\s!SansSlanted] [BalooTammudu2-Semibold] - \definefontsynonym [\s!SansBold] [BalooTammudu2-Extrabold] - \definefontsynonym [\s!SansBoldSlanted] [BalooTammudu2-Bold] - \stoptypescript - - \starttypescript [\s!serif] [murty-telugu] [\s!name] - \setups[\s!font:\s!fallback:\s!serif] - \definefontsynonym [\s!Serif] [MurtyTelugu-Regular] - \definefontsynonym [\s!SerifBold] [MurtyTelugu-Bold] - \stoptypescript - - % Typefaces: - - \starttypescript [baloo-tammudu, baloo-tammudu-extrabold] - \definetypeface [\typescriptone] [\s!ss] [\s!sans] [\typescriptone] [\s!default] - \definetypeface [\typescriptone] [\s!rm] [\s!serif] [dejavu] [\s!default] - \definetypeface [\typescriptone] [\s!mm] [\s!math] [dejavu] [\s!default] - \definetypeface [\typescriptone] [\s!tt] [\s!mono] [dejavu] [\s!default] - \stoptypescript - - \starttypescript [murty-telugu] - \definetypeface [\typescriptone] [\s!rm] [\s!serif] [murty-telugu] [\s!default] - \definetypeface [\typescriptone] [\s!ss] [\s!sans] [dejavu] [\s!default] - \definetypeface [\typescriptone] [\s!mm] [\s!math] [dejavu] [\s!default] - \definetypeface [\typescriptone] [\s!tt] [\s!mono] [dejavu] [\s!default] - \stoptypescript - -\stoptypescriptcollection diff --git a/tex/context/base/mkxl/type-set.mkxl b/tex/context/base/mkxl/type-set.mkxl index 62dd3c9ab..ae1c85ee9 100644 --- a/tex/context/base/mkxl/type-set.mkxl +++ b/tex/context/base/mkxl/type-set.mkxl @@ -180,6 +180,6 @@ \definefilesynonym [type-imp-antykwa-light.mkiv] [type-imp-antykwa.mkiv] \definefilesynonym [type-imp-antykwa-cond.mkiv] [type-imp-antykwa.mkiv] -\definefilesynonym [type-imp-antykwa-lightcond.mkiv] [type-imp-antykwa.mkiv] +\definefilesynonym [type-imp-antykwa-light-cond.mkiv] [type-imp-antykwa.mkiv] \protect \endinput diff --git a/tex/context/base/mkxl/typo-dha.lmt b/tex/context/base/mkxl/typo-dha.lmt index e1a6662c4..8671970d8 100644 --- a/tex/context/base/mkxl/typo-dha.lmt +++ b/tex/context/base/mkxl/typo-dha.lmt @@ -81,12 +81,12 @@ local glue_code = nodecodes.glue local dir_code = nodecodes.dir local par_code = nodecodes.par -local dirvalues = nodes.dirvalues -local lefttoright_code = dirvalues.lefttoright -local righttoleft_code = dirvalues.righttoleft - local parfillskip_code = gluecodes.parfillskip +local directioncodes = tex.directioncodes +local lefttoright_code = directioncodes.lefttoright +local righttoleft_code = directioncodes.righttoleft + local new_direction = nodepool.direction local insert = table.insert diff --git a/tex/context/base/mkxl/typo-duc.lmt b/tex/context/base/mkxl/typo-duc.lmt index 2e3638946..ecc1396a1 100644 --- a/tex/context/base/mkxl/typo-duc.lmt +++ b/tex/context/base/mkxl/typo-duc.lmt @@ -99,9 +99,9 @@ local penalty_code = nodecodes.penalty local parfillskip_code = gluecodes.parfillskip local parfillleftskip_code = gluecodes.parfillleftskip -local dirvalues = nodes.dirvalues -local lefttoright_code = dirvalues.lefttoright -local righttoleft_code = dirvalues.righttoleft +local directioncodes = tex.directioncodes +local lefttoright_code = directioncodes.lefttoright +local righttoleft_code = directioncodes.righttoleft local maximum_stack = 0xFF @@ -609,23 +609,23 @@ local function resolve_weak(list,size,start,limit,orderbefore,orderafter) else -- only more efficient when we have es/cs local runner = start + 2 if runner <= limit then - local before = list[start] - local entry = list[start + 1] - local after = list[runner] + local before = list[start] + local current = list[start + 1] + local after = list[runner] while after do - local direction = entry.direction + local direction = current.direction if direction == "es" then if before.direction == "en" and after.direction == "en" then - entry.direction = "en" + current.direction = "en" end elseif direction == "cs" then local prevdirection = before.direction if prevdirection == "en" then if after.direction == "en" then - entry.direction = "en" + current.direction = "en" end elseif prevdirection == "an" and after.direction == "an" then - entry.direction = "an" + current.direction = "an" end end before = current diff --git a/tex/context/base/mkxl/typo-lin.lmt b/tex/context/base/mkxl/typo-lin.lmt index 42ee5a957..2a0182e28 100644 --- a/tex/context/base/mkxl/typo-lin.lmt +++ b/tex/context/base/mkxl/typo-lin.lmt @@ -97,7 +97,7 @@ local new_hlist = nodepool.hlist local new_rule = nodepool.rule local new_glue = nodepool.glue -local righttoleft_code = nodes.dirvalues.righttoleft +local righttoleft_code = tex.directioncodes.righttoleft local setmetatableindex = table.setmetatableindex |