summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/context/base/mkiv/publ-ini.lua
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/context/base/mkiv/publ-ini.lua')
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/publ-ini.lua43
1 files changed, 10 insertions, 33 deletions
diff --git a/Master/texmf-dist/tex/context/base/mkiv/publ-ini.lua b/Master/texmf-dist/tex/context/base/mkiv/publ-ini.lua
index f62352f07f0..9dfeda168cc 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/publ-ini.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/publ-ini.lua
@@ -32,7 +32,7 @@ local sortedkeys, sortedhash = table.sortedkeys, table.sortedhash
local setmetatableindex = table.setmetatableindex
local lpegmatch = lpeg.match
local P, S, C, Ct, Cs, R, Carg = lpeg.P, lpeg.S, lpeg.C, lpeg.Ct, lpeg.Cs, lpeg.R, lpeg.Carg
-local upper = characters.upper
+local upper = utf.upper
local report = logs.reporter("publications")
local report_cite = logs.reporter("publications","cite")
@@ -229,9 +229,9 @@ logs.registerfinalactions(function()
logs.startfilelogging(report,"used btx commands")
done = true
end
- if isdefined(command) then
+ if isdefined[command] then
report("%-20s %-20s % 5i %s",name,command,n,"known")
- elseif isdefined(upper(command)) then
+ elseif isdefined[upper(command)] then
report("%-20s %-20s % 5i %s",name,command,n,"KNOWN")
else
report("%-20s %-20s % 5i %s",name,command,n,"unknown")
@@ -246,7 +246,7 @@ logs.registerfinalactions(function()
logs.starterrorlogging(report,"unknown btx commands")
for name, dataset in sortedhash(datasets) do
for command, n in sortedhash(dataset.commands) do
- if not isdefined(command) and not isdefined(upper(command)) then
+ if not isdefined[command] and not isdefined[upper(command)] then
report("%-20s %-20s % 5i %s",name,command,n,"unknown")
end
end
@@ -1065,17 +1065,14 @@ do
-- maybe not redo when already done
local function shortsorter(a,b)
- local ay = a[2] -- year
- local by = b[2] -- year
+ local ay, by = a[2], b[2] -- year
if ay ~= by then
return ay < by
end
- local ay = a[3] -- suffix
- local by = b[3] -- suffix
+ local ay, by = a[3], b[3] -- suffix
if ay ~= by then
-- bah, bah, bah
- local an = tonumber(ay)
- local bn = tonumber(by)
+ local an, bn = tonumber(ay), tonumber(by)
if an and bn then
return an < bn
else
@@ -2026,8 +2023,7 @@ do
for i=1,nofranges do
local r = ranges[i]
ctx_btxsetconcat(concatstate(i,nofranges))
- local first = r[1]
- local last = r[2]
+ local first, last = r[1], r[2]
ctx_btxsetfirstinternal(first[2].internal)
ctx_btxsetfirstpage(first[1])
if last then
@@ -2048,8 +2044,7 @@ do
}
local function identical(a,b)
- local na = #a
- local nb = #b
+ local na, nb = #a, #b
if na ~= nb then
return false
end
@@ -2061,8 +2056,7 @@ do
end
return true
end
- local ha = a.hash
- local hb = b.hash
+ local ha, hb = a.hash, b.hash
if ha then
return ha == hb
end
@@ -3462,20 +3456,3 @@ do
}
end
-
-do
-
- local btxstring = ""
-
- implement {
- name = "btxcmdstring",
- actions = function() if btxstring ~= "" then context(btxstring) end end,
- }
-
- function publications.prerollcmdstring(str)
- btxstring = str or ""
- tex.runtoks("t_btx_cmd")
- return nodes.toutf(tex.getbox("b_btx_cmd").list) or str
- end
-
-end