summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--scripts/context/lua/mtx-babel.lua36
-rw-r--r--scripts/context/lua/mtx-base.lua60
-rw-r--r--scripts/context/lua/mtx-cache.lua50
-rw-r--r--scripts/context/lua/mtx-chars.lua38
-rw-r--r--scripts/context/lua/mtx-check.lua22
-rw-r--r--scripts/context/lua/mtx-colors.lua34
-rw-r--r--scripts/context/lua/mtx-context.lua350
-rw-r--r--scripts/context/lua/mtx-convert.lua33
-rw-r--r--scripts/context/lua/mtx-fonts.lua205
-rw-r--r--scripts/context/lua/mtx-grep.lua28
-rw-r--r--scripts/context/lua/mtx-interface.lua304
-rw-r--r--scripts/context/lua/mtx-metapost.lua66
-rw-r--r--scripts/context/lua/mtx-metatex.lua28
-rw-r--r--scripts/context/lua/mtx-modules.lua33
-rw-r--r--scripts/context/lua/mtx-package.lua32
-rw-r--r--scripts/context/lua/mtx-patterns.lua87
-rw-r--r--scripts/context/lua/mtx-profile.lua24
-rw-r--r--scripts/context/lua/mtx-scite.lua50
-rw-r--r--scripts/context/lua/mtx-server-ctx-fonttest.lua26
-rw-r--r--scripts/context/lua/mtx-server-ctx-help.lua6
-rw-r--r--scripts/context/lua/mtx-server.lua70
-rw-r--r--scripts/context/lua/mtx-texworks.lua36
-rw-r--r--scripts/context/lua/mtx-timing.lua32
-rw-r--r--scripts/context/lua/mtx-tools.lua66
-rw-r--r--scripts/context/lua/mtx-unzip.lua22
-rw-r--r--scripts/context/lua/mtx-update.lua75
-rw-r--r--scripts/context/lua/mtx-watch.lua64
-rw-r--r--scripts/context/lua/mtxrun.lua1105
-rw-r--r--scripts/context/stubs/mswin/mtxrun.lua1105
-rw-r--r--scripts/context/stubs/unix/mtxrun1105
-rw-r--r--tex/context/base/attr-col.lua6
-rw-r--r--tex/context/base/attr-ini.mkiv4
-rw-r--r--tex/context/base/attr-lay.lua2
-rw-r--r--tex/context/base/back-exp.lua2
-rw-r--r--tex/context/base/back-ini.lua16
-rw-r--r--tex/context/base/bibl-bib.lua6
-rw-r--r--tex/context/base/bibl-tra.lua6
-rw-r--r--tex/context/base/buff-ini.lua6
-rw-r--r--tex/context/base/buff-par.lua2
-rw-r--r--tex/context/base/buff-ver.lua25
-rw-r--r--tex/context/base/char-ini.mkiv14
-rw-r--r--tex/context/base/cldf-ini.lua4
-rw-r--r--tex/context/base/colo-icc.lua4
-rw-r--r--tex/context/base/colo-ini.lua18
-rw-r--r--tex/context/base/cont-new.mkii2
-rw-r--r--tex/context/base/cont-new.mkiv6
-rw-r--r--tex/context/base/context.mkii2
-rw-r--r--tex/context/base/context.mkiv2
-rw-r--r--tex/context/base/core-ctx.lua12
-rw-r--r--tex/context/base/core-fil.mkiv2
-rw-r--r--tex/context/base/core-job.lua6
-rw-r--r--tex/context/base/core-job.mkiv14
-rw-r--r--tex/context/base/core-mis.mkiv2
-rw-r--r--tex/context/base/core-sys.mkiv4
-rw-r--r--tex/context/base/core-uti.lua24
-rw-r--r--tex/context/base/data-aux.lua18
-rw-r--r--tex/context/base/data-con.lua4
-rw-r--r--tex/context/base/data-ctx.lua4
-rw-r--r--tex/context/base/data-exp.lua16
-rw-r--r--tex/context/base/data-fil.lua18
-rw-r--r--tex/context/base/data-ini.lua14
-rw-r--r--tex/context/base/data-lst.lua12
-rw-r--r--tex/context/base/data-lua.lua28
-rw-r--r--tex/context/base/data-met.lua16
-rw-r--r--tex/context/base/data-res.lua132
-rw-r--r--tex/context/base/data-sch.lua2
-rw-r--r--tex/context/base/data-tex.lua14
-rw-r--r--tex/context/base/data-tmf.lua12
-rw-r--r--tex/context/base/data-tmp.lua16
-rw-r--r--tex/context/base/data-tre.lua8
-rw-r--r--tex/context/base/data-use.lua4
-rw-r--r--tex/context/base/data-vir.lua18
-rw-r--r--tex/context/base/data-zip.lua48
-rw-r--r--tex/context/base/enco-ini.mkiv4
-rw-r--r--tex/context/base/font-afm.lua2
-rw-r--r--tex/context/base/font-chk.lua2
-rw-r--r--tex/context/base/font-cid.lua2
-rw-r--r--tex/context/base/font-col.lua2
-rw-r--r--tex/context/base/font-ctx.lua36
-rw-r--r--tex/context/base/font-def.lua24
-rw-r--r--tex/context/base/font-enh.lua10
-rw-r--r--tex/context/base/font-ext.lua21
-rw-r--r--tex/context/base/font-fbk.lua2
-rw-r--r--tex/context/base/font-gds.lua2
-rw-r--r--tex/context/base/font-ini.lua4
-rw-r--r--tex/context/base/font-log.lua4
-rw-r--r--tex/context/base/font-map.lua2
-rw-r--r--tex/context/base/font-otb.lua2
-rw-r--r--tex/context/base/font-otc.lua2
-rw-r--r--tex/context/base/font-otd.lua2
-rw-r--r--tex/context/base/font-otf.lua21
-rw-r--r--tex/context/base/font-otn.lua10
-rw-r--r--tex/context/base/font-otp.lua2
-rw-r--r--tex/context/base/font-pat.lua120
-rw-r--r--tex/context/base/font-syn.lua11
-rw-r--r--tex/context/base/font-tfm.lua26
-rw-r--r--tex/context/base/grph-fig.mkiv2
-rw-r--r--tex/context/base/grph-fil.lua10
-rw-r--r--tex/context/base/grph-inc.lua72
-rw-r--r--tex/context/base/grph-u3d.lua6
-rw-r--r--tex/context/base/grph-wnd.lua8
-rw-r--r--tex/context/base/java-ini.lua22
-rw-r--r--tex/context/base/l-lpeg.lua6
-rw-r--r--tex/context/base/l-string.lua6
-rw-r--r--tex/context/base/lang-def.mkiv9
-rw-r--r--tex/context/base/lang-ini.lua28
-rw-r--r--tex/context/base/lang-ini.mkiv4
-rw-r--r--tex/context/base/lang-lab.lua4
-rw-r--r--tex/context/base/lang-mis.mkiv2
-rw-r--r--tex/context/base/lang-txt.lua61
-rw-r--r--tex/context/base/lang-wrd.lua8
-rw-r--r--tex/context/base/lpdf-ano.lua30
-rw-r--r--tex/context/base/lpdf-epa.lua2
-rw-r--r--tex/context/base/lpdf-fld.lua266
-rw-r--r--tex/context/base/lpdf-fmt.lua70
-rw-r--r--tex/context/base/lpdf-ini.lua45
-rw-r--r--tex/context/base/lpdf-tag.lua2
-rw-r--r--tex/context/base/lpdf-wid.lua2
-rw-r--r--tex/context/base/lpdf-xmp.lua41
-rw-r--r--tex/context/base/luat-cbk.lua4
-rw-r--r--tex/context/base/luat-env.lua14
-rw-r--r--tex/context/base/luat-exe.lua2
-rw-r--r--tex/context/base/luat-fmt.lua34
-rw-r--r--tex/context/base/luat-mac.lua2
-rw-r--r--tex/context/base/luat-run.lua12
-rw-r--r--tex/context/base/luat-sto.lua58
-rw-r--r--tex/context/base/lxml-dir.lua6
-rw-r--r--tex/context/base/lxml-lpt.lua8
-rw-r--r--tex/context/base/lxml-tab.lua4
-rw-r--r--tex/context/base/lxml-tex.lua22
-rw-r--r--tex/context/base/m-chart.mkiv2
-rw-r--r--tex/context/base/m-logcategories.mkiv3
-rw-r--r--tex/context/base/m-mkii.mkiv2
-rw-r--r--tex/context/base/math-ini.lua2
-rw-r--r--tex/context/base/math-map.lua6
-rw-r--r--tex/context/base/math-noa.lua11
-rw-r--r--tex/context/base/math-vfu.lua2
-rw-r--r--tex/context/base/meta-pdf.lua4
-rw-r--r--tex/context/base/mlib-ctx.lua4
-rw-r--r--tex/context/base/mlib-pdf.lua4
-rw-r--r--tex/context/base/mlib-pps.lua18
-rw-r--r--tex/context/base/mlib-run.lua58
-rw-r--r--tex/context/base/mult-aux.lua2
-rw-r--r--tex/context/base/mult-chk.lua4
-rw-r--r--tex/context/base/mult-ini.lua49
-rw-r--r--tex/context/base/mult-ini.mkiv9
-rw-r--r--tex/context/base/mult-mcs.mkii2
-rw-r--r--tex/context/base/mult-mde.mkii2
-rw-r--r--tex/context/base/mult-men.mkii2
-rw-r--r--tex/context/base/mult-mes.lua2333
-rw-r--r--tex/context/base/mult-mpe.mkii2
-rw-r--r--tex/context/base/mult-sys.mkiv12
-rw-r--r--tex/context/base/node-aux.lua2
-rw-r--r--tex/context/base/node-fnt.lua22
-rw-r--r--tex/context/base/node-inj.lua2
-rw-r--r--tex/context/base/node-mig.lua2
-rw-r--r--tex/context/base/node-mig.mkiv2
-rw-r--r--tex/context/base/node-pro.lua2
-rw-r--r--tex/context/base/node-ref.lua24
-rw-r--r--tex/context/base/node-res.lua10
-rw-r--r--tex/context/base/node-rul.lua8
-rw-r--r--tex/context/base/node-spl.lua40
-rw-r--r--tex/context/base/node-tra.lua10
-rw-r--r--tex/context/base/pack-lyr.mkiv2
-rw-r--r--tex/context/base/page-flt.lua2
-rw-r--r--tex/context/base/page-imp.mkiv3
-rw-r--r--tex/context/base/page-ini.mkiv4
-rw-r--r--tex/context/base/page-lay.mkiv6
-rw-r--r--tex/context/base/page-mar.mkiv2
-rw-r--r--tex/context/base/prop-ini.mkiv2
-rw-r--r--tex/context/base/regi-8859-1.lua34
-rw-r--r--tex/context/base/regi-8859-10.lua34
-rw-r--r--tex/context/base/regi-8859-11.lua34
-rw-r--r--tex/context/base/regi-8859-13.lua34
-rw-r--r--tex/context/base/regi-8859-14.lua34
-rw-r--r--tex/context/base/regi-8859-15.lua34
-rw-r--r--tex/context/base/regi-8859-16.lua34
-rw-r--r--tex/context/base/regi-8859-2.lua34
-rw-r--r--tex/context/base/regi-8859-3.lua34
-rw-r--r--tex/context/base/regi-8859-4.lua34
-rw-r--r--tex/context/base/regi-8859-5.lua34
-rw-r--r--tex/context/base/regi-8859-6.lua34
-rw-r--r--tex/context/base/regi-8859-7.lua34
-rw-r--r--tex/context/base/regi-8859-8.lua34
-rw-r--r--tex/context/base/regi-8859-9.lua34
-rw-r--r--tex/context/base/regi-cp1250.lua34
-rw-r--r--tex/context/base/regi-cp1251.lua34
-rw-r--r--tex/context/base/regi-cp1252.lua34
-rw-r--r--tex/context/base/regi-cp1253.lua34
-rw-r--r--tex/context/base/regi-cp1254.lua34
-rw-r--r--tex/context/base/regi-cp1255.lua34
-rw-r--r--tex/context/base/regi-cp1256.lua34
-rw-r--r--tex/context/base/regi-cp1257.lua34
-rw-r--r--tex/context/base/regi-cp1258.lua34
-rw-r--r--tex/context/base/regi-demo.lua22
-rw-r--r--tex/context/base/regi-ini.lua281
-rw-r--r--tex/context/base/regi-ini.mkiv66
-rw-r--r--tex/context/base/scrp-ini.lua2
-rw-r--r--tex/context/base/sort-ini.lua2
-rw-r--r--tex/context/base/spac-ver.lua6
-rw-r--r--tex/context/base/spac-ver.mkiv4
-rw-r--r--tex/context/base/status-files.pdfbin23175 -> 23255 bytes
-rw-r--r--tex/context/base/strc-bkm.lua2
-rw-r--r--tex/context/base/strc-doc.lua10
-rw-r--r--tex/context/base/strc-doc.mkiv2
-rw-r--r--tex/context/base/strc-ini.lua2
-rw-r--r--tex/context/base/strc-lst.lua2
-rw-r--r--tex/context/base/strc-lst.mkiv4
-rw-r--r--tex/context/base/strc-mar.lua4
-rw-r--r--tex/context/base/strc-not.lua2
-rw-r--r--tex/context/base/strc-num.lua2
-rw-r--r--tex/context/base/strc-pag.lua2
-rw-r--r--tex/context/base/strc-ref.lua2
-rw-r--r--tex/context/base/strc-ref.mkiv2
-rw-r--r--tex/context/base/strc-reg.lua2
-rw-r--r--tex/context/base/strc-sec.mkiv2
-rw-r--r--tex/context/base/strc-tag.lua2
-rw-r--r--tex/context/base/supp-box.lua4
-rw-r--r--tex/context/base/supp-fil.lua11
-rw-r--r--tex/context/base/supp-fil.mkiv2
-rw-r--r--tex/context/base/supp-ran.lua7
-rw-r--r--tex/context/base/syst-aux.mkiv8
-rw-r--r--tex/context/base/syst-ini.mkiv4
-rw-r--r--tex/context/base/syst-lua.lua5
-rw-r--r--tex/context/base/syst-mes.mkiv16
-rw-r--r--tex/context/base/tabl-ntb.mkiv2
-rw-r--r--tex/context/base/trac-deb.lua2
-rw-r--r--tex/context/base/trac-deb.mkiv2
-rw-r--r--tex/context/base/trac-inf.lua14
-rw-r--r--tex/context/base/trac-log.lua523
-rw-r--r--tex/context/base/trac-pro.lua2
-rw-r--r--tex/context/base/trac-set.lua78
-rw-r--r--tex/context/base/trac-tim.lua1
-rw-r--r--tex/context/base/type-ini.mkiv9
-rw-r--r--tex/context/base/type-otf.mkiv4
-rw-r--r--tex/context/base/typo-brk.lua2
-rw-r--r--tex/context/base/typo-cap.lua2
-rw-r--r--tex/context/base/typo-dig.lua2
-rw-r--r--tex/context/base/typo-dir.lua6
-rw-r--r--tex/context/base/typo-rep.lua8
-rw-r--r--tex/context/base/typo-spa.lua2
-rw-r--r--tex/context/base/util-lua.lua2
-rw-r--r--tex/context/base/util-mrg.lua2
-rw-r--r--tex/context/base/x-asciimath.lua10
-rw-r--r--tex/context/fonts/asana-math.lfg25
-rw-r--r--tex/context/fonts/cambria-math.lfg26
-rw-r--r--tex/context/fonts/lm-math.lfg31
-rw-r--r--tex/generic/context/luatex-fonts-merged.lua115
248 files changed, 6153 insertions, 5645 deletions
diff --git a/scripts/context/lua/mtx-babel.lua b/scripts/context/lua/mtx-babel.lua
index 7e08633cf..120e49092 100644
--- a/scripts/context/lua/mtx-babel.lua
+++ b/scripts/context/lua/mtx-babel.lua
@@ -8,6 +8,20 @@ if not modules then modules = { } end modules ['mtx-babel'] = {
-- data tables by Thomas A. Schmitz
+local helpinfo = [[
+--language=string conversion language (e.g. greek)
+--structure=string obey given structure (e.g. 'document', default: 'context')
+--convert convert babel codes into utf
+]]
+
+local application = logs.application {
+ name = "mtx-babel",
+ banner = "Babel Input To UTF Conversion 1.20",
+ helpinfo = helpinfo,
+}
+
+local report = application.report
+
scripts = scripts or { }
scripts.babel = scripts.babel or { }
@@ -387,22 +401,22 @@ do
local structure = environment.argument("structure") or "document"
converter = converter[structure]
if converter then
- logs.simple("converting '%s' using language '%s' with structure '%s'", filename, language, structure)
+ report("converting '%s' using language '%s' with structure '%s'", filename, language, structure)
data = converter:match(data)
local newfilename = filename .. ".utf"
io.savedata(newfilename, data)
- logs.simple("converted data saved in '%s'", newfilename)
+ report("converted data saved in '%s'", newfilename)
else
- logs.simple("unknown structure '%s' language '%s'", structure, language)
+ report("unknown structure '%s' language '%s'", structure, language)
end
else
- logs.simple("no converter for language '%s'", language)
+ report("no converter for language '%s'", language)
end
else
- logs.simple("provide language")
+ report("provide language")
end
else
- logs.simple("no data in '%s'",filename)
+ report("no data in '%s'",filename)
end
end
end
@@ -415,16 +429,8 @@ do
end
-logs.extendbanner("Babel Input To UTF Conversion 1.20")
-
-messages.help = [[
---language=string conversion language (e.g. greek)
---structure=string obey given structure (e.g. 'document', default: 'context')
---convert convert babel codes into utf
-]]
-
if environment.argument("convert") then
scripts.babel.convert(environment.files[1] or "")
else
- logs.help(messages.help)
+ application.help()
end
diff --git a/scripts/context/lua/mtx-base.lua b/scripts/context/lua/mtx-base.lua
index 99a478b1e..ab5bfe18a 100644
--- a/scripts/context/lua/mtx-base.lua
+++ b/scripts/context/lua/mtx-base.lua
@@ -6,35 +6,7 @@ if not modules then modules = { } end modules ['mtx-base'] = {
license = "see context related readme files"
}
-logs.extendbanner("ConTeXt TDS Management Tool 1.35 (aka luatools)")
-
--- private option --noluc for testing errors in the stub
-
-local instance = resolvers.instance
-
-local pattern = environment.arguments["pattern"] or nil
-local fileformat = environment.arguments["format"] or "" -- nil ?
-local allresults = environment.arguments["all"] or false
-local trace = environment.arguments["trace"]
-
-if type(pattern) == 'boolean' then
- logs.simple("invalid pattern specification")
- pattern = nil
-end
-
-if trace then
- resolvers.settrace(trace) -- move to mtxrun ?
-end
-
-runners = runners or { }
-messages = messages or { }
-
-messages.no_ini_file = [[
-There is no lua initialization file found. It may be that you have
-to regenerate the file database using "mtxrun --generate".
-]]
-
-messages.help = [[
+local helpinfo = [[
--generate generate file database
--variables show configuration variables
--configurations show configuration order
@@ -55,6 +27,32 @@ messages.help = [[
--trackers=list enable given trackers
]]
+local application = logs.application {
+ name = "mtx-base",
+ banner = "ConTeXt TDS Management Tool 1.35 (aka luatools)",
+ helpinfo = helpinfo,
+}
+
+local report = application.report
+
+-- private option --noluc for testing errors in the stub
+
+local instance = resolvers.instance
+
+local pattern = environment.arguments["pattern"] or nil
+local fileformat = environment.arguments["format"] or "" -- nil ?
+local allresults = environment.arguments["all"] or false
+local trace = environment.arguments["trace"]
+
+if type(pattern) == 'boolean' then
+ report("invalid pattern specification")
+ pattern = nil
+end
+
+if trace then
+ resolvers.settrace(trace) -- move to mtxrun ?
+end
+
if environment.arguments["find-file"] then
resolvers.load()
if pattern then
@@ -91,7 +89,7 @@ elseif environment.arguments["var-value"] or environment.arguments["show-value"]
resolvers.dowithfilesandreport(resolvers.variable, environment.files)
elseif environment.arguments["format-path"] then
resolvers.load()
- logs.simple(caches.getwritablepath("format"))
+ report(caches.getwritablepath("format"))
elseif pattern then -- brrr
resolvers.load()
resolvers.dowithfilesandreport(resolvers.findfiles, { pattern }, fileformat, allresults)
@@ -110,7 +108,7 @@ elseif environment.arguments["configurations"] or environment.arguments["show-co
resolvers.load("nofiles")
resolvers.listers.configurations()
elseif environment.arguments["help"] or (environment.files[1]=='help') or (#environment.files==0) then
- logs.help(messages.help)
+ application.help()
elseif environment.files[1] == 'texmfcnf.lua' then
resolvers.load("nofiles")
resolvers.listers.configurations()
diff --git a/scripts/context/lua/mtx-cache.lua b/scripts/context/lua/mtx-cache.lua
index a6985d3bc..08202bbf8 100644
--- a/scripts/context/lua/mtx-cache.lua
+++ b/scripts/context/lua/mtx-cache.lua
@@ -6,6 +6,22 @@ if not modules then modules = { } end modules ['mtx-cache'] = {
license = "see context related readme files"
}
+local helpinfo = [[
+--purge remove not used files
+--erase completely remove cache
+--list show cache
+
+--all all (not yet implemented)
+]]
+
+local application = logs.application {
+ name = "mtx-cache",
+ banner = "ConTeXt & MetaTeX Cache Management 0.10",
+ helpinfo = helpinfo,
+}
+
+local report = application.report
+
scripts = scripts or { }
scripts.cache = scripts.cache or { }
@@ -27,18 +43,18 @@ local function collect(path)
end
local function list(banner,path,tmas,tmcs,rest)
- logs.report("cache",string.format("%s: %s",banner,path))
- logs.report()
- logs.report("cache",string.format("tma : %4i",#tmas))
- logs.report("cache",string.format("tmc : %4i",#tmcs))
- logs.report("cache",string.format("rest : %4i",#rest))
- logs.report("cache",string.format("total : %4i",#tmas+#tmcs+#rest))
- logs.report()
+ report("%s: %s",banner,path)
+ report()
+ report("tma : %4i",#tmas)
+ report("tmc : %4i",#tmcs)
+ report("rest : %4i",#rest)
+ report("total : %4i",#tmas+#tmcs+#rest)
+ report()
end
local function purge(banner,path,list,all)
- logs.report("cache",string.format("%s: %s",banner,path))
- logs.report()
+ report("%s: %s",banner,path)
+ report()
local n = 0
for i=1,#list do
local filename = list[i]
@@ -58,8 +74,8 @@ local function purge(banner,path,list,all)
end
end
end
- logs.report("cache",string.format("removed tma files : %i",n))
- logs.report()
+ report("removed tma files : %i",n)
+ report()
end
function scripts.cache.purge()
@@ -92,16 +108,6 @@ function scripts.cache.list()
end
end
-logs.extendbanner("ConTeXt & MetaTeX Cache Management 0.10")
-
-messages.help = [[
---purge remove not used files
---erase completely remove cache
---list show cache
-
---all all (not yet implemented)
-]]
-
if environment.argument("purge") then
scripts.cache.purge()
elseif environment.argument("erase") then
@@ -109,5 +115,5 @@ elseif environment.argument("erase") then
elseif environment.argument("list") then
scripts.cache.list()
else
- logs.help(messages.help)
+ application.help()
end
diff --git a/scripts/context/lua/mtx-chars.lua b/scripts/context/lua/mtx-chars.lua
index d356bb5bb..dc760c4e7 100644
--- a/scripts/context/lua/mtx-chars.lua
+++ b/scripts/context/lua/mtx-chars.lua
@@ -6,6 +6,20 @@ if not modules then modules = { } end modules ['mtx-chars'] = {
license = "see context related readme files"
}
+local helpinfo = [[
+--stix convert stix table to math table
+--xtx generate xetx-*.tex (used by xetex)
+--pdf generate pdfr-def.tex (used by pdftex)
+]]
+
+local application = logs.application {
+ name = "mtx-chars",
+ banner = "MkII Character Table Generators 0.10",
+ helpinfo = helpinfo,
+}
+
+local report = application.report
+
local format, concat, utfchar, upper = string.format, table.concat, unicode.utf8.char, string.upper
scripts = scripts or { }
@@ -24,13 +38,13 @@ scripts.chars = scripts.chars or { }
--~
--~ function scripts.chars.stixtomkiv(inname,outname)
--~ if inname == "" then
---~ logs.report("aquiring math data","invalid datafilename")
+--~ report("aquiring math data, invalid datafilename")
--~ end
--~ local f = io.open(inname)
--~ if not f then
---~ logs.report("aquiring math data","invalid datafile")
+--~ report("aquiring math data, invalid datafile")
--~ else
---~ logs.report("aquiring math data","processing " .. inname)
+--~ report("aquiring math data, processing %s",inname)
--~ if not outname or outname == "" then
--~ outname = "char-mth.lua"
--~ end
@@ -72,9 +86,9 @@ scripts.chars = scripts.chars or { }
--~ end
--~ if not valid then
--~ g:write("\t-- The data file is corrupt, invalid or maybe the format has changed.\n")
---~ logs.report("aquiring math data","problems with data table")
+--~ report("aquiring math data, problems with data table")
--~ else
---~ logs.report("aquiring math data","table saved in " .. outname)
+--~ report("aquiring math data, table saved in %s",outname)
--~ end
--~ g:write("}\n")
--~ g:close()
@@ -83,7 +97,7 @@ scripts.chars = scripts.chars or { }
--~ end
function scripts.chars.stixtomkiv(inname,outname)
- logs.report("we no longer use this options but use our own tables instead")
+ report("we no longer use this options but use our own tables instead")
end
local banner_pdf_1 = [[
@@ -185,7 +199,7 @@ function scripts.chars.makeencoutf()
local function open(name,banner)
local f = io.open(name,'w')
if f then
- logs.simple("writing '%s'",name)
+ report("writing '%s'",name)
f:write(format(banner_utf_module,name))
f:write(banner)
f:write()
@@ -307,14 +321,6 @@ function scripts.chars.makeencoutf()
end
end
-logs.extendbanner("MkII Character Table Generators 0.10")
-
-messages.help = [[
---stix convert stix table to math table
---xtx generate xetx-*.tex (used by xetex)
---pdf generate pdfr-def.tex (used by pdftex)
-]]
-
if environment.argument("stix") then
local inname = environment.files[1] or ""
local outname = environment.files[2] or ""
@@ -324,5 +330,5 @@ elseif environment.argument("xtx") then
elseif environment.argument("pdf") then
scripts.chars.makepdfr()
else
- logs.help(messages.help)
+ application.help()
end
diff --git a/scripts/context/lua/mtx-check.lua b/scripts/context/lua/mtx-check.lua
index 7704d86ae..e0ab3b882 100644
--- a/scripts/context/lua/mtx-check.lua
+++ b/scripts/context/lua/mtx-check.lua
@@ -6,6 +6,18 @@ if not modules then modules = { } end modules ['mtx-check'] = {
license = "see context related readme files"
}
+local helpinfo = [[
+--convert check tex file for errors
+]]
+
+local application = logs.application {
+ name = "mtx-check",
+ banner = "Basic ConTeXt Syntax Checking 0.10",
+ helpinfo = helpinfo,
+}
+
+local report = application.report
+
scripts = scripts or { }
scripts.checker = scripts.checker or { }
@@ -123,17 +135,13 @@ function scripts.checker.check(filename)
end
end
-logs.extendbanner("Basic ConTeXt Syntax Checking 0.10")
-
-messages.help = [[
---convert check tex file for errors
-]]
-
if environment.argument("check") then
scripts.checker.check(environment.files[1])
elseif environment.argument("help") then
- logs.help(messages.help)
+ application.help()
elseif environment.files[1] then
scripts.checker.check(environment.files[1])
+else
+ application.help()
end
diff --git a/scripts/context/lua/mtx-colors.lua b/scripts/context/lua/mtx-colors.lua
index e5338a32b..ee825a42c 100644
--- a/scripts/context/lua/mtx-colors.lua
+++ b/scripts/context/lua/mtx-colors.lua
@@ -8,6 +8,22 @@ if not modules then modules = { } end modules ['mtx-colors'] = {
-- todo: fc-cache -v en check dirs, or better is: fc-cat -v | grep Directory
+local helpinfo = [[
+--table show icc table
+
+example:
+
+mtxrun --script color --table somename
+]]
+
+local application = logs.application {
+ name = "mtx-cache",
+ banner = "ConTeXt Color Management 0.10",
+ helpinfo = helpinfo,
+}
+
+local report = application.report
+
if not fontloader then fontloader = fontforge end
dofile(resolvers.findfile("colo-icc.lua","tex"))
@@ -21,31 +37,21 @@ function scripts.colors.table()
for i=1,#files do
local profile, okay, message = colors.iccprofile(files[i])
if not okay then
- logs.simple(message)
+ report(message)
else
- logs.simple(table.serialize(profile,"profile"))
+ report(table.serialize(profile,"profile"))
end
end
else
- logs.simple("no file(s) given" )
+ report("no file(s) given" )
end
end
-logs.extendbanner("ConTeXt Color Management 0.1")
-
-messages.help = [[
---table show icc table
-
-example:
-
-mtxrun --script color --table somename
-]]
-
--~ local track = environment.argument("track")
--~ if track then trackers.enable(track) end
if environment.argument("table") then
scripts.colors.table()
else
- logs.help(messages.help)
+ application.help()
end
diff --git a/scripts/context/lua/mtx-context.lua b/scripts/context/lua/mtx-context.lua
index e3082e825..b8ca6a11e 100644
--- a/scripts/context/lua/mtx-context.lua
+++ b/scripts/context/lua/mtx-context.lua
@@ -6,6 +6,88 @@ if not modules then modules = { } end modules ['mtx-context'] = {
license = "see context related readme files"
}
+local basicinfo = [[
+--run process (one or more) files (default action)
+--make create context formats
+
+--ctx=name use ctx file (process management specification)
+--interface use specified user interface (default: en)
+
+--autopdf close pdf file in viewer and start pdf viewer afterwards
+--purge(all) purge files either or not after a run (--pattern=...)
+
+--usemodule=list load the given module or style, normally part o fthe distribution
+--environment=list load the given environment file first (document styles)
+--mode=list enable given the modes (conditional processing in styles)
+--path=list also consult the given paths when files are looked for
+--arguments=list set variables that can be consulted during a run (key/value pairs)
+--randomseed=number set the randomseed
+--result=name rename the resulting output to the given name
+--trackers=list set tracker variables (show list with --showtrackers)
+--directives=list set directive variables (show list with --showdirectives)
+--silent=list disable logcatgories (show list with --showlogcategories)
+--purgeresult purge result file before run
+
+--forcexml force xml stub (optional flag: --mkii)
+--forcecld force cld (context lua document) stub
+
+--arrange run extra imposition pass, given that the style sets up imposition
+--noarrange ignore imposition specifications in the style
+
+--once only run once (no multipass data file is produced)
+--batchmode run without stopping and don't show messages on the console
+--nonstopmode run without stopping
+
+--generate generate file database etc. (as luatools does)
+--paranoid don't descend to .. and ../..
+--version report installed context version
+
+--expert expert options
+]]
+
+-- filter=list is kind of obsolete
+-- color is obsolete for mkiv, always on
+-- separation is obsolete for mkiv, no longer available
+-- output is currently obsolete for mkiv
+-- setuppath=list must check
+-- modefile=name must check
+-- input=name load the given inputfile (must check)
+
+local expertinfo = [[
+expert options:
+
+--touch update context version number (remake needed afterwards, also provide --expert)
+--nostats omit runtime statistics at the end of the run
+--update update context from website (not to be confused with contextgarden)
+--profile profile job (use: mtxrun --script profile --analyze)
+--timing generate timing and statistics overview
+--tracefiles show some extra info when locating files (at the tex end)
+
+--extra=name process extra (mtx-context-<name> in distribution)
+--extras show extras
+]]
+
+local specialinfo = [[
+special options:
+
+--pdftex process file with texexec using pdftex
+--xetex process file with texexec using xetex
+
+--pipe don't check for file and enter scroll mode (--dummyfile=whatever.tmp)
+]]
+
+local application = logs.application {
+ name = "mtx-context",
+ banner = "ConTeXt Process Management 0.52",
+ helpinfo = {
+ basic = basicinfo,
+ extra = extrainfo,
+ expert = expertinfo,
+ }
+}
+
+local report = application.report
+
scripts = scripts or { }
scripts.context = scripts.context or { }
@@ -118,13 +200,13 @@ do
elseif ctxdata.ctxname then
ctlname = file.replacesuffix(ctxdata.ctxname,'ctl')
else
- logs.simple("invalid ctl name: %s",ctlname or "?")
+ report("invalid ctl name: %s",ctlname or "?")
return
end
end
local prepfiles = ctxdata.prepfiles
if prepfiles and next(prepfiles) then
- logs.simple("saving logdata in: %s",ctlname)
+ report("saving logdata in: %s",ctlname)
f = io.open(ctlname,'w')
if f then
f:write("<?xml version='1.0' standalone='yes'?>\n\n")
@@ -138,7 +220,7 @@ do
f:close()
end
else
- logs.simple("nothing prepared, no ctl file saved")
+ report("nothing prepared, no ctl file saved")
os.remove(ctlname)
end
end
@@ -173,8 +255,8 @@ do
ctxdata.jobname = file.addsuffix(ctxdata.jobname,'tex')
ctxdata.ctxname = file.addsuffix(ctxdata.ctxname,'ctx')
- logs.simple("jobname: %s",ctxdata.jobname)
- logs.simple("ctxname: %s",ctxdata.ctxname)
+ report("jobname: %s",ctxdata.jobname)
+ report("ctxname: %s",ctxdata.ctxname)
-- mtxrun should resolve kpse: and file:
@@ -225,7 +307,7 @@ do
local messages = ctxdata.messages
for i=1,#messages do
- logs.simple("ctx comment: %s", xml.tostring(messages[i]))
+ report("ctx comment: %s", xml.tostring(messages[i]))
end
for r, d, k in xml.elements(ctxdata.xmldata,"ctx:value[@name='job']") do
@@ -318,11 +400,11 @@ do
-- potential optimization: when mtxrun run internal
command = xml.content(command)
command = ctxrunner.justtext(command)
- logs.simple("command: %s",command)
+ report("command: %s",command)
local result = os.spawn(command) or 0
-- somehow we get the wrong return value
if result > 0 then
- logs.simple("error, return code: %s",result)
+ report("error, return code: %s",result)
end
if ctxdata.runlocal then
oldfile = file.basename(oldfile)
@@ -333,11 +415,11 @@ do
file.syncmtimes(oldfile,newfile)
ctxdata.prepfiles[oldfile] = true
else
- logs.simple("error, check target location of new file: %s", newfile)
+ report("error, check target location of new file: %s", newfile)
ctxdata.prepfiles[oldfile] = false
end
else
- logs.simple("old file needs no preprocessing")
+ report("old file needs no preprocessing")
ctxdata.prepfiles[oldfile] = lfs.isfile(newfile)
end
end
@@ -447,10 +529,15 @@ function scripts.context.multipass.makeoptionfile(jobname,ctxdata,kindofrun,curr
--
setalways("%% feedback and basic job control")
if type(environment.argument("trackers")) == "string" then
- setvalue ("trackers" , "\\enabletrackers[%s]")
+ setvalue("trackers" , "\\enabletrackers[%s]")
end
if type(environment.argument("directives")) == "string" then
- setvalue ("directives", "\\enabledirectives[%s]")
+ setvalue("directives", "\\enabledirectives[%s]")
+ end
+ if type(environment.argument("silent")) == "string" then
+ setvalue("silent", "\\enabledirectives[logs.blocked={%s}]")
+ elseif environment.argument("silent") then
+ setvalue("silent", "\\enabledirectives[logs.blocked=*]") -- maybe \silentmode
end
setfixed ("timing" , "\\usemodule[timing]")
setfixed ("batchmode" , "\\batchmode")
@@ -490,7 +577,7 @@ function scripts.context.multipass.makeoptionfile(jobname,ctxdata,kindofrun,curr
setalways("%% options (not that important)")
--
setalways("\\startsetups *runtime:options")
- setvalue ('output' , "\\setupoutput[%s]", scripts.context.backends, 'pdftex')
+ setvalue ('output' , "\\setupoutput[%s]", scripts.context.backends, 'pdf')
setfixed ("color" , "\\setupcolors[\\c!state=\\v!start]")
setvalue ("separation" , "\\setupcolors[\\c!split=%s]")
setfixed ("noarrange" , "\\setuparranging[\\v!disable]")
@@ -640,7 +727,7 @@ local pdfview -- delayed loading
function scripts.context.openpdf(name,method)
pdfview = pdfview or dofile(resolvers.findfile("l-pdfview.lua","tex"))
pdfview.setmethod(method)
- logs.simple(pdfview.status())
+ report(pdfview.status())
pdfview.open(file.replacesuffix(name,"pdf"))
end
@@ -669,7 +756,7 @@ function scripts.context.run(ctxdata,filename)
local formatfile, scriptfile = resolvers.locateformat(formatname)
-- this catches the command line
if not formatfile or not scriptfile then
- logs.simple("warning: no format found, forcing remake (commandline driven)")
+ report("warning: no format found, forcing remake (commandline driven)")
scripts.context.make(formatname)
formatfile, scriptfile = resolvers.locateformat(formatname)
end
@@ -716,7 +803,7 @@ function scripts.context.run(ctxdata,filename)
end
-- this catches the command line
if not formatfile or not scriptfile then
- logs.simple("warning: no format found, forcing remake (source driven)")
+ report("warning: no format found, forcing remake (source driven)")
scripts.context.make(formatname)
formatfile, scriptfile = resolvers.locateformat(formatname)
end
@@ -785,7 +872,7 @@ function scripts.context.run(ctxdata,filename)
--
local okay = statistics.checkfmtstatus(formatfile)
if okay ~= true then
- logs.simple("warning: %s, forcing remake",tostring(okay))
+ report("warning: %s, forcing remake",tostring(okay))
scripts.context.make(formatname)
end
--
@@ -794,7 +881,7 @@ function scripts.context.run(ctxdata,filename)
flags[#flags+1] = "--interaction=batchmode"
end
if environment.argument("synctex") then
- logs.simple("warning: syntex is enabled") -- can add upto 5% runtime
+ report("warning: syntex is enabled") -- can add upto 5% runtime
flags[#flags+1] = "--synctex=1"
end
flags[#flags+1] = "--fmt=" .. string.quote(formatfile)
@@ -809,22 +896,22 @@ function scripts.context.run(ctxdata,filename)
-- 1:first run, 2:successive run, 3:once, 4:last of maxruns
local kindofrun = (once and 3) or (i==1 and 1) or (i==maxnofruns and 4) or 2
scripts.context.multipass.makeoptionfile(jobname,ctxdata,kindofrun,i,false) -- kindofrun, currentrun, final
- logs.simple("run %s: %s",i,command)
+ report("run %s: %s",i,command)
local returncode, errorstring = os.spawn(command)
--~ if returncode == 3 then
--~ scripts.context.make(formatname)
--~ returncode, errorstring = os.spawn(command)
--~ if returncode == 3 then
- --~ logs.simple("ks: return code 3, message: %s",errorstring or "?")
+ --~ report("ks: return code 3, message: %s",errorstring or "?")
--~ os.exit(1)
--~ end
--~ end
if not returncode then
- logs.simple("fatal error: no return code, message: %s",errorstring or "?")
+ report("fatal error: no return code, message: %s",errorstring or "?")
os.exit(1)
break
elseif returncode > 0 then
- logs.simple("fatal error: return code: %s",returncode or "?")
+ report("fatal error: return code: %s",returncode or "?")
os.exit(returncode)
break
else
@@ -842,13 +929,13 @@ function scripts.context.run(ctxdata,filename)
if arrange then
local kindofrun = 3
scripts.context.multipass.makeoptionfile(jobname,ctxdata,kindofrun,i,true) -- kindofrun, currentrun, final
- logs.simple("arrange run: %s",command)
+ report("arrange run: %s",command)
local returncode, errorstring = os.spawn(command)
if not returncode then
- logs.simple("fatal error: no return code, message: %s",errorstring or "?")
+ report("fatal error: no return code, message: %s",errorstring or "?")
os.exit(1)
elseif returncode > 0 then
- logs.simple("fatal error: return code: %s",returncode or "?")
+ report("fatal error: return code: %s",returncode or "?")
os.exit(returncode)
end
end
@@ -881,7 +968,7 @@ function scripts.context.run(ctxdata,filename)
os.rename(tmpname,oldname)
end
end
- logs.simple("result renamed to: %s",newbase)
+ report("result renamed to: %s",newbase)
end
--
if environment.argument("purge") then
@@ -896,18 +983,18 @@ function scripts.context.run(ctxdata,filename)
end
--
if environment.argument("timing") then
- logs.line()
- logs.simple("you can process (timing) statistics with:",jobname)
- logs.line()
- logs.simple("context --extra=timing '%s'",jobname)
- logs.simple("mtxrun --script timing --xhtml [--launch --remove] '%s'",jobname)
- logs.line()
+ report()
+ report("you can process (timing) statistics with:",jobname)
+ report()
+ report("context --extra=timing '%s'",jobname)
+ report("mtxrun --script timing --xhtml [--launch --remove] '%s'",jobname)
+ report()
end
else
if formatname then
- logs.simple("error, no format found with name: %s, skipping",formatname)
+ report("error, no format found with name: %s, skipping",formatname)
else
- logs.simple("error, no format found (provide formatname or interface)")
+ report("error, no format found (provide formatname or interface)")
end
break
end
@@ -915,9 +1002,9 @@ function scripts.context.run(ctxdata,filename)
end
else
if formatname then
- logs.simple("error, no format found with name: %s, aborting",formatname)
+ report("error, no format found with name: %s, aborting",formatname)
else
- logs.simple("error, no format found (provide formatname or interface)")
+ report("error, no format found (provide formatname or interface)")
end
end
end
@@ -931,14 +1018,14 @@ function scripts.context.pipe()
local formatname = scripts.context.interfaces[interface] or "cont-en"
local formatfile, scriptfile = resolvers.locateformat(formatname)
if not formatfile or not scriptfile then
- logs.simple("warning: no format found, forcing remake (commandline driven)")
+ report("warning: no format found, forcing remake (commandline driven)")
scripts.context.make(formatname)
formatfile, scriptfile = resolvers.locateformat(formatname)
end
if formatfile and scriptfile then
local okay = statistics.checkfmtstatus(formatfile)
if okay ~= true then
- logs.simple("warning: %s, forcing remake",tostring(okay))
+ report("warning: %s, forcing remake",tostring(okay))
scripts.context.make(formatname)
end
local flags = {
@@ -950,12 +1037,12 @@ function scripts.context.pipe()
local filename = environment.argument("dummyfile") or ""
if filename == "" then
filename = "\\relax"
- logs.simple("entering scrollmode, end job with \\end")
+ report("entering scrollmode, end job with \\end")
else
filename = file.addsuffix(filename,"tmp")
io.savedata(filename,"\\relax")
scripts.context.multipass.makeoptionfile(filename,{ flags = flags },3,1,false) -- kindofrun, currentrun, final
- logs.simple("entering scrollmode using '%s' with optionfile, end job with \\end",filename)
+ report("entering scrollmode using '%s' with optionfile, end job with \\end",filename)
end
local command = string.format("luatex %s %s", table.concat(flags," "), string.quote(filename))
os.spawn(command)
@@ -967,9 +1054,9 @@ function scripts.context.pipe()
end
else
if formatname then
- logs.simple("error, no format found with name: %s, aborting",formatname)
+ report("error, no format found with name: %s, aborting",formatname)
else
- logs.simple("error, no format found (provide formatname or interface)")
+ report("error, no format found (provide formatname or interface)")
end
end
end
@@ -979,7 +1066,7 @@ local make_mkiv_format = environment.make_format
local function make_mkii_format(name,engine)
if environment.argument(engine) then
local command = string.format("mtxrun texexec.rb --make --%s %s",name,engine)
- logs.simple("running command: %s",command)
+ report("running command: %s",command)
os.spawn(command)
end
end
@@ -1051,7 +1138,7 @@ function scripts.context.metapost()
dofile(resolvers.findfile("mlib-run.lua"))
loaded = true
commands = commands or { }
- commands.writestatus = logs.report
+ commands.writestatus = report -- no longer needed
end
local formatname = environment.argument("format") or "metafun"
if formatname == "" or type(format) == "boolean" then
@@ -1079,20 +1166,20 @@ end
function scripts.context.version()
local name = resolvers.findfile("context.mkiv")
if name ~= "" then
- logs.simple("main context file: %s",name)
+ report("main context file: %s",name)
local data = io.loaddata(name)
if data then
local version = data:match("\\edef\\contextversion{(.-)}")
if version then
- logs.simple("current version: %s",version)
+ report("current version: %s",version)
else
- logs.simple("context version: unknown, no timestamp found")
+ report("context version: unknown, no timestamp found")
end
else
- logs.simple("context version: unknown, load error")
+ report("context version: unknown, load error")
end
else
- logs.simple("main context file: unknown, 'context.mkiv' not found")
+ report("main context file: unknown, 'context.mkiv' not found")
end
end
@@ -1157,7 +1244,7 @@ function scripts.context.purge_job(jobname,all,mkiitoo)
end
end
if #deleted > 0 then
- logs.simple("purged files: %s", table.concat(deleted,", "))
+ report("purged files: %s", table.concat(deleted,", "))
end
end
end
@@ -1187,7 +1274,7 @@ function scripts.context.purge(all,pattern,mkiitoo)
end
end
if #deleted > 0 then
- logs.simple("purged files: %s", table.concat(deleted,", "))
+ report("purged files: %s", table.concat(deleted,", "))
end
end
@@ -1215,12 +1302,12 @@ end
local function touchfiles(suffix)
local done, oldversion, newversion, foundname = touch(file.addsuffix("context",suffix),"(\\edef\\contextversion{)(.-)(})")
if done then
- logs.simple("old version : %s", oldversion)
- logs.simple("new version : %s", newversion)
- logs.simple("touched file: %s", foundname)
+ report("old version : %s", oldversion)
+ report("new version : %s", newversion)
+ report("touched file: %s", foundname)
local ok, _, _, foundname = touch(file.addsuffix("cont-new",suffix), "(\\newcontextversion{)(.-)(})")
if ok then
- logs.simple("touched file: %s", foundname)
+ report("touched file: %s", foundname)
end
end
end
@@ -1237,26 +1324,21 @@ end
function scripts.context.extras(pattern)
local found = resolvers.findfile("context.mkiv")
if found == "" then
- logs.simple("unknown extra: %s", extra)
+ report("unknown extra: %s", extra)
else
pattern = file.join(dir.expandname(file.dirname(found)),string.format("mtx-context-%s.tex",pattern or "*"))
local list = dir.glob(pattern)
- if not extra or extra == "" then
- logs.extendbanner("extras")
- else
- logs.extendbanner(extra)
- end
for i=1,#list do
local v = list[i]
local data = io.loaddata(v) or ""
data = string.match(data,"begin help(.-)end help")
if data then
- local h = { string.format("extra: %s (%s)",string.gsub(v,"^.*mtx%-context%-(.-)%.tex$","%1"),v) }
+ report()
+ report(string.format("extra: %s (%s)",string.gsub(v,"^.*mtx%-context%-(.-)%.tex$","%1"),v))
for s in string.gmatch(data,"%% *(.-)[\n\r]") do
- h[#h+1] = s
+ report(s)
end
- h[#h+1] = ""
- logs.help(table.concat(h,"\n"),"nomoreinfo")
+ report()
end
end
end
@@ -1277,7 +1359,7 @@ function scripts.context.extra()
scripts.context.extras()
return
else
- logs.simple("processing extra: %s", foundextra)
+ report("processing extra: %s", foundextra)
end
environment.setargument("purgeall",true)
local result = environment.setargument("result") or ""
@@ -1294,17 +1376,24 @@ end
-- todo: we need to do a dummy run
function scripts.context.trackers()
- environment.files = { resolvers.findfile("m-trackers.tex") }
+ environment.files = { resolvers.findfile("m-trackers.mkiv") }
scripts.context.multipass.nofruns = 1
+ environment.setargument("purgeall",true)
scripts.context.run()
- -- maybe filter from log
end
function scripts.context.directives()
- environment.files = { resolvers.findfile("m-directives.tex") }
+ environment.files = { resolvers.findfile("m-directives.mkiv") }
scripts.context.multipass.nofruns = 1
+ environment.setargument("purgeall",true)
+ scripts.context.run()
+end
+
+function scripts.context.logcategories()
+ environment.files = { resolvers.findfile("m-logcategories.mkiv") }
+ scripts.context.multipass.nofruns = 1
+ environment.setargument("purgeall",true)
scripts.context.run()
- -- maybe filter from log
end
function scripts.context.timed(action)
@@ -1332,12 +1421,12 @@ function scripts.context.update()
local http = require("socket.http")
local basepath = resolvers.findfile("context.mkiv") or ""
if basepath == "" then
- logs.simple("quiting, no 'context.mkiv' found")
+ report("quiting, no 'context.mkiv' found")
return
end
local basetree = basepath.match(basepath,"^(.-)tex/context/base/context.mkiv$") or ""
if basetree == "" then
- logs.simple("quiting, no proper tds structure (%s)",basepath)
+ report("quiting, no proper tds structure (%s)",basepath)
return
end
local function is_okay(basetree)
@@ -1351,19 +1440,19 @@ function scripts.context.update()
end
local okay = is_okay(basetree)
if not okay then
- logs.simple("quiting, tree '%s' is protected",okay)
+ report("quiting, tree '%s' is protected",okay)
return
else
- logs.simple("updating tree '%s'",okay)
+ report("updating tree '%s'",okay)
end
if not lfs.chdir(basetree) then
- logs.simple("quiting, unable to change to '%s'",okay)
+ report("quiting, unable to change to '%s'",okay)
return
end
- logs.simple("fetching '%s'",mainzip)
+ report("fetching '%s'",mainzip)
local latest = http.request(mainzip)
if not latest then
- logs.simple("context tree '%s' can be updated, use --force",okay)
+ report("context tree '%s' can be updated, use --force",okay)
return
end
io.savedata("cont-tmf.zip",latest)
@@ -1374,12 +1463,12 @@ function scripts.context.update()
-- variant 2
local zipfile = zip.open(zipname)
if not zipfile then
- logs.simple("quiting, unable to open '%s'",zipname)
+ report("quiting, unable to open '%s'",zipname)
return
end
local newfile = zip.loaddata(zipfile,"tex/context/base/context.mkiv")
if not newfile then
- logs.simple("quiting, unable to open '%s'","context.mkiv")
+ report("quiting, unable to open '%s'","context.mkiv")
return
end
local oldfile = io.loaddata(resolvers.findfile("context.mkiv")) or ""
@@ -1388,23 +1477,23 @@ function scripts.context.update()
local year, month, day, hour, minute = str:match("\\edef\\contextversion{(%d+)%.(%d+)%.(%d+) *(%d+)%:(%d+)}")
if year and minute then
local time = os.time { year=year,month=month,day=day,hour=hour,minute=minute}
- logs.simple("%s version: %s (%s)",what,version,time)
+ report("%s version: %s (%s)",what,version,time)
return time
else
- logs.simple("%s version: %s (unknown)",what,version)
+ report("%s version: %s (unknown)",what,version)
return nil
end
end
local oldversion = versiontonumber("old",oldfile)
local newversion = versiontonumber("new",newfile)
if not oldversion or not newversion then
- logs.simple("quiting, version cannot be determined")
+ report("quiting, version cannot be determined")
return
elseif oldversion == newversion then
- logs.simple("quiting, your current version is up-to-date")
+ report("quiting, your current version is up-to-date")
return
elseif oldversion > newversion then
- logs.simple("quiting, your current version is newer")
+ report("quiting, your current version is newer")
return
end
for k in zipfile:files() do
@@ -1417,7 +1506,7 @@ function scripts.context.update()
if force then
io.savedata(filename,data)
end
- logs.simple(filename)
+ report(filename)
end
end
end
@@ -1427,13 +1516,13 @@ function scripts.context.update()
local newscript = "./scripts/context/lua/" .. scriptname
local data = io.loaddata(newscript) or ""
if data ~= "" then
- logs.simple("replacing script '%s' by '%s'",oldscript,newscript)
+ report("replacing script '%s' by '%s'",oldscript,newscript)
if force then
io.savedata(oldscript,data)
end
end
else
- logs.simple("keeping script '%s'",oldscript)
+ report("keeping script '%s'",oldscript)
end
end
if force then
@@ -1441,83 +1530,12 @@ function scripts.context.update()
end
end
if force then
- logs.simple("context tree '%s' has been updated",okay)
+ report("context tree '%s' has been updated",okay)
else
- logs.simple("context tree '%s' can been updated (use --force)",okay)
+ report("context tree '%s' can been updated (use --force)",okay)
end
end
-logs.extendbanner("ConTeXt Process Management 0.51")
-
-messages.help = [[
---run process (one or more) files (default action)
---make create context formats
-
---ctx=name use ctx file (process management specification)
---interface use specified user interface (default: en)
-
---autopdf close pdf file in viewer and start pdf viewer afterwards
---purge(all) purge files either or not after a run (--pattern=...)
-
---usemodule=list load the given module or style, normally part o fthe distribution
---environment=list load the given environment file first (document styles)
---mode=list enable given the modes (conditional processing in styles)
---path=list also consult the given paths when files are looked for
---arguments=list set variables that can be consulted during a run (key/value pairs)
---randomseed=number set the randomseed
---result=name rename the resulting output to the given name
---trackers=list show/set tracker variables
---directives=list show/set directive variables
---purgeresult purge result file before run
-
---forcexml force xml stub (optional flag: --mkii)
---forcecld force cld (context lua document) stub
-
---arrange run extra imposition pass, given that the style sets up imposition
---noarrange ignore imposition specifications in the style
-
---once only run once (no multipass data file is produced)
---batchmode run without stopping and don't show messages on the console
---nonstopmode run without stopping
-
---generate generate file database etc. (as luatools does)
---paranoid don't descend to .. and ../..
---version report installed context version
-
---expert expert options
-]]
-
--- filter=list is kind of obsolete
--- color is obsolete for mkiv, always on
--- separation is obsolete for mkiv, no longer available
--- output is currently obsolete for mkiv
--- setuppath=list must check
--- modefile=name must check
--- input=name load the given inputfile (must check)
-
-messages.expert = [[
-expert options:
-
---touch update context version number (remake needed afterwards, also provide --expert)
---nostats omit runtime statistics at the end of the run
---update update context from website (not to be confused with contextgarden)
---profile profile job (use: mtxrun --script profile --analyze)
---timing generate timing and statistics overview
---tracefiles show some extra info when locating files (at the tex end)
-
---extra=name process extra (mtx-context-<name> in distribution)
---extras show extras
-]]
-
-messages.special = [[
-special options:
-
---pdftex process file with texexec using pdftex
---xetex process file with texexec using xetex
-
---pipe don't check for file and enter scroll mode (--dummyfile=whatever.tmp)
-]]
-
if environment.argument("once") then
scripts.context.multipass.nofruns = 1
elseif environment.argument("runs") then
@@ -1546,7 +1564,7 @@ elseif environment.argument("touch") then
elseif environment.argument("update") then
scripts.context.update()
elseif environment.argument("expert") then
- logs.help(table.concat({ messages.expert, messages.special },"\n"))
+ application.help("expert", "special")
elseif environment.argument("extras") then
scripts.context.extras()
elseif environment.argument("extra") then
@@ -1555,12 +1573,14 @@ elseif environment.argument("help") then
if environment.files[1] == "extras" then
scripts.context.extras()
else
- logs.help(messages.help)
+ application.help("basic")
end
-elseif environment.argument("trackers") and type(environment.argument("trackers")) == "boolean" then
+elseif environment.argument("showtrackers") or environment.argument("trackers") == true then
scripts.context.trackers()
-elseif environment.argument("directives") and type(environment.argument("directives")) == "boolean" then
+elseif environment.argument("showdirectives") or environment.argument("directives") == true then
scripts.context.directives()
+elseif environment.argument("showlogcategories") then
+ scripts.context.logcategories()
elseif environment.argument("track") and type(environment.argument("track")) == "boolean" then -- for old times sake, will go
scripts.context.trackers()
elseif environment.files[1] then
@@ -1575,7 +1595,7 @@ elseif environment.argument("purgeall") then
-- only when no filename given, supports --pattern
scripts.context.purge(true)
else
- logs.help(messages.help)
+ application.help("basic")
end
if environment.argument("profile") then
diff --git a/scripts/context/lua/mtx-convert.lua b/scripts/context/lua/mtx-convert.lua
index 448a1b6ca..0c5c01bbf 100644
--- a/scripts/context/lua/mtx-convert.lua
+++ b/scripts/context/lua/mtx-convert.lua
@@ -8,6 +8,23 @@ if not modules then modules = { } end modules ['mtx-convert'] = {
-- todo: eps and svg
+local helpinfo = [[
+--convertall convert all graphics on path
+--inputpath=string original graphics path
+--outputpath=string converted graphics path
+--watch watch folders
+--force force conversion (even if older)
+--delay time between sweeps
+]]
+
+local application = logs.application {
+ name = "mtx-convert",
+ banner = "ConTeXT Graphic Conversion Helpers 0.10",
+ helpinfo = helpinfo,
+}
+
+local report = application.report
+
graphics = graphics or { }
graphics.converters = graphics.converters or { }
@@ -40,7 +57,7 @@ local function convert(kind,oldname,newname)
if graphics.converters[kind] then -- extra test
local tmpname = file.replacesuffix(newname,"tmp")
local command = graphics.converters[kind](oldname,tmpname)
- logs.simple("command: %s",command)
+ report("command: %s",command)
io.flush()
os.spawn(command)
os.remove(newname)
@@ -118,22 +135,10 @@ function scripts.convert.convertgiven()
end
end
-
-logs.extendbanner("ConTeXT Graphic Conversion Helpers 0.10")
-
-messages.help = [[
---convertall convert all graphics on path
---inputpath=string original graphics path
---outputpath=string converted graphics path
---watch watch folders
---force force conversion (even if older)
---delay time between sweeps
-]]
-
if environment.argument("convertall") then
scripts.convert.convertall()
elseif environment.files[1] then
scripts.convert.convertgiven()
else
- logs.help(messages.help)
+ application.help()
end
diff --git a/scripts/context/lua/mtx-fonts.lua b/scripts/context/lua/mtx-fonts.lua
index b42627c95..b1e5f2dde 100644
--- a/scripts/context/lua/mtx-fonts.lua
+++ b/scripts/context/lua/mtx-fonts.lua
@@ -6,6 +6,49 @@ if not modules then modules = { } end modules ['mtx-fonts'] = {
license = "see context related readme files"
}
+local helpinfo = [[
+--save save open type font in raw table
+
+--reload generate new font database
+--reload --simple generate 'luatex-fonts-names.lua' (not for context!)
+
+--list --name list installed fonts, filter by name [--pattern]
+--list --spec list installed fonts, filter by spec [--filter]
+--list --file list installed fonts, filter by file [--pattern]
+
+--pattern=str filter files using pattern
+--filter=list key-value pairs
+--all show all found instances
+--info give more details
+--track=list enable trackers
+--statistics some info about the database
+
+examples of searches:
+
+mtxrun --script font --list somename (== --pattern=*somename*)
+
+mtxrun --script font --list --name somename
+mtxrun --script font --list --name --pattern=*somename*
+
+mtxrun --script font --list --spec somename
+mtxrun --script font --list --spec somename-bold-italic
+mtxrun --script font --list --spec --pattern=*somename*
+mtxrun --script font --list --spec --filter="fontname=somename"
+mtxrun --script font --list --spec --filter="familyname=somename,weight=bold,style=italic,width=condensed"
+mtxrun --script font --list --spec --filter="familyname=crap*,weight=bold,style=italic"
+
+mtxrun --script font --list --file somename
+mtxrun --script font --list --file --pattern=*somename*
+]]
+
+local application = logs.application {
+ name = "mtx-fonts",
+ banner = "ConTeXt Font Database Management 0.21",
+ helpinfo = helpinfo,
+}
+
+local report = application.report
+
-- todo: fc-cache -v en check dirs, or better is: fc-cat -v | grep Directory
if not fontloader then fontloader = fontforge end
@@ -31,29 +74,29 @@ function fonts.names.statistics()
return table.sequenced(n)
end
- logs.simple("cache uuid : %s", data.cache_uuid)
- logs.simple("cache version : %s", data.cache_version)
- logs.simple("number of trees : %s", #data.datastate)
- logs.simpleline()
- logs.simple("number of fonts : %s", statistics.fonts or 0)
- logs.simple("used files : %s", statistics.readfiles or 0)
- logs.simple("skipped files : %s", statistics.skippedfiles or 0)
- logs.simple("duplicate files : %s", statistics.duplicatefiles or 0)
- logs.simple("specifications : %s", #data.specifications)
- logs.simple("families : %s", table.count(data.families))
- logs.simpleline()
- logs.simple("mappings : %s", counted(data.mappings))
- logs.simple("fallbacks : %s", counted(data.fallbacks))
- logs.simpleline()
- logs.simple("used styles : %s", table.sequenced(statistics.used_styles))
- logs.simple("used variants : %s", table.sequenced(statistics.used_variants))
- logs.simple("used weights : %s", table.sequenced(statistics.used_weights))
- logs.simple("used widths : %s", table.sequenced(statistics.used_widths))
- logs.simpleline()
- logs.simple("found styles : %s", table.sequenced(statistics.styles))
- logs.simple("found variants : %s", table.sequenced(statistics.variants))
- logs.simple("found weights : %s", table.sequenced(statistics.weights))
- logs.simple("found widths : %s", table.sequenced(statistics.widths))
+ report("cache uuid : %s", data.cache_uuid)
+ report("cache version : %s", data.cache_version)
+ report("number of trees : %s", #data.datastate)
+ report()
+ report("number of fonts : %s", statistics.fonts or 0)
+ report("used files : %s", statistics.readfiles or 0)
+ report("skipped files : %s", statistics.skippedfiles or 0)
+ report("duplicate files : %s", statistics.duplicatefiles or 0)
+ report("specifications : %s", #data.specifications)
+ report("families : %s", table.count(data.families))
+ report()
+ report("mappings : %s", counted(data.mappings))
+ report("fallbacks : %s", counted(data.fallbacks))
+ report()
+ report("used styles : %s", table.sequenced(statistics.used_styles))
+ report("used variants : %s", table.sequenced(statistics.used_variants))
+ report("used weights : %s", table.sequenced(statistics.used_weights))
+ report("used widths : %s", table.sequenced(statistics.used_widths))
+ report()
+ report("found styles : %s", table.sequenced(statistics.styles))
+ report("found variants : %s", table.sequenced(statistics.variants))
+ report("found weights : %s", table.sequenced(statistics.weights))
+ report("found widths : %s", table.sequenced(statistics.widths))
end
@@ -63,7 +106,7 @@ function fonts.names.simple()
local name = "luatex-fonts-names.lua"
fonts.names.filters.list = simplelist
fonts.names.version = simpleversion -- this number is the same as in font-dum.lua
- logs.report("fontnames","generating font database for 'luatex-fonts' version %s",fonts.names.version)
+ report("generating font database for 'luatex-fonts' version %s",fonts.names.version)
fonts.names.identify(true)
local data = fonts.names.data
if data then
@@ -80,12 +123,12 @@ function fonts.names.simple()
simplemappings[tag] = { s.rawname, s.filename, s.subfont }
end
end
- logs.report("fontnames","saving names in '%s'",name)
+ report("saving names in '%s'",name)
io.savedata(name,table.serialize(simplified,true))
local data = io.loaddata(resolvers.findfile("font-dum.lua","tex"))
local dummy = string.match(data,"fonts%.names%.version%s*=%s*([%d%.]+)")
if tonumber(dummy) ~= simpleversion then
- logs.report("fontnames","warning: version number %s in 'font-dum' does not match database version number %s",dummy or "?",simpleversion)
+ report("warning: version number %s in 'font-dum' does not match database version number %s",dummy or "?",simpleversion)
end
elseif lfs.isfile(name) then
os.remove(name)
@@ -117,28 +160,29 @@ local function fontweight(fw)
end
local function showfeatures(tag,specification)
- logs.simple("mapping : %s",tag)
- logs.simple("fontname: %s",specification.fontname)
- logs.simple("fullname: %s",specification.fullname)
- logs.simple("filename: %s",specification.filename)
- logs.simple("family : %s",specification.familyname or "<nofamily>")
- logs.simple("weight : %s",specification.weight or "<noweight>")
- logs.simple("style : %s",specification.style or "<nostyle>")
- logs.simple("width : %s",specification.width or "<nowidth>")
- logs.simple("variant : %s",specification.variant or "<novariant>")
- logs.simple("subfont : %s",subfont(specification.subfont))
- logs.simple("fweight : %s",fontweight(specification.fontweight))
+ report()
+ report("mapping : %s",tag)
+ report("fontname: %s",specification.fontname)
+ report("fullname: %s",specification.fullname)
+ report("filename: %s",specification.filename)
+ report("family : %s",specification.familyname or "<nofamily>")
+ report("weight : %s",specification.weight or "<noweight>")
+ report("style : %s",specification.style or "<nostyle>")
+ report("width : %s",specification.width or "<nowidth>")
+ report("variant : %s",specification.variant or "<novariant>")
+ report("subfont : %s",subfont(specification.subfont))
+ report("fweight : %s",fontweight(specification.fontweight))
-- maybe more
local features = fonts.get_features(specification.filename,specification.format)
if features then
for what, v in table.sortedhash(features) do
local data = features[what]
if data and next(data) then
- logs.simple()
- logs.simple("%s features:",what)
- logs.simple()
- logs.simple("feature script languages")
- logs.simple()
+ report()
+ report("%s features:",what)
+ report()
+ report("feature script languages")
+ report()
for f,ff in table.sortedhash(data) do
local done = false
for s, ss in table.sortedhash(ff) do
@@ -149,24 +193,22 @@ local function showfeatures(tag,specification)
else
done = true
end
- logs.simple("% -8s % -8s % -8s",f,s,table.concat(table.sortedkeys(ss), " ")) -- todo: padd 4
+ report("% -8s % -8s % -8s",f,s,table.concat(table.sortedkeys(ss), " ")) -- todo: padd 4
end
end
end
end
else
- logs.simple()
- logs.simple("no features")
- logs.simple()
+ report("no features")
end
- logs.reportline()
+ report()
end
local function reloadbase(reload)
if reload then
- logs.simple("fontnames, reloading font database")
+ report("fontnames, reloading font database")
names.load(true)
- logs.simple("fontnames, done\n\n")
+ report("fontnames, done\n\n")
end
end
@@ -245,17 +287,17 @@ function scripts.fonts.list()
--~ mtxrun --script font --list --name --pattern=*somename*
list_matches(fonts.names.list(string.topattern(pattern,true),reload,all),info)
elseif filter then
- logs.report("fontnames","not supported: --list --name --filter",name)
+ report("not supported: --list --name --filter",name)
elseif given then
--~ mtxrun --script font --list --name somename
list_matches(fonts.names.list(given,reload,all),info)
else
- logs.report("fontnames","not supported: --list --name <no specification>",name)
+ report("not supported: --list --name <no specification>",name)
end
elseif environment.argument("spec") then
if pattern then
--~ mtxrun --script font --list --spec --pattern=*somename*
- logs.report("fontnames","not supported: --list --spec --pattern",name)
+ report("not supported: --list --spec --pattern",name)
elseif filter then
--~ mtxrun --script font --list --spec --filter="fontname=somename"
list_specifications(fonts.names.getlookups(filter),info)
@@ -263,19 +305,19 @@ function scripts.fonts.list()
--~ mtxrun --script font --list --spec somename
list_specifications(fonts.names.collectspec(given,reload,all),info)
else
- logs.report("fontnames","not supported: --list --spec <no specification>",name)
+ report("not supported: --list --spec <no specification>",name)
end
elseif environment.argument("file") then
if pattern then
--~ mtxrun --script font --list --file --pattern=*somename*
list_specifications(fonts.names.collectfiles(string.topattern(pattern,true),reload,all),info)
elseif filter then
- logs.report("fontnames","not supported: --list --spec",name)
+ report("not supported: --list --spec",name)
elseif given then
--~ mtxrun --script font --list --file somename
list_specifications(fonts.names.collectfiles(given,reload,all),info)
else
- logs.report("fontnames","not supported: --list --file <no specification>",name)
+ report("not supported: --list --file <no specification>",name)
end
elseif pattern then
--~ mtxrun --script font --list --pattern=*somename*
@@ -287,7 +329,7 @@ function scripts.fonts.list()
pattern = "*"
list_matches(fonts.names.list(string.topattern(pattern,true),reload,all),info)
else
- logs.report("fontnames","not supported: --list <no specification>",name)
+ report("not supported: --list <no specification>",name)
end
end
@@ -298,7 +340,7 @@ function scripts.fonts.save()
local function save(savename,fontblob)
if fontblob then
savename = savename:lower() .. ".lua"
- logs.simple("fontsave, saving data in %s",savename)
+ report("fontsave, saving data in %s",savename)
table.tofile(savename,fontloader.to_table(fontblob),"return")
fontloader.close(fontblob)
end
@@ -310,7 +352,7 @@ function scripts.fonts.save()
if suffix == 'ttf' or suffix == 'otf' or suffix == 'ttc' or suffix == "dfont" then
local fontinfo = fontloader.info(filename)
if fontinfo then
- logs.simple("font: %s located as %s",name,filename)
+ report("font: %s located as %s",name,filename)
if fontinfo[1] then
for k=1,#fontinfo do
local v = fontinfo[k]
@@ -320,56 +362,19 @@ function scripts.fonts.save()
save(fontinfo.fullname,fontloader.open(filename))
end
else
- logs.simple("font: %s cannot be read",filename)
+ report("font: %s cannot be read",filename)
end
else
- logs.simple("font: %s not saved",filename)
+ report("font: %s not saved",filename)
end
else
- logs.simple("font: %s not found",name)
+ report("font: %s not found",name)
end
else
- logs.simple("font: no name given")
+ report("font: no name given")
end
end
-logs.extendbanner("ConTeXt Font Database Management 0.21")
-
-messages.help = [[
---save save open type font in raw table
-
---reload generate new font database
---reload --simple generate 'luatex-fonts-names.lua' (not for context!)
-
---list --name list installed fonts, filter by name [--pattern]
---list --spec list installed fonts, filter by spec [--filter]
---list --file list installed fonts, filter by file [--pattern]
-
---pattern=str filter files using pattern
---filter=list key-value pairs
---all show all found instances
---info give more details
---track=list enable trackers
---statistics some info about the database
-
-examples of searches:
-
-mtxrun --script font --list somename (== --pattern=*somename*)
-
-mtxrun --script font --list --name somename
-mtxrun --script font --list --name --pattern=*somename*
-
-mtxrun --script font --list --spec somename
-mtxrun --script font --list --spec somename-bold-italic
-mtxrun --script font --list --spec --pattern=*somename*
-mtxrun --script font --list --spec --filter="fontname=somename"
-mtxrun --script font --list --spec --filter="familyname=somename,weight=bold,style=italic,width=condensed"
-mtxrun --script font --list --spec --filter="familyname=crap*,weight=bold,style=italic"
-
-mtxrun --script font --list --file somename
-mtxrun --script font --list --file --pattern=*somename*
-]]
-
local track = environment.argument("track")
if track then trackers.enable(track) end
@@ -388,5 +393,5 @@ elseif environment.argument("save") then
elseif environment.argument("statistics") then
fonts.names.statistics()
else
- logs.help(messages.help)
+ application.help()
end
diff --git a/scripts/context/lua/mtx-grep.lua b/scripts/context/lua/mtx-grep.lua
index 98378f92b..963422c68 100644
--- a/scripts/context/lua/mtx-grep.lua
+++ b/scripts/context/lua/mtx-grep.lua
@@ -6,11 +6,25 @@ if not modules then modules = { } end modules ['mtx-babel'] = {
license = "see context related readme files"
}
+local helpinfo = [[
+--pattern search for pattern (optional)
+--count count matches only
+--nocomment skip lines that start with %% or #
+
+patterns are lua patterns and need to be escaped accordingly
+]]
+
+local application = logs.application {
+ name = "mtx-grep",
+ banner = "Simple Grepper 0.10",
+ helpinfo = helpinfo,
+}
+
+local report = application.report
+
scripts = scripts or { }
scripts.grep = scripts.grep or { }
-logs.extendbanner("Simple Grepper 0.10")
-
local find, format = string.find, string.format
local cr = lpeg.P("\r")
@@ -94,14 +108,6 @@ function scripts.grep.find(pattern, files, offset)
end
end
-messages.help = [[
---pattern search for pattern (optional)
---count count matches only
---nocomment skip lines that start with %% or #
-
-patterns are lua patterns and need to be escaped accordingly
-]]
-
local pattern = environment.argument("pattern")
local files = environment.files and #environment.files > 0 and environment.files
@@ -110,5 +116,5 @@ if pattern and files then
elseif files then
scripts.grep.find(files[1], files, 2)
else
- logs.help(messages.help)
+ application.help()
end
diff --git a/scripts/context/lua/mtx-interface.lua b/scripts/context/lua/mtx-interface.lua
index bee6a7da1..91ae16ce3 100644
--- a/scripts/context/lua/mtx-interface.lua
+++ b/scripts/context/lua/mtx-interface.lua
@@ -10,6 +10,36 @@ local concat, sort, insert = table.concat, table.sort, table.insert
local gsub, format, gmatch, find = string.gsub, string.format, string.gmatch, string.find
local utfchar, utfgsub = utf.char, utf.gsub
+local helpinfo = [[
+--interfaces generate context interface files
+--messages generate context message files
+--labels generate context label files
+
+--context equals --interfaces --messages --languages
+
+--scite generate scite interface
+--bbedit generate bbedit interface files
+--jedit generate jedit interface files
+--textpad generate textpad interface files
+--text create text files for commands and environments
+--raw report commands to the console
+--check generate check file
+
+--toutf replace named characters by utf
+--preprocess preprocess mkvi files to tex files [force,suffix]
+
+--suffix use given suffix for output files
+--force force action even when in doubt
+]]
+
+local application = logs.application {
+ name = "mtx-interface",
+ banner = "ConTeXt Interface Related Goodies 0.13",
+ helpinfo = helpinfo,
+}
+
+local report = application.report
+
scripts = scripts or { }
scripts.interface = scripts.interface or { }
@@ -64,7 +94,7 @@ end
function flushers.raw(interface,commands)
for i=1,#commands do
- logs.simple(commands[i])
+ report(commands[i])
end
end
@@ -73,12 +103,12 @@ local textpadcreator = "mtx-interface-textpad.lua"
function flushers.text(interface,commands,environments)
local c, cname = { }, format("context-commands-%s.txt",interface)
local e, ename = { }, format("context-environments-%s.txt",interface)
- logs.simple("saving '%s'",cname)
+ report("saving '%s'",cname)
for i=1,#commands do
c[#c+1] = format("\\%s",commands[i])
end
io.savedata(cname,concat(c,"\n"))
- logs.simple("saving '%s'",ename)
+ report("saving '%s'",ename)
for i=1,#environments do
e[#e+1] = format("\\start%s",environments[i])
e[#e+1] = format("\\stop%s", environments[i])
@@ -92,7 +122,7 @@ function flushers.textpad(interface,commands,environments)
-- plugin, this is a rewrite of a file provided by Lukas Prochazka
--
local function merge(templatedata,destinationdata,categories)
- logs.simple("loading '%s'",templatedata)
+ report("loading '%s'",templatedata)
local data = io.loaddata(templatedata)
local done = 0
for i=1,#categories do
@@ -103,25 +133,25 @@ function flushers.textpad(interface,commands,environments)
local found = resolvers.findfile(filename) or ""
local blob = found ~= "" and io.loaddata(found) or ""
if blob == "" then
- logs.simple("category: %s, filename: %s, not found",category,filename)
+ report("category: %s, filename: %s, not found",category,filename)
else
done = done + 1
- logs.simple("category: %s, filename: %s, merged",category,filename)
+ report("category: %s, filename: %s, merged",category,filename)
end
return format("; category: %s\n; filename: %s\n%s\n\n",category,filename,blob)
end)
end
if done > 0 then
- logs.simple("saving '%s' (%s files merged)",destinationdata,done)
+ report("saving '%s' (%s files merged)",destinationdata,done)
io.savedata(destinationdata,data)
else
- logs.simple("skipping '%s' (no files merged)",destinationdata)
+ report("skipping '%s' (no files merged)",destinationdata)
end
end
local templatename = "textpad-context-template.txt"
local templatedata = resolvers.findfile(templatename) or ""
if templatedata == "" then
- logs.simple("unable to locate template '%s'",templatename)
+ report("unable to locate template '%s'",templatename)
else
merge(templatedata, "context.syn", { "tex commands","context commands" })
if environment.argument("textpad") == "latex" then
@@ -152,13 +182,13 @@ function scripts.interface.editor(editor,split,forcedinterfaces)
end
local xmlfile = resolvers.findfile("cont-en.xml") or ""
if xmlfile == "" then
- logs.simple("unable to locate cont-en.xml")
+ report("unable to locate cont-en.xml")
end
for i=1,#interfaces do
local interface = interfaces[i]
local keyfile = resolvers.findfile(format("keys-%s.xml",interface)) or ""
if keyfile == "" then
- logs.simple("unable to locate keys-*.xml")
+ report("unable to locate keys-*.xml")
else
local commands = { }
local mappings = { }
@@ -243,7 +273,7 @@ function scripts.interface.interfaces()
local v = t[key]
local value = v[language] or v["en"]
if not value then
- logs.simple("warning, no value for key '%s' for language '%s'",key,language)
+ report("warning, no value for key '%s' for language '%s'",key,language)
else
local value = t[key][language] or t[key].en
texresult[#texresult+1] = format("\\setinterface%s{%s}{%s}",tag,key,value)
@@ -281,9 +311,9 @@ function scripts.interface.interfaces()
local texfilename = format("mult-%s.mkii",language)
local xmlfilename = format("keys-%s.xml",language)
io.savedata(texfilename,concat(texresult,"\n"))
- logs.simple("saving interface definitions '%s'",texfilename)
+ report("saving interface definitions '%s'",texfilename)
io.savedata(xmlfilename,concat(xmlresult,"\n"))
- logs.simple("saving interface translations '%s'",xmlfilename)
+ report("saving interface translations '%s'",xmlfilename)
if language ~= "en" and xmldata ~= "" then
local newdata = xmldata:gsub("(<cd:interface.*language=.)en(.)","%1"..language.."%2",1)
newdata = replace(newdata, 'cd:string', 'value', interface.commands, interface.elements, language)
@@ -294,7 +324,7 @@ function scripts.interface.interfaces()
newdata = replace(newdata, 'cd:inherit', 'name', interface.commands, interface.elements, language)
local xmlfilename = format("cont-%s.xml",language)
io.savedata(xmlfilename,newdata)
- logs.simple("saving interface specification '%s'",xmlfilename)
+ report("saving interface specification '%s'",xmlfilename)
end
end
end
@@ -309,42 +339,42 @@ function scripts.interface.preprocess()
local oldname = environment.files[i]
local newname = file.replacesuffix(oldname,newsuffix)
if oldname == newname then
- logs.simple("skipping '%s' because old and new name are the same",oldname)
+ report("skipping '%s' because old and new name are the same",oldname)
elseif io.exists(newname) and not force then
- logs.simple("skipping '%s' because new file exists, use --force",oldname)
+ report("skipping '%s' because new file exists, use --force",oldname)
else
- logs.simple("processing '%s' into '%s'",oldname,newname)
+ report("processing '%s' into '%s'",oldname,newname)
io.savedata(newname,resolvers.macros.preprocessed(io.loaddata(oldname)))
end
end
end
-function scripts.interface.messages()
- local filename = resolvers.findfile(environment.files[1] or "mult-mes.lua") or ""
- if filename ~= "" then
- local messages = dofile(filename)
- logs.simple("messages for * loaded from '%s'",filename)
- logs.simple()
- for i=1,#messageinterfaces do
- local interface = messageinterfaces[i]
- local texresult = { }
- for category, data in next, messages do
- for tag, message in next, data do
- if tag ~= "files" then
- local msg = message[interface] or message["all"] or message["en"]
- if msg then
- texresult[#texresult+1] = format("\\setinterfacemessage{%s}{%s}{%s}",category,tag,msg)
- end
- end
- end
- end
- texresult[#texresult+1] = format("%%\n\\endinput")
- local interfacefile = format("mult-m%s.mkii",interface)
- io.savedata(interfacefile,concat(texresult,"\n"))
- logs.simple("messages for '%s' saved in '%s'",interface,interfacefile)
- end
- end
-end
+-- function scripts.interface.messages()
+-- local filename = resolvers.findfile(environment.files[1] or "mult-mes.lua") or ""
+-- if filename ~= "" then
+-- local messages = dofile(filename)
+-- report("messages for * loaded from '%s'",filename)
+-- report()
+-- for i=1,#messageinterfaces do
+-- local interface = messageinterfaces[i]
+-- local texresult = { }
+-- for category, data in next, messages do
+-- for tag, message in next, data do
+-- if tag ~= "files" then
+-- local msg = message[interface] or message["all"] or message["en"]
+-- if msg then
+-- texresult[#texresult+1] = format("\\setinterfacemessage{%s}{%s}{%s}",category,tag,msg)
+-- end
+-- end
+-- end
+-- end
+-- texresult[#texresult+1] = format("%%\n\\endinput")
+-- local interfacefile = format("mult-m%s.mkii",interface)
+-- io.savedata(interfacefile,concat(texresult,"\n"))
+-- report("messages for '%s' saved in '%s'",interface,interfacefile)
+-- end
+-- end
+-- end
function scripts.interface.toutf()
local filename = environment.files[1]
@@ -363,7 +393,7 @@ function scripts.interface.toutf()
contextnames.aumlaut = contextnames.adiaeresis
contextnames.Aumlaut = contextnames.Adiaeresis
end
- logs.simple("loading '%s'",filename)
+ report("loading '%s'",filename)
local str = io.loaddata(filename) or ""
local done = { }
str = gsub(str,"(\\)([a-zA-Z][a-zA-Z][a-zA-Z]+)(%s*)", function(b,s,a)
@@ -378,129 +408,99 @@ function scripts.interface.toutf()
end)
for k, v in table.sortedpairs(done) do
if v > 0 then
- logs.simple("+ %5i : %s => %s",v,k,contextnames[k])
+ report("+ %5i : %s => %s",v,k,contextnames[k])
else
- logs.simple("- %5i : %s",-v,k,contextnames[k])
+ report("- %5i : %s",-v,k,contextnames[k])
end
end
filename = filename .. ".toutf"
- logs.simple("saving '%s'",filename)
+ report("saving '%s'",filename)
io.savedata(filename,str)
end
end
-function scripts.interface.labels()
- require("char-def.lua")
- require("lang-txt.lua")
- local interfaces = require("mult-def.lua")
- local variables = interfaces.variables
- local contextnames = { }
- for unicode, data in next, characters.data do
- local contextname = data.contextname
- if contextname then
- contextnames[utfchar(unicode)] = "\\" .. contextname .. " "
- end
- end
- contextnames["i"] = nil
- contextnames["'"] = nil
- contextnames["\\"] = nil
- local function flush(f,kind,what,expand,namespace,prefix)
- local whatdata = languages.data.labels[what]
- f:write("\n")
- f:write(format("%% %s => %s\n",what,kind))
- for tag, data in table.sortedpairs(whatdata) do
- if not data.hidden then
- f:write("\n")
- for language, text in table.sortedpairs(data.labels) do
- if text ~= "" then
- if expand then
- text = utfgsub(text,".",contextnames)
- text = gsub(text," ", "\ ")
- end
- if namespace and namespace[tag] then
- tag = prefix .. tag
- end
- if find(text,",") then
- text = "{" .. text .. "}"
- end
-
- if text == "" then
- -- skip
- else
- if type(text) == "table" then
- f:write(format("\\setup%stext[\\s!%s][%s={{%s},}]\n",kind,language,tag,text))
- else
- f:write(format("\\setup%stext[\\s!%s][%s={{%s},{%s}}]\n",kind,language,tag,text[1],text[2]))
- end
- end
-
- end
- end
- end
- end
- end
- function flushall(txtname,expand)
- local f = io.open(txtname,"w")
- if f then
- logs.simple("saving '%s'",txtname)
- f:write("% this file is auto-generated, don't edit this file\n")
- flush(f,"head","titles",expand,variables,"\\v!")
- flush(f,"label","texts",expand,variables,"\\v!")
- flush(f,"mathlabel","functions",expand)
- flush(f,"taglabel","tags",expand)
- f:write("\n")
- f:write("\\endinput\n")
- f:close()
- end
- end
- flushall("lang-txt.mkii",true)
- flushall("lang-txt.mkiv",false)
-end
-
-function scripts.interface.labels()
- -- maybe supported one day
-end
-
-logs.extendbanner("ConTeXt Interface Related Goodies 0.13")
-
-messages.help = [[
---interfaces generate context interface files
---messages generate context message files
---labels generate context label files
-
---context equals --interfaces --messages --languages
-
---scite generate scite interface
---bbedit generate bbedit interface files
---jedit generate jedit interface files
---textpad generate textpad interface files
---text create text files for commands and environments
---raw report commands to the console
---check generate check file
-
---toutf replace named characters by utf
---preprocess preprocess mkvi files to tex files [force,suffix]
-
---suffix use given suffix for output files
---force force action even when in doubt
-]]
+-- function scripts.interface.labels()
+-- require("char-def.lua")
+-- require("lang-txt.lua")
+-- local interfaces = require("mult-def.lua")
+-- local variables = interfaces.variables
+-- local contextnames = { }
+-- for unicode, data in next, characters.data do
+-- local contextname = data.contextname
+-- if contextname then
+-- contextnames[utfchar(unicode)] = "\\" .. contextname .. " "
+-- end
+-- end
+-- contextnames["i"] = nil
+-- contextnames["'"] = nil
+-- contextnames["\\"] = nil
+-- local function flush(f,kind,what,expand,namespace,prefix)
+-- local whatdata = languages.data.labels[what]
+-- f:write("\n")
+-- f:write(format("%% %s => %s\n",what,kind))
+-- for tag, data in table.sortedpairs(whatdata) do
+-- if not data.hidden then
+-- f:write("\n")
+-- for language, text in table.sortedpairs(data.labels) do
+-- if text ~= "" then
+-- if expand then
+-- text = utfgsub(text,".",contextnames)
+-- text = gsub(text," ", "\ ")
+-- end
+-- if namespace and namespace[tag] then
+-- tag = prefix .. tag
+-- end
+-- if find(text,",") then
+-- text = "{" .. text .. "}"
+-- end
+-- if text == "" then
+-- -- skip
+-- else
+-- if type(text) == "table" then
+-- f:write(format("\\setup%stext[\\s!%s][%s={{%s},}]\n",kind,language,tag,text))
+-- else
+-- f:write(format("\\setup%stext[\\s!%s][%s={{%s},{%s}}]\n",kind,language,tag,text[1],text[2]))
+-- end
+-- end
+-- end
+-- end
+-- end
+-- end
+-- end
+-- function flushall(txtname,expand)
+-- local f = io.open(txtname,"w")
+-- if f then
+-- report("saving '%s'",txtname)
+-- f:write("% this file is auto-generated, don't edit this file\n")
+-- flush(f,"head","titles",expand,variables,"\\v!")
+-- flush(f,"label","texts",expand,variables,"\\v!")
+-- flush(f,"mathlabel","functions",expand)
+-- flush(f,"taglabel","tags",expand)
+-- f:write("\n")
+-- f:write("\\endinput\n")
+-- f:close()
+-- end
+-- end
+-- flushall("lang-txt.mkii",true)
+-- flushall("lang-txt.mkiv",false)
+-- end
local ea = environment.argument
if ea("context") then
scripts.interface.interfaces()
- scripts.interface.messages()
- scripts.interface.labels()
+ -- scripts.interface.messages()
+ -- scripts.interface.labels()
elseif ea("interfaces") or ea("messages") or ea("labels") then
if ea("interfaces") then
scripts.interface.interfaces()
end
- if ea("messages") then
- scripts.interface.messages()
- end
- if ea("labels") then
- scripts.interface.labels()
- end
+ -- if ea("messages") then
+ -- scripts.interface.messages()
+ -- end
+ -- if ea("labels") then
+ -- scripts.interface.labels()
+ -- end
elseif ea("preprocess") then
scripts.interface.preprocess()
elseif ea("toutf") then
@@ -527,5 +527,5 @@ elseif ea("scite") or ea("bbedit") or ea("jedit") or ea("textpad") or ea("text")
scripts.interface.editor("raw")
end
else
- logs.help(messages.help)
+ application.help()
end
diff --git a/scripts/context/lua/mtx-metapost.lua b/scripts/context/lua/mtx-metapost.lua
index 9bdd1260f..3b9ed6ff1 100644
--- a/scripts/context/lua/mtx-metapost.lua
+++ b/scripts/context/lua/mtx-metapost.lua
@@ -6,6 +6,30 @@ if not modules then modules = { } end modules ['mtx-metapost'] = { -- this was m
license = "see context related readme files"
}
+local helpinfo = [[
+--rawmp raw metapost run
+--metafun use metafun instead of plain
+--latex force --tex=latex
+--texexec force texexec usage (mkii)
+--split split single result file into pages
+
+intended usage:
+
+mtxrun --script metapost yourfile.mp
+mtxrun --script metapost --split yourfile.mp
+mtxrun --script metapost yourfile.123 myfile.mps
+
+other usage resembles mptopdf.pl
+]]
+
+local application = logs.application {
+ name = "mtx-metapost",
+ banner = "MetaPost to PDF processor 0.10",
+ helpinfo = helpinfo,
+}
+
+local report = application.report
+
scripts = scripts or { }
scripts.mptopdf = scripts.mptopdf or { }
scripts.mptopdf.aux = scripts.mptopdf.aux or { }
@@ -67,23 +91,23 @@ local function do_convert_all(filename)
end
end
if #report > 0 then
- logs.simple("number of converted files: %i", #report)
- logs.simple("")
+ report("number of converted files: %i", #report)
+ report()
for i=1,#report do
local r = report[i]
- logs.simple("%s => %s", r[1], r[2])
+ report("%s => %s", r[1], r[2])
end
else
- logs.simple("no files are converted for '%s'",filename)
+ report("no files are converted for '%s'",filename)
end
end
local function do_convert_one(filename)
local resultname = do_convert(filename)
if resultname then
- logs.simple("%s => %s", filename,resultname)
+ report("%s => %s", filename,resultname)
else
- logs.simple("no result for '%s'",filename)
+ report("no result for '%s'",filename)
end
end
@@ -121,7 +145,7 @@ function scripts.mptopdf.convertall()
command, convert = format("context --result=%s --purge --once %s",file.nameonly(filename),tempname), false
end
end
- logs.simple("running: %s\n",command)
+ report("running: %s",command)
local done = os.execute(command)
if done then
if convert then
@@ -131,41 +155,23 @@ function scripts.mptopdf.convertall()
-- already pdf, maybe optionally split
end
else
- logs.simple("error while processing mp file '%s'", filename)
+ report("error while processing mp file '%s'", filename)
end
else
do_convert_one(filename)
end
end
else
- logs.simple("no files match to process")
+ report("no files match to process")
end
end
-logs.extendbanner("MetaPost to PDF processor 0.10")
-
-messages.help = [[
---rawmp raw metapost run
---metafun use metafun instead of plain
---latex force --tex=latex
---texexec force texexec usage (mkii)
---split split single result file into pages
-
-intended usage:
-
-mtxrun --script metapost yourfile.mp
-mtxrun --script metapost --split yourfile.mp
-mtxrun --script metapost yourfile.123 myfile.mps
-
-other usage resembles mptopdf.pl
-]]
-
if environment.files[1] then
scripts.mptopdf.convertall()
else
if not environment.arguments.help then
- logs.simple("provide MP output file (or pattern)")
- logs.simple("")
+ report("provide MP output file (or pattern)")
+ report()
end
- logs.help(messages.help)
+ application.help()
end
diff --git a/scripts/context/lua/mtx-metatex.lua b/scripts/context/lua/mtx-metatex.lua
index c5865b808..0b66d59ef 100644
--- a/scripts/context/lua/mtx-metatex.lua
+++ b/scripts/context/lua/mtx-metatex.lua
@@ -8,6 +8,19 @@ if not modules then modules = { } end modules ['mtx-metatex'] = {
-- future versions will deal with specific variants of metatex
+local helpinfo = [[
+--run process (one or more) files (default action)
+--make create metatex format(s)
+]]
+
+local application = logs.application {
+ name = "mtx-metatex",
+ banner = "MetaTeX Process Management 0.10",
+ helpinfo = helpinfo,
+}
+
+local report = application.report
+
scripts = scripts or { }
scripts.metatex = scripts.metatex or { }
@@ -24,12 +37,12 @@ function scripts.metatex.run(ctxdata,filename)
if formatfile and scriptfile then
local command = string.format("luatex --fmt=%s --lua=%s %s",
string.quote(formatfile), string.quote(scriptfile), string.quote(filename))
- logs.simple("running command: %s",command)
+ report("running command: %s",command)
os.spawn(command)
elseif formatname then
- logs.simple("error, no format found with name: %s",formatname)
+ report("error, no format found with name: %s",formatname)
else
- logs.simple("error, no format found (provide formatname or interface)")
+ report("error, no format found (provide formatname or interface)")
end
end
end
@@ -38,13 +51,6 @@ function scripts.metatex.timed(action)
statistics.timed(action)
end
-logs.extendbanner("MetaTeX Process Management 0.10")
-
-messages.help = [[
---run process (one or more) files (default action)
---make create metatex format(s)
-]]
-
if environment.argument("run") then
scripts.metatex.timed(scripts.metatex.run)
elseif environment.argument("make") then
@@ -54,5 +60,5 @@ elseif environment.argument("help") then
elseif environment.files[1] then
scripts.metatex.timed(scripts.metatex.run)
else
- logs.help(messages.help,false)
+ application.help()
end
diff --git a/scripts/context/lua/mtx-modules.lua b/scripts/context/lua/mtx-modules.lua
index 632aa0f68..8f3ab89cf 100644
--- a/scripts/context/lua/mtx-modules.lua
+++ b/scripts/context/lua/mtx-modules.lua
@@ -9,6 +9,20 @@ if not modules then modules = { } end modules ['mtx-modules'] = {
scripts = scripts or { }
scripts.modules = scripts.modules or { }
+local helpinfo = [[
+--convert convert source files (tex, mkii, mkiv, mp) to 'ted' files
+--process process source files (tex, mkii, mkiv, mp) to 'pdf' files
+--prep use original name with suffix 'prep' appended
+]]
+
+local application = logs.application {
+ name = "mtx-modules",
+ banner = "ConTeXt Module Documentation Generators 1.00",
+ helpinfo = helpinfo,
+}
+
+local report = application.report
+
-- Documentation can be woven into a source file. This script can generates
-- a file with the documentation and source fragments properly tagged. The
-- documentation is included as comment:
@@ -39,15 +53,15 @@ local find, format, sub, is_empty, strip = string.find, string.format, string.su
local function source_to_ted(inpname,outname,filetype)
local inp = io.open(inpname)
if not inp then
- logs.simple("unable to open '%s'",inpname)
+ report("unable to open '%s'",inpname)
return
end
local out = io.open(outname,"w")
if not out then
- logs.simple("unable to open '%s'",outname)
+ report("unable to open '%s'",outname)
return
end
- logs.simple("converting '%s' to '%s'",inpname,outname)
+ report("converting '%s' to '%s'",inpname,outname)
local skiplevel, indocument, indefinition = 0, false, false
out:write(format("\\startmodule[type=%s]\n",filetype or file.suffix(inpname)))
for line in inp:lines() do
@@ -143,25 +157,16 @@ function scripts.modules.process(runtex)
end
for i=1,#processed do
local name = processed[i]
- logs.simple("modules","processed: %s",name)
+ report("modules","processed: %s",name)
end
end
-- context --ctx=m-modules.ctx xxx.mkiv
-
-logs.extendbanner("ConTeXt Module Documentation Generators 1.00")
-
-messages.help = [[
---convert convert source files (tex, mkii, mkiv, mp) to 'ted' files
---process process source files (tex, mkii, mkiv, mp) to 'pdf' files
---prep use original name with suffix 'prep' appended
-]]
-
if environment.argument("process") then
scripts.modules.process(true)
elseif environment.argument("convert") then
scripts.modules.process(false)
else
- logs.help(messages.help)
+ application.help()
end
diff --git a/scripts/context/lua/mtx-package.lua b/scripts/context/lua/mtx-package.lua
index 5269eb34c..294ef4f28 100644
--- a/scripts/context/lua/mtx-package.lua
+++ b/scripts/context/lua/mtx-package.lua
@@ -8,6 +8,18 @@ if not modules then modules = { } end modules ['mtx-package'] = {
local format, gsub, gmatch = string.format, string.gsub, string.gmatch
+local helpinfo = [[
+--merge merge 'loadmodule' into merge file
+]]
+
+local application = logs.application {
+ name = "mtx-package",
+ banner = "Distribution Related Goodies 0.10",
+ helpinfo = helpinfo,
+}
+
+local report = application.report
+
scripts = scripts or { }
messages = messages or { }
scripts.package = scripts.package or { }
@@ -16,14 +28,14 @@ function scripts.package.merge_luatex_files(name,strip)
local oldname = resolvers.findfile(name) or ""
oldname = file.replacesuffix(oldname,"lua")
if oldname == "" then
- logs.simple("missing '%s'",name)
+ report("missing '%s'",name)
else
local newname = file.removesuffix(oldname) .. "-merged.lua"
local data = io.loaddata(oldname) or ""
if data == "" then
- logs.simple("missing '%s'",newname)
+ report("missing '%s'",newname)
else
- logs.simple("loading '%s'",oldname)
+ report("loading '%s'",oldname)
local collected = { }
collected[#collected+1] = format("-- merged file : %s\n",newname)
collected[#collected+1] = format("-- parent file : %s\n",oldname)
@@ -33,9 +45,9 @@ function scripts.package.merge_luatex_files(name,strip)
if file.basename(lib) ~= file.basename(newname) then
local fullname = resolvers.findfile(lib) or ""
if fullname == "" then
- logs.simple("missing '%s'",lib)
+ report("missing '%s'",lib)
else
- logs.simple("fetching '%s'",fullname)
+ report("fetching '%s'",fullname)
local data = io.loaddata(fullname)
if strip then
data = gsub(data,"%-%-%[%[ldx%-%-.-%-%-%ldx%]%]%-%-[\n\r]*","")
@@ -49,20 +61,14 @@ function scripts.package.merge_luatex_files(name,strip)
end
end
end
- logs.simple("saving '%s'",newname)
+ report("saving '%s'",newname)
io.savedata(newname,table.concat(collected))
end
end
end
-logs.extendbanner("Distribution Related Goodies 0.10")
-
-messages.help = [[
---merge merge 'loadmodule' into merge file
-]]
-
if environment.argument("merge") then
scripts.package.merge_luatex_files(environment.files[1] or "")
else
- logs.help(messages.help)
+ application.help()
end
diff --git a/scripts/context/lua/mtx-patterns.lua b/scripts/context/lua/mtx-patterns.lua
index cb5717c58..bbf475133 100644
--- a/scripts/context/lua/mtx-patterns.lua
+++ b/scripts/context/lua/mtx-patterns.lua
@@ -11,10 +11,31 @@ local byte, char = utf.byte, utf.char
local addsuffix = file.addsuffix
local lpegmatch, validutf8 = lpeg.match, lpeg.patterns.validutf8
+local helpinfo = [[
+--convert generate context language files (mnemonic driven, if not given then all)
+--check check pattern file (or those used by context when no file given)
+--path source path where hyph-foo.tex files are stored
+--destination destination path
+
+examples of usage:
+
+mtxrun --script pattern --check hyph-*.tex
+mtxrun --script pattern --check --path=c:/data/develop/svn-hyphen/trunk/hyph-utf8/tex/generic/hyph-utf8/patterns
+mtxrun --script pattern --convert --path=c:/data/develop/svn-hyphen/trunk/hyph-utf8/tex/generic/hyph-utf8/patterns/tex --destination=e:/tmp/patterns
+mtxrun --script pattern --convert --path=c:/data/develop/svn-hyphen/trunk/hyph-utf8/tex/generic/hyph-utf8/patterns/txt --destination=e:/tmp/patterns
+]]
+
+local application = logs.application {
+ name = "mtx-patterns",
+ banner = "ConTeXt Pattern File Management 0.20",
+ helpinfo = helpinfo,
+}
+
+local report = application.report
+
scripts = scripts or { }
scripts.patterns = scripts.patterns or { }
-
local permitted_characters = table.tohash {
0x0009, -- tab
0x0027, -- apostrofe
@@ -138,11 +159,11 @@ function scripts.patterns.load(path,name,mnemonic,ignored)
local splitpatternsold, splithyphenationsold = { }, { }
local usedpatterncharacters, usedhyphenationcharacters = { }, { }
if lfs.isfile(patfile) then
- logs.simple("using txt files %s.[hyp|pat|lic].txt",name)
+ report("using txt files %s.[hyp|pat|lic].txt",name)
comment, patterns, hyphenations = io.loaddata(licfile) or "", io.loaddata(patfile) or "", io.loaddata(hypfile) or ""
hypfile, patfile, licfile = hypfile, patfile, licfile
elseif lfs.isfile(texfile) then
- logs.simple("using tex file %s.txt",name)
+ report("using tex file %s.txt",name)
local data = io.loaddata(texfile) or ""
if data ~= "" then
data = gsub(data,"([\n\r])\\input ([^ \n\r]+)", function(previous,subname)
@@ -150,7 +171,7 @@ function scripts.patterns.load(path,name,mnemonic,ignored)
local subfull = file.join(file.dirname(texfile),subname)
local subdata = io.loaddata(subfull) or ""
if subdata == "" then
- logs.simple("no subfile %s",subname)
+ report("no subfile %s",subname)
end
return previous .. subdata
end)
@@ -179,7 +200,7 @@ function scripts.patterns.load(path,name,mnemonic,ignored)
local line = splitdata[i]
if find(line,"%%") then
splitdata[i] = gsub(line,"%%.*$","")
- logs.simple("removing comment: %s",line)
+ report("removing comment: %s",line)
end
end
end
@@ -195,7 +216,7 @@ function scripts.patterns.load(path,name,mnemonic,ignored)
local line = splitdata[i]
if find(line,"\\") then
splitdata[i] = ""
- logs.simple("removing line with command: %s",line)
+ report("removing line with command: %s",line)
end
end
end
@@ -211,7 +232,7 @@ function scripts.patterns.load(path,name,mnemonic,ignored)
local ok = lpegmatch(validutf8,line)
if not ok then
splitdata[i] = ""
- logs.simple("removing line with invalid utf: %s",line)
+ report("removing line with invalid utf: %s",line)
end
end
-- check for commands being used in comments
@@ -235,7 +256,7 @@ function scripts.patterns.load(path,name,mnemonic,ignored)
else
local cdb = cd[b]
if not cdb then
- logs.simple("no entry in chardata for character %s (0x%04X)",char(b),b)
+ report("no entry in chardata for character %s (0x%04X)",char(b),b)
else
local ct = cd[b].category
if ct == "lu" or ct == "ll" then
@@ -243,7 +264,7 @@ function scripts.patterns.load(path,name,mnemonic,ignored)
elseif ct == "nd" then
-- number
else
- logs.simple("removing line with suspected utf character %s (0x%04X), category %s: %s",char(b),b,ct,line)
+ report("removing line with suspected utf character %s (0x%04X), category %s: %s",char(b),b,ct,line)
splitdata[i] = ""
break
end
@@ -256,7 +277,7 @@ function scripts.patterns.load(path,name,mnemonic,ignored)
usedpatterncharacters = check(splitpatternsnew,byte("."))
usedhyphenationcharacters = check(splithyphenationsnew,byte("-"))
for k, v in next, stripped do
- logs.simple("entries that contain character %s (0x%04X) have been omitted",char(k),k)
+ report("entries that contain character %s (0x%04X) have been omitted",char(k),k)
end
end
if okay then
@@ -287,11 +308,11 @@ function scripts.patterns.load(path,name,mnemonic,ignored)
for i=1,#what do
local line = what[i]
if p and lpegmatch(p,line) then
- logs.simple("discarding conflicting pattern: %s",line)
+ report("discarding conflicting pattern: %s",line)
else -- we can speed this up by testing for replacements in the string
local l = lpegmatch(r,line)
if l ~= line then
- logs.simple("sanitizing pattern: %s -> %s (for old patterns)",line,l)
+ report("sanitizing pattern: %s -> %s (for old patterns)",line,l)
end
result[#result+1] = l
end
@@ -313,7 +334,7 @@ function scripts.patterns.load(path,name,mnemonic,ignored)
-- discard
elseif used[line] then
-- discard
- logs.simple("discarding duplicate pattern: %s",line)
+ repo("discarding duplicate pattern: %s",line)
else
used[line] = true
collected[#collected+1] = line
@@ -327,7 +348,7 @@ function scripts.patterns.load(path,name,mnemonic,ignored)
splithyphenationsold = check(hyphenations,splithyphenationsold,hypfile)
end
if not okay then
- logs.simple("no valid file %s.*",name)
+ report("no valid file %s.*",name)
end
return okay, splitpatternsnew, splithyphenationsnew, splitpatternsold, splithyphenationsold, comment, stripset, usedpatterncharacters, usedhyphenationcharacters
end
@@ -335,7 +356,7 @@ end
function scripts.patterns.save(destination,mnemonic,name,patternsnew,hyphenationsnew,patternsold,hyphenationsold,comment,stripped,pused,hused,ignored)
local nofpatternsnew, nofhyphenationsnew = #patternsnew, #hyphenationsnew
local nofpatternsold, nofhyphenationsold = #patternsold, #hyphenationsold
- logs.simple("language %s has %s old and %s new patterns and %s old and %s new exceptions",mnemonic,nofpatternsold,nofpatternsnew,nofhyphenationsold,nofhyphenationsnew)
+ report("language %s has %s old and %s new patterns and %s old and %s new exceptions",mnemonic,nofpatternsold,nofpatternsnew,nofhyphenationsold,nofhyphenationsnew)
if mnemonic ~= "??" then
local pu = concat(table.sortedkeys(pused), " ")
local hu = concat(table.sortedkeys(hused), " ")
@@ -347,7 +368,7 @@ function scripts.patterns.save(destination,mnemonic,name,patternsnew,hyphenation
local topline = "% generated by mtxrun --script pattern --convert"
local banner = "% for comment and copyright, see " .. rmefile
- logs.simple("saving language data for %s",mnemonic)
+ report("saving language data for %s",mnemonic)
if not comment or comment == "" then comment = "% no comment" end
if not type(destination) == "string" then destination = "." end
@@ -426,12 +447,12 @@ function scripts.patterns.check()
for k, v in next, scripts.patterns.list do
local mnemonic, name, ignored = v[1], v[2], v[4]
if not only or only[mnemonic] then
- logs.simple("checking language %s, file %s", mnemonic, name)
+ report("checking language %s, file %s", mnemonic, name)
local okay = scripts.patterns.load(path,name,mnemonic,ignored)
if not okay then
- logs.simple("there are errors that need to be fixed")
+ report("there are errors that need to be fixed")
end
- logs.simple("")
+ report()
end
end
end
@@ -439,11 +460,11 @@ end
function scripts.patterns.convert()
local path = environment.argument("path") or "."
if path == "" then
- logs.simple("provide sourcepath using --path ")
+ report("provide sourcepath using --path ")
else
local destination = environment.argument("destination") or "."
if path == destination then
- logs.simple("source path and destination path should differ (use --path and/or --destination)")
+ resport("source path and destination path should differ (use --path and/or --destination)")
else
local files = environment.files
local only = false
@@ -453,36 +474,20 @@ function scripts.patterns.convert()
for k, v in next, scripts.patterns.list do
local mnemonic, name, ignored = v[1], v[2], v[4]
if not only or only[mnemonic] then
- logs.simple("converting language %s, file %s", mnemonic, name)
+ report("converting language %s, file %s", mnemonic, name)
local okay, patternsnew, hyphenationsnew, patternsold, hyphenationsold, comment, stripped, pused, hused = scripts.patterns.load(path,name,mnemonic,ignored)
if okay then
scripts.patterns.save(destination,mnemonic,name,patternsnew,hyphenationsnew,patternsold,hyphenationsold,comment,stripped,pused,hused,ignored)
else
- logs.simple("convertion aborted due to error(s)")
+ report("convertion aborted due to error(s)")
end
- logs.simple("")
+ report()
end
end
end
end
end
-logs.extendbanner("ConTeXt Pattern File Management 0.20")
-
-messages.help = [[
---convert generate context language files (mnemonic driven, if not given then all)
---check check pattern file (or those used by context when no file given)
---path source path where hyph-foo.tex files are stored
---destination destination path
-
-examples of usage:
-
-mtxrun --script pattern --check hyph-*.tex
-mtxrun --script pattern --check --path=c:/data/develop/svn-hyphen/trunk/hyph-utf8/tex/generic/hyph-utf8/patterns
-mtxrun --script pattern --convert --path=c:/data/develop/svn-hyphen/trunk/hyph-utf8/tex/generic/hyph-utf8/patterns/tex --destination=e:/tmp/patterns
-mtxrun --script pattern --convert --path=c:/data/develop/svn-hyphen/trunk/hyph-utf8/tex/generic/hyph-utf8/patterns/txt --destination=e:/tmp/patterns
-]]
-
if environment.argument("check") then
scripts.patterns.prepare()
scripts.patterns.check()
@@ -490,7 +495,7 @@ elseif environment.argument("convert") then
scripts.patterns.prepare()
scripts.patterns.convert()
else
- logs.help(messages.help)
+ application.help()
end
-- mtxrun --script pattern --check hyph-*.tex
diff --git a/scripts/context/lua/mtx-profile.lua b/scripts/context/lua/mtx-profile.lua
index d78e3457a..74e1d1538 100644
--- a/scripts/context/lua/mtx-profile.lua
+++ b/scripts/context/lua/mtx-profile.lua
@@ -11,6 +11,19 @@ if not modules then modules = { } end modules ['mtx-profile'] = {
local match, format, find = string.match, string.format, string.find
+local helpinfo = [[
+--analyze analyze lua calls
+--trace analyze tex calls
+]]
+
+local application = logs.application {
+ name = "mtx-cache",
+ banner = "ConTeXt MkIV LuaTeX Profiler 1.00",
+ helpinfo = helpinfo,
+}
+
+local report = application.report
+
scripts = scripts or { }
scripts.profiler = scripts.profiler or { }
@@ -54,7 +67,7 @@ function scripts.profiler.analyze(filename)
f:close()
print("")
local loaded = { }
- local sortedtable.sortedkeys(times)
+ sortedtable.sortedkeys(times)
for i=1,#sorted do
local filename = sorted[i]
local functions = times[filename]
@@ -154,17 +167,10 @@ end
--~ scripts.profiler.analyze("t:/manuals/mk/mk-fonts-profile.lua")
--~ scripts.profiler.analyze("t:/manuals/mk/mk-introduction-profile.lua")
-logs.extendbanner("ConTeXt MkIV LuaTeX Profiler 1.00")
-
-messages.help = [[
---analyze analyze lua calls
---trace analyze tex calls
-]]
-
if environment.argument("analyze") then
scripts.profiler.analyze(environment.files[1] or "luatex-profile.log")
elseif environment.argument("trace") then
scripts.profiler.analyze(environment.files[1] or "temp.log")
else
- logs.help(messages.help)
+ application.help()
end
diff --git a/scripts/context/lua/mtx-scite.lua b/scripts/context/lua/mtx-scite.lua
index 068e4ecf5..0ac09b017 100644
--- a/scripts/context/lua/mtx-scite.lua
+++ b/scripts/context/lua/mtx-scite.lua
@@ -9,6 +9,19 @@ if not modules then modules = { } end modules ['mtx-scite'] = {
-- todo: append to global properties else order of loading problem
-- linux problem ... files are under root protection so we need --install
+local helpinfo = [[
+--start [--verbose] start scite
+--test report what will happen
+]]
+
+local application = logs.application {
+ name = "mtx-scite",
+ banner = "Scite Startup Script 1.00",
+ helpinfo = helpinfo,
+}
+
+local report = application.report
+
scripts = scripts or { }
scripts.scite = scripts.scite or { }
@@ -42,11 +55,11 @@ function scripts.scite.start(indeed)
end
end
if not datapath or datapath == "" then
- logs.simple("invalid datapath, maybe you need to regenerate the file database")
+ report("invalid datapath, maybe you need to regenerate the file database")
return false
end
if not binpaths or #binpaths == 0 then
- logs.simple("invalid binpath")
+ report("invalid binpath")
return false
end
for i=1,#binpaths do
@@ -57,7 +70,7 @@ function scripts.scite.start(indeed)
end
end
if not fullname then
- logs.simple("unable to locate %s",workname)
+ report("unable to locate %s",workname)
return false
end
local properties = dir.glob(file.join(datapath,"*.properties"))
@@ -65,7 +78,7 @@ function scripts.scite.start(indeed)
local extrafont = resolvers.findfile(screenfont,"truetype font") or ""
local pragmafound = dir.glob(file.join(datapath,"pragma.properties"))
if userpath == "" then
- logs.simple("unable to figure out userpath")
+ report("unable to figure out userpath")
return false
end
local verbose = environment.argument("verbose")
@@ -120,47 +133,40 @@ function scripts.scite.start(indeed)
end
end
if not indeed or verbose then
- logs.simple("used signal: %s", usedsignal)
- logs.simple("data path : %s", datapath)
- logs.simple("full name : %s", fullname)
- logs.simple("user path : %s", userpath)
- logs.simple("extra font : %s", extrafont)
+ report("used signal: %s", usedsignal)
+ report("data path : %s", datapath)
+ report("full name : %s", fullname)
+ report("user path : %s", userpath)
+ report("extra font : %s", extrafont)
end
if #logdata > 0 then
- logs.simple("")
+ report("")
for k=1,#logdata do
local v = logdata[k]
- logs.simple(v[1],v[2])
+ report(v[1],v[2])
end
end
if indeed then
if #tobecopied > 0 then
- logs.simple("warning : copying updated files")
+ report("warning : copying updated files")
for i=1,#tobecopied do
local what = tobecopied[i]
- logs.simple("copying : '%s' => '%s'",what[1],what[2])
+ report("copying : '%s' => '%s'",what[1],what[2])
file.copy(what[1],what[2])
end
end
if propfiledone then
- logs.simple("saving : '%s'",userpropfile)
+ report("saving : '%s'",userpropfile)
io.savedata(fullpropfile,userpropdata)
end
os.launch(fullname)
end
end
-logs.extendbanner("Scite Startup Script 1.00")
-
-messages.help = [[
---start [--verbose] start scite
---test report what will happen
-]]
-
if environment.argument("start") then
scripts.scite.start(true)
elseif environment.argument("test") then
scripts.scite.start()
else
- logs.help(messages.help)
+ application.help()
end
diff --git a/scripts/context/lua/mtx-server-ctx-fonttest.lua b/scripts/context/lua/mtx-server-ctx-fonttest.lua
index d2f11ca95..9bea14561 100644
--- a/scripts/context/lua/mtx-server-ctx-fonttest.lua
+++ b/scripts/context/lua/mtx-server-ctx-fonttest.lua
@@ -15,6 +15,8 @@ dofile(resolvers.findfile("font-mis.lua","tex"))
local format, gsub, concat, match, find = string.format, string.gsub, table.concat, string.match, string.find
+local report = logs.new("ctx-fonttest")
+
local sample_line = "This is a sample line!"
local tempname = "mtx-server-ctx-fonttest-temp"
local temppath = caches.setfirstwritablefile("temp","mtx-server-ctx-fonttest")
@@ -150,20 +152,20 @@ local cache = { }
local function showfeatures(f)
if f then
- logs.simple("processing font '%s'",f)
+ report("processing font '%s'",f)
local features = cache[f]
if features == nil then
features = fonts.get_features(resolvers.findfile(f))
if not features then
- logs.simple("building cache for '%s'",f)
+ report("building cache for '%s'",f)
io.savedata(file.join(temppath,file.addsuffix(tempname,"tex")),format(process_templates.cache,f,f))
os.execute(format("mtxrun --path=%s --script context --once --batchmode %s",temppath,tempname))
features = fonts.get_features(f)
end
cache[f] = features or false
- logs.simple("caching info of '%s'",f)
+ report("caching info of '%s'",f)
else
- logs.simple("using cached info of '%s'",f)
+ report("using cached info of '%s'",f)
end
if features then
local scr, lan, fea, rev = { }, { }, { }, { }
@@ -294,7 +296,7 @@ local function get_specification(name)
end
local function edit_font(currentfont,detail,tempname)
- logs.simple("entering edit mode for '%s'",currentfont)
+ report("entering edit mode for '%s'",currentfont)
local specification = get_specification(currentfont)
if specification then
local htmldata = showfeatures(specification.filename)
@@ -374,7 +376,7 @@ local function process_font(currentfont,detail) -- maybe just fontname
end
local sample = string.strip(detail.sampletext or "")
if sample == "" then sample = sample_line end
- logs.simple("sample text: %s",sample)
+ report("sample text: %s",sample)
io.savedata(file.join(temppath,file.addsuffix(tempname,"tex")),format(variant,concat(features,","),currentfont,sample))
os.execute(format("mtxrun --path=%s --script context --once --batchmode %s",temppath,tempname))
return edit_font(currentfont,detail,tempname)
@@ -497,7 +499,7 @@ local function loadbase()
if storage == "" then
storage = { }
else
- logs.simple("loading '%s'",datafile)
+ report("loading '%s'",datafile)
storage = loadstring(storage)
storage = (storage and storage()) or { }
end
@@ -527,14 +529,14 @@ end
local function savebase(storage,name)
local datafile = file.join(basepath,basename)
- logs.simple("saving '%s' in '%s'",name or "data",datafile)
+ report("saving '%s' in '%s'",name or "data",datafile)
io.savedata(datafile,table.serialize(storage,true))
end
local function deletestored(detail,currentfont,name)
local storage = loadbase()
if storage and name and storage[name] then
- logs.simple("deleting '%s' from base",name)
+ report("deleting '%s' from base",name)
storage[name] = nil
savebase(storage)
end
@@ -610,7 +612,7 @@ end
function extras.reload()
local command = "mtxrun --script font --reload"
- logs.simple("run command: %s",command)
+ report("run command: %s",command)
os.execute(command)
return do_extras()
end
@@ -679,7 +681,7 @@ function doit(configuration,filename,hashed)
variables.javascripts = ""
variables.javascriptinit = ""
- logs.simple("action: %s",action or "no action")
+ report("action: %s",action or "no action")
local result
@@ -722,7 +724,7 @@ function doit(configuration,filename,hashed)
result = { content = lmx.convert('context-fonttest.lmx',false,variables) }
- logs.simple("time spent on page: %0.03f seconds",os.clock()-start)
+ report("time spent on page: %0.03f seconds",os.clock()-start)
return result
diff --git a/scripts/context/lua/mtx-server-ctx-help.lua b/scripts/context/lua/mtx-server-ctx-help.lua
index 5ee0c7d43..eb07a244b 100644
--- a/scripts/context/lua/mtx-server-ctx-help.lua
+++ b/scripts/context/lua/mtx-server-ctx-help.lua
@@ -17,6 +17,8 @@ dofile(resolvers.findfile("trac-lmx.lua","tex"))
local format = string.format
local concat = table.concat
+local report = logs.new("ctx-help")
+
-- -- -- make this a module: cont-xx.lua
document = document or { }
@@ -591,7 +593,7 @@ local function doit(configuration,filename,hashed)
lastmode = tonumber(detail.mode or lastmode) or 1
if lastinterface then
- logs.simple("checking interface: %s",lastinterface)
+ report("checking interface: %s",lastinterface)
document.setups.load(format("cont-%s.xml",lastinterface))
end
@@ -657,7 +659,7 @@ local function doit(configuration,filename,hashed)
local content = lmx.convert('context-help.lmx',false,variables)
- logs.simple("time spent on page: %0.03f seconds",os.clock()-start)
+ report("time spent on page: %0.03f seconds",os.clock()-start)
return { content = content }
end
diff --git a/scripts/context/lua/mtx-server.lua b/scripts/context/lua/mtx-server.lua
index 4fe0a6ac8..4547877b5 100644
--- a/scripts/context/lua/mtx-server.lua
+++ b/scripts/context/lua/mtx-server.lua
@@ -6,6 +6,23 @@ if not modules then modules = { } end modules ['mtx-server'] = {
license = "see context related readme files"
}
+local helpinfo = [[
+--start start server
+--port port to listen to
+--root server root
+--scripts scripts sub path
+--index index file
+--auto start on own path
+]]
+
+local application = logs.application {
+ name = "mtx-server",
+ banner = "Simple Webserver For Helpers 0.10",
+ helpinfo = helpinfo,
+}
+
+local report = application.report
+
scripts = scripts or { }
scripts.webserver = scripts.webserver or { }
@@ -127,7 +144,7 @@ local handlers = { }
local function errormessage(client,configuration,n)
local data = format("<head><title>%s %s</title></head><html><h2>%s %s</h2></html>",n,messages[n],n,messages[n])
- logs.simple("handling error %s: %s",n,messages[n])
+ report("handling error %s: %s",n,messages[n])
handlers.generic(client,configuration,data,nil,true)
end
@@ -136,7 +153,7 @@ local validpaths, registered = { }, { }
function scripts.webserver.registerpath(name)
if not registered[name] then
local cleanname = string.gsub(name,"%.%.","deleted-parent")
- logs.simple("registering path '%s'",cleanname)
+ report("registering path '%s'",cleanname)
validpaths[#validpaths+1] = cleanname
registered[name] = true
end
@@ -145,7 +162,7 @@ end
function handlers.generic(client,configuration,data,suffix,iscontent)
if not iscontent then
local name = data
- logs.simple("requested file '%s'",name)
+ report("requested file '%s'",name)
local fullname = file.join(configuration.root,name)
data = io.loaddata(fullname) or ""
if data == "" then
@@ -153,12 +170,12 @@ function handlers.generic(client,configuration,data,suffix,iscontent)
local fullname = file.join(validpaths[n],name)
data = io.loaddata(fullname) or ""
if data ~= "" then
- logs.simple("sending generic file '%s'",fullname)
+ report("sending generic file '%s'",fullname)
break
end
end
else
- logs.simple("sending generic file '%s'",fullname)
+ report("sending generic file '%s'",fullname)
end
end
if data and data ~= "" then
@@ -192,18 +209,18 @@ function handlers.lua(client,configuration,filename,suffix,iscontent,hashed) --
-- todo: split url in components, see l-url; rather trivial
local result, keep = loaded[filename], false
if result then
- logs.simple("reusing script: %s",filename)
+ report("reusing script: %s",filename)
else
- logs.simple("locating script: %s",filename)
+ report("locating script: %s",filename)
if lfs.isfile(filename) then
- logs.simple("loading script: %s",filename)
+ report("loading script: %s",filename)
result = loadfile(filename)
- logs.simple("return type: %s",type(result))
+ report("return type: %s",type(result))
if result and type(result) == "function" then
-- result() should return a table { [type=,] [length=,] content= }, function or string
result, keep = result()
if keep then
- logs.simple("saving script: %s",type(result))
+ report("saving script: %s",type(result))
loaded[filename] = result
end
end
@@ -277,11 +294,11 @@ function scripts.webserver.run(configuration)
configuration.scripts = dir.expandname(file.join(configuration.root or ".",configuration.scripts or "."))
end
-- so far for checks
- logs.simple("running at port: %s",configuration.port)
- logs.simple("document root: %s",configuration.root or resolvers.ownpath)
- logs.simple("main index file: %s",configuration.index)
- logs.simple("scripts subpath: %s",configuration.scripts)
- logs.simple("context services: http://localhost:%s/mtx-server-ctx-startup.lua",configuration.port)
+ report("running at port: %s",configuration.port)
+ report("document root: %s",configuration.root or resolvers.ownpath)
+ report("main index file: %s",configuration.index)
+ report("scripts subpath: %s",configuration.scripts)
+ report("context services: http://localhost:%s/mtx-server-ctx-startup.lua",configuration.port)
local server = assert(socket.bind("*", configuration.port))
--~ local reading = { server }
while true do -- no multiple clients
@@ -295,7 +312,7 @@ function scripts.webserver.run(configuration)
errormessage(client,configuration,404)
else
local from = client:getpeername()
- logs.simple("request from: %s",tostring(from))
+ report("request from: %s",tostring(from))
local fullurl = request:match("GET (.+) HTTP/.*$") -- todo: more clever
fullurl = socket.url.unescape(fullurl)
local hashed = url.hashed(fullurl)
@@ -304,18 +321,18 @@ function scripts.webserver.run(configuration)
--~ table.print(hashed)
if filename then
filename = socket.url.unescape(filename)
- logs.simple("requested action: %s",filename)
+ report("requested action: %s",filename)
if filename:find("%.%.") then
filename = nil -- invalid path
end
if filename == nil or filename == "" or filename == "/" then
filename = configuration.index
- logs.simple("invalid filename, forcing: %s",filename)
+ report("invalid filename, forcing: %s",filename)
end
local suffix = file.extname(filename)
local action = handlers[suffix] or handlers.generic
if action then
- logs.simple("performing action: %s",filename)
+ report("performing action: %s",filename)
action(client,configuration,filename,suffix,false,hashed) -- filename and no content
else
errormessage(client,configuration,404)
@@ -325,21 +342,10 @@ function scripts.webserver.run(configuration)
end
end
client:close()
- logs.simple("time spent with client: %0.03f seconds",os.clock()-start)
+ report("time spent with client: %0.03f seconds",os.clock()-start)
end
end
-logs.extendbanner("Simple Webserver For Helpers 0.10")
-
-messages.help = [[
---start start server
---port port to listen to
---root server root
---scripts scripts sub path
---index index file
---auto start on own path
-]]
-
if environment.argument("auto") then
local path = resolvers.findfile("mtx-server.lua") or "."
scripts.webserver.run {
@@ -355,7 +361,7 @@ elseif environment.argument("start") then
scripts = environment.argument("scripts"),
}
else
- logs.help(messages.help)
+ application.help()
end
diff --git a/scripts/context/lua/mtx-texworks.lua b/scripts/context/lua/mtx-texworks.lua
index 38a162c0e..33e56df46 100644
--- a/scripts/context/lua/mtx-texworks.lua
+++ b/scripts/context/lua/mtx-texworks.lua
@@ -6,6 +6,19 @@ if not modules then modules = { } end modules ['mtx-texworks'] = {
license = "see context related readme files"
}
+local helpinfo = [[
+--start [--verbose] start texworks
+--test report what will happen
+]]
+
+local application = logs.application {
+ name = "mtx-texworks",
+ banner = "TeXworks Startup Script 1.00",
+ helpinfo = helpinfo,
+}
+
+local report = application.report
+
scripts = scripts or { }
scripts.texworks = scripts.texworks or { }
@@ -49,11 +62,11 @@ function scripts.texworks.start(indeed)
end
end
if datapath == "" then
- logs.simple("invalid datapath, maybe you need to regenerate the file database")
+ report("invalid datapath, maybe you need to regenerate the file database")
return false
end
if not binpaths or #binpaths == 0 then
- logs.simple("invalid binpath")
+ report("invalid binpath")
return false
end
for i=1,#binpaths do
@@ -64,7 +77,7 @@ function scripts.texworks.start(indeed)
end
end
if not fullname then
- logs.simple("unable to locate %s",workname)
+ report("unable to locate %s",workname)
return false
end
for i=1,#texworkspaths do
@@ -73,27 +86,20 @@ function scripts.texworks.start(indeed)
os.setenv("TW_INIPATH",datapath)
os.setenv("TW_LIBPATH",datapath)
if not indeed or environment.argument("verbose") then
- logs.simple("used signal: %s", usedsignal)
- logs.simple("data path : %s", datapath)
- logs.simple("full name : %s", fullname)
- logs.simple("set paths : TW_INIPATH TW_LIBPATH")
+ report("used signal: %s", usedsignal)
+ report("data path : %s", datapath)
+ report("full name : %s", fullname)
+ report("set paths : TW_INIPATH TW_LIBPATH")
end
if indeed then
os.launch(fullname)
end
end
-logs.extendbanner("TeXworks Startup Script 1.00")
-
-messages.help = [[
---start [--verbose] start texworks
---test report what will happen
-]]
-
if environment.argument("start") then
scripts.texworks.start(true)
elseif environment.argument("test") then
scripts.texworks.start()
else
- logs.help(messages.help)
+ application.help()
end
diff --git a/scripts/context/lua/mtx-timing.lua b/scripts/context/lua/mtx-timing.lua
index ee658f461..03100e991 100644
--- a/scripts/context/lua/mtx-timing.lua
+++ b/scripts/context/lua/mtx-timing.lua
@@ -8,6 +8,20 @@ if not modules then modules = { } end modules ['mtx-timing'] = {
local format, gsub, concat = string.format, string.gsub, table.concat
+local helpinfo = [[
+--xhtml make xhtml file
+--launch launch after conversion
+--remove remove after launching
+]]
+
+local application = logs.application {
+ name = "mtx-timing",
+ banner = "ConTeXt Timing Tools 0.10",
+ helpinfo = helpinfo,
+}
+
+local report = application.report
+
dofile(resolvers.findfile("trac-tim.lua","tex"))
dofile(resolvers.findfile("trac-lmx.lua","tex"))
@@ -57,6 +71,8 @@ local directrun = true
local what = { "parameters", "nodes" }
+plugins = plugins or { } -- brrr, will become moduledata as well
+
function plugins.progress.make_svg(filename,other)
local metadata, menudata, c = { }, { }, 0
metadata[#metadata+1] = 'outputformat := "svg" ;'
@@ -76,7 +92,7 @@ function plugins.progress.make_svg(filename,other)
if directrun then
dofile(resolvers.findfile("mlib-run.lua","tex"))
commands = commands or { }
- commands.writestatus = logs.report
+ commands.writestatus = report
local result = metapost.directrun("metafun","timing data","svg",true,metadata)
return menudata, result
else
@@ -167,9 +183,9 @@ scripts.timings = scripts.timings or { }
function scripts.timings.xhtml(filename)
if filename == "" then
- logs.simple("provide filename")
+ report("provide filename")
elseif not plugins.progress.valid_file(filename) then
- logs.simple("first run context again with the --timing option")
+ report("first run context again with the --timing option")
else
local basename = file.removesuffix(filename)
local launch = environment.argument("launch")
@@ -178,16 +194,8 @@ function scripts.timings.xhtml(filename)
end
end
-logs.extendbanner("ConTeXt Timing Tools 0.10",true)
-
-messages.help = [[
---xhtml make xhtml file
---launch launch after conversion
---remove remove after launching
-]]
-
if environment.argument("xhtml") then
scripts.timings.xhtml(environment.files[1] or "")
else
- logs.help(messages.help)
+ application.help()
end
diff --git a/scripts/context/lua/mtx-tools.lua b/scripts/context/lua/mtx-tools.lua
index 92c13886a..905b3aa85 100644
--- a/scripts/context/lua/mtx-tools.lua
+++ b/scripts/context/lua/mtx-tools.lua
@@ -8,6 +8,33 @@ if not modules then modules = { } end modules ['mtx-tools'] = {
local find, format, sub, rep, gsub, lower = string.find, string.format, string.sub, string.rep, string.gsub, string.lower
+local helpinfo = [[
+--disarmutfbomb remove utf bomb if present
+ --force remove indeed
+
+--dirtoxml glob directory into xml
+ --pattern glob pattern (default: *)
+ --url url attribute (no processing)
+ --root the root of the globbed path (default: .)
+ --output output filename (console by default)
+ --recurse recurse into subdirecories
+ --stripname take pathpart of given pattern
+ --longname set name attributes to full path name
+
+--downcase
+ --pattern glob pattern (default: *)
+ --recurse recurse into subdirecories
+ --force downcase indeed
+]]
+
+local application = logs.application {
+ name = "mtx-tools",
+ banner = "Some File Related Goodies 1.01",
+ helpinfo = helpinfo,
+}
+
+local report = application.report
+
scripts = scripts or { }
scripts.tools = scripts.tools or { }
@@ -23,24 +50,24 @@ function scripts.tools.disarmutfbomb()
if not data then
-- just skip
elseif find(data,bomb_1) then
- logs.simple("file '%s' has a 2 character utf bomb",name)
+ report("file '%s' has a 2 character utf bomb",name)
if force then
io.savedata(name,(gsub(data,bomb_1,"")))
end
done = true
elseif find(data,bomb_2) then
- logs.simple("file '%s' has a 3 character utf bomb",name)
+ report("file '%s' has a 3 character utf bomb",name)
if force then
io.savedata(name,(gsub(data,bomb_2,"")))
end
done = true
else
- -- logs.simple("file '%s' has no utf bomb",name)
+ -- report("file '%s' has no utf bomb",name)
end
end
end
if done and not force then
- logs.simple("use --force to do a real disarming")
+ report("use --force to do a real disarming")
end
end
@@ -63,12 +90,12 @@ function scripts.tools.downcase()
end)
if n > 0 then
if force then
- logs.simple("%s files renamed",n)
+ report("%s files renamed",n)
else
- logs.simple("use --force to do a real rename (%s files involved)",n)
+ report("use --force to do a real rename (%s files involved)",n)
end
else
- logs.simple("nothing to do")
+ report("nothing to do")
end
end
@@ -111,7 +138,7 @@ function scripts.tools.dirtoxml()
end
if not pattern or pattern == "" then
- logs.report('provide --pattern=')
+ report('provide --pattern=')
return
end
@@ -144,27 +171,6 @@ function scripts.tools.dirtoxml()
end
-logs.extendbanner("Some File Related Goodies 1.01")
-
-messages.help = [[
---disarmutfbomb remove utf bomb if present
- --force remove indeed
-
---dirtoxml glob directory into xml
- --pattern glob pattern (default: *)
- --url url attribute (no processing)
- --root the root of the globbed path (default: .)
- --output output filename (console by default)
- --recurse recurse into subdirecories
- --stripname take pathpart of given pattern
- --longname set name attributes to full path name
-
---downcase
- --pattern glob pattern (default: *)
- --recurse recurse into subdirecories
- --force downcase indeed
-]]
-
if environment.argument("disarmutfbomb") then
scripts.tools.disarmutfbomb()
elseif environment.argument("dirtoxml") then
@@ -172,5 +178,5 @@ elseif environment.argument("dirtoxml") then
elseif environment.argument("downcase") then
scripts.tools.downcase()
else
- logs.help(messages.help)
+ application.help()
end
diff --git a/scripts/context/lua/mtx-unzip.lua b/scripts/context/lua/mtx-unzip.lua
index 85a4b9e7b..645863426 100644
--- a/scripts/context/lua/mtx-unzip.lua
+++ b/scripts/context/lua/mtx-unzip.lua
@@ -10,21 +10,23 @@ if not modules then modules = { } end modules ['mtx-unzip'] = {
local format = string.format
-logs.extendbanner("Simple Unzipper 0.10")
-
-messages.help = [[
+local helpinfo = [[
--list list files in archive
--junk flatten unzipped directory structure
--extract extract files
]]
+local application = logs.application {
+ name = "mtx-unzip",
+ banner = "Simple Unzipper 0.10",
+ helpinfo = helpinfo,
+}
+
+local report = application.report
+
scripts = scripts or { }
scripts.unzipper = scripts.unzipper or { }
-function scripts.unzipper.help()
- logs.help(messages.help)
-end
-
function scripts.unzipper.opened()
local filename = environment.files[1]
if filename and filename ~= "" then
@@ -34,7 +36,7 @@ function scripts.unzipper.opened()
return zipfile
end
end
- logs.report("unzip", "no zip file: " .. filename)
+ report("no zip file: %s",filename)
return false
end
@@ -104,11 +106,11 @@ function scripts.unzipper.extract()
end
if environment.arguments["h"] or environment.arguments["help"] then
- scripts.unzipper.help()
+ application.help()
elseif environment.arguments["l"] or environment.arguments["list"] then
scripts.unzipper.list(zipfile)
elseif environment.files[1] then -- implicit --extract
scripts.unzipper.extract(zipfile)
else
- scripts.unzipper.help()
+ application.help()
end
diff --git a/scripts/context/lua/mtx-update.lua b/scripts/context/lua/mtx-update.lua
index 708565910..750c74886 100644
--- a/scripts/context/lua/mtx-update.lua
+++ b/scripts/context/lua/mtx-update.lua
@@ -11,6 +11,32 @@ if not modules then modules = { } end modules ['mtx-update'] = {
-- Together with Arthur Reutenauer she made sure that it worked well on all
-- platforms that matter.
+local helpinfo = [[
+--platform=string platform (windows, linux, linux-64, osx-intel, osx-ppc, linux-ppc)
+--server=string repository url (rsync://contextgarden.net)
+--module=string repository url (minimals)
+--repository=string specify version (current, experimental)
+--context=string specify version (current, latest, beta, yyyy.mm.dd)
+--rsync=string rsync binary (rsync)
+--texroot=string installation directory (not guessed for the moment)
+--engine=string tex engine (luatex, pdftex, xetex)
+--extras=string extra modules (can be list or 'all')
+--goodies=string extra binaries (like scite and texworks)
+--force instead of a dryrun, do the real thing
+--update update minimal tree
+--make also make formats and generate file databases
+--keep don't delete unused or obsolete files
+--state update tree using saved state
+]]
+
+local application = logs.application {
+ name = "mtx-update",
+ banner = "ConTeXt Minimals Updater 0.22",
+ helpinfo = helpinfo,
+}
+
+local report = application.report
+
local format, concat, gmatch, gsub = string.format, table.concat, string.gmatch, string.gsub
scripts = scripts or { }
@@ -159,10 +185,10 @@ function scripts.update.run(str)
-- (texlua sets luatex as the engine, we need to reset that or to fix texexec :)
os.setenv("engine",nil)
if environment.argument("force") then
- logs.report("run", str)
+ report("run, %s",str)
os.execute(str)
else
- logs.report("dry run", str)
+ report("dry run, %s",str)
end
end
@@ -176,7 +202,7 @@ end
function scripts.update.synchronize()
- logs.report("update","start")
+ report("update, start")
local texroot = scripts.update.fullpath(states.get("paths.root"))
local engines = states.get('engines') or { }
@@ -350,7 +376,7 @@ function scripts.update.synchronize()
deleteflags = states.get("rsync.flags.delete")
end
command = format("%s %s %s %s %s'%s' '%s'", bin, normalflags, deleteflags, dryrunflags, url, archives, destination)
- --logs.report("mtx update", format("running command: %s",command))
+ -- report("running command: %s",command)
if not fetched[command] then
scripts.update.run(command,true)
fetched[command] = command
@@ -370,7 +396,7 @@ function scripts.update.synchronize()
else
command = format("%s -tgo --chmod=a+x %s/texmf-context/scripts/context/lua/%s.lua %s/texmf-%s/bin/%s", bin, texroot, script, texroot, platform, script)
end
- logs.report("mtx update", format("updating %s for %s: %s", script, platform, command))
+ report("updating %s for %s: %s", script, platform, command)
scripts.update.run(command)
end
end
@@ -382,10 +408,10 @@ function scripts.update.synchronize()
end
else
- logs.report("mtx update", format("no valid texroot: %s",texroot))
+ report("no valid texroot: %s",texroot)
end
if not force then
- logs.report("update", "use --force to really update files")
+ report("use --force to really update files")
end
resolvers.load_tree(texroot) -- else we operate in the wrong tree
@@ -395,7 +421,7 @@ function scripts.update.synchronize()
-- update filename database for luatex
scripts.update.run(format('mtxrun --tree="%s" --generate',texroot))
- logs.report("update","done")
+ report("update, done")
end
function table.fromhash(t)
@@ -409,7 +435,7 @@ end
-- make the ConTeXt formats
function scripts.update.make()
- logs.report("make","start")
+ report("make, start")
local force = environment.argument("force")
local texroot = scripts.update.fullpath(states.get("paths.root"))
@@ -451,33 +477,13 @@ function scripts.update.make()
scripts.update.run(format('mtxrun --tree="%s" --script texexec --make --all %s',texroot,formatlist))
end
if not force then
- logs.report("make", "use --force to really make formats")
+ report("make, use --force to really make formats")
end
scripts.update.run(format('mtxrun --tree="%s" --direct mktexlsr',texroot))
scripts.update.run(format('mtxrun --tree="%s" --generate',texroot))
- logs.report("make","done")
+ report("make, done")
end
-logs.extendbanner("ConTeXt Minimals Updater 0.21")
-
-messages.help = [[
---platform=string platform (windows, linux, linux-64, osx-intel, osx-ppc, linux-ppc)
---server=string repository url (rsync://contextgarden.net)
---module=string repository url (minimals)
---repository=string specify version (current, experimental)
---context=string specify version (current, latest, beta, yyyy.mm.dd)
---rsync=string rsync binary (rsync)
---texroot=string installation directory (not guessed for the moment)
---engine=string tex engine (luatex, pdftex, xetex)
---extras=string extra modules (can be list or 'all')
---goodies=string extra binaries (like scite and texworks)
---force instead of a dryrun, do the real thing
---update update minimal tree
---make also make formats and generate file databases
---keep don't delete unused or obsolete files
---state update tree using saved state
-]]
-
scripts.savestate = true
if scripts.savestate then
@@ -544,7 +550,8 @@ if scripts.savestate then
states.set("goodies." .. r, true)
end
- logs.report("state","loaded")
+ report("state, loaded")
+ report()
end
@@ -562,7 +569,7 @@ if environment.argument("update") then
elseif environment.argument("make") then
scripts.update.make()
else
- logs.help(messages.help)
+ application.help()
end
if scripts.savestate then
@@ -570,6 +577,6 @@ if scripts.savestate then
states.set("info.runtime",tonumber(statistics.elapsedtime(states)))
if environment.argument("force") then
states.save()
- logs.report("state","saved")
+ report("state","saved")
end
end
diff --git a/scripts/context/lua/mtx-watch.lua b/scripts/context/lua/mtx-watch.lua
index 617d73f90..5bd0ad5f4 100644
--- a/scripts/context/lua/mtx-watch.lua
+++ b/scripts/context/lua/mtx-watch.lua
@@ -6,6 +6,25 @@ if not modules then modules = { } end modules ['mtx-watch'] = {
license = "see context related readme files"
}
+local helpinfo = [[
+--logpath optional path for log files
+--watch watch given path [--delay]
+--pipe use pipe instead of execute
+--delay delay between sweeps
+--automachine replace /machine/ in path /<servername>/
+--collect condense log files
+--cleanup=delay remove files in given path [--force]
+--showlog show log data
+]]
+
+local application = logs.application {
+ name = "mtx-watch",
+ banner = "ConTeXt Request Watchdog 1.00",
+ helpinfo = helpinfo,
+}
+
+local report = application.report
+
scripts = scripts or { }
scripts.watch = scripts.watch or { }
@@ -92,7 +111,7 @@ function scripts.watch.watch()
end
end
for i=1,#paths do
- logs.report("watch", "watching path ".. paths[i])
+ report("watching path %s",paths[i])
end
local function process()
local done = false
@@ -107,7 +126,7 @@ function scripts.watch.watch()
local ok, joblog = pcall(dofile,name)
if ok and joblog then
if joblog.status == "processing" then
- logs.report("watch",format("aborted job, %s added to queue",name))
+ report("aborted job, %s added to queue",name)
joblog.status = "queued"
io.savedata(name, table.serialize(joblog,true))
elseif joblog.status == "queued" then
@@ -124,7 +143,7 @@ function scripts.watch.watch()
joblog.status = "processing"
joblog.runtime = clock()
io.savedata(name, table.serialize(joblog,true))
- logs.report("watch",format("running: %s", command))
+ report("running: %s", command)
local newpath = file.dirname(name)
io.flush()
local result = ""
@@ -141,7 +160,7 @@ function scripts.watch.watch()
scripts.watch.save_exa_modes(joblog,ctmname)
if pipe then result = os.resultof(command) else result = os.spawn(command) end
end
- logs.report("watch",format("return value: %s", result))
+ report("return value: %s", result)
done = true
local path, base = replacements.outputpath, file.basename(replacements.filename)
joblog.runtime = clock() - joblog.runtime
@@ -162,7 +181,7 @@ function scripts.watch.watch()
if logpath and logpath ~= "" then
local name = file.join(logpath,os.uuid() .. ".lua")
io.savedata(name, table.serialize(joblog,true))
- logs.report("watch", "saving joblog in " .. name)
+ report("saving joblog in %s",name)
end
end
end
@@ -175,7 +194,7 @@ function scripts.watch.watch()
--~ if not done then
--~ n = n + 1
--~ if n >= 10 then
---~ logs.report("watch", format("run time: %i seconds, memory usage: %0.3g MB", difftime(time(),start), (status.luastate_bytes/1024)/1000))
+--~ report("run time: %i seconds, memory usage: %0.3g MB", difftime(time(),start), (status.luastate_bytes/1024)/1000)
--~ n = 0
--~ end
--~ os.sleep(delay)
@@ -187,7 +206,7 @@ function scripts.watch.watch()
if not done then
n = n + 1
if n >= 10 then
- logs.report("watch", format("run time: %i seconds, memory usage: %0.3g MB", difftime(time(),start), (status.luastate_bytes/1024)/1000))
+ report("run time: %i seconds, memory usage: %0.3g MB", difftime(time(),start), (status.luastate_bytes/1024)/1000)
n = 0
end
local ttime = 0
@@ -222,7 +241,7 @@ function scripts.watch.watch()
local filetime = lfs.attributes(name,"modification")
local delta = difftime(currenttime,filetime)
if delta > cleanupdelay then
- -- logs.report("watch",format("cleaning up '%s'",name))
+ -- report("cleaning up '%s'",name)
os.remove(name)
end
end
@@ -248,7 +267,7 @@ function scripts.watch.watch()
end
end
else
- logs.report("watch", "no paths to watch")
+ report("no paths to watch")
end
end
@@ -282,7 +301,7 @@ function scripts.watch.save_logs(collection,path) -- play safe
local check = dofile(filename)
for k,v in next, check do
if not collection[k] then
- logs.error("watch", "error in saving file")
+ report("error in saving file")
os.remove(filename)
return false
end
@@ -326,7 +345,7 @@ function scripts.watch.show_logs(path) -- removes duplicates
local v = sorted[k]
local c = collection[v]
local f, s, r, n = c.filename or "?", c.status or "?", c.runtime or 0, c.size or 0
- logs.report("watch", format("%s %s %3i %8i %s",string.padd(f,max," "),string.padd(s,10," "),r,n,v))
+ report("%s %s %3i %8i %s",string.padd(f,max," "),string.padd(s,10," "),r,n,v)
end
end
@@ -335,11 +354,11 @@ function scripts.watch.cleanup_stale_files() -- removes duplicates
local delay = tonumber(environment.argument("cleanup"))
local force = environment.argument("force")
if not path or path == "." then
- logs.report("watch","provide qualified path")
+ report("provide qualified path")
elseif not delay then
- logs.report("watch","missing --cleanup=delay")
+ report("missing --cleanup=delay")
else
- logs.report("watch","dryrun, use --force for real cleanup")
+ report("dryrun, use --force for real cleanup")
local files = dir.glob(file.join(path,"*"))
local rtime = time()
for i=1,#files do
@@ -347,7 +366,7 @@ function scripts.watch.cleanup_stale_files() -- removes duplicates
local mtime = lfs.attributes(name,"modification")
local delta = difftime(rtime,mtime)
if delta > delay then
- logs.report("watch",format("cleaning up '%s'",name))
+ report("cleaning up '%s'",name)
if force then
os.remove(name)
end
@@ -356,19 +375,6 @@ function scripts.watch.cleanup_stale_files() -- removes duplicates
end
end
-logs.extendbanner("ConTeXt Request Watchdog 1.00")
-
-messages.help = [[
---logpath optional path for log files
---watch watch given path [--delay]
---pipe use pipe instead of execute
---delay delay between sweeps
---automachine replace /machine/ in path /<servername>/
---collect condense log files
---cleanup=delay remove files in given path [--force]
---showlog show log data
-]]
-
if environment.argument("watch") then
scripts.watch.watch()
elseif environment.argument("collect") then
@@ -378,5 +384,5 @@ elseif environment.argument("cleanup") then
elseif environment.argument("showlog") then
scripts.watch.show_logs()
else
- logs.help(messages.help)
+ application.help()
end
diff --git a/scripts/context/lua/mtxrun.lua b/scripts/context/lua/mtxrun.lua
index 31d7d9b0f..afc472d1c 100644
--- a/scripts/context/lua/mtxrun.lua
+++ b/scripts/context/lua/mtxrun.lua
@@ -8,7 +8,6 @@ if not modules then modules = { } end modules ['mtxrun'] = {
license = "see context related readme files"
}
-
-- one can make a stub:
--
-- #!/bin/sh
@@ -132,11 +131,7 @@ local simple_escapes = {
}
function string.escapedpattern(str,simple)
- if simple then
- return (gsub(str,".",simple_escapes))
- else
- return (gsub(str,".",patterns_escapes))
- end
+ return (gsub(str,".",simple and simple_escapes or patterns_escapes))
end
function string.topattern(str,lowercase,strict)
@@ -556,11 +551,7 @@ local p = Cs((S("-.+*%()[]") / patterns_escapes + anything)^0)
local s = Cs((S("-.+*%()[]") / simple_escapes + anything)^0)
function string.escapedpattern(str,simple)
- if simple then
- return match(s,str)
- else
- return match(p,str)
- end
+ return match(simple and s or p,str)
end
-- utf extensies
@@ -3826,7 +3817,7 @@ local type, next = type, next
utilities = utilities or {}
utilities.merger = utilities.merger or { } -- maybe mergers
-utilities.report = utilities.report or print
+utilities.report = logs and logs.new("system") or print
local merger = utilities.merger
@@ -3964,7 +3955,7 @@ if not modules then modules = { } end modules ['util-lua'] = {
utilities = utilities or {}
utilities.lua = utilities.lua or { }
-utilities.report = utilities.report or print
+utilities.report = logs and logs.new("system") or print
function utilities.lua.compile(luafile,lucfile,cleanup,strip) -- defaults: cleanup=false strip=true
utilities.report("lua: compiling %s into %s",luafile,lucfile)
@@ -4577,19 +4568,21 @@ function statistics.show(reporter)
end
end
-
-local template, nn = nil, 0 -- we only calcute it once
+local template, report_statistics, nn = nil, nil, 0 -- we only calcute it once
function statistics.showjobstat(tag,data,n)
- if type(data) == "table" then
+ if not logs then
+ -- sorry
+ elseif type(data) == "table" then
for i=1,#data do
statistics.showjobstat(tag,data[i],n)
end
else
if not template or n > nn then
- template, n = format("%%-%ss: %%-%ss - %%s",15,n), nn
+ template, n = format("%%-%ss - %%s",n), nn
+ report_statistics = logs.new("mkiv lua stats")
end
- write_nl(format(template,"mkiv lua stats",tag,data))
+ report_statistics(format(template,tag,data))
end
end
@@ -4610,7 +4603,7 @@ function statistics.runtime()
end
function statistics.timed(action,report)
- report = report or logs.simple
+ report = report or logs.new("system")
starttiming("run")
action()
stoptiming("run")
@@ -4664,14 +4657,10 @@ local data = { } -- maybe just local
local trace_initialize = false -- only for testing during development
-local function report(a,b,...)
- texio.write_nl(format("%-16s> %s",a,format(b,...)))
-end
-
function setters.initialize(filename,name,values) -- filename only for diagnostics
- local data = data[name]
- if data then
- data = data.data
+ local setter = data[name]
+ if setter then
+ local data = data.data
if data then
for key, value in next, values do
-- key = gsub(key,"_",".")
@@ -4680,7 +4669,7 @@ function setters.initialize(filename,name,values) -- filename only for diagnosti
if functions then
if #functions > 0 and not functions.value then
if trace_initialize then
- report(name,"executing %s (%s -> %s)",key,filename,tostring(value))
+ setter.report("executing %s (%s -> %s)",key,filename,tostring(value))
end
for i=1,#functions do
functions[i](value)
@@ -4688,7 +4677,7 @@ function setters.initialize(filename,name,values) -- filename only for diagnosti
functions.value = value
else
if trace_initialize then
- report(name,"skipping %s (%s -> %s)",key,filename,tostring(value))
+ setter.report("skipping %s (%s -> %s)",key,filename,tostring(value))
end
end
else
@@ -4697,7 +4686,7 @@ function setters.initialize(filename,name,values) -- filename only for diagnosti
functions = { default = value }
data[key] = functions
if trace_initialize then
- report(name,"storing %s (%s -> %s)",key,filename,tostring(value))
+ setter.report("storing %s (%s -> %s)",key,filename,tostring(value))
end
end
end
@@ -4724,10 +4713,11 @@ local function set(t,what,newvalue)
else
value = is_boolean(value,value)
end
+ w = escapedpattern(w,true)
for name, functions in next, data do
if done[name] then
-- prevent recursion due to wildcards
- elseif find(name,escapedpattern(w,true)) then
+ elseif find(name,w) then
done[name] = true
for i=1,#functions do
functions[i](value)
@@ -4769,7 +4759,7 @@ function setters.register(t,what,...)
functions = { }
data[what] = functions
if trace_initialize then
- report(t.name,"defining %s",what)
+ t.report("defining %s",what)
end
end
local default = functions.default -- can be set from cnf file
@@ -4777,7 +4767,7 @@ function setters.register(t,what,...)
local typ = type(fnc)
if typ == "string" then
if trace_initialize then
- report(t.name,"coupling %s to %s",what,fnc)
+ t.report("coupling %s to %s",what,fnc)
end
local s = fnc -- else wrong reference
fnc = function(value) set(t,s,value) end
@@ -4831,9 +4821,9 @@ function setters.list(t) -- pattern
end
function setters.show(t)
- commands.writestatus("","")
- local list = setters.list(t)
local category = t.name
+ local list = setters.list(t)
+ t.report()
for k=1,#list do
local name = list[k]
local functions = t.data[name]
@@ -4841,10 +4831,10 @@ function setters.show(t)
local value, default, modules = functions.value, functions.default, #functions
value = value == nil and "unset" or tostring(value)
default = default == nil and "unset" or tostring(default)
- commands.writestatus(category,format("%-30s modules: %2i default: %5s value: %5s",name,modules,default,value))
+ t.report("%-30s modules: %2i default: %6s value: %6s",name,modules,default,value)
end
end
- commands.writestatus("","")
+ t.report()
end
-- we could have used a bit of oo and the trackers:enable syntax but
@@ -4854,57 +4844,62 @@ end
local enable, disable, register, list, show = setters.enable, setters.disable, setters.register, setters.list, setters.show
+local function report(setter,...)
+ local report = logs and logs.report
+ if report then
+ report(setter.name,...)
+ else -- fallback, as this module is loaded before the logger
+ write_nl(format("%-16s: %s\n",setter.name,format(...)))
+ end
+end
+
function setters.new(name)
- local t -- we need to access it in t
- t = {
+ local setter -- we need to access it in setter itself
+ setter = {
data = allocate(), -- indexed, but also default and value fields
name = name,
- enable = function(...) enable (t,...) end,
- disable = function(...) disable (t,...) end,
- register = function(...) register(t,...) end,
- list = function(...) list (t,...) end,
- show = function(...) show (t,...) end,
+ report = function(...) report (setter,...) end,
+ enable = function(...) enable (setter,...) end,
+ disable = function(...) disable (setter,...) end,
+ register = function(...) register(setter,...) end,
+ list = function(...) list (setter,...) end,
+ show = function(...) show (setter,...) end,
}
- data[name] = t
- return t
+ data[name] = setter
+ return setter
end
trackers = setters.new("trackers")
directives = setters.new("directives")
experiments = setters.new("experiments")
-local t_enable, t_disable = trackers .enable, trackers .disable
-local d_enable, d_disable = directives .enable, directives .disable
-local e_enable, e_disable = experiments.enable, experiments.disable
+local t_enable, t_disable, t_report = trackers .enable, trackers .disable, trackers .report
+local d_enable, d_disable, d_report = directives .enable, directives .disable, directives .report
+local e_enable, e_disable, e_report = experiments.enable, experiments.disable, experiments.report
-- nice trick: we overload two of the directives related functions with variants that
-- do tracing (itself using a tracker) .. proof of concept
-local function report(...) -- messy .. chicken or egg
- local p = (commands and commands.writestatus) or (logs and logs.report)
- if p then p(...) end
-end
-
local trace_directives = false local trace_directives = false trackers.register("system.directives", function(v) trace_directives = v end)
local trace_experiments = false local trace_experiments = false trackers.register("system.experiments", function(v) trace_experiments = v end)
function directives.enable(...)
- report("directives","enabling: %s",concat({...}," "))
+ d_report("enabling: %s",concat({...}," "))
d_enable(...)
end
function directives.disable(...)
- report("directives","disabling: %s",concat({...}," "))
+ d_report("disabling: %s",concat({...}," "))
d_disable(...)
end
function experiments.enable(...)
- report("experiments","enabling: %s",concat({...}," "))
+ e_report("enabling: %s",concat({...}," "))
e_enable(...)
end
function experiments.disable(...)
- report("experiments","disabling: %s",concat({...}," "))
+ e_report("disabling: %s",concat({...}," "))
e_disable(...)
end
@@ -4967,20 +4962,19 @@ if not modules then modules = { } end modules ['trac-log'] = {
license = "see context related readme files"
}
--- xml logging is only usefull in normal runs, not in ini mode
--- it looks like some tex logging (like filenames) is broken (no longer
--- interceoted at the tex end so the xml variant is not that useable now)
+-- todo: less categories, more subcategories (e.g. nodes)
local write_nl, write = texio and texio.write_nl or print, texio and texio.write or io.write
-local format, gmatch = string.format, string.gmatch
+local format, gmatch, find = string.format, string.gmatch, string.find
+local concat = table.concat
+local escapedpattern = string.escapedpattern
local texcount = tex and tex.count
+local next, type = next, type
--[[ldx--
-<p>This is a prelude to a more extensive logging module. For the sake
-of parsing log files, in addition to the standard logging we will
-provide an <l n='xml'/> structured file. Actually, any logging that
-is hooked into callbacks will be \XML\ by default.</p>
+<p>This is a prelude to a more extensive logging module. We no longer
+provide <l n='xml'/> based logging a sparsing is relatively easy anyway.</p>
--ldx]]--
logs = logs or { }
@@ -4998,96 +4992,239 @@ webpage : http://www.pragma-ade.nl / http://tex.aanhet.net
wiki : http://contextgarden.net
]]
-local functions = {
- 'report', 'status', 'start', 'stop', 'push', 'pop', 'line', 'direct',
- 'start_run', 'stop_run',
- 'start_page_number', 'stop_page_number',
- 'report_output_pages', 'report_output_log',
- 'report_tex_stat', 'report_job_stat',
- 'show_open', 'show_close', 'show_load',
- 'dummy',
-}
+-- local functions = {
+-- 'report', 'status', 'start', 'stop', 'line', 'direct',
+-- 'start_run', 'stop_run',
+-- 'start_page_number', 'stop_page_number',
+-- 'report_output_pages', 'report_output_log',
+-- 'report_tex_stat', 'report_job_stat',
+-- 'show_open', 'show_close', 'show_load',
+-- 'dummy',
+-- }
-local method = "nop"
+-- basic loggers
-function logs.setmethod(newmethod)
- method = newmethod
- -- a direct copy might be faster but let's try this for a while
- setmetatable(logs, { __index = logs[method] })
-end
+local function ignore() end
-function logs.getmethod()
- return method
-end
+setmetatable(logs, { __index = function(t,k) t[k] = ignore ; return ignore end })
--- installer
+-- local separator = (tex and (tex.jobname or tex.formatname)) and ">" or "|"
-local data = { }
+local report, subreport
-function logs.new(category)
- local logger = data[category]
- if not logger then
- logger = function(...)
- logs.report(category,...)
+if tex and tex.jobname or tex.formatname then
+
+ report = function(a,b,c,...)
+ if c then
+ write_nl(format("%-15s > %s\n",a,format(b,c,...)))
+ elseif b then
+ write_nl(format("%-15s > %s\n",a,b))
+ elseif a then
+ write_nl(format("%-15s >\n", a))
+ else
+ write_nl("\n")
end
- data[category] = logger
end
- return logger
-end
+ subreport = function(a,sub,b,c,...)
+ if c then
+ write_nl(format("%-15s > %s > %s\n",a,sub,format(b,c,...)))
+ elseif b then
+ write_nl(format("%-15s > %s > %s\n",a,sub,b))
+ elseif a then
+ write_nl(format("%-15s > %s >\n", a,sub))
+ else
+ write_nl("\n")
+ end
+ end
--- nop logging (maybe use __call instead)
-
-local noplog = { } logs.nop = noplog setmetatable(logs, { __index = noplog })
+else
-for i=1,#functions do
- noplog[functions[i]] = function() end
-end
+ report = function(a,b,c,...)
+ if c then
+ write_nl(format("%-15s | %s",a,format(b,c,...)))
+ elseif b then
+ write_nl(format("%-15s | %s",a,b))
+ elseif a then
+ write_nl(format("%-15s |", a))
+ else
+ write_nl("")
+ end
+ end
--- tex logging
+ subreport = function(a,sub,b,c,...)
+ if c then
+ write_nl(format("%-15s | %s | %s",a,sub,format(b,c,...)))
+ elseif b then
+ write_nl(format("%-15s | %s | %s",a,sub,b))
+ elseif a then
+ write_nl(format("%-15s | %s |", a,sub))
+ else
+ write_nl("")
+ end
+ end
-local texlog = { } logs.tex = texlog setmetatable(texlog, { __index = noplog })
+end
-function texlog.report(a,b,c,...)
+function logs.status(a,b,c,...) -- at the tex end
if c then
- write_nl(format("%-16s> %s\n",a,format(b,c,...)))
+ write_nl(format("%-15s : %s\n",a,format(b,c,...)))
elseif b then
- write_nl(format("%-16s> %s\n",a,b))
+ write_nl(format("%-15s : %s\n",a,b)) -- b can have %'s
+ elseif a then
+ write_nl(format("%-15s :\n", a))
else
- write_nl(format("%-16s>\n",a))
+ write_nl("\n")
end
end
-function texlog.status(a,b,c,...)
- if c then
- write_nl(format("%-16s: %s\n",a,format(b,c,...)))
- elseif b then
- write_nl(format("%-16s: %s\n",a,b)) -- b can have %'s
- else
- write_nl(format("%-16s:>\n",a))
+logs.report = report
+logs.subreport = subreport
+
+-- installer
+
+-- todo: renew (un) locks when a new one is added and wildcard
+
+local data, states = { }, nil
+
+function logs.reporter(category,subcategory)
+ local logger = data[category]
+ if not logger then
+ local state = false
+ if states == true then
+ state = true
+ elseif type(states) == "table" then
+ for c, _ in next, states do
+ if find(category,c) then
+ state = true
+ break
+ end
+ end
+ end
+ logger = {
+ reporters = { },
+ state = state,
+ }
+ data[category] = logger
+ end
+ local reporter = logger.reporters[subcategory or "default"]
+ if not reporter then
+ if subcategory then
+ reporter = function(...)
+ if not logger.state then
+ subreport(category,subcategory,...)
+ end
+ end
+ logger.reporters[subcategory] = reporter
+ else
+ local tag = category
+ reporter = function(...)
+ if not logger.state then
+ report(category,...)
+ end
+ end
+ logger.reporters.default = reporter
+ end
end
+ return reporter
end
-function texlog.line(fmt,...) -- new
- if fmt then
- write_nl(format(fmt,...))
+logs.new = logs.reporter
+
+local function doset(category,value)
+ if category == true then
+ -- lock all
+ category, value = "*", true
+ elseif category == false then
+ -- unlock all
+ category, value = "*", false
+ elseif value == nil then
+ -- lock selective
+ value = true
+ end
+ if category == "*" then
+ states = value
+ for k, v in next, data do
+ v.state = value
+ end
else
- write_nl("")
+ states = utilities.parsers.settings_to_hash(category)
+ for c, _ in next, states do
+ if data[c] then
+ v.state = value
+ else
+ c = escapedpattern(c,true)
+ for k, v in next, data do
+ if find(k,c) then
+ v.state = value
+ end
+ end
+ end
+ end
+ end
+end
+
+function logs.disable(category,value)
+ doset(category,value == nil and true or value)
+end
+
+function logs.enable(category)
+ doset(category,false)
+end
+
+function logs.categories()
+ return table.sortedkeys(data)
+end
+
+function logs.show()
+ local n, c, s, max = 0, 0, 0, 0
+ for category, v in table.sortedpairs(data) do
+ n = n + 1
+ local state = v.state
+ local reporters = v.reporters
+ local nc = #category
+ if nc > c then
+ c = nc
+ end
+ for subcategory, _ in next, reporters do
+ local ns = #subcategory
+ if ns > c then
+ s = ns
+ end
+ local m = nc + ns
+ if m > max then
+ max = m
+ end
+ end
+ local subcategories = concat(table.sortedkeys(reporters),", ")
+ if state == true then
+ state = "disabled"
+ elseif state == false then
+ state = "enabled"
+ else
+ state = "unknown"
+ end
+ -- no new here
+ report("logging","category: '%s', subcategories: '%s', state: '%s'",category,subcategories,state)
end
+ report("logging","categories: %s, max category: %s, max subcategory: %s, max combined: %s",n,c,s,max)
end
+directives.register("logs.blocked", function(v)
+ doset(v,true)
+end)
+-- tex specific loggers (might move elsewhere)
+local report_pages = logs.reporter("pages") -- not needed but saves checking when we grep for it
local real, user, sub
-function texlog.start_page_number()
+function logs.start_page_number()
real, user, sub = texcount.realpageno, texcount.userpageno, texcount.subpageno
end
-local report_pages = logs.new("pages") -- not needed but saves checking when we grep for it
-
-function texlog.stop_page_number()
+function logs.stop_page_number()
if real > 0 then
if user > 0 then
if sub > 0 then
@@ -5104,176 +5241,98 @@ function texlog.stop_page_number()
io.flush()
end
-texlog.report_job_stat = statistics and statistics.showjobstat
+logs.report_job_stat = statistics and statistics.showjobstat
--- xml logging
+local report_files = logs.reporter("files")
-local xmllog = { } logs.xml = xmllog setmetatable(xmllog, { __index = noplog })
+local nesting = 0
+local verbose = false
-function xmllog.report(category,fmt,s,...) -- new
- if s then
- write_nl(format("<r category='%s'>%s</r>",category,format(fmt,s,...)))
- elseif fmt then
- write_nl(format("<r category='%s'>%s</r>",category,fmt))
- else
- write_nl(format("<r category='%s'/>",category))
+function logs.show_open(name)
+ if verbose then
+ nesting = nesting + 1
+ report_files("level %s, opening %s",nesting,name)
end
end
-function xmllog.status(category,fmt,s,...)
- if s then
- write_nl(format("<s category='%s'>%s</r>",category,format(fmt,s,...)))
- elseif fmt then
- write_nl(format("<s category='%s'>%s</r>",category,fmt))
- else
- write_nl(format("<s category='%s'/>",category))
+function logs.show_close(name)
+ if verbose then
+ report_files("level %s, closing %s",nesting,name)
+ nesting = nesting - 1
end
end
-function xmllog.line(fmt,...) -- new
- if fmt then
- write_nl(format("<r>%s</r>",format(fmt,...)))
- else
- write_nl("<r/>")
+function logs.show_load(name)
+ if verbose then
+ report_files("level %s, loading %s",nesting+1,name)
end
end
-function xmllog.start() write_nl("<%s>" ) end
-function xmllog.stop () write_nl("</%s>") end
-function xmllog.push () write_nl("<!-- ") end
-function xmllog.pop () write_nl(" -->" ) end
-
-function xmllog.start_run()
- write_nl("<?xml version='1.0' standalone='yes'?>")
- write_nl("<job>") -- xmlns='www.pragma-ade.com/luatex/schemas/context-job.rng'
- write_nl("")
-end
-
-function xmllog.stop_run()
- write_nl("</job>")
-end
-
-function xmllog.start_page_number()
- write_nl(format("<p real='%s' page='%s' sub='%s'", texcount.realpageno, texcount.userpageno, texcount.subpageno))
-end
-
-function xmllog.stop_page_number()
- write("/>")
- write_nl("")
-end
+-- there may be scripts out there using this:
-function xmllog.report_output_pages(p,b)
- write_nl(format("<v k='pages' v='%s'/>", p))
- write_nl(format("<v k='bytes' v='%s'/>", b))
- write_nl("")
-end
-
-function xmllog.report_output_log()
- -- nothing
-end
+local simple = logs.reporter("comment")
-function xmllog.report_tex_stat(k,v)
- write_nl("log","<v k='"..k.."'>"..tostring(v).."</v>")
-end
-
-local nesting = 0
-
-function xmllog.show_open(name)
- nesting = nesting + 1
- write_nl(format("<f l='%s' n='%s'>",nesting,name))
-end
+logs.simple = simple
+logs.simpleline = simple
-function xmllog.show_close(name)
- write("</f> ")
- nesting = nesting - 1
-end
-
-function xmllog.show_load(name)
- write_nl(format("<f l='%s' n='%s'/>",nesting+1,name))
-end
-
--- initialization
-
-if tex and (tex.jobname or tex.formatname) then
- -- todo: this can be set in mtxrun ... or maybe we should just forget about this alternative format
- if (os.getenv("mtx.directives.logmethod") or os.getenv("mtx_directives_logmethod")) == "xml" then
- logs.setmethod('xml')
- else
- logs.setmethod('tex')
- end
-else
- logs.setmethod('nop')
-end
+-- obsolete
--- logging in runners -> these are actually the nop loggers
+function logs.setprogram () end -- obsolete
+function logs.extendbanner() end -- obsolete
+function logs.reportlines () end -- obsolete
+function logs.reportbanner() end -- obsolete
+function logs.reportline () end -- obsolete
+function logs.simplelines () end -- obsolete
+function logs.help () end -- obsolete
-local name, banner = 'report', 'context'
+-- applications
-function noplog.report(category,fmt,...) -- todo: fmt,s
- if fmt then
- write_nl(format("%s | %s: %s",name,category,format(fmt,...)))
- elseif category then
- write_nl(format("%s | %s",name,category))
- else
- write_nl(format("%s |",name))
+local function reportlines(t,str)
+ if str then
+ for line in gmatch(str,"(.-)[\n\r]") do
+ t.report(line)
+ end
end
end
-noplog.status = noplog.report -- just to be sure, never used
-
-function noplog.simple(fmt,...) -- todo: fmt,s
- if fmt then
- write_nl(format("%s | %s",name,format(fmt,...)))
- else
- write_nl(format("%s |",name))
+local function reportbanner(t)
+ local banner = t.banner
+ if banner then
+ t.report(banner)
+ t.report()
end
end
-if utilities then
- utilities.report = function(...) logs.simple(...) end
-end
-
-function logs.setprogram(newname,newbanner)
- name, banner = newname, newbanner
-end
-
-function logs.extendbanner(newbanner)
- banner = banner .. " | ".. newbanner
-end
-
-function logs.reportlines(str) -- todo: <lines></lines>
- for line in gmatch(str,"(.-)[\n\r]") do
- logs.report(line)
+local function reporthelp(t,...)
+ local helpinfo = t.helpinfo
+ if type(helpinfo) == "string" then
+ reportlines(t,helpinfo)
+ elseif type(helpinfo) == "table" then
+ local tags = { ... }
+ for i=1,#tags do
+ reportlines(t,t.helpinfo[tags[i]])
+ if i < #tags then
+ t.report()
+ end
+ end
end
end
-function logs.reportline() -- for scripts too
- logs.report()
-end
-
-function logs.simpleline()
- logs.report()
+local function reportinfo(t)
+ t.report()
+ reportlines(t,moreinfo)
end
-function logs.simplelines(str) -- todo: <lines></lines>
- for line in gmatch(str,"(.-)[\n\r]") do
- logs.simple(line)
- end
+function logs.application(t)
+ t.name = t.name or "unknown"
+ t.banner = t.banner
+ t.report = logs.reporter(t.name)
+ t.help = function(...) reportbanner(t) ; reporthelp(t,...) ; reportinfo(t) end
+ t.identify = function() reportbanner(t) end
+ return t
end
-function logs.reportbanner() -- for scripts too
- logs.report(banner)
-end
-
-function logs.help(message,option)
- logs.reportbanner()
- logs.reportline()
- logs.reportlines(message)
- if option ~= "nomoreinfo" then
- logs.reportline()
- logs.reportlines(moreinfo)
- end
-end
+-- somewhat special
-- logging to a file
@@ -5281,7 +5340,7 @@ end
function logs.system(whereto,process,jobname,category,...)
local message = format("%s %s => %s => %s => %s\r",os.date("%d/%m/%y %H:%m:%S"),process,jobname,category,format(...))
for i=1,10 do
- local f = io.open(whereto,"a")
+ local f = io.open(whereto,"a") -- we can consider keepint the file open
if f then
f:write(message)
f:close()
@@ -5292,30 +5351,24 @@ function logs.system(whereto,process,jobname,category,...)
end
end
--- bonus
-
-function logs.fatal(where,...)
- logs.report(where,"fatal error: %s, aborting now",format(...))
- os.exit()
-end
-
+local report_system = logs.reporter("system","logs")
function logs.obsolete(old,new)
local o = loadstring("return " .. new)()
if type(o) == "function" then
return function(...)
- logs.report("system","function %s is obsolete, use %s",old,new)
+ report_system("function %s is obsolete, use %s",old,new)
loadstring(old .. "=" .. new .. " return ".. old)()(...)
end
elseif type(o) == "table" then
local t, m = { }, { }
m.__index = function(t,k)
- logs.report("system","table %s is obsolete, use %s",old,new)
+ report_system("table %s is obsolete, use %s",old,new)
m.__index, m.__newindex = o, o
return o[k]
end
m.__newindex = function(t,k,v)
- logs.report("system","table %s is obsolete, use %s",old,new)
+ report_system("table %s is obsolete, use %s",old,new)
m.__index, m.__newindex = o, o
o[k] = v
end
@@ -5327,6 +5380,10 @@ function logs.obsolete(old,new)
end
end
+if utilities then
+ utilities.report = report_system
+end
+
if tex and tex.error then
function logs.texerrormessage(...) -- for the moment we put this function here
tex.error(format(...), { })
@@ -5361,7 +5418,7 @@ local getmetatable, setmetatable, rawset, type = getmetatable, setmetatable, raw
local trace_namespaces = false trackers.register("system.namespaces", function(v) trace_namespaces = v end)
-local report_system = logs.new("system")
+local report_system = logs.new("system","protection")
namespaces = namespaces or { }
local namespaces = namespaces
@@ -5530,7 +5587,7 @@ if not modules then modules = { } end modules ['luat-env'] = {
local trace_locating = false trackers.register("resolvers.locating", function(v) trace_locating = v end)
-local report_resolvers = logs.new("resolvers")
+local report_lua = logs.new("resolvers","lua")
local allocate, mark = utilities.storage.allocate, utilities.storage.mark
@@ -5754,14 +5811,14 @@ function environment.luafilechunk(filename,silent) -- used for loading lua bytec
if fullname and fullname ~= "" then
local data = environment.loadedluacode(fullname)
if trace_locating then
- report_resolvers("loading file %s%s", fullname, not data and " failed" or "")
+ report_lua("loading file %s%s", fullname, not data and " failed" or "")
elseif not silent then
texio.write("<",data and "+ " or "- ",fullname,">")
end
return data
else
if trace_locating then
- report_resolvers("unknown file %s", filename)
+ report_lua("unknown file %s", filename)
end
return nil
end
@@ -5781,7 +5838,7 @@ function environment.loadluafile(filename, version)
local fullname = (lucname and environment.luafile(lucname)) or ""
if fullname ~= "" then
if trace_locating then
- report_resolvers("loading %s", fullname)
+ report_lua("loading %s", fullname)
end
chunk = loadfile(fullname) -- this way we don't need a file exists check
end
@@ -5799,7 +5856,7 @@ function environment.loadluafile(filename, version)
return true
else
if trace_locating then
- report_resolvers("version mismatch for %s: lua=%s, luc=%s", filename, v, version)
+ report_lua("version mismatch for %s: lua=%s, luc=%s", filename, v, version)
end
environment.loadluafile(filename)
end
@@ -5810,12 +5867,12 @@ function environment.loadluafile(filename, version)
fullname = (luaname and environment.luafile(luaname)) or ""
if fullname ~= "" then
if trace_locating then
- report_resolvers("loading %s", fullname)
+ report_lua("loading %s", fullname)
end
chunk = loadfile(fullname) -- this way we don't need a file exists check
if not chunk then
if trace_locating then
- report_resolvers("unknown file %s", filename)
+ report_lua("unknown file %s", filename)
end
else
assert(chunk)()
@@ -5844,7 +5901,7 @@ if not modules then modules = { } end modules ['lxml-tab'] = {
local trace_entities = false trackers.register("xml.entities", function(v) trace_entities = v end)
-local report_xml = logs.new("xml")
+local report_xml = logs and logs.new("xml","core") or function(...) print(format(...)) end
--[[ldx--
<p>The parser used here is inspired by the variant discussed in the lua book, but
@@ -6518,7 +6575,7 @@ function xml.is_valid(root)
return root and not root.error
end
-xml.errorhandler = (logs and logs.report) or (input and logs.report) or print
+xml.errorhandler = report
--[[ldx--
<p>We cannot load an <l n='lpeg'/> from a filehandle so we need to load
@@ -7069,7 +7126,7 @@ local trace_lpath = false if trackers then trackers.register("xml.path",
local trace_lparse = false if trackers then trackers.register("xml.parse", function(v) trace_lparse = v end) end
local trace_lprofile = false if trackers then trackers.register("xml.profile", function(v) trace_lpath = v trace_lparse = v trace_lprofile = v end) end
-local report_lpath = logs.new("lpath")
+local report_lpath = logs.new("xml","lpath")
--[[ldx--
<p>We've now arrived at an interesting part: accessing the tree using a subset
@@ -7951,9 +8008,9 @@ local function traced_apply(list,parsed,nofparsed,order)
if trace_lparse then
lshow(parsed)
end
- report_lpath("collecting : %s",parsed.pattern)
- report_lpath(" root tags : %s",tagstostring(list))
- report_lpath(" order : %s",order or "unset")
+ report_lpath("collecting: %s",parsed.pattern)
+ report_lpath("root tags : %s",tagstostring(list))
+ report_lpath("order : %s",order or "unset")
local collected = list
for i=1,nofparsed do
local pi = parsed[i]
@@ -9224,7 +9281,7 @@ local trace_locating = false trackers.register("resolvers.locating", functi
local trace_detail = false trackers.register("resolvers.details", function(v) trace_detail = v end)
local trace_expansions = false trackers.register("resolvers.expansions", function(v) trace_expansions = v end)
-local report_resolvers = logs.new("resolvers")
+local report_initialization = logs.new("resolvers","initialization")
local ostype, osname, ossetenv, osgetenv = os.type, os.name, os.setenv, os.getenv
@@ -9245,7 +9302,7 @@ kpse = { original = kpse }
setmetatable(kpse, {
__index = function(kp,name)
- report_resolvers("fatal error: kpse library is accessed (key: %s)",name)
+ report_initialization("fatal error: kpse library is accessed (key: %s)",name)
os.exit()
end
} )
@@ -9329,13 +9386,13 @@ do
if lfs.chdir(p) then
local pp = lfs.currentdir()
if trace_locating and p ~= pp then
- report_resolvers("following symlink '%s' to '%s'",p,pp)
+ report_initialization("following symlink '%s' to '%s'",p,pp)
end
ownpath = pp
lfs.chdir(olddir)
else
if trace_locating then
- report_resolvers("unable to check path '%s'",p)
+ report_initialization("unable to check path '%s'",p)
end
ownpath = p
end
@@ -9346,9 +9403,9 @@ do
end
if not ownpath or ownpath == "" then
ownpath = "."
- report_resolvers("forcing fallback ownpath .")
+ report_initialization("forcing fallback ownpath .")
elseif trace_locating then
- report_resolvers("using ownpath '%s'",ownpath)
+ report_initialization("using ownpath '%s'",ownpath)
end
end
@@ -9375,7 +9432,7 @@ do
ossetenv('SELFAUTODIR', file.collapsepath(ownpath .. "/.."))
ossetenv('SELFAUTOPARENT', file.collapsepath(ownpath .. "/../.."))
else
- report_resolvers("error: unable to locate ownpath")
+ report_initialization("error: unable to locate ownpath")
os.exit()
end
@@ -9461,7 +9518,7 @@ local collapsepath = file.collapsepath
local trace_locating = false trackers.register("resolvers.locating", function(v) trace_locating = v end)
local trace_expansions = false trackers.register("resolvers.expansions", function(v) trace_expansions = v end)
-local report_resolvers = logs.new("resolvers")
+local report_expansions = logs.new("resolvers","expansions")
local resolvers = resolvers
@@ -9524,7 +9581,7 @@ local replacer_1 = lpeg.replacer { { ",}", ",@}" }, { "{,", "{@," }, }
local function splitpathexpr(str, newlist, validate) -- I couldn't resist lpegging it (nice exercise).
if trace_expansions then
- report_resolvers("expanding variable '%s'",str)
+ report_expansions("expanding variable '%s'",str)
end
local t, ok, done = newlist or { }, false, false
local n = #t
@@ -9550,7 +9607,7 @@ local function splitpathexpr(str, newlist, validate) -- I couldn't resist lpeggi
end
if trace_expansions then
for k=1,#t do
- report_resolvers("% 4i: %s",k,t[k])
+ report_expansions("% 4i: %s",k,t[k])
end
end
return t
@@ -9585,7 +9642,7 @@ function resolvers.cleanpath(str)
homedir = lpegmatch(cleanup,environment.homedir or "")
if homedir == string.char(127) or homedir == "" or not lfs.isdir(homedir) then
if trace_expansions then
- report_resolvers("no home dir set, ignoring dependent paths")
+ report_expansions("no home dir set, ignoring dependent paths")
end
function resolvers.cleanpath(str)
if find(str,"~") then
@@ -9655,9 +9712,9 @@ local function splitconfigurationpath(str) -- beware, this can be either a path
end
end
if trace_expansions then
- report_resolvers("splitting path specification '%s'",str)
+ report_expansions("splitting path specification '%s'",str)
for k=1,noffound do
- report_resolvers("% 4i: %s",k,found[k])
+ report_expansions("% 4i: %s",k,found[k])
end
end
cache[str] = found
@@ -9742,7 +9799,7 @@ end
function resolvers.scanfiles(path,branch)
if trace_locating then
- report_resolvers("scanning path '%s', branch '%s'",path, branch or path)
+ report_expansions("scanning path '%s', branch '%s'",path, branch or path)
end
local realpath = resolvers.resolve(path) -- no shortcut
local files, n, m, r = scan({ },realpath .. '/',"",0,0,0)
@@ -9751,7 +9808,7 @@ function resolvers.scanfiles(path,branch)
files.__directories__ = m
files.__remappings__ = r
if trace_locating then
- report_resolvers("%s files found on %s directories with %s uppercase remappings",n,m,r)
+ report_expansions("%s files found on %s directories with %s uppercase remappings",n,m,r)
end
return files
end
@@ -10080,8 +10137,8 @@ local mkdirs, isdir = dir.mkdirs, lfs.isdir
local trace_locating = false trackers.register("resolvers.locating", function(v) trace_locating = v end)
local trace_cache = false trackers.register("resolvers.cache", function(v) trace_cache = v end)
-local report_cache = logs.new("cache")
-local report_resolvers = logs.new("resolvers")
+local report_caches = logs.new("resolvers","caches")
+local report_resolvers = logs.new("resolvers","caching")
local resolvers = resolvers
@@ -10141,7 +10198,7 @@ local function identify()
if not caches.ask or io.ask(format("\nShould I create the cache path %s?",cachepath), "no", { "yes", "no" }) == "yes" then
mkdirs(cachepath)
if isdir(cachepath) and file.is_writable(cachepath) then
- report_cache("created: %s",cachepath)
+ report_caches("created: %s",cachepath)
writable = cachepath
readables[#readables+1] = cachepath
end
@@ -10175,10 +10232,10 @@ local function identify()
-- Some extra checking. If we have no writable or readable path then we simply
-- quit.
if not writable then
- report_cache("fatal error: there is no valid writable cache path defined")
+ report_caches("fatal error: there is no valid writable cache path defined")
os.exit()
elseif #readables == 0 then
- report_cache("fatal error: there is no valid readable cache path defined")
+ report_caches("fatal error: there is no valid readable cache path defined")
os.exit()
end
-- why here
@@ -10200,9 +10257,9 @@ local function identify()
-- end
if trace_cache then
for i=1,#readables do
- report_cache("using readable path '%s' (order %s)",readables[i],i)
+ report_caches("using readable path '%s' (order %s)",readables[i],i)
end
- report_cache("using writable path '%s'",writable)
+ report_caches("using writable path '%s'",writable)
end
identify = function()
return writable, readables
@@ -10237,7 +10294,7 @@ function caches.hashed(tree)
tree = lower(tree)
local hash = md5.hex(tree)
if trace_cache or trace_locating then
- report_cache("hashing tree %s, hash %s",tree,hash)
+ report_caches("hashing tree %s, hash %s",tree,hash)
end
return hash
end
@@ -10463,7 +10520,7 @@ trackers.register("resolvers.locating", function(v) trace_methods = v end)
trackers.register("resolvers.methods", function(v) trace_methods = v end)
-local report_resolvers = logs.new("resolvers")
+local report_methods = logs.new("resolvers","methods")
local allocate = utilities.storage.allocate
@@ -10505,41 +10562,41 @@ local function methodhandler(what,first,...) -- filename can be nil or false
local resolver = namespace and namespace[scheme]
if resolver then
if trace_methods then
- report_resolvers("resolver: method=%s, how=%s, scheme=%s, argument=%s",what,how,scheme,first)
+ report_methods("resolver: method=%s, how=%s, scheme=%s, argument=%s",what,how,scheme,first)
end
return resolver(specification,...)
else
resolver = namespace.default or namespace.file
if resolver then
if trace_methods then
- report_resolvers("resolver: method=%s, how=%s, default, argument=%s",what,how,first)
+ report_methods("resolver: method=%s, how=%s, default, argument=%s",what,how,first)
end
return resolver(specification,...)
elseif trace_methods then
- report_resolvers("resolver: method=%s, how=%s, no handler",what,how)
+ report_methods("resolver: method=%s, how=%s, no handler",what,how)
end
end
elseif how == "tag" then
local resolver = namespace and namespace[first]
if resolver then
if trace_methods then
- report_resolvers("resolver: method=%s, how=%s, tag=%s",what,how,first)
+ report_methods("resolver: method=%s, how=%s, tag=%s",what,how,first)
end
return resolver(...)
else
resolver = namespace.default or namespace.file
if resolver then
if trace_methods then
- report_resolvers("resolver: method=%s, how=%s, default",what,how)
+ report_methods("resolver: method=%s, how=%s, default",what,how)
end
return resolver(...)
elseif trace_methods then
- report_resolvers("resolver: method=%s, how=%s, unknown",what,how)
+ report_methods("resolver: method=%s, how=%s, unknown",what,how)
end
end
end
else
- report_resolvers("resolver: method=%s, unknown",what)
+ report_methods("resolver: method=%s, unknown",what)
end
end
@@ -10610,7 +10667,7 @@ local trace_locating = false trackers.register("resolvers.locating", functi
local trace_detail = false trackers.register("resolvers.details", function(v) trace_detail = v end)
local trace_expansions = false trackers.register("resolvers.expansions", function(v) trace_expansions = v end)
-local report_resolvers = logs.new("resolvers")
+local report_resolving = logs.new("resolvers","resolving")
local resolvers = resolvers
@@ -10712,7 +10769,7 @@ end
function resolvers.newinstance() -- todo: all vars will become lowercase and alphanum only
if trace_locating then
- report_resolvers("creating instance")
+ report_resolving("creating instance")
end
local environment, variables, expansions, order = allocate(), allocate(), allocate(), allocate()
@@ -10830,9 +10887,9 @@ local function reportcriticalvariables()
for i=1,#resolvers.criticalvars do
local k = resolvers.criticalvars[i]
local v = resolvers.getenv(k) or "unknown" -- this one will not resolve !
- report_resolvers("variable '%s' set to '%s'",k,v)
+ report_resolving("variable '%s' set to '%s'",k,v)
end
- report_resolvers()
+ report_resolving()
end
reportcriticalvariables = function() end
end
@@ -10856,17 +10913,17 @@ local function identify_configuration_files()
if lfs.isfile(realname) then
specification[#specification+1] = filename
if trace_locating then
- report_resolvers("found configuration file '%s'",realname)
+ report_resolving("found configuration file '%s'",realname)
end
elseif trace_locating then
- report_resolvers("unknown configuration file '%s'",realname)
+ report_resolving("unknown configuration file '%s'",realname)
end
end
if trace_locating then
- report_resolvers()
+ report_resolving()
end
elseif trace_locating then
- report_resolvers("configuration files already identified")
+ report_resolving("configuration files already identified")
end
end
@@ -10886,8 +10943,8 @@ local function load_configuration_files()
data = data and data.content
if data then
if trace_locating then
- report_resolvers("loading configuration file '%s'",filename)
- report_resolvers()
+ report_resolving("loading configuration file '%s'",filename)
+ report_resolving()
end
local variables = data.variables or { }
local warning = false
@@ -10897,7 +10954,7 @@ local function load_configuration_files()
initializesetter(filename,k,v)
elseif variables[k] == nil then
if trace_locating and not warning then
- report_resolvers("variables like '%s' in configuration file '%s' should move to the 'variables' subtable",
+ report_resolving("variables like '%s' in configuration file '%s' should move to the 'variables' subtable",
k,resolvers.resolve(filename))
warning = true
end
@@ -10910,7 +10967,7 @@ local function load_configuration_files()
local cnfspec = variables["TEXMFCNF"]
if cnfspec then
if trace_locating then
- report_resolvers("reloading configuration due to TEXMF redefinition")
+ report_resolving("reloading configuration due to TEXMF redefinition")
end
-- we push the value into the main environment (osenv) so
-- that it takes precedence over the default one and therefore
@@ -10929,13 +10986,13 @@ local function load_configuration_files()
else
if trace_locating then
- report_resolvers("skipping configuration file '%s' (no content)",filename)
+ report_resolving("skipping configuration file '%s' (no content)",filename)
end
setups[pathname] = { }
instance.loaderror = true
end
elseif trace_locating then
- report_resolvers("skipping configuration file '%s' (no file)",filename)
+ report_resolving("skipping configuration file '%s' (no file)",filename)
end
instance.order[#instance.order+1] = instance.setups[pathname]
if instance.loaderror then
@@ -10943,7 +11000,7 @@ local function load_configuration_files()
end
end
elseif trace_locating then
- report_resolvers("warning: no lua configuration files found")
+ report_resolving("warning: no lua configuration files found")
end
end
@@ -10979,19 +11036,19 @@ local function locate_file_databases()
end
if trace_locating then
if runtime then
- report_resolvers("locating list of '%s' (runtime)",path)
+ report_resolving("locating list of '%s' (runtime)",path)
else
- report_resolvers("locating list of '%s' (cached)",path)
+ report_resolving("locating list of '%s' (cached)",path)
end
end
methodhandler('locators',stripped)
end
end
if trace_locating then
- report_resolvers()
+ report_resolving()
end
elseif trace_locating then
- report_resolvers("no texmf paths are defined (using TEXMF)")
+ report_resolving("no texmf paths are defined (using TEXMF)")
end
end
@@ -11002,7 +11059,7 @@ local function generate_file_databases()
methodhandler('generators',hash.name)
end
if trace_locating then
- report_resolvers()
+ report_resolving()
end
end
@@ -11014,11 +11071,11 @@ local function save_file_databases() -- will become cachers
local content = instance.files[cachename]
caches.collapsecontent(content)
if trace_locating then
- report_resolvers("saving tree '%s'",cachename)
+ report_resolving("saving tree '%s'",cachename)
end
caches.savecontent(cachename,"files",content)
elseif trace_locating then
- report_resolvers("not saving runtime tree '%s'",cachename)
+ report_resolving("not saving runtime tree '%s'",cachename)
end
end
end
@@ -11043,7 +11100,7 @@ function resolvers.appendhash(type,name,cache)
-- safeguard ... tricky as it's actually a bug when seen twice
if not instance.hashed[name] then
if trace_locating then
- report_resolvers("hash '%s' appended",name)
+ report_resolving("hash '%s' appended",name)
end
insert(instance.hashes, { type = type, name = name, cache = cache } )
instance.hashed[name] = cache
@@ -11054,7 +11111,7 @@ function resolvers.prependhash(type,name,cache)
-- safeguard ... tricky as it's actually a bug when seen twice
if not instance.hashed[name] then
if trace_locating then
- report_resolvers("hash '%s' prepended",name)
+ report_resolving("hash '%s' prepended",name)
end
insert(instance.hashes, 1, { type = type, name = name, cache = cache } )
instance.hashed[name] = cache
@@ -11287,9 +11344,9 @@ function isreadable(name)
local readable = lfs.isfile(name) -- not file.is_readable(name) asit can be a dir
if trace_detail then
if readable then
- report_resolvers("file '%s' is readable",name)
+ report_resolving("file '%s' is readable",name)
else
- report_resolvers("file '%s' is not readable", name)
+ report_resolving("file '%s' is not readable", name)
end
end
return readable
@@ -11303,7 +11360,7 @@ local function collect_files(names)
for k=1,#names do
local fname = names[k]
if trace_detail then
- report_resolvers("checking name '%s'",fname)
+ report_resolving("checking name '%s'",fname)
end
local bname = filebasename(fname)
local dname = filedirname(fname)
@@ -11319,7 +11376,7 @@ local function collect_files(names)
local files = blobpath and instance.files[blobpath]
if files then
if trace_detail then
- report_resolvers("deep checking '%s' (%s)",blobpath,bname)
+ report_resolving("deep checking '%s' (%s)",blobpath,bname)
end
local blobfile = files[bname]
if not blobfile then
@@ -11339,7 +11396,7 @@ local function collect_files(names)
local search = filejoin(blobroot,blobfile,bname)
local result = methodhandler('concatinators',hash.type,blobroot,blobfile,bname)
if trace_detail then
- report_resolvers("match: kind '%s', search '%s', result '%s'",kind,search,result)
+ report_resolving("match: kind '%s', search '%s', result '%s'",kind,search,result)
end
noffiles = noffiles + 1
filelist[noffiles] = { kind, search, result }
@@ -11353,7 +11410,7 @@ local function collect_files(names)
local search = filejoin(blobroot,vv,bname)
local result = methodhandler('concatinators',hash.type,blobroot,vv,bname)
if trace_detail then
- report_resolvers("match: kind '%s', search '%s', result '%s'",kind,search,result)
+ report_resolving("match: kind '%s', search '%s', result '%s'",kind,search,result)
end
noffiles = noffiles + 1
filelist[noffiles] = { kind, search, result }
@@ -11362,7 +11419,7 @@ local function collect_files(names)
end
end
elseif trace_locating then
- report_resolvers("no match in '%s' (%s)",blobpath,bname)
+ report_resolving("no match in '%s' (%s)",blobpath,bname)
end
end
end
@@ -11403,7 +11460,7 @@ local function collect_instance_files(filename,askedformat,allresults) -- todo :
stamp = filename .. "--" .. askedformat
if instance.found[stamp] then
if trace_locating then
- report_resolvers("remembered file '%s'",filename)
+ report_resolving("remembered file '%s'",filename)
end
resolvers.registerintrees(filename) -- for tracing used files
return instance.found[stamp]
@@ -11412,7 +11469,7 @@ local function collect_instance_files(filename,askedformat,allresults) -- todo :
if not dangerous[askedformat] then
if isreadable(filename) then
if trace_detail then
- report_resolvers("file '%s' found directly",filename)
+ report_resolving("file '%s' found directly",filename)
end
if stamp then
instance.found[stamp] = { filename }
@@ -11422,13 +11479,13 @@ local function collect_instance_files(filename,askedformat,allresults) -- todo :
end
if find(filename,'%*') then
if trace_locating then
- report_resolvers("checking wildcard '%s'", filename)
+ report_resolving("checking wildcard '%s'", filename)
end
result = resolvers.findwildcardfiles(filename) -- we can use th elocal
elseif file.is_qualified_path(filename) then
if isreadable(filename) then
if trace_locating then
- report_resolvers("qualified name '%s'", filename)
+ report_resolving("qualified name '%s'", filename)
end
result = { filename }
else
@@ -11441,7 +11498,7 @@ local function collect_instance_files(filename,askedformat,allresults) -- todo :
forcedname = filename .. "." .. s
if isreadable(forcedname) then
if trace_locating then
- report_resolvers("no suffix, forcing format filetype '%s'", s)
+ report_resolving("no suffix, forcing format filetype '%s'", s)
end
result, ok = { forcedname }, true
break
@@ -11494,7 +11551,7 @@ local function collect_instance_files(filename,askedformat,allresults) -- todo :
-- end
end
if not ok and trace_locating then
- report_resolvers("qualified name '%s'", filename)
+ report_resolving("qualified name '%s'", filename)
end
end
else
@@ -11513,13 +11570,13 @@ local function collect_instance_files(filename,askedformat,allresults) -- todo :
wantedfiles[#wantedfiles+1] = forcedname
filetype = resolvers.formatofsuffix(forcedname)
if trace_locating then
- report_resolvers("forcing filetype '%s'",filetype)
+ report_resolving("forcing filetype '%s'",filetype)
end
end
else
filetype = resolvers.formatofsuffix(filename)
if trace_locating then
- report_resolvers("using suffix based filetype '%s'",filetype)
+ report_resolving("using suffix based filetype '%s'",filetype)
end
end
else
@@ -11533,7 +11590,7 @@ local function collect_instance_files(filename,askedformat,allresults) -- todo :
end
filetype = askedformat
if trace_locating then
- report_resolvers("using given filetype '%s'",filetype)
+ report_resolving("using given filetype '%s'",filetype)
end
end
local typespec = resolvers.variableofformat(filetype)
@@ -11541,7 +11598,7 @@ local function collect_instance_files(filename,askedformat,allresults) -- todo :
if not pathlist or #pathlist == 0 then
-- no pathlist, access check only / todo == wildcard
if trace_detail then
- report_resolvers("checking filename '%s', filetype '%s', wanted files '%s'",filename, filetype or '?',concat(wantedfiles," | "))
+ report_resolving("checking filename '%s', filetype '%s', wanted files '%s'",filename, filetype or '?',concat(wantedfiles," | "))
end
for k=1,#wantedfiles do
local fname = wantedfiles[k]
@@ -11569,7 +11626,7 @@ local function collect_instance_files(filename,askedformat,allresults) -- todo :
end
end
if trace_detail then
- report_resolvers("checking filename '%s'",filename)
+ report_resolving("checking filename '%s'",filename)
end
for k=1,#pathlist do
local path = pathlist[k]
@@ -11581,7 +11638,7 @@ local function collect_instance_files(filename,askedformat,allresults) -- todo :
-- compare list entries with permitted pattern -- /xx /xx//
local expression = makepathexpression(pathname)
if trace_detail then
- report_resolvers("using pattern '%s' for path '%s'",expression,pathname)
+ report_resolving("using pattern '%s' for path '%s'",expression,pathname)
end
for k=1,#filelist do
local fl = filelist[k]
@@ -11593,16 +11650,16 @@ local function collect_instance_files(filename,askedformat,allresults) -- todo :
done = true
if allresults then
if trace_detail then
- report_resolvers("match to '%s' in hash for file '%s' and path '%s', continue scanning",expression,f,d)
+ report_resolving("match to '%s' in hash for file '%s' and path '%s', continue scanning",expression,f,d)
end
else
if trace_detail then
- report_resolvers("match to '%s' in hash for file '%s' and path '%s', quit scanning",expression,f,d)
+ report_resolving("match to '%s' in hash for file '%s' and path '%s', quit scanning",expression,f,d)
end
break
end
elseif trace_detail then
- report_resolvers("no match to '%s' in hash for file '%s' and path '%s'",expression,f,d)
+ report_resolving("no match to '%s' in hash for file '%s' and path '%s'",expression,f,d)
end
end
end
@@ -11619,7 +11676,7 @@ local function collect_instance_files(filename,askedformat,allresults) -- todo :
local fname = filejoin(ppname,w)
if isreadable(fname) then
if trace_detail then
- report_resolvers("found '%s' by scanning",fname)
+ report_resolving("found '%s' by scanning",fname)
end
result[#result+1] = fname
done = true
@@ -11824,7 +11881,7 @@ end
local function report(str)
if trace_locating then
- report_resolvers(str) -- has already verbose
+ report_resolving(str) -- has already verbose
else
print(str)
end
@@ -12219,7 +12276,7 @@ if not modules then modules = { } end modules ['data-fil'] = {
local trace_locating = false trackers.register("resolvers.locating", function(v) trace_locating = v end)
-local report_resolvers = logs.new("resolvers")
+local report_files = logs.new("resolvers","files")
local resolvers = resolvers
@@ -12233,11 +12290,11 @@ function locators.file(specification)
local realname = resolvers.resolve(name) -- no shortcut
if realname and realname ~= '' and lfs.isdir(realname) then
if trace_locating then
- report_resolvers("file locator '%s' found as '%s'",name,realname)
+ report_files("file locator '%s' found as '%s'",name,realname)
end
resolvers.appendhash('file',name,true) -- cache
elseif trace_locating then
- report_resolvers("file locator '%s' not found",name)
+ report_files("file locator '%s' not found",name)
end
end
@@ -12260,12 +12317,12 @@ function finders.file(specification,filetype)
local foundname = resolvers.findfile(filename,filetype)
if foundname and foundname ~= "" then
if trace_locating then
- report_resolvers("file finder: '%s' found",filename)
+ report_files("file finder: '%s' found",filename)
end
return foundname
else
if trace_locating then
- report_resolvers("file finder: %s' not found",filename)
+ report_files("file finder: %s' not found",filename)
end
return finders.notfound()
end
@@ -12286,13 +12343,13 @@ function openers.file(specification,filetype)
local f = io.open(filename,"r")
if f then
if trace_locating then
- report_resolvers("file opener, '%s' opened",filename)
+ report_files("file opener, '%s' opened",filename)
end
return openers.helpers.textopener("file",filename,f)
end
end
if trace_locating then
- report_resolvers("file opener, '%s' not found",filename)
+ report_files("file opener, '%s' not found",filename)
end
return openers.notfound()
end
@@ -12304,7 +12361,7 @@ function loaders.file(specification,filetype)
if f then
logs.show_load(filename)
if trace_locating then
- report_resolvers("file loader, '%s' loaded",filename)
+ report_files("file loader, '%s' loaded",filename)
end
local s = f:read("*a")
if checkgarbage then
@@ -12317,7 +12374,7 @@ function loaders.file(specification,filetype)
end
end
if trace_locating then
- report_resolvers("file loader, '%s' not found",filename)
+ report_files("file loader, '%s' not found",filename)
end
return loaders.notfound()
end
@@ -12358,11 +12415,11 @@ containers = containers or { }
local containers = containers
containers.usecache = true
-local report_cache = logs.new("cache")
+local report_containers = logs.new("resolvers","containers")
local function report(container,tag,name)
if trace_cache or trace_containers then
- report_cache("container: %s, tag: %s, name: %s",container.subcategory,tag,name or 'invalid')
+ report_containers("container: %s, tag: %s, name: %s",container.subcategory,tag,name or 'invalid')
end
end
@@ -12480,7 +12537,7 @@ local format, lower, gsub, find = string.format, string.lower, string.gsub, stri
local trace_locating = false trackers.register("resolvers.locating", function(v) trace_locating = v end)
-local report_resolvers = logs.new("resolvers")
+local report_mounts = logs.new("resolvers","mounts")
local resolvers = resolvers
@@ -12505,7 +12562,7 @@ function resolvers.automount(usecache)
-- skip
elseif find(line,"^zip://") then
if trace_locating then
- report_resolvers("mounting %s",line)
+ report_mounts("mounting %s",line)
end
table.insert(resolvers.automounted,line)
resolvers.usezipfile(line)
@@ -12585,7 +12642,7 @@ local format, find, match = string.format, string.find, string.match
local trace_locating = false trackers.register("resolvers.locating", function(v) trace_locating = v end)
-local report_resolvers = logs.new("resolvers")
+local report_zip = logs.new("resolvers","zip")
-- zip:///oeps.zip?name=bla/bla.tex
-- zip:///oeps.zip?tree=tex/texmf-local
@@ -12638,9 +12695,9 @@ function resolvers.locators.zip(specification)
local zipfile = archive and archive ~= "" and zip.openarchive(archive) -- tricky, could be in to be initialized tree
if trace_locating then
if zipfile then
- report_resolvers("zip locator, archive '%s' found",archive)
+ report_zip("locator, archive '%s' found",archive)
else
- report_resolvers("zip locator, archive '%s' not found",archive)
+ report_zip("locator, archive '%s' not found",archive)
end
end
end
@@ -12648,7 +12705,7 @@ end
function resolvers.hashers.zip(specification)
local archive = specification.filename
if trace_locating then
- report_resolvers("loading zip file '%s'",archive)
+ report_zip("loading file '%s'",archive)
end
resolvers.usezipfile(specification.original)
end
@@ -12671,25 +12728,25 @@ function resolvers.finders.zip(specification)
local zfile = zip.openarchive(archive)
if zfile then
if trace_locating then
- report_resolvers("zip finder, archive '%s' found",archive)
+ report_zip("finder, archive '%s' found",archive)
end
local dfile = zfile:open(queryname)
if dfile then
dfile = zfile:close()
if trace_locating then
- report_resolvers("zip finder, file '%s' found",queryname)
+ report_zip("finder, file '%s' found",queryname)
end
return specification.original
elseif trace_locating then
- report_resolvers("zip finder, file '%s' not found",queryname)
+ report_zip("finder, file '%s' not found",queryname)
end
elseif trace_locating then
- report_resolvers("zip finder, unknown archive '%s'",archive)
+ report_zip("finder, unknown archive '%s'",archive)
end
end
end
if trace_locating then
- report_resolvers("zip finder, '%s' not found",original)
+ report_zip("finder, '%s' not found",original)
end
return resolvers.finders.notfound()
end
@@ -12704,24 +12761,24 @@ function resolvers.openers.zip(specification)
local zfile = zip.openarchive(archive)
if zfile then
if trace_locating then
- report_resolvers("zip opener, archive '%s' opened",archive)
+ report_zip("opener, archive '%s' opened",archive)
end
local dfile = zfile:open(queryname)
if dfile then
if trace_locating then
- report_resolvers("zip opener, file '%s' found",queryname)
+ report_zip("opener, file '%s' found",queryname)
end
return resolvers.openers.helpers.textopener('zip',original,dfile)
elseif trace_locating then
- report_resolvers("zip opener, file '%s' not found",queryname)
+ report_zip("opener, file '%s' not found",queryname)
end
elseif trace_locating then
- report_resolvers("zip opener, unknown archive '%s'",archive)
+ report_zip("opener, unknown archive '%s'",archive)
end
end
end
if trace_locating then
- report_resolvers("zip opener, '%s' not found",original)
+ report_zip("opener, '%s' not found",original)
end
return resolvers.openers.notfound()
end
@@ -12736,27 +12793,27 @@ function resolvers.loaders.zip(specification)
local zfile = zip.openarchive(archive)
if zfile then
if trace_locating then
- report_resolvers("zip loader, archive '%s' opened",archive)
+ report_zip("loader, archive '%s' opened",archive)
end
local dfile = zfile:open(queryname)
if dfile then
logs.show_load(original)
if trace_locating then
- report_resolvers("zip loader, file '%s' loaded",original)
+ report_zip("loader, file '%s' loaded",original)
end
local s = dfile:read("*all")
dfile:close()
return true, s, #s
elseif trace_locating then
- report_resolvers("zip loader, file '%s' not found",queryname)
+ report_zip("loader, file '%s' not found",queryname)
end
elseif trace_locating then
- report_resolvers("zip loader, unknown archive '%s'",archive)
+ report_zip("loader, unknown archive '%s'",archive)
end
end
end
if trace_locating then
- report_resolvers("zip loader, '%s' not found",original)
+ report_zip("loader, '%s' not found",original)
end
return resolvers.openers.notfound()
end
@@ -12772,7 +12829,7 @@ function resolvers.usezipfile(archive)
if z then
local tree = url.query(specification.query).tree or ""
if trace_locating then
- report_resolvers("zip registering, registering archive '%s'",archive)
+ report_zip("registering, registering archive '%s'",archive)
end
statistics.starttiming(resolvers.instance)
resolvers.prependhash('zip',archive)
@@ -12781,10 +12838,10 @@ function resolvers.usezipfile(archive)
instance.files[archive] = resolvers.registerzipfile(z,tree)
statistics.stoptiming(resolvers.instance)
elseif trace_locating then
- report_resolvers("zip registering, unknown archive '%s'",archive)
+ report_zip("registering, unknown archive '%s'",archive)
end
elseif trace_locating then
- report_resolvers("zip registering, '%s' not found",archive)
+ report_zip("registering, '%s' not found",archive)
end
end
@@ -12796,7 +12853,7 @@ function resolvers.registerzipfile(z,tree)
filter = format("^%s/(.+)/(.-)$",tree)
end
if trace_locating then
- report_resolvers("zip registering, using filter '%s'",filter)
+ report_zip("registering, using filter '%s'",filter)
end
local register, n = resolvers.registerfile, 0
for i in z:files() do
@@ -12813,7 +12870,7 @@ function resolvers.registerzipfile(z,tree)
n = n + 1
end
end
- report_resolvers("zip registering, %s files registered",n)
+ report_zip("registering, %s files registered",n)
return files
end
@@ -12836,7 +12893,7 @@ local find, gsub, format = string.find, string.gsub, string.format
local trace_locating = false trackers.register("resolvers.locating", function(v) trace_locating = v end)
-local report_resolvers = logs.new("resolvers")
+local report_trees = logs.new("resolvers","trees")
local resolvers = resolvers
@@ -12874,18 +12931,18 @@ function resolvers.locators.tree(specification)
local name = specification.filename
if name ~= '' and lfs.isdir(name) then
if trace_locating then
- report_resolvers("tree locator '%s' found",name)
+ report_trees("locator '%s' found",name)
end
resolvers.appendhash('tree',name,false) -- don't cache
elseif trace_locating then
- report_resolvers("tree locator '%s' not found",name)
+ report_trees("locator '%s' not found",name)
end
end
function resolvers.hashers.tree(specification)
local name = specification.filename
if trace_locating then
- report_resolvers("analysing tree '%s'",name)
+ report_trees("analysing '%s'",name)
end
resolvers.methodhandler("hashers",name)
end
@@ -12981,7 +13038,7 @@ if not modules then modules = { } end modules ['data-lua'] = {
local trace_locating = false trackers.register("resolvers.locating", function(v) trace_locating = v end)
-local report_resolvers = logs.new("resolvers")
+local report_libraries = logs.new("resolvers","libraries")
local gsub, insert = string.gsub, table.insert
local unpack = unpack or table.unpack
@@ -13013,7 +13070,7 @@ local function thepath(...)
local t = { ... } t[#t+1] = "?.lua"
local path = file.join(unpack(t))
if trace_locating then
- report_resolvers("! appending '%s' to 'package.path'",path)
+ report_libraries("! appending '%s' to 'package.path'",path)
end
return path
end
@@ -13035,11 +13092,11 @@ local function loaded(libpaths,name,simple)
local libpath = libpaths[i]
local resolved = gsub(libpath,"%?",simple)
if trace_locating then -- more detail
- report_resolvers("! checking for '%s' on 'package.path': '%s' => '%s'",simple,libpath,resolved)
+ report_libraries("! checking for '%s' on 'package.path': '%s' => '%s'",simple,libpath,resolved)
end
if file.is_readable(resolved) then
if trace_locating then
- report_resolvers("! lib '%s' located via 'package.path': '%s'",name,resolved)
+ report_libraries("! lib '%s' located via 'package.path': '%s'",name,resolved)
end
return loadfile(resolved)
end
@@ -13048,17 +13105,17 @@ end
package.loaders[2] = function(name) -- was [#package.loaders+1]
if trace_locating then -- mode detail
- report_resolvers("! locating '%s'",name)
+ report_libraries("! locating '%s'",name)
end
for i=1,#libformats do
local format = libformats[i]
local resolved = resolvers.findfile(name,format) or ""
if trace_locating then -- mode detail
- report_resolvers("! checking for '%s' using 'libformat path': '%s'",name,format)
+ report_libraries("! checking for '%s' using 'libformat path': '%s'",name,format)
end
if resolved ~= "" then
if trace_locating then
- report_resolvers("! lib '%s' located via environment: '%s'",name,resolved)
+ report_libraries("! lib '%s' located via environment: '%s'",name,resolved)
end
return loadfile(resolved)
end
@@ -13081,11 +13138,11 @@ package.loaders[2] = function(name) -- was [#package.loaders+1]
local path = paths[p]
local resolved = file.join(path,libname)
if trace_locating then -- mode detail
- report_resolvers("! checking for '%s' using 'clibformat path': '%s'",libname,path)
+ report_libraries("! checking for '%s' using 'clibformat path': '%s'",libname,path)
end
if file.is_readable(resolved) then
if trace_locating then
- report_resolvers("! lib '%s' located via 'clibformat': '%s'",libname,resolved)
+ report_libraries("! lib '%s' located via 'clibformat': '%s'",libname,resolved)
end
return package.loadlib(resolved,name)
end
@@ -13095,28 +13152,28 @@ package.loaders[2] = function(name) -- was [#package.loaders+1]
local libpath = clibpaths[i]
local resolved = gsub(libpath,"?",simple)
if trace_locating then -- more detail
- report_resolvers("! checking for '%s' on 'package.cpath': '%s'",simple,libpath)
+ report_libraries("! checking for '%s' on 'package.cpath': '%s'",simple,libpath)
end
if file.is_readable(resolved) then
if trace_locating then
- report_resolvers("! lib '%s' located via 'package.cpath': '%s'",name,resolved)
+ report_libraries("! lib '%s' located via 'package.cpath': '%s'",name,resolved)
end
return package.loadlib(resolved,name)
end
end
-- just in case the distribution is messed up
if trace_loading then -- more detail
- report_resolvers("! checking for '%s' using 'luatexlibs': '%s'",name)
+ report_libraries("! checking for '%s' using 'luatexlibs': '%s'",name)
end
local resolved = resolvers.findfile(file.basename(name),'luatexlibs') or ""
if resolved ~= "" then
if trace_locating then
- report_resolvers("! lib '%s' located by basename via environment: '%s'",name,resolved)
+ report_libraries("! lib '%s' located by basename via environment: '%s'",name,resolved)
end
return loadfile(resolved)
end
if trace_locating then
- report_resolvers('? unable to locate lib: %s',name)
+ report_libraries('? unable to locate lib: %s',name)
end
-- return "unable to locate " .. name
end
@@ -13153,48 +13210,48 @@ local trace_locating = false trackers.register("resolvers.locating", function(v
local resolvers = resolvers
-local report_resolvers = logs.new("resolvers")
+local report_scripts = logs.new("resolvers","scripts")
function resolvers.updatescript(oldname,newname) -- oldname -> own.name, not per se a suffix
local scriptpath = "scripts/context/lua"
newname = file.addsuffix(newname,"lua")
local oldscript = resolvers.cleanpath(oldname)
if trace_locating then
- report_resolvers("to be replaced old script %s", oldscript)
+ report_scripts("to be replaced old script %s", oldscript)
end
local newscripts = resolvers.findfiles(newname) or { }
if #newscripts == 0 then
if trace_locating then
- report_resolvers("unable to locate new script")
+ report_scripts("unable to locate new script")
end
else
for i=1,#newscripts do
local newscript = resolvers.cleanpath(newscripts[i])
if trace_locating then
- report_resolvers("checking new script %s", newscript)
+ report_scripts("checking new script %s", newscript)
end
if oldscript == newscript then
if trace_locating then
- report_resolvers("old and new script are the same")
+ report_scripts("old and new script are the same")
end
elseif not find(newscript,scriptpath) then
if trace_locating then
- report_resolvers("new script should come from %s",scriptpath)
+ report_scripts("new script should come from %s",scriptpath)
end
elseif not (find(oldscript,file.removesuffix(newname).."$") or find(oldscript,newname.."$")) then
if trace_locating then
- report_resolvers("invalid new script name")
+ report_scripts("invalid new script name")
end
else
local newdata = io.loaddata(newscript)
if newdata then
if trace_locating then
- report_resolvers("old script content replaced by new content")
+ report_scripts("old script content replaced by new content")
end
io.savedata(oldscript,newdata)
break
elseif trace_locating then
- report_resolvers("unable to load new script")
+ report_scripts("unable to load new script")
end
end
end
@@ -13216,6 +13273,8 @@ if not modules then modules = { } end modules ['data-tmf'] = {
local resolvers = resolvers
+local report_tds = logs.new("resolvers","tds")
+
-- = <<
-- ? ??
-- < +=
@@ -13236,11 +13295,11 @@ function resolvers.load_tree(tree,resolve)
local newpath = file.join(newtree,"bin")
if not lfs.isdir(newtree) then
- logs.simple("no '%s' under tree %s",texos,tree)
+ report_tds("no '%s' under tree %s",texos,tree)
os.exit()
end
if not lfs.isdir(newpath) then
- logs.simple("no '%s/bin' under tree %s",texos,tree)
+ report_tds("no '%s/bin' under tree %s",texos,tree)
os.exit()
end
@@ -13264,9 +13323,9 @@ function resolvers.load_tree(tree,resolve)
setenv('TEXMFCNF', resolvers.luacnfspec, not resolve)
setenv("PATH", newpath .. io.pathseparator .. getenv("PATH"))
- logs.simple("changing from root '%s' to '%s'",oldroot,newroot)
- logs.simple("prepending '%s' to binary path",newpath)
- logs.simple()
+ report_tds("changing from root '%s' to '%s'",oldroot,newroot)
+ report_tds("prepending '%s' to binary path",newpath)
+ report_tds()
end
end
@@ -13291,6 +13350,8 @@ resolvers.listers = resolvers.listers or { }
local resolvers = resolvers
+local report_lists = logs.new("resolvers","lists")
+
local function tabstr(str)
if type(str) == 'table' then
return concat(str," | ")
@@ -13319,11 +13380,11 @@ function resolvers.listers.variables(pattern)
local exp = table.fastcopy(expansions)
for key, value in table.sortedpairs(configured) do
if key ~= "" and (pattern == "" or find(upper(key),pattern)) then
- logs.simple(key)
- logs.simple(" env: %s",tabstr(rawget(environment,key)) or "unset")
- logs.simple(" var: %s",tabstr(configured[key]) or "unset")
- logs.simple(" exp: %s",tabstr(expansions[key]) or "unset")
- logs.simple(" res: %s",resolvers.resolve(expansions[key]) or "unset")
+ report_lists(key)
+ report_lists(" env: %s",tabstr(rawget(environment,key)) or "unset")
+ report_lists(" var: %s",tabstr(configured[key]) or "unset")
+ report_lists(" exp: %s",tabstr(expansions[key]) or "unset")
+ report_lists(" res: %s",resolvers.resolve(expansions[key]) or "unset")
end
end
instance.environment = table.fastcopy(env)
@@ -13477,6 +13538,8 @@ if not modules then modules = { } end modules ['luat-fmt'] = {
local format = string.format
+local report_format = logs.new("resolvers","formats")
+
-- helper for mtxrun
local quoted = string.quoted
@@ -13501,7 +13564,7 @@ function environment.make_format(name)
if path ~= "" then
lfs.chdir(path)
end
- logs.simple("format path: %s",lfs.currentdir())
+ report_format("format path: %s",lfs.currentdir())
-- check source file
local texsourcename = file.addsuffix(name,"mkiv")
local fulltexsourcename = resolvers.findfile(texsourcename,"tex") or ""
@@ -13510,11 +13573,11 @@ function environment.make_format(name)
fulltexsourcename = resolvers.findfile(texsourcename,"tex") or ""
end
if fulltexsourcename == "" then
- logs.simple("no tex source file with name: %s (mkiv or tex)",name)
+ report_format("no tex source file with name: %s (mkiv or tex)",name)
lfs.chdir(olddir)
return
else
- logs.simple("using tex source file: %s",fulltexsourcename)
+ report_format("using tex source file: %s",fulltexsourcename)
end
local texsourcepath = dir.expandname(file.dirname(fulltexsourcename)) -- really needed
-- check specification
@@ -13525,7 +13588,7 @@ function environment.make_format(name)
fullspecificationname = resolvers.findfile(specificationname,"tex") or ""
end
if fullspecificationname == "" then
- logs.simple("unknown stub specification: %s",specificationname)
+ report_format("unknown stub specification: %s",specificationname)
lfs.chdir(olddir)
return
end
@@ -13536,39 +13599,39 @@ function environment.make_format(name)
if type(usedlualibs) == "string" then
usedluastub = file.join(file.dirname(fullspecificationname),usedlualibs)
elseif type(usedlualibs) == "table" then
- logs.simple("using stub specification: %s",fullspecificationname)
+ report_format("using stub specification: %s",fullspecificationname)
local texbasename = file.basename(name)
local luastubname = file.addsuffix(texbasename,"lua")
local lucstubname = file.addsuffix(texbasename,"luc")
-- pack libraries in stub
- logs.simple("creating initialization file: %s",luastubname)
+ report_format("creating initialization file: %s",luastubname)
utilities.merger.selfcreate(usedlualibs,specificationpath,luastubname)
-- compile stub file (does not save that much as we don't use this stub at startup any more)
local strip = resolvers.booleanvariable("LUACSTRIP", true)
if utilities.lua.compile(luastubname,lucstubname) and lfs.isfile(lucstubname) then
- logs.simple("using compiled initialization file: %s",lucstubname)
+ report_format("using compiled initialization file: %s",lucstubname)
usedluastub = lucstubname
else
- logs.simple("using uncompiled initialization file: %s",luastubname)
+ report_format("using uncompiled initialization file: %s",luastubname)
usedluastub = luastubname
end
else
- logs.simple("invalid stub specification: %s",fullspecificationname)
+ report_format("invalid stub specification: %s",fullspecificationname)
lfs.chdir(olddir)
return
end
-- generate format
local command = format("luatex --ini %s --lua=%s %s %sdump",primaryflags(),quoted(usedluastub),quoted(fulltexsourcename),os.platform == "unix" and "\\\\" or "\\")
- logs.simple("running command: %s\n",command)
+ report_format("running command: %s\n",command)
os.spawn(command)
-- remove related mem files
local pattern = file.removesuffix(file.basename(usedluastub)).."-*.mem"
- -- logs.simple("removing related mplib format with pattern '%s'", pattern)
+ -- report_format("removing related mplib format with pattern '%s'", pattern)
local mp = dir.glob(pattern)
if mp then
for i=1,#mp do
local name = mp[i]
- logs.simple("removing related mplib format %s", file.basename(name))
+ report_format("removing related mplib format %s", file.basename(name))
os.remove(name)
end
end
@@ -13585,7 +13648,7 @@ function environment.run_format(name,data,more)
end
fmtname = resolvers.cleanpath(fmtname)
if fmtname == "" then
- logs.simple("no format with name: %s",name)
+ report_format("no format with name: %s",name)
else
local barename = file.removesuffix(name) -- expanded name
local luaname = file.addsuffix(barename,"luc")
@@ -13593,11 +13656,11 @@ function environment.run_format(name,data,more)
luaname = file.addsuffix(barename,"lua")
end
if not lfs.isfile(luaname) then
- logs.simple("using format name: %s",fmtname)
- logs.simple("no luc/lua with name: %s",barename)
+ report_format("using format name: %s",fmtname)
+ report_format("no luc/lua with name: %s",barename)
else
local command = format("luatex %s --fmt=%s --lua=%s %s %s",primaryflags(),quoted(barename),quoted(luaname),quoted(data),more ~= "" and quoted(more) or "")
- logs.simple("running command: %s",command)
+ report_format("running command: %s",command)
os.spawn(command)
end
end
@@ -13750,8 +13813,6 @@ if not resolvers then
os.exit()
end
-logs.setprogram('MTXrun',"TDS Runner Tool 1.30")
-
if environment.arguments["verbose"] then
trackers.enable("resolvers.locating")
end
@@ -13764,10 +13825,7 @@ if trackspec then
trackers.enable(trackspec)
end
-runners = runners or { } -- global
-messages = messages or { }
-
-messages.help = [[
+local helpinfo = [[
--script run an mtx script (lua prefered method) (--noquotes), no script gives list
--execute run a script or program (texmfstart method) (--noquotes)
--resolve resolve prefixed arguments
@@ -13819,6 +13877,19 @@ messages.help = [[
--pattern=str filter variables
]]
+local application = logs.application {
+ name = "mtxrun",
+ banner = "ConTeXt TDS Runner Tool 1.30",
+ helpinfo = helpinfo,
+}
+
+local report = application.report
+
+local verbose = environment.argument("verbose")
+
+messages = messages or { } -- for the mo
+
+runners = runners or { } -- global
runners.applications = {
["lua"] = "luatex --luaonly",
@@ -13872,17 +13943,16 @@ end
function runners.prepare()
local checkname = environment.argument("ifchanged")
- local verbose = environment.argument("verbose")
if type(checkname) == "string" and checkname ~= "" then
local oldchecksum = file.loadchecksum(checkname)
local newchecksum = file.checksum(checkname)
if oldchecksum == newchecksum then
if verbose then
- logs.simple("file '%s' is unchanged",checkname)
+ report("file '%s' is unchanged",checkname)
end
return "skip"
elseif verbose then
- logs.simple("file '%s' is changed, processing started",checkname)
+ report("file '%s' is changed, processing started",checkname)
end
file.savechecksum(checkname)
end
@@ -13892,17 +13962,17 @@ function runners.prepare()
if oldname and newname and oldname ~= "" and newname ~= "" then
if not file.needs_updating(oldname,newname) then
if verbose then
- logs.simple("file '%s' and '%s' have same age",oldname,newname)
+ report("file '%s' and '%s' have same age",oldname,newname)
end
return "skip"
elseif verbose then
- logs.simple("file '%s' is older than '%s'",oldname,newname)
+ report("file '%s' is older than '%s'",oldname,newname)
end
end
end
local runpath = environment.argument("path")
if type(runpath) == "string" and not lfs.chdir(runpath) then
- logs.simple("unable to change to path '%s'",runpath)
+ report("unable to change to path '%s'",runpath)
return "error"
end
runners.prepare = function() end
@@ -13961,11 +14031,11 @@ function runners.execute_script(fullname,internal,nosplit)
result = binary .. " " .. result
end
local command = result .. " " .. environment.reconstructcommandline(environment.arguments_after,noquote)
- if logs.verbose then
- logs.simpleline()
- logs.simple("executing: %s",command)
- logs.simpleline()
- logs.simpleline()
+ if verbose then
+ report()
+ report("executing: %s",command)
+ report()
+ report()
io.flush()
end
-- no os.exec because otherwise we get the wrong return value
@@ -13980,9 +14050,9 @@ function runners.execute_script(fullname,internal,nosplit)
return false
end
end
- logs.simpleline()
- logs.simple("This script needs '%s' which seems not to be installed.",binary)
- logs.simpleline()
+ report()
+ report("This script needs '%s' which seems not to be installed.",binary)
+ report()
end
return false
end
@@ -14007,10 +14077,10 @@ function runners.execute_program(fullname)
environment.initializearguments(after)
fullname = fullname:gsub("^bin:","")
local command = fullname .. " " .. (environment.reconstructcommandline(after or "",noquote) or "")
- logs.simpleline()
- logs.simple("executing: %s",command)
- logs.simpleline()
- logs.simpleline()
+ report()
+ report("executing: %s",command)
+ report()
+ report()
io.flush()
local code = os.exec(command) -- (fullname,unpack(after)) does not work / maybe spawn
return code == 0
@@ -14042,18 +14112,18 @@ function runners.handle_stubs(create)
if create then
if windows then
io.savedata(file.join(stubpath,base..".bat"),string.format(windows_stub,name))
- logs.simple("windows stub for '%s' created",base)
+ report("windows stub for '%s' created",base)
end
if unix then
io.savedata(file.join(stubpath,base),string.format(unix_stub,name))
- logs.simple("unix stub for '%s' created",base)
+ report("unix stub for '%s' created",base)
end
else
if windows and (os.remove(file.join(stubpath,base..'.bat')) or os.remove(file.join(stubpath,base..'.cmd'))) then
- logs.simple("windows stub for '%s' removed", base)
+ report("windows stub for '%s' removed", base)
end
if unix and (os.remove(file.join(stubpath,base)) or os.remove(file.join(stubpath,base..'.sh'))) then
- logs.simple("unix stub for '%s' removed",base)
+ report("unix stub for '%s' removed",base)
end
end
end
@@ -14078,12 +14148,12 @@ function runners.locate_platform()
end
function runners.report_location(result)
- if logs.verbose then
- logs.simpleline()
+ if verbose then
+ reportline()
if result and result ~= "" then
- logs.simple(result)
+ report(result)
else
- logs.simple("not found")
+ report("not found")
end
else
io.write(result)
@@ -14095,11 +14165,11 @@ function runners.edit_script(filename) -- we assume that gvim is present on most
local rest = resolvers.resolve(filename)
if rest ~= "" then
local command = editor .. " " .. rest
- if logs.verbose then
- logs.simpleline()
- logs.simple("starting editor: %s",command)
- logs.simple_line()
- logs.simple_line()
+ if verbose then
+ report()
+ report("starting editor: %s",command)
+ report()
+ report()
end
os.launch(command)
end
@@ -14148,7 +14218,7 @@ function runners.launch_file(filename)
pattern = filename
end
if not pattern or pattern == "" then
- logs.simple("provide name or --pattern=")
+ report("provide name or --pattern=")
else
local t = resolvers.findfiles(pattern)
if not t or #t == 0 then
@@ -14160,15 +14230,15 @@ function runners.launch_file(filename)
if t and #t > 0 then
if environment.arguments["all"] then
for _, v in pairs(t) do
- logs.simple("launching %s", v)
+ report("launching %s", v)
resolvers.launch(v)
end
else
- logs.simple("launching %s", t[1])
+ report("launching %s", t[1])
resolvers.launch(t[1])
end
else
- logs.simple("no match for %s", pattern)
+ report("no match for %s", pattern)
end
end
end
@@ -14239,7 +14309,7 @@ function runners.execute_ctx_script(filename,...)
local fullname = runners.find_mtx_script(filename) or ""
if file.extname(fullname) == "cld" then
-- handy in editors where we force --autopdf
- logs.simple("running cld script: %s",filename)
+ report("running cld script: %s",filename)
table.insert(arguments,1,fullname)
table.insert(arguments,"--autopdf")
fullname = runners.find_mtx_script("context") or ""
@@ -14270,8 +14340,8 @@ function runners.execute_ctx_script(filename,...)
runners.load_script_session(loadname)
end
filename = environment.files[1]
- if logs.verbose then
- logs.simple("using script: %s\n",fullname)
+ if verbose then
+ report("using script: %s\n",fullname)
end
environment.ownscript = fullname
dofile(fullname)
@@ -14306,24 +14376,23 @@ function runners.execute_ctx_script(filename,...)
end
end
if #valid > 0 then
- logs.reportbanner()
- logs.reportline()
- logs.simple("no script name given, known scripts:")
- logs.simple()
+ application.identify()
+ report("no script name given, known scripts:")
+ report()
for k=1,#valid do
local v = valid[k]
- logs.simple("%-12s %4s %s",v[1],v[2],v[3])
+ report("%-12s %4s %s",v[1],v[2],v[3])
end
end
else
- logs.simple("no script name given")
+ report("no script name given")
end
else
filename = file.addsuffix(filename,"lua")
if file.is_qualified_path(filename) then
- logs.simple("unknown script '%s'",filename)
+ report("unknown script '%s'",filename)
else
- logs.simple("unknown script '%s' or 'mtx-%s'",filename,filename)
+ report("unknown script '%s' or 'mtx-%s'",filename,filename)
end
end
return false
@@ -14331,9 +14400,9 @@ function runners.execute_ctx_script(filename,...)
end
function runners.prefixes()
- logs.reportbanner()
- logs.reportline()
- logs.simple(table.concat(resolvers.allprefixes(true)," "))
+ application.identify()
+ report()
+ report(table.concat(resolvers.allprefixes(true)," "))
end
function runners.timedrun(filename) -- just for me
@@ -14385,7 +14454,7 @@ if environment.argument("usekpse") or environment.argument("forcekpse") or is_mk
local t = os.clock()
local k = kpse.original.new("luatex",progname)
local dummy = k:find_file("mtxrun.lua") -- so that we're initialized
- logs.simple("kpse fallback with progname '%s' initialized in %s seconds",progname,os.clock()-t)
+ report("kpse fallback with progname '%s' initialized in %s seconds",progname,os.clock()-t)
kpse_initialized = function() return k end
return k
end
@@ -14432,11 +14501,11 @@ else
function runners.loadbase(...)
if not resolvers.load(...) then
- logs.simple("forcing cache reload")
+ report("forcing cache reload")
instance.renewcache = true
trackers.enable("resolvers.locating")
if not resolvers.load(...) then
- logs.simple("the resolver databases are not present or outdated")
+ report("the resolver databases are not present or outdated")
end
end
end
@@ -14595,8 +14664,8 @@ elseif environment.argument("find-path") then
resolvers.load()
local path = resolvers.findpath(filename, instance.my_format)
- if logs.verbose then
- logs.simple(path)
+ if verbose then
+ report(path)
else
print(path)
end
@@ -14651,7 +14720,7 @@ elseif environment.argument("format-path") then
-- luatools: runners.execute_ctx_script("mtx-base","--format-path",filename)
resolvers.load()
- logs.simple(caches.getwritablepath("format"))
+ report(caches.getwritablepath("format"))
elseif environment.argument("pattern") then
@@ -14695,7 +14764,7 @@ elseif environment.argument("help") and filename=='base' then
elseif environment.argument("help") or filename=='help' or filename == "" then
- logs.help(messages.help)
+ application.help()
elseif filename:find("^bin:") then
@@ -14729,9 +14798,9 @@ else
end
-if logs.verbose then
- logs.simpleline()
- logs.simple("runtime: %0.3f seconds",os.runtime())
+if verbose then
+ report()
+ report("runtime: %0.3f seconds",os.runtime())
end
if os.type ~= "windows" then
diff --git a/scripts/context/stubs/mswin/mtxrun.lua b/scripts/context/stubs/mswin/mtxrun.lua
index 31d7d9b0f..afc472d1c 100644
--- a/scripts/context/stubs/mswin/mtxrun.lua
+++ b/scripts/context/stubs/mswin/mtxrun.lua
@@ -8,7 +8,6 @@ if not modules then modules = { } end modules ['mtxrun'] = {
license = "see context related readme files"
}
-
-- one can make a stub:
--
-- #!/bin/sh
@@ -132,11 +131,7 @@ local simple_escapes = {
}
function string.escapedpattern(str,simple)
- if simple then
- return (gsub(str,".",simple_escapes))
- else
- return (gsub(str,".",patterns_escapes))
- end
+ return (gsub(str,".",simple and simple_escapes or patterns_escapes))
end
function string.topattern(str,lowercase,strict)
@@ -556,11 +551,7 @@ local p = Cs((S("-.+*%()[]") / patterns_escapes + anything)^0)
local s = Cs((S("-.+*%()[]") / simple_escapes + anything)^0)
function string.escapedpattern(str,simple)
- if simple then
- return match(s,str)
- else
- return match(p,str)
- end
+ return match(simple and s or p,str)
end
-- utf extensies
@@ -3826,7 +3817,7 @@ local type, next = type, next
utilities = utilities or {}
utilities.merger = utilities.merger or { } -- maybe mergers
-utilities.report = utilities.report or print
+utilities.report = logs and logs.new("system") or print
local merger = utilities.merger
@@ -3964,7 +3955,7 @@ if not modules then modules = { } end modules ['util-lua'] = {
utilities = utilities or {}
utilities.lua = utilities.lua or { }
-utilities.report = utilities.report or print
+utilities.report = logs and logs.new("system") or print
function utilities.lua.compile(luafile,lucfile,cleanup,strip) -- defaults: cleanup=false strip=true
utilities.report("lua: compiling %s into %s",luafile,lucfile)
@@ -4577,19 +4568,21 @@ function statistics.show(reporter)
end
end
-
-local template, nn = nil, 0 -- we only calcute it once
+local template, report_statistics, nn = nil, nil, 0 -- we only calcute it once
function statistics.showjobstat(tag,data,n)
- if type(data) == "table" then
+ if not logs then
+ -- sorry
+ elseif type(data) == "table" then
for i=1,#data do
statistics.showjobstat(tag,data[i],n)
end
else
if not template or n > nn then
- template, n = format("%%-%ss: %%-%ss - %%s",15,n), nn
+ template, n = format("%%-%ss - %%s",n), nn
+ report_statistics = logs.new("mkiv lua stats")
end
- write_nl(format(template,"mkiv lua stats",tag,data))
+ report_statistics(format(template,tag,data))
end
end
@@ -4610,7 +4603,7 @@ function statistics.runtime()
end
function statistics.timed(action,report)
- report = report or logs.simple
+ report = report or logs.new("system")
starttiming("run")
action()
stoptiming("run")
@@ -4664,14 +4657,10 @@ local data = { } -- maybe just local
local trace_initialize = false -- only for testing during development
-local function report(a,b,...)
- texio.write_nl(format("%-16s> %s",a,format(b,...)))
-end
-
function setters.initialize(filename,name,values) -- filename only for diagnostics
- local data = data[name]
- if data then
- data = data.data
+ local setter = data[name]
+ if setter then
+ local data = data.data
if data then
for key, value in next, values do
-- key = gsub(key,"_",".")
@@ -4680,7 +4669,7 @@ function setters.initialize(filename,name,values) -- filename only for diagnosti
if functions then
if #functions > 0 and not functions.value then
if trace_initialize then
- report(name,"executing %s (%s -> %s)",key,filename,tostring(value))
+ setter.report("executing %s (%s -> %s)",key,filename,tostring(value))
end
for i=1,#functions do
functions[i](value)
@@ -4688,7 +4677,7 @@ function setters.initialize(filename,name,values) -- filename only for diagnosti
functions.value = value
else
if trace_initialize then
- report(name,"skipping %s (%s -> %s)",key,filename,tostring(value))
+ setter.report("skipping %s (%s -> %s)",key,filename,tostring(value))
end
end
else
@@ -4697,7 +4686,7 @@ function setters.initialize(filename,name,values) -- filename only for diagnosti
functions = { default = value }
data[key] = functions
if trace_initialize then
- report(name,"storing %s (%s -> %s)",key,filename,tostring(value))
+ setter.report("storing %s (%s -> %s)",key,filename,tostring(value))
end
end
end
@@ -4724,10 +4713,11 @@ local function set(t,what,newvalue)
else
value = is_boolean(value,value)
end
+ w = escapedpattern(w,true)
for name, functions in next, data do
if done[name] then
-- prevent recursion due to wildcards
- elseif find(name,escapedpattern(w,true)) then
+ elseif find(name,w) then
done[name] = true
for i=1,#functions do
functions[i](value)
@@ -4769,7 +4759,7 @@ function setters.register(t,what,...)
functions = { }
data[what] = functions
if trace_initialize then
- report(t.name,"defining %s",what)
+ t.report("defining %s",what)
end
end
local default = functions.default -- can be set from cnf file
@@ -4777,7 +4767,7 @@ function setters.register(t,what,...)
local typ = type(fnc)
if typ == "string" then
if trace_initialize then
- report(t.name,"coupling %s to %s",what,fnc)
+ t.report("coupling %s to %s",what,fnc)
end
local s = fnc -- else wrong reference
fnc = function(value) set(t,s,value) end
@@ -4831,9 +4821,9 @@ function setters.list(t) -- pattern
end
function setters.show(t)
- commands.writestatus("","")
- local list = setters.list(t)
local category = t.name
+ local list = setters.list(t)
+ t.report()
for k=1,#list do
local name = list[k]
local functions = t.data[name]
@@ -4841,10 +4831,10 @@ function setters.show(t)
local value, default, modules = functions.value, functions.default, #functions
value = value == nil and "unset" or tostring(value)
default = default == nil and "unset" or tostring(default)
- commands.writestatus(category,format("%-30s modules: %2i default: %5s value: %5s",name,modules,default,value))
+ t.report("%-30s modules: %2i default: %6s value: %6s",name,modules,default,value)
end
end
- commands.writestatus("","")
+ t.report()
end
-- we could have used a bit of oo and the trackers:enable syntax but
@@ -4854,57 +4844,62 @@ end
local enable, disable, register, list, show = setters.enable, setters.disable, setters.register, setters.list, setters.show
+local function report(setter,...)
+ local report = logs and logs.report
+ if report then
+ report(setter.name,...)
+ else -- fallback, as this module is loaded before the logger
+ write_nl(format("%-16s: %s\n",setter.name,format(...)))
+ end
+end
+
function setters.new(name)
- local t -- we need to access it in t
- t = {
+ local setter -- we need to access it in setter itself
+ setter = {
data = allocate(), -- indexed, but also default and value fields
name = name,
- enable = function(...) enable (t,...) end,
- disable = function(...) disable (t,...) end,
- register = function(...) register(t,...) end,
- list = function(...) list (t,...) end,
- show = function(...) show (t,...) end,
+ report = function(...) report (setter,...) end,
+ enable = function(...) enable (setter,...) end,
+ disable = function(...) disable (setter,...) end,
+ register = function(...) register(setter,...) end,
+ list = function(...) list (setter,...) end,
+ show = function(...) show (setter,...) end,
}
- data[name] = t
- return t
+ data[name] = setter
+ return setter
end
trackers = setters.new("trackers")
directives = setters.new("directives")
experiments = setters.new("experiments")
-local t_enable, t_disable = trackers .enable, trackers .disable
-local d_enable, d_disable = directives .enable, directives .disable
-local e_enable, e_disable = experiments.enable, experiments.disable
+local t_enable, t_disable, t_report = trackers .enable, trackers .disable, trackers .report
+local d_enable, d_disable, d_report = directives .enable, directives .disable, directives .report
+local e_enable, e_disable, e_report = experiments.enable, experiments.disable, experiments.report
-- nice trick: we overload two of the directives related functions with variants that
-- do tracing (itself using a tracker) .. proof of concept
-local function report(...) -- messy .. chicken or egg
- local p = (commands and commands.writestatus) or (logs and logs.report)
- if p then p(...) end
-end
-
local trace_directives = false local trace_directives = false trackers.register("system.directives", function(v) trace_directives = v end)
local trace_experiments = false local trace_experiments = false trackers.register("system.experiments", function(v) trace_experiments = v end)
function directives.enable(...)
- report("directives","enabling: %s",concat({...}," "))
+ d_report("enabling: %s",concat({...}," "))
d_enable(...)
end
function directives.disable(...)
- report("directives","disabling: %s",concat({...}," "))
+ d_report("disabling: %s",concat({...}," "))
d_disable(...)
end
function experiments.enable(...)
- report("experiments","enabling: %s",concat({...}," "))
+ e_report("enabling: %s",concat({...}," "))
e_enable(...)
end
function experiments.disable(...)
- report("experiments","disabling: %s",concat({...}," "))
+ e_report("disabling: %s",concat({...}," "))
e_disable(...)
end
@@ -4967,20 +4962,19 @@ if not modules then modules = { } end modules ['trac-log'] = {
license = "see context related readme files"
}
--- xml logging is only usefull in normal runs, not in ini mode
--- it looks like some tex logging (like filenames) is broken (no longer
--- interceoted at the tex end so the xml variant is not that useable now)
+-- todo: less categories, more subcategories (e.g. nodes)
local write_nl, write = texio and texio.write_nl or print, texio and texio.write or io.write
-local format, gmatch = string.format, string.gmatch
+local format, gmatch, find = string.format, string.gmatch, string.find
+local concat = table.concat
+local escapedpattern = string.escapedpattern
local texcount = tex and tex.count
+local next, type = next, type
--[[ldx--
-<p>This is a prelude to a more extensive logging module. For the sake
-of parsing log files, in addition to the standard logging we will
-provide an <l n='xml'/> structured file. Actually, any logging that
-is hooked into callbacks will be \XML\ by default.</p>
+<p>This is a prelude to a more extensive logging module. We no longer
+provide <l n='xml'/> based logging a sparsing is relatively easy anyway.</p>
--ldx]]--
logs = logs or { }
@@ -4998,96 +4992,239 @@ webpage : http://www.pragma-ade.nl / http://tex.aanhet.net
wiki : http://contextgarden.net
]]
-local functions = {
- 'report', 'status', 'start', 'stop', 'push', 'pop', 'line', 'direct',
- 'start_run', 'stop_run',
- 'start_page_number', 'stop_page_number',
- 'report_output_pages', 'report_output_log',
- 'report_tex_stat', 'report_job_stat',
- 'show_open', 'show_close', 'show_load',
- 'dummy',
-}
+-- local functions = {
+-- 'report', 'status', 'start', 'stop', 'line', 'direct',
+-- 'start_run', 'stop_run',
+-- 'start_page_number', 'stop_page_number',
+-- 'report_output_pages', 'report_output_log',
+-- 'report_tex_stat', 'report_job_stat',
+-- 'show_open', 'show_close', 'show_load',
+-- 'dummy',
+-- }
-local method = "nop"
+-- basic loggers
-function logs.setmethod(newmethod)
- method = newmethod
- -- a direct copy might be faster but let's try this for a while
- setmetatable(logs, { __index = logs[method] })
-end
+local function ignore() end
-function logs.getmethod()
- return method
-end
+setmetatable(logs, { __index = function(t,k) t[k] = ignore ; return ignore end })
--- installer
+-- local separator = (tex and (tex.jobname or tex.formatname)) and ">" or "|"
-local data = { }
+local report, subreport
-function logs.new(category)
- local logger = data[category]
- if not logger then
- logger = function(...)
- logs.report(category,...)
+if tex and tex.jobname or tex.formatname then
+
+ report = function(a,b,c,...)
+ if c then
+ write_nl(format("%-15s > %s\n",a,format(b,c,...)))
+ elseif b then
+ write_nl(format("%-15s > %s\n",a,b))
+ elseif a then
+ write_nl(format("%-15s >\n", a))
+ else
+ write_nl("\n")
end
- data[category] = logger
end
- return logger
-end
+ subreport = function(a,sub,b,c,...)
+ if c then
+ write_nl(format("%-15s > %s > %s\n",a,sub,format(b,c,...)))
+ elseif b then
+ write_nl(format("%-15s > %s > %s\n",a,sub,b))
+ elseif a then
+ write_nl(format("%-15s > %s >\n", a,sub))
+ else
+ write_nl("\n")
+ end
+ end
--- nop logging (maybe use __call instead)
-
-local noplog = { } logs.nop = noplog setmetatable(logs, { __index = noplog })
+else
-for i=1,#functions do
- noplog[functions[i]] = function() end
-end
+ report = function(a,b,c,...)
+ if c then
+ write_nl(format("%-15s | %s",a,format(b,c,...)))
+ elseif b then
+ write_nl(format("%-15s | %s",a,b))
+ elseif a then
+ write_nl(format("%-15s |", a))
+ else
+ write_nl("")
+ end
+ end
--- tex logging
+ subreport = function(a,sub,b,c,...)
+ if c then
+ write_nl(format("%-15s | %s | %s",a,sub,format(b,c,...)))
+ elseif b then
+ write_nl(format("%-15s | %s | %s",a,sub,b))
+ elseif a then
+ write_nl(format("%-15s | %s |", a,sub))
+ else
+ write_nl("")
+ end
+ end
-local texlog = { } logs.tex = texlog setmetatable(texlog, { __index = noplog })
+end
-function texlog.report(a,b,c,...)
+function logs.status(a,b,c,...) -- at the tex end
if c then
- write_nl(format("%-16s> %s\n",a,format(b,c,...)))
+ write_nl(format("%-15s : %s\n",a,format(b,c,...)))
elseif b then
- write_nl(format("%-16s> %s\n",a,b))
+ write_nl(format("%-15s : %s\n",a,b)) -- b can have %'s
+ elseif a then
+ write_nl(format("%-15s :\n", a))
else
- write_nl(format("%-16s>\n",a))
+ write_nl("\n")
end
end
-function texlog.status(a,b,c,...)
- if c then
- write_nl(format("%-16s: %s\n",a,format(b,c,...)))
- elseif b then
- write_nl(format("%-16s: %s\n",a,b)) -- b can have %'s
- else
- write_nl(format("%-16s:>\n",a))
+logs.report = report
+logs.subreport = subreport
+
+-- installer
+
+-- todo: renew (un) locks when a new one is added and wildcard
+
+local data, states = { }, nil
+
+function logs.reporter(category,subcategory)
+ local logger = data[category]
+ if not logger then
+ local state = false
+ if states == true then
+ state = true
+ elseif type(states) == "table" then
+ for c, _ in next, states do
+ if find(category,c) then
+ state = true
+ break
+ end
+ end
+ end
+ logger = {
+ reporters = { },
+ state = state,
+ }
+ data[category] = logger
+ end
+ local reporter = logger.reporters[subcategory or "default"]
+ if not reporter then
+ if subcategory then
+ reporter = function(...)
+ if not logger.state then
+ subreport(category,subcategory,...)
+ end
+ end
+ logger.reporters[subcategory] = reporter
+ else
+ local tag = category
+ reporter = function(...)
+ if not logger.state then
+ report(category,...)
+ end
+ end
+ logger.reporters.default = reporter
+ end
end
+ return reporter
end
-function texlog.line(fmt,...) -- new
- if fmt then
- write_nl(format(fmt,...))
+logs.new = logs.reporter
+
+local function doset(category,value)
+ if category == true then
+ -- lock all
+ category, value = "*", true
+ elseif category == false then
+ -- unlock all
+ category, value = "*", false
+ elseif value == nil then
+ -- lock selective
+ value = true
+ end
+ if category == "*" then
+ states = value
+ for k, v in next, data do
+ v.state = value
+ end
else
- write_nl("")
+ states = utilities.parsers.settings_to_hash(category)
+ for c, _ in next, states do
+ if data[c] then
+ v.state = value
+ else
+ c = escapedpattern(c,true)
+ for k, v in next, data do
+ if find(k,c) then
+ v.state = value
+ end
+ end
+ end
+ end
+ end
+end
+
+function logs.disable(category,value)
+ doset(category,value == nil and true or value)
+end
+
+function logs.enable(category)
+ doset(category,false)
+end
+
+function logs.categories()
+ return table.sortedkeys(data)
+end
+
+function logs.show()
+ local n, c, s, max = 0, 0, 0, 0
+ for category, v in table.sortedpairs(data) do
+ n = n + 1
+ local state = v.state
+ local reporters = v.reporters
+ local nc = #category
+ if nc > c then
+ c = nc
+ end
+ for subcategory, _ in next, reporters do
+ local ns = #subcategory
+ if ns > c then
+ s = ns
+ end
+ local m = nc + ns
+ if m > max then
+ max = m
+ end
+ end
+ local subcategories = concat(table.sortedkeys(reporters),", ")
+ if state == true then
+ state = "disabled"
+ elseif state == false then
+ state = "enabled"
+ else
+ state = "unknown"
+ end
+ -- no new here
+ report("logging","category: '%s', subcategories: '%s', state: '%s'",category,subcategories,state)
end
+ report("logging","categories: %s, max category: %s, max subcategory: %s, max combined: %s",n,c,s,max)
end
+directives.register("logs.blocked", function(v)
+ doset(v,true)
+end)
+-- tex specific loggers (might move elsewhere)
+local report_pages = logs.reporter("pages") -- not needed but saves checking when we grep for it
local real, user, sub
-function texlog.start_page_number()
+function logs.start_page_number()
real, user, sub = texcount.realpageno, texcount.userpageno, texcount.subpageno
end
-local report_pages = logs.new("pages") -- not needed but saves checking when we grep for it
-
-function texlog.stop_page_number()
+function logs.stop_page_number()
if real > 0 then
if user > 0 then
if sub > 0 then
@@ -5104,176 +5241,98 @@ function texlog.stop_page_number()
io.flush()
end
-texlog.report_job_stat = statistics and statistics.showjobstat
+logs.report_job_stat = statistics and statistics.showjobstat
--- xml logging
+local report_files = logs.reporter("files")
-local xmllog = { } logs.xml = xmllog setmetatable(xmllog, { __index = noplog })
+local nesting = 0
+local verbose = false
-function xmllog.report(category,fmt,s,...) -- new
- if s then
- write_nl(format("<r category='%s'>%s</r>",category,format(fmt,s,...)))
- elseif fmt then
- write_nl(format("<r category='%s'>%s</r>",category,fmt))
- else
- write_nl(format("<r category='%s'/>",category))
+function logs.show_open(name)
+ if verbose then
+ nesting = nesting + 1
+ report_files("level %s, opening %s",nesting,name)
end
end
-function xmllog.status(category,fmt,s,...)
- if s then
- write_nl(format("<s category='%s'>%s</r>",category,format(fmt,s,...)))
- elseif fmt then
- write_nl(format("<s category='%s'>%s</r>",category,fmt))
- else
- write_nl(format("<s category='%s'/>",category))
+function logs.show_close(name)
+ if verbose then
+ report_files("level %s, closing %s",nesting,name)
+ nesting = nesting - 1
end
end
-function xmllog.line(fmt,...) -- new
- if fmt then
- write_nl(format("<r>%s</r>",format(fmt,...)))
- else
- write_nl("<r/>")
+function logs.show_load(name)
+ if verbose then
+ report_files("level %s, loading %s",nesting+1,name)
end
end
-function xmllog.start() write_nl("<%s>" ) end
-function xmllog.stop () write_nl("</%s>") end
-function xmllog.push () write_nl("<!-- ") end
-function xmllog.pop () write_nl(" -->" ) end
-
-function xmllog.start_run()
- write_nl("<?xml version='1.0' standalone='yes'?>")
- write_nl("<job>") -- xmlns='www.pragma-ade.com/luatex/schemas/context-job.rng'
- write_nl("")
-end
-
-function xmllog.stop_run()
- write_nl("</job>")
-end
-
-function xmllog.start_page_number()
- write_nl(format("<p real='%s' page='%s' sub='%s'", texcount.realpageno, texcount.userpageno, texcount.subpageno))
-end
-
-function xmllog.stop_page_number()
- write("/>")
- write_nl("")
-end
+-- there may be scripts out there using this:
-function xmllog.report_output_pages(p,b)
- write_nl(format("<v k='pages' v='%s'/>", p))
- write_nl(format("<v k='bytes' v='%s'/>", b))
- write_nl("")
-end
-
-function xmllog.report_output_log()
- -- nothing
-end
+local simple = logs.reporter("comment")
-function xmllog.report_tex_stat(k,v)
- write_nl("log","<v k='"..k.."'>"..tostring(v).."</v>")
-end
-
-local nesting = 0
-
-function xmllog.show_open(name)
- nesting = nesting + 1
- write_nl(format("<f l='%s' n='%s'>",nesting,name))
-end
+logs.simple = simple
+logs.simpleline = simple
-function xmllog.show_close(name)
- write("</f> ")
- nesting = nesting - 1
-end
-
-function xmllog.show_load(name)
- write_nl(format("<f l='%s' n='%s'/>",nesting+1,name))
-end
-
--- initialization
-
-if tex and (tex.jobname or tex.formatname) then
- -- todo: this can be set in mtxrun ... or maybe we should just forget about this alternative format
- if (os.getenv("mtx.directives.logmethod") or os.getenv("mtx_directives_logmethod")) == "xml" then
- logs.setmethod('xml')
- else
- logs.setmethod('tex')
- end
-else
- logs.setmethod('nop')
-end
+-- obsolete
--- logging in runners -> these are actually the nop loggers
+function logs.setprogram () end -- obsolete
+function logs.extendbanner() end -- obsolete
+function logs.reportlines () end -- obsolete
+function logs.reportbanner() end -- obsolete
+function logs.reportline () end -- obsolete
+function logs.simplelines () end -- obsolete
+function logs.help () end -- obsolete
-local name, banner = 'report', 'context'
+-- applications
-function noplog.report(category,fmt,...) -- todo: fmt,s
- if fmt then
- write_nl(format("%s | %s: %s",name,category,format(fmt,...)))
- elseif category then
- write_nl(format("%s | %s",name,category))
- else
- write_nl(format("%s |",name))
+local function reportlines(t,str)
+ if str then
+ for line in gmatch(str,"(.-)[\n\r]") do
+ t.report(line)
+ end
end
end
-noplog.status = noplog.report -- just to be sure, never used
-
-function noplog.simple(fmt,...) -- todo: fmt,s
- if fmt then
- write_nl(format("%s | %s",name,format(fmt,...)))
- else
- write_nl(format("%s |",name))
+local function reportbanner(t)
+ local banner = t.banner
+ if banner then
+ t.report(banner)
+ t.report()
end
end
-if utilities then
- utilities.report = function(...) logs.simple(...) end
-end
-
-function logs.setprogram(newname,newbanner)
- name, banner = newname, newbanner
-end
-
-function logs.extendbanner(newbanner)
- banner = banner .. " | ".. newbanner
-end
-
-function logs.reportlines(str) -- todo: <lines></lines>
- for line in gmatch(str,"(.-)[\n\r]") do
- logs.report(line)
+local function reporthelp(t,...)
+ local helpinfo = t.helpinfo
+ if type(helpinfo) == "string" then
+ reportlines(t,helpinfo)
+ elseif type(helpinfo) == "table" then
+ local tags = { ... }
+ for i=1,#tags do
+ reportlines(t,t.helpinfo[tags[i]])
+ if i < #tags then
+ t.report()
+ end
+ end
end
end
-function logs.reportline() -- for scripts too
- logs.report()
-end
-
-function logs.simpleline()
- logs.report()
+local function reportinfo(t)
+ t.report()
+ reportlines(t,moreinfo)
end
-function logs.simplelines(str) -- todo: <lines></lines>
- for line in gmatch(str,"(.-)[\n\r]") do
- logs.simple(line)
- end
+function logs.application(t)
+ t.name = t.name or "unknown"
+ t.banner = t.banner
+ t.report = logs.reporter(t.name)
+ t.help = function(...) reportbanner(t) ; reporthelp(t,...) ; reportinfo(t) end
+ t.identify = function() reportbanner(t) end
+ return t
end
-function logs.reportbanner() -- for scripts too
- logs.report(banner)
-end
-
-function logs.help(message,option)
- logs.reportbanner()
- logs.reportline()
- logs.reportlines(message)
- if option ~= "nomoreinfo" then
- logs.reportline()
- logs.reportlines(moreinfo)
- end
-end
+-- somewhat special
-- logging to a file
@@ -5281,7 +5340,7 @@ end
function logs.system(whereto,process,jobname,category,...)
local message = format("%s %s => %s => %s => %s\r",os.date("%d/%m/%y %H:%m:%S"),process,jobname,category,format(...))
for i=1,10 do
- local f = io.open(whereto,"a")
+ local f = io.open(whereto,"a") -- we can consider keepint the file open
if f then
f:write(message)
f:close()
@@ -5292,30 +5351,24 @@ function logs.system(whereto,process,jobname,category,...)
end
end
--- bonus
-
-function logs.fatal(where,...)
- logs.report(where,"fatal error: %s, aborting now",format(...))
- os.exit()
-end
-
+local report_system = logs.reporter("system","logs")
function logs.obsolete(old,new)
local o = loadstring("return " .. new)()
if type(o) == "function" then
return function(...)
- logs.report("system","function %s is obsolete, use %s",old,new)
+ report_system("function %s is obsolete, use %s",old,new)
loadstring(old .. "=" .. new .. " return ".. old)()(...)
end
elseif type(o) == "table" then
local t, m = { }, { }
m.__index = function(t,k)
- logs.report("system","table %s is obsolete, use %s",old,new)
+ report_system("table %s is obsolete, use %s",old,new)
m.__index, m.__newindex = o, o
return o[k]
end
m.__newindex = function(t,k,v)
- logs.report("system","table %s is obsolete, use %s",old,new)
+ report_system("table %s is obsolete, use %s",old,new)
m.__index, m.__newindex = o, o
o[k] = v
end
@@ -5327,6 +5380,10 @@ function logs.obsolete(old,new)
end
end
+if utilities then
+ utilities.report = report_system
+end
+
if tex and tex.error then
function logs.texerrormessage(...) -- for the moment we put this function here
tex.error(format(...), { })
@@ -5361,7 +5418,7 @@ local getmetatable, setmetatable, rawset, type = getmetatable, setmetatable, raw
local trace_namespaces = false trackers.register("system.namespaces", function(v) trace_namespaces = v end)
-local report_system = logs.new("system")
+local report_system = logs.new("system","protection")
namespaces = namespaces or { }
local namespaces = namespaces
@@ -5530,7 +5587,7 @@ if not modules then modules = { } end modules ['luat-env'] = {
local trace_locating = false trackers.register("resolvers.locating", function(v) trace_locating = v end)
-local report_resolvers = logs.new("resolvers")
+local report_lua = logs.new("resolvers","lua")
local allocate, mark = utilities.storage.allocate, utilities.storage.mark
@@ -5754,14 +5811,14 @@ function environment.luafilechunk(filename,silent) -- used for loading lua bytec
if fullname and fullname ~= "" then
local data = environment.loadedluacode(fullname)
if trace_locating then
- report_resolvers("loading file %s%s", fullname, not data and " failed" or "")
+ report_lua("loading file %s%s", fullname, not data and " failed" or "")
elseif not silent then
texio.write("<",data and "+ " or "- ",fullname,">")
end
return data
else
if trace_locating then
- report_resolvers("unknown file %s", filename)
+ report_lua("unknown file %s", filename)
end
return nil
end
@@ -5781,7 +5838,7 @@ function environment.loadluafile(filename, version)
local fullname = (lucname and environment.luafile(lucname)) or ""
if fullname ~= "" then
if trace_locating then
- report_resolvers("loading %s", fullname)
+ report_lua("loading %s", fullname)
end
chunk = loadfile(fullname) -- this way we don't need a file exists check
end
@@ -5799,7 +5856,7 @@ function environment.loadluafile(filename, version)
return true
else
if trace_locating then
- report_resolvers("version mismatch for %s: lua=%s, luc=%s", filename, v, version)
+ report_lua("version mismatch for %s: lua=%s, luc=%s", filename, v, version)
end
environment.loadluafile(filename)
end
@@ -5810,12 +5867,12 @@ function environment.loadluafile(filename, version)
fullname = (luaname and environment.luafile(luaname)) or ""
if fullname ~= "" then
if trace_locating then
- report_resolvers("loading %s", fullname)
+ report_lua("loading %s", fullname)
end
chunk = loadfile(fullname) -- this way we don't need a file exists check
if not chunk then
if trace_locating then
- report_resolvers("unknown file %s", filename)
+ report_lua("unknown file %s", filename)
end
else
assert(chunk)()
@@ -5844,7 +5901,7 @@ if not modules then modules = { } end modules ['lxml-tab'] = {
local trace_entities = false trackers.register("xml.entities", function(v) trace_entities = v end)
-local report_xml = logs.new("xml")
+local report_xml = logs and logs.new("xml","core") or function(...) print(format(...)) end
--[[ldx--
<p>The parser used here is inspired by the variant discussed in the lua book, but
@@ -6518,7 +6575,7 @@ function xml.is_valid(root)
return root and not root.error
end
-xml.errorhandler = (logs and logs.report) or (input and logs.report) or print
+xml.errorhandler = report
--[[ldx--
<p>We cannot load an <l n='lpeg'/> from a filehandle so we need to load
@@ -7069,7 +7126,7 @@ local trace_lpath = false if trackers then trackers.register("xml.path",
local trace_lparse = false if trackers then trackers.register("xml.parse", function(v) trace_lparse = v end) end
local trace_lprofile = false if trackers then trackers.register("xml.profile", function(v) trace_lpath = v trace_lparse = v trace_lprofile = v end) end
-local report_lpath = logs.new("lpath")
+local report_lpath = logs.new("xml","lpath")
--[[ldx--
<p>We've now arrived at an interesting part: accessing the tree using a subset
@@ -7951,9 +8008,9 @@ local function traced_apply(list,parsed,nofparsed,order)
if trace_lparse then
lshow(parsed)
end
- report_lpath("collecting : %s",parsed.pattern)
- report_lpath(" root tags : %s",tagstostring(list))
- report_lpath(" order : %s",order or "unset")
+ report_lpath("collecting: %s",parsed.pattern)
+ report_lpath("root tags : %s",tagstostring(list))
+ report_lpath("order : %s",order or "unset")
local collected = list
for i=1,nofparsed do
local pi = parsed[i]
@@ -9224,7 +9281,7 @@ local trace_locating = false trackers.register("resolvers.locating", functi
local trace_detail = false trackers.register("resolvers.details", function(v) trace_detail = v end)
local trace_expansions = false trackers.register("resolvers.expansions", function(v) trace_expansions = v end)
-local report_resolvers = logs.new("resolvers")
+local report_initialization = logs.new("resolvers","initialization")
local ostype, osname, ossetenv, osgetenv = os.type, os.name, os.setenv, os.getenv
@@ -9245,7 +9302,7 @@ kpse = { original = kpse }
setmetatable(kpse, {
__index = function(kp,name)
- report_resolvers("fatal error: kpse library is accessed (key: %s)",name)
+ report_initialization("fatal error: kpse library is accessed (key: %s)",name)
os.exit()
end
} )
@@ -9329,13 +9386,13 @@ do
if lfs.chdir(p) then
local pp = lfs.currentdir()
if trace_locating and p ~= pp then
- report_resolvers("following symlink '%s' to '%s'",p,pp)
+ report_initialization("following symlink '%s' to '%s'",p,pp)
end
ownpath = pp
lfs.chdir(olddir)
else
if trace_locating then
- report_resolvers("unable to check path '%s'",p)
+ report_initialization("unable to check path '%s'",p)
end
ownpath = p
end
@@ -9346,9 +9403,9 @@ do
end
if not ownpath or ownpath == "" then
ownpath = "."
- report_resolvers("forcing fallback ownpath .")
+ report_initialization("forcing fallback ownpath .")
elseif trace_locating then
- report_resolvers("using ownpath '%s'",ownpath)
+ report_initialization("using ownpath '%s'",ownpath)
end
end
@@ -9375,7 +9432,7 @@ do
ossetenv('SELFAUTODIR', file.collapsepath(ownpath .. "/.."))
ossetenv('SELFAUTOPARENT', file.collapsepath(ownpath .. "/../.."))
else
- report_resolvers("error: unable to locate ownpath")
+ report_initialization("error: unable to locate ownpath")
os.exit()
end
@@ -9461,7 +9518,7 @@ local collapsepath = file.collapsepath
local trace_locating = false trackers.register("resolvers.locating", function(v) trace_locating = v end)
local trace_expansions = false trackers.register("resolvers.expansions", function(v) trace_expansions = v end)
-local report_resolvers = logs.new("resolvers")
+local report_expansions = logs.new("resolvers","expansions")
local resolvers = resolvers
@@ -9524,7 +9581,7 @@ local replacer_1 = lpeg.replacer { { ",}", ",@}" }, { "{,", "{@," }, }
local function splitpathexpr(str, newlist, validate) -- I couldn't resist lpegging it (nice exercise).
if trace_expansions then
- report_resolvers("expanding variable '%s'",str)
+ report_expansions("expanding variable '%s'",str)
end
local t, ok, done = newlist or { }, false, false
local n = #t
@@ -9550,7 +9607,7 @@ local function splitpathexpr(str, newlist, validate) -- I couldn't resist lpeggi
end
if trace_expansions then
for k=1,#t do
- report_resolvers("% 4i: %s",k,t[k])
+ report_expansions("% 4i: %s",k,t[k])
end
end
return t
@@ -9585,7 +9642,7 @@ function resolvers.cleanpath(str)
homedir = lpegmatch(cleanup,environment.homedir or "")
if homedir == string.char(127) or homedir == "" or not lfs.isdir(homedir) then
if trace_expansions then
- report_resolvers("no home dir set, ignoring dependent paths")
+ report_expansions("no home dir set, ignoring dependent paths")
end
function resolvers.cleanpath(str)
if find(str,"~") then
@@ -9655,9 +9712,9 @@ local function splitconfigurationpath(str) -- beware, this can be either a path
end
end
if trace_expansions then
- report_resolvers("splitting path specification '%s'",str)
+ report_expansions("splitting path specification '%s'",str)
for k=1,noffound do
- report_resolvers("% 4i: %s",k,found[k])
+ report_expansions("% 4i: %s",k,found[k])
end
end
cache[str] = found
@@ -9742,7 +9799,7 @@ end
function resolvers.scanfiles(path,branch)
if trace_locating then
- report_resolvers("scanning path '%s', branch '%s'",path, branch or path)
+ report_expansions("scanning path '%s', branch '%s'",path, branch or path)
end
local realpath = resolvers.resolve(path) -- no shortcut
local files, n, m, r = scan({ },realpath .. '/',"",0,0,0)
@@ -9751,7 +9808,7 @@ function resolvers.scanfiles(path,branch)
files.__directories__ = m
files.__remappings__ = r
if trace_locating then
- report_resolvers("%s files found on %s directories with %s uppercase remappings",n,m,r)
+ report_expansions("%s files found on %s directories with %s uppercase remappings",n,m,r)
end
return files
end
@@ -10080,8 +10137,8 @@ local mkdirs, isdir = dir.mkdirs, lfs.isdir
local trace_locating = false trackers.register("resolvers.locating", function(v) trace_locating = v end)
local trace_cache = false trackers.register("resolvers.cache", function(v) trace_cache = v end)
-local report_cache = logs.new("cache")
-local report_resolvers = logs.new("resolvers")
+local report_caches = logs.new("resolvers","caches")
+local report_resolvers = logs.new("resolvers","caching")
local resolvers = resolvers
@@ -10141,7 +10198,7 @@ local function identify()
if not caches.ask or io.ask(format("\nShould I create the cache path %s?",cachepath), "no", { "yes", "no" }) == "yes" then
mkdirs(cachepath)
if isdir(cachepath) and file.is_writable(cachepath) then
- report_cache("created: %s",cachepath)
+ report_caches("created: %s",cachepath)
writable = cachepath
readables[#readables+1] = cachepath
end
@@ -10175,10 +10232,10 @@ local function identify()
-- Some extra checking. If we have no writable or readable path then we simply
-- quit.
if not writable then
- report_cache("fatal error: there is no valid writable cache path defined")
+ report_caches("fatal error: there is no valid writable cache path defined")
os.exit()
elseif #readables == 0 then
- report_cache("fatal error: there is no valid readable cache path defined")
+ report_caches("fatal error: there is no valid readable cache path defined")
os.exit()
end
-- why here
@@ -10200,9 +10257,9 @@ local function identify()
-- end
if trace_cache then
for i=1,#readables do
- report_cache("using readable path '%s' (order %s)",readables[i],i)
+ report_caches("using readable path '%s' (order %s)",readables[i],i)
end
- report_cache("using writable path '%s'",writable)
+ report_caches("using writable path '%s'",writable)
end
identify = function()
return writable, readables
@@ -10237,7 +10294,7 @@ function caches.hashed(tree)
tree = lower(tree)
local hash = md5.hex(tree)
if trace_cache or trace_locating then
- report_cache("hashing tree %s, hash %s",tree,hash)
+ report_caches("hashing tree %s, hash %s",tree,hash)
end
return hash
end
@@ -10463,7 +10520,7 @@ trackers.register("resolvers.locating", function(v) trace_methods = v end)
trackers.register("resolvers.methods", function(v) trace_methods = v end)
-local report_resolvers = logs.new("resolvers")
+local report_methods = logs.new("resolvers","methods")
local allocate = utilities.storage.allocate
@@ -10505,41 +10562,41 @@ local function methodhandler(what,first,...) -- filename can be nil or false
local resolver = namespace and namespace[scheme]
if resolver then
if trace_methods then
- report_resolvers("resolver: method=%s, how=%s, scheme=%s, argument=%s",what,how,scheme,first)
+ report_methods("resolver: method=%s, how=%s, scheme=%s, argument=%s",what,how,scheme,first)
end
return resolver(specification,...)
else
resolver = namespace.default or namespace.file
if resolver then
if trace_methods then
- report_resolvers("resolver: method=%s, how=%s, default, argument=%s",what,how,first)
+ report_methods("resolver: method=%s, how=%s, default, argument=%s",what,how,first)
end
return resolver(specification,...)
elseif trace_methods then
- report_resolvers("resolver: method=%s, how=%s, no handler",what,how)
+ report_methods("resolver: method=%s, how=%s, no handler",what,how)
end
end
elseif how == "tag" then
local resolver = namespace and namespace[first]
if resolver then
if trace_methods then
- report_resolvers("resolver: method=%s, how=%s, tag=%s",what,how,first)
+ report_methods("resolver: method=%s, how=%s, tag=%s",what,how,first)
end
return resolver(...)
else
resolver = namespace.default or namespace.file
if resolver then
if trace_methods then
- report_resolvers("resolver: method=%s, how=%s, default",what,how)
+ report_methods("resolver: method=%s, how=%s, default",what,how)
end
return resolver(...)
elseif trace_methods then
- report_resolvers("resolver: method=%s, how=%s, unknown",what,how)
+ report_methods("resolver: method=%s, how=%s, unknown",what,how)
end
end
end
else
- report_resolvers("resolver: method=%s, unknown",what)
+ report_methods("resolver: method=%s, unknown",what)
end
end
@@ -10610,7 +10667,7 @@ local trace_locating = false trackers.register("resolvers.locating", functi
local trace_detail = false trackers.register("resolvers.details", function(v) trace_detail = v end)
local trace_expansions = false trackers.register("resolvers.expansions", function(v) trace_expansions = v end)
-local report_resolvers = logs.new("resolvers")
+local report_resolving = logs.new("resolvers","resolving")
local resolvers = resolvers
@@ -10712,7 +10769,7 @@ end
function resolvers.newinstance() -- todo: all vars will become lowercase and alphanum only
if trace_locating then
- report_resolvers("creating instance")
+ report_resolving("creating instance")
end
local environment, variables, expansions, order = allocate(), allocate(), allocate(), allocate()
@@ -10830,9 +10887,9 @@ local function reportcriticalvariables()
for i=1,#resolvers.criticalvars do
local k = resolvers.criticalvars[i]
local v = resolvers.getenv(k) or "unknown" -- this one will not resolve !
- report_resolvers("variable '%s' set to '%s'",k,v)
+ report_resolving("variable '%s' set to '%s'",k,v)
end
- report_resolvers()
+ report_resolving()
end
reportcriticalvariables = function() end
end
@@ -10856,17 +10913,17 @@ local function identify_configuration_files()
if lfs.isfile(realname) then
specification[#specification+1] = filename
if trace_locating then
- report_resolvers("found configuration file '%s'",realname)
+ report_resolving("found configuration file '%s'",realname)
end
elseif trace_locating then
- report_resolvers("unknown configuration file '%s'",realname)
+ report_resolving("unknown configuration file '%s'",realname)
end
end
if trace_locating then
- report_resolvers()
+ report_resolving()
end
elseif trace_locating then
- report_resolvers("configuration files already identified")
+ report_resolving("configuration files already identified")
end
end
@@ -10886,8 +10943,8 @@ local function load_configuration_files()
data = data and data.content
if data then
if trace_locating then
- report_resolvers("loading configuration file '%s'",filename)
- report_resolvers()
+ report_resolving("loading configuration file '%s'",filename)
+ report_resolving()
end
local variables = data.variables or { }
local warning = false
@@ -10897,7 +10954,7 @@ local function load_configuration_files()
initializesetter(filename,k,v)
elseif variables[k] == nil then
if trace_locating and not warning then
- report_resolvers("variables like '%s' in configuration file '%s' should move to the 'variables' subtable",
+ report_resolving("variables like '%s' in configuration file '%s' should move to the 'variables' subtable",
k,resolvers.resolve(filename))
warning = true
end
@@ -10910,7 +10967,7 @@ local function load_configuration_files()
local cnfspec = variables["TEXMFCNF"]
if cnfspec then
if trace_locating then
- report_resolvers("reloading configuration due to TEXMF redefinition")
+ report_resolving("reloading configuration due to TEXMF redefinition")
end
-- we push the value into the main environment (osenv) so
-- that it takes precedence over the default one and therefore
@@ -10929,13 +10986,13 @@ local function load_configuration_files()
else
if trace_locating then
- report_resolvers("skipping configuration file '%s' (no content)",filename)
+ report_resolving("skipping configuration file '%s' (no content)",filename)
end
setups[pathname] = { }
instance.loaderror = true
end
elseif trace_locating then
- report_resolvers("skipping configuration file '%s' (no file)",filename)
+ report_resolving("skipping configuration file '%s' (no file)",filename)
end
instance.order[#instance.order+1] = instance.setups[pathname]
if instance.loaderror then
@@ -10943,7 +11000,7 @@ local function load_configuration_files()
end
end
elseif trace_locating then
- report_resolvers("warning: no lua configuration files found")
+ report_resolving("warning: no lua configuration files found")
end
end
@@ -10979,19 +11036,19 @@ local function locate_file_databases()
end
if trace_locating then
if runtime then
- report_resolvers("locating list of '%s' (runtime)",path)
+ report_resolving("locating list of '%s' (runtime)",path)
else
- report_resolvers("locating list of '%s' (cached)",path)
+ report_resolving("locating list of '%s' (cached)",path)
end
end
methodhandler('locators',stripped)
end
end
if trace_locating then
- report_resolvers()
+ report_resolving()
end
elseif trace_locating then
- report_resolvers("no texmf paths are defined (using TEXMF)")
+ report_resolving("no texmf paths are defined (using TEXMF)")
end
end
@@ -11002,7 +11059,7 @@ local function generate_file_databases()
methodhandler('generators',hash.name)
end
if trace_locating then
- report_resolvers()
+ report_resolving()
end
end
@@ -11014,11 +11071,11 @@ local function save_file_databases() -- will become cachers
local content = instance.files[cachename]
caches.collapsecontent(content)
if trace_locating then
- report_resolvers("saving tree '%s'",cachename)
+ report_resolving("saving tree '%s'",cachename)
end
caches.savecontent(cachename,"files",content)
elseif trace_locating then
- report_resolvers("not saving runtime tree '%s'",cachename)
+ report_resolving("not saving runtime tree '%s'",cachename)
end
end
end
@@ -11043,7 +11100,7 @@ function resolvers.appendhash(type,name,cache)
-- safeguard ... tricky as it's actually a bug when seen twice
if not instance.hashed[name] then
if trace_locating then
- report_resolvers("hash '%s' appended",name)
+ report_resolving("hash '%s' appended",name)
end
insert(instance.hashes, { type = type, name = name, cache = cache } )
instance.hashed[name] = cache
@@ -11054,7 +11111,7 @@ function resolvers.prependhash(type,name,cache)
-- safeguard ... tricky as it's actually a bug when seen twice
if not instance.hashed[name] then
if trace_locating then
- report_resolvers("hash '%s' prepended",name)
+ report_resolving("hash '%s' prepended",name)
end
insert(instance.hashes, 1, { type = type, name = name, cache = cache } )
instance.hashed[name] = cache
@@ -11287,9 +11344,9 @@ function isreadable(name)
local readable = lfs.isfile(name) -- not file.is_readable(name) asit can be a dir
if trace_detail then
if readable then
- report_resolvers("file '%s' is readable",name)
+ report_resolving("file '%s' is readable",name)
else
- report_resolvers("file '%s' is not readable", name)
+ report_resolving("file '%s' is not readable", name)
end
end
return readable
@@ -11303,7 +11360,7 @@ local function collect_files(names)
for k=1,#names do
local fname = names[k]
if trace_detail then
- report_resolvers("checking name '%s'",fname)
+ report_resolving("checking name '%s'",fname)
end
local bname = filebasename(fname)
local dname = filedirname(fname)
@@ -11319,7 +11376,7 @@ local function collect_files(names)
local files = blobpath and instance.files[blobpath]
if files then
if trace_detail then
- report_resolvers("deep checking '%s' (%s)",blobpath,bname)
+ report_resolving("deep checking '%s' (%s)",blobpath,bname)
end
local blobfile = files[bname]
if not blobfile then
@@ -11339,7 +11396,7 @@ local function collect_files(names)
local search = filejoin(blobroot,blobfile,bname)
local result = methodhandler('concatinators',hash.type,blobroot,blobfile,bname)
if trace_detail then
- report_resolvers("match: kind '%s', search '%s', result '%s'",kind,search,result)
+ report_resolving("match: kind '%s', search '%s', result '%s'",kind,search,result)
end
noffiles = noffiles + 1
filelist[noffiles] = { kind, search, result }
@@ -11353,7 +11410,7 @@ local function collect_files(names)
local search = filejoin(blobroot,vv,bname)
local result = methodhandler('concatinators',hash.type,blobroot,vv,bname)
if trace_detail then
- report_resolvers("match: kind '%s', search '%s', result '%s'",kind,search,result)
+ report_resolving("match: kind '%s', search '%s', result '%s'",kind,search,result)
end
noffiles = noffiles + 1
filelist[noffiles] = { kind, search, result }
@@ -11362,7 +11419,7 @@ local function collect_files(names)
end
end
elseif trace_locating then
- report_resolvers("no match in '%s' (%s)",blobpath,bname)
+ report_resolving("no match in '%s' (%s)",blobpath,bname)
end
end
end
@@ -11403,7 +11460,7 @@ local function collect_instance_files(filename,askedformat,allresults) -- todo :
stamp = filename .. "--" .. askedformat
if instance.found[stamp] then
if trace_locating then
- report_resolvers("remembered file '%s'",filename)
+ report_resolving("remembered file '%s'",filename)
end
resolvers.registerintrees(filename) -- for tracing used files
return instance.found[stamp]
@@ -11412,7 +11469,7 @@ local function collect_instance_files(filename,askedformat,allresults) -- todo :
if not dangerous[askedformat] then
if isreadable(filename) then
if trace_detail then
- report_resolvers("file '%s' found directly",filename)
+ report_resolving("file '%s' found directly",filename)
end
if stamp then
instance.found[stamp] = { filename }
@@ -11422,13 +11479,13 @@ local function collect_instance_files(filename,askedformat,allresults) -- todo :
end
if find(filename,'%*') then
if trace_locating then
- report_resolvers("checking wildcard '%s'", filename)
+ report_resolving("checking wildcard '%s'", filename)
end
result = resolvers.findwildcardfiles(filename) -- we can use th elocal
elseif file.is_qualified_path(filename) then
if isreadable(filename) then
if trace_locating then
- report_resolvers("qualified name '%s'", filename)
+ report_resolving("qualified name '%s'", filename)
end
result = { filename }
else
@@ -11441,7 +11498,7 @@ local function collect_instance_files(filename,askedformat,allresults) -- todo :
forcedname = filename .. "." .. s
if isreadable(forcedname) then
if trace_locating then
- report_resolvers("no suffix, forcing format filetype '%s'", s)
+ report_resolving("no suffix, forcing format filetype '%s'", s)
end
result, ok = { forcedname }, true
break
@@ -11494,7 +11551,7 @@ local function collect_instance_files(filename,askedformat,allresults) -- todo :
-- end
end
if not ok and trace_locating then
- report_resolvers("qualified name '%s'", filename)
+ report_resolving("qualified name '%s'", filename)
end
end
else
@@ -11513,13 +11570,13 @@ local function collect_instance_files(filename,askedformat,allresults) -- todo :
wantedfiles[#wantedfiles+1] = forcedname
filetype = resolvers.formatofsuffix(forcedname)
if trace_locating then
- report_resolvers("forcing filetype '%s'",filetype)
+ report_resolving("forcing filetype '%s'",filetype)
end
end
else
filetype = resolvers.formatofsuffix(filename)
if trace_locating then
- report_resolvers("using suffix based filetype '%s'",filetype)
+ report_resolving("using suffix based filetype '%s'",filetype)
end
end
else
@@ -11533,7 +11590,7 @@ local function collect_instance_files(filename,askedformat,allresults) -- todo :
end
filetype = askedformat
if trace_locating then
- report_resolvers("using given filetype '%s'",filetype)
+ report_resolving("using given filetype '%s'",filetype)
end
end
local typespec = resolvers.variableofformat(filetype)
@@ -11541,7 +11598,7 @@ local function collect_instance_files(filename,askedformat,allresults) -- todo :
if not pathlist or #pathlist == 0 then
-- no pathlist, access check only / todo == wildcard
if trace_detail then
- report_resolvers("checking filename '%s', filetype '%s', wanted files '%s'",filename, filetype or '?',concat(wantedfiles," | "))
+ report_resolving("checking filename '%s', filetype '%s', wanted files '%s'",filename, filetype or '?',concat(wantedfiles," | "))
end
for k=1,#wantedfiles do
local fname = wantedfiles[k]
@@ -11569,7 +11626,7 @@ local function collect_instance_files(filename,askedformat,allresults) -- todo :
end
end
if trace_detail then
- report_resolvers("checking filename '%s'",filename)
+ report_resolving("checking filename '%s'",filename)
end
for k=1,#pathlist do
local path = pathlist[k]
@@ -11581,7 +11638,7 @@ local function collect_instance_files(filename,askedformat,allresults) -- todo :
-- compare list entries with permitted pattern -- /xx /xx//
local expression = makepathexpression(pathname)
if trace_detail then
- report_resolvers("using pattern '%s' for path '%s'",expression,pathname)
+ report_resolving("using pattern '%s' for path '%s'",expression,pathname)
end
for k=1,#filelist do
local fl = filelist[k]
@@ -11593,16 +11650,16 @@ local function collect_instance_files(filename,askedformat,allresults) -- todo :
done = true
if allresults then
if trace_detail then
- report_resolvers("match to '%s' in hash for file '%s' and path '%s', continue scanning",expression,f,d)
+ report_resolving("match to '%s' in hash for file '%s' and path '%s', continue scanning",expression,f,d)
end
else
if trace_detail then
- report_resolvers("match to '%s' in hash for file '%s' and path '%s', quit scanning",expression,f,d)
+ report_resolving("match to '%s' in hash for file '%s' and path '%s', quit scanning",expression,f,d)
end
break
end
elseif trace_detail then
- report_resolvers("no match to '%s' in hash for file '%s' and path '%s'",expression,f,d)
+ report_resolving("no match to '%s' in hash for file '%s' and path '%s'",expression,f,d)
end
end
end
@@ -11619,7 +11676,7 @@ local function collect_instance_files(filename,askedformat,allresults) -- todo :
local fname = filejoin(ppname,w)
if isreadable(fname) then
if trace_detail then
- report_resolvers("found '%s' by scanning",fname)
+ report_resolving("found '%s' by scanning",fname)
end
result[#result+1] = fname
done = true
@@ -11824,7 +11881,7 @@ end
local function report(str)
if trace_locating then
- report_resolvers(str) -- has already verbose
+ report_resolving(str) -- has already verbose
else
print(str)
end
@@ -12219,7 +12276,7 @@ if not modules then modules = { } end modules ['data-fil'] = {
local trace_locating = false trackers.register("resolvers.locating", function(v) trace_locating = v end)
-local report_resolvers = logs.new("resolvers")
+local report_files = logs.new("resolvers","files")
local resolvers = resolvers
@@ -12233,11 +12290,11 @@ function locators.file(specification)
local realname = resolvers.resolve(name) -- no shortcut
if realname and realname ~= '' and lfs.isdir(realname) then
if trace_locating then
- report_resolvers("file locator '%s' found as '%s'",name,realname)
+ report_files("file locator '%s' found as '%s'",name,realname)
end
resolvers.appendhash('file',name,true) -- cache
elseif trace_locating then
- report_resolvers("file locator '%s' not found",name)
+ report_files("file locator '%s' not found",name)
end
end
@@ -12260,12 +12317,12 @@ function finders.file(specification,filetype)
local foundname = resolvers.findfile(filename,filetype)
if foundname and foundname ~= "" then
if trace_locating then
- report_resolvers("file finder: '%s' found",filename)
+ report_files("file finder: '%s' found",filename)
end
return foundname
else
if trace_locating then
- report_resolvers("file finder: %s' not found",filename)
+ report_files("file finder: %s' not found",filename)
end
return finders.notfound()
end
@@ -12286,13 +12343,13 @@ function openers.file(specification,filetype)
local f = io.open(filename,"r")
if f then
if trace_locating then
- report_resolvers("file opener, '%s' opened",filename)
+ report_files("file opener, '%s' opened",filename)
end
return openers.helpers.textopener("file",filename,f)
end
end
if trace_locating then
- report_resolvers("file opener, '%s' not found",filename)
+ report_files("file opener, '%s' not found",filename)
end
return openers.notfound()
end
@@ -12304,7 +12361,7 @@ function loaders.file(specification,filetype)
if f then
logs.show_load(filename)
if trace_locating then
- report_resolvers("file loader, '%s' loaded",filename)
+ report_files("file loader, '%s' loaded",filename)
end
local s = f:read("*a")
if checkgarbage then
@@ -12317,7 +12374,7 @@ function loaders.file(specification,filetype)
end
end
if trace_locating then
- report_resolvers("file loader, '%s' not found",filename)
+ report_files("file loader, '%s' not found",filename)
end
return loaders.notfound()
end
@@ -12358,11 +12415,11 @@ containers = containers or { }
local containers = containers
containers.usecache = true
-local report_cache = logs.new("cache")
+local report_containers = logs.new("resolvers","containers")
local function report(container,tag,name)
if trace_cache or trace_containers then
- report_cache("container: %s, tag: %s, name: %s",container.subcategory,tag,name or 'invalid')
+ report_containers("container: %s, tag: %s, name: %s",container.subcategory,tag,name or 'invalid')
end
end
@@ -12480,7 +12537,7 @@ local format, lower, gsub, find = string.format, string.lower, string.gsub, stri
local trace_locating = false trackers.register("resolvers.locating", function(v) trace_locating = v end)
-local report_resolvers = logs.new("resolvers")
+local report_mounts = logs.new("resolvers","mounts")
local resolvers = resolvers
@@ -12505,7 +12562,7 @@ function resolvers.automount(usecache)
-- skip
elseif find(line,"^zip://") then
if trace_locating then
- report_resolvers("mounting %s",line)
+ report_mounts("mounting %s",line)
end
table.insert(resolvers.automounted,line)
resolvers.usezipfile(line)
@@ -12585,7 +12642,7 @@ local format, find, match = string.format, string.find, string.match
local trace_locating = false trackers.register("resolvers.locating", function(v) trace_locating = v end)
-local report_resolvers = logs.new("resolvers")
+local report_zip = logs.new("resolvers","zip")
-- zip:///oeps.zip?name=bla/bla.tex
-- zip:///oeps.zip?tree=tex/texmf-local
@@ -12638,9 +12695,9 @@ function resolvers.locators.zip(specification)
local zipfile = archive and archive ~= "" and zip.openarchive(archive) -- tricky, could be in to be initialized tree
if trace_locating then
if zipfile then
- report_resolvers("zip locator, archive '%s' found",archive)
+ report_zip("locator, archive '%s' found",archive)
else
- report_resolvers("zip locator, archive '%s' not found",archive)
+ report_zip("locator, archive '%s' not found",archive)
end
end
end
@@ -12648,7 +12705,7 @@ end
function resolvers.hashers.zip(specification)
local archive = specification.filename
if trace_locating then
- report_resolvers("loading zip file '%s'",archive)
+ report_zip("loading file '%s'",archive)
end
resolvers.usezipfile(specification.original)
end
@@ -12671,25 +12728,25 @@ function resolvers.finders.zip(specification)
local zfile = zip.openarchive(archive)
if zfile then
if trace_locating then
- report_resolvers("zip finder, archive '%s' found",archive)
+ report_zip("finder, archive '%s' found",archive)
end
local dfile = zfile:open(queryname)
if dfile then
dfile = zfile:close()
if trace_locating then
- report_resolvers("zip finder, file '%s' found",queryname)
+ report_zip("finder, file '%s' found",queryname)
end
return specification.original
elseif trace_locating then
- report_resolvers("zip finder, file '%s' not found",queryname)
+ report_zip("finder, file '%s' not found",queryname)
end
elseif trace_locating then
- report_resolvers("zip finder, unknown archive '%s'",archive)
+ report_zip("finder, unknown archive '%s'",archive)
end
end
end
if trace_locating then
- report_resolvers("zip finder, '%s' not found",original)
+ report_zip("finder, '%s' not found",original)
end
return resolvers.finders.notfound()
end
@@ -12704,24 +12761,24 @@ function resolvers.openers.zip(specification)
local zfile = zip.openarchive(archive)
if zfile then
if trace_locating then
- report_resolvers("zip opener, archive '%s' opened",archive)
+ report_zip("opener, archive '%s' opened",archive)
end
local dfile = zfile:open(queryname)
if dfile then
if trace_locating then
- report_resolvers("zip opener, file '%s' found",queryname)
+ report_zip("opener, file '%s' found",queryname)
end
return resolvers.openers.helpers.textopener('zip',original,dfile)
elseif trace_locating then
- report_resolvers("zip opener, file '%s' not found",queryname)
+ report_zip("opener, file '%s' not found",queryname)
end
elseif trace_locating then
- report_resolvers("zip opener, unknown archive '%s'",archive)
+ report_zip("opener, unknown archive '%s'",archive)
end
end
end
if trace_locating then
- report_resolvers("zip opener, '%s' not found",original)
+ report_zip("opener, '%s' not found",original)
end
return resolvers.openers.notfound()
end
@@ -12736,27 +12793,27 @@ function resolvers.loaders.zip(specification)
local zfile = zip.openarchive(archive)
if zfile then
if trace_locating then
- report_resolvers("zip loader, archive '%s' opened",archive)
+ report_zip("loader, archive '%s' opened",archive)
end
local dfile = zfile:open(queryname)
if dfile then
logs.show_load(original)
if trace_locating then
- report_resolvers("zip loader, file '%s' loaded",original)
+ report_zip("loader, file '%s' loaded",original)
end
local s = dfile:read("*all")
dfile:close()
return true, s, #s
elseif trace_locating then
- report_resolvers("zip loader, file '%s' not found",queryname)
+ report_zip("loader, file '%s' not found",queryname)
end
elseif trace_locating then
- report_resolvers("zip loader, unknown archive '%s'",archive)
+ report_zip("loader, unknown archive '%s'",archive)
end
end
end
if trace_locating then
- report_resolvers("zip loader, '%s' not found",original)
+ report_zip("loader, '%s' not found",original)
end
return resolvers.openers.notfound()
end
@@ -12772,7 +12829,7 @@ function resolvers.usezipfile(archive)
if z then
local tree = url.query(specification.query).tree or ""
if trace_locating then
- report_resolvers("zip registering, registering archive '%s'",archive)
+ report_zip("registering, registering archive '%s'",archive)
end
statistics.starttiming(resolvers.instance)
resolvers.prependhash('zip',archive)
@@ -12781,10 +12838,10 @@ function resolvers.usezipfile(archive)
instance.files[archive] = resolvers.registerzipfile(z,tree)
statistics.stoptiming(resolvers.instance)
elseif trace_locating then
- report_resolvers("zip registering, unknown archive '%s'",archive)
+ report_zip("registering, unknown archive '%s'",archive)
end
elseif trace_locating then
- report_resolvers("zip registering, '%s' not found",archive)
+ report_zip("registering, '%s' not found",archive)
end
end
@@ -12796,7 +12853,7 @@ function resolvers.registerzipfile(z,tree)
filter = format("^%s/(.+)/(.-)$",tree)
end
if trace_locating then
- report_resolvers("zip registering, using filter '%s'",filter)
+ report_zip("registering, using filter '%s'",filter)
end
local register, n = resolvers.registerfile, 0
for i in z:files() do
@@ -12813,7 +12870,7 @@ function resolvers.registerzipfile(z,tree)
n = n + 1
end
end
- report_resolvers("zip registering, %s files registered",n)
+ report_zip("registering, %s files registered",n)
return files
end
@@ -12836,7 +12893,7 @@ local find, gsub, format = string.find, string.gsub, string.format
local trace_locating = false trackers.register("resolvers.locating", function(v) trace_locating = v end)
-local report_resolvers = logs.new("resolvers")
+local report_trees = logs.new("resolvers","trees")
local resolvers = resolvers
@@ -12874,18 +12931,18 @@ function resolvers.locators.tree(specification)
local name = specification.filename
if name ~= '' and lfs.isdir(name) then
if trace_locating then
- report_resolvers("tree locator '%s' found",name)
+ report_trees("locator '%s' found",name)
end
resolvers.appendhash('tree',name,false) -- don't cache
elseif trace_locating then
- report_resolvers("tree locator '%s' not found",name)
+ report_trees("locator '%s' not found",name)
end
end
function resolvers.hashers.tree(specification)
local name = specification.filename
if trace_locating then
- report_resolvers("analysing tree '%s'",name)
+ report_trees("analysing '%s'",name)
end
resolvers.methodhandler("hashers",name)
end
@@ -12981,7 +13038,7 @@ if not modules then modules = { } end modules ['data-lua'] = {
local trace_locating = false trackers.register("resolvers.locating", function(v) trace_locating = v end)
-local report_resolvers = logs.new("resolvers")
+local report_libraries = logs.new("resolvers","libraries")
local gsub, insert = string.gsub, table.insert
local unpack = unpack or table.unpack
@@ -13013,7 +13070,7 @@ local function thepath(...)
local t = { ... } t[#t+1] = "?.lua"
local path = file.join(unpack(t))
if trace_locating then
- report_resolvers("! appending '%s' to 'package.path'",path)
+ report_libraries("! appending '%s' to 'package.path'",path)
end
return path
end
@@ -13035,11 +13092,11 @@ local function loaded(libpaths,name,simple)
local libpath = libpaths[i]
local resolved = gsub(libpath,"%?",simple)
if trace_locating then -- more detail
- report_resolvers("! checking for '%s' on 'package.path': '%s' => '%s'",simple,libpath,resolved)
+ report_libraries("! checking for '%s' on 'package.path': '%s' => '%s'",simple,libpath,resolved)
end
if file.is_readable(resolved) then
if trace_locating then
- report_resolvers("! lib '%s' located via 'package.path': '%s'",name,resolved)
+ report_libraries("! lib '%s' located via 'package.path': '%s'",name,resolved)
end
return loadfile(resolved)
end
@@ -13048,17 +13105,17 @@ end
package.loaders[2] = function(name) -- was [#package.loaders+1]
if trace_locating then -- mode detail
- report_resolvers("! locating '%s'",name)
+ report_libraries("! locating '%s'",name)
end
for i=1,#libformats do
local format = libformats[i]
local resolved = resolvers.findfile(name,format) or ""
if trace_locating then -- mode detail
- report_resolvers("! checking for '%s' using 'libformat path': '%s'",name,format)
+ report_libraries("! checking for '%s' using 'libformat path': '%s'",name,format)
end
if resolved ~= "" then
if trace_locating then
- report_resolvers("! lib '%s' located via environment: '%s'",name,resolved)
+ report_libraries("! lib '%s' located via environment: '%s'",name,resolved)
end
return loadfile(resolved)
end
@@ -13081,11 +13138,11 @@ package.loaders[2] = function(name) -- was [#package.loaders+1]
local path = paths[p]
local resolved = file.join(path,libname)
if trace_locating then -- mode detail
- report_resolvers("! checking for '%s' using 'clibformat path': '%s'",libname,path)
+ report_libraries("! checking for '%s' using 'clibformat path': '%s'",libname,path)
end
if file.is_readable(resolved) then
if trace_locating then
- report_resolvers("! lib '%s' located via 'clibformat': '%s'",libname,resolved)
+ report_libraries("! lib '%s' located via 'clibformat': '%s'",libname,resolved)
end
return package.loadlib(resolved,name)
end
@@ -13095,28 +13152,28 @@ package.loaders[2] = function(name) -- was [#package.loaders+1]
local libpath = clibpaths[i]
local resolved = gsub(libpath,"?",simple)
if trace_locating then -- more detail
- report_resolvers("! checking for '%s' on 'package.cpath': '%s'",simple,libpath)
+ report_libraries("! checking for '%s' on 'package.cpath': '%s'",simple,libpath)
end
if file.is_readable(resolved) then
if trace_locating then
- report_resolvers("! lib '%s' located via 'package.cpath': '%s'",name,resolved)
+ report_libraries("! lib '%s' located via 'package.cpath': '%s'",name,resolved)
end
return package.loadlib(resolved,name)
end
end
-- just in case the distribution is messed up
if trace_loading then -- more detail
- report_resolvers("! checking for '%s' using 'luatexlibs': '%s'",name)
+ report_libraries("! checking for '%s' using 'luatexlibs': '%s'",name)
end
local resolved = resolvers.findfile(file.basename(name),'luatexlibs') or ""
if resolved ~= "" then
if trace_locating then
- report_resolvers("! lib '%s' located by basename via environment: '%s'",name,resolved)
+ report_libraries("! lib '%s' located by basename via environment: '%s'",name,resolved)
end
return loadfile(resolved)
end
if trace_locating then
- report_resolvers('? unable to locate lib: %s',name)
+ report_libraries('? unable to locate lib: %s',name)
end
-- return "unable to locate " .. name
end
@@ -13153,48 +13210,48 @@ local trace_locating = false trackers.register("resolvers.locating", function(v
local resolvers = resolvers
-local report_resolvers = logs.new("resolvers")
+local report_scripts = logs.new("resolvers","scripts")
function resolvers.updatescript(oldname,newname) -- oldname -> own.name, not per se a suffix
local scriptpath = "scripts/context/lua"
newname = file.addsuffix(newname,"lua")
local oldscript = resolvers.cleanpath(oldname)
if trace_locating then
- report_resolvers("to be replaced old script %s", oldscript)
+ report_scripts("to be replaced old script %s", oldscript)
end
local newscripts = resolvers.findfiles(newname) or { }
if #newscripts == 0 then
if trace_locating then
- report_resolvers("unable to locate new script")
+ report_scripts("unable to locate new script")
end
else
for i=1,#newscripts do
local newscript = resolvers.cleanpath(newscripts[i])
if trace_locating then
- report_resolvers("checking new script %s", newscript)
+ report_scripts("checking new script %s", newscript)
end
if oldscript == newscript then
if trace_locating then
- report_resolvers("old and new script are the same")
+ report_scripts("old and new script are the same")
end
elseif not find(newscript,scriptpath) then
if trace_locating then
- report_resolvers("new script should come from %s",scriptpath)
+ report_scripts("new script should come from %s",scriptpath)
end
elseif not (find(oldscript,file.removesuffix(newname).."$") or find(oldscript,newname.."$")) then
if trace_locating then
- report_resolvers("invalid new script name")
+ report_scripts("invalid new script name")
end
else
local newdata = io.loaddata(newscript)
if newdata then
if trace_locating then
- report_resolvers("old script content replaced by new content")
+ report_scripts("old script content replaced by new content")
end
io.savedata(oldscript,newdata)
break
elseif trace_locating then
- report_resolvers("unable to load new script")
+ report_scripts("unable to load new script")
end
end
end
@@ -13216,6 +13273,8 @@ if not modules then modules = { } end modules ['data-tmf'] = {
local resolvers = resolvers
+local report_tds = logs.new("resolvers","tds")
+
-- = <<
-- ? ??
-- < +=
@@ -13236,11 +13295,11 @@ function resolvers.load_tree(tree,resolve)
local newpath = file.join(newtree,"bin")
if not lfs.isdir(newtree) then
- logs.simple("no '%s' under tree %s",texos,tree)
+ report_tds("no '%s' under tree %s",texos,tree)
os.exit()
end
if not lfs.isdir(newpath) then
- logs.simple("no '%s/bin' under tree %s",texos,tree)
+ report_tds("no '%s/bin' under tree %s",texos,tree)
os.exit()
end
@@ -13264,9 +13323,9 @@ function resolvers.load_tree(tree,resolve)
setenv('TEXMFCNF', resolvers.luacnfspec, not resolve)
setenv("PATH", newpath .. io.pathseparator .. getenv("PATH"))
- logs.simple("changing from root '%s' to '%s'",oldroot,newroot)
- logs.simple("prepending '%s' to binary path",newpath)
- logs.simple()
+ report_tds("changing from root '%s' to '%s'",oldroot,newroot)
+ report_tds("prepending '%s' to binary path",newpath)
+ report_tds()
end
end
@@ -13291,6 +13350,8 @@ resolvers.listers = resolvers.listers or { }
local resolvers = resolvers
+local report_lists = logs.new("resolvers","lists")
+
local function tabstr(str)
if type(str) == 'table' then
return concat(str," | ")
@@ -13319,11 +13380,11 @@ function resolvers.listers.variables(pattern)
local exp = table.fastcopy(expansions)
for key, value in table.sortedpairs(configured) do
if key ~= "" and (pattern == "" or find(upper(key),pattern)) then
- logs.simple(key)
- logs.simple(" env: %s",tabstr(rawget(environment,key)) or "unset")
- logs.simple(" var: %s",tabstr(configured[key]) or "unset")
- logs.simple(" exp: %s",tabstr(expansions[key]) or "unset")
- logs.simple(" res: %s",resolvers.resolve(expansions[key]) or "unset")
+ report_lists(key)
+ report_lists(" env: %s",tabstr(rawget(environment,key)) or "unset")
+ report_lists(" var: %s",tabstr(configured[key]) or "unset")
+ report_lists(" exp: %s",tabstr(expansions[key]) or "unset")
+ report_lists(" res: %s",resolvers.resolve(expansions[key]) or "unset")
end
end
instance.environment = table.fastcopy(env)
@@ -13477,6 +13538,8 @@ if not modules then modules = { } end modules ['luat-fmt'] = {
local format = string.format
+local report_format = logs.new("resolvers","formats")
+
-- helper for mtxrun
local quoted = string.quoted
@@ -13501,7 +13564,7 @@ function environment.make_format(name)
if path ~= "" then
lfs.chdir(path)
end
- logs.simple("format path: %s",lfs.currentdir())
+ report_format("format path: %s",lfs.currentdir())
-- check source file
local texsourcename = file.addsuffix(name,"mkiv")
local fulltexsourcename = resolvers.findfile(texsourcename,"tex") or ""
@@ -13510,11 +13573,11 @@ function environment.make_format(name)
fulltexsourcename = resolvers.findfile(texsourcename,"tex") or ""
end
if fulltexsourcename == "" then
- logs.simple("no tex source file with name: %s (mkiv or tex)",name)
+ report_format("no tex source file with name: %s (mkiv or tex)",name)
lfs.chdir(olddir)
return
else
- logs.simple("using tex source file: %s",fulltexsourcename)
+ report_format("using tex source file: %s",fulltexsourcename)
end
local texsourcepath = dir.expandname(file.dirname(fulltexsourcename)) -- really needed
-- check specification
@@ -13525,7 +13588,7 @@ function environment.make_format(name)
fullspecificationname = resolvers.findfile(specificationname,"tex") or ""
end
if fullspecificationname == "" then
- logs.simple("unknown stub specification: %s",specificationname)
+ report_format("unknown stub specification: %s",specificationname)
lfs.chdir(olddir)
return
end
@@ -13536,39 +13599,39 @@ function environment.make_format(name)
if type(usedlualibs) == "string" then
usedluastub = file.join(file.dirname(fullspecificationname),usedlualibs)
elseif type(usedlualibs) == "table" then
- logs.simple("using stub specification: %s",fullspecificationname)
+ report_format("using stub specification: %s",fullspecificationname)
local texbasename = file.basename(name)
local luastubname = file.addsuffix(texbasename,"lua")
local lucstubname = file.addsuffix(texbasename,"luc")
-- pack libraries in stub
- logs.simple("creating initialization file: %s",luastubname)
+ report_format("creating initialization file: %s",luastubname)
utilities.merger.selfcreate(usedlualibs,specificationpath,luastubname)
-- compile stub file (does not save that much as we don't use this stub at startup any more)
local strip = resolvers.booleanvariable("LUACSTRIP", true)
if utilities.lua.compile(luastubname,lucstubname) and lfs.isfile(lucstubname) then
- logs.simple("using compiled initialization file: %s",lucstubname)
+ report_format("using compiled initialization file: %s",lucstubname)
usedluastub = lucstubname
else
- logs.simple("using uncompiled initialization file: %s",luastubname)
+ report_format("using uncompiled initialization file: %s",luastubname)
usedluastub = luastubname
end
else
- logs.simple("invalid stub specification: %s",fullspecificationname)
+ report_format("invalid stub specification: %s",fullspecificationname)
lfs.chdir(olddir)
return
end
-- generate format
local command = format("luatex --ini %s --lua=%s %s %sdump",primaryflags(),quoted(usedluastub),quoted(fulltexsourcename),os.platform == "unix" and "\\\\" or "\\")
- logs.simple("running command: %s\n",command)
+ report_format("running command: %s\n",command)
os.spawn(command)
-- remove related mem files
local pattern = file.removesuffix(file.basename(usedluastub)).."-*.mem"
- -- logs.simple("removing related mplib format with pattern '%s'", pattern)
+ -- report_format("removing related mplib format with pattern '%s'", pattern)
local mp = dir.glob(pattern)
if mp then
for i=1,#mp do
local name = mp[i]
- logs.simple("removing related mplib format %s", file.basename(name))
+ report_format("removing related mplib format %s", file.basename(name))
os.remove(name)
end
end
@@ -13585,7 +13648,7 @@ function environment.run_format(name,data,more)
end
fmtname = resolvers.cleanpath(fmtname)
if fmtname == "" then
- logs.simple("no format with name: %s",name)
+ report_format("no format with name: %s",name)
else
local barename = file.removesuffix(name) -- expanded name
local luaname = file.addsuffix(barename,"luc")
@@ -13593,11 +13656,11 @@ function environment.run_format(name,data,more)
luaname = file.addsuffix(barename,"lua")
end
if not lfs.isfile(luaname) then
- logs.simple("using format name: %s",fmtname)
- logs.simple("no luc/lua with name: %s",barename)
+ report_format("using format name: %s",fmtname)
+ report_format("no luc/lua with name: %s",barename)
else
local command = format("luatex %s --fmt=%s --lua=%s %s %s",primaryflags(),quoted(barename),quoted(luaname),quoted(data),more ~= "" and quoted(more) or "")
- logs.simple("running command: %s",command)
+ report_format("running command: %s",command)
os.spawn(command)
end
end
@@ -13750,8 +13813,6 @@ if not resolvers then
os.exit()
end
-logs.setprogram('MTXrun',"TDS Runner Tool 1.30")
-
if environment.arguments["verbose"] then
trackers.enable("resolvers.locating")
end
@@ -13764,10 +13825,7 @@ if trackspec then
trackers.enable(trackspec)
end
-runners = runners or { } -- global
-messages = messages or { }
-
-messages.help = [[
+local helpinfo = [[
--script run an mtx script (lua prefered method) (--noquotes), no script gives list
--execute run a script or program (texmfstart method) (--noquotes)
--resolve resolve prefixed arguments
@@ -13819,6 +13877,19 @@ messages.help = [[
--pattern=str filter variables
]]
+local application = logs.application {
+ name = "mtxrun",
+ banner = "ConTeXt TDS Runner Tool 1.30",
+ helpinfo = helpinfo,
+}
+
+local report = application.report
+
+local verbose = environment.argument("verbose")
+
+messages = messages or { } -- for the mo
+
+runners = runners or { } -- global
runners.applications = {
["lua"] = "luatex --luaonly",
@@ -13872,17 +13943,16 @@ end
function runners.prepare()
local checkname = environment.argument("ifchanged")
- local verbose = environment.argument("verbose")
if type(checkname) == "string" and checkname ~= "" then
local oldchecksum = file.loadchecksum(checkname)
local newchecksum = file.checksum(checkname)
if oldchecksum == newchecksum then
if verbose then
- logs.simple("file '%s' is unchanged",checkname)
+ report("file '%s' is unchanged",checkname)
end
return "skip"
elseif verbose then
- logs.simple("file '%s' is changed, processing started",checkname)
+ report("file '%s' is changed, processing started",checkname)
end
file.savechecksum(checkname)
end
@@ -13892,17 +13962,17 @@ function runners.prepare()
if oldname and newname and oldname ~= "" and newname ~= "" then
if not file.needs_updating(oldname,newname) then
if verbose then
- logs.simple("file '%s' and '%s' have same age",oldname,newname)
+ report("file '%s' and '%s' have same age",oldname,newname)
end
return "skip"
elseif verbose then
- logs.simple("file '%s' is older than '%s'",oldname,newname)
+ report("file '%s' is older than '%s'",oldname,newname)
end
end
end
local runpath = environment.argument("path")
if type(runpath) == "string" and not lfs.chdir(runpath) then
- logs.simple("unable to change to path '%s'",runpath)
+ report("unable to change to path '%s'",runpath)
return "error"
end
runners.prepare = function() end
@@ -13961,11 +14031,11 @@ function runners.execute_script(fullname,internal,nosplit)
result = binary .. " " .. result
end
local command = result .. " " .. environment.reconstructcommandline(environment.arguments_after,noquote)
- if logs.verbose then
- logs.simpleline()
- logs.simple("executing: %s",command)
- logs.simpleline()
- logs.simpleline()
+ if verbose then
+ report()
+ report("executing: %s",command)
+ report()
+ report()
io.flush()
end
-- no os.exec because otherwise we get the wrong return value
@@ -13980,9 +14050,9 @@ function runners.execute_script(fullname,internal,nosplit)
return false
end
end
- logs.simpleline()
- logs.simple("This script needs '%s' which seems not to be installed.",binary)
- logs.simpleline()
+ report()
+ report("This script needs '%s' which seems not to be installed.",binary)
+ report()
end
return false
end
@@ -14007,10 +14077,10 @@ function runners.execute_program(fullname)
environment.initializearguments(after)
fullname = fullname:gsub("^bin:","")
local command = fullname .. " " .. (environment.reconstructcommandline(after or "",noquote) or "")
- logs.simpleline()
- logs.simple("executing: %s",command)
- logs.simpleline()
- logs.simpleline()
+ report()
+ report("executing: %s",command)
+ report()
+ report()
io.flush()
local code = os.exec(command) -- (fullname,unpack(after)) does not work / maybe spawn
return code == 0
@@ -14042,18 +14112,18 @@ function runners.handle_stubs(create)
if create then
if windows then
io.savedata(file.join(stubpath,base..".bat"),string.format(windows_stub,name))
- logs.simple("windows stub for '%s' created",base)
+ report("windows stub for '%s' created",base)
end
if unix then
io.savedata(file.join(stubpath,base),string.format(unix_stub,name))
- logs.simple("unix stub for '%s' created",base)
+ report("unix stub for '%s' created",base)
end
else
if windows and (os.remove(file.join(stubpath,base..'.bat')) or os.remove(file.join(stubpath,base..'.cmd'))) then
- logs.simple("windows stub for '%s' removed", base)
+ report("windows stub for '%s' removed", base)
end
if unix and (os.remove(file.join(stubpath,base)) or os.remove(file.join(stubpath,base..'.sh'))) then
- logs.simple("unix stub for '%s' removed",base)
+ report("unix stub for '%s' removed",base)
end
end
end
@@ -14078,12 +14148,12 @@ function runners.locate_platform()
end
function runners.report_location(result)
- if logs.verbose then
- logs.simpleline()
+ if verbose then
+ reportline()
if result and result ~= "" then
- logs.simple(result)
+ report(result)
else
- logs.simple("not found")
+ report("not found")
end
else
io.write(result)
@@ -14095,11 +14165,11 @@ function runners.edit_script(filename) -- we assume that gvim is present on most
local rest = resolvers.resolve(filename)
if rest ~= "" then
local command = editor .. " " .. rest
- if logs.verbose then
- logs.simpleline()
- logs.simple("starting editor: %s",command)
- logs.simple_line()
- logs.simple_line()
+ if verbose then
+ report()
+ report("starting editor: %s",command)
+ report()
+ report()
end
os.launch(command)
end
@@ -14148,7 +14218,7 @@ function runners.launch_file(filename)
pattern = filename
end
if not pattern or pattern == "" then
- logs.simple("provide name or --pattern=")
+ report("provide name or --pattern=")
else
local t = resolvers.findfiles(pattern)
if not t or #t == 0 then
@@ -14160,15 +14230,15 @@ function runners.launch_file(filename)
if t and #t > 0 then
if environment.arguments["all"] then
for _, v in pairs(t) do
- logs.simple("launching %s", v)
+ report("launching %s", v)
resolvers.launch(v)
end
else
- logs.simple("launching %s", t[1])
+ report("launching %s", t[1])
resolvers.launch(t[1])
end
else
- logs.simple("no match for %s", pattern)
+ report("no match for %s", pattern)
end
end
end
@@ -14239,7 +14309,7 @@ function runners.execute_ctx_script(filename,...)
local fullname = runners.find_mtx_script(filename) or ""
if file.extname(fullname) == "cld" then
-- handy in editors where we force --autopdf
- logs.simple("running cld script: %s",filename)
+ report("running cld script: %s",filename)
table.insert(arguments,1,fullname)
table.insert(arguments,"--autopdf")
fullname = runners.find_mtx_script("context") or ""
@@ -14270,8 +14340,8 @@ function runners.execute_ctx_script(filename,...)
runners.load_script_session(loadname)
end
filename = environment.files[1]
- if logs.verbose then
- logs.simple("using script: %s\n",fullname)
+ if verbose then
+ report("using script: %s\n",fullname)
end
environment.ownscript = fullname
dofile(fullname)
@@ -14306,24 +14376,23 @@ function runners.execute_ctx_script(filename,...)
end
end
if #valid > 0 then
- logs.reportbanner()
- logs.reportline()
- logs.simple("no script name given, known scripts:")
- logs.simple()
+ application.identify()
+ report("no script name given, known scripts:")
+ report()
for k=1,#valid do
local v = valid[k]
- logs.simple("%-12s %4s %s",v[1],v[2],v[3])
+ report("%-12s %4s %s",v[1],v[2],v[3])
end
end
else
- logs.simple("no script name given")
+ report("no script name given")
end
else
filename = file.addsuffix(filename,"lua")
if file.is_qualified_path(filename) then
- logs.simple("unknown script '%s'",filename)
+ report("unknown script '%s'",filename)
else
- logs.simple("unknown script '%s' or 'mtx-%s'",filename,filename)
+ report("unknown script '%s' or 'mtx-%s'",filename,filename)
end
end
return false
@@ -14331,9 +14400,9 @@ function runners.execute_ctx_script(filename,...)
end
function runners.prefixes()
- logs.reportbanner()
- logs.reportline()
- logs.simple(table.concat(resolvers.allprefixes(true)," "))
+ application.identify()
+ report()
+ report(table.concat(resolvers.allprefixes(true)," "))
end
function runners.timedrun(filename) -- just for me
@@ -14385,7 +14454,7 @@ if environment.argument("usekpse") or environment.argument("forcekpse") or is_mk
local t = os.clock()
local k = kpse.original.new("luatex",progname)
local dummy = k:find_file("mtxrun.lua") -- so that we're initialized
- logs.simple("kpse fallback with progname '%s' initialized in %s seconds",progname,os.clock()-t)
+ report("kpse fallback with progname '%s' initialized in %s seconds",progname,os.clock()-t)
kpse_initialized = function() return k end
return k
end
@@ -14432,11 +14501,11 @@ else
function runners.loadbase(...)
if not resolvers.load(...) then
- logs.simple("forcing cache reload")
+ report("forcing cache reload")
instance.renewcache = true
trackers.enable("resolvers.locating")
if not resolvers.load(...) then
- logs.simple("the resolver databases are not present or outdated")
+ report("the resolver databases are not present or outdated")
end
end
end
@@ -14595,8 +14664,8 @@ elseif environment.argument("find-path") then
resolvers.load()
local path = resolvers.findpath(filename, instance.my_format)
- if logs.verbose then
- logs.simple(path)
+ if verbose then
+ report(path)
else
print(path)
end
@@ -14651,7 +14720,7 @@ elseif environment.argument("format-path") then
-- luatools: runners.execute_ctx_script("mtx-base","--format-path",filename)
resolvers.load()
- logs.simple(caches.getwritablepath("format"))
+ report(caches.getwritablepath("format"))
elseif environment.argument("pattern") then
@@ -14695,7 +14764,7 @@ elseif environment.argument("help") and filename=='base' then
elseif environment.argument("help") or filename=='help' or filename == "" then
- logs.help(messages.help)
+ application.help()
elseif filename:find("^bin:") then
@@ -14729,9 +14798,9 @@ else
end
-if logs.verbose then
- logs.simpleline()
- logs.simple("runtime: %0.3f seconds",os.runtime())
+if verbose then
+ report()
+ report("runtime: %0.3f seconds",os.runtime())
end
if os.type ~= "windows" then
diff --git a/scripts/context/stubs/unix/mtxrun b/scripts/context/stubs/unix/mtxrun
index 31d7d9b0f..afc472d1c 100644
--- a/scripts/context/stubs/unix/mtxrun
+++ b/scripts/context/stubs/unix/mtxrun
@@ -8,7 +8,6 @@ if not modules then modules = { } end modules ['mtxrun'] = {
license = "see context related readme files"
}
-
-- one can make a stub:
--
-- #!/bin/sh
@@ -132,11 +131,7 @@ local simple_escapes = {
}
function string.escapedpattern(str,simple)
- if simple then
- return (gsub(str,".",simple_escapes))
- else
- return (gsub(str,".",patterns_escapes))
- end
+ return (gsub(str,".",simple and simple_escapes or patterns_escapes))
end
function string.topattern(str,lowercase,strict)
@@ -556,11 +551,7 @@ local p = Cs((S("-.+*%()[]") / patterns_escapes + anything)^0)
local s = Cs((S("-.+*%()[]") / simple_escapes + anything)^0)
function string.escapedpattern(str,simple)
- if simple then
- return match(s,str)
- else
- return match(p,str)
- end
+ return match(simple and s or p,str)
end
-- utf extensies
@@ -3826,7 +3817,7 @@ local type, next = type, next
utilities = utilities or {}
utilities.merger = utilities.merger or { } -- maybe mergers
-utilities.report = utilities.report or print
+utilities.report = logs and logs.new("system") or print
local merger = utilities.merger
@@ -3964,7 +3955,7 @@ if not modules then modules = { } end modules ['util-lua'] = {
utilities = utilities or {}
utilities.lua = utilities.lua or { }
-utilities.report = utilities.report or print
+utilities.report = logs and logs.new("system") or print
function utilities.lua.compile(luafile,lucfile,cleanup,strip) -- defaults: cleanup=false strip=true
utilities.report("lua: compiling %s into %s",luafile,lucfile)
@@ -4577,19 +4568,21 @@ function statistics.show(reporter)
end
end
-
-local template, nn = nil, 0 -- we only calcute it once
+local template, report_statistics, nn = nil, nil, 0 -- we only calcute it once
function statistics.showjobstat(tag,data,n)
- if type(data) == "table" then
+ if not logs then
+ -- sorry
+ elseif type(data) == "table" then
for i=1,#data do
statistics.showjobstat(tag,data[i],n)
end
else
if not template or n > nn then
- template, n = format("%%-%ss: %%-%ss - %%s",15,n), nn
+ template, n = format("%%-%ss - %%s",n), nn
+ report_statistics = logs.new("mkiv lua stats")
end
- write_nl(format(template,"mkiv lua stats",tag,data))
+ report_statistics(format(template,tag,data))
end
end
@@ -4610,7 +4603,7 @@ function statistics.runtime()
end
function statistics.timed(action,report)
- report = report or logs.simple
+ report = report or logs.new("system")
starttiming("run")
action()
stoptiming("run")
@@ -4664,14 +4657,10 @@ local data = { } -- maybe just local
local trace_initialize = false -- only for testing during development
-local function report(a,b,...)
- texio.write_nl(format("%-16s> %s",a,format(b,...)))
-end
-
function setters.initialize(filename,name,values) -- filename only for diagnostics
- local data = data[name]
- if data then
- data = data.data
+ local setter = data[name]
+ if setter then
+ local data = data.data
if data then
for key, value in next, values do
-- key = gsub(key,"_",".")
@@ -4680,7 +4669,7 @@ function setters.initialize(filename,name,values) -- filename only for diagnosti
if functions then
if #functions > 0 and not functions.value then
if trace_initialize then
- report(name,"executing %s (%s -> %s)",key,filename,tostring(value))
+ setter.report("executing %s (%s -> %s)",key,filename,tostring(value))
end
for i=1,#functions do
functions[i](value)
@@ -4688,7 +4677,7 @@ function setters.initialize(filename,name,values) -- filename only for diagnosti
functions.value = value
else
if trace_initialize then
- report(name,"skipping %s (%s -> %s)",key,filename,tostring(value))
+ setter.report("skipping %s (%s -> %s)",key,filename,tostring(value))
end
end
else
@@ -4697,7 +4686,7 @@ function setters.initialize(filename,name,values) -- filename only for diagnosti
functions = { default = value }
data[key] = functions
if trace_initialize then
- report(name,"storing %s (%s -> %s)",key,filename,tostring(value))
+ setter.report("storing %s (%s -> %s)",key,filename,tostring(value))
end
end
end
@@ -4724,10 +4713,11 @@ local function set(t,what,newvalue)
else
value = is_boolean(value,value)
end
+ w = escapedpattern(w,true)
for name, functions in next, data do
if done[name] then
-- prevent recursion due to wildcards
- elseif find(name,escapedpattern(w,true)) then
+ elseif find(name,w) then
done[name] = true
for i=1,#functions do
functions[i](value)
@@ -4769,7 +4759,7 @@ function setters.register(t,what,...)
functions = { }
data[what] = functions
if trace_initialize then
- report(t.name,"defining %s",what)
+ t.report("defining %s",what)
end
end
local default = functions.default -- can be set from cnf file
@@ -4777,7 +4767,7 @@ function setters.register(t,what,...)
local typ = type(fnc)
if typ == "string" then
if trace_initialize then
- report(t.name,"coupling %s to %s",what,fnc)
+ t.report("coupling %s to %s",what,fnc)
end
local s = fnc -- else wrong reference
fnc = function(value) set(t,s,value) end
@@ -4831,9 +4821,9 @@ function setters.list(t) -- pattern
end
function setters.show(t)
- commands.writestatus("","")
- local list = setters.list(t)
local category = t.name
+ local list = setters.list(t)
+ t.report()
for k=1,#list do
local name = list[k]
local functions = t.data[name]
@@ -4841,10 +4831,10 @@ function setters.show(t)
local value, default, modules = functions.value, functions.default, #functions
value = value == nil and "unset" or tostring(value)
default = default == nil and "unset" or tostring(default)
- commands.writestatus(category,format("%-30s modules: %2i default: %5s value: %5s",name,modules,default,value))
+ t.report("%-30s modules: %2i default: %6s value: %6s",name,modules,default,value)
end
end
- commands.writestatus("","")
+ t.report()
end
-- we could have used a bit of oo and the trackers:enable syntax but
@@ -4854,57 +4844,62 @@ end
local enable, disable, register, list, show = setters.enable, setters.disable, setters.register, setters.list, setters.show
+local function report(setter,...)
+ local report = logs and logs.report
+ if report then
+ report(setter.name,...)
+ else -- fallback, as this module is loaded before the logger
+ write_nl(format("%-16s: %s\n",setter.name,format(...)))
+ end
+end
+
function setters.new(name)
- local t -- we need to access it in t
- t = {
+ local setter -- we need to access it in setter itself
+ setter = {
data = allocate(), -- indexed, but also default and value fields
name = name,
- enable = function(...) enable (t,...) end,
- disable = function(...) disable (t,...) end,
- register = function(...) register(t,...) end,
- list = function(...) list (t,...) end,
- show = function(...) show (t,...) end,
+ report = function(...) report (setter,...) end,
+ enable = function(...) enable (setter,...) end,
+ disable = function(...) disable (setter,...) end,
+ register = function(...) register(setter,...) end,
+ list = function(...) list (setter,...) end,
+ show = function(...) show (setter,...) end,
}
- data[name] = t
- return t
+ data[name] = setter
+ return setter
end
trackers = setters.new("trackers")
directives = setters.new("directives")
experiments = setters.new("experiments")
-local t_enable, t_disable = trackers .enable, trackers .disable
-local d_enable, d_disable = directives .enable, directives .disable
-local e_enable, e_disable = experiments.enable, experiments.disable
+local t_enable, t_disable, t_report = trackers .enable, trackers .disable, trackers .report
+local d_enable, d_disable, d_report = directives .enable, directives .disable, directives .report
+local e_enable, e_disable, e_report = experiments.enable, experiments.disable, experiments.report
-- nice trick: we overload two of the directives related functions with variants that
-- do tracing (itself using a tracker) .. proof of concept
-local function report(...) -- messy .. chicken or egg
- local p = (commands and commands.writestatus) or (logs and logs.report)
- if p then p(...) end
-end
-
local trace_directives = false local trace_directives = false trackers.register("system.directives", function(v) trace_directives = v end)
local trace_experiments = false local trace_experiments = false trackers.register("system.experiments", function(v) trace_experiments = v end)
function directives.enable(...)
- report("directives","enabling: %s",concat({...}," "))
+ d_report("enabling: %s",concat({...}," "))
d_enable(...)
end
function directives.disable(...)
- report("directives","disabling: %s",concat({...}," "))
+ d_report("disabling: %s",concat({...}," "))
d_disable(...)
end
function experiments.enable(...)
- report("experiments","enabling: %s",concat({...}," "))
+ e_report("enabling: %s",concat({...}," "))
e_enable(...)
end
function experiments.disable(...)
- report("experiments","disabling: %s",concat({...}," "))
+ e_report("disabling: %s",concat({...}," "))
e_disable(...)
end
@@ -4967,20 +4962,19 @@ if not modules then modules = { } end modules ['trac-log'] = {
license = "see context related readme files"
}
--- xml logging is only usefull in normal runs, not in ini mode
--- it looks like some tex logging (like filenames) is broken (no longer
--- interceoted at the tex end so the xml variant is not that useable now)
+-- todo: less categories, more subcategories (e.g. nodes)
local write_nl, write = texio and texio.write_nl or print, texio and texio.write or io.write
-local format, gmatch = string.format, string.gmatch
+local format, gmatch, find = string.format, string.gmatch, string.find
+local concat = table.concat
+local escapedpattern = string.escapedpattern
local texcount = tex and tex.count
+local next, type = next, type
--[[ldx--
-<p>This is a prelude to a more extensive logging module. For the sake
-of parsing log files, in addition to the standard logging we will
-provide an <l n='xml'/> structured file. Actually, any logging that
-is hooked into callbacks will be \XML\ by default.</p>
+<p>This is a prelude to a more extensive logging module. We no longer
+provide <l n='xml'/> based logging a sparsing is relatively easy anyway.</p>
--ldx]]--
logs = logs or { }
@@ -4998,96 +4992,239 @@ webpage : http://www.pragma-ade.nl / http://tex.aanhet.net
wiki : http://contextgarden.net
]]
-local functions = {
- 'report', 'status', 'start', 'stop', 'push', 'pop', 'line', 'direct',
- 'start_run', 'stop_run',
- 'start_page_number', 'stop_page_number',
- 'report_output_pages', 'report_output_log',
- 'report_tex_stat', 'report_job_stat',
- 'show_open', 'show_close', 'show_load',
- 'dummy',
-}
+-- local functions = {
+-- 'report', 'status', 'start', 'stop', 'line', 'direct',
+-- 'start_run', 'stop_run',
+-- 'start_page_number', 'stop_page_number',
+-- 'report_output_pages', 'report_output_log',
+-- 'report_tex_stat', 'report_job_stat',
+-- 'show_open', 'show_close', 'show_load',
+-- 'dummy',
+-- }
-local method = "nop"
+-- basic loggers
-function logs.setmethod(newmethod)
- method = newmethod
- -- a direct copy might be faster but let's try this for a while
- setmetatable(logs, { __index = logs[method] })
-end
+local function ignore() end
-function logs.getmethod()
- return method
-end
+setmetatable(logs, { __index = function(t,k) t[k] = ignore ; return ignore end })
--- installer
+-- local separator = (tex and (tex.jobname or tex.formatname)) and ">" or "|"
-local data = { }
+local report, subreport
-function logs.new(category)
- local logger = data[category]
- if not logger then
- logger = function(...)
- logs.report(category,...)
+if tex and tex.jobname or tex.formatname then
+
+ report = function(a,b,c,...)
+ if c then
+ write_nl(format("%-15s > %s\n",a,format(b,c,...)))
+ elseif b then
+ write_nl(format("%-15s > %s\n",a,b))
+ elseif a then
+ write_nl(format("%-15s >\n", a))
+ else
+ write_nl("\n")
end
- data[category] = logger
end
- return logger
-end
+ subreport = function(a,sub,b,c,...)
+ if c then
+ write_nl(format("%-15s > %s > %s\n",a,sub,format(b,c,...)))
+ elseif b then
+ write_nl(format("%-15s > %s > %s\n",a,sub,b))
+ elseif a then
+ write_nl(format("%-15s > %s >\n", a,sub))
+ else
+ write_nl("\n")
+ end
+ end
--- nop logging (maybe use __call instead)
-
-local noplog = { } logs.nop = noplog setmetatable(logs, { __index = noplog })
+else
-for i=1,#functions do
- noplog[functions[i]] = function() end
-end
+ report = function(a,b,c,...)
+ if c then
+ write_nl(format("%-15s | %s",a,format(b,c,...)))
+ elseif b then
+ write_nl(format("%-15s | %s",a,b))
+ elseif a then
+ write_nl(format("%-15s |", a))
+ else
+ write_nl("")
+ end
+ end
--- tex logging
+ subreport = function(a,sub,b,c,...)
+ if c then
+ write_nl(format("%-15s | %s | %s",a,sub,format(b,c,...)))
+ elseif b then
+ write_nl(format("%-15s | %s | %s",a,sub,b))
+ elseif a then
+ write_nl(format("%-15s | %s |", a,sub))
+ else
+ write_nl("")
+ end
+ end
-local texlog = { } logs.tex = texlog setmetatable(texlog, { __index = noplog })
+end
-function texlog.report(a,b,c,...)
+function logs.status(a,b,c,...) -- at the tex end
if c then
- write_nl(format("%-16s> %s\n",a,format(b,c,...)))
+ write_nl(format("%-15s : %s\n",a,format(b,c,...)))
elseif b then
- write_nl(format("%-16s> %s\n",a,b))
+ write_nl(format("%-15s : %s\n",a,b)) -- b can have %'s
+ elseif a then
+ write_nl(format("%-15s :\n", a))
else
- write_nl(format("%-16s>\n",a))
+ write_nl("\n")
end
end
-function texlog.status(a,b,c,...)
- if c then
- write_nl(format("%-16s: %s\n",a,format(b,c,...)))
- elseif b then
- write_nl(format("%-16s: %s\n",a,b)) -- b can have %'s
- else
- write_nl(format("%-16s:>\n",a))
+logs.report = report
+logs.subreport = subreport
+
+-- installer
+
+-- todo: renew (un) locks when a new one is added and wildcard
+
+local data, states = { }, nil
+
+function logs.reporter(category,subcategory)
+ local logger = data[category]
+ if not logger then
+ local state = false
+ if states == true then
+ state = true
+ elseif type(states) == "table" then
+ for c, _ in next, states do
+ if find(category,c) then
+ state = true
+ break
+ end
+ end
+ end
+ logger = {
+ reporters = { },
+ state = state,
+ }
+ data[category] = logger
+ end
+ local reporter = logger.reporters[subcategory or "default"]
+ if not reporter then
+ if subcategory then
+ reporter = function(...)
+ if not logger.state then
+ subreport(category,subcategory,...)
+ end
+ end
+ logger.reporters[subcategory] = reporter
+ else
+ local tag = category
+ reporter = function(...)
+ if not logger.state then
+ report(category,...)
+ end
+ end
+ logger.reporters.default = reporter
+ end
end
+ return reporter
end
-function texlog.line(fmt,...) -- new
- if fmt then
- write_nl(format(fmt,...))
+logs.new = logs.reporter
+
+local function doset(category,value)
+ if category == true then
+ -- lock all
+ category, value = "*", true
+ elseif category == false then
+ -- unlock all
+ category, value = "*", false
+ elseif value == nil then
+ -- lock selective
+ value = true
+ end
+ if category == "*" then
+ states = value
+ for k, v in next, data do
+ v.state = value
+ end
else
- write_nl("")
+ states = utilities.parsers.settings_to_hash(category)
+ for c, _ in next, states do
+ if data[c] then
+ v.state = value
+ else
+ c = escapedpattern(c,true)
+ for k, v in next, data do
+ if find(k,c) then
+ v.state = value
+ end
+ end
+ end
+ end
+ end
+end
+
+function logs.disable(category,value)
+ doset(category,value == nil and true or value)
+end
+
+function logs.enable(category)
+ doset(category,false)
+end
+
+function logs.categories()
+ return table.sortedkeys(data)
+end
+
+function logs.show()
+ local n, c, s, max = 0, 0, 0, 0
+ for category, v in table.sortedpairs(data) do
+ n = n + 1
+ local state = v.state
+ local reporters = v.reporters
+ local nc = #category
+ if nc > c then
+ c = nc
+ end
+ for subcategory, _ in next, reporters do
+ local ns = #subcategory
+ if ns > c then
+ s = ns
+ end
+ local m = nc + ns
+ if m > max then
+ max = m
+ end
+ end
+ local subcategories = concat(table.sortedkeys(reporters),", ")
+ if state == true then
+ state = "disabled"
+ elseif state == false then
+ state = "enabled"
+ else
+ state = "unknown"
+ end
+ -- no new here
+ report("logging","category: '%s', subcategories: '%s', state: '%s'",category,subcategories,state)
end
+ report("logging","categories: %s, max category: %s, max subcategory: %s, max combined: %s",n,c,s,max)
end
+directives.register("logs.blocked", function(v)
+ doset(v,true)
+end)
+-- tex specific loggers (might move elsewhere)
+local report_pages = logs.reporter("pages") -- not needed but saves checking when we grep for it
local real, user, sub
-function texlog.start_page_number()
+function logs.start_page_number()
real, user, sub = texcount.realpageno, texcount.userpageno, texcount.subpageno
end
-local report_pages = logs.new("pages") -- not needed but saves checking when we grep for it
-
-function texlog.stop_page_number()
+function logs.stop_page_number()
if real > 0 then
if user > 0 then
if sub > 0 then
@@ -5104,176 +5241,98 @@ function texlog.stop_page_number()
io.flush()
end
-texlog.report_job_stat = statistics and statistics.showjobstat
+logs.report_job_stat = statistics and statistics.showjobstat
--- xml logging
+local report_files = logs.reporter("files")
-local xmllog = { } logs.xml = xmllog setmetatable(xmllog, { __index = noplog })
+local nesting = 0
+local verbose = false
-function xmllog.report(category,fmt,s,...) -- new
- if s then
- write_nl(format("<r category='%s'>%s</r>",category,format(fmt,s,...)))
- elseif fmt then
- write_nl(format("<r category='%s'>%s</r>",category,fmt))
- else
- write_nl(format("<r category='%s'/>",category))
+function logs.show_open(name)
+ if verbose then
+ nesting = nesting + 1
+ report_files("level %s, opening %s",nesting,name)
end
end
-function xmllog.status(category,fmt,s,...)
- if s then
- write_nl(format("<s category='%s'>%s</r>",category,format(fmt,s,...)))
- elseif fmt then
- write_nl(format("<s category='%s'>%s</r>",category,fmt))
- else
- write_nl(format("<s category='%s'/>",category))
+function logs.show_close(name)
+ if verbose then
+ report_files("level %s, closing %s",nesting,name)
+ nesting = nesting - 1
end
end
-function xmllog.line(fmt,...) -- new
- if fmt then
- write_nl(format("<r>%s</r>",format(fmt,...)))
- else
- write_nl("<r/>")
+function logs.show_load(name)
+ if verbose then
+ report_files("level %s, loading %s",nesting+1,name)
end
end
-function xmllog.start() write_nl("<%s>" ) end
-function xmllog.stop () write_nl("</%s>") end
-function xmllog.push () write_nl("<!-- ") end
-function xmllog.pop () write_nl(" -->" ) end
-
-function xmllog.start_run()
- write_nl("<?xml version='1.0' standalone='yes'?>")
- write_nl("<job>") -- xmlns='www.pragma-ade.com/luatex/schemas/context-job.rng'
- write_nl("")
-end
-
-function xmllog.stop_run()
- write_nl("</job>")
-end
-
-function xmllog.start_page_number()
- write_nl(format("<p real='%s' page='%s' sub='%s'", texcount.realpageno, texcount.userpageno, texcount.subpageno))
-end
-
-function xmllog.stop_page_number()
- write("/>")
- write_nl("")
-end
+-- there may be scripts out there using this:
-function xmllog.report_output_pages(p,b)
- write_nl(format("<v k='pages' v='%s'/>", p))
- write_nl(format("<v k='bytes' v='%s'/>", b))
- write_nl("")
-end
-
-function xmllog.report_output_log()
- -- nothing
-end
+local simple = logs.reporter("comment")
-function xmllog.report_tex_stat(k,v)
- write_nl("log","<v k='"..k.."'>"..tostring(v).."</v>")
-end
-
-local nesting = 0
-
-function xmllog.show_open(name)
- nesting = nesting + 1
- write_nl(format("<f l='%s' n='%s'>",nesting,name))
-end
+logs.simple = simple
+logs.simpleline = simple
-function xmllog.show_close(name)
- write("</f> ")
- nesting = nesting - 1
-end
-
-function xmllog.show_load(name)
- write_nl(format("<f l='%s' n='%s'/>",nesting+1,name))
-end
-
--- initialization
-
-if tex and (tex.jobname or tex.formatname) then
- -- todo: this can be set in mtxrun ... or maybe we should just forget about this alternative format
- if (os.getenv("mtx.directives.logmethod") or os.getenv("mtx_directives_logmethod")) == "xml" then
- logs.setmethod('xml')
- else
- logs.setmethod('tex')
- end
-else
- logs.setmethod('nop')
-end
+-- obsolete
--- logging in runners -> these are actually the nop loggers
+function logs.setprogram () end -- obsolete
+function logs.extendbanner() end -- obsolete
+function logs.reportlines () end -- obsolete
+function logs.reportbanner() end -- obsolete
+function logs.reportline () end -- obsolete
+function logs.simplelines () end -- obsolete
+function logs.help () end -- obsolete
-local name, banner = 'report', 'context'
+-- applications
-function noplog.report(category,fmt,...) -- todo: fmt,s
- if fmt then
- write_nl(format("%s | %s: %s",name,category,format(fmt,...)))
- elseif category then
- write_nl(format("%s | %s",name,category))
- else
- write_nl(format("%s |",name))
+local function reportlines(t,str)
+ if str then
+ for line in gmatch(str,"(.-)[\n\r]") do
+ t.report(line)
+ end
end
end
-noplog.status = noplog.report -- just to be sure, never used
-
-function noplog.simple(fmt,...) -- todo: fmt,s
- if fmt then
- write_nl(format("%s | %s",name,format(fmt,...)))
- else
- write_nl(format("%s |",name))
+local function reportbanner(t)
+ local banner = t.banner
+ if banner then
+ t.report(banner)
+ t.report()
end
end
-if utilities then
- utilities.report = function(...) logs.simple(...) end
-end
-
-function logs.setprogram(newname,newbanner)
- name, banner = newname, newbanner
-end
-
-function logs.extendbanner(newbanner)
- banner = banner .. " | ".. newbanner
-end
-
-function logs.reportlines(str) -- todo: <lines></lines>
- for line in gmatch(str,"(.-)[\n\r]") do
- logs.report(line)
+local function reporthelp(t,...)
+ local helpinfo = t.helpinfo
+ if type(helpinfo) == "string" then
+ reportlines(t,helpinfo)
+ elseif type(helpinfo) == "table" then
+ local tags = { ... }
+ for i=1,#tags do
+ reportlines(t,t.helpinfo[tags[i]])
+ if i < #tags then
+ t.report()
+ end
+ end
end
end
-function logs.reportline() -- for scripts too
- logs.report()
-end
-
-function logs.simpleline()
- logs.report()
+local function reportinfo(t)
+ t.report()
+ reportlines(t,moreinfo)
end
-function logs.simplelines(str) -- todo: <lines></lines>
- for line in gmatch(str,"(.-)[\n\r]") do
- logs.simple(line)
- end
+function logs.application(t)
+ t.name = t.name or "unknown"
+ t.banner = t.banner
+ t.report = logs.reporter(t.name)
+ t.help = function(...) reportbanner(t) ; reporthelp(t,...) ; reportinfo(t) end
+ t.identify = function() reportbanner(t) end
+ return t
end
-function logs.reportbanner() -- for scripts too
- logs.report(banner)
-end
-
-function logs.help(message,option)
- logs.reportbanner()
- logs.reportline()
- logs.reportlines(message)
- if option ~= "nomoreinfo" then
- logs.reportline()
- logs.reportlines(moreinfo)
- end
-end
+-- somewhat special
-- logging to a file
@@ -5281,7 +5340,7 @@ end
function logs.system(whereto,process,jobname,category,...)
local message = format("%s %s => %s => %s => %s\r",os.date("%d/%m/%y %H:%m:%S"),process,jobname,category,format(...))
for i=1,10 do
- local f = io.open(whereto,"a")
+ local f = io.open(whereto,"a") -- we can consider keepint the file open
if f then
f:write(message)
f:close()
@@ -5292,30 +5351,24 @@ function logs.system(whereto,process,jobname,category,...)
end
end
--- bonus
-
-function logs.fatal(where,...)
- logs.report(where,"fatal error: %s, aborting now",format(...))
- os.exit()
-end
-
+local report_system = logs.reporter("system","logs")
function logs.obsolete(old,new)
local o = loadstring("return " .. new)()
if type(o) == "function" then
return function(...)
- logs.report("system","function %s is obsolete, use %s",old,new)
+ report_system("function %s is obsolete, use %s",old,new)
loadstring(old .. "=" .. new .. " return ".. old)()(...)
end
elseif type(o) == "table" then
local t, m = { }, { }
m.__index = function(t,k)
- logs.report("system","table %s is obsolete, use %s",old,new)
+ report_system("table %s is obsolete, use %s",old,new)
m.__index, m.__newindex = o, o
return o[k]
end
m.__newindex = function(t,k,v)
- logs.report("system","table %s is obsolete, use %s",old,new)
+ report_system("table %s is obsolete, use %s",old,new)
m.__index, m.__newindex = o, o
o[k] = v
end
@@ -5327,6 +5380,10 @@ function logs.obsolete(old,new)
end
end
+if utilities then
+ utilities.report = report_system
+end
+
if tex and tex.error then
function logs.texerrormessage(...) -- for the moment we put this function here
tex.error(format(...), { })
@@ -5361,7 +5418,7 @@ local getmetatable, setmetatable, rawset, type = getmetatable, setmetatable, raw
local trace_namespaces = false trackers.register("system.namespaces", function(v) trace_namespaces = v end)
-local report_system = logs.new("system")
+local report_system = logs.new("system","protection")
namespaces = namespaces or { }
local namespaces = namespaces
@@ -5530,7 +5587,7 @@ if not modules then modules = { } end modules ['luat-env'] = {
local trace_locating = false trackers.register("resolvers.locating", function(v) trace_locating = v end)
-local report_resolvers = logs.new("resolvers")
+local report_lua = logs.new("resolvers","lua")
local allocate, mark = utilities.storage.allocate, utilities.storage.mark
@@ -5754,14 +5811,14 @@ function environment.luafilechunk(filename,silent) -- used for loading lua bytec
if fullname and fullname ~= "" then
local data = environment.loadedluacode(fullname)
if trace_locating then
- report_resolvers("loading file %s%s", fullname, not data and " failed" or "")
+ report_lua("loading file %s%s", fullname, not data and " failed" or "")
elseif not silent then
texio.write("<",data and "+ " or "- ",fullname,">")
end
return data
else
if trace_locating then
- report_resolvers("unknown file %s", filename)
+ report_lua("unknown file %s", filename)
end
return nil
end
@@ -5781,7 +5838,7 @@ function environment.loadluafile(filename, version)
local fullname = (lucname and environment.luafile(lucname)) or ""
if fullname ~= "" then
if trace_locating then
- report_resolvers("loading %s", fullname)
+ report_lua("loading %s", fullname)
end
chunk = loadfile(fullname) -- this way we don't need a file exists check
end
@@ -5799,7 +5856,7 @@ function environment.loadluafile(filename, version)
return true
else
if trace_locating then
- report_resolvers("version mismatch for %s: lua=%s, luc=%s", filename, v, version)
+ report_lua("version mismatch for %s: lua=%s, luc=%s", filename, v, version)
end
environment.loadluafile(filename)
end
@@ -5810,12 +5867,12 @@ function environment.loadluafile(filename, version)
fullname = (luaname and environment.luafile(luaname)) or ""
if fullname ~= "" then
if trace_locating then
- report_resolvers("loading %s", fullname)
+ report_lua("loading %s", fullname)
end
chunk = loadfile(fullname) -- this way we don't need a file exists check
if not chunk then
if trace_locating then
- report_resolvers("unknown file %s", filename)
+ report_lua("unknown file %s", filename)
end
else
assert(chunk)()
@@ -5844,7 +5901,7 @@ if not modules then modules = { } end modules ['lxml-tab'] = {
local trace_entities = false trackers.register("xml.entities", function(v) trace_entities = v end)
-local report_xml = logs.new("xml")
+local report_xml = logs and logs.new("xml","core") or function(...) print(format(...)) end
--[[ldx--
<p>The parser used here is inspired by the variant discussed in the lua book, but
@@ -6518,7 +6575,7 @@ function xml.is_valid(root)
return root and not root.error
end
-xml.errorhandler = (logs and logs.report) or (input and logs.report) or print
+xml.errorhandler = report
--[[ldx--
<p>We cannot load an <l n='lpeg'/> from a filehandle so we need to load
@@ -7069,7 +7126,7 @@ local trace_lpath = false if trackers then trackers.register("xml.path",
local trace_lparse = false if trackers then trackers.register("xml.parse", function(v) trace_lparse = v end) end
local trace_lprofile = false if trackers then trackers.register("xml.profile", function(v) trace_lpath = v trace_lparse = v trace_lprofile = v end) end
-local report_lpath = logs.new("lpath")
+local report_lpath = logs.new("xml","lpath")
--[[ldx--
<p>We've now arrived at an interesting part: accessing the tree using a subset
@@ -7951,9 +8008,9 @@ local function traced_apply(list,parsed,nofparsed,order)
if trace_lparse then
lshow(parsed)
end
- report_lpath("collecting : %s",parsed.pattern)
- report_lpath(" root tags : %s",tagstostring(list))
- report_lpath(" order : %s",order or "unset")
+ report_lpath("collecting: %s",parsed.pattern)
+ report_lpath("root tags : %s",tagstostring(list))
+ report_lpath("order : %s",order or "unset")
local collected = list
for i=1,nofparsed do
local pi = parsed[i]
@@ -9224,7 +9281,7 @@ local trace_locating = false trackers.register("resolvers.locating", functi
local trace_detail = false trackers.register("resolvers.details", function(v) trace_detail = v end)
local trace_expansions = false trackers.register("resolvers.expansions", function(v) trace_expansions = v end)
-local report_resolvers = logs.new("resolvers")
+local report_initialization = logs.new("resolvers","initialization")
local ostype, osname, ossetenv, osgetenv = os.type, os.name, os.setenv, os.getenv
@@ -9245,7 +9302,7 @@ kpse = { original = kpse }
setmetatable(kpse, {
__index = function(kp,name)
- report_resolvers("fatal error: kpse library is accessed (key: %s)",name)
+ report_initialization("fatal error: kpse library is accessed (key: %s)",name)
os.exit()
end
} )
@@ -9329,13 +9386,13 @@ do
if lfs.chdir(p) then
local pp = lfs.currentdir()
if trace_locating and p ~= pp then
- report_resolvers("following symlink '%s' to '%s'",p,pp)
+ report_initialization("following symlink '%s' to '%s'",p,pp)
end
ownpath = pp
lfs.chdir(olddir)
else
if trace_locating then
- report_resolvers("unable to check path '%s'",p)
+ report_initialization("unable to check path '%s'",p)
end
ownpath = p
end
@@ -9346,9 +9403,9 @@ do
end
if not ownpath or ownpath == "" then
ownpath = "."
- report_resolvers("forcing fallback ownpath .")
+ report_initialization("forcing fallback ownpath .")
elseif trace_locating then
- report_resolvers("using ownpath '%s'",ownpath)
+ report_initialization("using ownpath '%s'",ownpath)
end
end
@@ -9375,7 +9432,7 @@ do
ossetenv('SELFAUTODIR', file.collapsepath(ownpath .. "/.."))
ossetenv('SELFAUTOPARENT', file.collapsepath(ownpath .. "/../.."))
else
- report_resolvers("error: unable to locate ownpath")
+ report_initialization("error: unable to locate ownpath")
os.exit()
end
@@ -9461,7 +9518,7 @@ local collapsepath = file.collapsepath
local trace_locating = false trackers.register("resolvers.locating", function(v) trace_locating = v end)
local trace_expansions = false trackers.register("resolvers.expansions", function(v) trace_expansions = v end)
-local report_resolvers = logs.new("resolvers")
+local report_expansions = logs.new("resolvers","expansions")
local resolvers = resolvers
@@ -9524,7 +9581,7 @@ local replacer_1 = lpeg.replacer { { ",}", ",@}" }, { "{,", "{@," }, }
local function splitpathexpr(str, newlist, validate) -- I couldn't resist lpegging it (nice exercise).
if trace_expansions then
- report_resolvers("expanding variable '%s'",str)
+ report_expansions("expanding variable '%s'",str)
end
local t, ok, done = newlist or { }, false, false
local n = #t
@@ -9550,7 +9607,7 @@ local function splitpathexpr(str, newlist, validate) -- I couldn't resist lpeggi
end
if trace_expansions then
for k=1,#t do
- report_resolvers("% 4i: %s",k,t[k])
+ report_expansions("% 4i: %s",k,t[k])
end
end
return t
@@ -9585,7 +9642,7 @@ function resolvers.cleanpath(str)
homedir = lpegmatch(cleanup,environment.homedir or "")
if homedir == string.char(127) or homedir == "" or not lfs.isdir(homedir) then
if trace_expansions then
- report_resolvers("no home dir set, ignoring dependent paths")
+ report_expansions("no home dir set, ignoring dependent paths")
end
function resolvers.cleanpath(str)
if find(str,"~") then
@@ -9655,9 +9712,9 @@ local function splitconfigurationpath(str) -- beware, this can be either a path
end
end
if trace_expansions then
- report_resolvers("splitting path specification '%s'",str)
+ report_expansions("splitting path specification '%s'",str)
for k=1,noffound do
- report_resolvers("% 4i: %s",k,found[k])
+ report_expansions("% 4i: %s",k,found[k])
end
end
cache[str] = found
@@ -9742,7 +9799,7 @@ end
function resolvers.scanfiles(path,branch)
if trace_locating then
- report_resolvers("scanning path '%s', branch '%s'",path, branch or path)
+ report_expansions("scanning path '%s', branch '%s'",path, branch or path)
end
local realpath = resolvers.resolve(path) -- no shortcut
local files, n, m, r = scan({ },realpath .. '/',"",0,0,0)
@@ -9751,7 +9808,7 @@ function resolvers.scanfiles(path,branch)
files.__directories__ = m
files.__remappings__ = r
if trace_locating then
- report_resolvers("%s files found on %s directories with %s uppercase remappings",n,m,r)
+ report_expansions("%s files found on %s directories with %s uppercase remappings",n,m,r)
end
return files
end
@@ -10080,8 +10137,8 @@ local mkdirs, isdir = dir.mkdirs, lfs.isdir
local trace_locating = false trackers.register("resolvers.locating", function(v) trace_locating = v end)
local trace_cache = false trackers.register("resolvers.cache", function(v) trace_cache = v end)
-local report_cache = logs.new("cache")
-local report_resolvers = logs.new("resolvers")
+local report_caches = logs.new("resolvers","caches")
+local report_resolvers = logs.new("resolvers","caching")
local resolvers = resolvers
@@ -10141,7 +10198,7 @@ local function identify()
if not caches.ask or io.ask(format("\nShould I create the cache path %s?",cachepath), "no", { "yes", "no" }) == "yes" then
mkdirs(cachepath)
if isdir(cachepath) and file.is_writable(cachepath) then
- report_cache("created: %s",cachepath)
+ report_caches("created: %s",cachepath)
writable = cachepath
readables[#readables+1] = cachepath
end
@@ -10175,10 +10232,10 @@ local function identify()
-- Some extra checking. If we have no writable or readable path then we simply
-- quit.
if not writable then
- report_cache("fatal error: there is no valid writable cache path defined")
+ report_caches("fatal error: there is no valid writable cache path defined")
os.exit()
elseif #readables == 0 then
- report_cache("fatal error: there is no valid readable cache path defined")
+ report_caches("fatal error: there is no valid readable cache path defined")
os.exit()
end
-- why here
@@ -10200,9 +10257,9 @@ local function identify()
-- end
if trace_cache then
for i=1,#readables do
- report_cache("using readable path '%s' (order %s)",readables[i],i)
+ report_caches("using readable path '%s' (order %s)",readables[i],i)
end
- report_cache("using writable path '%s'",writable)
+ report_caches("using writable path '%s'",writable)
end
identify = function()
return writable, readables
@@ -10237,7 +10294,7 @@ function caches.hashed(tree)
tree = lower(tree)
local hash = md5.hex(tree)
if trace_cache or trace_locating then
- report_cache("hashing tree %s, hash %s",tree,hash)
+ report_caches("hashing tree %s, hash %s",tree,hash)
end
return hash
end
@@ -10463,7 +10520,7 @@ trackers.register("resolvers.locating", function(v) trace_methods = v end)
trackers.register("resolvers.methods", function(v) trace_methods = v end)
-local report_resolvers = logs.new("resolvers")
+local report_methods = logs.new("resolvers","methods")
local allocate = utilities.storage.allocate
@@ -10505,41 +10562,41 @@ local function methodhandler(what,first,...) -- filename can be nil or false
local resolver = namespace and namespace[scheme]
if resolver then
if trace_methods then
- report_resolvers("resolver: method=%s, how=%s, scheme=%s, argument=%s",what,how,scheme,first)
+ report_methods("resolver: method=%s, how=%s, scheme=%s, argument=%s",what,how,scheme,first)
end
return resolver(specification,...)
else
resolver = namespace.default or namespace.file
if resolver then
if trace_methods then
- report_resolvers("resolver: method=%s, how=%s, default, argument=%s",what,how,first)
+ report_methods("resolver: method=%s, how=%s, default, argument=%s",what,how,first)
end
return resolver(specification,...)
elseif trace_methods then
- report_resolvers("resolver: method=%s, how=%s, no handler",what,how)
+ report_methods("resolver: method=%s, how=%s, no handler",what,how)
end
end
elseif how == "tag" then
local resolver = namespace and namespace[first]
if resolver then
if trace_methods then
- report_resolvers("resolver: method=%s, how=%s, tag=%s",what,how,first)
+ report_methods("resolver: method=%s, how=%s, tag=%s",what,how,first)
end
return resolver(...)
else
resolver = namespace.default or namespace.file
if resolver then
if trace_methods then
- report_resolvers("resolver: method=%s, how=%s, default",what,how)
+ report_methods("resolver: method=%s, how=%s, default",what,how)
end
return resolver(...)
elseif trace_methods then
- report_resolvers("resolver: method=%s, how=%s, unknown",what,how)
+ report_methods("resolver: method=%s, how=%s, unknown",what,how)
end
end
end
else
- report_resolvers("resolver: method=%s, unknown",what)
+ report_methods("resolver: method=%s, unknown",what)
end
end
@@ -10610,7 +10667,7 @@ local trace_locating = false trackers.register("resolvers.locating", functi
local trace_detail = false trackers.register("resolvers.details", function(v) trace_detail = v end)
local trace_expansions = false trackers.register("resolvers.expansions", function(v) trace_expansions = v end)
-local report_resolvers = logs.new("resolvers")
+local report_resolving = logs.new("resolvers","resolving")
local resolvers = resolvers
@@ -10712,7 +10769,7 @@ end
function resolvers.newinstance() -- todo: all vars will become lowercase and alphanum only
if trace_locating then
- report_resolvers("creating instance")
+ report_resolving("creating instance")
end
local environment, variables, expansions, order = allocate(), allocate(), allocate(), allocate()
@@ -10830,9 +10887,9 @@ local function reportcriticalvariables()
for i=1,#resolvers.criticalvars do
local k = resolvers.criticalvars[i]
local v = resolvers.getenv(k) or "unknown" -- this one will not resolve !
- report_resolvers("variable '%s' set to '%s'",k,v)
+ report_resolving("variable '%s' set to '%s'",k,v)
end
- report_resolvers()
+ report_resolving()
end
reportcriticalvariables = function() end
end
@@ -10856,17 +10913,17 @@ local function identify_configuration_files()
if lfs.isfile(realname) then
specification[#specification+1] = filename
if trace_locating then
- report_resolvers("found configuration file '%s'",realname)
+ report_resolving("found configuration file '%s'",realname)
end
elseif trace_locating then
- report_resolvers("unknown configuration file '%s'",realname)
+ report_resolving("unknown configuration file '%s'",realname)
end
end
if trace_locating then
- report_resolvers()
+ report_resolving()
end
elseif trace_locating then
- report_resolvers("configuration files already identified")
+ report_resolving("configuration files already identified")
end
end
@@ -10886,8 +10943,8 @@ local function load_configuration_files()
data = data and data.content
if data then
if trace_locating then
- report_resolvers("loading configuration file '%s'",filename)
- report_resolvers()
+ report_resolving("loading configuration file '%s'",filename)
+ report_resolving()
end
local variables = data.variables or { }
local warning = false
@@ -10897,7 +10954,7 @@ local function load_configuration_files()
initializesetter(filename,k,v)
elseif variables[k] == nil then
if trace_locating and not warning then
- report_resolvers("variables like '%s' in configuration file '%s' should move to the 'variables' subtable",
+ report_resolving("variables like '%s' in configuration file '%s' should move to the 'variables' subtable",
k,resolvers.resolve(filename))
warning = true
end
@@ -10910,7 +10967,7 @@ local function load_configuration_files()
local cnfspec = variables["TEXMFCNF"]
if cnfspec then
if trace_locating then
- report_resolvers("reloading configuration due to TEXMF redefinition")
+ report_resolving("reloading configuration due to TEXMF redefinition")
end
-- we push the value into the main environment (osenv) so
-- that it takes precedence over the default one and therefore
@@ -10929,13 +10986,13 @@ local function load_configuration_files()
else
if trace_locating then
- report_resolvers("skipping configuration file '%s' (no content)",filename)
+ report_resolving("skipping configuration file '%s' (no content)",filename)
end
setups[pathname] = { }
instance.loaderror = true
end
elseif trace_locating then
- report_resolvers("skipping configuration file '%s' (no file)",filename)
+ report_resolving("skipping configuration file '%s' (no file)",filename)
end
instance.order[#instance.order+1] = instance.setups[pathname]
if instance.loaderror then
@@ -10943,7 +11000,7 @@ local function load_configuration_files()
end
end
elseif trace_locating then
- report_resolvers("warning: no lua configuration files found")
+ report_resolving("warning: no lua configuration files found")
end
end
@@ -10979,19 +11036,19 @@ local function locate_file_databases()
end
if trace_locating then
if runtime then
- report_resolvers("locating list of '%s' (runtime)",path)
+ report_resolving("locating list of '%s' (runtime)",path)
else
- report_resolvers("locating list of '%s' (cached)",path)
+ report_resolving("locating list of '%s' (cached)",path)
end
end
methodhandler('locators',stripped)
end
end
if trace_locating then
- report_resolvers()
+ report_resolving()
end
elseif trace_locating then
- report_resolvers("no texmf paths are defined (using TEXMF)")
+ report_resolving("no texmf paths are defined (using TEXMF)")
end
end
@@ -11002,7 +11059,7 @@ local function generate_file_databases()
methodhandler('generators',hash.name)
end
if trace_locating then
- report_resolvers()
+ report_resolving()
end
end
@@ -11014,11 +11071,11 @@ local function save_file_databases() -- will become cachers
local content = instance.files[cachename]
caches.collapsecontent(content)
if trace_locating then
- report_resolvers("saving tree '%s'",cachename)
+ report_resolving("saving tree '%s'",cachename)
end
caches.savecontent(cachename,"files",content)
elseif trace_locating then
- report_resolvers("not saving runtime tree '%s'",cachename)
+ report_resolving("not saving runtime tree '%s'",cachename)
end
end
end
@@ -11043,7 +11100,7 @@ function resolvers.appendhash(type,name,cache)
-- safeguard ... tricky as it's actually a bug when seen twice
if not instance.hashed[name] then
if trace_locating then
- report_resolvers("hash '%s' appended",name)
+ report_resolving("hash '%s' appended",name)
end
insert(instance.hashes, { type = type, name = name, cache = cache } )
instance.hashed[name] = cache
@@ -11054,7 +11111,7 @@ function resolvers.prependhash(type,name,cache)
-- safeguard ... tricky as it's actually a bug when seen twice
if not instance.hashed[name] then
if trace_locating then
- report_resolvers("hash '%s' prepended",name)
+ report_resolving("hash '%s' prepended",name)
end
insert(instance.hashes, 1, { type = type, name = name, cache = cache } )
instance.hashed[name] = cache
@@ -11287,9 +11344,9 @@ function isreadable(name)
local readable = lfs.isfile(name) -- not file.is_readable(name) asit can be a dir
if trace_detail then
if readable then
- report_resolvers("file '%s' is readable",name)
+ report_resolving("file '%s' is readable",name)
else
- report_resolvers("file '%s' is not readable", name)
+ report_resolving("file '%s' is not readable", name)
end
end
return readable
@@ -11303,7 +11360,7 @@ local function collect_files(names)
for k=1,#names do
local fname = names[k]
if trace_detail then
- report_resolvers("checking name '%s'",fname)
+ report_resolving("checking name '%s'",fname)
end
local bname = filebasename(fname)
local dname = filedirname(fname)
@@ -11319,7 +11376,7 @@ local function collect_files(names)
local files = blobpath and instance.files[blobpath]
if files then
if trace_detail then
- report_resolvers("deep checking '%s' (%s)",blobpath,bname)
+ report_resolving("deep checking '%s' (%s)",blobpath,bname)
end
local blobfile = files[bname]
if not blobfile then
@@ -11339,7 +11396,7 @@ local function collect_files(names)
local search = filejoin(blobroot,blobfile,bname)
local result = methodhandler('concatinators',hash.type,blobroot,blobfile,bname)
if trace_detail then
- report_resolvers("match: kind '%s', search '%s', result '%s'",kind,search,result)
+ report_resolving("match: kind '%s', search '%s', result '%s'",kind,search,result)
end
noffiles = noffiles + 1
filelist[noffiles] = { kind, search, result }
@@ -11353,7 +11410,7 @@ local function collect_files(names)
local search = filejoin(blobroot,vv,bname)
local result = methodhandler('concatinators',hash.type,blobroot,vv,bname)
if trace_detail then
- report_resolvers("match: kind '%s', search '%s', result '%s'",kind,search,result)
+ report_resolving("match: kind '%s', search '%s', result '%s'",kind,search,result)
end
noffiles = noffiles + 1
filelist[noffiles] = { kind, search, result }
@@ -11362,7 +11419,7 @@ local function collect_files(names)
end
end
elseif trace_locating then
- report_resolvers("no match in '%s' (%s)",blobpath,bname)
+ report_resolving("no match in '%s' (%s)",blobpath,bname)
end
end
end
@@ -11403,7 +11460,7 @@ local function collect_instance_files(filename,askedformat,allresults) -- todo :
stamp = filename .. "--" .. askedformat
if instance.found[stamp] then
if trace_locating then
- report_resolvers("remembered file '%s'",filename)
+ report_resolving("remembered file '%s'",filename)
end
resolvers.registerintrees(filename) -- for tracing used files
return instance.found[stamp]
@@ -11412,7 +11469,7 @@ local function collect_instance_files(filename,askedformat,allresults) -- todo :
if not dangerous[askedformat] then
if isreadable(filename) then
if trace_detail then
- report_resolvers("file '%s' found directly",filename)
+ report_resolving("file '%s' found directly",filename)
end
if stamp then
instance.found[stamp] = { filename }
@@ -11422,13 +11479,13 @@ local function collect_instance_files(filename,askedformat,allresults) -- todo :
end
if find(filename,'%*') then
if trace_locating then
- report_resolvers("checking wildcard '%s'", filename)
+ report_resolving("checking wildcard '%s'", filename)
end
result = resolvers.findwildcardfiles(filename) -- we can use th elocal
elseif file.is_qualified_path(filename) then
if isreadable(filename) then
if trace_locating then
- report_resolvers("qualified name '%s'", filename)
+ report_resolving("qualified name '%s'", filename)
end
result = { filename }
else
@@ -11441,7 +11498,7 @@ local function collect_instance_files(filename,askedformat,allresults) -- todo :
forcedname = filename .. "." .. s
if isreadable(forcedname) then
if trace_locating then
- report_resolvers("no suffix, forcing format filetype '%s'", s)
+ report_resolving("no suffix, forcing format filetype '%s'", s)
end
result, ok = { forcedname }, true
break
@@ -11494,7 +11551,7 @@ local function collect_instance_files(filename,askedformat,allresults) -- todo :
-- end
end
if not ok and trace_locating then
- report_resolvers("qualified name '%s'", filename)
+ report_resolving("qualified name '%s'", filename)
end
end
else
@@ -11513,13 +11570,13 @@ local function collect_instance_files(filename,askedformat,allresults) -- todo :
wantedfiles[#wantedfiles+1] = forcedname
filetype = resolvers.formatofsuffix(forcedname)
if trace_locating then
- report_resolvers("forcing filetype '%s'",filetype)
+ report_resolving("forcing filetype '%s'",filetype)
end
end
else
filetype = resolvers.formatofsuffix(filename)
if trace_locating then
- report_resolvers("using suffix based filetype '%s'",filetype)
+ report_resolving("using suffix based filetype '%s'",filetype)
end
end
else
@@ -11533,7 +11590,7 @@ local function collect_instance_files(filename,askedformat,allresults) -- todo :
end
filetype = askedformat
if trace_locating then
- report_resolvers("using given filetype '%s'",filetype)
+ report_resolving("using given filetype '%s'",filetype)
end
end
local typespec = resolvers.variableofformat(filetype)
@@ -11541,7 +11598,7 @@ local function collect_instance_files(filename,askedformat,allresults) -- todo :
if not pathlist or #pathlist == 0 then
-- no pathlist, access check only / todo == wildcard
if trace_detail then
- report_resolvers("checking filename '%s', filetype '%s', wanted files '%s'",filename, filetype or '?',concat(wantedfiles," | "))
+ report_resolving("checking filename '%s', filetype '%s', wanted files '%s'",filename, filetype or '?',concat(wantedfiles," | "))
end
for k=1,#wantedfiles do
local fname = wantedfiles[k]
@@ -11569,7 +11626,7 @@ local function collect_instance_files(filename,askedformat,allresults) -- todo :
end
end
if trace_detail then
- report_resolvers("checking filename '%s'",filename)
+ report_resolving("checking filename '%s'",filename)
end
for k=1,#pathlist do
local path = pathlist[k]
@@ -11581,7 +11638,7 @@ local function collect_instance_files(filename,askedformat,allresults) -- todo :
-- compare list entries with permitted pattern -- /xx /xx//
local expression = makepathexpression(pathname)
if trace_detail then
- report_resolvers("using pattern '%s' for path '%s'",expression,pathname)
+ report_resolving("using pattern '%s' for path '%s'",expression,pathname)
end
for k=1,#filelist do
local fl = filelist[k]
@@ -11593,16 +11650,16 @@ local function collect_instance_files(filename,askedformat,allresults) -- todo :
done = true
if allresults then
if trace_detail then
- report_resolvers("match to '%s' in hash for file '%s' and path '%s', continue scanning",expression,f,d)
+ report_resolving("match to '%s' in hash for file '%s' and path '%s', continue scanning",expression,f,d)
end
else
if trace_detail then
- report_resolvers("match to '%s' in hash for file '%s' and path '%s', quit scanning",expression,f,d)
+ report_resolving("match to '%s' in hash for file '%s' and path '%s', quit scanning",expression,f,d)
end
break
end
elseif trace_detail then
- report_resolvers("no match to '%s' in hash for file '%s' and path '%s'",expression,f,d)
+ report_resolving("no match to '%s' in hash for file '%s' and path '%s'",expression,f,d)
end
end
end
@@ -11619,7 +11676,7 @@ local function collect_instance_files(filename,askedformat,allresults) -- todo :
local fname = filejoin(ppname,w)
if isreadable(fname) then
if trace_detail then
- report_resolvers("found '%s' by scanning",fname)
+ report_resolving("found '%s' by scanning",fname)
end
result[#result+1] = fname
done = true
@@ -11824,7 +11881,7 @@ end
local function report(str)
if trace_locating then
- report_resolvers(str) -- has already verbose
+ report_resolving(str) -- has already verbose
else
print(str)
end
@@ -12219,7 +12276,7 @@ if not modules then modules = { } end modules ['data-fil'] = {
local trace_locating = false trackers.register("resolvers.locating", function(v) trace_locating = v end)
-local report_resolvers = logs.new("resolvers")
+local report_files = logs.new("resolvers","files")
local resolvers = resolvers
@@ -12233,11 +12290,11 @@ function locators.file(specification)
local realname = resolvers.resolve(name) -- no shortcut
if realname and realname ~= '' and lfs.isdir(realname) then
if trace_locating then
- report_resolvers("file locator '%s' found as '%s'",name,realname)
+ report_files("file locator '%s' found as '%s'",name,realname)
end
resolvers.appendhash('file',name,true) -- cache
elseif trace_locating then
- report_resolvers("file locator '%s' not found",name)
+ report_files("file locator '%s' not found",name)
end
end
@@ -12260,12 +12317,12 @@ function finders.file(specification,filetype)
local foundname = resolvers.findfile(filename,filetype)
if foundname and foundname ~= "" then
if trace_locating then
- report_resolvers("file finder: '%s' found",filename)
+ report_files("file finder: '%s' found",filename)
end
return foundname
else
if trace_locating then
- report_resolvers("file finder: %s' not found",filename)
+ report_files("file finder: %s' not found",filename)
end
return finders.notfound()
end
@@ -12286,13 +12343,13 @@ function openers.file(specification,filetype)
local f = io.open(filename,"r")
if f then
if trace_locating then
- report_resolvers("file opener, '%s' opened",filename)
+ report_files("file opener, '%s' opened",filename)
end
return openers.helpers.textopener("file",filename,f)
end
end
if trace_locating then
- report_resolvers("file opener, '%s' not found",filename)
+ report_files("file opener, '%s' not found",filename)
end
return openers.notfound()
end
@@ -12304,7 +12361,7 @@ function loaders.file(specification,filetype)
if f then
logs.show_load(filename)
if trace_locating then
- report_resolvers("file loader, '%s' loaded",filename)
+ report_files("file loader, '%s' loaded",filename)
end
local s = f:read("*a")
if checkgarbage then
@@ -12317,7 +12374,7 @@ function loaders.file(specification,filetype)
end
end
if trace_locating then
- report_resolvers("file loader, '%s' not found",filename)
+ report_files("file loader, '%s' not found",filename)
end
return loaders.notfound()
end
@@ -12358,11 +12415,11 @@ containers = containers or { }
local containers = containers
containers.usecache = true
-local report_cache = logs.new("cache")
+local report_containers = logs.new("resolvers","containers")
local function report(container,tag,name)
if trace_cache or trace_containers then
- report_cache("container: %s, tag: %s, name: %s",container.subcategory,tag,name or 'invalid')
+ report_containers("container: %s, tag: %s, name: %s",container.subcategory,tag,name or 'invalid')
end
end
@@ -12480,7 +12537,7 @@ local format, lower, gsub, find = string.format, string.lower, string.gsub, stri
local trace_locating = false trackers.register("resolvers.locating", function(v) trace_locating = v end)
-local report_resolvers = logs.new("resolvers")
+local report_mounts = logs.new("resolvers","mounts")
local resolvers = resolvers
@@ -12505,7 +12562,7 @@ function resolvers.automount(usecache)
-- skip
elseif find(line,"^zip://") then
if trace_locating then
- report_resolvers("mounting %s",line)
+ report_mounts("mounting %s",line)
end
table.insert(resolvers.automounted,line)
resolvers.usezipfile(line)
@@ -12585,7 +12642,7 @@ local format, find, match = string.format, string.find, string.match
local trace_locating = false trackers.register("resolvers.locating", function(v) trace_locating = v end)
-local report_resolvers = logs.new("resolvers")
+local report_zip = logs.new("resolvers","zip")
-- zip:///oeps.zip?name=bla/bla.tex
-- zip:///oeps.zip?tree=tex/texmf-local
@@ -12638,9 +12695,9 @@ function resolvers.locators.zip(specification)
local zipfile = archive and archive ~= "" and zip.openarchive(archive) -- tricky, could be in to be initialized tree
if trace_locating then
if zipfile then
- report_resolvers("zip locator, archive '%s' found",archive)
+ report_zip("locator, archive '%s' found",archive)
else
- report_resolvers("zip locator, archive '%s' not found",archive)
+ report_zip("locator, archive '%s' not found",archive)
end
end
end
@@ -12648,7 +12705,7 @@ end
function resolvers.hashers.zip(specification)
local archive = specification.filename
if trace_locating then
- report_resolvers("loading zip file '%s'",archive)
+ report_zip("loading file '%s'",archive)
end
resolvers.usezipfile(specification.original)
end
@@ -12671,25 +12728,25 @@ function resolvers.finders.zip(specification)
local zfile = zip.openarchive(archive)
if zfile then
if trace_locating then
- report_resolvers("zip finder, archive '%s' found",archive)
+ report_zip("finder, archive '%s' found",archive)
end
local dfile = zfile:open(queryname)
if dfile then
dfile = zfile:close()
if trace_locating then
- report_resolvers("zip finder, file '%s' found",queryname)
+ report_zip("finder, file '%s' found",queryname)
end
return specification.original
elseif trace_locating then
- report_resolvers("zip finder, file '%s' not found",queryname)
+ report_zip("finder, file '%s' not found",queryname)
end
elseif trace_locating then
- report_resolvers("zip finder, unknown archive '%s'",archive)
+ report_zip("finder, unknown archive '%s'",archive)
end
end
end
if trace_locating then
- report_resolvers("zip finder, '%s' not found",original)
+ report_zip("finder, '%s' not found",original)
end
return resolvers.finders.notfound()
end
@@ -12704,24 +12761,24 @@ function resolvers.openers.zip(specification)
local zfile = zip.openarchive(archive)
if zfile then
if trace_locating then
- report_resolvers("zip opener, archive '%s' opened",archive)
+ report_zip("opener, archive '%s' opened",archive)
end
local dfile = zfile:open(queryname)
if dfile then
if trace_locating then
- report_resolvers("zip opener, file '%s' found",queryname)
+ report_zip("opener, file '%s' found",queryname)
end
return resolvers.openers.helpers.textopener('zip',original,dfile)
elseif trace_locating then
- report_resolvers("zip opener, file '%s' not found",queryname)
+ report_zip("opener, file '%s' not found",queryname)
end
elseif trace_locating then
- report_resolvers("zip opener, unknown archive '%s'",archive)
+ report_zip("opener, unknown archive '%s'",archive)
end
end
end
if trace_locating then
- report_resolvers("zip opener, '%s' not found",original)
+ report_zip("opener, '%s' not found",original)
end
return resolvers.openers.notfound()
end
@@ -12736,27 +12793,27 @@ function resolvers.loaders.zip(specification)
local zfile = zip.openarchive(archive)
if zfile then
if trace_locating then
- report_resolvers("zip loader, archive '%s' opened",archive)
+ report_zip("loader, archive '%s' opened",archive)
end
local dfile = zfile:open(queryname)
if dfile then
logs.show_load(original)
if trace_locating then
- report_resolvers("zip loader, file '%s' loaded",original)
+ report_zip("loader, file '%s' loaded",original)
end
local s = dfile:read("*all")
dfile:close()
return true, s, #s
elseif trace_locating then
- report_resolvers("zip loader, file '%s' not found",queryname)
+ report_zip("loader, file '%s' not found",queryname)
end
elseif trace_locating then
- report_resolvers("zip loader, unknown archive '%s'",archive)
+ report_zip("loader, unknown archive '%s'",archive)
end
end
end
if trace_locating then
- report_resolvers("zip loader, '%s' not found",original)
+ report_zip("loader, '%s' not found",original)
end
return resolvers.openers.notfound()
end
@@ -12772,7 +12829,7 @@ function resolvers.usezipfile(archive)
if z then
local tree = url.query(specification.query).tree or ""
if trace_locating then
- report_resolvers("zip registering, registering archive '%s'",archive)
+ report_zip("registering, registering archive '%s'",archive)
end
statistics.starttiming(resolvers.instance)
resolvers.prependhash('zip',archive)
@@ -12781,10 +12838,10 @@ function resolvers.usezipfile(archive)
instance.files[archive] = resolvers.registerzipfile(z,tree)
statistics.stoptiming(resolvers.instance)
elseif trace_locating then
- report_resolvers("zip registering, unknown archive '%s'",archive)
+ report_zip("registering, unknown archive '%s'",archive)
end
elseif trace_locating then
- report_resolvers("zip registering, '%s' not found",archive)
+ report_zip("registering, '%s' not found",archive)
end
end
@@ -12796,7 +12853,7 @@ function resolvers.registerzipfile(z,tree)
filter = format("^%s/(.+)/(.-)$",tree)
end
if trace_locating then
- report_resolvers("zip registering, using filter '%s'",filter)
+ report_zip("registering, using filter '%s'",filter)
end
local register, n = resolvers.registerfile, 0
for i in z:files() do
@@ -12813,7 +12870,7 @@ function resolvers.registerzipfile(z,tree)
n = n + 1
end
end
- report_resolvers("zip registering, %s files registered",n)
+ report_zip("registering, %s files registered",n)
return files
end
@@ -12836,7 +12893,7 @@ local find, gsub, format = string.find, string.gsub, string.format
local trace_locating = false trackers.register("resolvers.locating", function(v) trace_locating = v end)
-local report_resolvers = logs.new("resolvers")
+local report_trees = logs.new("resolvers","trees")
local resolvers = resolvers
@@ -12874,18 +12931,18 @@ function resolvers.locators.tree(specification)
local name = specification.filename
if name ~= '' and lfs.isdir(name) then
if trace_locating then
- report_resolvers("tree locator '%s' found",name)
+ report_trees("locator '%s' found",name)
end
resolvers.appendhash('tree',name,false) -- don't cache
elseif trace_locating then
- report_resolvers("tree locator '%s' not found",name)
+ report_trees("locator '%s' not found",name)
end
end
function resolvers.hashers.tree(specification)
local name = specification.filename
if trace_locating then
- report_resolvers("analysing tree '%s'",name)
+ report_trees("analysing '%s'",name)
end
resolvers.methodhandler("hashers",name)
end
@@ -12981,7 +13038,7 @@ if not modules then modules = { } end modules ['data-lua'] = {
local trace_locating = false trackers.register("resolvers.locating", function(v) trace_locating = v end)
-local report_resolvers = logs.new("resolvers")
+local report_libraries = logs.new("resolvers","libraries")
local gsub, insert = string.gsub, table.insert
local unpack = unpack or table.unpack
@@ -13013,7 +13070,7 @@ local function thepath(...)
local t = { ... } t[#t+1] = "?.lua"
local path = file.join(unpack(t))
if trace_locating then
- report_resolvers("! appending '%s' to 'package.path'",path)
+ report_libraries("! appending '%s' to 'package.path'",path)
end
return path
end
@@ -13035,11 +13092,11 @@ local function loaded(libpaths,name,simple)
local libpath = libpaths[i]
local resolved = gsub(libpath,"%?",simple)
if trace_locating then -- more detail
- report_resolvers("! checking for '%s' on 'package.path': '%s' => '%s'",simple,libpath,resolved)
+ report_libraries("! checking for '%s' on 'package.path': '%s' => '%s'",simple,libpath,resolved)
end
if file.is_readable(resolved) then
if trace_locating then
- report_resolvers("! lib '%s' located via 'package.path': '%s'",name,resolved)
+ report_libraries("! lib '%s' located via 'package.path': '%s'",name,resolved)
end
return loadfile(resolved)
end
@@ -13048,17 +13105,17 @@ end
package.loaders[2] = function(name) -- was [#package.loaders+1]
if trace_locating then -- mode detail
- report_resolvers("! locating '%s'",name)
+ report_libraries("! locating '%s'",name)
end
for i=1,#libformats do
local format = libformats[i]
local resolved = resolvers.findfile(name,format) or ""
if trace_locating then -- mode detail
- report_resolvers("! checking for '%s' using 'libformat path': '%s'",name,format)
+ report_libraries("! checking for '%s' using 'libformat path': '%s'",name,format)
end
if resolved ~= "" then
if trace_locating then
- report_resolvers("! lib '%s' located via environment: '%s'",name,resolved)
+ report_libraries("! lib '%s' located via environment: '%s'",name,resolved)
end
return loadfile(resolved)
end
@@ -13081,11 +13138,11 @@ package.loaders[2] = function(name) -- was [#package.loaders+1]
local path = paths[p]
local resolved = file.join(path,libname)
if trace_locating then -- mode detail
- report_resolvers("! checking for '%s' using 'clibformat path': '%s'",libname,path)
+ report_libraries("! checking for '%s' using 'clibformat path': '%s'",libname,path)
end
if file.is_readable(resolved) then
if trace_locating then
- report_resolvers("! lib '%s' located via 'clibformat': '%s'",libname,resolved)
+ report_libraries("! lib '%s' located via 'clibformat': '%s'",libname,resolved)
end
return package.loadlib(resolved,name)
end
@@ -13095,28 +13152,28 @@ package.loaders[2] = function(name) -- was [#package.loaders+1]
local libpath = clibpaths[i]
local resolved = gsub(libpath,"?",simple)
if trace_locating then -- more detail
- report_resolvers("! checking for '%s' on 'package.cpath': '%s'",simple,libpath)
+ report_libraries("! checking for '%s' on 'package.cpath': '%s'",simple,libpath)
end
if file.is_readable(resolved) then
if trace_locating then
- report_resolvers("! lib '%s' located via 'package.cpath': '%s'",name,resolved)
+ report_libraries("! lib '%s' located via 'package.cpath': '%s'",name,resolved)
end
return package.loadlib(resolved,name)
end
end
-- just in case the distribution is messed up
if trace_loading then -- more detail
- report_resolvers("! checking for '%s' using 'luatexlibs': '%s'",name)
+ report_libraries("! checking for '%s' using 'luatexlibs': '%s'",name)
end
local resolved = resolvers.findfile(file.basename(name),'luatexlibs') or ""
if resolved ~= "" then
if trace_locating then
- report_resolvers("! lib '%s' located by basename via environment: '%s'",name,resolved)
+ report_libraries("! lib '%s' located by basename via environment: '%s'",name,resolved)
end
return loadfile(resolved)
end
if trace_locating then
- report_resolvers('? unable to locate lib: %s',name)
+ report_libraries('? unable to locate lib: %s',name)
end
-- return "unable to locate " .. name
end
@@ -13153,48 +13210,48 @@ local trace_locating = false trackers.register("resolvers.locating", function(v
local resolvers = resolvers
-local report_resolvers = logs.new("resolvers")
+local report_scripts = logs.new("resolvers","scripts")
function resolvers.updatescript(oldname,newname) -- oldname -> own.name, not per se a suffix
local scriptpath = "scripts/context/lua"
newname = file.addsuffix(newname,"lua")
local oldscript = resolvers.cleanpath(oldname)
if trace_locating then
- report_resolvers("to be replaced old script %s", oldscript)
+ report_scripts("to be replaced old script %s", oldscript)
end
local newscripts = resolvers.findfiles(newname) or { }
if #newscripts == 0 then
if trace_locating then
- report_resolvers("unable to locate new script")
+ report_scripts("unable to locate new script")
end
else
for i=1,#newscripts do
local newscript = resolvers.cleanpath(newscripts[i])
if trace_locating then
- report_resolvers("checking new script %s", newscript)
+ report_scripts("checking new script %s", newscript)
end
if oldscript == newscript then
if trace_locating then
- report_resolvers("old and new script are the same")
+ report_scripts("old and new script are the same")
end
elseif not find(newscript,scriptpath) then
if trace_locating then
- report_resolvers("new script should come from %s",scriptpath)
+ report_scripts("new script should come from %s",scriptpath)
end
elseif not (find(oldscript,file.removesuffix(newname).."$") or find(oldscript,newname.."$")) then
if trace_locating then
- report_resolvers("invalid new script name")
+ report_scripts("invalid new script name")
end
else
local newdata = io.loaddata(newscript)
if newdata then
if trace_locating then
- report_resolvers("old script content replaced by new content")
+ report_scripts("old script content replaced by new content")
end
io.savedata(oldscript,newdata)
break
elseif trace_locating then
- report_resolvers("unable to load new script")
+ report_scripts("unable to load new script")
end
end
end
@@ -13216,6 +13273,8 @@ if not modules then modules = { } end modules ['data-tmf'] = {
local resolvers = resolvers
+local report_tds = logs.new("resolvers","tds")
+
-- = <<
-- ? ??
-- < +=
@@ -13236,11 +13295,11 @@ function resolvers.load_tree(tree,resolve)
local newpath = file.join(newtree,"bin")
if not lfs.isdir(newtree) then
- logs.simple("no '%s' under tree %s",texos,tree)
+ report_tds("no '%s' under tree %s",texos,tree)
os.exit()
end
if not lfs.isdir(newpath) then
- logs.simple("no '%s/bin' under tree %s",texos,tree)
+ report_tds("no '%s/bin' under tree %s",texos,tree)
os.exit()
end
@@ -13264,9 +13323,9 @@ function resolvers.load_tree(tree,resolve)
setenv('TEXMFCNF', resolvers.luacnfspec, not resolve)
setenv("PATH", newpath .. io.pathseparator .. getenv("PATH"))
- logs.simple("changing from root '%s' to '%s'",oldroot,newroot)
- logs.simple("prepending '%s' to binary path",newpath)
- logs.simple()
+ report_tds("changing from root '%s' to '%s'",oldroot,newroot)
+ report_tds("prepending '%s' to binary path",newpath)
+ report_tds()
end
end
@@ -13291,6 +13350,8 @@ resolvers.listers = resolvers.listers or { }
local resolvers = resolvers
+local report_lists = logs.new("resolvers","lists")
+
local function tabstr(str)
if type(str) == 'table' then
return concat(str," | ")
@@ -13319,11 +13380,11 @@ function resolvers.listers.variables(pattern)
local exp = table.fastcopy(expansions)
for key, value in table.sortedpairs(configured) do
if key ~= "" and (pattern == "" or find(upper(key),pattern)) then
- logs.simple(key)
- logs.simple(" env: %s",tabstr(rawget(environment,key)) or "unset")
- logs.simple(" var: %s",tabstr(configured[key]) or "unset")
- logs.simple(" exp: %s",tabstr(expansions[key]) or "unset")
- logs.simple(" res: %s",resolvers.resolve(expansions[key]) or "unset")
+ report_lists(key)
+ report_lists(" env: %s",tabstr(rawget(environment,key)) or "unset")
+ report_lists(" var: %s",tabstr(configured[key]) or "unset")
+ report_lists(" exp: %s",tabstr(expansions[key]) or "unset")
+ report_lists(" res: %s",resolvers.resolve(expansions[key]) or "unset")
end
end
instance.environment = table.fastcopy(env)
@@ -13477,6 +13538,8 @@ if not modules then modules = { } end modules ['luat-fmt'] = {
local format = string.format
+local report_format = logs.new("resolvers","formats")
+
-- helper for mtxrun
local quoted = string.quoted
@@ -13501,7 +13564,7 @@ function environment.make_format(name)
if path ~= "" then
lfs.chdir(path)
end
- logs.simple("format path: %s",lfs.currentdir())
+ report_format("format path: %s",lfs.currentdir())
-- check source file
local texsourcename = file.addsuffix(name,"mkiv")
local fulltexsourcename = resolvers.findfile(texsourcename,"tex") or ""
@@ -13510,11 +13573,11 @@ function environment.make_format(name)
fulltexsourcename = resolvers.findfile(texsourcename,"tex") or ""
end
if fulltexsourcename == "" then
- logs.simple("no tex source file with name: %s (mkiv or tex)",name)
+ report_format("no tex source file with name: %s (mkiv or tex)",name)
lfs.chdir(olddir)
return
else
- logs.simple("using tex source file: %s",fulltexsourcename)
+ report_format("using tex source file: %s",fulltexsourcename)
end
local texsourcepath = dir.expandname(file.dirname(fulltexsourcename)) -- really needed
-- check specification
@@ -13525,7 +13588,7 @@ function environment.make_format(name)
fullspecificationname = resolvers.findfile(specificationname,"tex") or ""
end
if fullspecificationname == "" then
- logs.simple("unknown stub specification: %s",specificationname)
+ report_format("unknown stub specification: %s",specificationname)
lfs.chdir(olddir)
return
end
@@ -13536,39 +13599,39 @@ function environment.make_format(name)
if type(usedlualibs) == "string" then
usedluastub = file.join(file.dirname(fullspecificationname),usedlualibs)
elseif type(usedlualibs) == "table" then
- logs.simple("using stub specification: %s",fullspecificationname)
+ report_format("using stub specification: %s",fullspecificationname)
local texbasename = file.basename(name)
local luastubname = file.addsuffix(texbasename,"lua")
local lucstubname = file.addsuffix(texbasename,"luc")
-- pack libraries in stub
- logs.simple("creating initialization file: %s",luastubname)
+ report_format("creating initialization file: %s",luastubname)
utilities.merger.selfcreate(usedlualibs,specificationpath,luastubname)
-- compile stub file (does not save that much as we don't use this stub at startup any more)
local strip = resolvers.booleanvariable("LUACSTRIP", true)
if utilities.lua.compile(luastubname,lucstubname) and lfs.isfile(lucstubname) then
- logs.simple("using compiled initialization file: %s",lucstubname)
+ report_format("using compiled initialization file: %s",lucstubname)
usedluastub = lucstubname
else
- logs.simple("using uncompiled initialization file: %s",luastubname)
+ report_format("using uncompiled initialization file: %s",luastubname)
usedluastub = luastubname
end
else
- logs.simple("invalid stub specification: %s",fullspecificationname)
+ report_format("invalid stub specification: %s",fullspecificationname)
lfs.chdir(olddir)
return
end
-- generate format
local command = format("luatex --ini %s --lua=%s %s %sdump",primaryflags(),quoted(usedluastub),quoted(fulltexsourcename),os.platform == "unix" and "\\\\" or "\\")
- logs.simple("running command: %s\n",command)
+ report_format("running command: %s\n",command)
os.spawn(command)
-- remove related mem files
local pattern = file.removesuffix(file.basename(usedluastub)).."-*.mem"
- -- logs.simple("removing related mplib format with pattern '%s'", pattern)
+ -- report_format("removing related mplib format with pattern '%s'", pattern)
local mp = dir.glob(pattern)
if mp then
for i=1,#mp do
local name = mp[i]
- logs.simple("removing related mplib format %s", file.basename(name))
+ report_format("removing related mplib format %s", file.basename(name))
os.remove(name)
end
end
@@ -13585,7 +13648,7 @@ function environment.run_format(name,data,more)
end
fmtname = resolvers.cleanpath(fmtname)
if fmtname == "" then
- logs.simple("no format with name: %s",name)
+ report_format("no format with name: %s",name)
else
local barename = file.removesuffix(name) -- expanded name
local luaname = file.addsuffix(barename,"luc")
@@ -13593,11 +13656,11 @@ function environment.run_format(name,data,more)
luaname = file.addsuffix(barename,"lua")
end
if not lfs.isfile(luaname) then
- logs.simple("using format name: %s",fmtname)
- logs.simple("no luc/lua with name: %s",barename)
+ report_format("using format name: %s",fmtname)
+ report_format("no luc/lua with name: %s",barename)
else
local command = format("luatex %s --fmt=%s --lua=%s %s %s",primaryflags(),quoted(barename),quoted(luaname),quoted(data),more ~= "" and quoted(more) or "")
- logs.simple("running command: %s",command)
+ report_format("running command: %s",command)
os.spawn(command)
end
end
@@ -13750,8 +13813,6 @@ if not resolvers then
os.exit()
end
-logs.setprogram('MTXrun',"TDS Runner Tool 1.30")
-
if environment.arguments["verbose"] then
trackers.enable("resolvers.locating")
end
@@ -13764,10 +13825,7 @@ if trackspec then
trackers.enable(trackspec)
end
-runners = runners or { } -- global
-messages = messages or { }
-
-messages.help = [[
+local helpinfo = [[
--script run an mtx script (lua prefered method) (--noquotes), no script gives list
--execute run a script or program (texmfstart method) (--noquotes)
--resolve resolve prefixed arguments
@@ -13819,6 +13877,19 @@ messages.help = [[
--pattern=str filter variables
]]
+local application = logs.application {
+ name = "mtxrun",
+ banner = "ConTeXt TDS Runner Tool 1.30",
+ helpinfo = helpinfo,
+}
+
+local report = application.report
+
+local verbose = environment.argument("verbose")
+
+messages = messages or { } -- for the mo
+
+runners = runners or { } -- global
runners.applications = {
["lua"] = "luatex --luaonly",
@@ -13872,17 +13943,16 @@ end
function runners.prepare()
local checkname = environment.argument("ifchanged")
- local verbose = environment.argument("verbose")
if type(checkname) == "string" and checkname ~= "" then
local oldchecksum = file.loadchecksum(checkname)
local newchecksum = file.checksum(checkname)
if oldchecksum == newchecksum then
if verbose then
- logs.simple("file '%s' is unchanged",checkname)
+ report("file '%s' is unchanged",checkname)
end
return "skip"
elseif verbose then
- logs.simple("file '%s' is changed, processing started",checkname)
+ report("file '%s' is changed, processing started",checkname)
end
file.savechecksum(checkname)
end
@@ -13892,17 +13962,17 @@ function runners.prepare()
if oldname and newname and oldname ~= "" and newname ~= "" then
if not file.needs_updating(oldname,newname) then
if verbose then
- logs.simple("file '%s' and '%s' have same age",oldname,newname)
+ report("file '%s' and '%s' have same age",oldname,newname)
end
return "skip"
elseif verbose then
- logs.simple("file '%s' is older than '%s'",oldname,newname)
+ report("file '%s' is older than '%s'",oldname,newname)
end
end
end
local runpath = environment.argument("path")
if type(runpath) == "string" and not lfs.chdir(runpath) then
- logs.simple("unable to change to path '%s'",runpath)
+ report("unable to change to path '%s'",runpath)
return "error"
end
runners.prepare = function() end
@@ -13961,11 +14031,11 @@ function runners.execute_script(fullname,internal,nosplit)
result = binary .. " " .. result
end
local command = result .. " " .. environment.reconstructcommandline(environment.arguments_after,noquote)
- if logs.verbose then
- logs.simpleline()
- logs.simple("executing: %s",command)
- logs.simpleline()
- logs.simpleline()
+ if verbose then
+ report()
+ report("executing: %s",command)
+ report()
+ report()
io.flush()
end
-- no os.exec because otherwise we get the wrong return value
@@ -13980,9 +14050,9 @@ function runners.execute_script(fullname,internal,nosplit)
return false
end
end
- logs.simpleline()
- logs.simple("This script needs '%s' which seems not to be installed.",binary)
- logs.simpleline()
+ report()
+ report("This script needs '%s' which seems not to be installed.",binary)
+ report()
end
return false
end
@@ -14007,10 +14077,10 @@ function runners.execute_program(fullname)
environment.initializearguments(after)
fullname = fullname:gsub("^bin:","")
local command = fullname .. " " .. (environment.reconstructcommandline(after or "",noquote) or "")
- logs.simpleline()
- logs.simple("executing: %s",command)
- logs.simpleline()
- logs.simpleline()
+ report()
+ report("executing: %s",command)
+ report()
+ report()
io.flush()
local code = os.exec(command) -- (fullname,unpack(after)) does not work / maybe spawn
return code == 0
@@ -14042,18 +14112,18 @@ function runners.handle_stubs(create)
if create then
if windows then
io.savedata(file.join(stubpath,base..".bat"),string.format(windows_stub,name))
- logs.simple("windows stub for '%s' created",base)
+ report("windows stub for '%s' created",base)
end
if unix then
io.savedata(file.join(stubpath,base),string.format(unix_stub,name))
- logs.simple("unix stub for '%s' created",base)
+ report("unix stub for '%s' created",base)
end
else
if windows and (os.remove(file.join(stubpath,base..'.bat')) or os.remove(file.join(stubpath,base..'.cmd'))) then
- logs.simple("windows stub for '%s' removed", base)
+ report("windows stub for '%s' removed", base)
end
if unix and (os.remove(file.join(stubpath,base)) or os.remove(file.join(stubpath,base..'.sh'))) then
- logs.simple("unix stub for '%s' removed",base)
+ report("unix stub for '%s' removed",base)
end
end
end
@@ -14078,12 +14148,12 @@ function runners.locate_platform()
end
function runners.report_location(result)
- if logs.verbose then
- logs.simpleline()
+ if verbose then
+ reportline()
if result and result ~= "" then
- logs.simple(result)
+ report(result)
else
- logs.simple("not found")
+ report("not found")
end
else
io.write(result)
@@ -14095,11 +14165,11 @@ function runners.edit_script(filename) -- we assume that gvim is present on most
local rest = resolvers.resolve(filename)
if rest ~= "" then
local command = editor .. " " .. rest
- if logs.verbose then
- logs.simpleline()
- logs.simple("starting editor: %s",command)
- logs.simple_line()
- logs.simple_line()
+ if verbose then
+ report()
+ report("starting editor: %s",command)
+ report()
+ report()
end
os.launch(command)
end
@@ -14148,7 +14218,7 @@ function runners.launch_file(filename)
pattern = filename
end
if not pattern or pattern == "" then
- logs.simple("provide name or --pattern=")
+ report("provide name or --pattern=")
else
local t = resolvers.findfiles(pattern)
if not t or #t == 0 then
@@ -14160,15 +14230,15 @@ function runners.launch_file(filename)
if t and #t > 0 then
if environment.arguments["all"] then
for _, v in pairs(t) do
- logs.simple("launching %s", v)
+ report("launching %s", v)
resolvers.launch(v)
end
else
- logs.simple("launching %s", t[1])
+ report("launching %s", t[1])
resolvers.launch(t[1])
end
else
- logs.simple("no match for %s", pattern)
+ report("no match for %s", pattern)
end
end
end
@@ -14239,7 +14309,7 @@ function runners.execute_ctx_script(filename,...)
local fullname = runners.find_mtx_script(filename) or ""
if file.extname(fullname) == "cld" then
-- handy in editors where we force --autopdf
- logs.simple("running cld script: %s",filename)
+ report("running cld script: %s",filename)
table.insert(arguments,1,fullname)
table.insert(arguments,"--autopdf")
fullname = runners.find_mtx_script("context") or ""
@@ -14270,8 +14340,8 @@ function runners.execute_ctx_script(filename,...)
runners.load_script_session(loadname)
end
filename = environment.files[1]
- if logs.verbose then
- logs.simple("using script: %s\n",fullname)
+ if verbose then
+ report("using script: %s\n",fullname)
end
environment.ownscript = fullname
dofile(fullname)
@@ -14306,24 +14376,23 @@ function runners.execute_ctx_script(filename,...)
end
end
if #valid > 0 then
- logs.reportbanner()
- logs.reportline()
- logs.simple("no script name given, known scripts:")
- logs.simple()
+ application.identify()
+ report("no script name given, known scripts:")
+ report()
for k=1,#valid do
local v = valid[k]
- logs.simple("%-12s %4s %s",v[1],v[2],v[3])
+ report("%-12s %4s %s",v[1],v[2],v[3])
end
end
else
- logs.simple("no script name given")
+ report("no script name given")
end
else
filename = file.addsuffix(filename,"lua")
if file.is_qualified_path(filename) then
- logs.simple("unknown script '%s'",filename)
+ report("unknown script '%s'",filename)
else
- logs.simple("unknown script '%s' or 'mtx-%s'",filename,filename)
+ report("unknown script '%s' or 'mtx-%s'",filename,filename)
end
end
return false
@@ -14331,9 +14400,9 @@ function runners.execute_ctx_script(filename,...)
end
function runners.prefixes()
- logs.reportbanner()
- logs.reportline()
- logs.simple(table.concat(resolvers.allprefixes(true)," "))
+ application.identify()
+ report()
+ report(table.concat(resolvers.allprefixes(true)," "))
end
function runners.timedrun(filename) -- just for me
@@ -14385,7 +14454,7 @@ if environment.argument("usekpse") or environment.argument("forcekpse") or is_mk
local t = os.clock()
local k = kpse.original.new("luatex",progname)
local dummy = k:find_file("mtxrun.lua") -- so that we're initialized
- logs.simple("kpse fallback with progname '%s' initialized in %s seconds",progname,os.clock()-t)
+ report("kpse fallback with progname '%s' initialized in %s seconds",progname,os.clock()-t)
kpse_initialized = function() return k end
return k
end
@@ -14432,11 +14501,11 @@ else
function runners.loadbase(...)
if not resolvers.load(...) then
- logs.simple("forcing cache reload")
+ report("forcing cache reload")
instance.renewcache = true
trackers.enable("resolvers.locating")
if not resolvers.load(...) then
- logs.simple("the resolver databases are not present or outdated")
+ report("the resolver databases are not present or outdated")
end
end
end
@@ -14595,8 +14664,8 @@ elseif environment.argument("find-path") then
resolvers.load()
local path = resolvers.findpath(filename, instance.my_format)
- if logs.verbose then
- logs.simple(path)
+ if verbose then
+ report(path)
else
print(path)
end
@@ -14651,7 +14720,7 @@ elseif environment.argument("format-path") then
-- luatools: runners.execute_ctx_script("mtx-base","--format-path",filename)
resolvers.load()
- logs.simple(caches.getwritablepath("format"))
+ report(caches.getwritablepath("format"))
elseif environment.argument("pattern") then
@@ -14695,7 +14764,7 @@ elseif environment.argument("help") and filename=='base' then
elseif environment.argument("help") or filename=='help' or filename == "" then
- logs.help(messages.help)
+ application.help()
elseif filename:find("^bin:") then
@@ -14729,9 +14798,9 @@ else
end
-if logs.verbose then
- logs.simpleline()
- logs.simple("runtime: %0.3f seconds",os.runtime())
+if verbose then
+ report()
+ report("runtime: %0.3f seconds",os.runtime())
end
if os.type ~= "windows" then
diff --git a/tex/context/base/attr-col.lua b/tex/context/base/attr-col.lua
index d4f1c1198..451cf0ee1 100644
--- a/tex/context/base/attr-col.lua
+++ b/tex/context/base/attr-col.lua
@@ -15,9 +15,9 @@ local concat = table.concat
local allocate = utilities.storage.allocate
-local report_attributes = logs.new("attributes")
-local report_colors = logs.new("colors")
-local report_transparencies = logs.new("transparencies")
+local report_attributes = logs.new("attributes","colors")
+local report_colors = logs.new("colors","support")
+local report_transparencies = logs.new("transparencies","support")
local attributes, nodes = attributes, nodes
diff --git a/tex/context/base/attr-ini.mkiv b/tex/context/base/attr-ini.mkiv
index 5de366ed9..e2952166a 100644
--- a/tex/context/base/attr-ini.mkiv
+++ b/tex/context/base/attr-ini.mkiv
@@ -44,7 +44,7 @@
\expandafter\newconstant \csname :attr:#1\endcsname
\csname :attr:#1\endcsname\lastallocatedattribute
\ctxcommand{defineattribute("#1",\number\lastallocatedattribute)}%
- %\writestatus\m!systems{defining attribute #1 with number \number\lastallocatedattribute}%
+ %\writestatus\m!system{defining attribute #1 with number \number\lastallocatedattribute}%
\doifnotinset\s!global{#2}{\appendetoks\csname @attr@#1\endcsname\attributeunsetvalue\to\attributesresetlist}%
\doifinset \s!public{#2}{\expandafter\let\csname#1attribute\expandafter\endcsname\csname :attr:#1\endcsname}}
@@ -56,7 +56,7 @@
\expandafter\attributedef\csname @attr@#1\endcsname\scratchcounter
\expandafter\newconstant \csname :attr:#1\endcsname
\csname :attr:#1\endcsname\scratchcounter
- %\writestatus\m!systems{defining system attribute #1 with number \number\scratchcounter}%
+ %\writestatus\m!system{defining system attribute #1 with number \number\scratchcounter}%
\doifnotinset\s!global{#2}{\appendetoks\csname @attr@#1\endcsname\attributeunsetvalue\to\attributesresetlist}%
\doifinset \s!public{#2}{\expandafter\let\csname#1attribute\expandafter\endcsname\csname :attr:#1\endcsname}}
diff --git a/tex/context/base/attr-lay.lua b/tex/context/base/attr-lay.lua
index 1c13762c4..949c9dbe8 100644
--- a/tex/context/base/attr-lay.lua
+++ b/tex/context/base/attr-lay.lua
@@ -77,7 +77,7 @@ local function reviver(data,n)
data[n] = d
return d
else
- logs.report("viewerlayers","error, unknown reference '%s'",tostring(n))
+ report_viewerlayers("error, unknown reference '%s'",tostring(n))
end
end
end
diff --git a/tex/context/base/back-exp.lua b/tex/context/base/back-exp.lua
index 56eea251b..8c01e365c 100644
--- a/tex/context/base/back-exp.lua
+++ b/tex/context/base/back-exp.lua
@@ -50,7 +50,7 @@ local trace_tree = false trackers.register ("structures.export.showtree",
local less_state = false directives.register("structures.export.lessstate", function(v) less_state = v end)
local page_breaks = false directives.register("structures.export.pagebreaks", function(v) page_breaks = v end)
-local report_export = logs.new("export")
+local report_export = logs.new("backend","export")
local nodes = nodes
local attributes = attributes
diff --git a/tex/context/base/back-ini.lua b/tex/context/base/back-ini.lua
index 10f908798..3cbfb9a30 100644
--- a/tex/context/base/back-ini.lua
+++ b/tex/context/base/back-ini.lua
@@ -14,7 +14,7 @@ local backends = backends
local trace_backend = false trackers.register("backend.initializers", function(v) trace_finalizers = v end)
-local report_backends = logs.new("backends")
+local report_backend = logs.new("backend","initializing")
local function nothing() return nil end
@@ -158,7 +158,7 @@ function backends.install(what)
local backend = backends[what]
if backend then
if trace_backend then
- report_backends("initializing backend %s (%s)",what,backend.comment or "no comment")
+ report_backend("initializing backend %s (%s)",what,backend.comment or "no comment")
end
backends.current = what
for _, category in next, { "nodeinjections", "codeinjections", "registrations", "tables" } do
@@ -168,28 +168,28 @@ function backends.install(what)
for name, meaning in next, whereto do
if plugin[name] then
whereto[name] = plugin[name]
- -- report_backends("installing function %s in category %s of %s",name,category,what)
+ -- report_backend("installing function %s in category %s of %s",name,category,what)
elseif trace_backend then
- report_backends("no function %s in category %s of %s",name,category,what)
+ report_backend("no function %s in category %s of %s",name,category,what)
end
end
elseif trace_backend then
- report_backends("no category %s in %s",category,what)
+ report_backend("no category %s in %s",category,what)
end
-- extra checks
for k, v in next, whereto do
if not plugin[k] then
- report_backends("entry %s in %s is not set",k,category)
+ report_backend("entry %s in %s is not set",k,category)
end
end
for k, v in next, plugin do
if not whereto[k] then
- report_backends("entry %s in %s is not used",k,category)
+ report_backend("entry %s in %s is not used",k,category)
end
end
end
elseif trace_backend then
- report_backends("no backend named %s",what)
+ report_backend("no backend named %s",what)
end
end
end
diff --git a/tex/context/base/bibl-bib.lua b/tex/context/base/bibl-bib.lua
index f301d9689..518518b42 100644
--- a/tex/context/base/bibl-bib.lua
+++ b/tex/context/base/bibl-bib.lua
@@ -27,7 +27,7 @@ local P, R, S, C, Cc, Cs, Ct = lpeg.P, lpeg.R, lpeg.S, lpeg.C, lpeg.Cc, lpeg.Cs,
local trace_bibxml = false trackers.register("publications.bibxml", function(v) trace_bibtex = v end)
-local report_publications = logs.new("publications")
+local report_xml = logs.new("publications","xml")
bibtex = bibtex or { }
local bibtex = bibtex
@@ -144,9 +144,9 @@ function bibtex.load(session,filename)
if filename ~= "" then
local data = io.loaddata(filename) or ""
if data == "" then
- report_publications("empty file '%s', no conversion to xml",filename)
+ report_xml("empty file '%s', no conversion to xml",filename)
elseif trace_bibxml then
- report_publications("converting file '%s' to xml",filename)
+ report_xml("converting file '%s' to xml",filename)
end
bibtex.convert(session,data)
end
diff --git a/tex/context/base/bibl-tra.lua b/tex/context/base/bibl-tra.lua
index 3e16e050d..6b44d1b67 100644
--- a/tex/context/base/bibl-tra.lua
+++ b/tex/context/base/bibl-tra.lua
@@ -17,7 +17,7 @@ local variables, constants = interfaces.variables, interfaces.constants
local trace_bibtex = false trackers.register("publications.bibtex", function(v) trace_bibtex = v end)
-local report_publications = logs.new("publications")
+local report_tex = logs.new("publications","tex")
local context, structures = context, structures
@@ -41,7 +41,7 @@ function hacks.process(settings)
interfaces.showmessage("publications",3)
io.savedata(file.addsuffix(jobname,"aux"),format(template,style,database))
if trace_bibtex then
- report_publications("processing bibtex file '%s'",jobname)
+ report_tex("processing bibtex file '%s'",jobname)
end
os.execute(format("bibtex %s",jobname))
-- purge 'm
@@ -50,7 +50,7 @@ end
function hacks.register(str)
if trace_bibtex then
- report_publications("registering bibtex entry '%s'",str)
+ report_tex("registering bibtex entry '%s'",str)
end
registered[#registered+1] = str
ordered[str] = #registered
diff --git a/tex/context/base/buff-ini.lua b/tex/context/base/buff-ini.lua
index de5a880e3..be602d0a0 100644
--- a/tex/context/base/buff-ini.lua
+++ b/tex/context/base/buff-ini.lua
@@ -9,7 +9,7 @@ if not modules then modules = { } end modules ['buff-ini'] = {
local trace_run = false trackers.register("buffers.run", function(v) trace_run = v end)
local trace_visualize = false trackers.register("buffers.visualize", function(v) trace_visualize = v end)
-local report_buffers = logs.new("buffers")
+local report_buffers = logs.new("buffers","usage")
local concat = table.concat
local type, next = type, next
@@ -162,12 +162,12 @@ function commands.runbuffer(name,list,encapsulate)
local data = io.loaddata(name)
if data ~= content then
if trace_run then
- commands.writestatus("buffers","changes in '%s', processing forced",name)
+ report_buffers("changes in '%s', processing forced",name)
end
io.savedata(name,content)
os.execute(format(command,name))
elseif trace_run then
- commands.writestatus("buffers","no changes in '%s', not processed",name)
+ report_buffers("no changes in '%s', not processed",name)
end
end
diff --git a/tex/context/base/buff-par.lua b/tex/context/base/buff-par.lua
index 763d3481d..aa4841d8a 100644
--- a/tex/context/base/buff-par.lua
+++ b/tex/context/base/buff-par.lua
@@ -8,7 +8,7 @@ if not modules then modules = { } end modules ['buff-ini'] = {
local trace_parallel = false trackers.register("buffers.parallel", function(v) trace_parallel = v end)
-local report_parallel = logs.new("parallel")
+local report_parallel = logs.new("buffers","parallel")
local insert, remove, find, gmatch = table.insert, table.remove, string.find, string.gmatch
local strip, format = string.strip, string.format
diff --git a/tex/context/base/buff-ver.lua b/tex/context/base/buff-ver.lua
index 9c7f6e371..a8721f6ec 100644
--- a/tex/context/base/buff-ver.lua
+++ b/tex/context/base/buff-ver.lua
@@ -22,7 +22,7 @@ local settings_to_array = utilities.parsers.settings_to_array
local trace_visualize = false trackers.register("buffers.visualize", function(v) trace_visualize = v end)
-local report_buffers = logs.new("buffers")
+local report_visualizers = logs.new("buffers","visualizers")
visualizers = visualizers or { }
@@ -160,7 +160,7 @@ function visualizers.newgrammar(name,t)
g = g and g.grammar
if g then
if trace_visualize then
- report_buffers("cloning grammar '%s'",name)
+ report_visualizers("cloning grammar '%s'",name)
end
for k,v in next, g do
if not t[k] then
@@ -179,12 +179,12 @@ local function getvisualizer(method,nature)
local m = specifications[method] or specifications.default
if nature then
if trace_visualize then
- report_buffers("getting visualizer '%s' with nature '%s'",method,nature)
+ report_visualizers("getting visualizer '%s' with nature '%s'",method,nature)
end
return m and (m[nature] or m.parser) or nil
else
if trace_visualize then
- report_buffers("getting visualizer '%s'",method)
+ report_visualizers("getting visualizer '%s'",method)
end
return m and m.parser or nil
end
@@ -194,7 +194,7 @@ local fallback = context.verbatim
local function makepattern(visualizer,kind,pattern)
if not pattern then
- logs.simple("error in visualizer: %s",kind)
+ report_visualizers("error in visualizer: %s",kind)
return patterns.alwaystrue
else
if type(visualizer) == "table" and type(kind) == "string" then
@@ -233,11 +233,11 @@ function visualizers.load(name)
end
if texname == "" or luaname == "" then
if trace_visualize then
- report_buffers("unknown visualizer '%s'",name)
+ report_visualizers("unknown visualizer '%s'",name)
end
else
if trace_visualize then
- report_buffers("loading visualizer '%s'",name)
+ report_visualizers("loading visualizer '%s'",name)
end
lua.registercode(luaname)
context.input(texname)
@@ -255,7 +255,7 @@ end
function visualizers.register(name,specification)
name = lower(name)
if trace_visualize then
- report_buffers("registering visualizer '%s'",name)
+ report_visualizers("registering visualizer '%s'",name)
end
specifications[name] = specification
local parser, handler = specification.parser, specification.handler
@@ -345,7 +345,7 @@ function visualizers.registerescapepattern(name,before,after,normalmethod,escape
local escapepattern = escapepatterns[name]
if not escapepattern then
if trace_visualize then
- report_buffers("registering escape pattern, name: '%s', before: '%s', after: '%s'",name,before,after)
+ report_visualizers("registering escape pattern, name: '%s', before: '%s', after: '%s'",name,before,after)
end
before, after = P(before) * space_pattern, space_pattern * P(after)
escapepattern = (
@@ -363,7 +363,7 @@ function visualizers.registerescapecommand(name,token,normalmethod,escapecommand
local escapepattern = escapepatterns[name]
if not escapepattern then
if trace_visualize then
- report_buffers("registering escape token, name: '%s', token: '%s'",name,token)
+ report_visualizers("registering escape token, name: '%s', token: '%s'",name,token)
end
token = P(token)
local notoken = hack((1 - token)^1)
@@ -417,12 +417,12 @@ local function visualize(content,settings) -- maybe also method in settings
local n = m and m[nature]
if n then
if trace_visualize then
- report_buffers("visualize using method '%s' and nature '%s'",method,nature)
+ report_visualizers("visualize using method '%s' and nature '%s'",method,nature)
end
n(content,settings)
else
if trace_visualize then
- report_buffers("visualize using method '%s'",method)
+ report_visualizers("visualize using method '%s'",method)
end
fallback(content,1,settings)
end
@@ -652,7 +652,6 @@ function commands.typefile(settings)
if str and str ~= "" then
local regime = settings.regime
if regime and regime ~= "" then
- regimes.load(regime)
str = regimes.translate(str,regime)
end
if str and str~= "" then
diff --git a/tex/context/base/char-ini.mkiv b/tex/context/base/char-ini.mkiv
index 1f8a46808..67ba25173 100644
--- a/tex/context/base/char-ini.mkiv
+++ b/tex/context/base/char-ini.mkiv
@@ -21,6 +21,20 @@
\unprotect
+% ¨äëïöüÿ
+% ´áćéíĺńóŕśúýź
+% ˙ċėġiż
+% ¯āēīōū
+% ˝őű
+% ˆâĉêĝĥîĵôŝûŵŷ
+% `àèìòùỳ
+% ¸çķļņŗşţ
+% ˛ąęįų
+% ˚åů
+% ˘ăĕğĭŏŭ
+% ˇčďěľňřšťž
+% ˜ãĩñõũ
+
% \def\checkedchar#1% #2%
% {\relax\iffontchar\font#1 \expandafter\firstoftwoarguments\else\expandafter\secondoftwoarguments\fi{\char#1}}
%
diff --git a/tex/context/base/cldf-ini.lua b/tex/context/base/cldf-ini.lua
index 42333a65f..5d84bc9fa 100644
--- a/tex/context/base/cldf-ini.lua
+++ b/tex/context/base/cldf-ini.lua
@@ -50,8 +50,8 @@ local xmlcatcodes = tex.xmlcatcodes
local flush = texsprint
-local report_context = logs.new("context") -- here
-local report_cld = logs.new("cld")
+local report_context = logs.new("cld","tex")
+local report_cld = logs.new("cld","stack")
local processlines = true -- experiments.register("context.processlines", function(v) processlines = v end)
diff --git a/tex/context/base/colo-icc.lua b/tex/context/base/colo-icc.lua
index fb2f83983..4687bfe3f 100644
--- a/tex/context/base/colo-icc.lua
+++ b/tex/context/base/colo-icc.lua
@@ -11,6 +11,8 @@ local readstring, readnumber = io.readstring, io.readnumber
local colors = attributes and attributes.colors or { } -- when used in mtxrun
+local report_colors = logs.new("colors","icc")
+
local R, Cs, lpegmatch = lpeg.R, lpeg.Cs, lpeg.match
local invalid = R(char(0)..char(31))
@@ -97,7 +99,7 @@ function colors.iccprofile(filename,verbose)
}
else
if verbose then
- logs.simple("ignoring tag '%s' or type '%s' in profile '%s'",tag,kind,fullname)
+ report_colors("ignoring tag '%s' or type '%s' in profile '%s'",tag,kind,fullname)
end
tags[tag] = nil
end
diff --git a/tex/context/base/colo-ini.lua b/tex/context/base/colo-ini.lua
index 6f4c73336..eed68d4c6 100644
--- a/tex/context/base/colo-ini.lua
+++ b/tex/context/base/colo-ini.lua
@@ -14,7 +14,7 @@ local lpegmatch, lpegpatterns = lpeg.match, lpeg.patterns
local trace_define = false trackers.register("colors.define",function(v) trace_define = v end)
-local report_colors = logs.new("colors")
+local report_colors = logs.new("colors","defining")
local attributes, context, commands = attributes, context, commands
@@ -39,12 +39,12 @@ local function definecolor(name, ca, global)
if ca and ca > 0 then
if global then
if trace_define then
- commands.writestatus("color","define global color '%s' with attribute: %s",name,ca)
+ report_colors("define global color '%s' with attribute: %s",name,ca)
end
context.colordefagc(name,ca)
else
if trace_define then
- commands.writestatus("color","define local color '%s' with attribute: %s",name,ca)
+ report_colors("define local color '%s' with attribute: %s",name,ca)
end
context.colordefalc(name,ca)
end
@@ -61,12 +61,12 @@ local function inheritcolor(name, ca, global)
if ca and ca ~= "" then
if global then
if trace_define then
- commands.writestatus("color","inherit global color '%s' with attribute: %s",name,ca)
+ report_colors("inherit global color '%s' with attribute: %s",name,ca)
end
context.colordeffgc(name,ca) -- some day we will set the macro directly
else
if trace_define then
- commands.writestatus("color","inherit local color '%s' with attribute: %s",name,ca)
+ report_colors("inherit local color '%s' with attribute: %s",name,ca)
end
context.colordefflc(name,ca)
end
@@ -83,12 +83,12 @@ local function definetransparent(name, ta, global)
if ta and ta > 0 then
if global then
if trace_define then
- commands.writestatus("color","define global transparency '%s' with attribute: %s",name,ta)
+ report_colors("define global transparency '%s' with attribute: %s",name,ta)
end
context.colordefagt(name,ta)
else
if trace_define then
- commands.writestatus("color","define local transparency '%s' with attribute: %s",name,ta)
+ report_colors("define local transparency '%s' with attribute: %s",name,ta)
end
context.colordefalt(name,ta)
end
@@ -105,12 +105,12 @@ local function inherittransparent(name, ta, global)
if ta and ta ~= "" then
if global then
if trace_define then
- commands.writestatus("color","inherit global transparency '%s' with attribute: %s",name,ta)
+ report_colors("inherit global transparency '%s' with attribute: %s",name,ta)
end
context.colordeffgt(name,ta)
else
if trace_define then
- commands.writestatus("color","inherit local transparency '%s' with attribute: %s",name,ta)
+ report_colors("inherit local transparency '%s' with attribute: %s",name,ta)
end
context.colordefflt(name,ta)
end
diff --git a/tex/context/base/cont-new.mkii b/tex/context/base/cont-new.mkii
index be1fb6c3e..a136dc695 100644
--- a/tex/context/base/cont-new.mkii
+++ b/tex/context/base/cont-new.mkii
@@ -11,7 +11,7 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-\newcontextversion{2011.02.05 11:37}
+\newcontextversion{2011.02.08 10:06}
%D This file is loaded at runtime, thereby providing an
%D excellent place for hacks, patches, extensions and new
diff --git a/tex/context/base/cont-new.mkiv b/tex/context/base/cont-new.mkiv
index 89a3b364f..d14bf8c28 100644
--- a/tex/context/base/cont-new.mkiv
+++ b/tex/context/base/cont-new.mkiv
@@ -11,7 +11,7 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-\newcontextversion{2011.02.05 11:37}
+\newcontextversion{2011.02.08 10:06}
%D This file is loaded at runtime, thereby providing an
%D excellent place for hacks, patches, extensions and new
@@ -19,7 +19,7 @@
\unprotect
-\writestatus\m!systems{beware: some patches loaded from cont-new.mkiv}
+\writestatus\m!system{beware: some patches loaded from cont-new.mkiv}
\def\fastscale#1%
@@ -581,8 +581,6 @@
%
% \setbreakpoints[compound]
-% \ctxlua{logs.report = commands.writereport} % this will become default
-
% till we fixed all styles:
\let\\=\crlf
diff --git a/tex/context/base/context.mkii b/tex/context/base/context.mkii
index be404ddf3..54f284089 100644
--- a/tex/context/base/context.mkii
+++ b/tex/context/base/context.mkii
@@ -20,7 +20,7 @@
%D your styles an modules.
\edef\contextformat {\jobname}
-\edef\contextversion{2011.02.05 11:37}
+\edef\contextversion{2011.02.08 10:06}
%D For those who want to use this:
diff --git a/tex/context/base/context.mkiv b/tex/context/base/context.mkiv
index 7eba6d64e..a735801c0 100644
--- a/tex/context/base/context.mkiv
+++ b/tex/context/base/context.mkiv
@@ -20,7 +20,7 @@
%D your styles an modules.
\edef\contextformat {\jobname}
-\edef\contextversion{2011.02.05 11:37}
+\edef\contextversion{2011.02.08 10:06}
%D For those who want to use this:
diff --git a/tex/context/base/core-ctx.lua b/tex/context/base/core-ctx.lua
index 111c125da..b6ea7e66b 100644
--- a/tex/context/base/core-ctx.lua
+++ b/tex/context/base/core-ctx.lua
@@ -6,7 +6,9 @@ if not modules then modules = { } end modules ['core-ctx'] = {
license = "see context related readme files"
}
-local trace_prepfiles = false trackers.register("resolvers.prepfiles", function(v) trace_prepfiles = v end)
+local trace_prepfiles = false trackers.register("system.prepfiles", function(v) trace_prepfiles = v end)
+
+local report_prepfiles = logs.new("system","prepfiles")
commands = commands or { }
local commands = commands
@@ -21,9 +23,9 @@ function commands.loadctxpreplist()
islocal = xml.found(x,"ctx:preplist[@local=='yes']")
--~ if trace_prepfiles then
if islocal then
- commands.writestatus("systems","loading ctx log file (local)") -- todo: m!systems
+ report_prepfiles("loading ctx log file (local)") -- todo: m!systems
else
- commands.writestatus("systems","loading ctx log file (specified)") -- todo: m!systems
+ report_prepfiles("loading ctx log file (specified)") -- todo: m!systems
end
--~ end
for e in xml.collected(x,"ctx:prepfile") do
@@ -33,7 +35,7 @@ function commands.loadctxpreplist()
end
local done = e.at['done'] or 'no'
if trace_prepfiles then
- commands.writestatus("systems","registering %s -> %s",done)
+ report_prepfiles("registering %s -> %s",done)
end
found = true
list[name] = done -- 'yes' or 'no'
@@ -48,7 +50,7 @@ local function found(name) -- used in resolve
local prepname = name .. "." .. suffix
if list[name] and lfs.isfile(prepname) then
if trace_prepfiles then
- commands.writestatus("systems", "preprocessing: using %s",prepname)
+ report_prepfiles("preprocessing: using %s",prepname)
end
return prepname
end
diff --git a/tex/context/base/core-fil.mkiv b/tex/context/base/core-fil.mkiv
index 4ab78f082..263030a9b 100644
--- a/tex/context/base/core-fil.mkiv
+++ b/tex/context/base/core-fil.mkiv
@@ -217,7 +217,7 @@
\stopreadingfile
\doglobal\setflag{#2}}%
\ifx#1\undefined
- \writestatus\m!systems{command \string#1 not found in file #2}%
+ \writestatus\m!system{command \string#1 not found in file #2}%
\gdef#1{{\infofont[unknown command \string#1]}}%
\fi
#1}
diff --git a/tex/context/base/core-job.lua b/tex/context/base/core-job.lua
index abbbf4e5e..07ff5259e 100644
--- a/tex/context/base/core-job.lua
+++ b/tex/context/base/core-job.lua
@@ -19,6 +19,8 @@ resolvers.maxreadlevel = 3
directives.register("resolvers.maxreadlevel", function(v) resolvers.maxreadlevel = tonumber(v) or resolvers.maxreadlevel end)
+local report_examodes = logs.new("system","examodes") -- maybe another category
+
local function exists(n)
if io.exists(n) then
return n
@@ -121,10 +123,10 @@ function commands.loadexamodes(filename)
end
filename = resolvers.findfile(file.addsuffix(filename,'ctm')) or ""
if filename ~= "" then
- commands.writestatus("examodes","loading %s",filename) -- todo: message system
+ report_examodes("loading %s",filename) -- todo: message system
convertexamodes(io.loaddata(filename))
else
- commands.writestatus("examodes","no mode file %s",filename) -- todo: message system
+ report_examodes("no mode file %s",filename) -- todo: message system
end
end
diff --git a/tex/context/base/core-job.mkiv b/tex/context/base/core-job.mkiv
index 200bc9be3..28a864655 100644
--- a/tex/context/base/core-job.mkiv
+++ b/tex/context/base/core-job.mkiv
@@ -62,10 +62,10 @@
\def\doloadexamodes [#1]{\ctxcommand{loadexamodes("#1")}}
\def\registerfileinfo[#1#2]#3% geen \showmessage ?
- {\writestatus\m!systems{#1#2 file #3 at line \the\inputlineno}}
+ {\writestatus\m!system{#1#2 file #3 at line \the\inputlineno}}
\def\doloadsystemfile#1% only mkiv files
- {\readsysfile{#1.\mksuffix}{\showmessage\m!systems2{#1.\mksuffix}}\donothing}
+ {\readsysfile{#1.\mksuffix}{\showmessage\m!system2{#1.\mksuffix}}\donothing}
\def\loadsystemfiles
{\doloadsystemfile\f!newfilename % new code, to be integrated at some point, plus fixes posted on the list
@@ -77,9 +77,9 @@
\def\loadoptionfile % todo : mark document.* tables as storage
{\readjobfile{\jobname.\f!optionextension}
- {\showmessage\m!systems2{\jobname.\f!optionextension}%
+ {\writestatus\m!system{\jobname.\f!optionextension\space loaded}%
\ctxcommand{logoptionfile("\jobname.\f!optionextension")}}%
- {\writestatus\m!systems {no \jobname.\f!optionextension}}}
+ {\writestatus\m!system{no \jobname.\f!optionextension}}}
% Most natural ...
%
@@ -119,7 +119,7 @@
\fi}
\def\forcequitjob#1%
- {\writestatus\m!systems{forcing quit: #1}%
+ {\writestatus\m!system{forcing quit: #1}%
\batchmode
\dorecurse\textlevel{\stoptext}
\normalend}
@@ -129,7 +129,7 @@
\def\autostarttext
{\ifcase\textlevel
\starttext
- \writestatus\m!systems{auto \string\starttext..\string\stoptext}%
+ \writestatus\m!system{auto \string\starttext..\string\stoptext}%
\let\autostoptext\stoptext
\fi}
@@ -146,7 +146,7 @@
\let\end\finalend
\def\emergencyend
- {\writestatus\m!systems{invalid \@EA\string\csname\e!start\v!text\endcsname...\@EA\string\csname\e!stop\v!text\endcsname\space structure}%
+ {\writestatus\m!system{invalid \@EA\string\csname\e!start\v!text\endcsname...\@EA\string\csname\e!stop\v!text\endcsname\space structure}%
\stoptext}
\def\currentfile{\inputfilename}
diff --git a/tex/context/base/core-mis.mkiv b/tex/context/base/core-mis.mkiv
index 98f245e0d..2214d77c1 100644
--- a/tex/context/base/core-mis.mkiv
+++ b/tex/context/base/core-mis.mkiv
@@ -21,7 +21,7 @@
% %D
% %D Obsolete now:
% %
-% % \def\documentstyle{\showmessage\m!systems3\empty\stoptekst}
+% % \def\documentstyle{\showmessage\m!system3\empty\stoptekst}
% %
% % \let\documentclass=\documentstyle
% %D \macros
diff --git a/tex/context/base/core-sys.mkiv b/tex/context/base/core-sys.mkiv
index ec10fa1fa..f61cabec3 100644
--- a/tex/context/base/core-sys.mkiv
+++ b/tex/context/base/core-sys.mkiv
@@ -142,7 +142,7 @@
\s!default=>\getnewrandomseed\scratchcounter,
\s!unknown=>\scratchcounter#1]%
\expanded{\setrandomseed{\the\scratchcounter}}%
- % \writestatus\m!systems{randomseed: \the\scratchcounter}%
+ % \writestatus\m!system{randomseed: \the\scratchcounter}%
\egroup}}
\setupsystem
@@ -294,7 +294,7 @@
\def\complexdefine[#1]#2#3%
{\ifx#2\undefined
\else
- \showmessage\m!systems4{\string#2}%
+ \showmessage\m!system4{\string#2}%
\fi
\ifcase0#1\def#2{#3}%
\or\def#2##1{#3}%
diff --git a/tex/context/base/core-uti.lua b/tex/context/base/core-uti.lua
index 88afb35a9..f302d6051 100644
--- a/tex/context/base/core-uti.lua
+++ b/tex/context/base/core-uti.lua
@@ -78,20 +78,22 @@ if not checksums.new then checksums.new = md5.HEX("new") end -- used in experime
job.register('job.variables.checksums', checksums)
+local rmethod, rvalue
+
local function initializer()
tobesaved = mark(jobvariables.tobesaved)
collected = mark(jobvariables.collected)
checksums = mark(jobvariables.checksums)
- local r = collected.randomseed
- if not r then
- r = math.random()
- math.setrandomseedi(r,"initialize")
- report_jobcontrol("initializing randomizer with %s",r)
+ rvalue = collected.randomseed
+ if not rvalue then
+ rvalue = math.random()
+ math.setrandomseedi(rvalue,"initialize")
+ rmethod = "initialized"
else
- math.setrandomseedi(r,"previous run")
- report_jobcontrol("resuming randomizer with %s",r)
+ math.setrandomseedi(rvalue,"previous run")
+ rmethod = "resumed"
end
- tobesaved.randomseed = r
+ tobesaved.randomseed = rvalue
for cs, value in next, collected do
context.setxvalue(cs,value)
end
@@ -199,6 +201,12 @@ statistics.register("callbacks", function()
end
end)
+statistics.register("randomizer", function()
+ if rmethod and rvalue then
+ return format("%s with value %s",rmethod,rvalue)
+ end
+end)
+
function statistics.formatruntime(runtime)
local shipped = tex.count['nofshipouts']
local pages = tex.count['realpageno'] - 1
diff --git a/tex/context/base/data-aux.lua b/tex/context/base/data-aux.lua
index 0a80e04ce..480005a45 100644
--- a/tex/context/base/data-aux.lua
+++ b/tex/context/base/data-aux.lua
@@ -13,48 +13,48 @@ local trace_locating = false trackers.register("resolvers.locating", function(v
local resolvers = resolvers
-local report_resolvers = logs.new("resolvers")
+local report_scripts = logs.new("resolvers","scripts")
function resolvers.updatescript(oldname,newname) -- oldname -> own.name, not per se a suffix
local scriptpath = "scripts/context/lua"
newname = file.addsuffix(newname,"lua")
local oldscript = resolvers.cleanpath(oldname)
if trace_locating then
- report_resolvers("to be replaced old script %s", oldscript)
+ report_scripts("to be replaced old script %s", oldscript)
end
local newscripts = resolvers.findfiles(newname) or { }
if #newscripts == 0 then
if trace_locating then
- report_resolvers("unable to locate new script")
+ report_scripts("unable to locate new script")
end
else
for i=1,#newscripts do
local newscript = resolvers.cleanpath(newscripts[i])
if trace_locating then
- report_resolvers("checking new script %s", newscript)
+ report_scripts("checking new script %s", newscript)
end
if oldscript == newscript then
if trace_locating then
- report_resolvers("old and new script are the same")
+ report_scripts("old and new script are the same")
end
elseif not find(newscript,scriptpath) then
if trace_locating then
- report_resolvers("new script should come from %s",scriptpath)
+ report_scripts("new script should come from %s",scriptpath)
end
elseif not (find(oldscript,file.removesuffix(newname).."$") or find(oldscript,newname.."$")) then
if trace_locating then
- report_resolvers("invalid new script name")
+ report_scripts("invalid new script name")
end
else
local newdata = io.loaddata(newscript)
if newdata then
if trace_locating then
- report_resolvers("old script content replaced by new content")
+ report_scripts("old script content replaced by new content")
end
io.savedata(oldscript,newdata)
break
elseif trace_locating then
- report_resolvers("unable to load new script")
+ report_scripts("unable to load new script")
end
end
end
diff --git a/tex/context/base/data-con.lua b/tex/context/base/data-con.lua
index 5d9650f8e..673361d74 100644
--- a/tex/context/base/data-con.lua
+++ b/tex/context/base/data-con.lua
@@ -29,11 +29,11 @@ containers = containers or { }
local containers = containers
containers.usecache = true
-local report_cache = logs.new("cache")
+local report_containers = logs.new("resolvers","containers")
local function report(container,tag,name)
if trace_cache or trace_containers then
- report_cache("container: %s, tag: %s, name: %s",container.subcategory,tag,name or 'invalid')
+ report_containers("container: %s, tag: %s, name: %s",container.subcategory,tag,name or 'invalid')
end
end
diff --git a/tex/context/base/data-ctx.lua b/tex/context/base/data-ctx.lua
index 1bb3f9e71..6b9dc23ab 100644
--- a/tex/context/base/data-ctx.lua
+++ b/tex/context/base/data-ctx.lua
@@ -8,7 +8,7 @@ if not modules then modules = { } end modules ['data-ctx'] = {
local format = string.format
-local report_resolvers = logs.new("resolvers")
+local report_dump = logs.new("resolvers","dump")
local resolvers = resolvers
@@ -36,7 +36,7 @@ local function saveusedfilesin_trees()
end
f:write("</rl:job>\n")
f:close()
- report_resolvers("saving used tree files in '%s'",filename)
+ report_dump("saving used tree files in '%s'",filename)
end
end
diff --git a/tex/context/base/data-exp.lua b/tex/context/base/data-exp.lua
index feab32273..7ddf7e319 100644
--- a/tex/context/base/data-exp.lua
+++ b/tex/context/base/data-exp.lua
@@ -18,7 +18,7 @@ local collapsepath = file.collapsepath
local trace_locating = false trackers.register("resolvers.locating", function(v) trace_locating = v end)
local trace_expansions = false trackers.register("resolvers.expansions", function(v) trace_expansions = v end)
-local report_resolvers = logs.new("resolvers")
+local report_expansions = logs.new("resolvers","expansions")
local resolvers = resolvers
@@ -81,7 +81,7 @@ local replacer_1 = lpeg.replacer { { ",}", ",@}" }, { "{,", "{@," }, }
local function splitpathexpr(str, newlist, validate) -- I couldn't resist lpegging it (nice exercise).
if trace_expansions then
- report_resolvers("expanding variable '%s'",str)
+ report_expansions("expanding variable '%s'",str)
end
local t, ok, done = newlist or { }, false, false
local n = #t
@@ -107,7 +107,7 @@ local function splitpathexpr(str, newlist, validate) -- I couldn't resist lpeggi
end
if trace_expansions then
for k=1,#t do
- report_resolvers("% 4i: %s",k,t[k])
+ report_expansions("% 4i: %s",k,t[k])
end
end
return t
@@ -142,7 +142,7 @@ function resolvers.cleanpath(str)
homedir = lpegmatch(cleanup,environment.homedir or "")
if homedir == string.char(127) or homedir == "" or not lfs.isdir(homedir) then
if trace_expansions then
- report_resolvers("no home dir set, ignoring dependent paths")
+ report_expansions("no home dir set, ignoring dependent paths")
end
function resolvers.cleanpath(str)
if find(str,"~") then
@@ -212,9 +212,9 @@ local function splitconfigurationpath(str) -- beware, this can be either a path
end
end
if trace_expansions then
- report_resolvers("splitting path specification '%s'",str)
+ report_expansions("splitting path specification '%s'",str)
for k=1,noffound do
- report_resolvers("% 4i: %s",k,found[k])
+ report_expansions("% 4i: %s",k,found[k])
end
end
cache[str] = found
@@ -313,7 +313,7 @@ end
function resolvers.scanfiles(path,branch)
if trace_locating then
- report_resolvers("scanning path '%s', branch '%s'",path, branch or path)
+ report_expansions("scanning path '%s', branch '%s'",path, branch or path)
end
local realpath = resolvers.resolve(path) -- no shortcut
local files, n, m, r = scan({ },realpath .. '/',"",0,0,0)
@@ -322,7 +322,7 @@ function resolvers.scanfiles(path,branch)
files.__directories__ = m
files.__remappings__ = r
if trace_locating then
- report_resolvers("%s files found on %s directories with %s uppercase remappings",n,m,r)
+ report_expansions("%s files found on %s directories with %s uppercase remappings",n,m,r)
end
return files
end
diff --git a/tex/context/base/data-fil.lua b/tex/context/base/data-fil.lua
index ecbeb52e6..c9d8b23e1 100644
--- a/tex/context/base/data-fil.lua
+++ b/tex/context/base/data-fil.lua
@@ -8,7 +8,7 @@ if not modules then modules = { } end modules ['data-fil'] = {
local trace_locating = false trackers.register("resolvers.locating", function(v) trace_locating = v end)
-local report_resolvers = logs.new("resolvers")
+local report_files = logs.new("resolvers","files")
local resolvers = resolvers
@@ -22,11 +22,11 @@ function locators.file(specification)
local realname = resolvers.resolve(name) -- no shortcut
if realname and realname ~= '' and lfs.isdir(realname) then
if trace_locating then
- report_resolvers("file locator '%s' found as '%s'",name,realname)
+ report_files("file locator '%s' found as '%s'",name,realname)
end
resolvers.appendhash('file',name,true) -- cache
elseif trace_locating then
- report_resolvers("file locator '%s' not found",name)
+ report_files("file locator '%s' not found",name)
end
end
@@ -49,12 +49,12 @@ function finders.file(specification,filetype)
local foundname = resolvers.findfile(filename,filetype)
if foundname and foundname ~= "" then
if trace_locating then
- report_resolvers("file finder: '%s' found",filename)
+ report_files("file finder: '%s' found",filename)
end
return foundname
else
if trace_locating then
- report_resolvers("file finder: %s' not found",filename)
+ report_files("file finder: %s' not found",filename)
end
return finders.notfound()
end
@@ -75,13 +75,13 @@ function openers.file(specification,filetype)
local f = io.open(filename,"r")
if f then
if trace_locating then
- report_resolvers("file opener, '%s' opened",filename)
+ report_files("file opener, '%s' opened",filename)
end
return openers.helpers.textopener("file",filename,f)
end
end
if trace_locating then
- report_resolvers("file opener, '%s' not found",filename)
+ report_files("file opener, '%s' not found",filename)
end
return openers.notfound()
end
@@ -93,7 +93,7 @@ function loaders.file(specification,filetype)
if f then
logs.show_load(filename)
if trace_locating then
- report_resolvers("file loader, '%s' loaded",filename)
+ report_files("file loader, '%s' loaded",filename)
end
local s = f:read("*a")
if checkgarbage then
@@ -106,7 +106,7 @@ function loaders.file(specification,filetype)
end
end
if trace_locating then
- report_resolvers("file loader, '%s' not found",filename)
+ report_files("file loader, '%s' not found",filename)
end
return loaders.notfound()
end
diff --git a/tex/context/base/data-ini.lua b/tex/context/base/data-ini.lua
index 63a7571fe..5579ea964 100644
--- a/tex/context/base/data-ini.lua
+++ b/tex/context/base/data-ini.lua
@@ -16,7 +16,7 @@ local trace_locating = false trackers.register("resolvers.locating", functi
local trace_detail = false trackers.register("resolvers.details", function(v) trace_detail = v end)
local trace_expansions = false trackers.register("resolvers.expansions", function(v) trace_expansions = v end)
-local report_resolvers = logs.new("resolvers")
+local report_initialization = logs.new("resolvers","initialization")
local ostype, osname, ossetenv, osgetenv = os.type, os.name, os.setenv, os.getenv
@@ -37,7 +37,7 @@ kpse = { original = kpse }
setmetatable(kpse, {
__index = function(kp,name)
- report_resolvers("fatal error: kpse library is accessed (key: %s)",name)
+ report_initialization("fatal error: kpse library is accessed (key: %s)",name)
os.exit()
end
} )
@@ -121,13 +121,13 @@ do
if lfs.chdir(p) then
local pp = lfs.currentdir()
if trace_locating and p ~= pp then
- report_resolvers("following symlink '%s' to '%s'",p,pp)
+ report_initialization("following symlink '%s' to '%s'",p,pp)
end
ownpath = pp
lfs.chdir(olddir)
else
if trace_locating then
- report_resolvers("unable to check path '%s'",p)
+ report_initialization("unable to check path '%s'",p)
end
ownpath = p
end
@@ -138,9 +138,9 @@ do
end
if not ownpath or ownpath == "" then
ownpath = "."
- report_resolvers("forcing fallback ownpath .")
+ report_initialization("forcing fallback ownpath .")
elseif trace_locating then
- report_resolvers("using ownpath '%s'",ownpath)
+ report_initialization("using ownpath '%s'",ownpath)
end
end
@@ -167,7 +167,7 @@ do
ossetenv('SELFAUTODIR', file.collapsepath(ownpath .. "/.."))
ossetenv('SELFAUTOPARENT', file.collapsepath(ownpath .. "/../.."))
else
- report_resolvers("error: unable to locate ownpath")
+ report_initialization("error: unable to locate ownpath")
os.exit()
end
diff --git a/tex/context/base/data-lst.lua b/tex/context/base/data-lst.lua
index 23a2fc2fe..e2ad5164e 100644
--- a/tex/context/base/data-lst.lua
+++ b/tex/context/base/data-lst.lua
@@ -14,6 +14,8 @@ resolvers.listers = resolvers.listers or { }
local resolvers = resolvers
+local report_lists = logs.new("resolvers","lists")
+
local function tabstr(str)
if type(str) == 'table' then
return concat(str," | ")
@@ -42,11 +44,11 @@ function resolvers.listers.variables(pattern)
local exp = table.fastcopy(expansions)
for key, value in table.sortedpairs(configured) do
if key ~= "" and (pattern == "" or find(upper(key),pattern)) then
- logs.simple(key)
- logs.simple(" env: %s",tabstr(rawget(environment,key)) or "unset")
- logs.simple(" var: %s",tabstr(configured[key]) or "unset")
- logs.simple(" exp: %s",tabstr(expansions[key]) or "unset")
- logs.simple(" res: %s",resolvers.resolve(expansions[key]) or "unset")
+ report_lists(key)
+ report_lists(" env: %s",tabstr(rawget(environment,key)) or "unset")
+ report_lists(" var: %s",tabstr(configured[key]) or "unset")
+ report_lists(" exp: %s",tabstr(expansions[key]) or "unset")
+ report_lists(" res: %s",resolvers.resolve(expansions[key]) or "unset")
end
end
instance.environment = table.fastcopy(env)
diff --git a/tex/context/base/data-lua.lua b/tex/context/base/data-lua.lua
index 9509c97f0..ead64fe42 100644
--- a/tex/context/base/data-lua.lua
+++ b/tex/context/base/data-lua.lua
@@ -12,7 +12,7 @@ if not modules then modules = { } end modules ['data-lua'] = {
local trace_locating = false trackers.register("resolvers.locating", function(v) trace_locating = v end)
-local report_resolvers = logs.new("resolvers")
+local report_libraries = logs.new("resolvers","libraries")
local gsub, insert = string.gsub, table.insert
local unpack = unpack or table.unpack
@@ -44,7 +44,7 @@ local function thepath(...)
local t = { ... } t[#t+1] = "?.lua"
local path = file.join(unpack(t))
if trace_locating then
- report_resolvers("! appending '%s' to 'package.path'",path)
+ report_libraries("! appending '%s' to 'package.path'",path)
end
return path
end
@@ -66,11 +66,11 @@ local function loaded(libpaths,name,simple)
local libpath = libpaths[i]
local resolved = gsub(libpath,"%?",simple)
if trace_locating then -- more detail
- report_resolvers("! checking for '%s' on 'package.path': '%s' => '%s'",simple,libpath,resolved)
+ report_libraries("! checking for '%s' on 'package.path': '%s' => '%s'",simple,libpath,resolved)
end
if file.is_readable(resolved) then
if trace_locating then
- report_resolvers("! lib '%s' located via 'package.path': '%s'",name,resolved)
+ report_libraries("! lib '%s' located via 'package.path': '%s'",name,resolved)
end
return loadfile(resolved)
end
@@ -79,17 +79,17 @@ end
package.loaders[2] = function(name) -- was [#package.loaders+1]
if trace_locating then -- mode detail
- report_resolvers("! locating '%s'",name)
+ report_libraries("! locating '%s'",name)
end
for i=1,#libformats do
local format = libformats[i]
local resolved = resolvers.findfile(name,format) or ""
if trace_locating then -- mode detail
- report_resolvers("! checking for '%s' using 'libformat path': '%s'",name,format)
+ report_libraries("! checking for '%s' using 'libformat path': '%s'",name,format)
end
if resolved ~= "" then
if trace_locating then
- report_resolvers("! lib '%s' located via environment: '%s'",name,resolved)
+ report_libraries("! lib '%s' located via environment: '%s'",name,resolved)
end
return loadfile(resolved)
end
@@ -112,11 +112,11 @@ package.loaders[2] = function(name) -- was [#package.loaders+1]
local path = paths[p]
local resolved = file.join(path,libname)
if trace_locating then -- mode detail
- report_resolvers("! checking for '%s' using 'clibformat path': '%s'",libname,path)
+ report_libraries("! checking for '%s' using 'clibformat path': '%s'",libname,path)
end
if file.is_readable(resolved) then
if trace_locating then
- report_resolvers("! lib '%s' located via 'clibformat': '%s'",libname,resolved)
+ report_libraries("! lib '%s' located via 'clibformat': '%s'",libname,resolved)
end
return package.loadlib(resolved,name)
end
@@ -126,28 +126,28 @@ package.loaders[2] = function(name) -- was [#package.loaders+1]
local libpath = clibpaths[i]
local resolved = gsub(libpath,"?",simple)
if trace_locating then -- more detail
- report_resolvers("! checking for '%s' on 'package.cpath': '%s'",simple,libpath)
+ report_libraries("! checking for '%s' on 'package.cpath': '%s'",simple,libpath)
end
if file.is_readable(resolved) then
if trace_locating then
- report_resolvers("! lib '%s' located via 'package.cpath': '%s'",name,resolved)
+ report_libraries("! lib '%s' located via 'package.cpath': '%s'",name,resolved)
end
return package.loadlib(resolved,name)
end
end
-- just in case the distribution is messed up
if trace_loading then -- more detail
- report_resolvers("! checking for '%s' using 'luatexlibs': '%s'",name)
+ report_libraries("! checking for '%s' using 'luatexlibs': '%s'",name)
end
local resolved = resolvers.findfile(file.basename(name),'luatexlibs') or ""
if resolved ~= "" then
if trace_locating then
- report_resolvers("! lib '%s' located by basename via environment: '%s'",name,resolved)
+ report_libraries("! lib '%s' located by basename via environment: '%s'",name,resolved)
end
return loadfile(resolved)
end
if trace_locating then
- report_resolvers('? unable to locate lib: %s',name)
+ report_libraries('? unable to locate lib: %s',name)
end
-- return "unable to locate " .. name
end
diff --git a/tex/context/base/data-met.lua b/tex/context/base/data-met.lua
index a02e7eeb4..f9906c854 100644
--- a/tex/context/base/data-met.lua
+++ b/tex/context/base/data-met.lua
@@ -17,7 +17,7 @@ trackers.register("resolvers.methods", function(v) trace_methods = v end)
--~ trace_methods = true
-local report_resolvers = logs.new("resolvers")
+local report_methods = logs.new("resolvers","methods")
local allocate = utilities.storage.allocate
@@ -59,41 +59,41 @@ local function methodhandler(what,first,...) -- filename can be nil or false
local resolver = namespace and namespace[scheme]
if resolver then
if trace_methods then
- report_resolvers("resolver: method=%s, how=%s, scheme=%s, argument=%s",what,how,scheme,first)
+ report_methods("resolver: method=%s, how=%s, scheme=%s, argument=%s",what,how,scheme,first)
end
return resolver(specification,...)
else
resolver = namespace.default or namespace.file
if resolver then
if trace_methods then
- report_resolvers("resolver: method=%s, how=%s, default, argument=%s",what,how,first)
+ report_methods("resolver: method=%s, how=%s, default, argument=%s",what,how,first)
end
return resolver(specification,...)
elseif trace_methods then
- report_resolvers("resolver: method=%s, how=%s, no handler",what,how)
+ report_methods("resolver: method=%s, how=%s, no handler",what,how)
end
end
elseif how == "tag" then
local resolver = namespace and namespace[first]
if resolver then
if trace_methods then
- report_resolvers("resolver: method=%s, how=%s, tag=%s",what,how,first)
+ report_methods("resolver: method=%s, how=%s, tag=%s",what,how,first)
end
return resolver(...)
else
resolver = namespace.default or namespace.file
if resolver then
if trace_methods then
- report_resolvers("resolver: method=%s, how=%s, default",what,how)
+ report_methods("resolver: method=%s, how=%s, default",what,how)
end
return resolver(...)
elseif trace_methods then
- report_resolvers("resolver: method=%s, how=%s, unknown",what,how)
+ report_methods("resolver: method=%s, how=%s, unknown",what,how)
end
end
end
else
- report_resolvers("resolver: method=%s, unknown",what)
+ report_methods("resolver: method=%s, unknown",what)
end
end
diff --git a/tex/context/base/data-res.lua b/tex/context/base/data-res.lua
index e9dbc5e67..cd63941da 100644
--- a/tex/context/base/data-res.lua
+++ b/tex/context/base/data-res.lua
@@ -30,7 +30,7 @@ local trace_locating = false trackers.register("resolvers.locating", functi
local trace_detail = false trackers.register("resolvers.details", function(v) trace_detail = v end)
local trace_expansions = false trackers.register("resolvers.expansions", function(v) trace_expansions = v end)
-local report_resolvers = logs.new("resolvers")
+local report_resolving = logs.new("resolvers","resolving")
local resolvers = resolvers
@@ -140,7 +140,7 @@ end
function resolvers.newinstance() -- todo: all vars will become lowercase and alphanum only
if trace_locating then
- report_resolvers("creating instance")
+ report_resolving("creating instance")
end
local environment, variables, expansions, order = allocate(), allocate(), allocate(), allocate()
@@ -258,9 +258,9 @@ local function reportcriticalvariables()
for i=1,#resolvers.criticalvars do
local k = resolvers.criticalvars[i]
local v = resolvers.getenv(k) or "unknown" -- this one will not resolve !
- report_resolvers("variable '%s' set to '%s'",k,v)
+ report_resolving("variable '%s' set to '%s'",k,v)
end
- report_resolvers()
+ report_resolving()
end
reportcriticalvariables = function() end
end
@@ -284,17 +284,17 @@ local function identify_configuration_files()
if lfs.isfile(realname) then
specification[#specification+1] = filename
if trace_locating then
- report_resolvers("found configuration file '%s'",realname)
+ report_resolving("found configuration file '%s'",realname)
end
elseif trace_locating then
- report_resolvers("unknown configuration file '%s'",realname)
+ report_resolving("unknown configuration file '%s'",realname)
end
end
if trace_locating then
- report_resolvers()
+ report_resolving()
end
elseif trace_locating then
- report_resolvers("configuration files already identified")
+ report_resolving("configuration files already identified")
end
end
@@ -314,8 +314,8 @@ local function load_configuration_files()
data = data and data.content
if data then
if trace_locating then
- report_resolvers("loading configuration file '%s'",filename)
- report_resolvers()
+ report_resolving("loading configuration file '%s'",filename)
+ report_resolving()
end
local variables = data.variables or { }
local warning = false
@@ -325,7 +325,7 @@ local function load_configuration_files()
initializesetter(filename,k,v)
elseif variables[k] == nil then
if trace_locating and not warning then
- report_resolvers("variables like '%s' in configuration file '%s' should move to the 'variables' subtable",
+ report_resolving("variables like '%s' in configuration file '%s' should move to the 'variables' subtable",
k,resolvers.resolve(filename))
warning = true
end
@@ -338,7 +338,7 @@ local function load_configuration_files()
local cnfspec = variables["TEXMFCNF"]
if cnfspec then
if trace_locating then
- report_resolvers("reloading configuration due to TEXMF redefinition")
+ report_resolving("reloading configuration due to TEXMF redefinition")
end
-- we push the value into the main environment (osenv) so
-- that it takes precedence over the default one and therefore
@@ -357,13 +357,13 @@ local function load_configuration_files()
else
if trace_locating then
- report_resolvers("skipping configuration file '%s' (no content)",filename)
+ report_resolving("skipping configuration file '%s' (no content)",filename)
end
setups[pathname] = { }
instance.loaderror = true
end
elseif trace_locating then
- report_resolvers("skipping configuration file '%s' (no file)",filename)
+ report_resolving("skipping configuration file '%s' (no file)",filename)
end
instance.order[#instance.order+1] = instance.setups[pathname]
if instance.loaderror then
@@ -371,7 +371,7 @@ local function load_configuration_files()
end
end
elseif trace_locating then
- report_resolvers("warning: no lua configuration files found")
+ report_resolving("warning: no lua configuration files found")
end
end
@@ -407,19 +407,19 @@ local function locate_file_databases()
end
if trace_locating then
if runtime then
- report_resolvers("locating list of '%s' (runtime)",path)
+ report_resolving("locating list of '%s' (runtime)",path)
else
- report_resolvers("locating list of '%s' (cached)",path)
+ report_resolving("locating list of '%s' (cached)",path)
end
end
methodhandler('locators',stripped)
end
end
if trace_locating then
- report_resolvers()
+ report_resolving()
end
elseif trace_locating then
- report_resolvers("no texmf paths are defined (using TEXMF)")
+ report_resolving("no texmf paths are defined (using TEXMF)")
end
end
@@ -430,7 +430,7 @@ local function generate_file_databases()
methodhandler('generators',hash.name)
end
if trace_locating then
- report_resolvers()
+ report_resolving()
end
end
@@ -442,11 +442,11 @@ local function save_file_databases() -- will become cachers
local content = instance.files[cachename]
caches.collapsecontent(content)
if trace_locating then
- report_resolvers("saving tree '%s'",cachename)
+ report_resolving("saving tree '%s'",cachename)
end
caches.savecontent(cachename,"files",content)
elseif trace_locating then
- report_resolvers("not saving runtime tree '%s'",cachename)
+ report_resolving("not saving runtime tree '%s'",cachename)
end
end
end
@@ -471,7 +471,7 @@ function resolvers.appendhash(type,name,cache)
-- safeguard ... tricky as it's actually a bug when seen twice
if not instance.hashed[name] then
if trace_locating then
- report_resolvers("hash '%s' appended",name)
+ report_resolving("hash '%s' appended",name)
end
insert(instance.hashes, { type = type, name = name, cache = cache } )
instance.hashed[name] = cache
@@ -482,7 +482,7 @@ function resolvers.prependhash(type,name,cache)
-- safeguard ... tricky as it's actually a bug when seen twice
if not instance.hashed[name] then
if trace_locating then
- report_resolvers("hash '%s' prepended",name)
+ report_resolving("hash '%s' prepended",name)
end
insert(instance.hashes, 1, { type = type, name = name, cache = cache } )
instance.hashed[name] = cache
@@ -715,9 +715,9 @@ function isreadable(name)
local readable = lfs.isfile(name) -- not file.is_readable(name) asit can be a dir
if trace_detail then
if readable then
- report_resolvers("file '%s' is readable",name)
+ report_resolving("file '%s' is readable",name)
else
- report_resolvers("file '%s' is not readable", name)
+ report_resolving("file '%s' is not readable", name)
end
end
return readable
@@ -731,7 +731,7 @@ local function collect_files(names)
for k=1,#names do
local fname = names[k]
if trace_detail then
- report_resolvers("checking name '%s'",fname)
+ report_resolving("checking name '%s'",fname)
end
local bname = filebasename(fname)
local dname = filedirname(fname)
@@ -747,7 +747,7 @@ local function collect_files(names)
local files = blobpath and instance.files[blobpath]
if files then
if trace_detail then
- report_resolvers("deep checking '%s' (%s)",blobpath,bname)
+ report_resolving("deep checking '%s' (%s)",blobpath,bname)
end
local blobfile = files[bname]
if not blobfile then
@@ -767,7 +767,7 @@ local function collect_files(names)
local search = filejoin(blobroot,blobfile,bname)
local result = methodhandler('concatinators',hash.type,blobroot,blobfile,bname)
if trace_detail then
- report_resolvers("match: kind '%s', search '%s', result '%s'",kind,search,result)
+ report_resolving("match: kind '%s', search '%s', result '%s'",kind,search,result)
end
noffiles = noffiles + 1
filelist[noffiles] = { kind, search, result }
@@ -781,7 +781,7 @@ local function collect_files(names)
local search = filejoin(blobroot,vv,bname)
local result = methodhandler('concatinators',hash.type,blobroot,vv,bname)
if trace_detail then
- report_resolvers("match: kind '%s', search '%s', result '%s'",kind,search,result)
+ report_resolving("match: kind '%s', search '%s', result '%s'",kind,search,result)
end
noffiles = noffiles + 1
filelist[noffiles] = { kind, search, result }
@@ -790,7 +790,7 @@ local function collect_files(names)
end
end
elseif trace_locating then
- report_resolvers("no match in '%s' (%s)",blobpath,bname)
+ report_resolving("no match in '%s' (%s)",blobpath,bname)
end
end
end
@@ -831,7 +831,7 @@ local function collect_instance_files(filename,askedformat,allresults) -- todo :
stamp = filename .. "--" .. askedformat
if instance.found[stamp] then
if trace_locating then
- report_resolvers("remembered file '%s'",filename)
+ report_resolving("remembered file '%s'",filename)
end
resolvers.registerintrees(filename) -- for tracing used files
return instance.found[stamp]
@@ -840,7 +840,7 @@ local function collect_instance_files(filename,askedformat,allresults) -- todo :
if not dangerous[askedformat] then
if isreadable(filename) then
if trace_detail then
- report_resolvers("file '%s' found directly",filename)
+ report_resolving("file '%s' found directly",filename)
end
if stamp then
instance.found[stamp] = { filename }
@@ -850,13 +850,13 @@ local function collect_instance_files(filename,askedformat,allresults) -- todo :
end
if find(filename,'%*') then
if trace_locating then
- report_resolvers("checking wildcard '%s'", filename)
+ report_resolving("checking wildcard '%s'", filename)
end
result = resolvers.findwildcardfiles(filename) -- we can use th elocal
elseif file.is_qualified_path(filename) then
if isreadable(filename) then
if trace_locating then
- report_resolvers("qualified name '%s'", filename)
+ report_resolving("qualified name '%s'", filename)
end
result = { filename }
else
@@ -869,7 +869,7 @@ local function collect_instance_files(filename,askedformat,allresults) -- todo :
forcedname = filename .. "." .. s
if isreadable(forcedname) then
if trace_locating then
- report_resolvers("no suffix, forcing format filetype '%s'", s)
+ report_resolving("no suffix, forcing format filetype '%s'", s)
end
result, ok = { forcedname }, true
break
@@ -922,7 +922,7 @@ local function collect_instance_files(filename,askedformat,allresults) -- todo :
-- end
end
if not ok and trace_locating then
- report_resolvers("qualified name '%s'", filename)
+ report_resolving("qualified name '%s'", filename)
end
end
else
@@ -941,13 +941,13 @@ local function collect_instance_files(filename,askedformat,allresults) -- todo :
wantedfiles[#wantedfiles+1] = forcedname
filetype = resolvers.formatofsuffix(forcedname)
if trace_locating then
- report_resolvers("forcing filetype '%s'",filetype)
+ report_resolving("forcing filetype '%s'",filetype)
end
end
else
filetype = resolvers.formatofsuffix(filename)
if trace_locating then
- report_resolvers("using suffix based filetype '%s'",filetype)
+ report_resolving("using suffix based filetype '%s'",filetype)
end
end
else
@@ -961,7 +961,7 @@ local function collect_instance_files(filename,askedformat,allresults) -- todo :
end
filetype = askedformat
if trace_locating then
- report_resolvers("using given filetype '%s'",filetype)
+ report_resolving("using given filetype '%s'",filetype)
end
end
local typespec = resolvers.variableofformat(filetype)
@@ -969,7 +969,7 @@ local function collect_instance_files(filename,askedformat,allresults) -- todo :
if not pathlist or #pathlist == 0 then
-- no pathlist, access check only / todo == wildcard
if trace_detail then
- report_resolvers("checking filename '%s', filetype '%s', wanted files '%s'",filename, filetype or '?',concat(wantedfiles," | "))
+ report_resolving("checking filename '%s', filetype '%s', wanted files '%s'",filename, filetype or '?',concat(wantedfiles," | "))
end
for k=1,#wantedfiles do
local fname = wantedfiles[k]
@@ -997,7 +997,7 @@ local function collect_instance_files(filename,askedformat,allresults) -- todo :
end
end
if trace_detail then
- report_resolvers("checking filename '%s'",filename)
+ report_resolving("checking filename '%s'",filename)
end
for k=1,#pathlist do
local path = pathlist[k]
@@ -1009,7 +1009,7 @@ local function collect_instance_files(filename,askedformat,allresults) -- todo :
-- compare list entries with permitted pattern -- /xx /xx//
local expression = makepathexpression(pathname)
if trace_detail then
- report_resolvers("using pattern '%s' for path '%s'",expression,pathname)
+ report_resolving("using pattern '%s' for path '%s'",expression,pathname)
end
for k=1,#filelist do
local fl = filelist[k]
@@ -1021,16 +1021,16 @@ local function collect_instance_files(filename,askedformat,allresults) -- todo :
done = true
if allresults then
if trace_detail then
- report_resolvers("match to '%s' in hash for file '%s' and path '%s', continue scanning",expression,f,d)
+ report_resolving("match to '%s' in hash for file '%s' and path '%s', continue scanning",expression,f,d)
end
else
if trace_detail then
- report_resolvers("match to '%s' in hash for file '%s' and path '%s', quit scanning",expression,f,d)
+ report_resolving("match to '%s' in hash for file '%s' and path '%s', quit scanning",expression,f,d)
end
break
end
elseif trace_detail then
- report_resolvers("no match to '%s' in hash for file '%s' and path '%s'",expression,f,d)
+ report_resolving("no match to '%s' in hash for file '%s' and path '%s'",expression,f,d)
end
end
end
@@ -1047,7 +1047,7 @@ local function collect_instance_files(filename,askedformat,allresults) -- todo :
local fname = filejoin(ppname,w)
if isreadable(fname) then
if trace_detail then
- report_resolvers("found '%s' by scanning",fname)
+ report_resolving("found '%s' by scanning",fname)
end
result[#result+1] = fname
done = true
@@ -1085,7 +1085,7 @@ end
--~ local function find_direct(filename)
--~ if not dangerous[askedformat] and isreadable(filename) then
--~ if trace_detail then
---~ report_resolvers("file '%s' found directly",filename)
+--~ report_resolving("file '%s' found directly",filename)
--~ end
--~ return { filename }
--~ end
@@ -1094,7 +1094,7 @@ end
--~ local function find_wildcard(filename)
--~ if find(filename,'%*') then
--~ if trace_locating then
---~ report_resolvers("checking wildcard '%s'", filename)
+--~ report_resolving("checking wildcard '%s'", filename)
--~ end
--~ return resolvers.findwildcardfiles(filename) -- we can use the local
--~ end
@@ -1105,16 +1105,16 @@ end
--~ return
--~ end
--~ if trace_locating then
---~ report_resolvers("checking qualified name '%s'", filename)
+--~ report_resolving("checking qualified name '%s'", filename)
--~ end
--~ if isreadable(filename) then
--~ if trace_detail then
---~ report_resolvers("qualified file '%s' found", filename)
+--~ report_resolving("qualified file '%s' found", filename)
--~ end
--~ return { filename }
--~ else
--~ if trace_detail then
---~ report_resolvers("locating qualified file '%s'", filename)
+--~ report_resolving("locating qualified file '%s'", filename)
--~ end
--~ local forcedname, suffix = "", fileextname(filename)
--~ if suffix == "" then -- why
@@ -1125,7 +1125,7 @@ end
--~ forcedname = filename .. "." .. s
--~ if isreadable(forcedname) then
--~ if trace_locating then
---~ report_resolvers("no suffix, forcing format filetype '%s'", s)
+--~ report_resolving("no suffix, forcing format filetype '%s'", s)
--~ end
--~ return { forcedname }
--~ end
@@ -1203,13 +1203,13 @@ end
--~ wantedfiles[#wantedfiles+1] = forcedname
--~ filetype = resolvers.formatofsuffix(forcedname)
--~ if trace_locating then
---~ report_resolvers("forcing filetype '%s'",filetype)
+--~ report_resolving("forcing filetype '%s'",filetype)
--~ end
--~ end
--~ else
--~ filetype = resolvers.formatofsuffix(filename)
--~ if trace_locating then
---~ report_resolvers("using suffix based filetype '%s'",filetype)
+--~ report_resolving("using suffix based filetype '%s'",filetype)
--~ end
--~ end
--~ else
@@ -1223,7 +1223,7 @@ end
--~ end
--~ filetype = askedformat
--~ if trace_locating then
---~ report_resolvers("using given filetype '%s'",filetype)
+--~ report_resolving("using given filetype '%s'",filetype)
--~ end
--~ end
--~ return filetype, wantedfiles
@@ -1242,7 +1242,7 @@ end
--~ end
--~ end
--~ if trace_detail then
---~ report_resolvers("checking filename '%s'",filename)
+--~ report_resolving("checking filename '%s'",filename)
--~ end
--~ local result = { }
--~ for k=1,#pathlist do
@@ -1255,7 +1255,7 @@ end
--~ -- compare list entries with permitted pattern -- /xx /xx//
--~ local expression = makepathexpression(pathname)
--~ if trace_detail then
---~ report_resolvers("using pattern '%s' for path '%s'",expression,pathname)
+--~ report_resolving("using pattern '%s' for path '%s'",expression,pathname)
--~ end
--~ for k=1,#filelist do
--~ local fl = filelist[k]
@@ -1267,16 +1267,16 @@ end
--~ done = true
--~ if allresults then
--~ if trace_detail then
---~ report_resolvers("match to '%s' in hash for file '%s' and path '%s', continue scanning",expression,f,d)
+--~ report_resolving("match to '%s' in hash for file '%s' and path '%s', continue scanning",expression,f,d)
--~ end
--~ else
--~ if trace_detail then
---~ report_resolvers("match to '%s' in hash for file '%s' and path '%s', quit scanning",expression,f,d)
+--~ report_resolving("match to '%s' in hash for file '%s' and path '%s', quit scanning",expression,f,d)
--~ end
--~ break
--~ end
--~ elseif trace_detail then
---~ report_resolvers("no match to '%s' in hash for file '%s' and path '%s'",expression,f,d)
+--~ report_resolving("no match to '%s' in hash for file '%s' and path '%s'",expression,f,d)
--~ end
--~ end
--~ end
@@ -1293,7 +1293,7 @@ end
--~ local fname = filejoin(ppname,w)
--~ if isreadable(fname) then
--~ if trace_detail then
---~ report_resolvers("found '%s' by scanning",fname)
+--~ report_resolving("found '%s' by scanning",fname)
--~ end
--~ result[#result+1] = fname
--~ done = true
@@ -1319,7 +1319,7 @@ end
--~ local function find_onpath(filename,filetype,wantedfiles)
--~ local done = nil
--~ if trace_detail then
---~ report_resolvers("checking filename '%s', filetype '%s', wanted files '%s'",filename, filetype or '?',concat(wantedfiles," | "))
+--~ report_resolving("checking filename '%s', filetype '%s', wanted files '%s'",filename, filetype or '?',concat(wantedfiles," | "))
--~ end
--~ for k=1,#wantedfiles do
--~ local fname = wantedfiles[k]
@@ -1348,7 +1348,7 @@ end
--~ result = stamp and instance.found[stamp]
--~ if result then
--~ if trace_locating then
---~ report_resolvers("remembered file '%s'",filename)
+--~ report_resolving("remembered file '%s'",filename)
--~ end
--~ return result
--~ end
@@ -1373,7 +1373,7 @@ end
--~ end
--~ if stamp then
--~ if trace_locating then
---~ report_resolvers("remembering file '%s'",filename)
+--~ report_resolving("remembering file '%s'",filename)
--~ end
--~ instance.found[stamp] = result
--~ end
@@ -1543,7 +1543,7 @@ end
local function report(str)
if trace_locating then
- report_resolvers(str) -- has already verbose
+ report_resolving(str) -- has already verbose
else
print(str)
end
diff --git a/tex/context/base/data-sch.lua b/tex/context/base/data-sch.lua
index af86cd726..7d777319f 100644
--- a/tex/context/base/data-sch.lua
+++ b/tex/context/base/data-sch.lua
@@ -13,7 +13,7 @@ local finders, openers, loaders = resolvers.finders, resolvers.openers, resolver
local trace_schemes = false trackers.register("resolvers.schemes",function(v) trace_schemes = v end)
-local report_schemes = logs.new("schemes")
+local report_schemes = logs.new("resolvers","schemes")
local resolvers = resolvers
diff --git a/tex/context/base/data-tex.lua b/tex/context/base/data-tex.lua
index f8c847b22..38ecaed74 100644
--- a/tex/context/base/data-tex.lua
+++ b/tex/context/base/data-tex.lua
@@ -8,7 +8,7 @@ if not modules then modules = { } end modules ['data-tex'] = {
local trace_locating = false trackers.register("resolvers.locating", function(v) trace_locating = v end)
-local report_resolvers = logs.new("resolvers")
+local report_tex = logs.new("resolvers","tex")
local resolvers = resolvers
@@ -62,7 +62,7 @@ function helpers.textopener(tag,filename,filehandle)
if type(lines) == "string" then
local kind = utffiletype(lines)
if trace_locating then
- report_resolvers("%s opener, '%s' opened using method '%s'",tag,filename,kind)
+ report_tex("%s opener, '%s' opened using method '%s'",tag,filename,kind)
end
if kind == "utf-16-be" then
lines = unicode.utf16_to_utf8_be(lines)
@@ -80,7 +80,7 @@ function helpers.textopener(tag,filename,filehandle)
lines = splitlines(lines)
end
elseif trace_locating then
- report_resolvers("%s opener, '%s' opened",tag,filename)
+ report_tex("%s opener, '%s' opened",tag,filename)
end
logs.show_open(filename)
return {
@@ -89,7 +89,7 @@ function helpers.textopener(tag,filename,filehandle)
currentline = 0,
close = function()
if trace_locating then
- report_resolvers("%s closer, '%s' closed",tag,filename)
+ report_tex("%s closer, '%s' closed",tag,filename)
end
logs.show_close(filename)
t = nil
@@ -146,7 +146,7 @@ local function installhandler(namespace,what,where,func)
if where == "before" or where == "after" then
sequencers.appendaction(namespace,where,func)
else
- report_resolvers("installing input %s handlers in %s is not possible",what,tostring(where))
+ report_tex("installing input %s handlers in %s is not possible",what,tostring(where))
end
end
@@ -155,8 +155,8 @@ function resolvers.installinputfilehandler(...) installhandler(helpers.textfilea
-- local basename = file.basename
-- resolvers.installinputlinehandler(function(str,filename,linenumber,noflines)
--- logs.simple("[lc] file: %s, line: %s of %s, length: %s",basename(filename),linenumber,noflines,#str)
+-- report_tex("[lc] file: %s, line: %s of %s, length: %s",basename(filename),linenumber,noflines,#str)
-- end)
-- resolvers.installinputfilehandler(function(str,filename)
--- logs.simple("[fc] file: %s, length: %s",basename(filename),#str)
+-- report_tex("[fc] file: %s, length: %s",basename(filename),#str)
-- end)
diff --git a/tex/context/base/data-tmf.lua b/tex/context/base/data-tmf.lua
index 275b56150..4c39b57cf 100644
--- a/tex/context/base/data-tmf.lua
+++ b/tex/context/base/data-tmf.lua
@@ -8,6 +8,8 @@ if not modules then modules = { } end modules ['data-tmf'] = {
local resolvers = resolvers
+local report_tds = logs.new("resolvers","tds")
+
-- = <<
-- ? ??
-- < +=
@@ -28,11 +30,11 @@ function resolvers.load_tree(tree,resolve)
local newpath = file.join(newtree,"bin")
if not lfs.isdir(newtree) then
- logs.simple("no '%s' under tree %s",texos,tree)
+ report_tds("no '%s' under tree %s",texos,tree)
os.exit()
end
if not lfs.isdir(newpath) then
- logs.simple("no '%s/bin' under tree %s",texos,tree)
+ report_tds("no '%s/bin' under tree %s",texos,tree)
os.exit()
end
@@ -56,8 +58,8 @@ function resolvers.load_tree(tree,resolve)
setenv('TEXMFCNF', resolvers.luacnfspec, not resolve)
setenv("PATH", newpath .. io.pathseparator .. getenv("PATH"))
- logs.simple("changing from root '%s' to '%s'",oldroot,newroot)
- logs.simple("prepending '%s' to binary path",newpath)
- logs.simple()
+ report_tds("changing from root '%s' to '%s'",oldroot,newroot)
+ report_tds("prepending '%s' to binary path",newpath)
+ report_tds()
end
end
diff --git a/tex/context/base/data-tmp.lua b/tex/context/base/data-tmp.lua
index 8dc43b179..4084eda62 100644
--- a/tex/context/base/data-tmp.lua
+++ b/tex/context/base/data-tmp.lua
@@ -28,8 +28,8 @@ local mkdirs, isdir = dir.mkdirs, lfs.isdir
local trace_locating = false trackers.register("resolvers.locating", function(v) trace_locating = v end)
local trace_cache = false trackers.register("resolvers.cache", function(v) trace_cache = v end)
-local report_cache = logs.new("cache")
-local report_resolvers = logs.new("resolvers")
+local report_caches = logs.new("resolvers","caches")
+local report_resolvers = logs.new("resolvers","caching")
local resolvers = resolvers
@@ -89,7 +89,7 @@ local function identify()
if not caches.ask or io.ask(format("\nShould I create the cache path %s?",cachepath), "no", { "yes", "no" }) == "yes" then
mkdirs(cachepath)
if isdir(cachepath) and file.is_writable(cachepath) then
- report_cache("created: %s",cachepath)
+ report_caches("created: %s",cachepath)
writable = cachepath
readables[#readables+1] = cachepath
end
@@ -123,10 +123,10 @@ local function identify()
-- Some extra checking. If we have no writable or readable path then we simply
-- quit.
if not writable then
- report_cache("fatal error: there is no valid writable cache path defined")
+ report_caches("fatal error: there is no valid writable cache path defined")
os.exit()
elseif #readables == 0 then
- report_cache("fatal error: there is no valid readable cache path defined")
+ report_caches("fatal error: there is no valid readable cache path defined")
os.exit()
end
-- why here
@@ -148,9 +148,9 @@ local function identify()
-- end
if trace_cache then
for i=1,#readables do
- report_cache("using readable path '%s' (order %s)",readables[i],i)
+ report_caches("using readable path '%s' (order %s)",readables[i],i)
end
- report_cache("using writable path '%s'",writable)
+ report_caches("using writable path '%s'",writable)
end
identify = function()
return writable, readables
@@ -185,7 +185,7 @@ function caches.hashed(tree)
tree = lower(tree)
local hash = md5.hex(tree)
if trace_cache or trace_locating then
- report_cache("hashing tree %s, hash %s",tree,hash)
+ report_caches("hashing tree %s, hash %s",tree,hash)
end
return hash
end
diff --git a/tex/context/base/data-tre.lua b/tex/context/base/data-tre.lua
index b3b96094a..3de7bc5b5 100644
--- a/tex/context/base/data-tre.lua
+++ b/tex/context/base/data-tre.lua
@@ -12,7 +12,7 @@ local find, gsub, format = string.find, string.gsub, string.format
local trace_locating = false trackers.register("resolvers.locating", function(v) trace_locating = v end)
-local report_resolvers = logs.new("resolvers")
+local report_trees = logs.new("resolvers","trees")
local resolvers = resolvers
@@ -50,18 +50,18 @@ function resolvers.locators.tree(specification)
local name = specification.filename
if name ~= '' and lfs.isdir(name) then
if trace_locating then
- report_resolvers("tree locator '%s' found",name)
+ report_trees("locator '%s' found",name)
end
resolvers.appendhash('tree',name,false) -- don't cache
elseif trace_locating then
- report_resolvers("tree locator '%s' not found",name)
+ report_trees("locator '%s' not found",name)
end
end
function resolvers.hashers.tree(specification)
local name = specification.filename
if trace_locating then
- report_resolvers("analysing tree '%s'",name)
+ report_trees("analysing '%s'",name)
end
resolvers.methodhandler("hashers",name)
end
diff --git a/tex/context/base/data-use.lua b/tex/context/base/data-use.lua
index d4e9b53fe..9a31b13c8 100644
--- a/tex/context/base/data-use.lua
+++ b/tex/context/base/data-use.lua
@@ -10,7 +10,7 @@ local format, lower, gsub, find = string.format, string.lower, string.gsub, stri
local trace_locating = false trackers.register("resolvers.locating", function(v) trace_locating = v end)
-local report_resolvers = logs.new("resolvers")
+local report_mounts = logs.new("resolvers","mounts")
local resolvers = resolvers
@@ -35,7 +35,7 @@ function resolvers.automount(usecache)
-- skip
elseif find(line,"^zip://") then
if trace_locating then
- report_resolvers("mounting %s",line)
+ report_mounts("mounting %s",line)
end
table.insert(resolvers.automounted,line)
resolvers.usezipfile(line)
diff --git a/tex/context/base/data-vir.lua b/tex/context/base/data-vir.lua
index c1a6b3366..2a7ee1d8b 100644
--- a/tex/context/base/data-vir.lua
+++ b/tex/context/base/data-vir.lua
@@ -8,8 +8,8 @@ if not modules then modules = { } end modules ['data-vir'] = {
local format = string.format
-local trace_virtual = false
-local report_resolvers = logs.new("resolvers")
+local trace_virtual = false
+local report_virtual = logs.new("resolvers","virtual")
trackers.register("resolvers.locating", function(v) trace_virtual = v end)
trackers.register("resolvers.virtual", function(v) trace_virtual = v end)
@@ -25,7 +25,7 @@ function savers.virtual(specification,content)
local path = specification.path
local filename = format(template,path ~= "" and path or "virtualfile",n)
if trace_virtual then
- report_resolvers("virtual saver: file '%s' saved",filename)
+ report_virtual("saver: file '%s' saved",filename)
end
data[filename] = content
return filename
@@ -36,12 +36,12 @@ function finders.virtual(specification)
local d = data[original]
if d then
if trace_virtual then
- report_resolvers("virtual finder: file '%s' found",original)
+ report_virtual("finder: file '%s' found",original)
end
return original
else
if trace_virtual then
- report_resolvers("virtual finder: unknown file '%s'",original)
+ report_virtual("finder: unknown file '%s'",original)
end
return finders.notfound()
end
@@ -52,13 +52,13 @@ function openers.virtual(specification)
local d = data[original]
if d then
if trace_virtual then
- report_resolvers("virtual opener, file '%s' opened",original)
+ report_virtual("opener, file '%s' opened",original)
end
data[original] = nil
return openers.helpers.textopener("virtual",original,d)
else
if trace_virtual then
- report_resolvers("virtual opener, file '%s' not found",original)
+ report_virtual("opener, file '%s' not found",original)
end
return openers.notfound()
end
@@ -69,13 +69,13 @@ function loaders.virtual(specification)
local d = data[original]
if d then
if trace_virtual then
- report_resolvers("virtual loader, file '%s' loaded",original)
+ report_virtual("loader, file '%s' loaded",original)
end
data[original] = nil
return true, d, #d
end
if trace_virtual then
- report_resolvers("virtual loader, file '%s' not loaded",original)
+ report_virtual("loader, file '%s' not loaded",original)
end
return loaders.notfound()
end
diff --git a/tex/context/base/data-zip.lua b/tex/context/base/data-zip.lua
index 25d31fb6b..706461aaf 100644
--- a/tex/context/base/data-zip.lua
+++ b/tex/context/base/data-zip.lua
@@ -12,7 +12,7 @@ local format, find, match = string.format, string.find, string.match
local trace_locating = false trackers.register("resolvers.locating", function(v) trace_locating = v end)
-local report_resolvers = logs.new("resolvers")
+local report_zip = logs.new("resolvers","zip")
-- zip:///oeps.zip?name=bla/bla.tex
-- zip:///oeps.zip?tree=tex/texmf-local
@@ -65,9 +65,9 @@ function resolvers.locators.zip(specification)
local zipfile = archive and archive ~= "" and zip.openarchive(archive) -- tricky, could be in to be initialized tree
if trace_locating then
if zipfile then
- report_resolvers("zip locator, archive '%s' found",archive)
+ report_zip("locator, archive '%s' found",archive)
else
- report_resolvers("zip locator, archive '%s' not found",archive)
+ report_zip("locator, archive '%s' not found",archive)
end
end
end
@@ -75,7 +75,7 @@ end
function resolvers.hashers.zip(specification)
local archive = specification.filename
if trace_locating then
- report_resolvers("loading zip file '%s'",archive)
+ report_zip("loading file '%s'",archive)
end
resolvers.usezipfile(specification.original)
end
@@ -98,25 +98,25 @@ function resolvers.finders.zip(specification)
local zfile = zip.openarchive(archive)
if zfile then
if trace_locating then
- report_resolvers("zip finder, archive '%s' found",archive)
+ report_zip("finder, archive '%s' found",archive)
end
local dfile = zfile:open(queryname)
if dfile then
dfile = zfile:close()
if trace_locating then
- report_resolvers("zip finder, file '%s' found",queryname)
+ report_zip("finder, file '%s' found",queryname)
end
return specification.original
elseif trace_locating then
- report_resolvers("zip finder, file '%s' not found",queryname)
+ report_zip("finder, file '%s' not found",queryname)
end
elseif trace_locating then
- report_resolvers("zip finder, unknown archive '%s'",archive)
+ report_zip("finder, unknown archive '%s'",archive)
end
end
end
if trace_locating then
- report_resolvers("zip finder, '%s' not found",original)
+ report_zip("finder, '%s' not found",original)
end
return resolvers.finders.notfound()
end
@@ -131,24 +131,24 @@ function resolvers.openers.zip(specification)
local zfile = zip.openarchive(archive)
if zfile then
if trace_locating then
- report_resolvers("zip opener, archive '%s' opened",archive)
+ report_zip("opener, archive '%s' opened",archive)
end
local dfile = zfile:open(queryname)
if dfile then
if trace_locating then
- report_resolvers("zip opener, file '%s' found",queryname)
+ report_zip("opener, file '%s' found",queryname)
end
return resolvers.openers.helpers.textopener('zip',original,dfile)
elseif trace_locating then
- report_resolvers("zip opener, file '%s' not found",queryname)
+ report_zip("opener, file '%s' not found",queryname)
end
elseif trace_locating then
- report_resolvers("zip opener, unknown archive '%s'",archive)
+ report_zip("opener, unknown archive '%s'",archive)
end
end
end
if trace_locating then
- report_resolvers("zip opener, '%s' not found",original)
+ report_zip("opener, '%s' not found",original)
end
return resolvers.openers.notfound()
end
@@ -163,27 +163,27 @@ function resolvers.loaders.zip(specification)
local zfile = zip.openarchive(archive)
if zfile then
if trace_locating then
- report_resolvers("zip loader, archive '%s' opened",archive)
+ report_zip("loader, archive '%s' opened",archive)
end
local dfile = zfile:open(queryname)
if dfile then
logs.show_load(original)
if trace_locating then
- report_resolvers("zip loader, file '%s' loaded",original)
+ report_zip("loader, file '%s' loaded",original)
end
local s = dfile:read("*all")
dfile:close()
return true, s, #s
elseif trace_locating then
- report_resolvers("zip loader, file '%s' not found",queryname)
+ report_zip("loader, file '%s' not found",queryname)
end
elseif trace_locating then
- report_resolvers("zip loader, unknown archive '%s'",archive)
+ report_zip("loader, unknown archive '%s'",archive)
end
end
end
if trace_locating then
- report_resolvers("zip loader, '%s' not found",original)
+ report_zip("loader, '%s' not found",original)
end
return resolvers.openers.notfound()
end
@@ -199,7 +199,7 @@ function resolvers.usezipfile(archive)
if z then
local tree = url.query(specification.query).tree or ""
if trace_locating then
- report_resolvers("zip registering, registering archive '%s'",archive)
+ report_zip("registering, registering archive '%s'",archive)
end
statistics.starttiming(resolvers.instance)
resolvers.prependhash('zip',archive)
@@ -208,10 +208,10 @@ function resolvers.usezipfile(archive)
instance.files[archive] = resolvers.registerzipfile(z,tree)
statistics.stoptiming(resolvers.instance)
elseif trace_locating then
- report_resolvers("zip registering, unknown archive '%s'",archive)
+ report_zip("registering, unknown archive '%s'",archive)
end
elseif trace_locating then
- report_resolvers("zip registering, '%s' not found",archive)
+ report_zip("registering, '%s' not found",archive)
end
end
@@ -223,7 +223,7 @@ function resolvers.registerzipfile(z,tree)
filter = format("^%s/(.+)/(.-)$",tree)
end
if trace_locating then
- report_resolvers("zip registering, using filter '%s'",filter)
+ report_zip("registering, using filter '%s'",filter)
end
local register, n = resolvers.registerfile, 0
for i in z:files() do
@@ -240,6 +240,6 @@ function resolvers.registerzipfile(z,tree)
n = n + 1
end
end
- report_resolvers("zip registering, %s files registered",n)
+ report_zip("registering, %s files registered",n)
return files
end
diff --git a/tex/context/base/enco-ini.mkiv b/tex/context/base/enco-ini.mkiv
index 2c15e2ab7..737a8b6f1 100644
--- a/tex/context/base/enco-ini.mkiv
+++ b/tex/context/base/enco-ini.mkiv
@@ -36,6 +36,10 @@
\unprotect
+%D Obsolete (but sometimes used in styles)
+
+\let\defaultencoding\s!default
+
%D \macros
%D {defineaccent, definecharacter, definecommand}
diff --git a/tex/context/base/font-afm.lua b/tex/context/base/font-afm.lua
index 635780ac9..71c4f9fc3 100644
--- a/tex/context/base/font-afm.lua
+++ b/tex/context/base/font-afm.lua
@@ -21,7 +21,7 @@ local trace_features = false trackers.register("afm.features", function(v) trac
local trace_indexing = false trackers.register("afm.indexing", function(v) trace_indexing = v end)
local trace_loading = false trackers.register("afm.loading", function(v) trace_loading = v end)
-local report_afm = logs.new("load afm")
+local report_afm = logs.new("fonts","afm loading")
local next, type = next, type
local format, match, gmatch, lower, gsub, strip = string.format, string.match, string.gmatch, string.lower, string.gsub, string.strip
diff --git a/tex/context/base/font-chk.lua b/tex/context/base/font-chk.lua
index b8a4e924c..b3a08e50c 100644
--- a/tex/context/base/font-chk.lua
+++ b/tex/context/base/font-chk.lua
@@ -8,7 +8,7 @@ if not modules then modules = { } end modules ['font-chk'] = {
-- possible optimization: delayed initialization of vectors
-local report_fonts = logs.new("fonts")
+local report_fonts = logs.new("fonts","checking")
local fonts = fonts
diff --git a/tex/context/base/font-cid.lua b/tex/context/base/font-cid.lua
index 1d03bca4d..ed9a25563 100644
--- a/tex/context/base/font-cid.lua
+++ b/tex/context/base/font-cid.lua
@@ -12,7 +12,7 @@ local lpegmatch = lpeg.match
local trace_loading = false trackers.register("otf.loading", function(v) trace_loading = v end)
-local report_otf = logs.new("load otf")
+local report_otf = logs.new("fonts","otf loading")
local fonts = fonts
diff --git a/tex/context/base/font-col.lua b/tex/context/base/font-col.lua
index ef08c0b8c..5b5eaf8ea 100644
--- a/tex/context/base/font-col.lua
+++ b/tex/context/base/font-col.lua
@@ -15,7 +15,7 @@ local settings_to_hash = utilities.parsers.settings_to_hash
local trace_collecting = false trackers.register("fonts.collecting", function(v) trace_collecting = v end)
-local report_fonts = logs.new("fonts")
+local report_fonts = logs.new("fonts","collections")
local fonts, context = fonts, context
diff --git a/tex/context/base/font-ctx.lua b/tex/context/base/font-ctx.lua
index ac7334c10..22b908825 100644
--- a/tex/context/base/font-ctx.lua
+++ b/tex/context/base/font-ctx.lua
@@ -22,9 +22,9 @@ local trace_defining = false trackers.register("fonts.defining", function(v) tr
local trace_usage = false trackers.register("fonts.usage", function(v) trace_usage = v end)
local trace_mapfiles = false trackers.register("fonts.mapfiles", function(v) trace_mapfiles = v end)
-local report_define = logs.new("define fonts")
-local report_usage = logs.new("fonts usage")
-local report_mapfiles = logs.new("mapfiles")
+local report_defining = logs.new("fonts","defining")
+local report_status = logs.new("fonts","status")
+local report_mapfiles = logs.new("fonts","mapfiles")
local fonts = fonts
local tfm = fonts.tfm
@@ -162,7 +162,7 @@ function definers.register(tfmdata,id)
if not fonts.internalized[hash] then
fonts.internalized[hash] = id
if trace_defining then
- report_define("registering font, id: %s, hash: %s",id or "?",hash or "?")
+ report_defining("registering font, id: %s, hash: %s",id or "?",hash or "?")
end
-- enhancetfmdata(tfmdata)
local characters = tfmdata.characters
@@ -492,7 +492,7 @@ function definers.stage_one(str)
local fullname, size = lpegmatch(splitpattern,str)
local lookup, name, sub, method, detail = getspecification(fullname)
if not name then
- report_define("strange definition '%s'",str)
+ report_defining("strange definition '%s'",str)
setdefaultfontname()
elseif name == "unknown" then
setdefaultfontname()
@@ -527,7 +527,7 @@ local n = 0
function definers.stage_two(global,cs,str,size,classfeatures,fontfeatures,classfallbacks,fontfallbacks,
mathsize,textsize,relativeid,classgoodies,goodies)
if trace_defining then
- report_define("memory usage before: %s",statistics.memused())
+ report_defining("memory usage before: %s",statistics.memused())
end
-- name is now resolved and size is scaled cf sa/mo
local lookup, name, sub, method, detail = getspecification(str or "")
@@ -567,12 +567,12 @@ function definers.stage_two(global,cs,str,size,classfeatures,fontfeatures,classf
fonts.csnames[cs] = tfmdata -- new (beware: locals can be forgotten)
end
if not tfmdata then
- report_define("unable to define %s as \\%s",name,cs)
+ report_defining("unable to define %s as \\%s",name,cs)
texsetcount("global","lastfontid",-1)
context.letvaluerelax(cs) -- otherwise the current definition takes the previous one
elseif type(tfmdata) == "number" then
if trace_defining then
- report_define("reusing %s with id %s as \\%s (features: %s/%s, fallbacks: %s/%s, goodies: %s/%s)",
+ report_defining("reusing %s with id %s as \\%s (features: %s/%s, fallbacks: %s/%s, goodies: %s/%s)",
name,tfmdata,cs,classfeatures,fontfeatures,classfallbacks,fontfallbacks,classgoodies,goodies)
end
tex.definefont(global,cs,tfmdata)
@@ -588,7 +588,7 @@ function definers.stage_two(global,cs,str,size,classfeatures,fontfeatures,classf
tex.definefont(global,cs,id)
tfm.cleanuptable(tfmdata)
if trace_defining then
- report_define("defining %s with id %s as \\%s (features: %s/%s, fallbacks: %s/%s)",name,id,cs,classfeatures,fontfeatures,classfallbacks,fontfallbacks)
+ report_defining("defining %s with id %s as \\%s (features: %s/%s, fallbacks: %s/%s)",name,id,cs,classfeatures,fontfeatures,classfallbacks,fontfallbacks)
end
-- resolved (when designsize is used):
setsomefontsize((tfmdata.size or 655360) .. "sp")
@@ -598,7 +598,7 @@ function definers.stage_two(global,cs,str,size,classfeatures,fontfeatures,classf
texsetcount("global","lastfontid",id)
end
if trace_defining then
- report_define("memory usage after: %s",statistics.memused())
+ report_defining("memory usage after: %s",statistics.memused())
end
statistics.stoptiming(fonts)
end
@@ -894,11 +894,11 @@ function fonts.reportdefinedfonts()
}
end
formatcolumns(t," ")
- report_usage()
- report_usage("defined fonts:")
- report_usage()
+ report_status()
+ report_status("defined fonts:")
+ report_status()
for k=1,tn do
- report_usage(t[k])
+ report_status(t[k])
end
end
end
@@ -918,11 +918,11 @@ function fonts.reportusedfeatures()
setup.number = n -- restore it (normally not needed as we're done anyway)
end
formatcolumns(t," ")
- report_usage()
- report_usage("defined featuresets:")
- report_usage()
+ report_status()
+ report_status("defined featuresets:")
+ report_status()
for k=1,n do
- report_usage(t[k])
+ report_status(t[k])
end
end
end
diff --git a/tex/context/base/font-def.lua b/tex/context/base/font-def.lua
index a195fabd1..e8e6cfffe 100644
--- a/tex/context/base/font-def.lua
+++ b/tex/context/base/font-def.lua
@@ -19,8 +19,8 @@ local directive_embedall = false directives.register("fonts.embedall", function
trackers.register("fonts.loading", "fonts.defining", "otf.loading", "afm.loading", "tfm.loading")
trackers.register("fonts.all", "fonts.*", "otf.*", "afm.*", "tfm.*")
-local report_define = logs.new("define fonts")
-local report_afm = logs.new("load afm")
+local report_defining = logs.new("fonts","defining")
+local report_afm = logs.new("fonts","afm loading")
--[[ldx--
<p>Here we deal with defining fonts. We do so by intercepting the
@@ -135,7 +135,7 @@ end
function definers.makespecification(specification, lookup, name, sub, method, detail, size)
size = size or 655360
if trace_defining then
- report_define("%s -> lookup: %s, name: %s, sub: %s, method: %s, detail: %s",
+ report_defining("%s -> lookup: %s, name: %s, sub: %s, method: %s, detail: %s",
specification, (lookup ~= "" and lookup) or "[file]", (name ~= "" and name) or "-",
(sub ~= "" and sub) or "-", (method ~= "" and method) or "-", (detail ~= "" and detail) or "-")
end
@@ -343,14 +343,14 @@ function tfm.read(specification)
local reader = readers[lower(forced)]
tfmtable = reader and reader(specification)
if not tfmtable then
- report_define("forced type %s of %s not found",forced,specification.name)
+ report_defining("forced type %s of %s not found",forced,specification.name)
end
else
for s=1,#sequence do -- reader sequence
local reader = sequence[s]
if readers[reader] then -- not really needed
if trace_defining then
- report_define("trying (reader sequence driven) type %s for %s with file %s",reader,specification.name,specification.filename or "unknown")
+ report_defining("trying (reader sequence driven) type %s for %s with file %s",reader,specification.name,specification.filename or "unknown")
end
tfmtable = readers[reader](specification)
if tfmtable then
@@ -375,7 +375,7 @@ function tfm.read(specification)
end
end
if not tfmtable then
- report_define("font with asked name '%s' is not found using lookup '%s'",specification.name,specification.lookup)
+ report_defining("font with asked name '%s' is not found using lookup '%s'",specification.name,specification.lookup)
end
return tfmtable
end
@@ -593,7 +593,7 @@ function definers.register(tfmdata,id) -- will be overloaded
local hash = tfmdata.hash
if not internalized[hash] then
if trace_defining then
- report_define("registering font, id: %s, hash: %s",id or "?",hash or "?")
+ report_defining("registering font, id: %s, hash: %s",id or "?",hash or "?")
end
fonts.identifiers[id] = tfmdata
internalized[hash] = id
@@ -661,9 +661,9 @@ function definers.read(specification,size,id) -- id can be optional, name can al
end
lastdefined = tfmdata or id -- todo ! ! ! ! !
if not tfmdata then -- or id?
- report_define( "unknown font %s, loading aborted",specification.name)
+ report_defining( "unknown font %s, loading aborted",specification.name)
elseif trace_defining and type(tfmdata) == "table" then
- report_define("using %s font with id %s, name:%s size:%s bytes:%s encoding:%s fullname:%s filename:%s",
+ report_defining("using %s font with id %s, name:%s size:%s bytes:%s encoding:%s fullname:%s filename:%s",
tfmdata.type or "unknown",
id or "?",
tfmdata.name or "?",
@@ -683,18 +683,18 @@ function vf.find(name)
local format = fonts.logger.format(name)
if format == 'tfm' or format == 'ofm' then
if trace_defining then
- report_define("locating vf for %s",name)
+ report_defining("locating vf for %s",name)
end
return findbinfile(name,"ovf")
else
if trace_defining then
- report_define("vf for %s is already taken care of",name)
+ report_defining("vf for %s is already taken care of",name)
end
return nil -- ""
end
else
if trace_defining then
- report_define("locating vf for %s",name)
+ report_defining("locating vf for %s",name)
end
return findbinfile(name,"ovf")
end
diff --git a/tex/context/base/font-enh.lua b/tex/context/base/font-enh.lua
index 183ca848b..b745b8f6c 100644
--- a/tex/context/base/font-enh.lua
+++ b/tex/context/base/font-enh.lua
@@ -12,7 +12,7 @@ local next, match = next, string.match
local trace_defining = false trackers.register("fonts.defining", function(v) trace_defining = v end)
-local report_define = logs.new("define fonts")
+local report_defining = logs.new("fonts","defining")
-- tfmdata has also fast access to indices and unicodes
-- to be checked: otf -> tfm -> tfmscaled
@@ -90,7 +90,7 @@ function tfm.setfeatures(tfmdata)
local fitfmf = fi.tfm[f] -- brr
if fitfmf then
if tfm.trace_features then
- report_define("initializing feature %s to %s for mode %s for font %s",f,tostring(value),mode or 'unknown',tfmdata.name or 'unknown')
+ report_defining("initializing feature %s to %s for mode %s for font %s",f,tostring(value),mode or 'unknown',tfmdata.name or 'unknown')
end
fitfmf(tfmdata,value)
mode = tfmdata.mode or features.mode or "base"
@@ -153,7 +153,7 @@ function tfm.reencode(tfmdata,encoding)
for k,v in next, data.unicodes do
if k ~= v then
if trace_defining then
- report_define("reencoding U+%04X to U+%04X",k,v)
+ report_defining("reencoding U+%04X to U+%04X",k,v)
end
characters[k] = original[v]
end
@@ -180,7 +180,7 @@ function tfm.remap(tfmdata,remapping)
for k,v in next, vector do
if k ~= v then
if trace_defining then
- report_define("remapping U+%04X to U+%04X",k,v)
+ report_defining("remapping U+%04X to U+%04X",k,v)
end
local c = original[k]
characters[v] = c
@@ -217,7 +217,7 @@ initializers.node.tfm.remap = tfm.remap
--~ for k,v in next, data.unicodes do
--~ if k ~= v then
--~ if trace_defining then
---~ report_define("mapping %s onto %s",k,v)
+--~ report_defining("mapping %s onto %s",k,v)
--~ end
--~ characters[k] = original[v]
--~ end
diff --git a/tex/context/base/font-ext.lua b/tex/context/base/font-ext.lua
index 16665d373..ff9a70108 100644
--- a/tex/context/base/font-ext.lua
+++ b/tex/context/base/font-ext.lua
@@ -17,7 +17,8 @@ local allocate = utilities.storage.allocate
local trace_protrusion = false trackers.register("fonts.protrusion", function(v) trace_protrusion = v end)
local trace_expansion = false trackers.register("fonts.expansion", function(v) trace_expansion = v end)
-local report_fonts = logs.new("fonts")
+local report_expansions = logs.new("fonts","expansions")
+local report_protrusions = logs.new("fonts","protrusions")
commands = commands or { }
@@ -171,7 +172,7 @@ function initializers.common.expansion(tfmdata,value)
if vector then
local stretch, shrink, step, factor = class.stretch or 0, class.shrink or 0, class.step or 0, class.factor or 1
if trace_expansion then
- report_fonts("set expansion class %s, vector: %s, factor: %s, stretch: %s, shrink: %s, step: %s",
+ report_expansions("setting class %s, vector: %s, factor: %s, stretch: %s, shrink: %s, step: %s",
value,class.vector,factor,stretch,shrink,step)
end
tfmdata.stretch, tfmdata.shrink, tfmdata.step, tfmdata.auto_expand = stretch * 10, shrink * 10, step * 10, true
@@ -198,10 +199,10 @@ function initializers.common.expansion(tfmdata,value)
end
end
elseif trace_expansion then
- report_fonts("unknown expansion vector '%s' in class '%s",class.vector,value)
+ report_expansions("unknown vector '%s' in class '%s",class.vector,value)
end
elseif trace_expansion then
- report_fonts("unknown expansion class '%s'",value)
+ report_expansions("unknown class '%s'",value)
end
end
end
@@ -216,7 +217,7 @@ initializers.node.afm.expansion = initializers.common.expansion
fonts.goodies.register("expansions", function(...) return fonts.goodies.report("expansions", trace_expansion, ...) end)
-local report_opbd = logs.new("otf opbd")
+local report_opbd = logs.new("fonts","otf opbd")
-- -- -- -- -- --
-- protrusion
@@ -390,7 +391,7 @@ local function map_opbd_onto_protrusion(tfmdata,value,opbd)
local data = singles[lookup]
if data then
if trace_protrusion then
- report_fonts("set left protrusion using lfbd lookup '%s'",lookup)
+ report_protrusions("setting left using lfbd lookup '%s'",lookup)
end
for k, v in next, data do
-- local p = - v[3] / descriptions[k].width-- or 1 ~= 0 too but the same
@@ -413,7 +414,7 @@ local function map_opbd_onto_protrusion(tfmdata,value,opbd)
local data = singles[lookup]
if data then
if trace_protrusion then
- report_fonts("set right protrusion using rtbd lookup '%s'",lookup)
+ report_protrusions("setting right using rtbd lookup '%s'",lookup)
end
for k, v in next, data do
-- local p = v[3] / descriptions[k].width -- or 3
@@ -450,7 +451,7 @@ function initializers.common.protrusion(tfmdata,value)
local left = class.left or 1
local right = class.right or 1
if trace_protrusion then
- report_fonts("set protrusion class %s, vector: %s, factor: %s, left: %s, right: %s",
+ report_protrusions("setting class %s, vector: %s, factor: %s, left: %s, right: %s",
value,class.vector,factor,left,right)
end
local data = characters.data
@@ -486,10 +487,10 @@ function initializers.common.protrusion(tfmdata,value)
end
end
elseif trace_protrusion then
- report_fonts("unknown protrusion vector '%s' in class '%s",class.vector,value)
+ report_protrusions("unknown vector '%s' in class '%s",class.vector,value)
end
elseif trace_protrusion then
- report_fonts("unknown protrusion class '%s'",value)
+ report_protrusions("unknown class '%s'",value)
end
end
end
diff --git a/tex/context/base/font-fbk.lua b/tex/context/base/font-fbk.lua
index 0ddee6680..6092f7442 100644
--- a/tex/context/base/font-fbk.lua
+++ b/tex/context/base/font-fbk.lua
@@ -14,7 +14,7 @@ local trace_combining_all = false trackers.register("fonts.combining.all", func
trackers.register("fonts.composing", "fonts.combining")
-local report_combining = logs.new("combining")
+local report_combining = logs.new("fonts","combining")
local allocate = utilities.storage.allocate
diff --git a/tex/context/base/font-gds.lua b/tex/context/base/font-gds.lua
index e85662af6..29142e45e 100644
--- a/tex/context/base/font-gds.lua
+++ b/tex/context/base/font-gds.lua
@@ -11,7 +11,7 @@ local gmatch = string.gmatch
local trace_goodies = false trackers.register("fonts.goodies", function(v) trace_goodies = v end)
-local report_fonts = logs.new("fonts")
+local report_fonts = logs.new("fonts","goodies")
local allocate = utilities.storage.allocate
diff --git a/tex/context/base/font-ini.lua b/tex/context/base/font-ini.lua
index eb741f0f7..216e6c23a 100644
--- a/tex/context/base/font-ini.lua
+++ b/tex/context/base/font-ini.lua
@@ -16,7 +16,7 @@ local write_nl = texio.write_nl
local lower = string.lower
local allocate, mark = utilities.storage.allocate, utilities.storage.mark
-local report_define = logs.new("define fonts")
+local report_defining = logs.new("fonts","defining")
fontloader.totable = fontloader.to_table
@@ -105,7 +105,7 @@ function fonts.fontformat(filename,default)
if format then
return format
else
- report_define("unable to determine font format for '%s'",filename)
+ report_defining("unable to determine font format for '%s'",filename)
return default
end
end
diff --git a/tex/context/base/font-log.lua b/tex/context/base/font-log.lua
index e16a945f9..d7fc16f58 100644
--- a/tex/context/base/font-log.lua
+++ b/tex/context/base/font-log.lua
@@ -10,7 +10,7 @@ local next, format, lower, concat = next, string.format, string.lower, table.con
local trace_defining = false trackers.register("fonts.defining", function(v) trace_defining = v end)
-local report_define = logs.new("define fonts")
+local report_defining = logs.new("fonts","defining")
local fonts = fonts
fonts.logger = fonts.logger or { }
@@ -27,7 +27,7 @@ function logger.save(tfmtable,source,specification) -- save file name in spec he
if tfmtable and specification and specification.specification then
local name = lower(specification.name)
if trace_defining and not fonts.used[name] then
- report_define("registering %s as %s (used: %s)",file.basename(specification.name),source,file.basename(specification.filename))
+ report_defining("registering %s as %s (used: %s)",file.basename(specification.name),source,file.basename(specification.filename))
end
specification.source = source
fonts.loaded[lower(specification.specification)] = specification
diff --git a/tex/context/base/font-map.lua b/tex/context/base/font-map.lua
index b20663273..48ba29a78 100644
--- a/tex/context/base/font-map.lua
+++ b/tex/context/base/font-map.lua
@@ -14,7 +14,7 @@ local utfbyte = utf.byte
local trace_loading = false trackers.register("otf.loading", function(v) trace_loading = v end)
local trace_unimapping = false trackers.register("otf.unimapping", function(v) trace_unimapping = v end)
-local report_otf = logs.new("load otf")
+local report_otf = logs.new("fonts","otf loading")
--[[ldx--
<p>Eventually this code will disappear because map files are kind
diff --git a/tex/context/base/font-otb.lua b/tex/context/base/font-otb.lua
index 241845f24..23326607f 100644
--- a/tex/context/base/font-otb.lua
+++ b/tex/context/base/font-otb.lua
@@ -23,7 +23,7 @@ local trace_ligatures = false trackers.register("otf.ligatures", function
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.new("otf prepare")
+local report_prepare = logs.new("fonts","otf prepare")
local wildcard = "*"
local default = "dflt"
diff --git a/tex/context/base/font-otc.lua b/tex/context/base/font-otc.lua
index f9d749123..17e442978 100644
--- a/tex/context/base/font-otc.lua
+++ b/tex/context/base/font-otc.lua
@@ -16,7 +16,7 @@ local trace_loading = false trackers.register("otf.loading", function(v) trace_
local fonts = fonts
local otf = fonts.otf
-local report_otf = logs.new("load otf")
+local report_otf = logs.new("fonts","otf loading")
-- instead of "script = "DFLT", langs = { 'dflt' }" we now use wildcards (we used to
-- have always); some day we can write a "force always when true" trick for other
diff --git a/tex/context/base/font-otd.lua b/tex/context/base/font-otd.lua
index 4d078017a..299b703c6 100644
--- a/tex/context/base/font-otd.lua
+++ b/tex/context/base/font-otd.lua
@@ -8,7 +8,7 @@ if not modules then modules = { } end modules ['font-otd'] = {
local trace_dynamics = false trackers.register("otf.dynamics", function(v) trace_dynamics = v end)
-local report_otf = logs.new("load otf")
+local report_otf = logs.new("fonts","otf loading")
local fonts = fonts
local otf = fonts.otf
diff --git a/tex/context/base/font-otf.lua b/tex/context/base/font-otf.lua
index ee7964b60..a543e0b0e 100644
--- a/tex/context/base/font-otf.lua
+++ b/tex/context/base/font-otf.lua
@@ -32,7 +32,7 @@ local trace_sequences = false trackers.register("otf.sequences", function(v)
local trace_math = false trackers.register("otf.math", function(v) trace_math = v end)
local trace_defining = false trackers.register("fonts.defining", function(v) trace_defining = v end)
-local report_otf = logs.new("load otf")
+local report_otf = logs.new("fonts","otf loading")
local starttiming, stoptiming, elapsedtime = statistics.starttiming, statistics.stoptiming, statistics.elapsedtime
@@ -52,6 +52,7 @@ otf.features.default = otf.features.default or { }
otf.enhancers = allocate()
local enhancers = otf.enhancers
enhancers.patches = { }
+local patches = enhancers.patches
local definers = fonts.definers
@@ -264,11 +265,11 @@ local ordered_enhancers = {
local actions = { }
-enhancers.patches.before = allocate()
-enhancers.patches.after = allocate()
+patches.before = allocate()
+patches.after = allocate()
-local before = enhancers.patches.before
-local after = enhancers.patches.after
+local before = patches.before
+local after = patches.after
local function enhance(name,data,filename,raw,verbose)
local enhancer = actions[name]
@@ -312,9 +313,9 @@ function enhancers.apply(data,filename,raw,verbose)
ioflush() -- we want instant messages
end
--- enhancers.patches.register("before","migrate metadata","cambria",function() end)
+-- patches.register("before","migrate metadata","cambria",function() end)
-function enhancers.patches.register(what,where,pattern,action)
+function patches.register(what,where,pattern,action)
local ww = what[where]
if ww then
ww[pattern] = action
@@ -323,6 +324,12 @@ function enhancers.patches.register(what,where,pattern,action)
end
end
+function patches.report(fmt,...)
+ if trace_loading then
+ report_otf("patching: " ..fmt,...)
+ end
+end
+
function enhancers.register(what,action) -- only already registered can be overloaded
actions[what] = action
end
diff --git a/tex/context/base/font-otn.lua b/tex/context/base/font-otn.lua
index 29fed2944..c4abeba22 100644
--- a/tex/context/base/font-otn.lua
+++ b/tex/context/base/font-otn.lua
@@ -148,11 +148,11 @@ local trace_steps = false trackers.register("otf.steps", function
local trace_skips = false trackers.register("otf.skips", function(v) trace_skips = v end)
local trace_directions = false trackers.register("otf.directions", function(v) trace_directions = v end)
-local report_direct = logs.new("otf direct")
-local report_subchain = logs.new("otf subchain")
-local report_chain = logs.new("otf chain")
-local report_process = logs.new("otf process")
-local report_prepare = logs.new("otf prepare")
+local report_direct = logs.new("fonts","otf direct")
+local report_subchain = logs.new("fonts","otf subchain")
+local report_chain = logs.new("fonts","otf chain")
+local report_process = logs.new("fonts","otf process")
+local report_prepare = logs.new("fonts","otf prepare")
trackers.register("otf.verbose_chain", function(v) otf.setcontextchain(v and "verbose") end)
trackers.register("otf.normal_chain", function(v) otf.setcontextchain(v and "normal") end)
diff --git a/tex/context/base/font-otp.lua b/tex/context/base/font-otp.lua
index 6c4f185b3..fe5ced658 100644
--- a/tex/context/base/font-otp.lua
+++ b/tex/context/base/font-otp.lua
@@ -13,7 +13,7 @@ local sort, concat = table.sort, table.concat
local trace_loading = false trackers.register("otf.loading", function(v) trace_loading = v end)
-local report_otf = logs.new("load otf")
+local report_otf = logs.new("fonts","otf loading")
fonts = fonts or { } -- this module is also used in mtxrun
local fonts = fonts
diff --git a/tex/context/base/font-pat.lua b/tex/context/base/font-pat.lua
index c43d283b1..8748f0ed1 100644
--- a/tex/context/base/font-pat.lua
+++ b/tex/context/base/font-pat.lua
@@ -6,26 +6,21 @@ if not modules then modules = { } end modules ['font-pat'] = {
license = "see context related readme files"
}
-local match, lower, find = string.match, string.lower, string.find
+local match, lower = string.match, string.lower
-local trace_loading = false trackers.register("otf.loading", function(v) trace_loading = v end)
-
-local report_otf = logs.new("load otf")
-
--- this will become a per font patch file
---
-- older versions of latin modern didn't have the designsize set
-- so for them we get it from the name
+-- reporter moved to elsewhere
-local register = enhancers.patches.register
+local patches = fonts.otf.enhancers.patches
+local register = patches.register
+local report = patches.report
local function patch(data,filename)
if data.design_size == 0 then
local ds = match(file.basename(lower(filename)),"(%d+)")
if ds then
- if trace_loading then
- report_otf("patching design size (%s)",ds)
- end
+ report("design size (%s)",ds)
data.design_size = tonumber(ds) * 10
end
end
@@ -35,34 +30,6 @@ register("after","migrate metadata","^lmroman", patch)
register("after","migrate metadata","^lmsans", patch)
register("after","migrate metadata","^lmtypewriter",patch)
-local function patch(data,filename)
- local uni_to_ind = data.map.map
- if not uni_to_ind[0x391] then
- -- beware, this is a hack, features for latin often don't apply to greek
- -- but lm has not much features anyway (and only greek for math)
- if trace_loading then
- report_otf("adding 13 greek capitals")
- end
- uni_to_ind[0x391] = uni_to_ind[0x41]
- uni_to_ind[0x392] = uni_to_ind[0x42]
- uni_to_ind[0x395] = uni_to_ind[0x45]
- uni_to_ind[0x397] = uni_to_ind[0x48]
- uni_to_ind[0x399] = uni_to_ind[0x49]
- uni_to_ind[0x39A] = uni_to_ind[0x4B]
- uni_to_ind[0x39C] = uni_to_ind[0x4D]
- uni_to_ind[0x39D] = uni_to_ind[0x4E]
- uni_to_ind[0x39F] = uni_to_ind[0x4F]
- uni_to_ind[0x3A1] = uni_to_ind[0x52]
- uni_to_ind[0x3A4] = uni_to_ind[0x54]
- uni_to_ind[0x3A7] = uni_to_ind[0x58]
- uni_to_ind[0x396] = uni_to_ind[0x5A]
- end
-end
-
-register("after","prepare glyphs","^lmroman", patch)
-register("after","prepare glyphs","^lmsans", patch)
-register("after","prepare glyphs","^lmtypewriter",patch)
-
-- for some reason (either it's a bug in the font, or it's
-- a problem in the library) the palatino arabic fonts don't
-- have the mkmk features properly set up
@@ -73,13 +40,18 @@ local function patch(data,filename)
for k=1,#gpos do
local v = gpos[k]
if not v.features and v.type == "gpos_mark2mark" then
- if trace_loading then
- report_otf("patching mkmk feature (name: %s)", v.name or "?")
- end
+ report("mkmk feature (name: %s)", v.name or "?")
v.features = {
{
- scripts = { arab = { "ARA " = true, "FAR " = true, "URD " = true, "dflt" = true } },
- tag = "mkmk"
+ scripts = {
+ arab = {
+ ["ARA "] = true,
+ ["FAR "] = true,
+ ["URD "] = true,
+ ["dflt"] = true,
+ }
+ },
+ tag = "mkmk",
}
}
end
@@ -89,19 +61,47 @@ end
register("after","rehash features","palatino.*arabic",patch)
-local function patch_domh(data,filename,threshold)
- local m = data.metadata.math
- if m then
- local d = m.DisplayOperatorMinHeight or 0
- if d < threshold then
- if trace_loading then
- report_otf("patching DisplayOperatorMinHeight(%s -> %s)",d,threshold)
- end
- m.DisplayOperatorMinHeight = threshold
- end
- end
-end
-
-register("after","check math parameters","cambria", function(data,filename) patch_domh(data,filename,2800) end)
-register("after","check math parameters","cambmath",function(data,filename) patch_domh(data,filename,2800) end)
-register("after","check math parameters","asana", function(data,filename) patch_domh(data,filename,1350) end)
+-- -- this code is now in lm-math.lfg
+--
+-- local function patch(data,filename)
+-- local uni_to_ind = data.map.map
+-- if not uni_to_ind[0x391] then
+-- -- beware, this is a hack, features for latin often don't apply to greek
+-- -- but lm has not much features anyway (and only greek for math)
+-- report("adding 13 greek capitals")
+-- uni_to_ind[0x391] = uni_to_ind[0x41]
+-- uni_to_ind[0x392] = uni_to_ind[0x42]
+-- uni_to_ind[0x395] = uni_to_ind[0x45]
+-- uni_to_ind[0x397] = uni_to_ind[0x48]
+-- uni_to_ind[0x399] = uni_to_ind[0x49]
+-- uni_to_ind[0x39A] = uni_to_ind[0x4B]
+-- uni_to_ind[0x39C] = uni_to_ind[0x4D]
+-- uni_to_ind[0x39D] = uni_to_ind[0x4E]
+-- uni_to_ind[0x39F] = uni_to_ind[0x4F]
+-- uni_to_ind[0x3A1] = uni_to_ind[0x52]
+-- uni_to_ind[0x3A4] = uni_to_ind[0x54]
+-- uni_to_ind[0x3A7] = uni_to_ind[0x58]
+-- uni_to_ind[0x396] = uni_to_ind[0x5A]
+-- end
+-- end
+--
+-- register("after","prepare glyphs","^lmroman", patch)
+-- register("after","prepare glyphs","^lmsans", patch)
+-- register("after","prepare glyphs","^lmtypewriter",patch)
+--
+-- -- this code is now in cambria-math.lfg and asana-math.lfg
+--
+-- local function patch_domh(data,filename,threshold)
+-- local m = data.metadata.math
+-- if m then
+-- local d = m.DisplayOperatorMinHeight or 0
+-- if d < threshold then
+-- report("DisplayOperatorMinHeight(%s -> %s)",d,threshold)
+-- m.DisplayOperatorMinHeight = threshold
+-- end
+-- end
+-- end
+--
+-- register("after","check math parameters","cambria", function(data,filename) patch_domh(data,filename,2800) end)
+-- register("after","check math parameters","cambmath",function(data,filename) patch_domh(data,filename,2800) end)
+-- register("after","check math parameters","asana", function(data,filename) patch_domh(data,filename,1350) end)
diff --git a/tex/context/base/font-syn.lua b/tex/context/base/font-syn.lua
index 5eb7551cd..5efdab3b4 100644
--- a/tex/context/base/font-syn.lua
+++ b/tex/context/base/font-syn.lua
@@ -24,7 +24,7 @@ local trace_names = false trackers.register("fonts.names", fu
local trace_warnings = false trackers.register("fonts.warnings", function(v) trace_warnings = v end)
local trace_specifications = false trackers.register("fonts.specifications", function(v) trace_specifications = v end)
-local report_names = logs.new("fontnames")
+local report_names = logs.new("fonts","names")
--[[ldx--
<p>This module implements a name to filename resolver. Names are resolved
@@ -642,7 +642,6 @@ local function analyzefiles()
-- already done (avoid otf afm clash)
if trace_names then
report_names("%s font %s already done",suffix,completename)
- logs.push()
end
nofduplicates = nofduplicates + 1
nofskipped = nofskipped + 1
@@ -650,14 +649,12 @@ local function analyzefiles()
-- weird error
if trace_names then
report_names("%s font %s does not really exist",suffix,completename)
- logs.push()
end
nofskipped = nofskipped + 1
elseif not file.is_qualified_path(completename) and resolvers.findfile(completename,suffix) == "" then
-- not locateble by backend anyway
if trace_names then
report_names("%s font %s cannot be found by backend",suffix,completename)
- logs.push()
end
nofskipped = nofskipped + 1
else
@@ -666,7 +663,6 @@ local function analyzefiles()
if find(basepath,skip_paths[i]) then
if trace_names then
report_names("rejecting path of %s font %s",suffix,completename)
- logs.push()
end
nofskipped = nofskipped + 1
return
@@ -679,7 +675,6 @@ local function analyzefiles()
done[name] = true
if trace_names then
report_names("rejecting name of %s font %s",suffix,completename)
- logs.push()
end
nofskipped = nofskipped + 1
return
@@ -688,12 +683,8 @@ local function analyzefiles()
end
if trace_names then
report_names("identifying %s font %s",suffix,completename)
- logs.push()
end
local result, message = filters[lower(suffix)](completename)
- if trace_names then
- logs.pop()
- end
if result then
if result[1] then
for r=1,#result do
diff --git a/tex/context/base/font-tfm.lua b/tex/context/base/font-tfm.lua
index baa6ffb69..3be220e80 100644
--- a/tex/context/base/font-tfm.lua
+++ b/tex/context/base/font-tfm.lua
@@ -16,7 +16,7 @@ local allocate = utilities.storage.allocate
local trace_defining = false trackers.register("fonts.defining", function(v) trace_defining = v end)
local trace_scaling = false trackers.register("fonts.scaling" , function(v) trace_scaling = v end)
-local report_define = logs.new("define fonts")
+local report_defining = logs.new("fonts","defining")
-- tfmdata has also fast access to indices and unicodes
-- to be checked: otf -> tfm -> tfmscaled
@@ -62,7 +62,7 @@ function tfm.read_from_tfm(specification)
local fname, tfmdata = specification.filename or "", nil
if fname ~= "" then
if trace_defining then
- report_define("loading tfm file %s at size %s",fname,specification.size)
+ report_defining("loading tfm file %s at size %s",fname,specification.size)
end
tfmdata = font.read_tfm(fname,specification.size) -- not cached, fast enough
if tfmdata then
@@ -85,7 +85,7 @@ function tfm.read_from_tfm(specification)
tfm.enhance(tfmdata,specification)
end
elseif trace_defining then
- report_define("loading tfm with name %s fails",specification.name)
+ report_defining("loading tfm with name %s fails",specification.name)
end
return tfmdata
end
@@ -421,7 +421,7 @@ function tfm.scale(tfmtable, scaledpoints, relativeid)
end
end
-- if trace_scaling then
- -- report_define("t=%s, u=%s, i=%s, n=%s c=%s",k,chr.tounicode or "",index or 0,description.name or '-',description.class or '-')
+ -- report_defining("t=%s, u=%s, i=%s, n=%s c=%s",k,chr.tounicode or "",index or 0,description.name or '-',description.class or '-')
-- end
if tounicode then
local tu = tounicode[index] -- nb: index!
@@ -458,7 +458,7 @@ function tfm.scale(tfmtable, scaledpoints, relativeid)
if vn then
chr.next = vn
--~ if v.vert_variants or v.horiz_variants then
- --~ report_define("glyph 0x%05X has combination of next, vert_variants and horiz_variants",index)
+ --~ report_defining("glyph 0x%05X has combination of next, vert_variants and horiz_variants",index)
--~ end
else
local vv = v.vert_variants
@@ -630,11 +630,11 @@ function tfm.scale(tfmtable, scaledpoints, relativeid)
-- can have multiple subfonts
if hasmath then
if trace_defining then
- report_define("math enabled for: name '%s', fullname: '%s', filename: '%s'",t.name or "noname",t.fullname or "nofullname",t.filename or "nofilename")
+ report_defining("math enabled for: name '%s', fullname: '%s', filename: '%s'",t.name or "noname",t.fullname or "nofullname",t.filename or "nofilename")
end
else
if trace_defining then
- report_define("math disabled for: name '%s', fullname: '%s', filename: '%s'",t.name or "noname",t.fullname or "nofullname",t.filename or "nofilename")
+ report_defining("math disabled for: name '%s', fullname: '%s', filename: '%s'",t.name or "noname",t.fullname or "nofullname",t.filename or "nofilename")
end
t.nomath, t.MathConstants = true, nil
end
@@ -643,8 +643,8 @@ function tfm.scale(tfmtable, scaledpoints, relativeid)
t.psname = t.fontname or (t.fullname and fonts.names.cleanname(t.fullname))
end
if trace_defining then
- report_define("used for accessing (sub)font: '%s'",t.psname or "nopsname")
- report_define("used for subsetting: '%s'",t.fontname or "nofontname")
+ report_defining("used for accessing (sub)font: '%s'",t.psname or "nopsname")
+ report_defining("used for subsetting: '%s'",t.fontname or "nofontname")
end
-- this will move up (side effect of merging split call)
t.factor = delta
@@ -747,18 +747,18 @@ function tfm.checkedfilename(metadata,whatever)
askedfilename = resolvers.resolve(askedfilename) -- no shortcut
foundfilename = resolvers.findbinfile(askedfilename,"") or ""
if foundfilename == "" then
- report_define("source file '%s' is not found",askedfilename)
+ report_defining("source file '%s' is not found",askedfilename)
foundfilename = resolvers.findbinfile(file.basename(askedfilename),"") or ""
if foundfilename ~= "" then
- report_define("using source file '%s' (cache mismatch)",foundfilename)
+ report_defining("using source file '%s' (cache mismatch)",foundfilename)
end
end
elseif whatever then
- report_define("no source file for '%s'",whatever)
+ report_defining("no source file for '%s'",whatever)
foundfilename = ""
end
metadata.foundfilename = foundfilename
- -- report_define("using source file '%s'",foundfilename)
+ -- report_defining("using source file '%s'",foundfilename)
end
return foundfilename
end
diff --git a/tex/context/base/grph-fig.mkiv b/tex/context/base/grph-fig.mkiv
index 75f85103c..26b93435b 100644
--- a/tex/context/base/grph-fig.mkiv
+++ b/tex/context/base/grph-fig.mkiv
@@ -259,7 +259,7 @@
\let\currentresourcecomment\empty
\def\showexternalfigures % maybe run time command is better, but no core-run, unless figs-run ...
- {%\writestatus\m!systems{for \string\showexternalfigures\space see \truefilename{x-res-20}.tex}
+ {%\writestatus\m!system{for \string\showexternalfigures\space see \truefilename{x-res-20}.tex}
\usemodule[res-20]\showexternalfigures} % so for the moment we do it this way
\def\overlayfigure#1%
diff --git a/tex/context/base/grph-fil.lua b/tex/context/base/grph-fil.lua
index 4bd1e7d0f..95141d03e 100644
--- a/tex/context/base/grph-fil.lua
+++ b/tex/context/base/grph-fil.lua
@@ -8,7 +8,9 @@ if not modules then modules = { } end modules ['grph-fil'] = {
local format, concat = string.format, table.concat
-local trace_run = false trackers.register("files.run",function(v) trace_run = v end)
+local trace_run = false trackers.register("graphic.runfile",function(v) trace_run = v end)
+
+local report_run = logs.new("graphics","run")
local allocate, mark = utilities.storage.allocate, utilities.storage.mark
@@ -35,15 +37,15 @@ function jobfiles.run(name,command)
local newchecksum = file.checksum(name)
if jobfiles.forcerun or not oldchecksum or oldchecksum ~= newchecksum then
if trace_run then
- commands.writestatus("processing","changes in '%s', processing forced",name)
+ report_run("processing file, changes in '%s', processing forced",name)
end
if command and command ~= "" then
os.execute(command)
else
- commands.writestatus("processing","no command given for processing '%s'",name)
+ report_run("processing file, no command given for processing '%s'",name)
end
elseif trace_run then
- commands.writestatus("processing","no changes in '%s', not processed",name)
+ report_run("processing file, no changes in '%s', not processed",name)
end
tobesaved[name] = newchecksum
end
diff --git a/tex/context/base/grph-inc.lua b/tex/context/base/grph-inc.lua
index 14a5bfa60..9546218ef 100644
--- a/tex/context/base/grph-inc.lua
+++ b/tex/context/base/grph-inc.lua
@@ -37,8 +37,6 @@ The TeX-Lua mix is suboptimal. This has to do with the fact that we cannot
run TeX code from within Lua. Some more functionality will move to Lua.
]]--
--- commands.writestatus -> report
-
local format, lower, find, match, gsub, gmatch = string.format, string.lower, string.find, string.match, string.gsub, string.gmatch
local texbox = tex.box
local contains = table.contains
@@ -51,13 +49,13 @@ local variables = interfaces.variables
local codeinjections = backends.codeinjections
local nodeinjections = backends.nodeinjections
-local trace_figures = false trackers.register("figures.locating", function(v) trace_figures = v end)
-local trace_bases = false trackers.register("figures.bases", function(v) trace_bases = v end)
-local trace_programs = false trackers.register("figures.programs", function(v) trace_programs = v end)
-local trace_conversion = false trackers.register("figures.conversion", function(v) trace_conversion = v end)
-local trace_inclusion = false trackers.register("figures.inclusion", function(v) trace_inclusion = v end)
+local trace_figures = false trackers.register("graphics.locating", function(v) trace_figures = v end)
+local trace_bases = false trackers.register("graphics.bases", function(v) trace_bases = v end)
+local trace_programs = false trackers.register("graphics.programs", function(v) trace_programs = v end)
+local trace_conversion = false trackers.register("graphics.conversion", function(v) trace_conversion = v end)
+local trace_inclusion = false trackers.register("graphics.inclusion", function(v) trace_inclusion = v end)
-local report_graphics = logs.new("graphics")
+local report_inclusion = logs.new("graphics","inclusion")
local context, img = context, img
@@ -239,8 +237,8 @@ function figures.setpaths(locationset,pathlist)
end
figures.paths, last_pathlist = t, pathlist
if trace_figures then
- commands.writestatus("figures","locations: %s",last_locationset)
- commands.writestatus("figures","path list: %s",concat(figures.paths, " "))
+ report_inclusion("locations: %s",last_locationset)
+ report_inclusion("path list: %s",concat(figures.paths, " "))
end
end
@@ -367,12 +365,12 @@ local function forbiddenname(filename)
local expandedfullname = file.collapsepath(filename,true)
local expandedinputname = file.collapsepath(file.addsuffix(environment.jobfilename,environment.jobfilesuffix),true)
if expandedfullname == expandedinputname then
- report_graphics("skipping graphic with same name as input filename (%s), enforce suffix",expandedinputname)
+ report_inclusion("skipping graphic with same name as input filename (%s), enforce suffix",expandedinputname)
return true
end
local expandedoutputname = file.collapsepath(codeinjections.getoutputfilename(),true)
if expandedfullname == expandedoutputname then
- report_graphics("skipping graphic with same name as output filename (%s), enforce suffix",expandedoutputname)
+ report_inclusion("skipping graphic with same name as output filename (%s), enforce suffix",expandedoutputname)
return true
end
end
@@ -397,7 +395,7 @@ local function register(askedname,specification)
newformat = defaultformat
end
if trace_conversion then
- report_graphics("checking conversion of '%s': old format '%s', new format '%s', conversion '%s', resolution '%s'",
+ report_inclusion("checking conversion of '%s': old format '%s', new format '%s', conversion '%s', resolution '%s'",
askedname,format,newformat,conversion or "default",resolution or "default")
end
local converter = (newformat ~= format) and converters[format]
@@ -414,7 +412,7 @@ local function register(askedname,specification)
end
end
elseif trace_conversion then
- report_graphics("no converter for '%s' -> '%s'",format,newformat)
+ report_inclusion("no converter for '%s' -> '%s'",format,newformat)
end
if converter then
-- local oldname = specification.fullname
@@ -430,7 +428,7 @@ local function register(askedname,specification)
end
if not file.is_writable(newpath) then
if trace_conversion then
- report_graphics("[ath '%s'is not writable, forcing conversion path '.' ",newpath)
+ report_inclusion("[ath '%s'is not writable, forcing conversion path '.' ",newpath)
end
newpath = "."
end
@@ -454,12 +452,12 @@ local function register(askedname,specification)
local newtime = lfs.attributes(newname,'modification') or 0
if newtime == 0 or oldtime > newtime then
if trace_conversion then
- report_graphics("converting '%s' from '%s' to '%s'",askedname,format,newformat)
+ report_inclusion("converting '%s' from '%s' to '%s'",askedname,format,newformat)
end
converter(oldname,newname,resolution or "")
else
if trace_conversion then
- report_graphics("no need to convert '%s' from '%s' to '%s'",askedname,format,newformat)
+ report_inclusion("no need to convert '%s' from '%s' to '%s'",askedname,format,newformat)
end
end
if io.exists(newname) then
@@ -479,15 +477,15 @@ local function register(askedname,specification)
if not found then
specification.found = false
if trace_figures then
- commands.writestatus("figures","format not supported: %s",format)
+ report_inclusion("format not supported: %s",format)
end
else
specification.found = true
if trace_figures then
if validtypes[format] then
- commands.writestatus("figures","format natively supported by backend: %s",format)
+ report_inclusion("format natively supported by backend: %s",format)
else
- commands.writestatus("figures","format supported by output file format: %s",format)
+ report_inclusion("format supported by output file format: %s",format)
end
end
end
@@ -532,7 +530,7 @@ local function locate(request) -- name, format, cache
local askedresolution = request.resolution
if askedformat ~= "" then
if trace_figures then
- commands.writestatus("figures","strategy: forced format")
+ report_inclusion("strategy: forced format")
end
askedformat = lower(askedformat)
local format = figures.suffixes[askedformat]
@@ -607,7 +605,7 @@ local function locate(request) -- name, format, cache
end
elseif askedpath then
if trace_figures then
- commands.writestatus("figures","strategy: rootbased path")
+ report_inclusion("strategy: rootbased path")
end
local figureorder = figures.order
for i=1,#figureorder do
@@ -631,7 +629,7 @@ local function locate(request) -- name, format, cache
else
if figures.preferquality then
if trace_figures then
- commands.writestatus("figures","strategy: unknown format, prefer quality")
+ report_inclusion("strategy: unknown format, prefer quality")
end
local figurepaths = figures.paths
local figureorder = figures.order
@@ -648,7 +646,7 @@ local function locate(request) -- name, format, cache
local isfile = url.hashed(check).scheme == "file"
if not isfile then
if trace_figures then
- commands.writestatus("figures","warning: skipping path %s",path)
+ report_inclusion("warning: skipping path %s",path)
end
elseif figures.exists(check,format,true) then
return register(askedname, {
@@ -665,7 +663,7 @@ local function locate(request) -- name, format, cache
end
else -- 'location'
if trace_figures then
- commands.writestatus("figures","strategy: unknown format, prefer path")
+ report_inclusion("strategy: unknown format, prefer path")
end
local figurepaths = figures.paths
local figureorder = figures.order
@@ -693,7 +691,7 @@ local function locate(request) -- name, format, cache
end
if figures.defaultsearch then
if trace_figures then
- commands.writestatus("figures","strategy: default tex path")
+ report_inclusion("strategy: default tex path")
end
local figureorder = figures.order
for j=1,#figureorder do
@@ -807,9 +805,9 @@ function existers.generic(askedname,resolve)
end
if trace_figures then
if result then
- commands.writestatus("figures","found: %s -> %s",askedname,result)
+ report_inclusion("found: %s -> %s",askedname,result)
else
- commands.writestatus("figures","not found: %s",askedname)
+ report_inclusion("not found: %s",askedname)
end
end
return result
@@ -835,11 +833,11 @@ function checkers.generic(data)
figure, data = f or figure, d or data
figures.loaded[hash] = figure
if trace_conversion then
- report_graphics("new graphic, hash: %s",hash)
+ report_inclusion("new graphic, hash: %s",hash)
end
else
if trace_conversion then
- report_graphics("existing graphic, hash: %s",hash)
+ report_inclusion("existing graphic, hash: %s",hash)
end
end
if figure then
@@ -920,7 +918,7 @@ function checkers.mov(data)
dr.width, dr.height = width, height
du.width, du.height, du.foundname = width, height, foundname
if trace_inclusion then
- report_graphics("including movie '%s': width %s, height %s",foundname,width,height)
+ report_inclusion("including movie '%s': width %s, height %s",foundname,width,height)
end
-- we need to push the node.write in between ... we could make a shared helper for this
context.startfoundexternalfigure(width .. "sp",height .. "sp")
@@ -1008,7 +1006,7 @@ end
local function runprogram(...)
local command = format(...)
if trace_conversion or trace_programs then
- report_graphics("running %s",command)
+ report_inclusion("running %s",command)
end
os.spawn(command)
end
@@ -1126,7 +1124,7 @@ function bases.use(basename)
xml.registerns("rlx","http://www.pragma-ade.com/schemas/rlx") -- we should be able to do this per xml file
end
if trace_bases then
- commands.writestatus("figures","registering base '%s'",basename)
+ report_inclusion("registering base '%s'",basename)
end
end
end
@@ -1134,7 +1132,7 @@ end
function bases.find(basename,askedlabel)
if trace_bases then
- commands.writestatus("figures","checking for '%s' in base '%s'",askedlabel,basename)
+ report_inclusion("checking for '%s' in base '%s'",askedlabel,basename)
end
basename = file.addsuffix(basename,"xml")
local t = bases.found[askedlabel]
@@ -1151,7 +1149,7 @@ function bases.find(basename,askedlabel)
base[2] = xmlfile
base[3] = xml.load(xmlfile)
if trace_bases then
- commands.writestatus("figures","base '%s' loaded",xmlfile)
+ report_inclusion("base '%s' loaded",xmlfile)
end
break
end
@@ -1170,13 +1168,13 @@ function bases.find(basename,askedlabel)
}
bases.found[askedlabel] = t
if trace_bases then
- commands.writestatus("figures","figure '%s' found in base '%s'",askedlabel,base[2])
+ report_inclusion("figure '%s' found in base '%s'",askedlabel,base[2])
end
return t
end
end
if trace_bases and not t then
- commands.writestatus("figures","figure '%s' not found in base '%s'",askedlabel,base[2])
+ report_inclusion("figure '%s' not found in base '%s'",askedlabel,base[2])
end
end
end
diff --git a/tex/context/base/grph-u3d.lua b/tex/context/base/grph-u3d.lua
index e20655e3f..25a5addef 100644
--- a/tex/context/base/grph-u3d.lua
+++ b/tex/context/base/grph-u3d.lua
@@ -10,7 +10,7 @@ if not modules then modules = { } end modules ['grph-u3d'] = {
local trace_inclusion = false trackers.register("figures.inclusion", function(v) trace_inclusion = v end)
-local report_graphics = logs.new("graphics")
+local report_u3d = logs.new("graphics","u3d")
local figures = figures
@@ -23,11 +23,11 @@ function figures.checkers.u3d(data)
local dr, du, ds = data.request, data.used, data.status
local width = todimen(dr.width or figures.defaultwidth)
local height = todimen(dr.height or figures.defaultheight)
- local foundname = du.report_graphics(
+ local foundname = du.report_u3ds(
dr.width, dr.height = width, height
du.width, du.height, du.foundname = width, height, foundname
if trace_inclusion then
- report_graphics("including u3d '%s': width %s, height %s",foundname,width,height)
+ report_u3d("including u3d '%s': width %s, height %s",foundname,width,height)
end
context.startfoundexternalfigure(width .. "sp",height .. "sp")
context(function()
diff --git a/tex/context/base/grph-wnd.lua b/tex/context/base/grph-wnd.lua
index 0047651bf..5e048ad46 100644
--- a/tex/context/base/grph-wnd.lua
+++ b/tex/context/base/grph-wnd.lua
@@ -14,13 +14,13 @@ local converters, suffixes = figures.converters, figures.suffixes
local trace_conversion = false trackers.register("figures.conversion", function(v) trace_conversion = v end)
-local report_graphics = logs.new("graphics")
+local report_wand = logs.new("graphics","wand")
local function togray(oldname,newname)
if lfs.isfile(oldname) then
require("gmwand")
if trace_conversion then
- report_graphics("converting '%s' to '%s' using gmwand",oldname,newname)
+ report_wand("converting '%s' to '%s' using gmwand",oldname,newname)
end
gmwand.InitializeMagick("./") -- What does this path do?
local wand = gmwand.NewMagickWand()
@@ -29,7 +29,7 @@ local function togray(oldname,newname)
gmwand.MagickWriteImages(wand,newname,1)
gmwand.DestroyMagickWand(wand)
else
- report_graphics("unable to convert '%s' to '%s' using gmwand",oldname,newname)
+ report_wand("unable to convert '%s' to '%s' using gmwand",oldname,newname)
end
end
@@ -39,7 +39,7 @@ for i=1,#formats do
local oldformat = formats[i]
local newformat = "gray." .. oldformat
if trace_conversion then
- report_graphics("installing converter: %s -> %s",oldformat,newformat)
+ report_wand("installing converter: %s -> %s",oldformat,newformat)
end
converters[oldformat] = converters[oldformat] or { }
converters[oldformat][newformat] = togray
diff --git a/tex/context/base/java-ini.lua b/tex/context/base/java-ini.lua
index efe00ffce..cbe8ab30a 100644
--- a/tex/context/base/java-ini.lua
+++ b/tex/context/base/java-ini.lua
@@ -17,7 +17,7 @@ local variables = interfaces.variables
local trace_javascript = false trackers.register("backends.javascript", function(v) trace_javascript = v end)
-local report_javascript = logs.new("javascript")
+local report_javascripts = logs.new("interactions","javascripts")
interactions.javascripts = interactions.javascripts or { }
local javascripts = interactions.javascripts
@@ -68,7 +68,7 @@ function javascripts.storepreamble(str) -- now later
preambles[n] = { name, used, script }
preambled[name] = n
if trace_javascript then
- report_javascript("storing preamble '%s', state '%s', order '%s'",name,used,n)
+ report_javascripts("storing preamble '%s', state '%s', order '%s'",name,used,n)
end
lpegmatch(parsefunctions,script,1,n)
end
@@ -80,7 +80,7 @@ function javascripts.setpreamble(name,script) -- now later
preambles[n] = { name, "now", script }
preambled[name] = n
if trace_javascript then
- report_javascript("setting preamble '%s', state 'now', order '%s'",name,n)
+ report_javascripts("setting preamble '%s', state 'now', order '%s'",name,n)
end
lpegmatch(parsefunctions,script,1,n)
end
@@ -92,14 +92,14 @@ function javascripts.addtopreamble(name,script) -- now later
if p then
preambles[p] = { "now", preambles[p] .. " ;\n" .. script }
if trace_javascript then
- report_javascript("extending preamble '%s', state 'now'",name)
+ report_javascripts("extending preamble '%s', state 'now'",name)
end
else
local n = #preambles + 1
preambles[n] = { name, "now", script }
preambled[name] = n
if trace_javascript then
- report_javascript("storing preamble '%s', state 'now', order '%s'",name,n)
+ report_javascripts("storing preamble '%s', state 'now', order '%s'",name,n)
end
lpegmatch(parsefunctions,script,1,n)
end
@@ -114,7 +114,7 @@ function javascripts.usepreamblenow(name) -- now later
if not preambled[somename] then
preambles[preambled[somename]][2] = "now"
if trace_javascript then
- report_javascript("using preamble '%s', state 'now'",somename)
+ report_javascripts("using preamble '%s', state 'now'",somename)
end
end
end
@@ -135,15 +135,15 @@ function javascripts.code(name,arguments)
preambles[p][2] = "now"
if trace_javascript and not reported[name] then
reported[name] = true
- report_javascript("using code '%s', preamble '%s'",name,u)
+ report_javascripts("using code '%s', preamble '%s'",name,u)
end
elseif trace_javascript and not reported[name] then
reported[name] = true
- report_javascript("using code '%s'",name)
+ report_javascripts("using code '%s'",name)
end
elseif trace_javascript and not reported[name] then
reported[name] = true
- report_javascript("using code '%s'",name)
+ report_javascripts("using code '%s'",name)
end
used = true
return code
@@ -153,7 +153,7 @@ function javascripts.code(name,arguments)
used = true
if trace_javascript and not reported[name] then
reported[name] = true
- report_javascript("using function '%s'",name)
+ report_javascripts("using function '%s'",name)
end
preambles[f][2] = "now" -- automatically tag preambles that define the function (as later)
if arguments then
@@ -175,7 +175,7 @@ function javascripts.flushpreambles()
local preamble = preambles[i]
if preamble[2] == "now" then
if trace_javascript then
- report_javascript("flushing preamble '%s'",preamble[1])
+ report_javascripts("flushing preamble '%s'",preamble[1])
end
t[#t+1] = { preamble[1], preamble[3] }
end
diff --git a/tex/context/base/l-lpeg.lua b/tex/context/base/l-lpeg.lua
index 868a6d52e..b20bc8853 100644
--- a/tex/context/base/l-lpeg.lua
+++ b/tex/context/base/l-lpeg.lua
@@ -423,11 +423,7 @@ local p = Cs((S("-.+*%()[]") / patterns_escapes + anything)^0)
local s = Cs((S("-.+*%()[]") / simple_escapes + anything)^0)
function string.escapedpattern(str,simple)
- if simple then
- return match(s,str)
- else
- return match(p,str)
- end
+ return match(simple and s or p,str)
end
-- utf extensies
diff --git a/tex/context/base/l-string.lua b/tex/context/base/l-string.lua
index 7e4f7a95c..989e57f75 100644
--- a/tex/context/base/l-string.lua
+++ b/tex/context/base/l-string.lua
@@ -93,11 +93,7 @@ local simple_escapes = {
}
function string.escapedpattern(str,simple)
- if simple then
- return (gsub(str,".",simple_escapes))
- else
- return (gsub(str,".",patterns_escapes))
- end
+ return (gsub(str,".",simple and simple_escapes or patterns_escapes))
end
function string.topattern(str,lowercase,strict)
diff --git a/tex/context/base/lang-def.mkiv b/tex/context/base/lang-def.mkiv
index 19c2c676d..871e4f528 100644
--- a/tex/context/base/lang-def.mkiv
+++ b/tex/context/base/lang-def.mkiv
@@ -134,6 +134,7 @@
rightquotation=\rightguillemot,
date={day,{.},\ ,month,\ ,year}]
+
\installlanguage [\s!no] [\s!nb]
\installlanguage [\s!norwegian] [\s!nb]
\installlanguage [\s!bokmal] [\s!nb]
@@ -510,6 +511,10 @@
% CJK
+\definesystemconstant {chinese} \definesystemconstant {cn}
+\definesystemconstant {japanese} \definesystemconstant {ja}
+\definesystemconstant {korean} \definesystemconstant {kr}
+
\installlanguage
[\s!cn]
[\c!leftsentence=——,
@@ -543,8 +548,8 @@
\c!leftquote=‘,
\c!rightquote=’,
\c!leftquotation=“,
- \c!rightquotation=”」,
- \c!date={서기,\v!year,年,\v!month,月,\v!day,日}]
+ \c!rightquotation=”,
+ \c!date={서기,\v!year,년,\v!month,월,\v!day,일}]
% Greek
diff --git a/tex/context/base/lang-ini.lua b/tex/context/base/lang-ini.lua
index 8744bff95..c3bed03a6 100644
--- a/tex/context/base/lang-ini.lua
+++ b/tex/context/base/lang-ini.lua
@@ -27,7 +27,7 @@ local settings_to_array = utilities.parsers.settings_to_array
local trace_patterns = false trackers.register("languages.patterns", function(v) trace_patterns = v end)
-local report_languages = logs.new("languages")
+local report_initialization = logs.new("languages","initialization")
local prehyphenchar, posthyphenchar = lang.prehyphenchar, lang.posthyphenchar -- global per language
local lefthyphenmin, righthyphenmin = lang.lefthyphenmin, lang.righthyphenmin
@@ -92,7 +92,7 @@ local function loaddefinitions(tag,specification)
if definition ~= "" then
if definition == "reset" then -- interfaces.variables.reset
if trace_patterns then
- report_languages("clearing patterns for language '%s'",tag)
+ report_initialization("clearing patterns for language '%s'",tag)
end
instance:clear_patterns()
elseif not dataused[definition] then
@@ -101,7 +101,7 @@ local function loaddefinitions(tag,specification)
local fullname = resolvers.findfile(filename) or ""
if fullname ~= "" then
if trace_patterns then
- report_languages("loading definition '%s' for language '%s' from '%s'",definition,tag,fullname)
+ report_initialization("loading definition '%s' for language '%s' from '%s'",definition,tag,fullname)
end
local defs = dofile(fullname) -- use regular loader instead
if defs then -- todo: version test
@@ -109,18 +109,18 @@ local function loaddefinitions(tag,specification)
instance:patterns (defs.patterns and defs.patterns.data or "")
instance:hyphenation(defs.exceptions and defs.exceptions.data or "")
else
- report_languages("invalid definition '%s' for language '%s' in '%s'",definition,tag,filename)
+ report_initialization("invalid definition '%s' for language '%s' in '%s'",definition,tag,filename)
end
elseif trace_patterns then
- report_languages("invalid definition '%s' for language '%s' in '%s'",definition,tag,filename)
+ report_initialization("invalid definition '%s' for language '%s' in '%s'",definition,tag,filename)
end
elseif trace_patterns then
- report_languages("definition '%s' for language '%s' already loaded",definition,tag)
+ report_initialization("definition '%s' for language '%s' already loaded",definition,tag)
end
end
end
elseif trace_patterns then
- report_languages("no definitions for language '%s'",tag)
+ report_initialization("no definitions for language '%s'",tag)
end
statistics.stoptiming(languages)
return ok
@@ -133,7 +133,7 @@ local noflanguages = storage.shared.noflanguages
function languages.define(tag,parent)
noflanguages = noflanguages + 1
if trace_patterns then
- report_languages("assigning number %s to %s",noflanguages,tag)
+ report_initialization("assigning number %s to %s",noflanguages,tag)
end
numbers[noflanguages] = tag
registered[tag] = {
@@ -213,14 +213,14 @@ else
if l then
if l.dirty then
if trace_patterns then
- report_languages("checking patterns for %s (%s)",tag,default)
+ report_initialization("checking patterns for %s (%s)",tag,default)
end
-- patterns is already resolved to parent patterns if applicable
if patterns ~= "" then
if l.patterns ~= patterns then
l.patterns = patterns
if trace_patterns then
- report_languages("loading patterns for '%s' using specification '%s'",tag,patterns)
+ report_initialization("loading patterns for '%s' using specification '%s'",tag,patterns)
end
loaddefinitions(tag,l)
else
@@ -229,13 +229,13 @@ else
elseif l.patterns == "" then
l.patterns = tag
if trace_patterns then
- report_languages("loading patterns for '%s' using tag",tag)
+ report_initialization("loading patterns for '%s' using tag",tag)
end
local ok = loaddefinitions(tag,l)
if not ok and tag ~= default then
l.patterns = defaukt
if trace_patterns then
- report_languages("loading patterns for '%s' using default",tag)
+ report_initialization("loading patterns for '%s' using default",tag)
end
loaddefinitions(tag,l)
end
@@ -366,12 +366,12 @@ end)
--~ local ok = fullname ~= ""
--~ if ok then
--~ if trace_patterns then
---~ report_languages("filtering %s for language '%s' from '%s'",target,tag,fullname)
+--~ report_initialization("filtering %s for language '%s' from '%s'",target,tag,fullname)
--~ end
--~ lang[target](data,filter(fullname) or "")
--~ else
--~ if trace_patterns then
---~ report_languages("no %s for language '%s' in '%s'",target,tag,filename or "?")
+--~ report_initialization("no %s for language '%s' in '%s'",target,tag,filename or "?")
--~ end
--~ lang[target](instance,"")
--~ end
diff --git a/tex/context/base/lang-ini.mkiv b/tex/context/base/lang-ini.mkiv
index 88b26ddb0..fe8aee917 100644
--- a/tex/context/base/lang-ini.mkiv
+++ b/tex/context/base/lang-ini.mkiv
@@ -387,7 +387,7 @@
\docomplexlanguage
\fi
\else
- \showmessage\m!linguals6{#1}%
+ \showmessage\m!languages6{#1}%
\fi
\fi}
@@ -545,7 +545,7 @@
\def\initializemainlanguage
{\mainlanguage[\currentlanguage]%
- \showmessage\m!linguals9\currentlanguage}
+ \showmessage\m!languages9\currentlanguage}
%D New:
diff --git a/tex/context/base/lang-lab.lua b/tex/context/base/lang-lab.lua
index 0f4fa0a30..41cd40df7 100644
--- a/tex/context/base/lang-lab.lua
+++ b/tex/context/base/lang-lab.lua
@@ -69,7 +69,7 @@ languages.data = languages.data or { }
local trace_labels = false trackers.register("languages.labels", function(v) trace_labels = v end)
-local report_labels = logs.new("language labels")
+local report_labels = logs.new("languages","labels")
function languages.labels.define()
local variables = interfaces.variables
@@ -119,7 +119,7 @@ end
--~ for tag, specification in next, list do
--~ for language, text in next, specification.labels do
--~ if type(text) == "string" and find(text,",") then
---~ logs.simple("label with comma: category '%s', language '%s', tag '%s', text '%s'",
+--~ report_labels("label with comma: category '%s', language '%s', tag '%s', text '%s'",
--~ category, language, tag, text)
--~ end
--~ end
diff --git a/tex/context/base/lang-mis.mkiv b/tex/context/base/lang-mis.mkiv
index 80b36c810..231697c7e 100644
--- a/tex/context/base/lang-mis.mkiv
+++ b/tex/context/base/lang-mis.mkiv
@@ -221,7 +221,7 @@
\def\handlemathmodediscretionary#1{\executeifdefined{\@tmd@math@\detokenize{#1}}\donothing}
\def\handletextmodediscretionary#1{\executeifdefined{\@tmd@text@\detokenize{#1}}\donothing}
-\def\installdiscretionaries#1#2{\writestatus\m!systems{use \string \installdiscretionary}} % obsolete
+\def\installdiscretionaries#1#2{\writestatus\m!system{use \string \installdiscretionary}} % obsolete
\setnewconstant\discretionarymode\plusone
diff --git a/tex/context/base/lang-txt.lua b/tex/context/base/lang-txt.lua
index 7becc63fc..8b245ff12 100644
--- a/tex/context/base/lang-txt.lua
+++ b/tex/context/base/lang-txt.lua
@@ -9,8 +9,45 @@ if not modules then modules = { } end modules ['lang-txt'] = {
-- The content of this file is derived from the mkii lang-* files and
-- early 2011 the mkii labels are generated from this file. The
-- translations have been collected over years by users, using named
--- glyphs. This file uses utf exclusively. For those involved in the
--- translations see the 'lang-*.mkii' files.
+-- glyphs. This file uses utf exclusively.
+--
+-- Many of the initial translations were done by Tobias Burnus but
+-- completed by numerous users. The following list is incomplete so feel
+-- free to send me corrections.
+--
+-- af Afrikaans ...
+-- ar Arabic Idris Samawi Hamid, Khaled Hosny
+-- ca Catalan ...
+-- cn Chinese Wang Lei, ...
+-- cs Czech Tom Hudec, Petr Sojka, Richard Gabriel
+-- da Danish Arne Jorgensen
+-- de German Tobias Burnus, ...
+-- en English Hans Hagen, ...
+-- es Spanish ...
+-- fi Finish ...
+-- fr French Daniel Flipo, Arthur Reutenauer
+-- gr Greek Apostolos Syropoulos, Thomas Schmitz
+-- hr Croatian Željko Vrba, Richard Gabriel
+-- hu Hungarian ...
+-- it Italian Giuseppe Bilotta, Luigi Scarso
+-- ja Japanese Richard Gabriel
+-- kr Korean Jeong Dalyoung
+-- la Latin ...
+-- lt Lithuanian Marius Aleknevičius
+-- nb Norwegian Hans Fredrik Nordhaug, ...
+-- nn Norwegian Hans Fredrik Nordhaug, ...
+-- nl Dutch Hans Hagen
+-- pl Polish Grzegorz Sapijaszko
+-- pt Portuguese Pedro F. M. Mendonça
+-- ro Romanian Dan Seracu, ...
+-- ru Russian Olga Briginets, Alexander Bokovoy, Victor Figurnov, ...
+-- sk Slovak ...
+-- sl Slovenian Mojca Miklavec
+-- sv Swedish ...
+-- tk Turkish Tobias Burnus
+-- tr Turkmen Nazar Annagurban
+-- ua Ukrainian Olga Briginets, Alexander Bokovoy, Victor Figurnov, ...
+-- vi Vietnamese Han The Thanh
-- For the moment we keep this table in memory. In the future we can then
-- enable labels.
@@ -513,7 +550,7 @@ data.labels={
hu=",. fejezet:",
it="",
ja={"第","章"},
- kr="장",
+ kr={"제", "장"},
la="",
lt="",
nb="",
@@ -801,7 +838,6 @@ data.labels={
hu=",. kép:",
it="Grafico ",
ja="イラスト",
- kr="삽화",
la="Typus ",
lt="Graphic ",
nb="Bilde ",
@@ -835,6 +871,7 @@ data.labels={
gr="",
hr="vidi gore",
hu="",
+ kr="그러므로",
it="come mostrato sopra",
la="",
lt="kaip parodyta aukščiau",
@@ -906,7 +943,7 @@ data.labels={
hu=",. intermezzo:",
it="Intermezzo ",
ja="間奏曲",
- kr="",
+ kr="간주곡",
la="Intermissum ",
lt="Intermezzo ",
nb="Intermesso ",
@@ -945,7 +982,7 @@ data.labels={
hu="január",
it="gennaio",
ja="1",
- kr="들어가기",
+ kr="1월",
la="Ianuarius",
lt="sausio",
nb="januar",
@@ -1197,6 +1234,7 @@ data.labels={
hu="sorok",
it="righe ",
ja="線",
+ kr="행",
la="versus ",
lt="lines ",
nb="linjer ",
@@ -1555,6 +1593,7 @@ data.labels={
hr="stranica ",
hu="",
it="pagina ",
+ kr="쪽",
la="",
lt="puslapis ",
nb="side ",
@@ -1591,7 +1630,7 @@ data.labels={
hu=",. rész:",
it="Parte ",
ja={"第","パート"},
- kr="부",
+ kr={"제","부"},
la="Pars ",
lt=", dalis",
nb="Del",
@@ -1666,7 +1705,7 @@ data.labels={
hu="",
it="",
ja={"第","項"},
- kr="절",
+ kr={"제","절"},
la="",
lt="",
nb="",
@@ -1701,6 +1740,7 @@ data.labels={
hr="vidi ",
hu="",
it="cf. ",
+ kr="",
la="",
lt="žiūrėti ",
nb="se ",
@@ -1810,7 +1850,6 @@ data.labels={
hu="",
it="",
ja="",
- kr="",
la="",
lt="",
nb="",
@@ -1848,7 +1887,6 @@ data.labels={
hu="",
it="",
ja="",
- kr="",
la="",
lt="",
nb="",
@@ -1886,7 +1924,6 @@ data.labels={
hu="",
it="",
ja="",
- kr="",
la="",
lt="",
nb="",
@@ -2295,7 +2332,7 @@ data.labels={
hu="Intermezzok",
it="Intermezzi",
ja="間奏曲",
- kr="",
+ kr="간주곡",
la="Intermissa",
lt="Intermezzos",
nb="Intermesso",
diff --git a/tex/context/base/lang-wrd.lua b/tex/context/base/lang-wrd.lua
index d008ed341..b8eb19353 100644
--- a/tex/context/base/lang-wrd.lua
+++ b/tex/context/base/lang-wrd.lua
@@ -12,7 +12,7 @@ local concat = table.concat
local lpegmatch = lpeg.match
local P, S, Cs = lpeg.P, lpeg.S, lpeg.Cs
-local report_languages = logs.new("languages")
+local report_words = logs.new("languages","words")
local nodes, node, languages = nodes, node, languages
@@ -60,7 +60,7 @@ local loaded = { } -- we share lists
function words.load(tag,filename)
local fullname = resolvers.findfile(filename,'other text file') or ""
if fullname ~= "" then
- report_languages("loading word file '%s'",fullname)
+ report_words("loading word file '%s'",fullname)
statistics.starttiming(languages)
local list = loaded[fullname]
if not list then
@@ -72,7 +72,7 @@ function words.load(tag,filename)
wordsdata[tag] = list
statistics.stoptiming(languages)
else
- report_languages("missing words file '%s'",filename)
+ report_words("missing word file '%s'",filename)
end
end
@@ -374,7 +374,7 @@ local function dumpusedwords()
if dumpthem then
collected.threshold = words.threshold
dumpname = dumpname or file.addsuffix(tex.jobname,"words")
- report_languages("saving list of used words in '%s'",dumpname)
+ report_words("saving list of used words in '%s'",dumpname)
io.savedata(dumpname,table.serialize(collected,true))
-- table.tofile(dumpname,list,true)
end
diff --git a/tex/context/base/lpdf-ano.lua b/tex/context/base/lpdf-ano.lua
index 6d25a9c42..d020c8a78 100644
--- a/tex/context/base/lpdf-ano.lua
+++ b/tex/context/base/lpdf-ano.lua
@@ -16,9 +16,9 @@ local trace_references = false trackers.register("references.references", f
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 report_references = logs.new("references")
-local report_destinations = logs.new("destinations")
-local report_bookmarks = logs.new("bookmarks")
+local report_reference = logs.new("backend","references")
+local report_destination = logs.new("backend","destinations")
+local report_bookmark = logs.new("backend","bookmarks")
local variables = interfaces.variables
local constants = interfaces.constants
@@ -151,7 +151,7 @@ local function link(url,filename,destination,page,actions)
}
}
else
- commands.writestatus("references","invalid page reference: %s",page or "?")
+ report_reference("invalid page reference: %s",page or "?")
end
end
return false
@@ -236,7 +236,7 @@ local function use_normal_annotations()
local function reference(width,height,depth,prerolled) -- keep this one
if prerolled then
if trace_references then
- report_references("w=%s, h=%s, d=%s, a=%s",width,height,depth,prerolled)
+ report_reference("w=%s, h=%s, d=%s, a=%s",width,height,depth,prerolled)
end
return pdfannotation_node(width,height,depth,prerolled)
end
@@ -277,7 +277,7 @@ local function use_shared_annotations()
local function reference(width,height,depth,prerolled)
if prerolled then
if trace_references then
- report_references("w=%s, h=%s, d=%s, a=%s",width,height,depth,prerolled)
+ report_reference("w=%s, h=%s, d=%s, a=%s",width,height,depth,prerolled)
end
local luacode = format("_bpnf_(%s,%s,%s,'%s')",width,height,depth,prerolled)
return latelua_node(luacode)
@@ -321,7 +321,7 @@ end node.free(lln)
function nodeinjections.destination(width,height,depth,name,view)
if trace_destinations then
- report_destinations("w=%s, h=%s, d=%s, n=%s, v=%s",width,height,depth,name,view or "no view")
+ report_destination("w=%s, h=%s, d=%s, n=%s, v=%s",width,height,depth,name,view or "no view")
end
return pdfdestination_node(width,height,depth,name,view)
end
@@ -342,7 +342,7 @@ runners["inner"] = function(var,actions)
end
runners["inner with arguments"] = function(var,actions)
- report_references("todo: inner with arguments")
+ report_reference("todo: inner with arguments")
return false
end
@@ -362,7 +362,7 @@ runners["special outer with operation"] = function(var,actions)
end
runners["special outer"] = function(var,actions)
- report_references("todo: special outer")
+ report_reference("todo: special outer")
return false
end
@@ -372,22 +372,22 @@ runners["special"] = function(var,actions)
end
runners["outer with inner with arguments"] = function(var,actions)
- report_references("todo: outer with inner with arguments")
+ report_reference("todo: outer with inner with arguments")
return false
end
runners["outer with special and operation and arguments"] = function(var,actions)
- report_references("todo: outer with special and operation and arguments")
+ report_reference("todo: outer with special and operation and arguments")
return false
end
runners["outer with special"] = function(var,actions)
- report_references("todo: outer with special")
+ report_reference("todo: outer with special")
return false
end
runners["outer with special and operation"] = function(var,actions)
- report_references("todo: outer with special and operation")
+ report_reference("todo: outer with special and operation")
return false
end
@@ -399,7 +399,7 @@ function specials.internal(var,actions) -- better resolve in strc-ref
local v = references.internals[i]
if not v then
-- error
- report_references("no internal reference '%s'",var.operation)
+ report_reference("no internal reference '%s'",var.operation)
elseif getinnermethod() == "names" then
-- named
return link(nil,nil,"aut:"..i,v.references.realpage,actions)
@@ -630,7 +630,7 @@ local function build(levels,start,parent,method)
return i, n, first, last
elseif level == startlevel then
if trace_bookmarks then
- report_bookmarks("%3i %s%s %s",reference.realpage,rep(" ",level-1),(open and "+") or "-",title)
+ report_bookmark("%3i %s%s %s",reference.realpage,rep(" ",level-1),(open and "+") or "-",title)
end
local prev = child
child = pdfreserveobject()
diff --git a/tex/context/base/lpdf-epa.lua b/tex/context/base/lpdf-epa.lua
index 1e5b3646a..14d0da84f 100644
--- a/tex/context/base/lpdf-epa.lua
+++ b/tex/context/base/lpdf-epa.lua
@@ -14,7 +14,7 @@ local format = string.format
local trace_links = false trackers.register("figures.links", function(v) trace_links = v end)
-local report_link = logs.new("links")
+local report_link = logs.new("backend","merging")
local backends, lpdf = backends, lpdf
diff --git a/tex/context/base/lpdf-fld.lua b/tex/context/base/lpdf-fld.lua
index 622b56098..8b2ccaaec 100644
--- a/tex/context/base/lpdf-fld.lua
+++ b/tex/context/base/lpdf-fld.lua
@@ -16,7 +16,7 @@ local bpfactor, todimen = number.dimenfactors.bp, string.todimen
local trace_fields = false trackers.register("widgets.fields", function(v) trace_fields = v end)
-local report_fields = logs.new("fields")
+local report_fields = logs.new("backend","fields")
local backends, lpdf = backends, lpdf
@@ -178,153 +178,154 @@ end
-- fonts and color
-
local pdfdocencodingvector, pdfdocencodingcapsule
local function checkpdfdocencoding()
+ -- not using pdfconstant for all these names saves us quite
+ -- some bytecode
local encoding = pdfdictionary {
Type = pdfconstant("Encoding"),
Differences = pdfarray {
24,
- pdfconstant("breve"),
- pdfconstant("caron"),
- pdfconstant("circumflex"),
- pdfconstant("dotaccent"),
- pdfconstant("hungarumlaut"),
- pdfconstant("ogonek"),
- pdfconstant("ring"),
- pdfconstant("tilde"),
+ "/breve",
+ "/caron",
+ "/circumflex",
+ "/dotaccent",
+ "/hungarumlaut",
+ "/ogonek",
+ "/ring",
+ "/tilde",
39,
- pdfconstant("quotesingle"),
+ "/quotesingle",
96,
- pdfconstant("grave"),
+ "/grave",
128,
- pdfconstant("bullet"),
- pdfconstant("dagger"),
- pdfconstant("daggerdbl"),
- pdfconstant("ellipsis"),
- pdfconstant("emdash"),
- pdfconstant("endash"),
- pdfconstant("florin"),
- pdfconstant("fraction"),
- pdfconstant("guilsinglleft"),
- pdfconstant("guilsinglright"),
- pdfconstant("minus"),
- pdfconstant("perthousand"),
- pdfconstant("quotedblbase"),
- pdfconstant("quotedblleft"),
- pdfconstant("quotedblright"),
- pdfconstant("quoteleft"),
- pdfconstant("quoteright"),
- pdfconstant("quotesinglbase"),
- pdfconstant("trademark"),
- pdfconstant("fi"),
- pdfconstant("fl"),
- pdfconstant("Lslash"),
- pdfconstant("OE"),
- pdfconstant("Scaron"),
- pdfconstant("Ydieresis"),
- pdfconstant("Zcaron"),
- pdfconstant("dotlessi"),
- pdfconstant("lslash"),
- pdfconstant("oe"),
- pdfconstant("scaron"),
- pdfconstant("zcaron"),
+ "/bullet",
+ "/dagger",
+ "/daggerdbl",
+ "/ellipsis",
+ "/emdash",
+ "/endash",
+ "/florin",
+ "/fraction",
+ "/guilsinglleft",
+ "/guilsinglright",
+ "/minus",
+ "/perthousand",
+ "/quotedblbase",
+ "/quotedblleft",
+ "/quotedblright",
+ "/quoteleft",
+ "/quoteright",
+ "/quotesinglbase",
+ "/trademark",
+ "/fi",
+ "/fl",
+ "/Lslash",
+ "/OE",
+ "/Scaron",
+ "/Ydieresis",
+ "/Zcaron",
+ "/dotlessi",
+ "/lslash",
+ "/oe",
+ "/scaron",
+ "/zcaron",
160,
- pdfconstant("Euro"),
+ "/Euro",
164,
- pdfconstant("currency"),
+ "/currency",
166,
- pdfconstant("brokenbar"),
+ "/brokenbar",
168,
- pdfconstant("dieresis"),
- pdfconstant("copyright"),
- pdfconstant("ordfeminine"),
+ "/dieresis",
+ "/copyright",
+ "/ordfeminine",
172,
- pdfconstant("logicalnot"),
- pdfconstant(".notdef"),
- pdfconstant("registered"),
- pdfconstant("macron"),
- pdfconstant("degree"),
- pdfconstant("plusminus"),
- pdfconstant("twosuperior"),
- pdfconstant("threesuperior"),
- pdfconstant("acute"),
- pdfconstant("mu"),
+ "/logicalnot",
+ "/.notdef",
+ "/registered",
+ "/macron",
+ "/degree",
+ "/plusminus",
+ "/twosuperior",
+ "/threesuperior",
+ "/acute",
+ "/mu",
183,
- pdfconstant("periodcentered"),
- pdfconstant("cedilla"),
- pdfconstant("onesuperior"),
- pdfconstant("ordmasculine"),
+ "/periodcentered",
+ "/cedilla",
+ "/onesuperior",
+ "/ordmasculine",
188,
- pdfconstant("onequarter"),
- pdfconstant("onehalf"),
- pdfconstant("threequarters"),
+ "/onequarter",
+ "/onehalf",
+ "/threequarters",
192,
- pdfconstant("Agrave"),
- pdfconstant("Aacute"),
- pdfconstant("Acircumflex"),
- pdfconstant("Atilde"),
- pdfconstant("Adieresis"),
- pdfconstant("Aring"),
- pdfconstant("AE"),
- pdfconstant("Ccedilla"),
- pdfconstant("Egrave"),
- pdfconstant("Eacute"),
- pdfconstant("Ecircumflex"),
- pdfconstant("Edieresis"),
- pdfconstant("Igrave"),
- pdfconstant("Iacute"),
- pdfconstant("Icircumflex"),
- pdfconstant("Idieresis"),
- pdfconstant("Eth"),
- pdfconstant("Ntilde"),
- pdfconstant("Ograve"),
- pdfconstant("Oacute"),
- pdfconstant("Ocircumflex"),
- pdfconstant("Otilde"),
- pdfconstant("Odieresis"),
- pdfconstant("multiply"),
- pdfconstant("Oslash"),
- pdfconstant("Ugrave"),
- pdfconstant("Uacute"),
- pdfconstant("Ucircumflex"),
- pdfconstant("Udieresis"),
- pdfconstant("Yacute"),
- pdfconstant("Thorn"),
- pdfconstant("germandbls"),
- pdfconstant("agrave"),
- pdfconstant("aacute"),
- pdfconstant("acircumflex"),
- pdfconstant("atilde"),
- pdfconstant("adieresis"),
- pdfconstant("aring"),
- pdfconstant("ae"),
- pdfconstant("ccedilla"),
- pdfconstant("egrave"),
- pdfconstant("eacute"),
- pdfconstant("ecircumflex"),
- pdfconstant("edieresis"),
- pdfconstant("igrave"),
- pdfconstant("iacute"),
- pdfconstant("icircumflex"),
- pdfconstant("idieresis"),
- pdfconstant("eth"),
- pdfconstant("ntilde"),
- pdfconstant("ograve"),
- pdfconstant("oacute"),
- pdfconstant("ocircumflex"),
- pdfconstant("otilde"),
- pdfconstant("odieresis"),
- pdfconstant("divide"),
- pdfconstant("oslash"),
- pdfconstant("ugrave"),
- pdfconstant("uacute"),
- pdfconstant("ucircumflex"),
- pdfconstant("udieresis"),
- pdfconstant("yacute"),
- pdfconstant("thorn"),
- pdfconstant("ydieresis"),
+ "/Agrave",
+ "/Aacute",
+ "/Acircumflex",
+ "/Atilde",
+ "/Adieresis",
+ "/Aring",
+ "/AE",
+ "/Ccedilla",
+ "/Egrave",
+ "/Eacute",
+ "/Ecircumflex",
+ "/Edieresis",
+ "/Igrave",
+ "/Iacute",
+ "/Icircumflex",
+ "/Idieresis",
+ "/Eth",
+ "/Ntilde",
+ "/Ograve",
+ "/Oacute",
+ "/Ocircumflex",
+ "/Otilde",
+ "/Odieresis",
+ "/multiply",
+ "/Oslash",
+ "/Ugrave",
+ "/Uacute",
+ "/Ucircumflex",
+ "/Udieresis",
+ "/Yacute",
+ "/Thorn",
+ "/germandbls",
+ "/agrave",
+ "/aacute",
+ "/acircumflex",
+ "/atilde",
+ "/adieresis",
+ "/aring",
+ "/ae",
+ "/ccedilla",
+ "/egrave",
+ "/eacute",
+ "/ecircumflex",
+ "/edieresis",
+ "/igrave",
+ "/iacute",
+ "/icircumflex",
+ "/idieresis",
+ "/eth",
+ "/ntilde",
+ "/ograve",
+ "/oacute",
+ "/ocircumflex",
+ "/otilde",
+ "/odieresis",
+ "/divide",
+ "/oslash",
+ "/ugrave",
+ "/uacute",
+ "/ucircumflex",
+ "/udieresis",
+ "/yacute",
+ "/thorn",
+ "/ydieresis",
},
}
pdfdocencodingvector = pdfreference(pdfflushobject(encoding))
@@ -398,10 +399,11 @@ local function registerfonts()
if next(usedfonts) then
checkpdfdocencoding()
local d = pdfdictionary()
+ local pdffonttype, pdffontsubtype = pdfconstant("Font"), pdfconstant("Type1")
for tag, name in next, usedfonts do
local f = pdfdictionary {
- Type = pdfconstant("Font"),
- Subtype = pdfconstant("Type1"),
+ Type = pdffonttype,
+ Subtype = pdffontsubtype,
Name = pdfconstant(tag),
BaseFont = pdfconstant(name),
Encoding = pdfdocencodingvector,
diff --git a/tex/context/base/lpdf-fmt.lua b/tex/context/base/lpdf-fmt.lua
index 348f6eada..8f0a57bf4 100644
--- a/tex/context/base/lpdf-fmt.lua
+++ b/tex/context/base/lpdf-fmt.lua
@@ -13,7 +13,7 @@ if not modules then modules = { } end modules ['lpdf-fmt'] = {
local trace_format = false trackers.register("backend.format", function(v) trace_format = v end)
local trace_variables = false trackers.register("backend.variables", function(v) trace_variables = v end)
-local report_backends = logs.new("backends")
+local report_backend = logs.new("backend","profiles")
local backends, lpdf = backends, lpdf
@@ -380,16 +380,16 @@ local function loadprofile(name,filename)
end
if profile then
if next(profile) then
- report_backends("profile specification '%s' loaded from '%s'",name,filename)
+ report_backend("profile specification '%s' loaded from '%s'",name,filename)
return profile
elseif trace_format then
- report_backends("profile specification '%s' loaded from '%s' but empty",name,filename)
+ report_backend("profile specification '%s' loaded from '%s' but empty",name,filename)
end
return false
end
end
end
- report_backends("profile specification '%s' not found in '%s'",name,concat(filenames, ", "))
+ report_backend("profile specification '%s' not found in '%s'",name,concat(filenames, ", "))
end
local function urls(url)
@@ -418,7 +418,7 @@ local internalprofiles = { }
local function handleinternalprofile(s,include)
local filename, colorspace = s.filename or "", s.colorspace or ""
if filename == "" or colorspace == "" then
- report_backends("error in internal profile specification: %s",serialize(s,false))
+ report_backend("error in internal profile specification: %s",serialize(s,false))
else
local tag = profilename(filename)
local profile = internalprofiles[tag]
@@ -429,9 +429,9 @@ local function handleinternalprofile(s,include)
local fullname = locatefile(filename)
local channel = channels[colorspace] or nil
if fullname == "" then
- report_backends("error, couldn't locate profile '%s'",filename)
+ report_backend("error, couldn't locate profile '%s'",filename)
elseif not channel then
- report_backends("error, couldn't resolve channel entry for colorspace '%s'",colorspace)
+ report_backend("error, couldn't resolve channel entry for colorspace '%s'",colorspace)
else
local a = pdfdictionary { N = channel }
profile = pdfobject { -- does a flush too
@@ -443,13 +443,13 @@ local function handleinternalprofile(s,include)
}
internalprofiles[tag] = profile
if trace_format then
- report_backends("including '%s' color profile from '%s'",colorspace,fullname)
+ report_backend("including '%s' color profile from '%s'",colorspace,fullname)
end
end
else
internalprofiles[tag] = true
if trace_format then
- report_backends("not including '%s' color profile '%s'",colorspace,filename)
+ report_backend("not including '%s' color profile '%s'",colorspace,filename)
end
end
end
@@ -476,9 +476,9 @@ local function handleexternalprofile(s,include) -- specification (include ignore
if name == "" or url == "" or checksum == "" or version == "" or colorspace == "" or filename == "" then
local profile = handleinternalprofile(s)
if profile then
- report_backends("incomplete external profile specification, falling back to internal")
+ report_backend("incomplete external profile specification, falling back to internal")
else
- report_backends("error in external profile specification: %s",serialize(s,false))
+ report_backend("error in external profile specification: %s",serialize(s,false))
end
else
local tag = profilename(filename)
@@ -503,12 +503,12 @@ local loadeddefaults = { }
local function handledefaultprofile(s,spec) -- specification
local filename, colorspace = s.filename or "", lower(s.colorspace or "")
if filename == "" or colorspace == "" then
- report_backends("error in default profile specification: %s",serialize(s,false))
+ report_backend("error in default profile specification: %s",serialize(s,false))
elseif not loadeddefaults[colorspace] then
local tag = profilename(filename)
local n = internalprofiles[tag] -- or externalprofiles[tag]
if n == true then -- not internalized
- report_backends("no default profile '%s' for colorspace '%s'",filename,colorspace)
+ report_backend("no default profile '%s' for colorspace '%s'",filename,colorspace)
elseif n then
local a = pdfarray {
pdfconstant("ICCBased"),
@@ -517,12 +517,12 @@ local function handledefaultprofile(s,spec) -- specification
-- used in page /Resources, so this must be inserted at runtime
lpdf.adddocumentcolorspace(prefixes[colorspace],pdfreference(pdfflushobject(a)))
loadeddefaults[colorspace] = true
- report_backends("setting '%s' as default '%s' color space",filename,colorspace)
+ report_backend("setting '%s' as default '%s' color space",filename,colorspace)
else
- report_backends("no default profile '%s' for colorspace '%s'",filename,colorspace)
+ report_backend("no default profile '%s' for colorspace '%s'",filename,colorspace)
end
elseif trace_format then
- report_backends("a default '%s' colorspace is already in use",colorspace)
+ report_backend("a default '%s' colorspace is already in use",colorspace)
end
end
@@ -531,7 +531,7 @@ local loadedintents, intents = { }, pdfarray()
local function handleoutputintent(s,spec)
local name, url, filename, id, outputcondition, info = s.info or s.filename or "", s.url or "", s.filename or "", s.id or "", s.outputcondition or "", s.info or ""
if name == "" or id == "" then
- report_backends("error in output intent specification: %s",serialize(s,false))
+ report_backend("error in output intent specification: %s",serialize(s,false))
elseif not loadedintents[name] then
local tag = profilename(filename)
local internal, external = internalprofiles[tag], externalprofiles[tag]
@@ -549,18 +549,18 @@ local function handleoutputintent(s,spec)
elseif external and external ~= true then
d.DestOutputProfileRef = pdfreference(external)
else
- report_backends("omitting reference to profile for intent '%s'",name)
+ report_backend("omitting reference to profile for intent '%s'",name)
end
intents[#intents+1] = pdfreference(pdfflushobject(pdfdictionary(d)))
if trace_format then
- report_backends("setting output intent to '%s' with id '%s' (entry %s)",name,id,#intents)
+ report_backend("setting output intent to '%s' with id '%s' (entry %s)",name,id,#intents)
end
else
- report_backends("invalid output intent '%s'",name)
+ report_backend("invalid output intent '%s'",name)
end
loadedintents[name] = true
elseif trace_format then
- report_backends("an output intent with name '%s' is already in use",name)
+ report_backend("an output intent with name '%s' is already in use",name)
end
end
@@ -571,7 +571,7 @@ local function handleiccprofile(message,spec,name,filename,how,options,alwaysinc
local name = list[i]
local profile = loadprofile(name,filename)
if trace_format then
- report_backends("handling %s '%s'",message,name)
+ report_backend("handling %s '%s'",message,name)
end
if profile then
if formatspecification.cmyk_colors then
@@ -585,34 +585,34 @@ local function handleiccprofile(message,spec,name,filename,how,options,alwaysinc
local always, never = options[variables.always], options[variables.never]
if always or alwaysinclude then
if trace_format then
- report_backends("forcing internal profiles") -- can make preflight unhappy
+ report_backend("forcing internal profiles") -- can make preflight unhappy
end
-- internal, external = true, false
internal, external = not never, false
elseif never then
if trace_format then
- report_backends("forcing external profiles") -- can make preflight unhappy
+ report_backend("forcing external profiles") -- can make preflight unhappy
end
internal, external = false, true
end
if external then
if trace_format then
- report_backends("handling external profiles cf. '%s'",name)
+ report_backend("handling external profiles cf. '%s'",name)
end
handleexternalprofile(profile,false)
else
if trace_format then
- report_backends("handling internal profiles cf. '%s'",name)
+ report_backend("handling internal profiles cf. '%s'",name)
end
if internal then
handleinternalprofile(profile,always or include)
else
- report_backends("no profile inclusion for '%s'",formatname)
+ report_backend("no profile inclusion for '%s'",formatname)
end
end
how(profile,spec)
elseif trace_format then
- report_backends("unknown profile '%s'",name)
+ report_backend("unknown profile '%s'",name)
end
end
end
@@ -640,7 +640,7 @@ function codeinjections.setformat(s)
if spec then
formatspecification, formatname = spec, spec.format_name
level = level and tonumber(level)
- report_backends("setting format to '%s'",formatname)
+ report_backend("setting format to '%s'",formatname)
local xmp_file = formatspecification.xmp_file or ""
if xmp_file == "" then
-- weird error
@@ -655,13 +655,13 @@ function codeinjections.setformat(s)
tex.pdfcompresslevel, tex.pdfobjcompresslevel = compresslevel, objectcompresslevel
tex.pdfmajorversion, tex.pdfminorversion = majorversion, minorversion
if objectcompression then
- report_backends("forcing pdf version %s.%s, compression level %s, object compression level %s",
+ report_backend("forcing pdf version %s.%s, compression level %s, object compression level %s",
majorversion,minorversion,compresslevel,objectcompresslevel)
elseif compresslevel > 0 then
- report_backends("forcing pdf version %s.%s, compression level %s, object compression disabled",
+ report_backend("forcing pdf version %s.%s, compression level %s, object compression disabled",
majorversion,minorversion,compresslevel)
else
- report_backends("forcing pdf version %s.%s, compression disabled",
+ report_backend("forcing pdf version %s.%s, compression disabled",
majorversion,minorversion)
end
--
@@ -700,15 +700,15 @@ function codeinjections.setformat(s)
for k, v in table.sortedhash(formats.default) do
local v = formatspecification[k]
if type(v) ~= "function" then
- report_backends("%s = %s",k,tostring(v or false))
+ report_backend("%s = %s",k,tostring(v or false))
end
end
end
function codeinjections.setformat(noname)
- report_backends("error, format is already set to '%s', ignoring '%s'",formatname,noname.format)
+ report_backend("error, format is already set to '%s', ignoring '%s'",formatname,noname.format)
end
else
- report_backends("error, format '%s' is not supported",format)
+ report_backend("error, format '%s' is not supported",format)
end
end
end
diff --git a/tex/context/base/lpdf-ini.lua b/tex/context/base/lpdf-ini.lua
index 2defa3f2e..044ff5c68 100644
--- a/tex/context/base/lpdf-ini.lua
+++ b/tex/context/base/lpdf-ini.lua
@@ -26,7 +26,8 @@ local trace_resources = false trackers.register("backend.resources", function
local trace_objects = false trackers.register("backend.objects", function(v) trace_objects = v end)
local trace_detail = false trackers.register("backend.detail", function(v) trace_detail = v end)
-local report_backends = logs.new("backends")
+local report_objects = logs.new("backend","objects")
+local report_finalizing = logs.new("backend","finalizing")
local backends, context = backends, context
@@ -360,10 +361,10 @@ function lpdf.reserveobject(name)
if name then
names[name] = r
if trace_objects then
- report_backends("reserving object number %s under name '%s'",r,name)
+ report_objects("reserving number %s under name '%s'",r,name)
end
elseif trace_objects then
- report_backends("reserving object number %s",r)
+ report_objects("reserving number %s",r)
end
return r
end
@@ -392,25 +393,25 @@ function lpdf.flushobject(name,data)
if name then
if trace_objects then
if trace_detail then
- report_backends("flushing object data to reserved object with name '%s' -> %s",name,tostring(data))
+ report_objects("flushing data to reserved object with name '%s' -> %s",name,tostring(data))
else
- report_backends("flushing object data to reserved object with name '%s'",name)
+ report_objects("flushing data to reserved object with name '%s'",name)
end
end
return pdfimmediateobject(name,tostring(data))
else
if trace_objects then
if trace_detail then
- report_backends("flushing object data to reserved object with number %s -> %s",name,tostring(data))
+ report_objects("flushing data to reserved object with number %s -> %s",name,tostring(data))
else
- report_backends("flushing object data to reserved object with number %s",name)
+ report_objects("flushing data to reserved object with number %s",name)
end
end
return pdfimmediateobject(tostring(data))
end
else
if trace_objects and trace_detail then
- report_backends("flushing object data -> %s",tostring(name))
+ report_objects("flushing data -> %s",tostring(name))
end
return pdfimmediateobject(tostring(name))
end
@@ -534,26 +535,26 @@ local function set(where,what,f,when,comment)
local w = where[when]
w[#w+1] = { f, comment }
if trace_finalizers then
- report_backends("%s set: [%s,%s]",what,when,#w)
+ report_finalizing("%s set: [%s,%s]",what,when,#w)
end
end
local function run(where,what)
if trace_finalizers then
- report_backends("start backend: category=%s, n=%s",what,#where)
+ report_finalizing("start backend: category=%s, n=%s",what,#where)
end
for i=1,#where do
local w = where[i]
for j=1,#w do
local wj = w[j]
if trace_finalizers then
- report_backends("%s finalizer: [%s,%s] %s",what,i,j,wj[2] or "")
+ report_finalizing("%s finalizer: [%s,%s] %s",what,i,j,wj[2] or "")
end
wj[1]()
end
end
if trace_finalizers then
- report_backends("stop finalizing")
+ report_finalizing("stop finalizing")
end
end
@@ -581,7 +582,7 @@ function lpdf.finalizedocument()
if not environment.initex then
run(documentfinalizers,"document")
function lpdf.finalizedocument()
- report_backends("serious error: the document is finalized multiple times")
+ report_finalizing("serious error: the document is finalized multiple times")
function lpdf.finalizedocument() end
end
end
@@ -596,22 +597,24 @@ callbacks.register("finish_pdffile", lpdf.finalizedocument)
local function trace_set(what,key)
if trace_resources then
- report_backends("setting key '%s' in '%s'",key,what)
+ report_finalizing("setting key '%s' in '%s'",key,what)
end
end
local function trace_flush(what)
if trace_resources then
- report_backends("flushing '%s'",what)
+ report_finalizing("flushing '%s'",what)
end
end
lpdf.protectresources = true
-local catalog, info, names = pdfdictionary(), pdfdictionary(), pdfdictionary()
+local catalog = pdfdictionary { Type = "Catalog" } -- nicer, but when we assign we nil the Type
+local info = pdfdictionary { Type = "Info" } -- nicer, but when we assign we nil the Type
+local names = pdfdictionary { Type = "Names" } -- nicer, but when we assign we nil the Type
-local function flushcatalog() if not environment.initex then trace_flush("catalog") pdf.catalog = catalog() end end
-local function flushinfo () if not environment.initex then trace_flush("info") pdf.info = info () end end
-local function flushnames () if not environment.initex then trace_flush("names") pdf.names = names () end end
+local function flushcatalog() if not environment.initex then trace_flush("catalog") catalog.Catalog = nil pdf.catalog = catalog() end end
+local function flushinfo () if not environment.initex then trace_flush("info") info .Info = nil pdf.info = info () end end
+local function flushnames () if not environment.initex then trace_flush("names") names .Names = nil pdf.names = names () end end
function lpdf.addtocatalog(k,v) if not (lpdf.protectresources and catalog[k]) then trace_set("catalog",k) catalog[k] = v end end
function lpdf.addtoinfo (k,v) if not (lpdf.protectresources and info [k]) then trace_set("info", k) info [k] = v end end
@@ -657,7 +660,7 @@ registerdocumentfinalizer(flushshades,3,"shades")
registerdocumentfinalizer(flushcatalog,3,"catalog")
registerdocumentfinalizer(flushinfo,3,"info")
-registerdocumentfinalizer(flushnames,3,"names")
+registerdocumentfinalizer(flushnames,3,"names") -- before catalog
registerpagefinalizer(checkextgstates,3,"extended graphic states")
registerpagefinalizer(checkcolorspaces,3,"color spaces")
@@ -756,7 +759,7 @@ if not pdfreferenceobject then
n = n + 1
end
if trace_objects then
- report_backends("%s objects flushed",n)
+ report_objects("%s objects flushed",n)
end
delayed = { }
end
diff --git a/tex/context/base/lpdf-tag.lua b/tex/context/base/lpdf-tag.lua
index 00ddef025..e2afddc51 100644
--- a/tex/context/base/lpdf-tag.lua
+++ b/tex/context/base/lpdf-tag.lua
@@ -12,7 +12,7 @@ local utfchar = utf.char
local trace_tags = false trackers.register("structures.tags", function(v) trace_tags = v end)
-local report_tags = logs.new("tags")
+local report_tags = logs.new("backend","tags")
local backends, lpdf, nodes = backends, lpdf, nodes
diff --git a/tex/context/base/lpdf-wid.lua b/tex/context/base/lpdf-wid.lua
index 1ca41ed7c..a9e9db2f0 100644
--- a/tex/context/base/lpdf-wid.lua
+++ b/tex/context/base/lpdf-wid.lua
@@ -11,7 +11,7 @@ local texbox, texcount = tex.box, tex.count
local settings_to_array = utilities.parsers.settings_to_array
local settings_to_hash = utilities.parsers.settings_to_hash
-local report_media = logs.new("media")
+local report_media = logs.new("backend","media")
local backends, lpdf, nodes = backends, lpdf, nodes
diff --git a/tex/context/base/lpdf-xmp.lua b/tex/context/base/lpdf-xmp.lua
index 490eacbda..e216b5e01 100644
--- a/tex/context/base/lpdf-xmp.lua
+++ b/tex/context/base/lpdf-xmp.lua
@@ -12,7 +12,7 @@ local xmlfillin = xml.fillin
local trace_xmp = false trackers.register("backend.xmp", function(v) trace_xmp = v end)
-local report_xmp = logs.new("backends")
+local report_xmp = logs.new("backend","xmp")
local lpdf = lpdf
@@ -83,7 +83,7 @@ function lpdf.setxmpfile(name)
-- xmpfile = nil
-- end
if xmp then
- report_xmp("discarding loaded xmp file '%s'",xmpfile)
+ report_xmp("discarding loaded file '%s'",xmpfile)
xmp = nil
end
xmpfile = name ~= "" and name
@@ -99,7 +99,7 @@ local function valid_xmp()
xmpfile = resolvers.findfile(xmpname) or ""
end
if xmpfile ~= "" then
- report_xmp("using xmp file '%s'",xmpfile)
+ report_xmp("using file '%s'",xmpfile)
end
local xmpdata = (xmpfile ~= "" and io.loaddata(xmpfile)) or ""
xmp = xml.convert(xmpdata)
@@ -143,22 +143,37 @@ local function flushxmpinfo()
local t = { } for i=1,24 do t[i] = char(96 + random(26)) end
local packetid = concat(t)
- local time = lpdf.timestamp()
- addxmpinfo("Producer",format("LuaTeX-%0.2f.%s",tex.luatexversion/100,tex.luatexrevision))
- addxmpinfo("DocumentID",format("uuid:%s",os.uuid()))
- addxmpinfo("InstanceID",format("uuid:%s",os.uuid()))
- addxmpinfo("CreatorTool","LuaTeX + ConTeXt MkIV")
- addxmpinfo("CreateDate",time)
- addxmpinfo("ModifyDate",time)
- addxmpinfo("MetadataDate",time)
- addxmpinfo("PTEX.Fullbanner", tex.pdftexbanner)
+
+ local documentid = format("uuid:%s",os.uuid())
+ local instanceid = format("uuid:%s",os.uuid())
+ local producer = format("LuaTeX-%0.2f.%s",tex.luatexversion/100,tex.luatexrevision)
+ local creator = "LuaTeX + ConTeXt MkIV"
+ local time = lpdf.timestamp()
+ local fullbanner = tex.pdftexbanner
+ -- local fullbanner = gsub(tex.pdftexbanner,"kpse.*","")
+
+ addxmpinfo("DocumentID", documentid)
+ addxmpinfo("InstanceID", instanceid)
+ addxmpinfo("Producer", producer)
+ addxmpinfo("CreatorTool", creator)
+ addxmpinfo("CreateDate", time)
+ addxmpinfo("ModifyDate", time)
+ addxmpinfo("MetadataDate", time)
+ addxmpinfo("PTEX.Fullbanner", fullbanner)
+
+ addtoinfo("Producer", producer)
+ addtoinfo("Creator", creator)
+ addtoinfo("CreationDate", time)
+ addtoinfo("ModDate", time)
+-- addtoinfo("PTEX.Fullbanner", fullbanner) -- no checking done on existence
+
local blob = xml.tostring(xml.first(xmp or valid_xmp(),"/x:xmpmeta"))
local md = pdfdictionary {
Subtype = pdfconstant("XML"),
Type = pdfconstant("Metadata"),
}
if trace_xmp then
- commands.writestatus("system","xmp data flushed (see log file)")
+ report_xmp("data flushed (see log file)")
texio.write_nl("log","")
texio.write("log","\n% ",(gsub(blob,"[\r\n]","\n%% ")),"\n")
end
diff --git a/tex/context/base/luat-cbk.lua b/tex/context/base/luat-cbk.lua
index 93538c6bb..ef2a8502f 100644
--- a/tex/context/base/luat-cbk.lua
+++ b/tex/context/base/luat-cbk.lua
@@ -12,8 +12,8 @@ local round = math.round
local trace_checking = false trackers.register("memory.checking", function(v) trace_checking = v end)
-local report_callbacks = logs.new("callbacks")
-local report_memory = logs.new("memory")
+local report_callbacks = logs.new("system","callbacks")
+local report_memory = logs.new("system","memory")
--[[ldx--
<p>Callbacks are the real asset of <l n='luatex'/>. They permit you to hook
diff --git a/tex/context/base/luat-env.lua b/tex/context/base/luat-env.lua
index b8245afba..f5c8cf888 100644
--- a/tex/context/base/luat-env.lua
+++ b/tex/context/base/luat-env.lua
@@ -14,7 +14,7 @@ if not modules then modules = { } end modules ['luat-env'] = {
local trace_locating = false trackers.register("resolvers.locating", function(v) trace_locating = v end)
-local report_resolvers = logs.new("resolvers")
+local report_lua = logs.new("resolvers","lua")
local allocate, mark = utilities.storage.allocate, utilities.storage.mark
@@ -254,14 +254,14 @@ function environment.luafilechunk(filename,silent) -- used for loading lua bytec
if fullname and fullname ~= "" then
local data = environment.loadedluacode(fullname)
if trace_locating then
- report_resolvers("loading file %s%s", fullname, not data and " failed" or "")
+ report_lua("loading file %s%s", fullname, not data and " failed" or "")
elseif not silent then
texio.write("<",data and "+ " or "- ",fullname,">")
end
return data
else
if trace_locating then
- report_resolvers("unknown file %s", filename)
+ report_lua("unknown file %s", filename)
end
return nil
end
@@ -281,7 +281,7 @@ function environment.loadluafile(filename, version)
local fullname = (lucname and environment.luafile(lucname)) or ""
if fullname ~= "" then
if trace_locating then
- report_resolvers("loading %s", fullname)
+ report_lua("loading %s", fullname)
end
chunk = loadfile(fullname) -- this way we don't need a file exists check
end
@@ -299,7 +299,7 @@ function environment.loadluafile(filename, version)
return true
else
if trace_locating then
- report_resolvers("version mismatch for %s: lua=%s, luc=%s", filename, v, version)
+ report_lua("version mismatch for %s: lua=%s, luc=%s", filename, v, version)
end
environment.loadluafile(filename)
end
@@ -310,12 +310,12 @@ function environment.loadluafile(filename, version)
fullname = (luaname and environment.luafile(luaname)) or ""
if fullname ~= "" then
if trace_locating then
- report_resolvers("loading %s", fullname)
+ report_lua("loading %s", fullname)
end
chunk = loadfile(fullname) -- this way we don't need a file exists check
if not chunk then
if trace_locating then
- report_resolvers("unknown file %s", filename)
+ report_lua("unknown file %s", filename)
end
else
assert(chunk)()
diff --git a/tex/context/base/luat-exe.lua b/tex/context/base/luat-exe.lua
index 76c5021b1..f0841f3d0 100644
--- a/tex/context/base/luat-exe.lua
+++ b/tex/context/base/luat-exe.lua
@@ -11,7 +11,7 @@ if not modules then modules = { } end modules ['luat-exe'] = {
local match, find, gmatch = string.match, string.find, string.gmatch
local concat = table.concat
-local report_executers = logs.new("executers")
+local report_executers = logs.new("system","executers")
resolvers.executers = resolvers.executers or { }
local executers = resolvers.executers
diff --git a/tex/context/base/luat-fmt.lua b/tex/context/base/luat-fmt.lua
index 04f3143dd..d6dd4efad 100644
--- a/tex/context/base/luat-fmt.lua
+++ b/tex/context/base/luat-fmt.lua
@@ -9,6 +9,8 @@ if not modules then modules = { } end modules ['luat-fmt'] = {
local format = string.format
+local report_format = logs.new("resolvers","formats")
+
-- helper for mtxrun
local quoted = string.quoted
@@ -33,7 +35,7 @@ function environment.make_format(name)
if path ~= "" then
lfs.chdir(path)
end
- logs.simple("format path: %s",lfs.currentdir())
+ report_format("format path: %s",lfs.currentdir())
-- check source file
local texsourcename = file.addsuffix(name,"mkiv")
local fulltexsourcename = resolvers.findfile(texsourcename,"tex") or ""
@@ -42,11 +44,11 @@ function environment.make_format(name)
fulltexsourcename = resolvers.findfile(texsourcename,"tex") or ""
end
if fulltexsourcename == "" then
- logs.simple("no tex source file with name: %s (mkiv or tex)",name)
+ report_format("no tex source file with name: %s (mkiv or tex)",name)
lfs.chdir(olddir)
return
else
- logs.simple("using tex source file: %s",fulltexsourcename)
+ report_format("using tex source file: %s",fulltexsourcename)
end
local texsourcepath = dir.expandname(file.dirname(fulltexsourcename)) -- really needed
-- check specification
@@ -57,7 +59,7 @@ function environment.make_format(name)
fullspecificationname = resolvers.findfile(specificationname,"tex") or ""
end
if fullspecificationname == "" then
- logs.simple("unknown stub specification: %s",specificationname)
+ report_format("unknown stub specification: %s",specificationname)
lfs.chdir(olddir)
return
end
@@ -68,39 +70,39 @@ function environment.make_format(name)
if type(usedlualibs) == "string" then
usedluastub = file.join(file.dirname(fullspecificationname),usedlualibs)
elseif type(usedlualibs) == "table" then
- logs.simple("using stub specification: %s",fullspecificationname)
+ report_format("using stub specification: %s",fullspecificationname)
local texbasename = file.basename(name)
local luastubname = file.addsuffix(texbasename,"lua")
local lucstubname = file.addsuffix(texbasename,"luc")
-- pack libraries in stub
- logs.simple("creating initialization file: %s",luastubname)
+ report_format("creating initialization file: %s",luastubname)
utilities.merger.selfcreate(usedlualibs,specificationpath,luastubname)
-- compile stub file (does not save that much as we don't use this stub at startup any more)
local strip = resolvers.booleanvariable("LUACSTRIP", true)
if utilities.lua.compile(luastubname,lucstubname) and lfs.isfile(lucstubname) then
- logs.simple("using compiled initialization file: %s",lucstubname)
+ report_format("using compiled initialization file: %s",lucstubname)
usedluastub = lucstubname
else
- logs.simple("using uncompiled initialization file: %s",luastubname)
+ report_format("using uncompiled initialization file: %s",luastubname)
usedluastub = luastubname
end
else
- logs.simple("invalid stub specification: %s",fullspecificationname)
+ report_format("invalid stub specification: %s",fullspecificationname)
lfs.chdir(olddir)
return
end
-- generate format
local command = format("luatex --ini %s --lua=%s %s %sdump",primaryflags(),quoted(usedluastub),quoted(fulltexsourcename),os.platform == "unix" and "\\\\" or "\\")
- logs.simple("running command: %s\n",command)
+ report_format("running command: %s\n",command)
os.spawn(command)
-- remove related mem files
local pattern = file.removesuffix(file.basename(usedluastub)).."-*.mem"
- -- logs.simple("removing related mplib format with pattern '%s'", pattern)
+ -- report_format("removing related mplib format with pattern '%s'", pattern)
local mp = dir.glob(pattern)
if mp then
for i=1,#mp do
local name = mp[i]
- logs.simple("removing related mplib format %s", file.basename(name))
+ report_format("removing related mplib format %s", file.basename(name))
os.remove(name)
end
end
@@ -117,7 +119,7 @@ function environment.run_format(name,data,more)
end
fmtname = resolvers.cleanpath(fmtname)
if fmtname == "" then
- logs.simple("no format with name: %s",name)
+ report_format("no format with name: %s",name)
else
local barename = file.removesuffix(name) -- expanded name
local luaname = file.addsuffix(barename,"luc")
@@ -125,11 +127,11 @@ function environment.run_format(name,data,more)
luaname = file.addsuffix(barename,"lua")
end
if not lfs.isfile(luaname) then
- logs.simple("using format name: %s",fmtname)
- logs.simple("no luc/lua with name: %s",barename)
+ report_format("using format name: %s",fmtname)
+ report_format("no luc/lua with name: %s",barename)
else
local command = format("luatex %s --fmt=%s --lua=%s %s %s",primaryflags(),quoted(barename),quoted(luaname),quoted(data),more ~= "" and quoted(more) or "")
- logs.simple("running command: %s",command)
+ report_format("running command: %s",command)
os.spawn(command)
end
end
diff --git a/tex/context/base/luat-mac.lua b/tex/context/base/luat-mac.lua
index 8010f34a5..ef34afc89 100644
--- a/tex/context/base/luat-mac.lua
+++ b/tex/context/base/luat-mac.lua
@@ -13,7 +13,7 @@ local insert, remove = table.insert, table.remove
local rep, sub = string.rep, string.sub
local setmetatable = setmetatable
-local report_macros = logs.new("macros")
+local report_macros = logs.new("interface","macros")
local stack, top, n, hashes = { }, nil, 0, { }
diff --git a/tex/context/base/luat-run.lua b/tex/context/base/luat-run.lua
index 5bccfee7e..172357798 100644
--- a/tex/context/base/luat-run.lua
+++ b/tex/context/base/luat-run.lua
@@ -12,8 +12,8 @@ local insert = table.insert
local trace_lua_dump = false trackers.register("system.dump", function(v) trace_lua_dump = v end)
local trace_temp_files = false trackers.register("system.tempfiles", function(v) trace_temp_files = v end)
-local report_lua_dump = logs.new("lua dump actions")
-local report_temp_files = logs.new("temporary files")
+local report_lua = logs.new("system","lua")
+local report_tempfiles = logs.new("resolvers","tempfiles")
luatex = luatex or { }
local luatex = luatex
@@ -68,7 +68,7 @@ local function report_output_log()
end
local function pre_dump_actions()
- lua.finalize(trace_lua_dump and report_lua_dump or nil)
+ lua.finalize(trace_lua_dump and report_lua or nil)
statistics.reportstorage("log")
-- statistics.savefmtstatus("\jobname","\contextversion","context.tex")
end
@@ -96,7 +96,7 @@ local tempfiles = { }
function luatex.registertempfile(name)
name = name .. ".mkiv-tmp" -- maybe just .tmp
if trace_temp_files and not tempfiles[name] then
- report_temp_files("registering: %s",name)
+ report_tempfiles("registering temporary file: %s",name)
end
tempfiles[name] = true
return name
@@ -105,7 +105,7 @@ end
function luatex.cleanuptempfiles()
for name, _ in next, tempfiles do
if trace_temp_files then
- report_temp_files("removing: %s",name)
+ report_tempfiles("removing temporary file: %s",name)
end
os.remove(name)
end
@@ -139,6 +139,6 @@ end)
statistics.register("synctex tracing",function()
if synctex or tex.synctex > 0 then
- return "syntex has been enabled (extra log file generated)"
+ return "synctex has been enabled (extra log file generated)"
end
end)
diff --git a/tex/context/base/luat-sto.lua b/tex/context/base/luat-sto.lua
index 2ead0253d..de08af8ce 100644
--- a/tex/context/base/luat-sto.lua
+++ b/tex/context/base/luat-sto.lua
@@ -8,8 +8,10 @@ if not modules then modules = { } end modules ['luat-sto'] = {
local type, next, setmetatable, getmetatable = type, next, setmetatable, getmetatable
local gmatch, format, write_nl = string.gmatch, string.format, texio.write_nl
+local serialize, concat = table.serialize, table.concat
+local bytecode = lua.bytecode
-local report_storage = logs.new("storage")
+local report_storage = logs.new("system","storage")
storage = storage or { }
local storage = storage
@@ -42,64 +44,30 @@ function storage.register(...)
return t
end
--- evaluators .. messy .. to be redone
-
-function storage.evaluate(name)
- evaluators[#evaluators+1] = name
-end
-
-local function finalize() -- we can prepend the string with "evaluate:"
- for i=1,#evaluators do
- local t = evaluators[i]
- for i, v in next, t do
- local tv = type(v)
- if tv == "string" then
- t[i] = loadstring(v)()
- elseif tv == "table" then
- for _, vv in next, v do
- if type(vv) == "string" then
- t[i] = loadstring(vv)()
- end
- end
- elseif tv == "function" then
- t[i] = v()
- end
- end
- end
-end
-
-lua.registerfinalizer(finalize,"evaluate storage")
-
local function dump()
+ local max = storage.max
for i=1,#data do
local d = data[i]
- local message, original, target, evaluate = d[1], d[2] ,d[3] ,d[4]
- local name, initialize, finalize, code = nil, "", "", ""
+ local message, original, target = d[1], d[2] ,d[3]
+ local c, code, name = 0, { }, nil
for str in gmatch(target,"([^%.]+)") do
if name then
name = name .. "." .. str
else
name = str
end
- initialize = format("%s %s = %s or {} ", initialize, name, name)
- end
- if evaluate then
- finalize = "storage.evaluate(" .. name .. ")"
+ c = c + 1 ; code[c] = format("%s = %s or { }",name,name)
end
- storage.max = storage.max + 1
+ max = max + 1
if trace_storage then
- report_storage('saving %s in slot %s',message,storage.max)
- code =
- initialize ..
- format("report_storage('restoring %s from slot %s') ",message,storage.max) ..
- table.serialize(original,name) ..
- finalize
- else
- code = initialize .. table.serialize(original,name) .. finalize
+ report_storage('saving %s in slot %s',message,max)
+ c = c + 1 ; code[c] = format("report_storage('restoring %s from slot %s')",message,max)
end
- lua.bytecode[storage.max] = loadstring(code)
+ c = c + 1 ; code[c] = serialize(original,name)
+ bytecode[max] = loadstring(concat(code,"\n"))
collectgarbage("step")
end
+ storage.max = max
end
lua.registerfinalizer(dump,"dump storage")
diff --git a/tex/context/base/lxml-dir.lua b/tex/context/base/lxml-dir.lua
index ecf7e3eb7..80e9577b9 100644
--- a/tex/context/base/lxml-dir.lua
+++ b/tex/context/base/lxml-dir.lua
@@ -30,6 +30,8 @@ local lxml = lxml
lxml.directives = lxml.directives or { }
local directives = lxml.directives
+local report_lxml = logs.new("xml","tex")
+
local data = {
setup = { },
before = { },
@@ -58,9 +60,9 @@ local function load_setup(filename)
valid = valid + 1
end
end
- commands.writestatus("lxml","%s directives found in '%s', %s valid",#collection,filename,valid)
+ report_lxml("%s directives found in '%s', %s valid",#collection,filename,valid)
else
- commands.writestatus("lxml","no directives found in '%s'",filename)
+ report_lxml("no directives found in '%s'",filename)
end
end
diff --git a/tex/context/base/lxml-lpt.lua b/tex/context/base/lxml-lpt.lua
index 357535d41..91f97b4a2 100644
--- a/tex/context/base/lxml-lpt.lua
+++ b/tex/context/base/lxml-lpt.lua
@@ -43,7 +43,7 @@ local trace_lpath = false if trackers then trackers.register("xml.path",
local trace_lparse = false if trackers then trackers.register("xml.parse", function(v) trace_lparse = v end) end
local trace_lprofile = false if trackers then trackers.register("xml.profile", function(v) trace_lpath = v trace_lparse = v trace_lprofile = v end) end
-local report_lpath = logs.new("lpath")
+local report_lpath = logs.new("xml","lpath")
--[[ldx--
<p>We've now arrived at an interesting part: accessing the tree using a subset
@@ -962,9 +962,9 @@ local function traced_apply(list,parsed,nofparsed,order)
if trace_lparse then
lshow(parsed)
end
- report_lpath("collecting : %s",parsed.pattern)
- report_lpath(" root tags : %s",tagstostring(list))
- report_lpath(" order : %s",order or "unset")
+ report_lpath("collecting: %s",parsed.pattern)
+ report_lpath("root tags : %s",tagstostring(list))
+ report_lpath("order : %s",order or "unset")
local collected = list
for i=1,nofparsed do
local pi = parsed[i]
diff --git a/tex/context/base/lxml-tab.lua b/tex/context/base/lxml-tab.lua
index 19bc14464..422fb14bf 100644
--- a/tex/context/base/lxml-tab.lua
+++ b/tex/context/base/lxml-tab.lua
@@ -12,7 +12,7 @@ if not modules then modules = { } end modules ['lxml-tab'] = {
local trace_entities = false trackers.register("xml.entities", function(v) trace_entities = v end)
-local report_xml = logs.new("xml")
+local report_xml = logs and logs.new("xml","core") or function(...) print(format(...)) end
--[[ldx--
<p>The parser used here is inspired by the variant discussed in the lua book, but
@@ -687,7 +687,7 @@ function xml.is_valid(root)
return root and not root.error
end
-xml.errorhandler = (logs and logs.report) or (input and logs.report) or print
+xml.errorhandler = report
--[[ldx--
<p>We cannot load an <l n='lpeg'/> from a filehandle so we need to load
diff --git a/tex/context/base/lxml-tex.lua b/tex/context/base/lxml-tex.lua
index 213ed8a92..a3adaf20a 100644
--- a/tex/context/base/lxml-tex.lua
+++ b/tex/context/base/lxml-tex.lua
@@ -40,7 +40,7 @@ local trace_loading = false trackers.register("lxml.loading", function(v) tra
local trace_access = false trackers.register("lxml.access", function(v) trace_access = v end)
local trace_comments = false trackers.register("lxml.comments", function(v) trace_comments = v end)
-local report_lxml = logs.new("lxml")
+local report_lxml = logs.new("xml","tex")
lxml.loaded = lxml.loaded or { }
local loaded = lxml.loaded
@@ -356,7 +356,7 @@ end
function lxml.load(id,filename,compress,entities)
filename = commands.preparedfile(filename)
if trace_loading then
- commands.writestatus("lxml","loading file '%s' as '%s'",filename,id)
+ report_lxml("loading file '%s' as '%s'",filename,id)
end
noffiles, nofconverted = noffiles + 1, nofconverted + 1
-- local xmltable = xml.load(filename)
@@ -386,7 +386,7 @@ function lxml.include(id,pattern,attribute,recurse)
end
end
if trace_loading then
- commands.writestatus("lxml","including file: %s",filename)
+ report_lxml("including file: %s",filename)
end
noffiles, nofconverted = noffiles + 1, nofconverted + 1
return resolvers.loadtexfile(filename) or ""
@@ -688,22 +688,22 @@ function lxml.installsetup(what,document,setup,where)
end
if what == 1 then
if trace_loading then
- commands.writestatus("lxml","prepending setup %s for %s",setup,document)
+ report_lxml("prepending setup %s for %s",setup,document)
end
insert(sd,1,setup)
elseif what == 2 then
if trace_loading then
- commands.writestatus("lxml","appending setup %s for %s",setup,document)
+ report_lxml("appending setup %s for %s",setup,document)
end
insert(sd,setup)
elseif what == 3 then
if trace_loading then
- commands.writestatus("lxml","inserting setup %s for %s before %s",setup,document,where)
+ report_lxml("inserting setup %s for %s before %s",setup,document,where)
end
insertbeforevalue(sd,setup,where)
elseif what == 4 then
if trace_loading then
- commands.writestatus("lxml","inserting setup %s for %s after %s",setup,document,where)
+ report_lxml("inserting setup %s for %s after %s",setup,document,where)
end
insertaftervalue(sd,setup,where)
end
@@ -719,21 +719,21 @@ function lxml.flushsetups(id,...)
local v= sd[k]
if not done[v] then
if trace_loading then
- commands.writestatus("lxml","applying setup %02i = %s to %s",k,v,document)
+ report_lxml("applying setup %02i = %s to %s",k,v,document)
end
texsprint(ctxcatcodes,"\\xmlsetup{",id,"}{",v,"}")
done[v] = true
end
end
elseif trace_loading then
- commands.writestatus("lxml","no setups for %s",document)
+ report_lxml("no setups for %s",document)
end
end
end
function lxml.resetsetups(document)
if trace_loading then
- commands.writestatus("lxml","resetting all setups for %s",document)
+ report_lxml("resetting all setups for %s",document)
end
setups[document] = { }
end
@@ -744,7 +744,7 @@ function lxml.removesetup(document,setup)
for i=1,#s do
if s[i] == setup then
if trace_loading then
- commands.writestatus("lxml","removing setup %s for %s",setup,document)
+ report_lxml("removing setup %s for %s",setup,document)
end
remove(t,i)
break
diff --git a/tex/context/base/m-chart.mkiv b/tex/context/base/m-chart.mkiv
index e55b8aae7..6b947b23f 100644
--- a/tex/context/base/m-chart.mkiv
+++ b/tex/context/base/m-chart.mkiv
@@ -2552,6 +2552,6 @@
% \def\processFLOWbuffer#1{\getvalue{\FLOWbufferprefix#1}}
% \def\typeFLOWbuffer #1{[Sorry, no verbatim chart #1 available.]}
-\writestatus\m!systems{The chart mkiv xml interface is not yet defined!}
+\writestatus\m!system{The chart mkiv xml interface is not yet defined!}
\protect \endinput
diff --git a/tex/context/base/m-logcategories.mkiv b/tex/context/base/m-logcategories.mkiv
new file mode 100644
index 000000000..954cd58c4
--- /dev/null
+++ b/tex/context/base/m-logcategories.mkiv
@@ -0,0 +1,3 @@
+\starttext
+ \showlogcategories
+\stoptext
diff --git a/tex/context/base/m-mkii.mkiv b/tex/context/base/m-mkii.mkiv
index cb0da6fcb..dcfd29d20 100644
--- a/tex/context/base/m-mkii.mkiv
+++ b/tex/context/base/m-mkii.mkiv
@@ -2,7 +2,7 @@
\unprotect
-\writestatus\m!systems{loading some mkii compatibility hacks}
+\writestatus\m!system{loading some mkii compatibility hacks}
% Compatibility for font-ini
diff --git a/tex/context/base/math-ini.lua b/tex/context/base/math-ini.lua
index acaf03b5f..693709c63 100644
--- a/tex/context/base/math-ini.lua
+++ b/tex/context/base/math-ini.lua
@@ -18,7 +18,7 @@ local allocate = utilities.storage.allocate
local trace_defining = false trackers.register("math.defining", function(v) trace_defining = v end)
-local report_math = logs.new("mathematics")
+local report_math = logs.new("mathematics","initializing")
mathematics = mathematics or { }
local mathematics = mathematics
diff --git a/tex/context/base/math-map.lua b/tex/context/base/math-map.lua
index 47c6c88e2..2b3a5e478 100644
--- a/tex/context/base/math-map.lua
+++ b/tex/context/base/math-map.lua
@@ -28,7 +28,7 @@ local texattribute = tex.attribute
local trace_greek = false trackers.register("math.greek", function(v) trace_greek = v end)
-local report_math = logs.new("mathematics")
+local report_remapping = logs.new("mathematics","remapping")
mathematics = mathematics or { }
local mathematics = mathematics
@@ -406,7 +406,7 @@ function mathematics.remapalphabets(char,mathalphabet,mathgreek)
local alphabet = r and r.alphabet or "regular"
local style = r and r.style or "tf"
if trace_greek then
- report_math("before: char: %05X, alphabet: %s %s, lcgreek: %s, ucgreek: %s",char,alphabet,style,remapping[lc].what,remapping[uc].what)
+ report_remapping("before: char: %05X, alphabet: %s %s, lcgreek: %s, ucgreek: %s",char,alphabet,style,remapping[lc].what,remapping[uc].what)
end
local s = remapping[islc or isuc][style]
if s then
@@ -414,7 +414,7 @@ function mathematics.remapalphabets(char,mathalphabet,mathgreek)
mathalphabet, style = data and data.attribute or mathalphabet, s
end
if trace_greek then
- report_math("after : char: %05X, alphabet: %s %s, lcgreek: %s, ucgreek: %s",char,alphabet,style,remapping[lc].what,remapping[uc].what)
+ report_remapping("after : char: %05X, alphabet: %s %s, lcgreek: %s, ucgreek: %s",char,alphabet,style,remapping[lc].what,remapping[uc].what)
end
end
end
diff --git a/tex/context/base/math-noa.lua b/tex/context/base/math-noa.lua
index d8b45bb88..1a337c8c9 100644
--- a/tex/context/base/math-noa.lua
+++ b/tex/context/base/math-noa.lua
@@ -43,7 +43,8 @@ local trace_remapping = false trackers.register("math.remapping", function(v)
local trace_processing = false trackers.register("math.processing", function(v) trace_processing = v end)
local trace_analyzing = false trackers.register("math.analyzing", function(v) trace_analyzing = v end)
-local report_noads = logs.new("mathematics")
+local report_processing = logs.new("mathematics","processing")
+local report_remapping = logs.new("mathematics","remapping")
local nodecodes = nodes.nodecodes
local noadcodes = nodes.noadcodes
@@ -75,14 +76,14 @@ local function process(start,what,n,parent)
local margin = rep(" ",n or 0)
local detail = tostring(start)
if id == math_noad then
- report_noads("%s%s (class: %s)",margin,detail,noadcodes[start.subtype] or "?")
+ report_processing("%s%s (class: %s)",margin,detail,noadcodes[start.subtype] or "?")
elseif id == math_char then
local char = start.char
local fam = start.fam
local font = font_of_family(fam)
- report_noads("%s%s (family: %s, font: %s, char: %s, shape: %s)",margin,detail,fam,font,char,utfchar(char))
+ report_processing("%s%s (family: %s, font: %s, char: %s, shape: %s)",margin,detail,fam,font,char,utfchar(char))
else
- report_noads("%s%s",margin,detail)
+ report_processing("%s%s",margin,detail)
end
end
local proc = what[id]
@@ -142,7 +143,7 @@ local mathgreek = attributes.private("mathgreek")
processors.relocate = { }
local function report_remap(tag,id,old,new,extra)
- report_noads("remapping %s in font %s from U+%04X (%s) to U+%04X (%s)%s",tag,id,old,utfchar(old),new,utfchar(new),extra or "")
+ report_remapping("remapping %s in font %s from U+%04X (%s) to U+%04X (%s)%s",tag,id,old,utfchar(old),new,utfchar(new),extra or "")
end
local remapalphabets = mathematics.remapalphabets
diff --git a/tex/context/base/math-vfu.lua b/tex/context/base/math-vfu.lua
index d90044687..6a4e50898 100644
--- a/tex/context/base/math-vfu.lua
+++ b/tex/context/base/math-vfu.lua
@@ -16,7 +16,7 @@ local max = math.max
local trace_virtual = false trackers.register("math.virtual", function(v) trace_virtual = v end)
local trace_timings = false trackers.register("math.timings", function(v) trace_timings = v end)
-local report_virtual = logs.new("virtual math")
+local report_virtual = logs.new("fonts","virtual math")
local fonts, nodes, mathematics = fonts, nodes, mathematics
diff --git a/tex/context/base/meta-pdf.lua b/tex/context/base/meta-pdf.lua
index 929c2047e..47a398e2c 100644
--- a/tex/context/base/meta-pdf.lua
+++ b/tex/context/base/meta-pdf.lua
@@ -14,7 +14,7 @@ local concat, format, gsub, find, byte, gmatch, match = table.concat, string.for
local lpegmatch = lpeg.match
local round = math.round
-local report_mptopdf = logs.new("mptopdf")
+local report_mptopdf = logs.new("graphics","mptopdf")
local mplib, metapost, lpdf, context = mplib, metapost, lpdf, context
@@ -544,7 +544,7 @@ function mptopdf.convertmpstopdf(name)
resetall()
statistics.stoptiming(mptopdf)
else
- commands.writestatus("mptopdf","file '%s' not found",name)
+ report_mptopdf("file '%s' not found",name)
end
end
diff --git a/tex/context/base/mlib-ctx.lua b/tex/context/base/mlib-ctx.lua
index 5a557c046..3baf29c2d 100644
--- a/tex/context/base/mlib-ctx.lua
+++ b/tex/context/base/mlib-ctx.lua
@@ -11,7 +11,7 @@ if not modules then modules = { } end modules ['mlib-ctx'] = {
local format, concat = string.format, table.concat
local sprint = tex.sprint
-local report_mplib = logs.new("mplib")
+local report_metapost = logs.new("metapost")
local starttiming, stoptiming = statistics.starttiming, statistics.stoptiming
@@ -35,7 +35,7 @@ function metapost.getclippath(instance,mpsformat,data,initializations,preamble)
local result = mpx:execute(format("%s;beginfig(1);%s;%s;endfig;",preamble or "",initializations or "",data))
stoptiming(metapost.exectime)
if result.status > 0 then
- report_mplib("%s: %s", result.status, result.error or result.term or result.log)
+ report_metapost("%s: %s", result.status, result.error or result.term or result.log)
result = nil
else
result = metapost.filterclippath(result)
diff --git a/tex/context/base/mlib-pdf.lua b/tex/context/base/mlib-pdf.lua
index 80ab9b1d0..403dbf0bd 100644
--- a/tex/context/base/mlib-pdf.lua
+++ b/tex/context/base/mlib-pdf.lua
@@ -11,7 +11,7 @@ local abs, sqrt, round = math.abs, math.sqrt, math.round
local allocate = utilities.storage.allocate
-local report_mplib = logs.new("mplib")
+local report_metapost = logs.new("metapost")
local mplib, context = mplib, context
@@ -76,7 +76,7 @@ function metapost.flushliteral(d) -- \def\MPLIBtoPDF#1{\ctxlua{metapost.flush_li
literal.data = savedliterals[d]
write_node(literal)
else
- report_mplib("problem flushing literal %s",d)
+ report_metapost("problem flushing literal %s",d)
end
end
diff --git a/tex/context/base/mlib-pps.lua b/tex/context/base/mlib-pps.lua
index 396853d3e..f5f5b3472 100644
--- a/tex/context/base/mlib-pps.lua
+++ b/tex/context/base/mlib-pps.lua
@@ -25,7 +25,7 @@ local context = context
local trace_textexts = false trackers.register("metapost.textexts", function(v) trace_textexts = v end)
-local report_mplib = logs.new("mplib")
+local report_metapost = logs.new("metapost")
local colors = attributes.colors
@@ -125,11 +125,11 @@ function specials.register(str) -- only colors
if cc then
cc[n] = data
else
- report_mplib("problematic special: %s (no colordata class %s)", str or "?",class)
+ report_metapost("problematic special: %s (no colordata class %s)", str or "?",class)
end
else
-- there is some bug to be solved, so we issue a message
- report_mplib("problematic special: %s", str or "?")
+ report_metapost("problematic special: %s", str or "?")
end
end
--~ if match(str,"^%%%%MetaPostOption: multipass") then
@@ -393,7 +393,7 @@ local function freeboxes() -- todo: mp direct list ipv box
-- texbox[scratchbox] = tn
-- texbox[scratchbox] = nil -- this frees too
if trace_textexts then
- report_mplib("freeing textext %s",n)
+ report_metapost("freeing textext %s",n)
end
end
end
@@ -413,7 +413,7 @@ end
function metapost.gettext(box,slot)
texbox[box] = copy_list(textexts[slot])
if trace_textexts then
- report_mplib("putting textext %s in box %s",slot,box)
+ report_metapost("putting textext %s in box %s",slot,box)
end
-- textexts[slot] = nil -- no, pictures can be placed several times
end
@@ -423,7 +423,7 @@ function specials.tf(specification,object)
if n and str then
n = tonumber(n)
if trace_textexts then
- report_mplib("setting textext %s (first pass)",n)
+ report_metapost("setting textext %s (first pass)",n)
end
context.MPLIBsettext(n,str)
metapost.multipass = true
@@ -449,7 +449,7 @@ function specials.ts(specification,object,result,flusher)
if n and str then
n = tonumber(n)
if trace_textexts then
- report_mplib("processing textext %s (second pass)",n)
+ report_metapost("processing textext %s (second pass)",n)
end
local op = object.path
local first, second, fourth = op[1], op[2], op[4]
@@ -647,7 +647,7 @@ end
local texmess = (dquote/ditto + (1 - etex))^0
local function ignore(s)
- report_mplib("ignoring verbatim tex: %s",s)
+ report_metapost("ignoring verbatim tex: %s",s)
return ""
end
@@ -688,7 +688,7 @@ function metapost.texttextsdata()
if box then
local wd, ht, dp = box.width/factor, box.height/factor, box.depth/factor
if trace_textexts then
- report_mplib("passed textext data %s: (%0.4f,%0.4f,%0.4f)",n,wd,ht,dp)
+ report_metapost("passed textext data %s: (%0.4f,%0.4f,%0.4f)",n,wd,ht,dp)
end
nt = nt + 1
t[nt] = format(text_data_template,n,wd,n,ht,n,dp)
diff --git a/tex/context/base/mlib-run.lua b/tex/context/base/mlib-run.lua
index 3d87c817e..361298ed5 100644
--- a/tex/context/base/mlib-run.lua
+++ b/tex/context/base/mlib-run.lua
@@ -31,7 +31,7 @@ nears zero.</p>
local trace_graphics = false trackers.register("metapost.graphics", function(v) trace_graphics = v end)
-local report_mplib = logs.new("mplib")
+local report_metapost = logs.new("metapost")
local texerrormessage = logs.texerrormessage
@@ -88,20 +88,20 @@ metapost.finder = finder
function metapost.reporterror(result)
if not result then
- report_mplib("mp error: no result object returned")
+ report_metapost("error: no result object returned")
elseif result.status > 0 then
local t, e, l = result.term, result.error, result.log
if t and t ~= "" then
- (metapost.texerrors and texerrormessage or report_mplib)("mp terminal: %s",t)
+ (metapost.texerrors and texerrormessage or report_metapost)("terminal: %s",t)
end
if e then
- (metapost.texerrors and texerrormessage or report_mplib)("mp error: %s",(e=="" and "?") or e)
+ (metapost.texerrors and texerrormessage or report_metapost)("error: %s",(e=="" and "?") or e)
end
if not t and not e and l then
metapost.lastlog = metapost.lastlog .. "\n" .. l
- report_mplib("mp log: %s",l)
+ report_metapost("log: %s",l)
else
- report_mplib("mp error: unknown, no error, terminal or log messages")
+ report_metapost("error: unknown, no error, terminal or log messages")
end
else
return false
@@ -174,7 +174,7 @@ if mplibone then
mpsformat = file.addsuffix(mpsformat, "mem")
local mpsformatfullname = caches.getfirstreadablefile(mpsformat,"formats") or ""
if mpsformatfullname ~= "" then
- commands.writestatus("mplib","loading '%s' from '%s'", mpsinput, mpsformatfullname)
+ report_metapost("loading '%s' from '%s'", mpsinput, mpsformatfullname)
local mpx, result = metapost.load(mpsformatfullname)
if mpx then
local result = mpx:execute("show mp_parent_version ;")
@@ -184,24 +184,24 @@ if mplibone then
local version = match(result.log,">> *(.-)[\n\r]") or "unknown"
version = gsub(version,"[\'\"]","")
if version ~= mpsversion then
- commands.writestatus("mplib","version mismatch: %s <> %s", version or "unknown", mpsversion)
+ report_metapost("version mismatch: %s <> %s", version or "unknown", mpsversion)
else
return mpx
end
end
else
- commands.writestatus("mplib","error in loading '%s' from '%s'", mpsinput, mpsformatfullname)
+ report_metapost("error in loading '%s' from '%s'", mpsinput, mpsformatfullname)
metapost.reporterror(result)
end
end
local mpsformatfullname = caches.setfirstwritablefile(mpsformat,"formats")
- commands.writestatus("mplib","making '%s' into '%s'", mpsinput, mpsformatfullname)
+ report_metapost("making '%s' into '%s'", mpsinput, mpsformatfullname)
metapost.make(mpsinput,mpsformatfullname,mpsversion) -- somehow return ... fails here
if lfs.isfile(mpsformatfullname) then
- commands.writestatus("mplib","loading '%s' from '%s'", mpsinput, mpsformatfullname)
+ report_metapost("loading '%s' from '%s'", mpsinput, mpsformatfullname)
return metapost.load(mpsformatfullname)
else
- commands.writestatus("mplib","problems with '%s' from '%s'", mpsinput, mpsformatfullname)
+ report_metapost("problems with '%s' from '%s'", mpsinput, mpsformatfullname)
end
end
@@ -233,12 +233,12 @@ else
function metapost.checkformat(mpsinput)
local mpsversion = environment.version or "unset version"
local mpsinput = file.addsuffix(mpsinput or "metafun", "mp")
- commands.writestatus("mplib","loading '%s' (experimental metapost version two)",mpsinput)
+ report_metapost("loading '%s' (experimental metapost version two)",mpsinput)
local mpx, result = metapost.load(mpsinput)
if mpx then
return mpx
else
- commands.writestatus("mplib","error in loading '%s'",mpsinput)
+ report_metapost("error in loading '%s'",mpsinput)
metapost.reporterror(result)
end
end
@@ -259,7 +259,7 @@ function metapost.format(instance,name)
name = name or instance
local mpx = mpxformats[instance]
if not mpx then
- commands.writestatus("mplib","initializing instance '%s' using format '%s'",instance,name)
+ report_metapost("initializing instance '%s' using format '%s'",instance,name)
mpx = metapost.checkformat(name)
mpxformats[instance] = mpx
end
@@ -325,7 +325,7 @@ function metapost.process(mpx, data, trialrun, flusher, multipass, isextrapass,
local str = (result.term ~= "" and result.term) or "no terminal output"
if not string.is_empty(str) then
metapost.lastlog = metapost.lastlog .. "\n" .. str
- report_mplib("mp log: %s",str)
+ report_metapost("log: %s",str)
end
end
if result.fig then
@@ -333,7 +333,7 @@ function metapost.process(mpx, data, trialrun, flusher, multipass, isextrapass,
end
end
else
- report_mplib("mp error: invalid graphic component %s",i)
+ report_metapost("error: invalid graphic component %s",i)
end
end
else
@@ -351,13 +351,13 @@ function metapost.process(mpx, data, trialrun, flusher, multipass, isextrapass,
end
-- todo: error message
if not result then
- report_mplib("mp error: no result object returned")
+ report_metapost("error: no result object returned")
elseif result.status > 0 then
- report_mplib("mp error: %s",(result.term or "no-term") .. "\n" .. (result.error or "no-error"))
+ report_metapost("error: %s",(result.term or "no-term") .. "\n" .. (result.error or "no-error"))
else
if metapost.showlog then
metapost.lastlog = metapost.lastlog .. "\n" .. result.term
- report_mplib("mp info: %s",result.term or "no-term")
+ report_metapost("info: %s",result.term or "no-term")
end
if result.fig then
converted = metapost.convert(result, trialrun, flusher, multipass, askedfig)
@@ -375,7 +375,7 @@ function metapost.process(mpx, data, trialrun, flusher, multipass, isextrapass,
end
function metapost.convert()
- report_mplib('mp warning: no converter set')
+ report_metapost('warning: no converter set')
end
-- handy
@@ -387,29 +387,29 @@ function metapost.directrun(formatname,filename,outputformat,astable,mpdata)
outputformat = "mps"
end
if not data then
- logs.simple("unknown file '%s'",filename or "?")
+ report_metapost("unknown file '%s'",filename or "?")
else
local mpx = metapost.checkformat(formatname)
if not mpx then
- logs.simple("unknown format '%s'",formatname or "?")
+ report_metapost("unknown format '%s'",formatname or "?")
else
- logs.simple("processing '%s'",(mpdata and (filename or "data")) or fullname)
+ report_metapost("processing '%s'",(mpdata and (filename or "data")) or fullname)
local result = mpx:execute(data)
if not result then
- logs.simple("error: no result object returned")
+ report_metapost("error: no result object returned")
elseif result.status > 0 then
- logs.simple("error: %s",(result.term or "no-term") .. "\n" .. (result.error or "no-error"))
+ report_metapost("error: %s",(result.term or "no-term") .. "\n" .. (result.error or "no-error"))
else
if metapost.showlog then
metapost.lastlog = metapost.lastlog .. "\n" .. result.term
- logs.simple("info: %s",result.term or "no-term")
+ report_metapost("info: %s",result.term or "no-term")
end
local figures = result.fig
if figures then
local sorted = table.sortedkeys(figures)
if astable then
local result = { }
- logs.simple("storing %s figures in table",#sorted)
+ report_metapost("storing %s figures in table",#sorted)
for k=1,#sorted do
local v = sorted[k]
if outputformat == "mps" then
@@ -430,7 +430,7 @@ function metapost.directrun(formatname,filename,outputformat,astable,mpdata)
output = figures[v]:svg() -- (3) for prologues
end
local outname = format("%s-%s.%s",basename,v,outputformat)
- logs.simple("saving %s bytes in '%s'",#output,outname)
+ report_metapost("saving %s bytes in '%s'",#output,outname)
io.savedata(outname,output)
end
return #sorted
diff --git a/tex/context/base/mult-aux.lua b/tex/context/base/mult-aux.lua
index 349250071..4130aa12c 100644
--- a/tex/context/base/mult-aux.lua
+++ b/tex/context/base/mult-aux.lua
@@ -14,7 +14,7 @@ local variables = interfaces.variables
local trace_namespaces = false trackers.register("interfaces.namespaces", function(v) trace_namespaces = v end)
-local report_namespaces = logs.new("namespaces")
+local report_namespaces = logs.new("interface","namespaces")
local v_yes, v_list = variables.yes, variables.list
diff --git a/tex/context/base/mult-chk.lua b/tex/context/base/mult-chk.lua
index 2d20aa16b..9344a7b8a 100644
--- a/tex/context/base/mult-chk.lua
+++ b/tex/context/base/mult-chk.lua
@@ -14,6 +14,8 @@ local make_settings_to_hash_pattern, settings_to_set = utilities.parsers.make_se
local allocate = utilities.storage.allocate
+local report_interface = logs.new("interface","checking")
+
interfaces = interfaces or { }
interfaces.syntax = allocate {
@@ -21,7 +23,7 @@ interfaces.syntax = allocate {
}
function interfaces.invalidkey(kind,key)
- commands.writestatus("syntax","invalid key '%s' for '%s' in line %s",key,kind,tex.inputlineno)
+ report_interface("invalid key '%s' for '%s' in line %s",key,kind,tex.inputlineno)
end
function interfaces.setvalidkeys(kind,list)
diff --git a/tex/context/base/mult-ini.lua b/tex/context/base/mult-ini.lua
index 14eeeb4c6..e1c8610a3 100644
--- a/tex/context/base/mult-ini.lua
+++ b/tex/context/base/mult-ini.lua
@@ -12,7 +12,7 @@ local serialize = table.serialize
local texsprint = tex.sprint
-local report_interfaces = logs.new("interfaces")
+local report_interface = logs.new("interface","initialization")
interfaces = interfaces or { }
interfaces.messages = interfaces.messages or { }
@@ -20,7 +20,7 @@ interfaces.constants = interfaces.constants or { }
interfaces.variables = interfaces.variables or { }
interfaces.elements = interfaces.elements or { }
-storage.register("interfaces/messages", interfaces.messages, "interfaces.messages" )
+storage.register("interfaces/messages", interfaces.messages, "interfaces.messages")
storage.register("interfaces/constants", interfaces.constants, "interfaces.constants")
storage.register("interfaces/variables", interfaces.variables, "interfaces.variables")
storage.register("interfaces/elements", interfaces.elements, "interfaces.elements")
@@ -38,9 +38,9 @@ local currentresponse = storage.shared.currentresponse
local complete = { } interfaces.complete = complete
setmetatable(complete, { __index = function(t,k)
- report_interfaces("loading interface definitions from 'mult-def.lua'")
+ report_interface("loading interface definitions from 'mult-def.lua'")
complete = dofile(resolvers.findfile("mult-def.lua"))
- report_interfaces("loading interface messages from 'mult-mes.lua'")
+ report_interface("loading interface messages from 'mult-mes.lua'")
complete.messages = dofile(resolvers.findfile("mult-mes.lua"))
interfaces.complete = complete
return complete[k]
@@ -50,6 +50,7 @@ local messages = interfaces.messages
local constants = interfaces.constants
local variables = interfaces.variables
local elements = interfaces.elements
+local reporters = { } -- just an optimization
local valueiskey = { __index = function(t,k) t[k] = k return k end }
@@ -57,8 +58,19 @@ setmetatable(variables,valueiskey)
setmetatable(constants,valueiskey)
setmetatable(elements, valueiskey)
+setmetatable(messages, { __index = function(t,k) local v = { } ; t[k] = v ; return v end })
+setmetatable(reporters, { __index = function(t,k) local v = logs.new(k) ; t[k] = v ; return v end })
+
+for category, m in next, messages do
+ -- We pre-create reporters for already defined messages
+ -- because otherwise listing is incomplete and we want
+ -- to use that for checking so delaying makes not much
+ -- sense there.
+ local r = reporters[m.title or category]
+end
+
function interfaces.setmessages(category,str)
- local m = messages[category] or { }
+ local m = messages[category]
for k, v in gmatch(str,"(%S+) *: *(.-) *[\n\r]") do
m[k] = gsub(v,"%-%-","%%s")
end
@@ -67,10 +79,6 @@ end
function interfaces.setmessage(category,tag,message)
local m = messages[category]
- if not m then
- m = { }
- messages[category] = m
- end
m[tag] = gsub(message,"%-%-","%%s")
end
@@ -86,7 +94,7 @@ end
local messagesplitter = lpeg.splitat(",")
-function interfaces.makemessage(category,tag,arguments)
+local function makemessage(category,tag,arguments)
local m = messages[category]
m = (m and (m[tag] or m[tostring(tag)])) or format("unknown message, category '%s', tag '%s'",category,tag)
if not m then
@@ -98,9 +106,13 @@ function interfaces.makemessage(category,tag,arguments)
end
end
+interfaces.makemessage = makemessage
+
function interfaces.showmessage(category,tag,arguments)
local m = messages[category]
- commands.writestatus((m and m.title) or "unknown title",interfaces.makemessage(category,tag,arguments))
+ local t = m and m.title or category
+ local r = reporters[t]
+ r(makemessage(category,tag,arguments))
end
function interfaces.setvariable(variable,given)
@@ -115,6 +127,13 @@ function interfaces.setelement(element,given)
elements[given] = element
end
+-- status
+
+function commands.showstatus(category,message)
+ local r = reporters[category]
+ r(message)
+end
+
-- initialization
function interfaces.setuserinterface(interface,response)
@@ -153,16 +172,16 @@ function interfaces.setuserinterface(interface,response)
nofcommands = nofcommands + 1
end
local nofmessages = 0
- local setmessage = interfaces.setmessage
for category, message in next, complete.messages do
+ local m = messages[category]
for tag, set in next, message do
- if tag ~= "files" then
- setmessage(category,tag,set[interface] or set.en)
+ if tag ~= "files" then
+ m[tag] = set[interface] or set.en -- there are no --'s any longer in the lua file
end
end
nofmessages = nofmessages + 1
end
- report_interfaces("definitions: %s constants, %s variables, %s elements, %s commands, %s message groups",
+ report_interface("definitions: %s constants, %s variables, %s elements, %s commands, %s message groups",
nofconstants,nofvariables,nofelements,nofcommands,nofmessages)
end
end
diff --git a/tex/context/base/mult-ini.mkiv b/tex/context/base/mult-ini.mkiv
index e0042d002..d210f7731 100644
--- a/tex/context/base/mult-ini.mkiv
+++ b/tex/context/base/mult-ini.mkiv
@@ -384,6 +384,12 @@
\unexpanded\def\getmessagedefault#1#2#3{\ctxsprint{interfaces.getmessage("#1","#2","#3")}}
\unexpanded\def\makemessage #1#2#3{\ctxsprint{interfaces.makemessage("#1","#2","#3")}}
+\unexpanded\def\writestatus #1#2{\ctxcommand{writestatus("#1",\!!bs#2\!!es)}}
+
+%unexpanded\def\disablemessages [#1]{\ctxlua{logs.disable(\!!bs#1\!!es)}} % we have a directive
+
+% todo: intercept message
+
%D \macros
%D {ifshowwarnings, ifshowmessages}
%D
@@ -790,7 +796,8 @@
%D macro's can be enhanced with more testing facilities, but
%D for the moment they suffice.
-%D Out of convenience we define the banners here.
+%D Out of convenience we define the banners here. This might move
+%D to the Lua end.
\def\contextbanner
{ConTeXt \space
diff --git a/tex/context/base/mult-mcs.mkii b/tex/context/base/mult-mcs.mkii
index 27fbd37dd..c733798e6 100644
--- a/tex/context/base/mult-mcs.mkii
+++ b/tex/context/base/mult-mcs.mkii
@@ -88,7 +88,7 @@
\setinterfacemessage{linguals}{9}{language -- is active}
\setinterfacemessage{linguals}{8}{specificke volby jazyka [--] bez mezer pripojeny}
\setinterfacemessage{linguals}{title}{jazyky}
-\setinterfacemessage{linguals}{10}{vzory --nacteny}
+\setinterfacemessage{linguals}{10}{vzory -- nacteny}
\setinterfacemessage{verbatims}{1}{soubor -- neexistuje}
\setinterfacemessage{verbatims}{title}{verbatim}
\setinterfacemessage{filters}{1}{filter -- is loaded}
diff --git a/tex/context/base/mult-mde.mkii b/tex/context/base/mult-mde.mkii
index 2819c1ed5..4d7f009e4 100644
--- a/tex/context/base/mult-mde.mkii
+++ b/tex/context/base/mult-mde.mkii
@@ -88,7 +88,7 @@
\setinterfacemessage{linguals}{9}{Sprache -- ist aktiv}
\setinterfacemessage{linguals}{8}{Sprachenspezifische Option [--] nahtlos hinzugefuegt}
\setinterfacemessage{linguals}{title}{Sprache}
-\setinterfacemessage{linguals}{10}{Trennmuster --geladen}
+\setinterfacemessage{linguals}{10}{Trennmuster -- geladen}
\setinterfacemessage{verbatims}{1}{Datei -- existiert nicht}
\setinterfacemessage{verbatims}{title}{verbatim}
\setinterfacemessage{filters}{1}{filter -- ist geladen}
diff --git a/tex/context/base/mult-men.mkii b/tex/context/base/mult-men.mkii
index c9c56bcc5..a8d429356 100644
--- a/tex/context/base/mult-men.mkii
+++ b/tex/context/base/mult-men.mkii
@@ -88,7 +88,7 @@
\setinterfacemessage{linguals}{9}{language -- is active}
\setinterfacemessage{linguals}{8}{language specific options [--] seamless appended}
\setinterfacemessage{linguals}{title}{language}
-\setinterfacemessage{linguals}{10}{patterns --loaded}
+\setinterfacemessage{linguals}{10}{patterns -- loaded}
\setinterfacemessage{verbatims}{1}{file -- does not exist}
\setinterfacemessage{verbatims}{title}{verbatim}
\setinterfacemessage{filters}{1}{filter -- is loaded}
diff --git a/tex/context/base/mult-mes.lua b/tex/context/base/mult-mes.lua
index 50c764785..152090c81 100644
--- a/tex/context/base/mult-mes.lua
+++ b/tex/context/base/mult-mes.lua
@@ -6,6 +6,13 @@ if not modules then modules = { } end modules ['mult-mes'] = {
license = "see context related readme files"
}
+-- This file is no longer shared with MkII so we can start cleaning
+-- it up.
+--
+-- floatsblocks -> floats
+-- bodyfont -> fonts
+-- verbatims -> buffers
+
return {
["publications"]={
["files"]={ "bibl-tra.mkiv" },
@@ -13,54 +20,54 @@ return {
["en"]="publications",
},
["1"]={
- ["en"]="file -- not found, unknown style ignored",
+ ["en"]="file %s not found, unknown style ignored",
},
["2"]={
- ["en"]="file -- not found, waiting for bibtex",
+ ["en"]="file %s not found, waiting for bibtex",
},
["3"]={
["en"]="wrote a new auxiliary file \\jobname.aux",
},
["4"]={
- ["en"]="loading database from --",
+ ["en"]="loading database from %s",
},
["5"]={
- ["en"]="warning: cite argument -- on line \\the\\inputlineno",
+ ["en"]="warning: cite argument %s on line \\the\\inputlineno",
},
["6"]={
- ["en"]="loading formatting style from --",
+ ["en"]="loading formatting style from %s",
},
},
["check"]={
["1"]={
- ["cs"]="postradam '=' po '--' na radku --",
- ["de"]="Fehlendes '=' nach '--' in Zeile --",
- ["en"]="missing or ungrouped '=' after '--' in line --",
- ["fr"]="manquant ou dégroupé '=' après '--' à la ligne --",
- ["it"]="'=' mancante o non raggruppato dopo '--' alla riga --",
- ["nl"]="'=' ontbreekt of zonder {} na '--' in regel --",
- ["no"]="manglende '=' etter '--' i linje --",
- ["ro"]="lipseste '=' dupa '--' in linia --",
+ ["cs"]="postradam '=' po '%s' na radku %s",
+ ["de"]="Fehlendes '=' nach '%s' in Zeile %s",
+ ["en"]="missing or ungrouped '=' after '%s' in line %s",
+ ["fr"]="manquant ou dégroupé '=' après '%s' à la ligne %s",
+ ["it"]="'=' mancante o non raggruppato dopo '%s' alla riga %s",
+ ["nl"]="'=' ontbreekt of zonder {} na '%s' in regel %s",
+ ["no"]="manglende '=' etter '%s' i linje %s",
+ ["ro"]="lipseste '=' dupa '%s' in linia %s",
},
["2"]={
- ["cs"]="ocekavam -- argument(y) na radku --",
- ["de"]="-- Argument(e) in Zeile -- erwartet",
- ["en"]="-- argument(s) expected in line --",
- ["fr"]="-- argument(s) attendu(s) à la ligne --",
- ["it"]="-- argomento/i attesi alla riga --",
- ["nl"]="-- argument(en) verwacht in regel --",
- ["no"]="-- argument forventet i linje --",
- ["ro"]="argumentul(ele) -- sunt asteptate in linia --",
+ ["cs"]="ocekavam %s argument(y) na radku %s",
+ ["de"]="%s Argument(e) in Zeile %s erwartet",
+ ["en"]="%s argument(s) expected in line %s",
+ ["fr"]="%s argument(s) attendu(s) à la ligne %s",
+ ["it"]="%s argomento/i attesi alla riga %s",
+ ["nl"]="%s argument(en) verwacht in regel %s",
+ ["no"]="%s argument forventet i linje %s",
+ ["ro"]="argumentul(ele) %s sunt asteptate in linia %s",
},
["3"]={
- ["cs"]="-- -- nahrazuje makro, uzijte VERZALKY!",
- ["de"]="-- -- ersetzt ein Makro, verwende VERSALIEN!",
- ["en"]="-- -- replaces a macro, use CAPITALS!",
- ["fr"]="-- -- remplace une macro, utilisez des MAJUSCULES !",
- ["it"]="-- -- sostituisce una macro, usare le MAIUSCOLE!",
- ["nl"]="-- -- vervangt een macro, gebruik HOOFDLETTERS!",
- ["no"]="-- -- overskygger en makro, bruk STORE BOKSTAVER!",
- ["ro"]="-- -- inlocuieste un macro, folositi MAJUSCULE!",
+ ["cs"]="%s %s nahrazuje makro, uzijte VERZALKY!",
+ ["de"]="%s %s ersetzt ein Makro, verwende VERSALIEN!",
+ ["en"]="%s %s replaces a macro, use CAPITALS!",
+ ["fr"]="%s %s remplace une macro, utilisez des MAJUSCULES !",
+ ["it"]="%s %s sostituisce una macro, usare le MAIUSCOLE!",
+ ["nl"]="%s %s vervangt een macro, gebruik HOOFDLETTERS!",
+ ["no"]="%s %s overskygger en makro, bruk STORE BOKSTAVER!",
+ ["ro"]="%s %s inlocuieste un macro, folositi MAJUSCULE!",
},
["files"]={ "mult-sys.tex" },
["title"]={
@@ -76,24 +83,24 @@ return {
},
["colors"]={
["1"]={
- ["cs"]="system -- je globalne aktivovana",
- ["de"]="system -- ist global aktiviert",
- ["en"]="system -- is global activated",
- ["fr"]="le système -- est globalement activé",
- ["it"]="sistema -- attivato globalmente",
- ["nl"]="systeem -- is globaal actief",
- ["no"]="system -- er aktivert globalt",
- ["ro"]="sistem -- este activata global",
+ ["cs"]="system %s je globalne aktivovana",
+ ["de"]="system %s ist global aktiviert",
+ ["en"]="system %s is global activated",
+ ["fr"]="le système %s est globalement activé",
+ ["it"]="sistema %s attivato globalmente",
+ ["nl"]="systeem %s is globaal actief",
+ ["no"]="system %s er aktivert globalt",
+ ["ro"]="sistem %s este activata global",
},
["10"]={
- ["cs"]="-- prostor barev je podporovan",
- ["de"]="-- Farbraum wird unterstuetzt",
- ["en"]="-- color space is supported",
- ["fr"]="-- l'espace de couleur est supporté",
- ["it"]="spazio dei colori -- supportato",
- ["nl"]="-- kleurruimte wordt ondersteund",
- ["no"]="-- fargerom er støttet",
- ["ro"]="spatiul de culoare -- este suportat",
+ ["cs"]="%s prostor barev je podporovan",
+ ["de"]="%s Farbraum wird unterstuetzt",
+ ["en"]="%s color space is supported",
+ ["fr"]="%s l'espace de couleur est supporté",
+ ["it"]="spazio dei colori %s supportato",
+ ["nl"]="%s kleurruimte wordt ondersteund",
+ ["no"]="%s fargerom er støttet",
+ ["ro"]="spatiul de culoare %s este suportat",
},
["11"]={
["cs"]="barva je prevedena na sed",
@@ -106,117 +113,117 @@ return {
["ro"]="culoarea este convertita la gri",
},
["12"]={
- ["cs"]="-- is registered",
- ["de"]="-- is registered",
- ["en"]="-- is registered",
- ["fr"]="-- est enregistré",
- ["it"]="-- is registered",
- ["nl"]="-- is geregistreerd",
- ["no"]="-- is registered",
- ["ro"]="-- is registered",
+ ["cs"]="%s is registered",
+ ["de"]="%s is registered",
+ ["en"]="%s is registered",
+ ["fr"]="%s est enregistré",
+ ["it"]="%s is registered",
+ ["nl"]="%s is geregistreerd",
+ ["no"]="%s is registered",
+ ["ro"]="%s is registered",
},
["2"]={
- ["cs"]="system -- je lokalne activovana",
- ["de"]="system -- ist lokal aktiviert",
- ["en"]="system -- is local activated",
- ["fr"]="le système -- est localement activé",
- ["it"]="sistema -- attivato localmente",
- ["nl"]="systeem -- is lokaal actief",
- ["no"]="system -- er aktivert lokalt",
- ["ro"]="sistem -- este activata local",
+ ["cs"]="system %s je lokalne activovana",
+ ["de"]="system %s ist lokal aktiviert",
+ ["en"]="system %s is local activated",
+ ["fr"]="le système %s est localement activé",
+ ["it"]="sistema %s attivato localmente",
+ ["nl"]="systeem %s is lokaal actief",
+ ["no"]="system %s er aktivert lokalt",
+ ["ro"]="sistem %s este activata local",
},
["3"]={
- ["cs"]="-- neni definovana --",
- ["de"]="-- ist undefiniert --",
- ["en"]="-- is not defined --",
- ["fr"]="-- n'est pas défini --",
- ["it"]="-- non definito --",
- ["nl"]="-- is niet gedefinieerd --",
- ["no"]="-- er udefinert --",
- ["ro"]="-- nu este definita --",
+ ["cs"]="%s neni definovana %s",
+ ["de"]="%s ist undefiniert %s",
+ ["en"]="%s is not defined %s",
+ ["fr"]="%s n'est pas défini %s",
+ ["it"]="%s non definito %s",
+ ["nl"]="%s is niet gedefinieerd %s",
+ ["no"]="%s er udefinert %s",
+ ["ro"]="%s nu este definita %s",
},
["4"]={
- ["cs"]="system -- je nacten",
- ["de"]="system -- ist geladen",
- ["en"]="system -- is loaded",
- ["fr"]="le système -- est chargé",
- ["it"]="sistema -- caricato",
- ["nl"]="systeem -- wordt geladen",
- ["no"]="system -- er lest inn",
- ["ro"]="sistem -- este incarcata",
+ ["cs"]="system %s je nacten",
+ ["de"]="system %s ist geladen",
+ ["en"]="system %s is loaded",
+ ["fr"]="le système %s est chargé",
+ ["it"]="sistema %s caricato",
+ ["nl"]="systeem %s wordt geladen",
+ ["no"]="system %s er lest inn",
+ ["ro"]="sistem %s este incarcata",
},
["5"]={
- ["cs"]="neznamy system --",
- ["de"]="unbekanntes System --",
- ["en"]="unknown system --",
- ["fr"]="système -- inconnu",
- ["it"]="sistema -- sconosciuto",
- ["nl"]="onbekend systeem --",
- ["no"]="ukjent system --",
- ["ro"]="sistem -- necunoscuta",
+ ["cs"]="neznamy system %s",
+ ["de"]="unbekanntes System %s",
+ ["en"]="unknown system %s",
+ ["fr"]="système %s inconnu",
+ ["it"]="sistema %s sconosciuto",
+ ["nl"]="onbekend systeem %s",
+ ["no"]="ukjent system %s",
+ ["ro"]="sistem %s necunoscuta",
},
["6"]={
- ["cs"]="palette -- je k dispozici",
- ["de"]="palette -- ist verfuegbar",
- ["en"]="palette -- is available",
- ["fr"]="la palette -- est disponible",
- ["it"]="tavolozza -- resa disponibile",
- ["nl"]="palet -- is beschikbaar",
- ["no"]="palett -- er tilgjengelig",
- ["ro"]="paleta -- este disponibila",
+ ["cs"]="palette %s je k dispozici",
+ ["de"]="palette %s ist verfuegbar",
+ ["en"]="palette %s is available",
+ ["fr"]="la palette %s est disponible",
+ ["it"]="tavolozza %s resa disponibile",
+ ["nl"]="palet %s is beschikbaar",
+ ["no"]="palett %s er tilgjengelig",
+ ["ro"]="paleta %s este disponibila",
},
["7"]={
- ["cs"]="palette -- neni k dispozici",
- ["de"]="palette -- ist nicht verfuegbar",
- ["en"]="palette -- is not available",
- ["fr"]="le palette -- n'est pas disponible",
- ["it"]="tavolozza -- non disponibile",
- ["nl"]="palet -- is niet beschikbaar",
- ["no"]="palett -- er ikke tilgjengelig",
- ["ro"]="palette -- nu este disponibila",
+ ["cs"]="palette %s neni k dispozici",
+ ["de"]="palette %s ist nicht verfuegbar",
+ ["en"]="palette %s is not available",
+ ["fr"]="le palette %s n'est pas disponible",
+ ["it"]="tavolozza %s non disponibile",
+ ["nl"]="palet %s is niet beschikbaar",
+ ["no"]="palett %s er ikke tilgjengelig",
+ ["ro"]="palette %s nu este disponibila",
},
["8"]={
- ["cs"]="specifikace -- v barve -- bude cerna",
- ["de"]="Spezifikation -- bei Farbe -- wird schwarz",
- ["en"]="specification -- at color -- becomes black",
- ["fr"]="la spécification -- de la couleur -- devient noire",
- ["it"]="specifica -- del colore -- convertita in nero",
- ["nl"]="specificatie -- bij -- wordt zwart",
- ["no"]="spesifikasjon -- for farge -- gir kun svart",
- ["ro"]="specificatia -- la culoarea -- devine neagra",
+ ["cs"]="specifikace %s v barve %s bude cerna",
+ ["de"]="Spezifikation %s bei Farbe %s wird schwarz",
+ ["en"]="specification %s at color %s becomes black",
+ ["fr"]="la spécification %s de la couleur %s devient noire",
+ ["it"]="specifica %s del colore %s convertita in nero",
+ ["nl"]="specificatie %s bij %s wordt zwart",
+ ["no"]="spesifikasjon %s for farge %s gir kun svart",
+ ["ro"]="specificatia %s la culoarea %s devine neagra",
},
["9"]={
- ["cs"]="-- prostor barev neni podporovan",
- ["de"]="-- Farbraum wird nicht unterstuetzt",
- ["en"]="-- color space is not supported",
- ["fr"]="l'espace de couleur -- n'est pas supporté",
- ["it"]="spazio dei colori -- non supportato",
- ["nl"]="-- kleurruimte wordt niet ondersteund",
- ["no"]="-- fargerom er ikke støttet",
- ["ro"]="spatiul de culoare -- nu este suportat",
+ ["cs"]="%s prostor barev neni podporovan",
+ ["de"]="%s Farbraum wird nicht unterstuetzt",
+ ["en"]="%s color space is not supported",
+ ["fr"]="l'espace de couleur %s n'est pas supporté",
+ ["it"]="spazio dei colori %s non supportato",
+ ["nl"]="%s kleurruimte wordt niet ondersteund",
+ ["no"]="%s fargerom er ikke støttet",
+ ["ro"]="spatiul de culoare %s nu este suportat",
},
["files"]={ "colo-ini.tex" },
["title"]={
["cs"]="barva",
["de"]="farbe",
- ["en"]="color",
+ ["en"]="colors",
["fr"]="couleurs",
["it"]="colore",
- ["nl"]="kleur",
+ ["nl"]="kleuren",
["no"]="farge",
["ro"]="culori",
},
},
["columns"]={
["1"]={
- ["cs"]="je mozno pouze -- sloupcu",
- ["de"]="nur -- Spalten moeglich",
- ["en"]="only -- columns possible",
- ["fr"]="seules -- colonnes possibles",
- ["it"]="solo -- colonne possibili",
- ["nl"]="maximaal -- kolommen",
- ["no"]="maksimalt -- kolonner",
- ["ro"]="este posibil numai -- coloane",
+ ["cs"]="je mozno pouze %s sloupcu",
+ ["de"]="nur %s Spalten moeglich",
+ ["en"]="only %s columns possible",
+ ["fr"]="seules %s colonnes possibles",
+ ["it"]="solo %s colonne possibili",
+ ["nl"]="maximaal %s kolommen",
+ ["no"]="maksimalt %s kolonner",
+ ["ro"]="este posibil numai %s coloane",
},
["10"]={
["cs"]="zbyl (mene nez) 1 radek",
@@ -239,14 +246,14 @@ return {
["ro"]="blocul este prea lat pentru coloana",
},
["12"]={
- ["cs"]="plovouci objekt je presunut do nasledujiciho sloupce / --",
- ["de"]="Gleitobjekt in naechste Zeile verschoben / --",
- ["en"]="float moved to next column / --",
- ["fr"]="flottant déplacé à la colonne suivante / --",
- ["it"]="oggetto mobile spostata alla colonna successiva / --",
- ["nl"]="plaatsblok verplaatst naar volgende kolom / --",
- ["no"]="flytblokk forskjøvet til neste kolonne / --",
- ["ro"]="blocul este mutat pe urmatoarea coloana / --",
+ ["cs"]="plovouci objekt je presunut do nasledujiciho sloupce / %s",
+ ["de"]="Gleitobjekt in naechste Zeile verschoben / %s",
+ ["en"]="float moved to next column / %s",
+ ["fr"]="flottant déplacé à la colonne suivante / %s",
+ ["it"]="oggetto mobile spostata alla colonna successiva / %s",
+ ["nl"]="plaatsblok verplaatst naar volgende kolom / %s",
+ ["no"]="flytblokk forskjøvet til neste kolonne / %s",
+ ["ro"]="blocul este mutat pe urmatoarea coloana / %s",
},
["13"]={
["cs"]="siroky plovouci objekt je presunut nad sloupce",
@@ -299,14 +306,14 @@ return {
["ro"]="cadrele bottom (bottom float) nu sunt inca suportate",
},
["6"]={
- ["cs"]="-- plovouci objekt(y) odlozeny",
- ["de"]="-- Gleitobjekt(e) verschoben",
- ["en"]="-- float(s) postponed",
- ["fr"]="-- flottant(s) reporté(s)",
- ["it"]="-- float(s) posticipate",
- ["nl"]="-- plaatsblok(en) opgeschort",
- ["no"]="-- flytblokk forskjøvet",
- ["ro"]="-- blocurile sunt amanate",
+ ["cs"]="%s plovouci objekt(y) odlozeny",
+ ["de"]="%s Gleitobjekt(e) verschoben",
+ ["en"]="%s float(s) postponed",
+ ["fr"]="%s flottant(s) reporté(s)",
+ ["it"]="%s float(s) posticipate",
+ ["nl"]="%s plaatsblok(en) opgeschort",
+ ["no"]="%s flytblokk forskjøvet",
+ ["ro"]="%s blocurile sunt amanate",
},
["7"]={
["cs"]="vyvazovani ukonceno po 100 krocich",
@@ -319,14 +326,14 @@ return {
["ro"]="alinierea este oprita dupa 100 de incercari",
},
["8"]={
- ["cs"]="vyvazeno v -- krocich",
- ["de"]="ausgeglichen nach -- Schritt(en)",
- ["en"]="balanced in -- step(s)",
- ["fr"]="équilibré en -- pas",
- ["it"]="bilanciamento in -- passo/i",
- ["nl"]="gebalanceerd in -- stap(pen)",
- ["no"]="balansert etter -- iterasjoner",
- ["ro"]="aliniat in -- pas(i)",
+ ["cs"]="vyvazeno v %s krocich",
+ ["de"]="ausgeglichen nach %s Schritt(en)",
+ ["en"]="balanced in %s step(s)",
+ ["fr"]="équilibré en %s pas",
+ ["it"]="bilanciamento in %s passo/i",
+ ["nl"]="gebalanceerd in %s stap(pen)",
+ ["no"]="balansert etter %s iterasjoner",
+ ["ro"]="aliniat in %s pas(i)",
},
["9"]={
["cs"]="kontrola nerovnost",
@@ -352,44 +359,44 @@ return {
},
["databases"]={
["1"]={
- ["cs"]="--",
- ["de"]="--",
- ["en"]="--",
- ["fr"]="--",
- ["it"]="--",
- ["nl"]="--",
- ["no"]="--",
- ["ro"]="--",
+ ["cs"]="%s",
+ ["de"]="%s",
+ ["en"]="%s",
+ ["fr"]="%s",
+ ["it"]="%s",
+ ["nl"]="%s",
+ ["no"]="%s",
+ ["ro"]="%s",
},
["2"]={
- ["cs"]="local file --",
- ["de"]="lokale Datei --",
- ["en"]="local file --",
- ["fr"]="fichier local --",
- ["it"]="file locale --",
- ["nl"]="lokaal bestand --",
- ["no"]="lokal fil --",
- ["ro"]="fisier local --",
+ ["cs"]="local file %s",
+ ["de"]="lokale Datei %s",
+ ["en"]="local file %s",
+ ["fr"]="fichier local %s",
+ ["it"]="file locale %s",
+ ["nl"]="lokaal bestand %s",
+ ["no"]="lokal fil %s",
+ ["ro"]="fisier local %s",
},
["3"]={
- ["cs"]="global file --",
- ["de"]="globale Datei --",
- ["en"]="global file --",
- ["fr"]="fichier global --",
- ["it"]="file globale --",
- ["nl"]="globaal bestand --",
- ["no"]="global fil --",
- ["ro"]="fisier global --",
+ ["cs"]="global file %s",
+ ["de"]="globale Datei %s",
+ ["en"]="global file %s",
+ ["fr"]="fichier global %s",
+ ["it"]="file globale %s",
+ ["nl"]="globaal bestand %s",
+ ["no"]="global fil %s",
+ ["ro"]="fisier global %s",
},
["4"]={
- ["cs"]="unknown file --",
- ["de"]="unbekannte Datei --",
- ["en"]="unknown file --",
- ["fr"]="fichier inconnu --",
- ["it"]="file sconosciuto --",
- ["nl"]="onbekend bestand --",
- ["no"]="ukjent fil --",
- ["ro"]="fisier necunoscut --",
+ ["cs"]="unknown file %s",
+ ["de"]="unbekannte Datei %s",
+ ["en"]="unknown file %s",
+ ["fr"]="fichier inconnu %s",
+ ["it"]="file sconosciuto %s",
+ ["nl"]="onbekend bestand %s",
+ ["no"]="ukjent fil %s",
+ ["ro"]="fisier necunoscut %s",
},
["files"]={ "core-dat.tex" },
["title"]={
@@ -403,130 +410,69 @@ return {
["ro"]="baze de date",
},
},
- ["documents"]={
- ["1"]={
- ["de"]="Blatt --",
- ["en"]="sheet --",
- ["nl"]="sheet --",
- },
- ["2"]={
- ["de"]="Nummer --",
- ["en"]="number --",
- ["nl"]="nummer --",
- },
- ["files"]={ "docs-bri.tex", "docs-she.tex" },
- ["title"]={
- ["de"]="Blaetter",
- ["en"]="sheets",
- ["nl"]="sheets",
- },
- },
- ["encodings"]={
- ["1"]={
- ["cs"]="kodovani --",
- ["de"]="Kodierung --",
- ["en"]="coding --",
- ["fr"]="encodage --",
- ["it"]="codifica --",
- ["nl"]="codering --",
- ["no"]="koding --",
- ["ro"]="codificarea --",
- },
- ["2"]={
- ["cs"]="je nacteno kodovani --",
- ["de"]="Kodierung -- ist geladen",
- ["en"]="coding -- is loaded",
- ["fr"]="l'encodage -- est chargé",
- ["it"]="codifica -- caricata",
- ["nl"]="codering -- wordt geladen",
- ["no"]="koding -- er lest inn",
- ["ro"]="codificarea -- este Encarcata",
- },
- ["3"]={
- ["cs"]="nezname kodovani --",
- ["de"]="Unbekannte Kodierung --",
- ["en"]="unknown coding --",
- ["fr"]="encodage -- inconnu",
- ["it"]="codifica sconosciuta --",
- ["nl"]="onbekende codering --",
- ["no"]="ukjent koding --",
- ["ro"]="codificarea -- este necunoscuta",
- },
- ["files"]={ "enco-ini.mkii" },
- ["title"]={
- ["cs"]="kodovani",
- ["de"]="Kodierung",
- ["en"]="encoding",
- ["fr"]="encodage",
- ["it"]="codifica",
- ["nl"]="encoding",
- ["no"]="koding",
- ["ro"]="codificari",
- },
- },
["figures"]={
["1"]={
- ["cs"]="obraz -- nelze nalezt",
- ["de"]="Abbildung -- kann nicht gefunden werden",
- ["en"]="figure -- can not be found",
- ["fr"]="la figure -- ne peut être trouvée",
- ["it"]="figura -- non trovata",
- ["nl"]="figuur -- is niet te vinden",
- ["ro"]="figura -- nu poate fi gasita",
+ ["cs"]="obraz %s nelze nalezt",
+ ["de"]="Abbildung %s kann nicht gefunden werden",
+ ["en"]="figure %s can not be found",
+ ["fr"]="la figure %s ne peut être trouvée",
+ ["it"]="figura %s non trovata",
+ ["nl"]="figuur %s is niet te vinden",
+ ["ro"]="figura %s nu poate fi gasita",
},
["2"]={
- ["cs"]="obraz -- nepritomen",
- ["de"]="Abbildung -- wird nicht erstellt",
- ["en"]="figure -- is not preset",
- ["fr"]="la figure -- n'est pas pré-sélectionnée",
- ["it"]="la figura -- non è preimpostata",
- ["nl"]="figuur -- wordt niet preset",
- ["ro"]="figura -- nu este presetata",
+ ["cs"]="obraz %s nepritomen",
+ ["de"]="Abbildung %s wird nicht erstellt",
+ ["en"]="figure %s is not preset",
+ ["fr"]="la figure %s n'est pas pré-sélectionnée",
+ ["it"]="la figura %s non è preimpostata",
+ ["nl"]="figuur %s wordt niet preset",
+ ["ro"]="figura %s nu este presetata",
},
["3"]={
- ["cs"]="dimensions of -- are determined externally",
- ["de"]="dimensions of -- are determined externally",
- ["en"]="dimensions of -- are determined externally",
- ["fr"]="dimensions of -- are determined externally",
- ["it"]="dimensions of -- are determined externally",
- ["nl"]="maten van -- worden extern vastgesteld",
- ["ro"]="dimensions of -- are determined externally",
+ ["cs"]="dimensions of %s are determined externally",
+ ["de"]="dimensions of %s are determined externally",
+ ["en"]="dimensions of %s are determined externally",
+ ["fr"]="dimensions of %s are determined externally",
+ ["it"]="dimensions of %s are determined externally",
+ ["nl"]="maten van %s worden extern vastgesteld",
+ ["ro"]="dimensions of %s are determined externally",
},
["4"]={
- ["cs"]="dimenze obrazu -- nacteny primo z jeho souboru",
- ["de"]="Dimensionen von -- geladen aus der Abbildungsdatei selbst",
- ["en"]="dimensions of -- loaded from figurefile itself",
- ["fr"]="les dimensions de -- chargées implicitement à partir du fichier de figure",
- ["it"]="dimensioni di -- caricate dal file di immagini stesso",
- ["nl"]="maten van -- geladen uit figuurfile zelf",
- ["ro"]="dimensiunea figurii -- se incarca din fisierul insusi",
+ ["cs"]="dimenze obrazu %s nacteny primo z jeho souboru",
+ ["de"]="Dimensionen von %s geladen aus der Abbildungsdatei selbst",
+ ["en"]="dimensions of %s loaded from figurefile itself",
+ ["fr"]="les dimensions de %s chargées implicitement à partir du fichier de figure",
+ ["it"]="dimensioni di %s caricate dal file di immagini stesso",
+ ["nl"]="maten van %s geladen uit figuurfile zelf",
+ ["ro"]="dimensiunea figurii %s se incarca din fisierul insusi",
},
["5"]={
- ["cs"]="dimensions of -- are unknown",
- ["de"]="Dimensions of -- are unknown",
- ["en"]="dimensions of -- are unknown",
- ["fr"]="dimensions of -- are unknown",
- ["it"]="dimensions of -- are unknown",
- ["nl"]="maten van -- zijn onbekend",
- ["ro"]="dimensions of -- are unknown",
+ ["cs"]="dimensions of %s are unknown",
+ ["de"]="Dimensions of %s are unknown",
+ ["en"]="dimensions of %s are unknown",
+ ["fr"]="dimensions of %s are unknown",
+ ["it"]="dimensions of %s are unknown",
+ ["nl"]="maten van %s zijn onbekend",
+ ["ro"]="dimensions of %s are unknown",
},
["6"]={
- ["cs"]="dimenze obrazu -- spocteny programem rlxtools",
- ["de"]="Dimensionen von -- ausgerechnet durch rlxtools",
- ["en"]="dimensions of -- calculated by rlxtools",
- ["fr"]="les dimensions de -- calculées par rlxtools",
- ["it"]="dimensioni di -- calcolate da rlxtools",
- ["nl"]="maten van -- berekend door rlxtools",
- ["ro"]="dimensiunea figurii -- este calculata de rlxtools",
+ ["cs"]="dimenze obrazu %s spocteny programem rlxtools",
+ ["de"]="Dimensionen von %s ausgerechnet durch rlxtools",
+ ["en"]="dimensions of %s calculated by rlxtools",
+ ["fr"]="les dimensions de %s calculées par rlxtools",
+ ["it"]="dimensioni di %s calcolate da rlxtools",
+ ["nl"]="maten van %s berekend door rlxtools",
+ ["ro"]="dimensiunea figurii %s este calculata de rlxtools",
},
["8"]={
- ["cs"]="obrazovy objekt -- je znovu pouzit",
- ["de"]="Abbildungobjekt -- wurde wiederverwandt",
- ["en"]="figureobject -- is reused",
- ["fr"]="figureobject -- est réutilisé",
- ["it"]="oggetto-figura -- riutilizzato",
- ["nl"]="figuurobject -- wordt opnieuw gebruikt",
- ["ro"]="obiectul figura -- este refolosit",
+ ["cs"]="obrazovy objekt %s je znovu pouzit",
+ ["de"]="Abbildungobjekt %s wurde wiederverwandt",
+ ["en"]="figureobject %s is reused",
+ ["fr"]="figureobject %s est réutilisé",
+ ["it"]="oggetto-figura %s riutilizzato",
+ ["nl"]="figuurobject %s wordt opnieuw gebruikt",
+ ["ro"]="obiectul figura %s este refolosit",
},
["files"]={ "core-inc.mkii" },
["title"]={
@@ -541,14 +487,14 @@ return {
},
["files"]={
["1"]={
- ["cs"]="synonymum souboru -- je jiz pouzito pro --",
- ["de"]="Dateisynonym -- wird bereits fuer -- benutzt",
- ["en"]="file synonym -- is already used for --",
- ["fr"]="le synonyme de fichier -- est déjà utilisé pour --",
- ["it"]="sinonimo file -- già in uso per --",
- ["nl"]="file synoniem -- is al in gebruik voor --",
- ["no"]="filesynonym -- er allerede brukt for --",
- ["ro"]="sinonimul fisierelor -- este folosit deja pentru --",
+ ["cs"]="synonymum souboru %s je jiz pouzito pro %s",
+ ["de"]="Dateisynonym %s wird bereits fuer %s benutzt",
+ ["en"]="file synonym %s is already used for %s",
+ ["fr"]="le synonyme de fichier %s est déjà utilisé pour %s",
+ ["it"]="sinonimo file %s già in uso per %s",
+ ["nl"]="file synoniem %s is al in gebruik voor %s",
+ ["no"]="filesynonym %s er allerede brukt for %s",
+ ["ro"]="sinonimul fisierelor %s este folosit deja pentru %s",
},
["files"]={ "core-fil.tex" },
["title"]={
@@ -564,51 +510,51 @@ return {
},
["filters"]={
["1"]={
- ["cs"]="filter -- is loaded",
- ["de"]="filter -- ist geladen",
- ["en"]="filter -- is loaded",
- ["fr"]="le filtre -- est chargé",
- ["it"]="filtro -- caricato",
- ["nl"]="filter -- wordt geladen",
+ ["cs"]="filter %s is loaded",
+ ["de"]="filter %s ist geladen",
+ ["en"]="filter %s is loaded",
+ ["fr"]="le filtre %s est chargé",
+ ["it"]="filtro %s caricato",
+ ["nl"]="filter %s wordt geladen",
},
["2"]={
- ["cs"]="unknown filter --",
- ["de"]="unknown filter --",
- ["en"]="unknown filter --",
- ["fr"]="filtre -- inconnu",
- ["it"]="filtro sconosciuto --",
- ["nl"]="onbekend filter --",
+ ["cs"]="unknown filter %s",
+ ["de"]="unknown filter %s",
+ ["en"]="unknown filter %s",
+ ["fr"]="filtre %s inconnu",
+ ["it"]="filtro sconosciuto %s",
+ ["nl"]="onbekend filter %s",
},
["files"]={ "filt-ini.tex" },
["title"]={
- ["cs"]="filter",
- ["de"]="filter",
- ["en"]="filter",
+ ["cs"]="filters",
+ ["de"]="filters",
+ ["en"]="filters",
["fr"]="filtre",
["it"]="filtri",
- ["nl"]="filter",
+ ["nl"]="filters",
},
},
["floatblocks"]={
["1"]={
- ["cs"]="-- precislovano / -- => --",
- ["de"]="-- neu nummeriert / -- => --",
- ["en"]="-- renumbered / -- => --",
- ["fr"]="-- renuméroté / -- => --",
- ["it"]="-- rinumerato / -- => --",
- ["nl"]="-- hernummerd / -- => --",
- ["no"]="-- renummerert / -- => --",
- ["ro"]="-- renumerotat / -- => --",
+ ["cs"]="%s precislovano / %s => %s",
+ ["de"]="%s neu nummeriert / %s => %s",
+ ["en"]="%s renumbered / %s => %s",
+ ["fr"]="%s renuméroté / %s => %s",
+ ["it"]="%s rinumerato / %s => %s",
+ ["nl"]="%s hernummerd / %s => %s",
+ ["no"]="%s renummerert / %s => %s",
+ ["ro"]="%s renumerotat / %s => %s",
},
["10"]={
- ["cs"]="-- omezeno",
- ["de"]="-- begrenzt",
- ["en"]="-- limited",
- ["fr"]="-- limité",
- ["it"]="-- limitato",
- ["nl"]="-- begrensd",
- ["no"]="-- begrenset",
- ["ro"]="-- limitat",
+ ["cs"]="%s omezeno",
+ ["de"]="%s begrenzt",
+ ["en"]="%s limited",
+ ["fr"]="%s limité",
+ ["it"]="%s limitato",
+ ["nl"]="%s begrensd",
+ ["no"]="%s begrenset",
+ ["ro"]="%s limitat",
},
["11"]={
["cs"]="nedan zadny blok",
@@ -641,34 +587,34 @@ return {
["ro"]="there is nothing to split",
},
["2"]={
- ["cs"]="-- ulozeno",
- ["de"]="-- gespeichert",
- ["en"]="-- saved",
- ["fr"]="-- sauvegardé",
- ["it"]="-- salvato",
- ["nl"]="-- bewaard",
- ["no"]="-- lagret",
- ["ro"]="-- salvat",
+ ["cs"]="%s ulozeno",
+ ["de"]="%s gespeichert",
+ ["en"]="%s saved",
+ ["fr"]="%s sauvegardé",
+ ["it"]="%s salvato",
+ ["nl"]="%s bewaard",
+ ["no"]="%s lagret",
+ ["ro"]="%s salvat",
},
["3"]={
- ["cs"]="-- presunuto",
- ["de"]="-- verschoben",
- ["en"]="-- moved",
- ["fr"]="-- déplacé",
- ["it"]="-- mosso",
- ["nl"]="-- verplaatst",
- ["no"]="-- flyttet",
- ["ro"]="-- mutat",
+ ["cs"]="%s presunuto",
+ ["de"]="%s verschoben",
+ ["en"]="%s moved",
+ ["fr"]="%s déplacé",
+ ["it"]="%s mosso",
+ ["nl"]="%s verplaatst",
+ ["no"]="%s flyttet",
+ ["ro"]="%s mutat",
},
["4"]={
- ["cs"]="-- umisteno",
- ["de"]="-- plaziert",
- ["en"]="-- placed",
- ["fr"]="-- placé",
- ["it"]="-- sistemato",
- ["nl"]="-- geplaatst",
- ["no"]="-- plassert",
- ["ro"]="-- plasat",
+ ["cs"]="%s umisteno",
+ ["de"]="%s plaziert",
+ ["en"]="%s placed",
+ ["fr"]="%s placé",
+ ["it"]="%s sistemato",
+ ["nl"]="%s geplaatst",
+ ["no"]="%s plassert",
+ ["ro"]="%s plasat",
},
["5"]={
["cs"]="poradi prizpusobeno",
@@ -681,34 +627,34 @@ return {
["ro"]="ordinea adaptata",
},
["6"]={
- ["cs"]="pocet hornich plovoucich objektu je omezen na --",
- ["de"]="Anz. der oberen Gleitobjekte beschraengt auf --",
- ["en"]="n of top floats limited to --",
- ["fr"]="n flottants de haut de page limité à --",
- ["it"]="n di top floats limitato a --",
- ["nl"]="maximaal -- boven",
- ["no"]="maksimalt -- flytblokker øverst",
- ["ro"]="nr. cadrelor de sus limitat la --",
+ ["cs"]="pocet hornich plovoucich objektu je omezen na %s",
+ ["de"]="Anz. der oberen Gleitobjekte beschraengt auf %s",
+ ["en"]="n of top floats limited to %s",
+ ["fr"]="n flottants de haut de page limité à %s",
+ ["it"]="n di top floats limitato a %s",
+ ["nl"]="maximaal %s boven",
+ ["no"]="maksimalt %s flytblokker øverst",
+ ["ro"]="nr. cadrelor de sus limitat la %s",
},
["7"]={
- ["cs"]="pocet spodnich plovoucich objektu je omezen na --",
- ["de"]="Anz. der unteren Gleitobjekte beschraengt auf --",
- ["en"]="n of bottom floats limited to --",
- ["fr"]="n flottants de bas de page limité à --",
- ["it"]="n di bottom floats limitato a --",
- ["nl"]="maximaal -- onder",
- ["no"]="maksimalt -- flytblokker nederst",
- ["ro"]="nr. blocurilor de jos limitat la --",
+ ["cs"]="pocet spodnich plovoucich objektu je omezen na %s",
+ ["de"]="Anz. der unteren Gleitobjekte beschraengt auf %s",
+ ["en"]="n of bottom floats limited to %s",
+ ["fr"]="n flottants de bas de page limité à %s",
+ ["it"]="n di bottom floats limitato a %s",
+ ["nl"]="maximaal %s onder",
+ ["no"]="maksimalt %s flytblokker nederst",
+ ["ro"]="nr. blocurilor de jos limitat la %s",
},
["8"]={
- ["cs"]="radku je mene nez --",
- ["de"]="weniger als -- zeilen",
- ["en"]="less than -- lines",
- ["fr"]="moins de -- lignes",
- ["it"]="meno di -- righe",
- ["nl"]="minder dan -- regels",
- ["no"]="mindre enn -- linjer",
- ["ro"]="mai putin de -- linii",
+ ["cs"]="radku je mene nez %s",
+ ["de"]="weniger als %s zeilen",
+ ["en"]="less than %s lines",
+ ["fr"]="moins de %s lignes",
+ ["it"]="meno di %s righe",
+ ["nl"]="minder dan %s regels",
+ ["no"]="mindre enn %s linjer",
+ ["ro"]="mai putin de %s linii",
},
["9"]={
["cs"]="poradi naruseno",
@@ -734,104 +680,104 @@ return {
},
["fonts"]={
["1"]={
- ["cs"]="kodovani --",
- ["de"]="Kodierung --",
- ["en"]="coding --",
- ["fr"]="encodage --",
- ["it"]="codifica --",
- ["nl"]="codering --",
- ["no"]="koding --",
- ["ro"]="codificarea --",
+ ["cs"]="kodovani %s",
+ ["de"]="Kodierung %s",
+ ["en"]="coding %s",
+ ["fr"]="encodage %s",
+ ["it"]="codifica %s",
+ ["nl"]="codering %s",
+ ["no"]="koding %s",
+ ["ro"]="codificarea %s",
},
["10"]={
- ["cs"]="neznamy font --",
- ["de"]="unbekanntes Font --",
- ["en"]="unknown font file --",
- ["fr"]="fichier de police -- inconnu",
- ["it"]="file di font sconosciuto --",
- ["nl"]="onbekende font file --",
- ["no"]="ukjent fontfil --",
- ["ro"]="fisier font necunoscut --",
+ ["cs"]="neznamy font %s",
+ ["de"]="unbekanntes Font %s",
+ ["en"]="unknown font file %s",
+ ["fr"]="fichier de police %s inconnu",
+ ["it"]="file di font sconosciuto %s",
+ ["nl"]="onbekende font file %s",
+ ["no"]="ukjent fontfil %s",
+ ["ro"]="fisier font necunoscut %s",
},
["14"]={
- ["cs"]="bodyfont -- is defined (can better be done global)",
- ["de"]="Fliesstext -- wurde definiert (besser waere globale Definition)",
- ["en"]="bodyfont -- is defined (can better be done global)",
- ["fr"]="policecorps -- est défini (une définition globale pourrait être plus adéquat)",
- ["it"]="corpo del testo -- definito (sarebbe meglio globale)",
- ["nl"]="korps -- is gedefinieerd (kan beter globaal plaatsvinden)",
- ["no"]="bodyfont -- is defined (can better be done global)",
- ["ro"]="bodyfont -- is defined (can better be done global)",
+ ["cs"]="bodyfont %s is defined (can better be done global)",
+ ["de"]="Fliesstext %s wurde definiert (besser waere globale Definition)",
+ ["en"]="bodyfont %s is defined (can better be done global)",
+ ["fr"]="policecorps %s est défini (une définition globale pourrait être plus adéquat)",
+ ["it"]="corpo del testo %s definito (sarebbe meglio globale)",
+ ["nl"]="korps %s is gedefinieerd (kan beter globaal plaatsvinden)",
+ ["no"]="bodyfont %s is defined (can better be done global)",
+ ["ro"]="bodyfont %s is defined (can better be done global)",
},
["2"]={
- ["cs"]="varianta -- je nactena",
- ["de"]="Variante -- ist geladen",
- ["en"]="variant -- is loaded",
- ["fr"]="la variante -- est chargée",
- ["it"]="variante -- caricata",
- ["nl"]="variant -- wordt geladen",
- ["no"]="variant -- er lest inn",
- ["ro"]="varianta -- este incarcata",
+ ["cs"]="varianta %s je nactena",
+ ["de"]="Variante %s ist geladen",
+ ["en"]="variant %s is loaded",
+ ["fr"]="la variante %s est chargée",
+ ["it"]="variante %s caricata",
+ ["nl"]="variant %s wordt geladen",
+ ["no"]="variant %s er lest inn",
+ ["ro"]="varianta %s este incarcata",
},
["3"]={
- ["cs"]="neznama varianta --",
- ["de"]="Unbekannte Variante --",
- ["en"]="unknown variant --",
- ["fr"]="variante -- inconnue",
- ["it"]="variante sconosciuta --",
- ["nl"]="onbekende variant --",
- ["no"]="ukjent variant --",
- ["ro"]="varianta necunoscuta --",
+ ["cs"]="neznama varianta %s",
+ ["de"]="Unbekannte Variante %s",
+ ["en"]="unknown variant %s",
+ ["fr"]="variante %s inconnue",
+ ["it"]="variante sconosciuta %s",
+ ["nl"]="onbekende variant %s",
+ ["no"]="ukjent variant %s",
+ ["ro"]="varianta necunoscuta %s",
},
["4"]={
- ["cs"]="zakladni font -- neni definovan",
- ["de"]="Fliesstext -- ist nicht definiert",
- ["en"]="bodyfont -- is not defined",
- ["fr"]="policecorps -- n'est pas définie",
- ["it"]="corpo del testo -- non definito",
- ["nl"]="korps -- is niet gedefinieerd",
- ["no"]="hovedfont -- er ikke definert",
- ["ro"]="corpul de litere -- nu este definit",
+ ["cs"]="zakladni font %s neni definovan",
+ ["de"]="Fliesstext %s ist nicht definiert",
+ ["en"]="bodyfont %s is not defined",
+ ["fr"]="policecorps %s n'est pas définie",
+ ["it"]="corpo del testo %s non definito",
+ ["nl"]="korps %s is niet gedefinieerd",
+ ["no"]="hovedfont %s er ikke definert",
+ ["ro"]="corpul de litere %s nu este definit",
},
["5"]={
- ["cs"]="styl -- neni definovan",
- ["de"]="Stil -- ist nicht definiert",
- ["en"]="style -- is not defined",
- ["fr"]="le style -- n'est pas défini",
- ["it"]="stile -- non definito",
- ["nl"]="stijl -- is niet gedefinieerd",
- ["no"]="stil -- er ikke definert",
- ["ro"]="stilul -- nu este definit",
+ ["cs"]="styl %s neni definovan",
+ ["de"]="Stil %s ist nicht definiert",
+ ["en"]="style %s is not defined",
+ ["fr"]="le style %s n'est pas défini",
+ ["it"]="stile %s non definito",
+ ["nl"]="stijl %s is niet gedefinieerd",
+ ["no"]="stil %s er ikke definert",
+ ["ro"]="stilul %s nu este definit",
},
["6"]={
- ["cs"]="-- je nacten",
- ["de"]="-- ist geladen",
- ["en"]="-- is loaded",
- ["fr"]="-- est chargé",
- ["it"]="-- caricato",
- ["nl"]="-- wordt geladen",
- ["no"]="-- er lest inn",
- ["ro"]="-- este incarcat",
+ ["cs"]="%s je nacten",
+ ["de"]="%s ist geladen",
+ ["en"]="%s is loaded",
+ ["fr"]="%s est chargé",
+ ["it"]="%s caricato",
+ ["nl"]="%s wordt geladen",
+ ["no"]="%s er lest inn",
+ ["ro"]="%s este incarcat",
},
["7"]={
- ["cs"]="neznamy format --",
- ["de"]="unbekanntes Format --",
- ["en"]="unknown format --",
- ["fr"]="format -- inconnu",
- ["it"]="formato sconosciuto --",
- ["nl"]="onbekend formaat --",
- ["no"]="ukjent format --",
- ["ro"]="format necunoscut --",
+ ["cs"]="neznamy format %s",
+ ["de"]="unbekanntes Format %s",
+ ["en"]="unknown format %s",
+ ["fr"]="format %s inconnu",
+ ["it"]="formato sconosciuto %s",
+ ["nl"]="onbekend formaat %s",
+ ["no"]="ukjent format %s",
+ ["ro"]="format necunoscut %s",
},
["8"]={
- ["cs"]="styl -- definovan",
- ["de"]="Stil -- definiert",
- ["en"]="style -- defined",
- ["fr"]="style -- défini",
- ["it"]="stile -- definito",
- ["nl"]="stijl -- gedefinieerd",
- ["no"]="stil -- definert",
- ["ro"]="stilul -- definit",
+ ["cs"]="styl %s definovan",
+ ["de"]="Stil %s definiert",
+ ["en"]="style %s defined",
+ ["fr"]="style %s défini",
+ ["it"]="stile %s definito",
+ ["nl"]="stijl %s gedefinieerd",
+ ["no"]="stil %s definert",
+ ["ro"]="stilul %s definit",
},
["files"]={ "font-ini.mkii", "font-ini.mkiv" },
["title"]={
@@ -845,59 +791,59 @@ return {
["ro"]="corp de litere",
},
},
- ["handlings"]={
- ["1"]={
- ["cs"]="font handling --",
- ["de"]="Font Verarbeitung --",
- ["en"]="font handling --",
- ["fr"]="manipulation -- de police",
- ["it"]="font handling --",
- ["nl"]="font afhandeling --",
- ["no"]="font handling --",
- ["ro"]="font handling --",
- },
- ["2"]={
- ["cs"]="font handling -- is loaded",
- ["de"]="Font Verarbeitung -- ist geladen",
- ["en"]="font handling -- is loaded",
- ["fr"]="la manipulation -- de police est chargée",
- ["it"]="font handling -- is loaded",
- ["nl"]="font afhandeling -- wordt geladen",
- ["no"]="font handling -- is loaded",
- ["ro"]="font handling -- is loaded",
- },
- ["3"]={
- ["cs"]="unknown font handling --",
- ["de"]="unknown font handling --",
- ["en"]="unknown font handling --",
- ["fr"]="manipulation -- inconnue de police",
- ["it"]="unknown font handling --",
- ["nl"]="onbekende font afhandeling --",
- ["no"]="unknown font handling --",
- ["ro"]="unknown font handling --",
- },
- ["files"]={ "hand-ini.mkii" },
- ["title"]={
- ["cs"]="handling",
- ["de"]="handling",
- ["en"]="handling",
- ["fr"]="manipulation",
- ["it"]="handling",
- ["nl"]="handling",
- ["no"]="handling",
- ["ro"]="handling",
- },
- },
+--~ ["handlings"]={
+--~ ["1"]={
+--~ ["cs"]="font handling %s",
+--~ ["de"]="Font Verarbeitung %s",
+--~ ["en"]="font handling %s",
+--~ ["fr"]="manipulation %s de police",
+--~ ["it"]="font handling %s",
+--~ ["nl"]="font afhandeling %s",
+--~ ["no"]="font handling %s",
+--~ ["ro"]="font handling %s",
+--~ },
+--~ ["2"]={
+--~ ["cs"]="font handling %s is loaded",
+--~ ["de"]="Font Verarbeitung %s ist geladen",
+--~ ["en"]="font handling %s is loaded",
+--~ ["fr"]="la manipulation %s de police est chargée",
+--~ ["it"]="font handling %s is loaded",
+--~ ["nl"]="font afhandeling %s wordt geladen",
+--~ ["no"]="font handling %s is loaded",
+--~ ["ro"]="font handling %s is loaded",
+--~ },
+--~ ["3"]={
+--~ ["cs"]="unknown font handling %s",
+--~ ["de"]="unknown font handling %s",
+--~ ["en"]="unknown font handling %s",
+--~ ["fr"]="manipulation %s inconnue de police",
+--~ ["it"]="unknown font handling %s",
+--~ ["nl"]="onbekende font afhandeling %s",
+--~ ["no"]="unknown font handling %s",
+--~ ["ro"]="unknown font handling %s",
+--~ },
+--~ ["files"]={ "hand-ini.mkii" },
+--~ ["title"]={
+--~ ["cs"]="handling",
+--~ ["de"]="handling",
+--~ ["en"]="handling",
+--~ ["fr"]="manipulation",
+--~ ["it"]="handling",
+--~ ["nl"]="handling",
+--~ ["no"]="handling",
+--~ ["ro"]="handling",
+--~ },
+--~ },
["interactions"]={
["1"]={
- ["cs"]="pomer -- x -- (s x v)",
- ["de"]="Seitenverhaeltnis -- x -- (B x H)",
- ["en"]="aspect ratio -- x -- (b x h)",
- ["fr"]="ratio d'aspect -- x -- (b x h)",
- ["it"]="rapporto -- x -- (b x a)",
- ["nl"]="aspect ratio -- x -- (b x h)",
- ["no"]="forholdstall -- x -- (b x h)",
- ["ro"]="aspectul -- x -- (b x h)",
+ ["cs"]="pomer %s x %s (s x v)",
+ ["de"]="Seitenverhaeltnis %s x %s (B x H)",
+ ["en"]="aspect ratio %s x %s (b x h)",
+ ["fr"]="ratio d'aspect %s x %s (b x h)",
+ ["it"]="rapporto %s x %s (b x a)",
+ ["nl"]="aspect ratio %s x %s (b x h)",
+ ["no"]="forholdstall %s x %s (b x h)",
+ ["ro"]="aspectul %s x %s (b x h)",
},
["2"]={
["cs"]="aktivni",
@@ -910,14 +856,14 @@ return {
["ro"]="activ",
},
["21"]={
- ["cs"]="-- kod vlozen",
- ["de"]="-- Code eingefuegt",
- ["en"]="-- code inserted",
- ["fr"]="-- code inseré",
- ["it"]="codice -- inserito",
- ["nl"]="-- code tussengevoegd",
- ["no"]="-- kode satt inn / tilføyd",
- ["ro"]="-- cod inserat",
+ ["cs"]="%s kod vlozen",
+ ["de"]="%s Code eingefuegt",
+ ["en"]="%s code inserted",
+ ["fr"]="%s code inseré",
+ ["it"]="codice %s inserito",
+ ["nl"]="%s code tussengevoegd",
+ ["no"]="%s kode satt inn / tilføyd",
+ ["ro"]="%s cod inserat",
},
["3"]={
["cs"]="neaktivni",
@@ -930,130 +876,130 @@ return {
["ro"]="inactiv",
},
["4"]={
- ["cs"]="zadna strankova synchronizace (--) v hmode",
- ["de"]="keine Seitensynchronisation (--) im hmode",
- ["en"]="no pagesynchronisation (--) in hmode",
- ["fr"]="pas de synchronisation de page (--) dans le hmode",
- ["it"]="sincronizzazione di pagina (--) non disponibile in hmode",
- ["nl"]="geen paginasynchronisatie (--) in hmode",
- ["no"]="ingen sidesynkronisering (--) i hmode",
- ["ro"]="nu exista sincronizare pt. pagini (--) in hmode",
+ ["cs"]="zadna strankova synchronizace (%s) v hmode",
+ ["de"]="keine Seitensynchronisation (%s) im hmode",
+ ["en"]="no pagesynchronisation (%s) in hmode",
+ ["fr"]="pas de synchronisation de page (%s) dans le hmode",
+ ["it"]="sincronizzazione di pagina (%s) non disponibile in hmode",
+ ["nl"]="geen paginasynchronisatie (%s) in hmode",
+ ["no"]="ingen sidesynkronisering (%s) i hmode",
+ ["ro"]="nu exista sincronizare pt. pagini (%s) in hmode",
},
["5"]={
- ["cs"]="unknown attachment --",
- ["de"]="unknown attachment --",
- ["en"]="unknown attachment --",
- ["fr"]="le fichier joint -- est inconnu",
- ["it"]="unknown attachment --",
- ["nl"]="onbekend attachment --",
- ["no"]="unknown attachment --",
- ["ro"]="unknown attachment --",
+ ["cs"]="unknown attachment %s",
+ ["de"]="unknown attachment %s",
+ ["en"]="unknown attachment %s",
+ ["fr"]="le fichier joint %s est inconnu",
+ ["it"]="unknown attachment %s",
+ ["nl"]="onbekend attachment %s",
+ ["no"]="unknown attachment %s",
+ ["ro"]="unknown attachment %s",
},
["6"]={
- ["cs"]="attachment file -- does not exist",
- ["de"]="attachment file -- does not exist",
- ["en"]="attachment file -- does not exist",
- ["fr"]="le fichier joint -- n'existe pas",
- ["it"]="attachment file -- does not exist",
- ["nl"]="attachment file -- bestaat niet",
- ["no"]="attachment file -- does not exist",
- ["ro"]="attachment file -- does not exist",
+ ["cs"]="attachment file %s does not exist",
+ ["de"]="attachment file %s does not exist",
+ ["en"]="attachment file %s does not exist",
+ ["fr"]="le fichier joint %s n'existe pas",
+ ["it"]="attachment file %s does not exist",
+ ["nl"]="attachment file %s bestaat niet",
+ ["no"]="attachment file %s does not exist",
+ ["ro"]="attachment file %s does not exist",
},
["files"]={ "core-int.tex", "spec-ini.tex" },
["title"]={
["cs"]="interakce",
- ["de"]="Interaktion",
- ["en"]="interaction",
- ["fr"]="interaction",
+ ["de"]="Interaktions",
+ ["en"]="interactions",
+ ["fr"]="interactions",
["it"]="interazione",
- ["nl"]="interactie",
+ ["nl"]="interacties",
["no"]="interaksjon",
["ro"]="interactiuni",
},
},
- ["javascript"]={
- ["1"]={
- ["cs"]="nacita se soubor skriptu --",
- ["de"]="Lade Scriptdatei --",
- ["en"]="loading script set --",
- ["fr"]="chargement du jeu de script --",
- ["it"]="caricamento dello script set --",
- ["nl"]="script set -- wordt geladen",
- ["no"]="leser inn scriptsett --",
- ["ro"]="se incarca scriptul --",
- },
- ["2"]={
- ["cs"]="neznama preambule --",
- ["de"]="unbekannte Preamble --",
- ["en"]="unknown preamble --",
- ["fr"]="préambule -- inconnu",
- ["it"]="preambolo sconosciuto --",
- ["nl"]="onbekende preamble --",
- ["no"]="ukjent 'preamble' --",
- ["ro"]="preambul necunoscut --",
- },
- ["files"]={ "java-ini.tex" },
- ["title"]={
- ["cs"]="javascript",
- ["de"]="javascript",
- ["en"]="javascript",
- ["fr"]="javascript",
- ["it"]="javascript",
- ["nl"]="javascript",
- ["no"]="javascript",
- ["ro"]="javascript",
- },
- },
+--~ ["javascripts"]={
+--~ ["1"]={
+--~ ["cs"]="nacita se soubor skriptu %s",
+--~ ["de"]="Lade Scriptdatei %s",
+--~ ["en"]="loading script set %s",
+--~ ["fr"]="chargement du jeu de script %s",
+--~ ["it"]="caricamento dello script set %s",
+--~ ["nl"]="script set %s wordt geladen",
+--~ ["no"]="leser inn scriptsett %s",
+--~ ["ro"]="se incarca scriptul %s",
+--~ },
+--~ ["2"]={
+--~ ["cs"]="neznama preambule %s",
+--~ ["de"]="unbekannte Preamble %s",
+--~ ["en"]="unknown preamble %s",
+--~ ["fr"]="préambule %s inconnu",
+--~ ["it"]="preambolo sconosciuto %s",
+--~ ["nl"]="onbekende preamble %s",
+--~ ["no"]="ukjent 'preamble' %s",
+--~ ["ro"]="preambul necunoscut %s",
+--~ },
+--~ ["files"]={ "java-ini.tex" },
+--~ ["title"]={
+--~ ["cs"]="javascripts",
+--~ ["de"]="javascripts",
+--~ ["en"]="javascripts",
+--~ ["fr"]="javascripts",
+--~ ["it"]="javascripts",
+--~ ["nl"]="javascripts",
+--~ ["no"]="javascripts",
+--~ ["ro"]="javascripts",
+--~ },
+--~ },
["layouts"]={
["1"]={
- ["cs"]="vyska textu prizpusobena s -- na strane --",
- ["de"]="Texthoehe angepasst mit -- auf Seite --",
- ["en"]="textheight adapted with -- at page --",
- ["fr"]="hauteurtexte adaptée avec -- à la page --",
- ["it"]="altezza del testo adattata con -- a pagina --",
- ["nl"]="teksthoogte aangepast met -- op pagina --",
- ["no"]="teksthøyde tilpasset med -- på side --",
- ["ro"]="textheight adaptat cu -- la pagina --",
+ ["cs"]="vyska textu prizpusobena s %s na strane %s",
+ ["de"]="Texthoehe angepasst mit %s auf Seite %s",
+ ["en"]="textheight adapted with %s at page %s",
+ ["fr"]="hauteurtexte adaptée avec %s à la page %s",
+ ["it"]="altezza del testo adattata con %s a pagina %s",
+ ["nl"]="teksthoogte aangepast met %s op pagina %s",
+ ["no"]="teksthøyde tilpasset med %s på side %s",
+ ["ro"]="textheight adaptat cu %s la pagina %s",
},
["10"]={
- ["cs"]="-- a -- nedava dohromady 1.0",
- ["de"]="-- und -- ergeben zusammen nicht 1.0",
- ["en"]="-- and -- don't add up to 1.0",
- ["fr"]="-- et -- ne sont pas ajoutés à 1.0",
- ["it"]="-- e -- non sommano a 1.0",
- ["nl"]="-- en -- tellen niet op tot 1.0",
- ["no"]="-- og -- er ikke 1.0 til sammen",
- ["ro"]="-- si -- nu se adauga pana la 1.0",
+ ["cs"]="%s a %s nedava dohromady 1.0",
+ ["de"]="%s und %s ergeben zusammen nicht 1.0",
+ ["en"]="%s and %s don't add up to 1.0",
+ ["fr"]="%s et %s ne sont pas ajoutés à 1.0",
+ ["it"]="%s e %s non sommano a 1.0",
+ ["nl"]="%s en %s tellen niet op tot 1.0",
+ ["no"]="%s og %s er ikke 1.0 til sammen",
+ ["ro"]="%s si %s nu se adauga pana la 1.0",
},
["11"]={
- ["cs"]="svisla mezera -- neni povolena v pevnem radkovem rejstriku",
- ["de"]="Zwischenraum -- nicht im Grittermoduserlau",
- ["en"]="spacing -- not permitted in gridmode",
- ["fr"]="espacement -- non permis en modegrille",
- ["it"]="spaziatura -- non permessa in modo griglia",
- ["nl"]="interlinie -- niet toegestaan in gridmode",
- ["no"]="mellomrom -- ikke tillatt i gridmodus",
- ["ro"]="spatierea -- nu este permisa in gridmode",
+ ["cs"]="svisla mezera %s neni povolena v pevnem radkovem rejstriku",
+ ["de"]="Zwischenraum %s nicht im Grittermoduserlau",
+ ["en"]="spacing %s not permitted in gridmode",
+ ["fr"]="espacement %s non permis en modegrille",
+ ["it"]="spaziatura %s non permessa in modo griglia",
+ ["nl"]="interlinie %s niet toegestaan in gridmode",
+ ["no"]="mellomrom %s ikke tillatt i gridmodus",
+ ["ro"]="spatierea %s nu este permisa in gridmode",
},
["2"]={
- ["cs"]="-- krat odlozeny text umisten",
- ["de"]="-- mal verschobener Text plaziert",
- ["en"]="-- times postponed text placed",
- ["fr"]="-- times postponed text placed",
- ["it"]="posizionato testo posticipato -- volte",
- ["nl"]="-- maal uitgestelde tekst tussengevoegd",
- ["no"]="-- ganger forskjøvet tekst plassert",
- ["ro"]="textul amanat de -- ori a fost plasat",
+ ["cs"]="%s krat odlozeny text umisten",
+ ["de"]="%s mal verschobener Text plaziert",
+ ["en"]="%s times postponed text placed",
+ ["fr"]="%s times postponed text placed",
+ ["it"]="posizionato testo posticipato %s volte",
+ ["nl"]="%s maal uitgestelde tekst tussengevoegd",
+ ["no"]="%s ganger forskjøvet tekst plassert",
+ ["ro"]="textul amanat de %s ori a fost plasat",
},
["3"]={
- ["cs"]="-- krat text odlozen",
- ["de"]="-- mal Text verschoben",
- ["en"]="-- times text postponed",
- ["fr"]="-- times text postponed",
- ["it"]="testo posticipato -- volte",
- ["nl"]="-- maal tekst plaatsen uitstellen",
- ["no"]="-- ganger tekst forskjøvet",
- ["ro"]="textul amanat de -- ori",
+ ["cs"]="%s krat text odlozen",
+ ["de"]="%s mal Text verschoben",
+ ["en"]="%s times text postponed",
+ ["fr"]="%s times text postponed",
+ ["it"]="testo posticipato %s volte",
+ ["nl"]="%s maal tekst plaatsen uitstellen",
+ ["no"]="%s ganger tekst forskjøvet",
+ ["ro"]="textul amanat de %s ori",
},
["4"]={
["cs"]="okrajove bloky aktivni",
@@ -1076,14 +1022,14 @@ return {
["ro"]="blocuri marginale inactive",
},
["6"]={
- ["cs"]="sada stran -- zpracovana (velikost --)",
- ["de"]="Unterseitenfolge -- verarbeitet (Groesse --)",
- ["en"]="subpage set -- processed (size --)",
- ["fr"]="jeu de souspage -- traité (taille --)",
- ["it"]="gruppo di sottopagine -- elaborato (dimensione --)",
- ["nl"]="subpagina reeks -- verwerkt (aantal --)",
- ["no"]="delside sett -- behandlet (størrelse --)",
- ["ro"]="setul -- de subpagini procesat (dimensiunea --)",
+ ["cs"]="sada stran %s zpracovana (velikost %s)",
+ ["de"]="Unterseitenfolge %s verarbeitet (Groesse %s)",
+ ["en"]="subpage set %s processed (size %s)",
+ ["fr"]="jeu de souspage %s traité (taille %s)",
+ ["it"]="gruppo di sottopagine %s elaborato (dimensione %s)",
+ ["nl"]="subpagina reeks %s verwerkt (aantal %s)",
+ ["no"]="delside sett %s behandlet (størrelse %s)",
+ ["ro"]="setul %s de subpagini procesat (dimensiunea %s)",
},
["7"]={
["cs"]="pocita se misto pro logo",
@@ -1106,150 +1052,150 @@ return {
["ro"]="se calculeaza fundalurile",
},
["9"]={
- ["cs"]="aktualne ne vice nez -- urovne/urovni vyctu",
- ["de"]="z.Z. nicht mehr als -- Ebenen in Aufzaehlungen",
- ["en"]="currently no more than -- levels in itemizations",
- ["fr"]="pas plus de -- niveaux pour l'instant dans les élémentarisations",
- ["it"]="attualmente non più di -- livelli di elencazione",
- ["nl"]="momenteel maximaal -- niveaus in opsommingen",
- ["no"]="for øyeblikket maksimalt -- nivåer i opplisting",
- ["ro"]="acum nu se supota mai mult de -- nivele de adancime la iteratii",
+ ["cs"]="aktualne ne vice nez %s urovne/urovni vyctu",
+ ["de"]="z.Z. nicht mehr als %s Ebenen in Aufzaehlungen",
+ ["en"]="currently no more than %s levels in itemizations",
+ ["fr"]="pas plus de %s niveaux pour l'instant dans les élémentarisations",
+ ["it"]="attualmente non più di %s livelli di elencazione",
+ ["nl"]="momenteel maximaal %s niveaus in opsommingen",
+ ["no"]="for øyeblikket maksimalt %s nivåer i opplisting",
+ ["ro"]="acum nu se supota mai mult de %s nivele de adancime la iteratii",
},
["files"]={ "core-itm.tex", "page-bck.mkii", "page-bck.mkiv", "page-ini.tex", "page-log.tex", "strc-itm.tex" },
["title"]={
- ["cs"]="layout",
- ["de"]="Layout",
- ["en"]="layout",
+ ["cs"]="layouts",
+ ["de"]="Layouts",
+ ["en"]="layouts",
["fr"]="calque",
- ["it"]="layout",
- ["nl"]="layout",
- ["no"]="layout",
+ ["it"]="layouts",
+ ["nl"]="layouts",
+ ["no"]="layouts",
["ro"]="aranjamente",
},
},
- ["linguals"]={
+ ["languages"]={
["1"]={
- ["cs"]="vzory -- pro -- nacteny (n=--,e=--,m=--)",
- ["de"]="Trennmuster -- fuer -- geladen (n=--,e=--,m=--)",
- ["en"]="patterns -- for -- loaded (n=--,e=--,m=--)",
- ["fr"]="les motifs -- pour -- sont chargés (n=--,e=--,m=--)",
- ["it"]="schemi -- per -- caricati (n=--,e=--,m=--)",
- ["nl"]="afbreekpatronen -- voor -- geladen (n=--,e=--,m=--)",
- ["no"]="orddelingsmønster -- for -- er lest inn (n=--,e=--,m=--)",
- ["ro"]="sablonul -- pentru -- s-a incarcat (n=--,e=--,m=--)",
+ ["cs"]="vzory %s pro %s nacteny (n=%s,e=%s,m=%s)",
+ ["de"]="Trennmuster %s fuer %s geladen (n=%s,e=%s,m=%s)",
+ ["en"]="patterns %s for %s loaded (n=%s,e=%s,m=%s)",
+ ["fr"]="les motifs %s pour %s sont chargés (n=%s,e=%s,m=%s)",
+ ["it"]="schemi %s per %s caricati (n=%s,e=%s,m=%s)",
+ ["nl"]="afbreekpatronen %s voor %s geladen (n=%s,e=%s,m=%s)",
+ ["no"]="orddelingsmønster %s for %s er lest inn (n=%s,e=%s,m=%s)",
+ ["ro"]="sablonul %s pentru %s s-a incarcat (n=%s,e=%s,m=%s)",
},
["10"]={
- ["cs"]="vzory --nacteny",
- ["de"]="Trennmuster --geladen",
- ["en"]="patterns --loaded",
- ["fr"]="motifs -- chargés",
- ["it"]="schemi -- caricati",
- ["nl"]="patronen --geladen",
- ["no"]="orddelingsmønster -- er lest inn",
- ["ro"]="sabloanele -- incarcate",
+ ["cs"]="vzory %s nacteny",
+ ["de"]="Trennmuster %s geladen",
+ ["en"]="patterns %s loaded",
+ ["fr"]="motifs %s chargés",
+ ["it"]="schemi %s caricati",
+ ["nl"]="patronen %sgeladen",
+ ["no"]="orddelingsmønster %s er lest inn",
+ ["ro"]="sabloanele %s incarcate",
},
["2"]={
- ["cs"]="zadne vzory -- pro -- (n=--,e=--,m=--) (--,--)",
- ["de"]="Keine Trennmuster -- fuer -- (n=--,e=--,m=--) (--,--)",
- ["en"]="no patterns -- for -- (n=--,e=--,m=--) (--,--)",
- ["fr"]="pas de motifs -- pour -- (n=--,e=--,m=--) (--,--)",
- ["it"]="niente schemi -- per -- (n=--,e=--,m=--) (--,--)",
- ["nl"]="geen afbreekpatronen -- voor -- (n=--,e=--,m=--) (--,--)",
- ["no"]="ingen orddelingsmønster -- for -- (n=--,e=--,m=--) (--,--)",
- ["ro"]="nu exista sabloane -- pentru -- (n=--,e=--,m=--) (--,--)",
+ ["cs"]="zadne vzory %s pro %s (n=%s,e=%s,m=%s) (%s,%s)",
+ ["de"]="Keine Trennmuster %s fuer %s (n=%s,e=%s,m=%s) (%s,%s)",
+ ["en"]="no patterns %s for %s (n=%s,e=%s,m=%s) (%s,%s)",
+ ["fr"]="pas de motifs %s pour %s (n=%s,e=%s,m=%s) (%s,%s)",
+ ["it"]="niente schemi %s per %s (n=%s,e=%s,m=%s) (%s,%s)",
+ ["nl"]="geen afbreekpatronen %s voor %s (n=%s,e=%s,m=%s) (%s,%s)",
+ ["no"]="ingen orddelingsmønster %s for %s (n=%s,e=%s,m=%s) (%s,%s)",
+ ["ro"]="nu exista sabloane %s pentru %s (n=%s,e=%s,m=%s) (%s,%s)",
},
["3"]={
- ["cs"]="deleni slov -- pro -- nacteno (n=--,e=--,m=--)",
- ["de"]="Trenndefinitionen -- fuer -- geladen (n=--,e=--,m=--)",
- ["en"]="hyphenations -- for -- loaded (n=--,e=--,m=--)",
- ["fr"]="hyphenations -- pour -- chargés (n=--,e=--,m=--)",
- ["it"]="sillabazione -- per -- caricata (n=--,e=--,m=--)",
- ["nl"]="afbreekdefinities -- voor -- geladen (n=--,e=--,m=--)",
- ["no"]="orddelingsdefinisjon -- for -- er lest inn (n=--,e=--,m=--)",
- ["ro"]="despartirea in silabe -- pentru -- s-a incarcat (n=--,e=--,m=--)",
+ ["cs"]="deleni slov %s pro %s nacteno (n=%s,e=%s,m=%s)",
+ ["de"]="Trenndefinitionen %s fuer %s geladen (n=%s,e=%s,m=%s)",
+ ["en"]="hyphenations %s for %s loaded (n=%s,e=%s,m=%s)",
+ ["fr"]="hyphenations %s pour %s chargés (n=%s,e=%s,m=%s)",
+ ["it"]="sillabazione %s per %s caricata (n=%s,e=%s,m=%s)",
+ ["nl"]="afbreekdefinities %s voor %s geladen (n=%s,e=%s,m=%s)",
+ ["no"]="orddelingsdefinisjon %s for %s er lest inn (n=%s,e=%s,m=%s)",
+ ["ro"]="despartirea in silabe %s pentru %s s-a incarcat (n=%s,e=%s,m=%s)",
},
["4"]={
- ["cs"]="zadne deleni slov -- pro -- (n=--,e=--,m=--)",
- ["de"]="Keine Trenndefinitionen -- fuer -- (n=--,e=--,m=--)",
- ["en"]="no hyphenations -- for -- (n=--,e=--,m=--)",
- ["fr"]="pas d'hyphenations -- pour -- (n=--,e=--,m=--)",
- ["it"]="niente sillabazione -- per -- (n=--,e=--,m=--)",
- ["nl"]="geen afbreekdefinities -- voor -- (n=--,e=--,m=--)",
- ["no"]="ingen orddelingsdefinisjon -- for -- (n=--,e=--,m=--)",
- ["ro"]="nu exista despartire in silabe -- pentru -- (n=--,e=--,m=--)",
+ ["cs"]="zadne deleni slov %s pro %s (n=%s,e=%s,m=%s)",
+ ["de"]="Keine Trenndefinitionen %s fuer %s (n=%s,e=%s,m=%s)",
+ ["en"]="no hyphenations %s for %s (n=%s,e=%s,m=%s)",
+ ["fr"]="pas d'hyphenations %s pour %s (n=%s,e=%s,m=%s)",
+ ["it"]="niente sillabazione %s per %s (n=%s,e=%s,m=%s)",
+ ["nl"]="geen afbreekdefinities %s voor %s (n=%s,e=%s,m=%s)",
+ ["no"]="ingen orddelingsdefinisjon %s for %s (n=%s,e=%s,m=%s)",
+ ["ro"]="nu exista despartire in silabe %s pentru %s (n=%s,e=%s,m=%s)",
},
["5"]={
- ["cs"]="vzory pro -- nenacteny",
- ["de"]="Trennmuster fuer -- nicht geladen",
- ["en"]="patterns for -- not loaded",
- ["fr"]="les motifs pour -- ne sont pas chargés",
- ["it"]="schemi per -- non caricati",
- ["nl"]="afbreekpatronen voor -- niet geladen",
- ["no"]="orddelingsmønster for -- er ikke lest inn",
- ["ro"]="sabloanele pentru -- nu sunt incarcate",
+ ["cs"]="vzory pro %s nenacteny",
+ ["de"]="Trennmuster fuer %s nicht geladen",
+ ["en"]="patterns for %s not loaded",
+ ["fr"]="les motifs pour %s ne sont pas chargés",
+ ["it"]="schemi per %s non caricati",
+ ["nl"]="afbreekpatronen voor %s niet geladen",
+ ["no"]="orddelingsmønster for %s er ikke lest inn",
+ ["ro"]="sabloanele pentru %s nu sunt incarcate",
},
["6"]={
- ["cs"]="jazyk -- neni definovan",
- ["de"]="Sprache -- ist undefiniert",
- ["en"]="language -- is undefined",
- ["fr"]="langue -- non définie",
- ["it"]="lingua -- non definita",
- ["nl"]="taal -- is niet gedefinieerd",
- ["no"]="spràk -- er udefinert",
- ["ro"]="limba -- nu este definita",
+ ["cs"]="jazyk %s neni definovan",
+ ["de"]="Sprache %s ist undefiniert",
+ ["en"]="language %s is undefined",
+ ["fr"]="langue %s non définie",
+ ["it"]="lingua %s non definita",
+ ["nl"]="taal %s is niet gedefinieerd",
+ ["no"]="spràk %s er udefinert",
+ ["ro"]="limba %s nu este definita",
},
["7"]={
- ["cs"]="specificke volby jazyka [--] zavadeji -- (zavlecenou) mezeru",
- ["de"]="Sprachenspezifische Option [--] fuegt eine Luecke von -- ein",
- ["en"]="language specific options [--] introduce a -- skip",
- ["fr"]="les options spécifiques de langue [--] introduisent un -- saut",
- ["it"]="opzioni specifiche per la lingua [--] introducono un salto --",
- ["nl"]="taal specifieke opties [--] introduceren een skip van --",
- ["no"]="spràk spesifikk opsjon [--] introduserer et -- hopp",
- ["ro"]="optiunile specifice ale limbii [--] introduc un spatiu --",
+ ["cs"]="specificke volby jazyka [%s] zavadeji %s (zavlecenou) mezeru",
+ ["de"]="Sprachenspezifische Option [%s] fuegt eine Luecke von %s ein",
+ ["en"]="language specific options [%s] introduce a %s skip",
+ ["fr"]="les options spécifiques de langue [%s] introduisent un %s saut",
+ ["it"]="opzioni specifiche per la lingua [%s] introducono un salto %s",
+ ["nl"]="taal specifieke opties [%s] introduceren een skip van %s",
+ ["no"]="spràk spesifikk opsjon [%s] introduserer et %s hopp",
+ ["ro"]="optiunile specifice ale limbii [%s] introduc un spatiu %s",
},
["8"]={
- ["cs"]="specificke volby jazyka [--] bez mezer pripojeny",
- ["de"]="Sprachenspezifische Option [--] nahtlos hinzugefuegt",
- ["en"]="language specific options [--] seamless appended",
- ["fr"]="les options spécifiques de langue [--] sont ajoutés en douceur",
- ["it"]="opzioni specifiche per la lingua [--] aggiunte trasparentemente",
- ["nl"]="taal specifieke opties [--] naadloos toegevoegd",
- ["no"]="spràk spesifikk opsjon [--] problemfritt tilføyd",
- ["ro"]="optiunile specifice ale limbii [--] adaugate",
+ ["cs"]="specificke volby jazyka [%s] bez mezer pripojeny",
+ ["de"]="Sprachenspezifische Option [%s] nahtlos hinzugefuegt",
+ ["en"]="language specific options [%s] seamless appended",
+ ["fr"]="les options spécifiques de langue [%s] sont ajoutés en douceur",
+ ["it"]="opzioni specifiche per la lingua [%s] aggiunte trasparentemente",
+ ["nl"]="taal specifieke opties [%s] naadloos toegevoegd",
+ ["no"]="spràk spesifikk opsjon [%s] problemfritt tilføyd",
+ ["ro"]="optiunile specifice ale limbii [%s] adaugate",
},
["9"]={
- ["cs"]="language -- is active",
- ["de"]="Sprache -- ist aktiv",
- ["en"]="language -- is active",
- ["fr"]="la langue -- est active",
- ["it"]="lingua -- attiva",
- ["nl"]="taal -- is actief",
- ["no"]="spràk -- er aktivt",
- ["ro"]="limba -- este activa",
+ ["cs"]="language %s is active",
+ ["de"]="Sprache %s ist aktiv",
+ ["en"]="language %s is active",
+ ["fr"]="la langue %s est active",
+ ["it"]="lingua %s attiva",
+ ["nl"]="taal %s is actief",
+ ["no"]="spràk %s er aktivt",
+ ["ro"]="limba %s este activa",
},
["files"]={ "lang-ini.mkii", "lang-ini.mkiv" },
["title"]={
["cs"]="jazyky",
["de"]="Sprache",
- ["en"]="language",
+ ["en"]="languages",
["fr"]="langue",
["it"]="lingua",
- ["nl"]="taal",
+ ["nl"]="talen",
["no"]="sprøk",
["ro"]="limbi",
},
},
["metapost"]={
["1"]={
- ["cs"]="loading metapost library --",
- ["de"]="Lade metapost Bibliothek --",
- ["en"]="loading metapost library --",
- ["fr"]="chargement de la bibliothèque metapost --",
- ["it"]="caricamento della libreria metapost --",
- ["nl"]="metapost bibliotheek -- wordt geladen",
- ["no"]="metapost bibliotek -- blir lest inn",
- ["ro"]="se incarca biblioteca metapost --",
+ ["cs"]="loading metapost library %s",
+ ["de"]="Lade metapost Bibliothek %s",
+ ["en"]="loading metapost library %s",
+ ["fr"]="chargement de la bibliothèque metapost %s",
+ ["it"]="caricamento della libreria metapost %s",
+ ["nl"]="metapost bibliotheek %s wordt geladen",
+ ["no"]="metapost bibliotek %s blir lest inn",
+ ["ro"]="se incarca biblioteca metapost %s",
},
["files"]={ "meta-ini.mkii", "meta-ini.mkiv" },
["title"]={
@@ -1265,109 +1211,109 @@ return {
},
["references"]={
["1"]={
- ["cs"]="neznama reference --",
- ["de"]="unbekannte Referenz --",
- ["en"]="unknown reference --",
- ["fr"]="réference -- inconnue",
- ["it"]="riferimento sconosciuto --",
- ["nl"]="onbekende verwijzing --",
- ["no"]="ukjent referanse --",
- ["ro"]="referinta necunoscuta --",
+ ["cs"]="neznama reference %s",
+ ["de"]="unbekannte Referenz %s",
+ ["en"]="unknown reference %s",
+ ["fr"]="réference %s inconnue",
+ ["it"]="riferimento sconosciuto %s",
+ ["nl"]="onbekende verwijzing %s",
+ ["no"]="ukjent referanse %s",
+ ["ro"]="referinta necunoscuta %s",
},
["2"]={
- ["cs"]="duplicitni reference -- na strane --",
- ["de"]="doppelte Referenz -- auf Seite --",
- ["en"]="duplicate reference -- on page --",
- ["fr"]="réference -- dupliquée à la page --",
- ["it"]="riferimento duplicato -- a pagina --",
- ["nl"]="dubbele verwijzing -- op pagina --",
- ["no"]="duplikat referanse -- pø side --",
- ["ro"]="referinta duplicat -- la pagina --",
+ ["cs"]="duplicitni reference %s na strane %s",
+ ["de"]="doppelte Referenz %s auf Seite %s",
+ ["en"]="duplicate reference %s on page %s",
+ ["fr"]="réference %s dupliquée à la page %s",
+ ["it"]="riferimento duplicato %s a pagina %s",
+ ["nl"]="dubbele verwijzing %s op pagina %s",
+ ["no"]="duplikat referanse %s pø side %s",
+ ["ro"]="referinta duplicat %s la pagina %s",
},
["21"]={
- ["cs"]="dokument -- nacten",
- ["de"]="Dokument -- geladen",
- ["en"]="document -- loaded",
- ["fr"]="document -- chargé",
- ["it"]="documento -- caricato",
- ["nl"]="document -- geladen",
- ["no"]="dokument -- er lest inn",
- ["ro"]="documentul -- este incarcat",
+ ["cs"]="dokument %s nacten",
+ ["de"]="Dokument %s geladen",
+ ["en"]="document %s loaded",
+ ["fr"]="document %s chargé",
+ ["it"]="documento %s caricato",
+ ["nl"]="document %s geladen",
+ ["no"]="dokument %s er lest inn",
+ ["ro"]="documentul %s este incarcat",
},
["22"]={
- ["cs"]="dokument -- neni interaktivni",
- ["de"]="Dokument -- ist nicht aktiv",
- ["en"]="document -- is not interactive",
- ["fr"]="le document -- n'est pas interactif",
- ["it"]="il documento -- non ø interattivo",
- ["nl"]="document -- is niet interactief",
- ["no"]="dokument -- er ikke interaktivt",
- ["ro"]="documentul -- nu este interactiv",
+ ["cs"]="dokument %s neni interaktivni",
+ ["de"]="Dokument %s ist nicht aktiv",
+ ["en"]="document %s is not interactive",
+ ["fr"]="le document %s n'est pas interactif",
+ ["it"]="il documento %s non ø interattivo",
+ ["nl"]="document %s is niet interactief",
+ ["no"]="dokument %s er ikke interaktivt",
+ ["ro"]="documentul %s nu este interactiv",
},
["23"]={
- ["cs"]="obskurni (nejasna) reference -- (prefix=--)",
- ["de"]="Obskure Referenz -- (Prefix=--)",
- ["en"]="obscure reference -- (prefix=--)",
- ["fr"]="reference -- indéterminé (préfixe=--)",
- ["it"]="riferimento ambiguo -- (prefisso=--)",
- ["nl"]="onduidelijke verwijzing -- (prefix=--)",
- ["no"]="obskur referanse -- (Prefix=--)",
- ["ro"]="referinta obscura -- (prefix=--)",
+ ["cs"]="obskurni (nejasna) reference %s (prefix=%s)",
+ ["de"]="Obskure Referenz %s (Prefix=%s)",
+ ["en"]="obscure reference %s (prefix=%s)",
+ ["fr"]="reference %s indéterminé (préfixe=%s)",
+ ["it"]="riferimento ambiguo %s (prefisso=%s)",
+ ["nl"]="onduidelijke verwijzing %s (prefix=%s)",
+ ["no"]="obskur referanse %s (Prefix=%s)",
+ ["ro"]="referinta obscura %s (prefix=%s)",
},
["24"]={
- ["en"]="references from document '--' are not exported",
+ ["en"]="references from document '%s' are not exported",
},
["25"]={
- ["en"]="references from document '--' are not imported (export again)",
+ ["en"]="references from document '%s' are not imported (export again)",
},
["26"]={
- ["en"]="references from document '--' are imported",
+ ["en"]="references from document '%s' are imported",
},
["3"]={
- ["cs"]="neznamy typ reference --",
- ["de"]="unbekannte Referenz Typ --",
- ["en"]="unknown reference type --",
- ["fr"]="type -- de réference inconnu",
- ["it"]="riferimento di tipo sconosciuto --",
- ["nl"]="type verwijzing -- onbekend",
- ["no"]="ukjent referansetype --",
- ["ro"]="tip necunoscut de referinta --",
+ ["cs"]="neznamy typ reference %s",
+ ["de"]="unbekannte Referenz Typ %s",
+ ["en"]="unknown reference type %s",
+ ["fr"]="type %s de réference inconnu",
+ ["it"]="riferimento di tipo sconosciuto %s",
+ ["nl"]="type verwijzing %s onbekend",
+ ["no"]="ukjent referansetype %s",
+ ["ro"]="tip necunoscut de referinta %s",
},
["30"]={
- ["cs"]="neznamy objekt --",
- ["de"]="unbekanntes Object --",
- ["en"]="unknown object --",
- ["fr"]="objet -- inconnu",
- ["it"]="oggetto sconosciuto --",
- ["nl"]="onbekend object --",
- ["no"]="ukjent objekt --",
- ["ro"]="obiect necunoscut --",
+ ["cs"]="neznamy objekt %s",
+ ["de"]="unbekanntes Object %s",
+ ["en"]="unknown object %s",
+ ["fr"]="objet %s inconnu",
+ ["it"]="oggetto sconosciuto %s",
+ ["nl"]="onbekend object %s",
+ ["no"]="ukjent objekt %s",
+ ["ro"]="obiect necunoscut %s",
},
["31"]={
- ["cs"]="duplicitni object --",
- ["de"]="doppeltes Object --",
- ["en"]="duplicate object --",
- ["fr"]="objet -- dupliqué",
- ["it"]="oggetto duplicato --",
- ["nl"]="dubbel object --",
- ["no"]="duplikat objekt --",
- ["ro"]="obiect duplicat --",
+ ["cs"]="duplicitni object %s",
+ ["de"]="doppeltes Object %s",
+ ["en"]="duplicate object %s",
+ ["fr"]="objet %s dupliqué",
+ ["it"]="oggetto duplicato %s",
+ ["nl"]="dubbel object %s",
+ ["no"]="duplikat objekt %s",
+ ["ro"]="obiect duplicat %s",
},
["4"]={
- ["cs"]="nedovolena reference --",
- ["de"]="illegale Referenz --",
- ["en"]="illegal reference --",
- ["fr"]="réference -- inconnue",
- ["it"]="riferimento illecito --",
- ["nl"]="verboden verwijzing --",
- ["no"]="ulovlig referanse --",
- ["ro"]="referinta eronata --",
+ ["cs"]="nedovolena reference %s",
+ ["de"]="illegale Referenz %s",
+ ["en"]="illegal reference %s",
+ ["fr"]="réference %s inconnue",
+ ["it"]="riferimento illecito %s",
+ ["nl"]="verboden verwijzing %s",
+ ["no"]="ulovlig referanse %s",
+ ["ro"]="referinta eronata %s",
},
["5"]={
- ["en"]="number of unknown references: --",
+ ["en"]="number of unknown references: %s",
},
["6"]={
- ["en"]="number of illegal references: --",
+ ["en"]="number of illegal references: %s",
},
["files"]={ "core-obj.tex", "core-ref.tex", "strc-ref.tex" },
["title"]={
@@ -1381,175 +1327,92 @@ return {
["ro"]="referinte",
},
},
- ["regimes"]={
- ["1"]={
- ["cs"]="kodovani --",
- ["de"]="Kodierung --",
- ["en"]="regime --",
- ["fr"]="encodage --",
- ["it"]="codifica --",
- ["nl"]="regime --",
- ["no"]="koding --",
- ["ro"]="codificarea --",
- },
- ["2"]={
- ["cs"]="je nacteno kodovani --",
- ["de"]="Kodierung -- ist geladen",
- ["en"]="regime -- is loaded",
- ["fr"]="l'encodage -- est chargé",
- ["it"]="codifica -- caricata",
- ["nl"]="regime -- wordt geladen",
- ["no"]="koding -- er lest inn",
- ["ro"]="codificarea -- este Encarcata",
- },
- ["3"]={
- ["cs"]="nezname kodovani --",
- ["de"]="Unbekannte Kodierung --",
- ["en"]="unknown regime --",
- ["fr"]="encodage -- inconnu",
- ["it"]="codifica sconosciuta --",
- ["nl"]="onbekend regime --",
- ["no"]="ukjent koding --",
- ["ro"]="codificarea -- este necunoscuta",
- },
- ["files"]={ "regi-ini.mkii" },
- ["title"]={
- ["cs"]="kodovani",
- ["de"]="Kodierung",
- ["en"]="regime",
- ["fr"]="encodage",
- ["it"]="codifica",
- ["nl"]="regime",
- ["no"]="koding",
- ["ro"]="codificari",
- },
- },
- ["specials"]={
- ["1"]={
- ["cs"]="-- nacteno",
- ["de"]="-- geladen",
- ["en"]="-- loaded",
- ["fr"]="-- chargé",
- ["it"]="-- caricato",
- ["nl"]="-- geladen",
- ["no"]="-- er lest inn",
- ["ro"]="-- incarcat",
- },
- ["2"]={
- ["cs"]="neni dovoleno hlubsi zanoreni --",
- ["de"]="keine tiefere Verschachtelung erlaubt --",
- ["en"]="no deeper nesting is permitted --",
- ["fr"]="pas d'imbracations plus profondes ne sont permises --",
- ["it"]="non ø permesso un annidamento maggiore --",
- ["nl"]="verdere nesting is niet toegestaan --",
- ["no"]="dypere 'nesting' er ikke tillatt --",
- ["ro"]="nu este permis un nivel de imbricare mai mare --",
- },
- ["3"]={
- ["cs"]="-- je resetovano",
- ["de"]="-- ist zurueckgesetzt",
- ["en"]="-- is reset",
- ["fr"]="-- est remis à zéro",
- ["it"]="-- reimpostato",
- ["nl"]="-- gereset",
- ["no"]="-- er tilbakestilt",
- ["ro"]="-- s-a resetat",
- },
- ["4"]={
- ["cs"]="prikaz -- neexistuje",
- ["de"]="Befehl -- existiert nicht",
- ["en"]="command -- does not exist",
- ["fr"]="la commande -- n'existe pas",
- ["it"]="il comando -- non esiste",
- ["nl"]="commando -- bestaat niet",
- ["no"]="kommando -- eksisterer ikke",
- ["ro"]="comanda -- nu exista",
- },
- ["5"]={
- ["cs"]="nacita se definicni soubor --",
- ["de"]="lade Definitionsdatei --",
- ["en"]="loading definition file --",
- ["fr"]="chargement du fichier de définition --",
- ["it"]="caricamento del file di definizione --",
- ["nl"]="definitiefile -- wordt geladen",
- ["no"]="leser inn definisjonsfil for --",
- ["ro"]="se incarca fisierul de definitii --",
- },
- ["6"]={
- ["cs"]="zanoreni neni dovoleno",
- ["de"]="Verschachtelung nicht erlaubt",
- ["en"]="nesting is not permitted",
- ["fr"]="l'imbrication n'est pas permise",
- ["it"]="annidamento non permesso",
- ["nl"]="nesting is niet toegestaan",
- ["no"]="'nesting' er ikke tillatt",
- ["ro"]="imbricarea nu este permisa",
- },
- ["7"]={
- ["cs"]="neznamy ovladac (driver) --",
- ["de"]="unbekante Driver --",
- ["en"]="unknown driver --",
- ["fr"]="pilote -- inconnu",
- ["it"]="driver sconosciuto --",
- ["nl"]="onbekende driver --",
- ["no"]="ukjent driver --",
- ["ro"]="driver necunoscut --",
- },
- ["files"]={ "spec-ini.tex" },
- ["title"]={
- ["cs"]="speciality",
- ["de"]="spezielles",
- ["en"]="specials",
- ["fr"]="specials",
- ["it"]="specialitø",
- ["nl"]="specials",
- ["no"]="specials",
- ["ro"]="specials",
- },
- },
+--~ ["regimes"]={
+--~ ["1"]={
+--~ ["cs"]="kodovani %s",
+--~ ["de"]="Kodierung %s",
+--~ ["en"]="regime %s",
+--~ ["fr"]="encodage %s",
+--~ ["it"]="codifica %s",
+--~ ["nl"]="regime %s",
+--~ ["no"]="koding %s",
+--~ ["ro"]="codificarea %s",
+--~ },
+--~ ["2"]={
+--~ ["cs"]="je nacteno kodovani %s",
+--~ ["de"]="Kodierung %s ist geladen",
+--~ ["en"]="regime %s is loaded",
+--~ ["fr"]="l'encodage %s est chargé",
+--~ ["it"]="codifica %s caricata",
+--~ ["nl"]="regime %s wordt geladen",
+--~ ["no"]="koding %s er lest inn",
+--~ ["ro"]="codificarea %s este Encarcata",
+--~ },
+--~ ["3"]={
+--~ ["cs"]="nezname kodovani %s",
+--~ ["de"]="Unbekannte Kodierung %s",
+--~ ["en"]="unknown regime %s",
+--~ ["fr"]="encodage %s inconnu",
+--~ ["it"]="codifica sconosciuta %s",
+--~ ["nl"]="onbekend regime %s",
+--~ ["no"]="ukjent koding %s",
+--~ ["ro"]="codificarea %s este necunoscuta",
+--~ },
+--~ ["files"]={ "regi-ini.mkiv" },
+--~ ["title"]={
+--~ ["cs"]="kodovani",
+--~ ["de"]="Kodierungen",
+--~ ["en"]="regimes",
+--~ ["fr"]="encodages",
+--~ ["it"]="codifica",
+--~ ["nl"]="regimes",
+--~ ["no"]="koding",
+--~ ["ro"]="codificari",
+--~ },
+--~ },
["structures"]={
["1"]={
- ["cs"]="zacatek oddilu (sekce) --",
- ["de"]="Begin des Abschnittsblocks --",
- ["en"]="begin of sectionblock --",
- ["fr"]="début de blocsection --",
- ["it"]="inizio del blocco (sezione) --",
- ["nl"]="begin van sectieblok --",
- ["no"]="starten av blokk -- (seksjon)",
- ["ro"]="inceput de bloc sectiune --",
+ ["cs"]="zacatek oddilu (sekce) %s",
+ ["de"]="Begin des Abschnittsblocks %s",
+ ["en"]="begin of sectionblock %s",
+ ["fr"]="début de blocsection %s",
+ ["it"]="inizio del blocco (sezione) %s",
+ ["nl"]="begin van sectieblok %s",
+ ["no"]="starten av blokk %s (seksjon)",
+ ["ro"]="inceput de bloc sectiune %s",
},
["2"]={
- ["cs"]="konec oddilu (sekce) --",
- ["de"]="Ende des Abschnittsblocks --",
- ["en"]="end of sectionblock --",
- ["fr"]="fin de blocsection --",
- ["it"]="fine del blocco (sezione) --",
- ["nl"]="eind van sectieblok --",
- ["no"]="slutten av blokk -- (seksjon)",
- ["ro"]="sfarsit de bloc sectiune --",
+ ["cs"]="konec oddilu (sekce) %s",
+ ["de"]="Ende des Abschnittsblocks %s",
+ ["en"]="end of sectionblock %s",
+ ["fr"]="fin de blocsection %s",
+ ["it"]="fine del blocco (sezione) %s",
+ ["nl"]="eind van sectieblok %s",
+ ["no"]="slutten av blokk %s (seksjon)",
+ ["ro"]="sfarsit de bloc sectiune %s",
},
["files"]={ "core-sec.mkii", "core-sec.mkiv", "strc-sbe.tex" },
["title"]={
["cs"]="struktury",
- ["de"]="struktur",
- ["en"]="structure",
- ["fr"]="structure",
+ ["de"]="strukture",
+ ["en"]="structures",
+ ["fr"]="structures",
["it"]="struttura",
- ["nl"]="structuur",
+ ["nl"]="structuren",
["no"]="struktur",
["ro"]="structuri",
},
},
["symbols"]={
["1"]={
- ["cs"]="nacita se soubor symbolu --",
- ["de"]="Lade Symboldatei --",
- ["en"]="loading symbolset --",
- ["fr"]="chargement du jeu de symbole --",
- ["it"]="caricamento gruppo di simboli --",
- ["nl"]="symboolset -- wordt geladen",
- ["no"]="leser inn symbolsett --",
- ["ro"]="se incarca setul de simboluri --",
+ ["cs"]="nacita se soubor symbolu %s",
+ ["de"]="Lade Symboldatei %s",
+ ["en"]="loading symbolset %s",
+ ["fr"]="chargement du jeu de symbole %s",
+ ["it"]="caricamento gruppo di simboli %s",
+ ["nl"]="symboolset %s wordt geladen",
+ ["no"]="leser inn symbolsett %s",
+ ["ro"]="se incarca setul de simboluri %s",
},
["files"]={ "symb-ini.tex" },
["title"]={
@@ -1563,7 +1426,7 @@ return {
["ro"]="simboluri",
},
},
- ["systems"]={
+ ["system"]={
["1"]={
["cs"]="nacteni pomocneho souboru odlozeno (typemode)",
["de"]="Laden der Hilfsdatei aufgeschoben (Eingabe-Modus)",
@@ -1575,14 +1438,14 @@ return {
["ro"]="se incarca utilitarul-fisierul este amanat (typemode)",
},
["10"]={
- ["cs"]="nepouzivejte em v --",
- ["de"]="Benutzte kein em in --",
- ["en"]="don't use em in --",
- ["fr"]="n'utilisez pas em dans --",
- ["it"]="non usare em in --",
- ["nl"]="gebruik geen em in --",
- ["no"]="ikke bruk em i --",
- ["ro"]="nu folositi em in --",
+ ["cs"]="nepouzivejte em v %s",
+ ["de"]="Benutzte kein em in %s",
+ ["en"]="don't use em in %s",
+ ["fr"]="n'utilisez pas em dans %s",
+ ["it"]="non usare em in %s",
+ ["nl"]="gebruik geen em in %s",
+ ["no"]="ikke bruk em i %s",
+ ["ro"]="nu folositi em in %s",
},
["11"]={
["cs"]="vytvarim jednoduchy pomocny soubor",
@@ -1605,94 +1468,94 @@ return {
["ro"]="fisierul utilitar nu este sortat, folositi texutil",
},
["13"]={
- ["cs"]="znacka -- definovana --",
- ["de"]="Beschriftung -- definiert --",
- ["en"]="mark -- defined --",
- ["fr"]="marquage -- defini --",
- ["it"]="marcatura -- definita --",
- ["nl"]="markering -- gedefinieerd --",
- ["no"]="markering -- definert --",
- ["ro"]="marcajul -- definit --",
+ ["cs"]="znacka %s definovana %s",
+ ["de"]="Beschriftung %s definiert %s",
+ ["en"]="mark %s defined %s",
+ ["fr"]="marquage %s defini %s",
+ ["it"]="marcatura %s definita %s",
+ ["nl"]="markering %s gedefinieerd %s",
+ ["no"]="markering %s definert %s",
+ ["ro"]="marcajul %s definit %s",
},
["14"]={
- ["cs"]="vynucena nova stranka v seznamu na --",
- ["de"]="Erzwungendes Seitenumbruch in Liste bei --",
- ["en"]="forced newpage in list at --",
- ["fr"]="nouvellepage forcée dans la liste à --",
- ["it"]="nuova pagina obbligata in lista a --",
- ["nl"]="geforceerde paginaovergang in lijst voor --",
- ["no"]="tvunget sideskift i liste ved --",
- ["ro"]="s-a fortat trecere pa pagina noua in lista la --",
+ ["cs"]="vynucena nova stranka v seznamu na %s",
+ ["de"]="Erzwungendes Seitenumbruch in Liste bei %s",
+ ["en"]="forced newpage in list at %s",
+ ["fr"]="nouvellepage forcée dans la liste à %s",
+ ["it"]="nuova pagina obbligata in lista a %s",
+ ["nl"]="geforceerde paginaovergang in lijst voor %s",
+ ["no"]="tvunget sideskift i liste ved %s",
+ ["ro"]="s-a fortat trecere pa pagina noua in lista la %s",
},
["15"]={
- ["cs"]="uklada se buffer --",
- ["de"]="Speichere Buffer --",
- ["en"]="saving buffer --",
- ["fr"]="sauvegarde du tampon (buffer) --",
- ["it"]="salvataggio del buffer --",
- ["nl"]="wegschrijven buffer --",
- ["no"]="lagrer Buffer --",
- ["ro"]="buffer salvat --",
+ ["cs"]="uklada se buffer %s",
+ ["de"]="Speichere Buffer %s",
+ ["en"]="saving buffer %s",
+ ["fr"]="sauvegarde du tampon (buffer) %s",
+ ["it"]="salvataggio del buffer %s",
+ ["nl"]="wegschrijven buffer %s",
+ ["no"]="lagrer Buffer %s",
+ ["ro"]="buffer salvat %s",
},
["16"]={
- ["cs"]="sazi se buffer --",
- ["de"]="Setzte Buffer --",
- ["en"]="typesetting buffer --",
- ["fr"]="composition du tampon (buffer) --",
- ["it"]="composizione del buffer --",
- ["nl"]="inlezen buffer --",
- ["no"]="tegnsetter buffer --",
- ["ro"]="buffer-ul -- s-a cules",
+ ["cs"]="sazi se buffer %s",
+ ["de"]="Setzte Buffer %s",
+ ["en"]="typesetting buffer %s",
+ ["fr"]="composition du tampon (buffer) %s",
+ ["it"]="composizione del buffer %s",
+ ["nl"]="inlezen buffer %s",
+ ["no"]="tegnsetter buffer %s",
+ ["ro"]="buffer-ul %s s-a cules",
},
["17"]={
- ["cs"]="sazi se doslovny (verbatim) buffer --",
- ["de"]="Setzte tippen-Buffer --",
- ["en"]="typesetting verbatim buffer --",
- ["fr"]="composition textuelle du tampon (buffer) --",
- ["it"]="composizione verbatim del buffer --",
- ["nl"]="verbatim inlezen buffer --",
- ["no"]="tegnsetter verbatim-buffer --",
- ["ro"]="se culege buffer-ul verbatim --",
+ ["cs"]="sazi se doslovny (verbatim) buffer %s",
+ ["de"]="Setzte tippen-Buffer %s",
+ ["en"]="typesetting verbatim buffer %s",
+ ["fr"]="composition textuelle du tampon (buffer) %s",
+ ["it"]="composizione verbatim del buffer %s",
+ ["nl"]="verbatim inlezen buffer %s",
+ ["no"]="tegnsetter verbatim-buffer %s",
+ ["ro"]="se culege buffer-ul verbatim %s",
},
["18"]={
- ["cs"]="synonymum -- -- neexistuje",
- ["de"]="Synonym -- -- existiert nicht",
- ["en"]="synonym -- -- does not exist",
- ["fr"]="le synonyme -- -- n'existe pas",
- ["it"]="sinonimo -- -- non esistente",
- ["nl"]="synoniem -- -- bestaat niet",
- ["no"]="synonym -- -- eksisterer ikke",
- ["ro"]="sinonimul -- -- nu exista",
+ ["cs"]="synonymum %s %s neexistuje",
+ ["de"]="Synonym %s %s existiert nicht",
+ ["en"]="synonym %s %s does not exist",
+ ["fr"]="le synonyme %s %s n'existe pas",
+ ["it"]="sinonimo %s %s non esistente",
+ ["nl"]="synoniem %s %s bestaat niet",
+ ["no"]="synonym %s %s eksisterer ikke",
+ ["ro"]="sinonimul %s %s nu exista",
},
["19"]={
- ["cs"]="vyznam (synonyma) -- nacten",
- ["de"]="Bedeutung (synonyme) von -- geladen",
- ["en"]="meaning (synonyms) of -- loaded",
- ["fr"]="signification (synonymes) de -- chargée",
- ["it"]="significato (sinonimi) di -- caricato",
- ["nl"]="betekenissen (synoniemen) van -- geladen",
- ["no"]="betydning (synonymer) av -- er lest inn",
- ["ro"]="intelesul (sinonimele) pentru -- incarcat",
+ ["cs"]="vyznam (synonyma) %s nacten",
+ ["de"]="Bedeutung (synonyme) von %s geladen",
+ ["en"]="meaning (synonyms) of %s loaded",
+ ["fr"]="signification (synonymes) de %s chargée",
+ ["it"]="significato (sinonimi) di %s caricato",
+ ["nl"]="betekenissen (synoniemen) van %s geladen",
+ ["no"]="betydning (synonymer) av %s er lest inn",
+ ["ro"]="intelesul (sinonimele) pentru %s incarcat",
},
["2"]={
- ["cs"]="-- nacteno",
- ["de"]="-- geladen",
- ["en"]="-- loaded",
- ["fr"]="-- chargé",
- ["it"]="-- caricato",
- ["nl"]="-- geladen",
- ["no"]="-- er lest inn",
- ["ro"]="-- s-a incarcat",
+ ["cs"]="%s nacteno",
+ ["de"]="%s geladen",
+ ["en"]="%s loaded",
+ ["fr"]="%s chargé",
+ ["it"]="%s caricato",
+ ["nl"]="%s geladen",
+ ["no"]="%s er lest inn",
+ ["ro"]="%s s-a incarcat",
},
["20"]={
- ["cs"]="vyznam (trideni) -- nacten",
- ["de"]="Bedeutung (sortieren) von -- geladen",
- ["en"]="meaning (sorts) of -- loaded",
- ["fr"]="signification (tris) de -- chargée",
- ["it"]="significato (specie) di -- caricato",
- ["nl"]="betekenissen (sorteren) van -- geladen",
- ["no"]="betydning (sorterer) av -- er lest inn",
- ["ro"]="intelesul (ordinea) pentru -- incarcat",
+ ["cs"]="vyznam (trideni) %s nacten",
+ ["de"]="Bedeutung (sortieren) von %s geladen",
+ ["en"]="meaning (sorts) of %s loaded",
+ ["fr"]="signification (tris) de %s chargée",
+ ["it"]="significato (specie) di %s caricato",
+ ["nl"]="betekenissen (sorteren) van %s geladen",
+ ["no"]="betydning (sorterer) av %s er lest inn",
+ ["ro"]="intelesul (ordinea) pentru %s incarcat",
},
["21"]={
["cs"]="pomocny soubor necten",
@@ -1715,14 +1578,14 @@ return {
["ro"]="folositi un fisier utilitar valid",
},
["23"]={
- ["cs"]="-- upraveno na --",
- ["de"]="-- angeordnet auf --",
- ["en"]="-- arranged at --",
- ["fr"]="-- arrangé à --",
- ["it"]="-- sistemato a --",
- ["nl"]="-- gearrangeerd op --",
- ["no"]="-- arrangert på --",
- ["ro"]="-- aranjat la --",
+ ["cs"]="%s upraveno na %s",
+ ["de"]="%s angeordnet auf %s",
+ ["en"]="%s arranged at %s",
+ ["fr"]="%s arrangé à %s",
+ ["it"]="%s sistemato a %s",
+ ["nl"]="%s gearrangeerd op %s",
+ ["no"]="%s arrangert på %s",
+ ["ro"]="%s aranjat la %s",
},
["24"]={
["cs"]="plovouci bloky",
@@ -1765,54 +1628,54 @@ return {
["ro"]="Versiune",
},
["4"]={
- ["cs"]="prikaz -- je jiz definovan",
- ["de"]="Befehl -- ist bereits definiert",
- ["en"]="command -- is already defined",
- ["fr"]="la commande -- est déjà définie",
- ["it"]="comando -- già definito",
- ["nl"]="commando -- is al gedefinieerd",
- ["no"]="kommando -- er allerede definert",
- ["ro"]="comanda -- este deja definita",
+ ["cs"]="prikaz %s je jiz definovan",
+ ["de"]="Befehl %s ist bereits definiert",
+ ["en"]="command %s is already defined",
+ ["fr"]="la commande %s est déjà définie",
+ ["it"]="comando %s già definito",
+ ["nl"]="commando %s is al gedefinieerd",
+ ["no"]="kommando %s er allerede definert",
+ ["ro"]="comanda %s este deja definita",
},
["41"]={
- ["cs"]="externi soubor -- ve skupine -- neexistuje",
- ["de"]="Externe Datei -- in Gruppe -- existiert nicht",
- ["en"]="external file -- in group -- does not exist",
- ["fr"]="le fichier externe -- du groupe -- n'existe pas",
- ["it"]="il file esterno -- del gruppo -- non esiste",
- ["nl"]="externe file -- in groep -- bestaat niet",
- ["no"]="ekstern fil -- i gruppe -- eksisterer ikke",
- ["ro"]="fisierul extern -- din grupul -- nu exista",
+ ["cs"]="externi soubor %s ve skupine %s neexistuje",
+ ["de"]="Externe Datei %s in Gruppe %s existiert nicht",
+ ["en"]="external file %s in group %s does not exist",
+ ["fr"]="le fichier externe %s du groupe %s n'existe pas",
+ ["it"]="il file esterno %s del gruppo %s non esiste",
+ ["nl"]="externe file %s in groep %s bestaat niet",
+ ["no"]="ekstern fil %s i gruppe %s eksisterer ikke",
+ ["ro"]="fisierul extern %s din grupul %s nu exista",
},
["5"]={
- ["cs"]="makra z -- nactena",
- ["de"]="Modul -- geladen",
- ["en"]="module -- loaded",
- ["fr"]="module -- chargé",
- ["it"]="macro del modulo -- caricate",
- ["nl"]="module -- geladen",
- ["no"]="makroene i modul -- er lest inn",
- ["ro"]="macro-urile din modulul -- s-au incarcat",
+ ["cs"]="makra z %s nactena",
+ ["de"]="Modul %s geladen",
+ ["en"]="module %s loaded",
+ ["fr"]="module %s chargé",
+ ["it"]="macro del modulo %s caricate",
+ ["nl"]="module %s geladen",
+ ["no"]="makroene i modul %s er lest inn",
+ ["ro"]="macro-urile din modulul %s s-au incarcat",
},
["6"]={
- ["cs"]="zadna makra v -- nenalezena",
- ["de"]="Modul -- gefunden",
- ["en"]="module -- not found",
- ["fr"]="module -- non trouvé",
- ["it"]="nessuna macro trovata nel modulo --",
- ["nl"]="geen module -- gevonden",
- ["no"]="ingen makroer funnet i modul ---",
- ["ro"]="nu s-au gasit macro-uri in modulul --",
+ ["cs"]="zadna makra v %s nenalezena",
+ ["de"]="Modul %s gefunden",
+ ["en"]="module %s not found",
+ ["fr"]="module %s non trouvé",
+ ["it"]="nessuna macro trovata nel modulo %s",
+ ["nl"]="geen module %s gevonden",
+ ["no"]="ingen makroer funnet i modul %s-",
+ ["ro"]="nu s-au gasit macro-uri in modulul %s",
},
["7"]={
- ["cs"]="makra z -- jsou jiz nactena",
- ["de"]="Modul -- bereits geladen",
- ["en"]="module -- already loaded",
- ["fr"]="module -- déjà chargé",
- ["it"]="macro del modulo -- già caricate",
- ["nl"]="module -- reeds geladen",
- ["no"]="makroene i modul -- er allerede lest inn",
- ["ro"]="macro-urile din modulul -- s-au incarcat deja",
+ ["cs"]="makra z %s jsou jiz nactena",
+ ["de"]="Modul %s bereits geladen",
+ ["en"]="module %s already loaded",
+ ["fr"]="module %s déjà chargé",
+ ["it"]="macro del modulo %s già caricate",
+ ["nl"]="module %s reeds geladen",
+ ["no"]="makroene i modul %s er allerede lest inn",
+ ["ro"]="macro-urile din modulul %s s-au incarcat deja",
},
["8"]={
["cs"]="nova verze pomocneho souboru, je treba druheho behu",
@@ -1825,18 +1688,18 @@ return {
["ro"]="o noua versiune de fisier utilitar, este necesara o noua trecere",
},
["9"]={
- ["cs"]="-- nenalezeno/nezpracovano",
- ["de"]="-- nicht gefunden/verarbeitet",
- ["en"]="-- not found/processed",
- ["fr"]="-- non trouvé/traité",
- ["it"]="-- non trovato/elaborato",
- ["nl"]="-- niet gevonden/geplaatst",
- ["no"]="-- ikke funnet/behandlet",
- ["ro"]="-- nu este gasit/procesat",
+ ["cs"]="%s nenalezeno/nezpracovano",
+ ["de"]="%s nicht gefunden/verarbeitet",
+ ["en"]="%s not found/processed",
+ ["fr"]="%s non trouvé/traité",
+ ["it"]="%s non trovato/elaborato",
+ ["nl"]="%s niet gevonden/geplaatst",
+ ["no"]="%s ikke funnet/behandlet",
+ ["ro"]="%s nu este gasit/procesat",
},
["91"]={
- ["en"]="papertray --",
- ["nl"]="papierlade --",
+ ["en"]="papertray %s",
+ ["nl"]="papierlade %s",
},
["files"]={ "core-mis.tex", "page-ini.tex", "prag-gen.tex", "strc-mar.tex" },
["title"]={
@@ -1862,54 +1725,54 @@ return {
["ro"]="o noua versiune, este nevoie de inca o trecere",
},
["10"]={
- ["cs"]="-- nacteno a zpracovano",
- ["de"]="-- geladen und verarbeitet",
- ["en"]="-- loaded and processed",
- ["fr"]="-- chargé et traité",
- ["it"]="-- caricato ed elaborato",
- ["nl"]="-- geladen en verwerkt",
- ["no"]="-- lest inn og behandlet",
- ["ro"]="-- incarcat si procesat",
+ ["cs"]="%s nacteno a zpracovano",
+ ["de"]="%s geladen und verarbeitet",
+ ["en"]="%s loaded and processed",
+ ["fr"]="%s chargé et traité",
+ ["it"]="%s caricato ed elaborato",
+ ["nl"]="%s geladen en verwerkt",
+ ["no"]="%s lest inn og behandlet",
+ ["ro"]="%s incarcat si procesat",
},
["11"]={
- ["cs"]="-- nacteno a vysazeno",
- ["de"]="-- geladen und gesetzt",
- ["en"]="-- loaded and typeset",
- ["fr"]="-- chargé et composé",
- ["it"]="-- caricato e composto",
- ["nl"]="-- geladen en geplaatst",
- ["no"]="-- lest inn og tegnsatt",
- ["ro"]="-- incarcat si cules",
+ ["cs"]="%s nacteno a vysazeno",
+ ["de"]="%s geladen und gesetzt",
+ ["en"]="%s loaded and typeset",
+ ["fr"]="%s chargé et composé",
+ ["it"]="%s caricato e composto",
+ ["nl"]="%s geladen en geplaatst",
+ ["no"]="%s lest inn og tegnsatt",
+ ["ro"]="%s incarcat si cules",
},
["12"]={
- ["cs"]="-- preskoceno",
- ["de"]="-- ausgelassen",
- ["en"]="-- skipped",
- ["fr"]="-- sauté",
- ["it"]="-- saltato",
- ["nl"]="-- overgeslagen",
- ["no"]="-- utelatt",
- ["ro"]="-- sarit peste",
+ ["cs"]="%s preskoceno",
+ ["de"]="%s ausgelassen",
+ ["en"]="%s skipped",
+ ["fr"]="%s sauté",
+ ["it"]="%s saltato",
+ ["nl"]="%s overgeslagen",
+ ["no"]="%s utelatt",
+ ["ro"]="%s sarit peste",
},
["2"]={
- ["cs"]="zapisuji bloky do --",
- ["de"]="schreibe Bloecke zu --",
- ["en"]="writing blocks to --",
- ["fr"]="ecriture des blocs vers --",
- ["it"]="scrittura dei blocchi su --",
- ["nl"]="wegschrijven blokken naar --",
- ["no"]="skriver blokker til --",
- ["ro"]="se scriu blocurile in --",
+ ["cs"]="zapisuji bloky do %s",
+ ["de"]="schreibe Bloecke zu %s",
+ ["en"]="writing blocks to %s",
+ ["fr"]="ecriture des blocs vers %s",
+ ["it"]="scrittura dei blocchi su %s",
+ ["nl"]="wegschrijven blokken naar %s",
+ ["no"]="skriver blokker til %s",
+ ["ro"]="se scriu blocurile in %s",
},
["3"]={
- ["cs"]="ctu bloky z --",
- ["de"]="lese Bloecke von --",
- ["en"]="reading blocks from --",
- ["fr"]="lecture des blocs en provenance de --",
- ["it"]="lettura dei blocchi da --",
- ["nl"]="inlezen blokken uit --",
- ["no"]="leser blokker fra --",
- ["ro"]="se citesc blocurile din --",
+ ["cs"]="ctu bloky z %s",
+ ["de"]="lese Bloecke von %s",
+ ["en"]="reading blocks from %s",
+ ["fr"]="lecture des blocs en provenance de %s",
+ ["it"]="lettura dei blocchi da %s",
+ ["nl"]="inlezen blokken uit %s",
+ ["no"]="leser blokker fra %s",
+ ["ro"]="se citesc blocurile din %s",
},
["4"]={
["cs"]="je treba druhy beh",
@@ -1922,54 +1785,54 @@ return {
["ro"]="este nevoie de inca o trecere",
},
["5"]={
- ["cs"]="-- neni skryto",
- ["de"]="-- nicht verborgen",
- ["en"]="-- not hidden",
- ["fr"]="-- non caché",
- ["it"]="-- non nascosto",
- ["nl"]="-- niet verborgen",
- ["no"]="-- ikke skjult",
- ["ro"]="-- nu este ascuns",
+ ["cs"]="%s neni skryto",
+ ["de"]="%s nicht verborgen",
+ ["en"]="%s not hidden",
+ ["fr"]="%s non caché",
+ ["it"]="%s non nascosto",
+ ["nl"]="%s niet verborgen",
+ ["no"]="%s ikke skjult",
+ ["ro"]="%s nu este ascuns",
},
["6"]={
- ["cs"]="-- skryto a zpracovano",
- ["de"]="-- verborgen und verarbeitet",
- ["en"]="-- hidden and processed",
- ["fr"]="-- caché et traité",
- ["it"]="-- nascosto ed elaborato",
- ["nl"]="-- verborgen en verwerkt",
- ["no"]="-- skjult og behandlet",
- ["ro"]="-- ascuns si procesat",
+ ["cs"]="%s skryto a zpracovano",
+ ["de"]="%s verborgen und verarbeitet",
+ ["en"]="%s hidden and processed",
+ ["fr"]="%s caché et traité",
+ ["it"]="%s nascosto ed elaborato",
+ ["nl"]="%s verborgen en verwerkt",
+ ["no"]="%s skjult og behandlet",
+ ["ro"]="%s ascuns si procesat",
},
["7"]={
- ["cs"]="-- skryto",
- ["de"]="-- verborgen",
- ["en"]="-- hidden",
- ["fr"]="-- caché",
- ["it"]="-- nascosto",
- ["nl"]="-- verborgen",
- ["no"]="-- skjult",
- ["ro"]="-- ascuns",
+ ["cs"]="%s skryto",
+ ["de"]="%s verborgen",
+ ["en"]="%s hidden",
+ ["fr"]="%s caché",
+ ["it"]="%s nascosto",
+ ["nl"]="%s verborgen",
+ ["no"]="%s skjult",
+ ["ro"]="%s ascuns",
},
["8"]={
- ["cs"]="-- vysazeno",
- ["de"]="-- gesetzt",
- ["en"]="-- typeset",
- ["fr"]="-- composé",
- ["it"]="-- composto",
- ["nl"]="-- gehandhaafd",
- ["no"]="-- tegnsatt",
- ["ro"]="-- cules",
+ ["cs"]="%s vysazeno",
+ ["de"]="%s gesetzt",
+ ["en"]="%s typeset",
+ ["fr"]="%s composé",
+ ["it"]="%s composto",
+ ["nl"]="%s gehandhaafd",
+ ["no"]="%s tegnsatt",
+ ["ro"]="%s cules",
},
["9"]={
- ["cs"]="-- nevysazeno",
- ["de"]="-- nicht gesetzt",
- ["en"]="-- not typeset",
- ["fr"]="-- non composé",
- ["it"]="-- non composto",
- ["nl"]="-- niet gehandhaafd",
- ["no"]="-- ikke tegnsatt",
- ["ro"]="-- nu este cules",
+ ["cs"]="%s nevysazeno",
+ ["de"]="%s nicht gesetzt",
+ ["en"]="%s not typeset",
+ ["fr"]="%s non composé",
+ ["it"]="%s non composto",
+ ["nl"]="%s niet gehandhaafd",
+ ["no"]="%s ikke tegnsatt",
+ ["ro"]="%s nu este cules",
},
["files"]={ "core-blk.tex" },
["title"]={
@@ -1985,14 +1848,14 @@ return {
},
["verbatims"]={
["1"]={
- ["cs"]="soubor -- neexistuje",
- ["de"]="Datei -- existiert nicht",
- ["en"]="file -- does not exist",
- ["fr"]="le fichier -- n'existe pas",
- ["it"]="il file -- non esiste",
- ["nl"]="file -- bestaat niet",
- ["no"]="fil -- eksisterer ikke",
- ["ro"]="fisierul -- nu exista",
+ ["cs"]="soubor %s neexistuje",
+ ["de"]="Datei %s existiert nicht",
+ ["en"]="file %s does not exist",
+ ["fr"]="le fichier %s n'existe pas",
+ ["it"]="il file %s non esiste",
+ ["nl"]="file %s bestaat niet",
+ ["no"]="fil %s eksisterer ikke",
+ ["ro"]="fisierul %s nu exista",
},
["files"]={ "core-ver.tex" },
["title"]={
@@ -2006,47 +1869,47 @@ return {
["ro"]="verbatim",
},
},
- ["versions"]={
- ["1"]={
- ["cs"]="postradam @+",
- ["de"]="fehlendes @+",
- ["en"]="missing @+",
- ["fr"]="@+ manquant",
- ["it"]="@+ mancante",
- ["nl"]="er mankeert een @+",
- ["no"]="manglende @+",
- ["ro"]="lipseste @+",
- },
- ["2"]={
- ["cs"]="oznacuji se strany",
- ["de"]="Erstelle Seiten",
- ["en"]="marking pages",
- ["fr"]="marquage des pages",
- ["it"]="marcatura pagine",
- ["nl"]="markeren pagina's",
- ["no"]="markerer sider",
- ["ro"]="pagini marcate",
- },
- ["3"]={
- ["cs"]="oznacene strany: --",
- ["de"]="Ausgewaehlte Seiten: --",
- ["en"]="selected pages: --",
- ["fr"]="pages sélectionnées : --",
- ["it"]="pagine selezionate: --",
- ["nl"]="geselecteerde pagina's: --",
- ["no"]="valgte sider: --",
- ["ro"]="pagini selectate: --",
- },
- ["files"]={ "core-int.tex" },
- ["title"]={
- ["cs"]="verze",
- ["de"]="Version",
- ["en"]="version",
- ["fr"]="version",
- ["it"]="version",
- ["nl"]="versie",
- ["no"]="versjon",
- ["ro"]="versiuni",
- },
- },
+--~ ["versions"]={
+--~ ["1"]={
+--~ ["cs"]="postradam @+",
+--~ ["de"]="fehlendes @+",
+--~ ["en"]="missing @+",
+--~ ["fr"]="@+ manquant",
+--~ ["it"]="@+ mancante",
+--~ ["nl"]="er mankeert een @+",
+--~ ["no"]="manglende @+",
+--~ ["ro"]="lipseste @+",
+--~ },
+--~ ["2"]={
+--~ ["cs"]="oznacuji se strany",
+--~ ["de"]="Erstelle Seiten",
+--~ ["en"]="marking pages",
+--~ ["fr"]="marquage des pages",
+--~ ["it"]="marcatura pagine",
+--~ ["nl"]="markeren pagina's",
+--~ ["no"]="markerer sider",
+--~ ["ro"]="pagini marcate",
+--~ },
+--~ ["3"]={
+--~ ["cs"]="oznacene strany: %s",
+--~ ["de"]="Ausgewaehlte Seiten: %s",
+--~ ["en"]="selected pages: %s",
+--~ ["fr"]="pages sélectionnées : %s",
+--~ ["it"]="pagine selezionate: %s",
+--~ ["nl"]="geselecteerde pagina's: %s",
+--~ ["no"]="valgte sider: %s",
+--~ ["ro"]="pagini selectate: %s",
+--~ },
+--~ ["files"]={ "core-int.tex" },
+--~ ["title"]={
+--~ ["cs"]="verze",
+--~ ["de"]="Version",
+--~ ["en"]="version",
+--~ ["fr"]="version",
+--~ ["it"]="version",
+--~ ["nl"]="versie",
+--~ ["no"]="versjon",
+--~ ["ro"]="versiuni",
+--~ },
+--~ },
}
diff --git a/tex/context/base/mult-mpe.mkii b/tex/context/base/mult-mpe.mkii
index c9c56bcc5..a8d429356 100644
--- a/tex/context/base/mult-mpe.mkii
+++ b/tex/context/base/mult-mpe.mkii
@@ -88,7 +88,7 @@
\setinterfacemessage{linguals}{9}{language -- is active}
\setinterfacemessage{linguals}{8}{language specific options [--] seamless appended}
\setinterfacemessage{linguals}{title}{language}
-\setinterfacemessage{linguals}{10}{patterns --loaded}
+\setinterfacemessage{linguals}{10}{patterns -- loaded}
\setinterfacemessage{verbatims}{1}{file -- does not exist}
\setinterfacemessage{verbatims}{title}{verbatim}
\setinterfacemessage{filters}{1}{filter -- is loaded}
diff --git a/tex/context/base/mult-sys.mkiv b/tex/context/base/mult-sys.mkiv
index a0bd7d6b3..853168f63 100644
--- a/tex/context/base/mult-sys.mkiv
+++ b/tex/context/base/mult-sys.mkiv
@@ -64,7 +64,7 @@
\definesystemconstant {russian} \definesystemconstant {ru}
\definesystemconstant {slovak} \definesystemconstant {sk}
\definesystemconstant {slovenian} \definesystemconstant {sl}
-\definesystemconstant {slovene}
+\definesystemconstant {slovene} % obsolete
\definesystemconstant {spanish} \definesystemconstant {es}
\definesystemconstant {swedish} \definesystemconstant {sv}
\definesystemconstant {turkish} \definesystemconstant {tr}
@@ -135,7 +135,6 @@
\definemessageconstant {check}
\definemessageconstant {colors}
\definemessageconstant {columns}
-\definemessageconstant {encodings}
\definemessageconstant {regimes}
\definemessageconstant {figures}
\definemessageconstant {fields}
@@ -144,14 +143,13 @@
\definemessageconstant {fonts}
\definemessageconstant {handlings}
\definemessageconstant {interactions}
-\definemessageconstant {javascript}
+\definemessageconstant {javascripts}
\definemessageconstant {layouts}
-\definemessageconstant {linguals}
+\definemessageconstant {languages}
\definemessageconstant {references}
-\definemessageconstant {specials}
\definemessageconstant {structures}
\definemessageconstant {symbols}
-\definemessageconstant {systems}
+\definemessageconstant {system}
\definemessageconstant {lua}
\definemessageconstant {textblocks}
\definemessageconstant {verbatims}
@@ -265,6 +263,8 @@
\definesystemconstant {extensions}
\definesystemconstant {initializations}
+\definesystemconstant {system} % not yet interfaces messages
+
%D Just to be complete we define the standard \TEX\ units.
\definesystemconstant {cm}
diff --git a/tex/context/base/node-aux.lua b/tex/context/base/node-aux.lua
index 2fd6fc005..a916e9ed1 100644
--- a/tex/context/base/node-aux.lua
+++ b/tex/context/base/node-aux.lua
@@ -153,7 +153,7 @@ nodes.unsetattributes = unset_attributes
-- local u = floor(x / 0x8000) * n + f -- 0100000
-- local v = floor(u % d) * 0x8000 + f -- 0100000
-- if floor(u / d) >= 0x8000 then -- 0100000
--- logs.error("parbuilder",'arith_error')
+-- report_parbuilders('arith_error')
-- else
-- u = 0x8000 * floor(u / d) + floor(v / d) -- 0100000
-- end
diff --git a/tex/context/base/node-fnt.lua b/tex/context/base/node-fnt.lua
index 2eceb5dae..dfb57d9c5 100644
--- a/tex/context/base/node-fnt.lua
+++ b/tex/context/base/node-fnt.lua
@@ -14,9 +14,9 @@ local concat = table.concat
local trace_characters = false trackers.register("nodes.characters", function(v) trace_characters = v end)
local trace_fontrun = false trackers.register("nodes.fontrun", function(v) trace_fontrun = v end)
-local report_fontrun = logs.new("font run")
+local report_fonts = logs.new("fonts","processing")
-local nodes, node = nodes, node
+local nodes, node = nodes, node
fonts = fonts or { }
fonts.tfm = fonts.tfm or { }
@@ -51,16 +51,16 @@ function handlers.characters(head)
local a, u, prevfont, prevattr = 0, 0, nil, 0
if trace_fontrun then
run = run + 1
- report_fontrun("")
- report_fontrun("node mode run %s",run)
- report_fontrun("")
+ report_fonts()
+ report_fonts("checking node list, run %s",run)
+ report_fonts()
local n = head
while n do
if n.id == glyph_code then
local font, attr = n.font, has_attribute(n,0) or 0
- report_run("font %03i dynamic %03i glyph %s",font,attr,utf.char(n.char))
+ report_fonts("font %03i, dynamic %03i, glyph %s",font,attr,utf.char(n.char))
else
- report_run("[%s]",nodecodes[n.id])
+ report_fonts("[%s]",nodecodes[n.id])
end
n = n.next
end
@@ -112,10 +112,10 @@ function handlers.characters(head)
end
end
if trace_fontrun then
- report_fontrun("")
- report_fontrun("statics : %s",(u > 0 and concat(table.keys(usedfonts)," ")) or "none")
- report_fontrun("dynamics: %s",(a > 0 and concat(table.keys(attrfonts)," ")) or "none")
- report_fontrun("")
+ report_fonts()
+ report_fonts("statics : %s",(u > 0 and concat(table.keys(usedfonts)," ")) or "none")
+ report_fonts("dynamics: %s",(a > 0 and concat(table.keys(attrfonts)," ")) or "none")
+ report_fonts()
end
-- we could combine these and just make the attribute nil
if u == 1 then
diff --git a/tex/context/base/node-inj.lua b/tex/context/base/node-inj.lua
index a55ea284d..836b01085 100644
--- a/tex/context/base/node-inj.lua
+++ b/tex/context/base/node-inj.lua
@@ -17,7 +17,7 @@ local next = next
local trace_injections = false trackers.register("nodes.injections", function(v) trace_injections = v end)
-local report_injections = logs.new("injections")
+local report_injections = logs.new("nodes","injections")
local attributes, nodes, node = attributes, nodes, node
diff --git a/tex/context/base/node-mig.lua b/tex/context/base/node-mig.lua
index 24f01fbff..fb6b4570a 100644
--- a/tex/context/base/node-mig.lua
+++ b/tex/context/base/node-mig.lua
@@ -26,7 +26,7 @@ local migrated = attributes.private("migrated")
local trace_migrations = false trackers.register("nodes.migrations", function(v) trace_migrations = v end)
-local report_nodes = logs.new("nodes")
+local report_nodes = logs.new("nodes","migrations")
local migrate_inserts, migrate_marks
diff --git a/tex/context/base/node-mig.mkiv b/tex/context/base/node-mig.mkiv
index 337703611..c07f5ed5b 100644
--- a/tex/context/base/node-mig.mkiv
+++ b/tex/context/base/node-mig.mkiv
@@ -54,7 +54,7 @@
\to \everyautomigratefootnotes
\appendtoks
- \writestatus\m!systems{migration of marks is normally not needed}%
+ \writestatus\m!system{migration of marks is normally not needed}%
\enableexperiments[marks.migrate]%
\to \everyautomigratemarks
diff --git a/tex/context/base/node-pro.lua b/tex/context/base/node-pro.lua
index 5f0c555a6..19ebcdd03 100644
--- a/tex/context/base/node-pro.lua
+++ b/tex/context/base/node-pro.lua
@@ -12,7 +12,7 @@ local format, concat = string.format, table.concat
local trace_callbacks = false trackers.register("nodes.callbacks", function(v) trace_callbacks = v end)
-local report_nodes = logs.new("nodes")
+local report_nodes = logs.new("nodes","processors")
local nodes, node = nodes, node
diff --git a/tex/context/base/node-ref.lua b/tex/context/base/node-ref.lua
index e82065ee7..e0aa65c6c 100644
--- a/tex/context/base/node-ref.lua
+++ b/tex/context/base/node-ref.lua
@@ -39,7 +39,9 @@ local trace_backend = false trackers.register("nodes.backend", functi
local trace_references = false trackers.register("nodes.references", function(v) trace_references = v end)
local trace_destinations = false trackers.register("nodes.destinations", function(v) trace_destinations = v end)
-local report_backends = logs.new("backends")
+local report_reference = logs.new("backend","references")
+local report_destination = logs.new("backend","destinations")
+local report_area = logs.new("backend","areas")
local nodecodes = nodes.nodecodes
local skipcodes = nodes.skipcodes
@@ -107,14 +109,14 @@ local function inject_range(head,first,last,reference,make,stack,parent,pardir,t
if result and resolved then
if head == first then
if trace_backend then
- report_backends("head: %04i %s %s %s => w=%s, h=%s, d=%s, c=%s",reference,pardir or "---",txtdir or "----",tosequence(first,last,true),width,height,depth,resolved)
+ report_area("head: %04i %s %s %s => w=%s, h=%s, d=%s, c=%s",reference,pardir or "---",txtdir or "----",tosequence(first,last,true),width,height,depth,resolved)
end
result.next = first
first.prev = result
return result, last
else
if trace_backend then
- report_backends("middle: %04i %s %s => w=%s, h=%s, d=%s, c=%s",reference,pardir or "---",txtdir or "----",tosequence(first,last,true),width,height,depth,resolved)
+ report_area("middle: %04i %s %s => w=%s, h=%s, d=%s, c=%s",reference,pardir or "---",txtdir or "----",tosequence(first,last,true),width,height,depth,resolved)
end
local prev = first.prev
if prev then
@@ -178,7 +180,7 @@ local function inject_list(id,current,reference,make,stack,pardir,txtdir)
local result, resolved = make(width,height,depth,reference)
if result and resolved then
if trace_backend then
- report_backends("box: %04i %s %s: w=%s, h=%s, d=%s, c=%s",reference,pardir or "---",txtdir or "----",width,height,depth,resolved)
+ report_area("box: %04i %s %s: w=%s, h=%s, d=%s, c=%s",reference,pardir or "---",txtdir or "----",width,height,depth,resolved)
end
if not first then
current.list = result
@@ -322,11 +324,11 @@ local function colorize(width,height,depth,n)
u_colors[n] = u_color
end
if width == 0 then
- report_backends("reference %s has no horizontal dimensions: width=%s, height=%s, depth=%s",reference,width,height,depth)
+ report_area("reference %s has no horizontal dimensions: width=%s, height=%s, depth=%s",reference,width,height,depth)
width = 65536
end
if height + depth <= 0 then
- report_backends("reference %s has no vertical dimensions: width=%s, height=%s, depth=%s",reference,width,height,depth)
+ report_area("reference %s has no vertical dimensions: width=%s, height=%s, depth=%s",reference,width,height,depth)
height = 65536/2
depth = height
end
@@ -387,7 +389,7 @@ local function makereference(width,height,depth,reference)
local sr = stack[reference]
if sr then
if trace_references then
- report_backends("resolving reference attribute %s",reference)
+ report_reference("resolving attribute %s",reference)
end
local resolved, ht, dp, set, n = sr[1], sr[2], sr[3], sr[4], sr[5]
if ht then
@@ -415,10 +417,10 @@ local function makereference(width,height,depth,reference)
if cleanupreferences then stack[reference] = nil end
return result, resolved
elseif trace_references then
- report_backends("unable to resolve reference annotation %s",reference)
+ report_reference("unable to resolve annotation %s",reference)
end
elseif trace_references then
- report_backends("unable to resolve reference attribute %s",reference)
+ report_reference("unable to resolve attribute %s",reference)
end
end
@@ -454,7 +456,7 @@ local function makedestination(width,height,depth,reference)
local sr = stack[reference]
if sr then
if trace_destinations then
- report_backends("resolving destination attribute %s",reference)
+ report_destination("resolving attribute %s",reference)
end
local resolved, ht, dp, name, view = sr[1], sr[2], sr[3], sr[4], sr[5]
if ht then
@@ -500,7 +502,7 @@ local function makedestination(width,height,depth,reference)
if cleanupdestinations then stack[reference] = nil end
return result, resolved
elseif trace_destinations then
- report_backends("unable to resolve destination attribute %s",reference)
+ report_destination("unable to resolve attribute %s",reference)
end
end
diff --git a/tex/context/base/node-res.lua b/tex/context/base/node-res.lua
index e636abaef..b4be0b920 100644
--- a/tex/context/base/node-res.lua
+++ b/tex/context/base/node-res.lua
@@ -14,6 +14,8 @@ local tonumber, round = tonumber, math.round
for debugging <l n='luatex'/> node management.</p>
--ldx]]--
+local report_nodes = logs.new("nodes","housekeeping")
+
local nodes, node = nodes, node
local copy_node = node.copy
@@ -201,9 +203,9 @@ end
function pool.leftmarginkern(glyph,width)
local n = copy_node(left_margin_kern)
if not glyph then
- logs.fatal("nodes","invalid pointer to left margin glyph node")
+ report_nodes("invalid pointer to left margin glyph node")
elseif glyph.id ~= glyph_code then
- logs.fatal("nodes","invalid node type %s for left margin glyph node",nodecodes[glyph])
+ report_nodes("invalid node type %s for left margin glyph node",nodecodes[glyph])
else
n.glyph = glyph
end
@@ -216,9 +218,9 @@ end
function pool.rightmarginkern(glyph,width)
local n = copy_node(right_margin_kern)
if not glyph then
- logs.fatal("nodes","invalid pointer to right margin glyph node")
+ report_nodes("invalid pointer to right margin glyph node")
elseif glyph.id ~= glyph_code then
- logs.fatal("nodes","invalid node type %s for right margin glyph node",nodecodes[p])
+ report_nodes("invalid node type %s for right margin glyph node",nodecodes[p])
else
n.glyph = glyph
end
diff --git a/tex/context/base/node-rul.lua b/tex/context/base/node-rul.lua
index e90449366..d7ef13453 100644
--- a/tex/context/base/node-rul.lua
+++ b/tex/context/base/node-rul.lua
@@ -60,9 +60,9 @@ end
-- todo: order and maybe other dimensions
-local trace_ruled = false trackers.register("nodes.ruled", function(v) trace_ruled = v end)
+local trace_ruled = false trackers.register("nodes.rules", function(v) trace_ruled = v end)
-local report_ruled = logs.new("ruled")
+local report_ruled = logs.new("nodes","rules")
local floor = math.floor
local n_tostring, n_tosequence = nodes.idstostring, nodes.tosequence
@@ -317,9 +317,9 @@ end
-- tasks.appendaction ("shipouts", "normalizers", "nodes.rules.handler")
-- tasks.disableaction("shipouts", "nodes.rules.handler") -- only kick in when used
-local trace_shifted = false trackers.register("nodes.shifted", function(v) trace_shifted = v end)
+local trace_shifted = false trackers.register("nodes.shifting", function(v) trace_shifted = v end)
-local report_shifted = logs.new("shifted")
+local report_shifted = logs.new("nodes","shifting")
local a_shifted = attributes.private('shifted')
diff --git a/tex/context/base/node-spl.lua b/tex/context/base/node-spl.lua
index e90146bf9..14bd3fbeb 100644
--- a/tex/context/base/node-spl.lua
+++ b/tex/context/base/node-spl.lua
@@ -31,9 +31,9 @@ local trace_optimize = false trackers.register("builders.paragraphs.solutions.s
local trace_colors = false trackers.register("builders.paragraphs.solutions.splitters.colors", function(v) trace_colors = v end)
local trace_goodies = false trackers.register("fonts.goodies", function(v) trace_goodies = v end)
-local report_fonts = logs.new("fonts")
-local report_splitter = logs.new("splitter")
-local report_optimizer = logs.new("optimizer")
+local report_solutions = logs.new("fonts","solutions")
+local report_splitters = logs.new("nodes","splitters")
+local report_optimizers = logs.new("nodes","optimizers")
local nodes, node = nodes, node
@@ -129,10 +129,10 @@ local function convert(featuresets,name,set,what)
nofnumbers = nofnumbers + 1
numbers[nofnumbers] = fn
if trace_goodies or trace_optimize then
- report_fonts("solution %s of '%s' uses feature '%s' with number %s",i,name,feature,fn)
+ report_solutions("solution %s of '%s' uses feature '%s' with number %s",i,name,feature,fn)
end
else
- report_fonts("solution %s has an invalid feature reference '%s'",i,name,tostring(feature))
+ report_solutions("solution %s has an invalid feature reference '%s'",i,name,tostring(feature))
end
end
return nofnumbers > 0 and numbers
@@ -145,7 +145,7 @@ local function initialize(goodies)
local featuresets = goodies.featuresets
local goodiesname = goodies.name
if trace_goodies or trace_optimize then
- report_fonts("checking solutions in '%s'",goodiesname)
+ report_solutions("checking solutions in '%s'",goodiesname)
end
for name, set in next, solutions do
set.less = convert(featuresets,name,set,"less")
@@ -201,7 +201,7 @@ function splitters.define(name,parameters)
end
end
if trace_optimize then
- report_fonts("defining solutions '%s', less: '%s', more: '%s'",name,concat(less_set or {}," "),concat(more_set or {}," "))
+ report_solutions("defining solutions '%s', less: '%s', more: '%s'",name,concat(less_set or {}," "),concat(more_set or {}," "))
end
local nofsolutions = #solutions + 1
solutions[nofsolutions] = {
@@ -241,7 +241,7 @@ function splitters.split(head)
font = font
}
if trace_split then
- report_splitter( "cached %4i: font: %s, attribute: %s, word: %s, direction: %s", n,
+ report_splitters("cached %4i: font: %s, attribute: %s, word: %s, direction: %s", n,
font, attribute, nodes.listtoutf(list,true), rlmode)
end
cache[n] = c
@@ -372,7 +372,7 @@ local function doit(word,list,best,width,badness,line,set,listdir)
local temp, b = repack_hlist(list,width,'exactly',listdir)
if b > badness then
if trace_optimize then
- report_optimizer("line %s, badness before: %s, after: %s, criterium: %s -> quit",line,badness,b,criterium)
+ report_optimizers("line %s, badness before: %s, after: %s, criterium: %s -> quit",line,badness,b,criterium)
end
-- remove last insert
prev.next, h.prev = h, prev
@@ -385,7 +385,7 @@ local function doit(word,list,best,width,badness,line,set,listdir)
free_nodelist(first)
else
if trace_optimize then
- report_optimizer("line %s, badness before: %s, after: %s, criterium: %s -> continue",line,badness,b,criterium)
+ report_optimizers("line %s, badness before: %s, after: %s, criterium: %s -> continue",line,badness,b,criterium)
end
-- free old h->t
t.next = nil
@@ -471,7 +471,7 @@ local function show_quality(current,what,line)
local sign = current.glue_sign
local order = current.glue_order
local amount = set * ((sign == 2 and -1) or 1)
- report_optimizer("line %s, %s, amount %s, set %s, sign %s (%s), order %s",line,what,amount,set,sign,how,order)
+ report_optimizers("line %s, %s, amount %s, set %s, sign %s (%s), order %s",line,what,amount,set,sign,how,order)
end
function splitters.optimize(head)
@@ -487,29 +487,29 @@ function splitters.optimize(head)
local tex_hbadness, tex_hfuzz = tex.hbadness, tex.hfuzz
tex.hbadness, tex.hfuzz = 10000, number.maxdimen
if trace_optimize then
- report_optimizer("preroll: %s, variant: %s, preroll criterium: %s, cache size: %s",
+ report_optimizers("preroll: %s, variant: %s, preroll criterium: %s, cache size: %s",
tostring(preroll),variant,criterium,nc)
end
for current in traverse_ids(hlist_code,head) do
- -- report_splitter("before: [%s] => %s",current.dir,nodes.tosequence(current.list,nil))
+ -- report_splitters("before: [%s] => %s",current.dir,nodes.tosequence(current.list,nil))
line = line + 1
local sign, dir, list, width = current.glue_sign, current.dir, current.list, current.width
local temp, badness = repack_hlist(list,width,'exactly',dir) -- it would be nice if the badness was stored in the node
if badness > 0 then
if sign == 0 then
if trace_optimize then
- report_optimizer("line %s, badness %s, okay",line,badness)
+ report_optimizers("line %s, badness %s, okay",line,badness)
end
else
local set, max
if sign == 1 then
if trace_optimize then
- report_optimizer("line %s, badness %s, underfull, trying more",line,badness)
+ report_optimizers("line %s, badness %s, underfull, trying more",line,badness)
end
set, max = "more", max_more
else
if trace_optimize then
- report_optimizer("line %s, badness %s, overfull, trying less",line,badness)
+ report_optimizers("line %s, badness %s, overfull, trying less",line,badness)
end
set, max = "less", max_less
end
@@ -527,7 +527,7 @@ function splitters.optimize(head)
local temp, done, changes, b = optimize(words,base,j,width,badness,line,set,dir)
base = temp
if trace_optimize then
- report_optimizer("line %s, alternative: %s.%s, changes: %s, badness %s",line,i,j,changes,b)
+ report_optimizers("line %s, alternative: %s.%s, changes: %s, badness %s",line,i,j,changes,b)
end
bb = b
if b <= criterium then
@@ -554,7 +554,7 @@ function splitters.optimize(head)
local temp, done, changes, b = optimize(words,list,best,width,badness,line,set,dir)
current.list = temp
if trace_optimize then
- report_optimizer("line %s, alternative: %s, changes: %s, badness %s",line,best,changes,b)
+ report_optimizers("line %s, alternative: %s, changes: %s, badness %s",line,best,changes,b)
end
if done then
if b <= criterium then -- was == 0
@@ -566,12 +566,12 @@ function splitters.optimize(head)
end
else
if trace_optimize then
- report_optimizer("line %s, not bad enough",line)
+ report_optimizers("line %s, not bad enough",line)
end
end
-- we pack inside the outer hpack and that way keep the original wd/ht/dp as bonus
current.list = hpack_nodes(current.list,width,'exactly',listdir)
- -- report_splitter("after: [%s] => %s",temp.dir,nodes.tosequence(temp.list,nil))
+ -- report_splitters("after: [%s] => %s",temp.dir,nodes.tosequence(temp.list,nil))
end
for i=1,nc do
local ci = cache[i]
diff --git a/tex/context/base/node-tra.lua b/tex/context/base/node-tra.lua
index 22d11fc5b..c464d7736 100644
--- a/tex/context/base/node-tra.lua
+++ b/tex/context/base/node-tra.lua
@@ -17,7 +17,7 @@ local format, match, gmatch, concat, rep = string.format, string.match, string.g
local lpegmatch = lpeg.match
local write_nl = texio.write_nl
-local report_nodes = logs.new("nodes")
+local report_nodes = logs.new("nodes","tracing")
fonts = fonts or { }
nodes = nodes or { }
@@ -361,7 +361,11 @@ function nodes.handlers.checkglyphs(head,message)
t[#t+1] = format("U+%04X:%s",g.char,g.subtype)
end
if #t > 0 then
- logs.report(message or "nodes","%s glyphs: %s",#t,concat(t," "))
+ if message and message ~= "" then
+ report_nodes("%s, %s glyphs: %s",message,#t,concat(t," "))
+ else
+ report_nodes("%s glyphs: %s",#t,concat(t," "))
+ end
end
return false
end
@@ -565,7 +569,7 @@ local function showboxes(n,symbol,depth)
local id = n.id
if id == hlist_code or id == vlist_code then
local s = n.subtype
- logs.simple(rep(symbol,depth) .. what[s] or s)
+ report_nodes(rep(symbol,depth) .. what[s] or s)
showboxes(n.list,symbol,depth+1)
end
end
diff --git a/tex/context/base/pack-lyr.mkiv b/tex/context/base/pack-lyr.mkiv
index 955381d62..8335a07b9 100644
--- a/tex/context/base/pack-lyr.mkiv
+++ b/tex/context/base/pack-lyr.mkiv
@@ -642,7 +642,7 @@
%D Watch out, a redefinition:
-\ifx\settextpagecontent\undefined \writestatus\m!systems{error in page-lyr.tex} \wait \fi
+\ifx\settextpagecontent\undefined \writestatus\m!system{error in page-lyr.tex} \wait \fi
\let\normalsettextpagecontent\settextpagecontent
diff --git a/tex/context/base/page-flt.lua b/tex/context/base/page-flt.lua
index e3357a97e..02cf70840 100644
--- a/tex/context/base/page-flt.lua
+++ b/tex/context/base/page-flt.lua
@@ -16,7 +16,7 @@ local copy_node_list = node.copy_list
local trace_floats = false trackers.register("graphics.floats", function(v) trace_floats = v end) -- name might change
-local report_floats = logs.new("floats")
+local report_floats = logs.new("structure","floats")
local C, S, P, lpegmatch = lpeg.C, lpeg.S, lpeg.P, lpeg.match
diff --git a/tex/context/base/page-imp.mkiv b/tex/context/base/page-imp.mkiv
index d1d8a7f4d..cc48b9359 100644
--- a/tex/context/base/page-imp.mkiv
+++ b/tex/context/base/page-imp.mkiv
@@ -433,8 +433,7 @@
%D real arrangments. Some day ...
\def\reportarrangedpage#1%
- {\showmessage\m!systems
- {23}{\the\realpageno.\the\pageno\ifnum\subpageno>0 .\the\subpageno\fi,\number#1}}
+ {\showmessage\m!system{23}{\the\realpageno.\the\pageno\ifnum\subpageno>0 .\the\subpageno\fi,\number#1}}
% TOP
diff --git a/tex/context/base/page-ini.mkiv b/tex/context/base/page-ini.mkiv
index ac3b4d500..add2814dc 100644
--- a/tex/context/base/page-ini.mkiv
+++ b/tex/context/base/page-ini.mkiv
@@ -601,7 +601,7 @@
\vskip\!!sixpoint
\hbox to \makeupwidth
{\infofont
- \getmessage\m!systems{27}:\space\currentdate\space
+ \getmessage\m!system{27}:\space\currentdate\space
\doplaceversiontext\v!project \currentproject
\doplaceversiontext\v!product \currentproduct
\doplaceversiontext\v!component\currentcomponent
@@ -1303,7 +1303,7 @@
% We don't want spurious last pages (due to left over marks):
\def\noshipout
- {\writestatus\m!systems{ignoring further shipouts}%
+ {\writestatus\m!system{ignoring further shipouts}%
\global\advance\realpageno\minusone % else no flush of resources
\dowithnextbox{\deadcycles\zerocount}}
diff --git a/tex/context/base/page-lay.mkiv b/tex/context/base/page-lay.mkiv
index 261bf849d..9efc7ff6d 100644
--- a/tex/context/base/page-lay.mkiv
+++ b/tex/context/base/page-lay.mkiv
@@ -385,11 +385,11 @@
\fi\fi
\ifdim\paperheight>\printpaperheight
\global\printpaperheight\paperheight
- \writestatus\m!systems{print height forced to paper height}%
+ \writestatus\m!system{print height forced to paper height}%
\fi
\ifdim\paperwidth>\printpaperwidth
\global\printpaperwidth\paperwidth
- \writestatus\m!systems{print width forced to paper width}%
+ \writestatus\m!system{print width forced to paper width}%
\fi
\egroup}}
@@ -428,7 +428,7 @@
% {\beforesplitstring#1\at em\to\asciia
% \doifnot\asciia{#1}
% {\aftersplitstring\asciia\at=\to\asciia
-% \doifsomething\asciia{\showmessage\m!systems{10}{#1}}}}
+% \doifsomething\asciia{\showmessage\m!system{10}{#1}}}}
%
% \def\checkforems[#1]%
% {\processcommalist[#1]\docheckforems}
diff --git a/tex/context/base/page-mar.mkiv b/tex/context/base/page-mar.mkiv
index c260b0eda..0868d62ad 100644
--- a/tex/context/base/page-mar.mkiv
+++ b/tex/context/base/page-mar.mkiv
@@ -260,7 +260,7 @@
\donothing
\doifnumberelse\margincontenttag
{\ifnum\margincontenttag>25 % to be translated
- \writestatus\m!systems{potential margin stack overflow (\margincontenttag)}%
+ \writestatus\m!system{potential margin stack overflow (\margincontenttag)}%
\fi}
\donothing
% we need to preserve {a,b,c} kind of settings
diff --git a/tex/context/base/prop-ini.mkiv b/tex/context/base/prop-ini.mkiv
index a122e8bb4..3cb5d2a6f 100644
--- a/tex/context/base/prop-ini.mkiv
+++ b/tex/context/base/prop-ini.mkiv
@@ -21,7 +21,7 @@
\unprotect
\def\propertyobsoletemessage
- {\writestatus\m!systems{properties are obsolete, use dedicated commands}%
+ {\writestatus\m!system{properties are obsolete, use dedicated commands}%
\glet\propertyobsoletemessage\donothing}
\setvalue{\??py:d:\v!layer }[#1][#2][#3]{\defineviewerlayer[#1][#3]}
diff --git a/tex/context/base/regi-8859-1.lua b/tex/context/base/regi-8859-1.lua
index b8f0a8573..ff2182afa 100644
--- a/tex/context/base/regi-8859-1.lua
+++ b/tex/context/base/regi-8859-1.lua
@@ -6,21 +6,21 @@ if not modules then modules = { } end modules ['regi-8859-1'] = {
license = "see context related readme files"
}
-regimes.data["8859-1"] = { [0] =
- 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
- 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
- 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
- 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
- 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
- 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
- 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
- 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
- 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087, 0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x008D, 0x008E, 0x008F,
- 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, 0x0098, 0x0099, 0x009A, 0x009B, 0x009C, 0x009D, 0x009E, 0x009F,
- 0x00A0, 0x00A1, 0x00A2, 0x00A3, 0x00A4, 0x00A5, 0x00A6, 0x00A7, 0x00A8, 0x00A9, 0x00AA, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x00AF,
- 0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x00B4, 0x00B5, 0x00B6, 0x00B7, 0x00B8, 0x00B9, 0x00BA, 0x00BB, 0x00BC, 0x00BD, 0x00BE, 0x00BF,
- 0x00C0, 0x00C1, 0x00C2, 0x00C3, 0x00C4, 0x00C5, 0x00C6, 0x00C7, 0x00C8, 0x00C9, 0x00CA, 0x00CB, 0x00CC, 0x00CD, 0x00CE, 0x00CF,
- 0x00D0, 0x00D1, 0x00D2, 0x00D3, 0x00D4, 0x00D5, 0x00D6, 0x00D7, 0x00D8, 0x00D9, 0x00DA, 0x00DB, 0x00DC, 0x00DD, 0x00DE, 0x00DF,
- 0x00E0, 0x00E1, 0x00E2, 0x00E3, 0x00E4, 0x00E5, 0x00E6, 0x00E7, 0x00E8, 0x00E9, 0x00EA, 0x00EB, 0x00EC, 0x00ED, 0x00EE, 0x00EF,
- 0x00F0, 0x00F1, 0x00F2, 0x00F3, 0x00F4, 0x00F5, 0x00F6, 0x00F7, 0x00F8, 0x00F9, 0x00FA, 0x00FB, 0x00FC, 0x00FD, 0x00FE, 0x00FF
+return { [0] =
+ 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
+ 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
+ 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
+ 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
+ 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
+ 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
+ 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
+ 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
+ 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087, 0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x008D, 0x008E, 0x008F,
+ 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, 0x0098, 0x0099, 0x009A, 0x009B, 0x009C, 0x009D, 0x009E, 0x009F,
+ 0x00A0, 0x00A1, 0x00A2, 0x00A3, 0x00A4, 0x00A5, 0x00A6, 0x00A7, 0x00A8, 0x00A9, 0x00AA, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x00AF,
+ 0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x00B4, 0x00B5, 0x00B6, 0x00B7, 0x00B8, 0x00B9, 0x00BA, 0x00BB, 0x00BC, 0x00BD, 0x00BE, 0x00BF,
+ 0x00C0, 0x00C1, 0x00C2, 0x00C3, 0x00C4, 0x00C5, 0x00C6, 0x00C7, 0x00C8, 0x00C9, 0x00CA, 0x00CB, 0x00CC, 0x00CD, 0x00CE, 0x00CF,
+ 0x00D0, 0x00D1, 0x00D2, 0x00D3, 0x00D4, 0x00D5, 0x00D6, 0x00D7, 0x00D8, 0x00D9, 0x00DA, 0x00DB, 0x00DC, 0x00DD, 0x00DE, 0x00DF,
+ 0x00E0, 0x00E1, 0x00E2, 0x00E3, 0x00E4, 0x00E5, 0x00E6, 0x00E7, 0x00E8, 0x00E9, 0x00EA, 0x00EB, 0x00EC, 0x00ED, 0x00EE, 0x00EF,
+ 0x00F0, 0x00F1, 0x00F2, 0x00F3, 0x00F4, 0x00F5, 0x00F6, 0x00F7, 0x00F8, 0x00F9, 0x00FA, 0x00FB, 0x00FC, 0x00FD, 0x00FE, 0x00FF
}
diff --git a/tex/context/base/regi-8859-10.lua b/tex/context/base/regi-8859-10.lua
index 574d4ac50..f23744b4a 100644
--- a/tex/context/base/regi-8859-10.lua
+++ b/tex/context/base/regi-8859-10.lua
@@ -6,21 +6,21 @@ if not modules then modules = { } end modules ['regi-8859-10'] = {
license = "see context related readme files"
}
-regimes.data["8859-10"] = { [0] =
- 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
- 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
- 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
- 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
- 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
- 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
- 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
- 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
- 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087, 0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x008D, 0x008E, 0x008F,
- 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, 0x0098, 0x0099, 0x009A, 0x009B, 0x009C, 0x009D, 0x009E, 0x009F,
- 0x00A0, 0x0104, 0x0112, 0x0122, 0x012A, 0x0128, 0x0136, 0x00A7, 0x013B, 0x0110, 0x0160, 0x0166, 0x017D, 0x00AD, 0x016A, 0x014A,
- 0x00B0, 0x0105, 0x0113, 0x0123, 0x012B, 0x0129, 0x0137, 0x00B7, 0x013C, 0x0111, 0x0161, 0x0167, 0x017E, 0x2015, 0x016B, 0x014B,
- 0x0100, 0x00C1, 0x00C2, 0x00C3, 0x00C4, 0x00C5, 0x00C6, 0x012E, 0x010C, 0x00C9, 0x0118, 0x00CB, 0x0116, 0x00CD, 0x00CE, 0x00CF,
- 0x00D0, 0x0145, 0x014C, 0x00D3, 0x00D4, 0x00D5, 0x00D6, 0x0168, 0x00D8, 0x0172, 0x00DA, 0x00DB, 0x00DC, 0x00DD, 0x00DE, 0x00DF,
- 0x0101, 0x00E1, 0x00E2, 0x00E3, 0x00E4, 0x00E5, 0x00E6, 0x012F, 0x010D, 0x00E9, 0x0119, 0x00EB, 0x0117, 0x00ED, 0x00EE, 0x00EF,
- 0x00F0, 0x0146, 0x014D, 0x00F3, 0x00F4, 0x00F5, 0x00F6, 0x0169, 0x00F8, 0x0173, 0x00FA, 0x00FB, 0x00FC, 0x00FD, 0x00FE, 0x0138
+return { [0] =
+ 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
+ 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
+ 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
+ 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
+ 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
+ 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
+ 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
+ 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
+ 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087, 0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x008D, 0x008E, 0x008F,
+ 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, 0x0098, 0x0099, 0x009A, 0x009B, 0x009C, 0x009D, 0x009E, 0x009F,
+ 0x00A0, 0x0104, 0x0112, 0x0122, 0x012A, 0x0128, 0x0136, 0x00A7, 0x013B, 0x0110, 0x0160, 0x0166, 0x017D, 0x00AD, 0x016A, 0x014A,
+ 0x00B0, 0x0105, 0x0113, 0x0123, 0x012B, 0x0129, 0x0137, 0x00B7, 0x013C, 0x0111, 0x0161, 0x0167, 0x017E, 0x2015, 0x016B, 0x014B,
+ 0x0100, 0x00C1, 0x00C2, 0x00C3, 0x00C4, 0x00C5, 0x00C6, 0x012E, 0x010C, 0x00C9, 0x0118, 0x00CB, 0x0116, 0x00CD, 0x00CE, 0x00CF,
+ 0x00D0, 0x0145, 0x014C, 0x00D3, 0x00D4, 0x00D5, 0x00D6, 0x0168, 0x00D8, 0x0172, 0x00DA, 0x00DB, 0x00DC, 0x00DD, 0x00DE, 0x00DF,
+ 0x0101, 0x00E1, 0x00E2, 0x00E3, 0x00E4, 0x00E5, 0x00E6, 0x012F, 0x010D, 0x00E9, 0x0119, 0x00EB, 0x0117, 0x00ED, 0x00EE, 0x00EF,
+ 0x00F0, 0x0146, 0x014D, 0x00F3, 0x00F4, 0x00F5, 0x00F6, 0x0169, 0x00F8, 0x0173, 0x00FA, 0x00FB, 0x00FC, 0x00FD, 0x00FE, 0x0138
}
diff --git a/tex/context/base/regi-8859-11.lua b/tex/context/base/regi-8859-11.lua
index 1910bbb5d..54e5626c2 100644
--- a/tex/context/base/regi-8859-11.lua
+++ b/tex/context/base/regi-8859-11.lua
@@ -6,21 +6,21 @@ if not modules then modules = { } end modules ['regi-8859-11'] = {
license = "see context related readme files"
}
-regimes.data["8859-11"] = { [0] =
- 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
- 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
- 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
- 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
- 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
- 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
- 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
- 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
- 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087, 0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x008D, 0x008E, 0x008F,
- 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, 0x0098, 0x0099, 0x009A, 0x009B, 0x009C, 0x009D, 0x009E, 0x009F,
- 0x00A0, 0x0E01, 0x0E02, 0x0E03, 0x0E04, 0x0E05, 0x0E06, 0x0E07, 0x0E08, 0x0E09, 0x0E0A, 0x0E0B, 0x0E0C, 0x0E0D, 0x0E0E, 0x0E0F,
- 0x0E10, 0x0E11, 0x0E12, 0x0E13, 0x0E14, 0x0E15, 0x0E16, 0x0E17, 0x0E18, 0x0E19, 0x0E1A, 0x0E1B, 0x0E1C, 0x0E1D, 0x0E1E, 0x0E1F,
- 0x0E20, 0x0E21, 0x0E22, 0x0E23, 0x0E24, 0x0E25, 0x0E26, 0x0E27, 0x0E28, 0x0E29, 0x0E2A, 0x0E2B, 0x0E2C, 0x0E2D, 0x0E2E, 0x0E2F,
- 0x0E30, 0x0E31, 0x0E32, 0x0E33, 0x0E34, 0x0E35, 0x0E36, 0x0E37, 0x0E38, 0x0E39, 0x0E3A, 0x0000, 0x0000, 0x0000, 0x0000, 0x0E3F,
- 0x0E40, 0x0E41, 0x0E42, 0x0E43, 0x0E44, 0x0E45, 0x0E46, 0x0E47, 0x0E48, 0x0E49, 0x0E4A, 0x0E4B, 0x0E4C, 0x0E4D, 0x0E4E, 0x0E4F,
- 0x0E50, 0x0E51, 0x0E52, 0x0E53, 0x0E54, 0x0E55, 0x0E56, 0x0E57, 0x0E58, 0x0E59, 0x0E5A, 0x0E5B, 0x0000, 0x0000, 0x0000, 0x0000
+return { [0] =
+ 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
+ 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
+ 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
+ 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
+ 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
+ 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
+ 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
+ 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
+ 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087, 0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x008D, 0x008E, 0x008F,
+ 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, 0x0098, 0x0099, 0x009A, 0x009B, 0x009C, 0x009D, 0x009E, 0x009F,
+ 0x00A0, 0x0E01, 0x0E02, 0x0E03, 0x0E04, 0x0E05, 0x0E06, 0x0E07, 0x0E08, 0x0E09, 0x0E0A, 0x0E0B, 0x0E0C, 0x0E0D, 0x0E0E, 0x0E0F,
+ 0x0E10, 0x0E11, 0x0E12, 0x0E13, 0x0E14, 0x0E15, 0x0E16, 0x0E17, 0x0E18, 0x0E19, 0x0E1A, 0x0E1B, 0x0E1C, 0x0E1D, 0x0E1E, 0x0E1F,
+ 0x0E20, 0x0E21, 0x0E22, 0x0E23, 0x0E24, 0x0E25, 0x0E26, 0x0E27, 0x0E28, 0x0E29, 0x0E2A, 0x0E2B, 0x0E2C, 0x0E2D, 0x0E2E, 0x0E2F,
+ 0x0E30, 0x0E31, 0x0E32, 0x0E33, 0x0E34, 0x0E35, 0x0E36, 0x0E37, 0x0E38, 0x0E39, 0x0E3A, 0x0000, 0x0000, 0x0000, 0x0000, 0x0E3F,
+ 0x0E40, 0x0E41, 0x0E42, 0x0E43, 0x0E44, 0x0E45, 0x0E46, 0x0E47, 0x0E48, 0x0E49, 0x0E4A, 0x0E4B, 0x0E4C, 0x0E4D, 0x0E4E, 0x0E4F,
+ 0x0E50, 0x0E51, 0x0E52, 0x0E53, 0x0E54, 0x0E55, 0x0E56, 0x0E57, 0x0E58, 0x0E59, 0x0E5A, 0x0E5B, 0x0000, 0x0000, 0x0000, 0x0000
}
diff --git a/tex/context/base/regi-8859-13.lua b/tex/context/base/regi-8859-13.lua
index a6f71cb78..1646133b5 100644
--- a/tex/context/base/regi-8859-13.lua
+++ b/tex/context/base/regi-8859-13.lua
@@ -6,21 +6,21 @@ if not modules then modules = { } end modules ['regi-8859-13'] = {
license = "see context related readme files"
}
-regimes.data["8859-13"] = { [0] =
- 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
- 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
- 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
- 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
- 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
- 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
- 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
- 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
- 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087, 0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x008D, 0x008E, 0x008F,
- 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, 0x0098, 0x0099, 0x009A, 0x009B, 0x009C, 0x009D, 0x009E, 0x009F,
- 0x00A0, 0x201D, 0x00A2, 0x00A3, 0x00A4, 0x201E, 0x00A6, 0x00A7, 0x00D8, 0x00A9, 0x0156, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x00C6,
- 0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x201C, 0x00B5, 0x00B6, 0x00B7, 0x00F8, 0x00B9, 0x0157, 0x00BB, 0x00BC, 0x00BD, 0x00BE, 0x00E6,
- 0x0104, 0x012E, 0x0100, 0x0106, 0x00C4, 0x00C5, 0x0118, 0x0112, 0x010C, 0x00C9, 0x0179, 0x0116, 0x0122, 0x0136, 0x012A, 0x013B,
- 0x0160, 0x0143, 0x0145, 0x00D3, 0x014C, 0x00D5, 0x00D6, 0x00D7, 0x0172, 0x0141, 0x015A, 0x016A, 0x00DC, 0x017B, 0x017D, 0x00DF,
- 0x0105, 0x012F, 0x0101, 0x0107, 0x00E4, 0x00E5, 0x0119, 0x0113, 0x010D, 0x00E9, 0x017A, 0x0117, 0x0123, 0x0137, 0x012B, 0x013C,
- 0x0161, 0x0144, 0x0146, 0x00F3, 0x014D, 0x00F5, 0x00F6, 0x00F7, 0x0173, 0x0142, 0x015B, 0x016B, 0x00FC, 0x017C, 0x017E, 0x2019
+return { [0] =
+ 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
+ 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
+ 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
+ 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
+ 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
+ 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
+ 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
+ 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
+ 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087, 0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x008D, 0x008E, 0x008F,
+ 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, 0x0098, 0x0099, 0x009A, 0x009B, 0x009C, 0x009D, 0x009E, 0x009F,
+ 0x00A0, 0x201D, 0x00A2, 0x00A3, 0x00A4, 0x201E, 0x00A6, 0x00A7, 0x00D8, 0x00A9, 0x0156, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x00C6,
+ 0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x201C, 0x00B5, 0x00B6, 0x00B7, 0x00F8, 0x00B9, 0x0157, 0x00BB, 0x00BC, 0x00BD, 0x00BE, 0x00E6,
+ 0x0104, 0x012E, 0x0100, 0x0106, 0x00C4, 0x00C5, 0x0118, 0x0112, 0x010C, 0x00C9, 0x0179, 0x0116, 0x0122, 0x0136, 0x012A, 0x013B,
+ 0x0160, 0x0143, 0x0145, 0x00D3, 0x014C, 0x00D5, 0x00D6, 0x00D7, 0x0172, 0x0141, 0x015A, 0x016A, 0x00DC, 0x017B, 0x017D, 0x00DF,
+ 0x0105, 0x012F, 0x0101, 0x0107, 0x00E4, 0x00E5, 0x0119, 0x0113, 0x010D, 0x00E9, 0x017A, 0x0117, 0x0123, 0x0137, 0x012B, 0x013C,
+ 0x0161, 0x0144, 0x0146, 0x00F3, 0x014D, 0x00F5, 0x00F6, 0x00F7, 0x0173, 0x0142, 0x015B, 0x016B, 0x00FC, 0x017C, 0x017E, 0x2019
}
diff --git a/tex/context/base/regi-8859-14.lua b/tex/context/base/regi-8859-14.lua
index 0c3474865..2b0c68814 100644
--- a/tex/context/base/regi-8859-14.lua
+++ b/tex/context/base/regi-8859-14.lua
@@ -6,21 +6,21 @@ if not modules then modules = { } end modules ['regi-8859-14'] = {
license = "see context related readme files"
}
-regimes.data["8859-14"] = { [0] =
- 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
- 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
- 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
- 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
- 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
- 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
- 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
- 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
- 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087, 0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x008D, 0x008E, 0x008F,
- 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, 0x0098, 0x0099, 0x009A, 0x009B, 0x009C, 0x009D, 0x009E, 0x009F,
- 0x00A0, 0x1E02, 0x1E03, 0x00A3, 0x010A, 0x010B, 0x1E0A, 0x00A7, 0x1E80, 0x00A9, 0x1E82, 0x1E0B, 0x1EF2, 0x00AD, 0x00AE, 0x0178,
- 0x1E1E, 0x1E1F, 0x0120, 0x0121, 0x1E40, 0x1E41, 0x00B6, 0x1E56, 0x1E81, 0x1E57, 0x1E83, 0x1E60, 0x1EF3, 0x1E84, 0x1E85, 0x1E61,
- 0x00C0, 0x00C1, 0x00C2, 0x00C3, 0x00C4, 0x00C5, 0x00C6, 0x00C7, 0x00C8, 0x00C9, 0x00CA, 0x00CB, 0x00CC, 0x00CD, 0x00CE, 0x00CF,
- 0x0174, 0x00D1, 0x00D2, 0x00D3, 0x00D4, 0x00D5, 0x00D6, 0x1E6A, 0x00D8, 0x00D9, 0x00DA, 0x00DB, 0x00DC, 0x00DD, 0x0176, 0x00DF,
- 0x00E0, 0x00E1, 0x00E2, 0x00E3, 0x00E4, 0x00E5, 0x00E6, 0x00E7, 0x00E8, 0x00E9, 0x00EA, 0x00EB, 0x00EC, 0x00ED, 0x00EE, 0x00EF,
- 0x0175, 0x00F1, 0x00F2, 0x00F3, 0x00F4, 0x00F5, 0x00F6, 0x1E6B, 0x00F8, 0x00F9, 0x00FA, 0x00FB, 0x00FC, 0x00FD, 0x0177, 0x00FF
+return { [0] =
+ 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
+ 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
+ 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
+ 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
+ 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
+ 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
+ 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
+ 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
+ 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087, 0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x008D, 0x008E, 0x008F,
+ 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, 0x0098, 0x0099, 0x009A, 0x009B, 0x009C, 0x009D, 0x009E, 0x009F,
+ 0x00A0, 0x1E02, 0x1E03, 0x00A3, 0x010A, 0x010B, 0x1E0A, 0x00A7, 0x1E80, 0x00A9, 0x1E82, 0x1E0B, 0x1EF2, 0x00AD, 0x00AE, 0x0178,
+ 0x1E1E, 0x1E1F, 0x0120, 0x0121, 0x1E40, 0x1E41, 0x00B6, 0x1E56, 0x1E81, 0x1E57, 0x1E83, 0x1E60, 0x1EF3, 0x1E84, 0x1E85, 0x1E61,
+ 0x00C0, 0x00C1, 0x00C2, 0x00C3, 0x00C4, 0x00C5, 0x00C6, 0x00C7, 0x00C8, 0x00C9, 0x00CA, 0x00CB, 0x00CC, 0x00CD, 0x00CE, 0x00CF,
+ 0x0174, 0x00D1, 0x00D2, 0x00D3, 0x00D4, 0x00D5, 0x00D6, 0x1E6A, 0x00D8, 0x00D9, 0x00DA, 0x00DB, 0x00DC, 0x00DD, 0x0176, 0x00DF,
+ 0x00E0, 0x00E1, 0x00E2, 0x00E3, 0x00E4, 0x00E5, 0x00E6, 0x00E7, 0x00E8, 0x00E9, 0x00EA, 0x00EB, 0x00EC, 0x00ED, 0x00EE, 0x00EF,
+ 0x0175, 0x00F1, 0x00F2, 0x00F3, 0x00F4, 0x00F5, 0x00F6, 0x1E6B, 0x00F8, 0x00F9, 0x00FA, 0x00FB, 0x00FC, 0x00FD, 0x0177, 0x00FF
}
diff --git a/tex/context/base/regi-8859-15.lua b/tex/context/base/regi-8859-15.lua
index a5626d653..48861f396 100644
--- a/tex/context/base/regi-8859-15.lua
+++ b/tex/context/base/regi-8859-15.lua
@@ -6,21 +6,21 @@ if not modules then modules = { } end modules ['regi-8859-15'] = {
license = "see context related readme files"
}
-regimes.data["8859-15"] = { [0] =
- 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
- 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
- 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
- 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
- 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
- 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
- 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
- 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
- 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087, 0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x008D, 0x008E, 0x008F,
- 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, 0x0098, 0x0099, 0x009A, 0x009B, 0x009C, 0x009D, 0x009E, 0x009F,
- 0x00A0, 0x00A1, 0x00A2, 0x00A3, 0x20AC, 0x00A5, 0x0160, 0x00A7, 0x0161, 0x00A9, 0x00AA, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x00AF,
- 0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x017D, 0x00B5, 0x00B6, 0x00B7, 0x017E, 0x00B9, 0x00BA, 0x00BB, 0x0152, 0x0153, 0x0178, 0x00BF,
- 0x00C0, 0x00C1, 0x00C2, 0x00C3, 0x00C4, 0x00C5, 0x00C6, 0x00C7, 0x00C8, 0x00C9, 0x00CA, 0x00CB, 0x00CC, 0x00CD, 0x00CE, 0x00CF,
- 0x00D0, 0x00D1, 0x00D2, 0x00D3, 0x00D4, 0x00D5, 0x00D6, 0x00D7, 0x00D8, 0x00D9, 0x00DA, 0x00DB, 0x00DC, 0x00DD, 0x00DE, 0x00DF,
- 0x00E0, 0x00E1, 0x00E2, 0x00E3, 0x00E4, 0x00E5, 0x00E6, 0x00E7, 0x00E8, 0x00E9, 0x00EA, 0x00EB, 0x00EC, 0x00ED, 0x00EE, 0x00EF,
- 0x00F0, 0x00F1, 0x00F2, 0x00F3, 0x00F4, 0x00F5, 0x00F6, 0x00F7, 0x00F8, 0x00F9, 0x00FA, 0x00FB, 0x00FC, 0x00FD, 0x00FE, 0x00FF
+return { [0] =
+ 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
+ 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
+ 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
+ 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
+ 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
+ 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
+ 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
+ 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
+ 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087, 0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x008D, 0x008E, 0x008F,
+ 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, 0x0098, 0x0099, 0x009A, 0x009B, 0x009C, 0x009D, 0x009E, 0x009F,
+ 0x00A0, 0x00A1, 0x00A2, 0x00A3, 0x20AC, 0x00A5, 0x0160, 0x00A7, 0x0161, 0x00A9, 0x00AA, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x00AF,
+ 0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x017D, 0x00B5, 0x00B6, 0x00B7, 0x017E, 0x00B9, 0x00BA, 0x00BB, 0x0152, 0x0153, 0x0178, 0x00BF,
+ 0x00C0, 0x00C1, 0x00C2, 0x00C3, 0x00C4, 0x00C5, 0x00C6, 0x00C7, 0x00C8, 0x00C9, 0x00CA, 0x00CB, 0x00CC, 0x00CD, 0x00CE, 0x00CF,
+ 0x00D0, 0x00D1, 0x00D2, 0x00D3, 0x00D4, 0x00D5, 0x00D6, 0x00D7, 0x00D8, 0x00D9, 0x00DA, 0x00DB, 0x00DC, 0x00DD, 0x00DE, 0x00DF,
+ 0x00E0, 0x00E1, 0x00E2, 0x00E3, 0x00E4, 0x00E5, 0x00E6, 0x00E7, 0x00E8, 0x00E9, 0x00EA, 0x00EB, 0x00EC, 0x00ED, 0x00EE, 0x00EF,
+ 0x00F0, 0x00F1, 0x00F2, 0x00F3, 0x00F4, 0x00F5, 0x00F6, 0x00F7, 0x00F8, 0x00F9, 0x00FA, 0x00FB, 0x00FC, 0x00FD, 0x00FE, 0x00FF
}
diff --git a/tex/context/base/regi-8859-16.lua b/tex/context/base/regi-8859-16.lua
index 817b41db2..e122a2042 100644
--- a/tex/context/base/regi-8859-16.lua
+++ b/tex/context/base/regi-8859-16.lua
@@ -6,21 +6,21 @@ if not modules then modules = { } end modules ['regi-8859-16'] = {
license = "see context related readme files"
}
-regimes.data["8859-16"] = { [0] =
- 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
- 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
- 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
- 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
- 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
- 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
- 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
- 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
- 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087, 0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x008D, 0x008E, 0x008F,
- 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, 0x0098, 0x0099, 0x009A, 0x009B, 0x009C, 0x009D, 0x009E, 0x009F,
- 0x00A0, 0x0104, 0x0105, 0x0141, 0x20AC, 0x201E, 0x0160, 0x00A7, 0x0161, 0x00A9, 0x0218, 0x00AB, 0x0179, 0x00AD, 0x017A, 0x017B,
- 0x00B0, 0x00B1, 0x010C, 0x0142, 0x017D, 0x201D, 0x00B6, 0x00B7, 0x017E, 0x010D, 0x0219, 0x00BB, 0x0152, 0x0153, 0x0178, 0x017C,
- 0x00C0, 0x00C1, 0x00C2, 0x0102, 0x00C4, 0x0106, 0x00C6, 0x00C7, 0x00C8, 0x00C9, 0x00CA, 0x00CB, 0x00CC, 0x00CD, 0x00CE, 0x00CF,
- 0x0110, 0x0143, 0x00D2, 0x00D3, 0x00D4, 0x0150, 0x00D6, 0x015A, 0x0170, 0x00D9, 0x00DA, 0x00DB, 0x00DC, 0x0118, 0x021A, 0x00DF,
- 0x00E0, 0x00E1, 0x00E2, 0x0103, 0x00E4, 0x0107, 0x00E6, 0x00E7, 0x00E8, 0x00E9, 0x00EA, 0x00EB, 0x00EC, 0x00ED, 0x00EE, 0x00EF,
- 0x0111, 0x0144, 0x00F2, 0x00F3, 0x00F4, 0x0151, 0x00F6, 0x015B, 0x0171, 0x00F9, 0x00FA, 0x00FB, 0x00FC, 0x0119, 0x021B, 0x00FF
+return { [0] =
+ 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
+ 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
+ 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
+ 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
+ 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
+ 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
+ 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
+ 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
+ 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087, 0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x008D, 0x008E, 0x008F,
+ 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, 0x0098, 0x0099, 0x009A, 0x009B, 0x009C, 0x009D, 0x009E, 0x009F,
+ 0x00A0, 0x0104, 0x0105, 0x0141, 0x20AC, 0x201E, 0x0160, 0x00A7, 0x0161, 0x00A9, 0x0218, 0x00AB, 0x0179, 0x00AD, 0x017A, 0x017B,
+ 0x00B0, 0x00B1, 0x010C, 0x0142, 0x017D, 0x201D, 0x00B6, 0x00B7, 0x017E, 0x010D, 0x0219, 0x00BB, 0x0152, 0x0153, 0x0178, 0x017C,
+ 0x00C0, 0x00C1, 0x00C2, 0x0102, 0x00C4, 0x0106, 0x00C6, 0x00C7, 0x00C8, 0x00C9, 0x00CA, 0x00CB, 0x00CC, 0x00CD, 0x00CE, 0x00CF,
+ 0x0110, 0x0143, 0x00D2, 0x00D3, 0x00D4, 0x0150, 0x00D6, 0x015A, 0x0170, 0x00D9, 0x00DA, 0x00DB, 0x00DC, 0x0118, 0x021A, 0x00DF,
+ 0x00E0, 0x00E1, 0x00E2, 0x0103, 0x00E4, 0x0107, 0x00E6, 0x00E7, 0x00E8, 0x00E9, 0x00EA, 0x00EB, 0x00EC, 0x00ED, 0x00EE, 0x00EF,
+ 0x0111, 0x0144, 0x00F2, 0x00F3, 0x00F4, 0x0151, 0x00F6, 0x015B, 0x0171, 0x00F9, 0x00FA, 0x00FB, 0x00FC, 0x0119, 0x021B, 0x00FF
}
diff --git a/tex/context/base/regi-8859-2.lua b/tex/context/base/regi-8859-2.lua
index 7ae59d0fa..affd6c3ca 100644
--- a/tex/context/base/regi-8859-2.lua
+++ b/tex/context/base/regi-8859-2.lua
@@ -6,21 +6,21 @@ if not modules then modules = { } end modules ['regi-8859-2'] = {
license = "see context related readme files"
}
-regimes.data["8859-2"] = { [0] =
- 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
- 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
- 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
- 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
- 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
- 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
- 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
- 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
- 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087, 0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x008D, 0x008E, 0x008F,
- 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, 0x0098, 0x0099, 0x009A, 0x009B, 0x009C, 0x009D, 0x009E, 0x009F,
- 0x00A0, 0x0104, 0x02D8, 0x0141, 0x00A4, 0x013D, 0x015A, 0x00A7, 0x00A8, 0x0160, 0x015E, 0x0164, 0x0179, 0x00AD, 0x017D, 0x017B,
- 0x00B0, 0x0105, 0x02DB, 0x0142, 0x00B4, 0x013E, 0x015B, 0x02C7, 0x00B8, 0x0161, 0x015F, 0x0165, 0x017A, 0x02DD, 0x017E, 0x017C,
- 0x0154, 0x00C1, 0x00C2, 0x0102, 0x00C4, 0x0139, 0x0106, 0x00C7, 0x010C, 0x00C9, 0x0118, 0x00CB, 0x011A, 0x00CD, 0x00CE, 0x010E,
- 0x0110, 0x0143, 0x0147, 0x00D3, 0x00D4, 0x0150, 0x00D6, 0x00D7, 0x0158, 0x016E, 0x00DA, 0x0170, 0x00DC, 0x00DD, 0x0162, 0x00DF,
- 0x0155, 0x00E1, 0x00E2, 0x0103, 0x00E4, 0x013A, 0x0107, 0x00E7, 0x010D, 0x00E9, 0x0119, 0x00EB, 0x011B, 0x00ED, 0x00EE, 0x010F,
- 0x0111, 0x0144, 0x0148, 0x00F3, 0x00F4, 0x0151, 0x00F6, 0x00F7, 0x0159, 0x016F, 0x00FA, 0x0171, 0x00FC, 0x00FD, 0x0163, 0x02D9
+return { [0] =
+ 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
+ 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
+ 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
+ 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
+ 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
+ 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
+ 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
+ 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
+ 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087, 0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x008D, 0x008E, 0x008F,
+ 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, 0x0098, 0x0099, 0x009A, 0x009B, 0x009C, 0x009D, 0x009E, 0x009F,
+ 0x00A0, 0x0104, 0x02D8, 0x0141, 0x00A4, 0x013D, 0x015A, 0x00A7, 0x00A8, 0x0160, 0x015E, 0x0164, 0x0179, 0x00AD, 0x017D, 0x017B,
+ 0x00B0, 0x0105, 0x02DB, 0x0142, 0x00B4, 0x013E, 0x015B, 0x02C7, 0x00B8, 0x0161, 0x015F, 0x0165, 0x017A, 0x02DD, 0x017E, 0x017C,
+ 0x0154, 0x00C1, 0x00C2, 0x0102, 0x00C4, 0x0139, 0x0106, 0x00C7, 0x010C, 0x00C9, 0x0118, 0x00CB, 0x011A, 0x00CD, 0x00CE, 0x010E,
+ 0x0110, 0x0143, 0x0147, 0x00D3, 0x00D4, 0x0150, 0x00D6, 0x00D7, 0x0158, 0x016E, 0x00DA, 0x0170, 0x00DC, 0x00DD, 0x0162, 0x00DF,
+ 0x0155, 0x00E1, 0x00E2, 0x0103, 0x00E4, 0x013A, 0x0107, 0x00E7, 0x010D, 0x00E9, 0x0119, 0x00EB, 0x011B, 0x00ED, 0x00EE, 0x010F,
+ 0x0111, 0x0144, 0x0148, 0x00F3, 0x00F4, 0x0151, 0x00F6, 0x00F7, 0x0159, 0x016F, 0x00FA, 0x0171, 0x00FC, 0x00FD, 0x0163, 0x02D9
}
diff --git a/tex/context/base/regi-8859-3.lua b/tex/context/base/regi-8859-3.lua
index a83d63bac..4b5c54b4f 100644
--- a/tex/context/base/regi-8859-3.lua
+++ b/tex/context/base/regi-8859-3.lua
@@ -6,21 +6,21 @@ if not modules then modules = { } end modules ['regi-8859-3'] = {
license = "see context related readme files"
}
-regimes.data["8859-3"] = { [0] =
- 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
- 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
- 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
- 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
- 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
- 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
- 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
- 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
- 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087, 0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x008D, 0x008E, 0x008F,
- 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, 0x0098, 0x0099, 0x009A, 0x009B, 0x009C, 0x009D, 0x009E, 0x009F,
- 0x00A0, 0x0126, 0x02D8, 0x00A3, 0x00A4, 0x0000, 0x0124, 0x00A7, 0x00A8, 0x0130, 0x015E, 0x011E, 0x0134, 0x00AD, 0x0000, 0x017B,
- 0x00B0, 0x0127, 0x00B2, 0x00B3, 0x00B4, 0x00B5, 0x0125, 0x00B7, 0x00B8, 0x0131, 0x015F, 0x011F, 0x0135, 0x00BD, 0x0000, 0x017C,
- 0x00C0, 0x00C1, 0x00C2, 0x0000, 0x00C4, 0x010A, 0x0108, 0x00C7, 0x00C8, 0x00C9, 0x00CA, 0x00CB, 0x00CC, 0x00CD, 0x00CE, 0x00CF,
- 0x0000, 0x00D1, 0x00D2, 0x00D3, 0x00D4, 0x0120, 0x00D6, 0x00D7, 0x011C, 0x00D9, 0x00DA, 0x00DB, 0x00DC, 0x016C, 0x015C, 0x00DF,
- 0x00E0, 0x00E1, 0x00E2, 0x0000, 0x00E4, 0x010B, 0x0109, 0x00E7, 0x00E8, 0x00E9, 0x00EA, 0x00EB, 0x00EC, 0x00ED, 0x00EE, 0x00EF,
- 0x0000, 0x00F1, 0x00F2, 0x00F3, 0x00F4, 0x0121, 0x00F6, 0x00F7, 0x011D, 0x00F9, 0x00FA, 0x00FB, 0x00FC, 0x016D, 0x015D, 0x02D9
+return { [0] =
+ 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
+ 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
+ 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
+ 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
+ 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
+ 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
+ 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
+ 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
+ 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087, 0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x008D, 0x008E, 0x008F,
+ 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, 0x0098, 0x0099, 0x009A, 0x009B, 0x009C, 0x009D, 0x009E, 0x009F,
+ 0x00A0, 0x0126, 0x02D8, 0x00A3, 0x00A4, 0x0000, 0x0124, 0x00A7, 0x00A8, 0x0130, 0x015E, 0x011E, 0x0134, 0x00AD, 0x0000, 0x017B,
+ 0x00B0, 0x0127, 0x00B2, 0x00B3, 0x00B4, 0x00B5, 0x0125, 0x00B7, 0x00B8, 0x0131, 0x015F, 0x011F, 0x0135, 0x00BD, 0x0000, 0x017C,
+ 0x00C0, 0x00C1, 0x00C2, 0x0000, 0x00C4, 0x010A, 0x0108, 0x00C7, 0x00C8, 0x00C9, 0x00CA, 0x00CB, 0x00CC, 0x00CD, 0x00CE, 0x00CF,
+ 0x0000, 0x00D1, 0x00D2, 0x00D3, 0x00D4, 0x0120, 0x00D6, 0x00D7, 0x011C, 0x00D9, 0x00DA, 0x00DB, 0x00DC, 0x016C, 0x015C, 0x00DF,
+ 0x00E0, 0x00E1, 0x00E2, 0x0000, 0x00E4, 0x010B, 0x0109, 0x00E7, 0x00E8, 0x00E9, 0x00EA, 0x00EB, 0x00EC, 0x00ED, 0x00EE, 0x00EF,
+ 0x0000, 0x00F1, 0x00F2, 0x00F3, 0x00F4, 0x0121, 0x00F6, 0x00F7, 0x011D, 0x00F9, 0x00FA, 0x00FB, 0x00FC, 0x016D, 0x015D, 0x02D9
}
diff --git a/tex/context/base/regi-8859-4.lua b/tex/context/base/regi-8859-4.lua
index 939d55026..774ec2e10 100644
--- a/tex/context/base/regi-8859-4.lua
+++ b/tex/context/base/regi-8859-4.lua
@@ -6,21 +6,21 @@ if not modules then modules = { } end modules ['regi-8859-4'] = {
license = "see context related readme files"
}
-regimes.data["8859-4"] = { [0] =
- 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
- 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
- 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
- 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
- 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
- 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
- 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
- 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
- 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087, 0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x008D, 0x008E, 0x008F,
- 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, 0x0098, 0x0099, 0x009A, 0x009B, 0x009C, 0x009D, 0x009E, 0x009F,
- 0x00A0, 0x0104, 0x0138, 0x0156, 0x00A4, 0x0128, 0x013B, 0x00A7, 0x00A8, 0x0160, 0x0112, 0x0122, 0x0166, 0x00AD, 0x017D, 0x00AF,
- 0x00B0, 0x0105, 0x02DB, 0x0157, 0x00B4, 0x0129, 0x013C, 0x02C7, 0x00B8, 0x0161, 0x0113, 0x0123, 0x0167, 0x014A, 0x017E, 0x014B,
- 0x0100, 0x00C1, 0x00C2, 0x00C3, 0x00C4, 0x00C5, 0x00C6, 0x012E, 0x010C, 0x00C9, 0x0118, 0x00CB, 0x0116, 0x00CD, 0x00CE, 0x012A,
- 0x0110, 0x0145, 0x014C, 0x0136, 0x00D4, 0x00D5, 0x00D6, 0x00D7, 0x00D8, 0x0172, 0x00DA, 0x00DB, 0x00DC, 0x0168, 0x016A, 0x00DF,
- 0x0101, 0x00E1, 0x00E2, 0x00E3, 0x00E4, 0x00E5, 0x00E6, 0x012F, 0x010D, 0x00E9, 0x0119, 0x00EB, 0x0117, 0x00ED, 0x00EE, 0x012B,
- 0x0111, 0x0146, 0x014D, 0x0137, 0x00F4, 0x00F5, 0x00F6, 0x00F7, 0x00F8, 0x0173, 0x00FA, 0x00FB, 0x00FC, 0x0169, 0x016B, 0x02D9
+return { [0] =
+ 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
+ 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
+ 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
+ 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
+ 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
+ 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
+ 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
+ 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
+ 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087, 0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x008D, 0x008E, 0x008F,
+ 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, 0x0098, 0x0099, 0x009A, 0x009B, 0x009C, 0x009D, 0x009E, 0x009F,
+ 0x00A0, 0x0104, 0x0138, 0x0156, 0x00A4, 0x0128, 0x013B, 0x00A7, 0x00A8, 0x0160, 0x0112, 0x0122, 0x0166, 0x00AD, 0x017D, 0x00AF,
+ 0x00B0, 0x0105, 0x02DB, 0x0157, 0x00B4, 0x0129, 0x013C, 0x02C7, 0x00B8, 0x0161, 0x0113, 0x0123, 0x0167, 0x014A, 0x017E, 0x014B,
+ 0x0100, 0x00C1, 0x00C2, 0x00C3, 0x00C4, 0x00C5, 0x00C6, 0x012E, 0x010C, 0x00C9, 0x0118, 0x00CB, 0x0116, 0x00CD, 0x00CE, 0x012A,
+ 0x0110, 0x0145, 0x014C, 0x0136, 0x00D4, 0x00D5, 0x00D6, 0x00D7, 0x00D8, 0x0172, 0x00DA, 0x00DB, 0x00DC, 0x0168, 0x016A, 0x00DF,
+ 0x0101, 0x00E1, 0x00E2, 0x00E3, 0x00E4, 0x00E5, 0x00E6, 0x012F, 0x010D, 0x00E9, 0x0119, 0x00EB, 0x0117, 0x00ED, 0x00EE, 0x012B,
+ 0x0111, 0x0146, 0x014D, 0x0137, 0x00F4, 0x00F5, 0x00F6, 0x00F7, 0x00F8, 0x0173, 0x00FA, 0x00FB, 0x00FC, 0x0169, 0x016B, 0x02D9
}
diff --git a/tex/context/base/regi-8859-5.lua b/tex/context/base/regi-8859-5.lua
index ab093d139..1137f37bb 100644
--- a/tex/context/base/regi-8859-5.lua
+++ b/tex/context/base/regi-8859-5.lua
@@ -6,21 +6,21 @@ if not modules then modules = { } end modules ['regi-8859-5'] = {
license = "see context related readme files"
}
-regimes.data["8859-5"] = { [0] =
- 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
- 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
- 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
- 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
- 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
- 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
- 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
- 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
- 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087, 0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x008D, 0x008E, 0x008F,
- 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, 0x0098, 0x0099, 0x009A, 0x009B, 0x009C, 0x009D, 0x009E, 0x009F,
- 0x00A0, 0x0401, 0x0402, 0x0403, 0x0404, 0x0405, 0x0406, 0x0407, 0x0408, 0x0409, 0x040A, 0x040B, 0x040C, 0x00AD, 0x040E, 0x040F,
- 0x0410, 0x0411, 0x0412, 0x0413, 0x0414, 0x0415, 0x0416, 0x0417, 0x0418, 0x0419, 0x041A, 0x041B, 0x041C, 0x041D, 0x041E, 0x041F,
- 0x0420, 0x0421, 0x0422, 0x0423, 0x0424, 0x0425, 0x0426, 0x0427, 0x0428, 0x0429, 0x042A, 0x042B, 0x042C, 0x042D, 0x042E, 0x042F,
- 0x0430, 0x0431, 0x0432, 0x0433, 0x0434, 0x0435, 0x0436, 0x0437, 0x0438, 0x0439, 0x043A, 0x043B, 0x043C, 0x043D, 0x043E, 0x043F,
- 0x0440, 0x0441, 0x0442, 0x0443, 0x0444, 0x0445, 0x0446, 0x0447, 0x0448, 0x0449, 0x044A, 0x044B, 0x044C, 0x044D, 0x044E, 0x044F,
- 0x2116, 0x0451, 0x0452, 0x0453, 0x0454, 0x0455, 0x0456, 0x0457, 0x0458, 0x0459, 0x045A, 0x045B, 0x045C, 0x00A7, 0x045E, 0x045F
+return { [0] =
+ 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
+ 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
+ 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
+ 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
+ 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
+ 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
+ 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
+ 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
+ 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087, 0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x008D, 0x008E, 0x008F,
+ 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, 0x0098, 0x0099, 0x009A, 0x009B, 0x009C, 0x009D, 0x009E, 0x009F,
+ 0x00A0, 0x0401, 0x0402, 0x0403, 0x0404, 0x0405, 0x0406, 0x0407, 0x0408, 0x0409, 0x040A, 0x040B, 0x040C, 0x00AD, 0x040E, 0x040F,
+ 0x0410, 0x0411, 0x0412, 0x0413, 0x0414, 0x0415, 0x0416, 0x0417, 0x0418, 0x0419, 0x041A, 0x041B, 0x041C, 0x041D, 0x041E, 0x041F,
+ 0x0420, 0x0421, 0x0422, 0x0423, 0x0424, 0x0425, 0x0426, 0x0427, 0x0428, 0x0429, 0x042A, 0x042B, 0x042C, 0x042D, 0x042E, 0x042F,
+ 0x0430, 0x0431, 0x0432, 0x0433, 0x0434, 0x0435, 0x0436, 0x0437, 0x0438, 0x0439, 0x043A, 0x043B, 0x043C, 0x043D, 0x043E, 0x043F,
+ 0x0440, 0x0441, 0x0442, 0x0443, 0x0444, 0x0445, 0x0446, 0x0447, 0x0448, 0x0449, 0x044A, 0x044B, 0x044C, 0x044D, 0x044E, 0x044F,
+ 0x2116, 0x0451, 0x0452, 0x0453, 0x0454, 0x0455, 0x0456, 0x0457, 0x0458, 0x0459, 0x045A, 0x045B, 0x045C, 0x00A7, 0x045E, 0x045F
}
diff --git a/tex/context/base/regi-8859-6.lua b/tex/context/base/regi-8859-6.lua
index e094129f2..651ae79ff 100644
--- a/tex/context/base/regi-8859-6.lua
+++ b/tex/context/base/regi-8859-6.lua
@@ -6,21 +6,21 @@ if not modules then modules = { } end modules ['regi-8859-6'] = {
license = "see context related readme files"
}
-regimes.data["8859-6"] = { [0] =
- 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
- 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
- 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
- 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
- 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
- 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
- 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
- 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
- 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087, 0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x008D, 0x008E, 0x008F,
- 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, 0x0098, 0x0099, 0x009A, 0x009B, 0x009C, 0x009D, 0x009E, 0x009F,
- 0x00A0, 0x0000, 0x0000, 0x0000, 0x00A4, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x060C, 0x00AD, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x061B, 0x0000, 0x0000, 0x0000, 0x061F,
- 0x0000, 0x0621, 0x0622, 0x0623, 0x0624, 0x0625, 0x0626, 0x0627, 0x0628, 0x0629, 0x062A, 0x062B, 0x062C, 0x062D, 0x062E, 0x062F,
- 0x0630, 0x0631, 0x0632, 0x0633, 0x0634, 0x0635, 0x0636, 0x0637, 0x0638, 0x0639, 0x063A, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0640, 0x0641, 0x0642, 0x0643, 0x0644, 0x0645, 0x0646, 0x0647, 0x0648, 0x0649, 0x064A, 0x064B, 0x064C, 0x064D, 0x064E, 0x064F,
- 0x0650, 0x0651, 0x0652, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000
+return { [0] =
+ 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
+ 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
+ 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
+ 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
+ 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
+ 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
+ 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
+ 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
+ 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087, 0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x008D, 0x008E, 0x008F,
+ 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, 0x0098, 0x0099, 0x009A, 0x009B, 0x009C, 0x009D, 0x009E, 0x009F,
+ 0x00A0, 0x0000, 0x0000, 0x0000, 0x00A4, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x060C, 0x00AD, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x061B, 0x0000, 0x0000, 0x0000, 0x061F,
+ 0x0000, 0x0621, 0x0622, 0x0623, 0x0624, 0x0625, 0x0626, 0x0627, 0x0628, 0x0629, 0x062A, 0x062B, 0x062C, 0x062D, 0x062E, 0x062F,
+ 0x0630, 0x0631, 0x0632, 0x0633, 0x0634, 0x0635, 0x0636, 0x0637, 0x0638, 0x0639, 0x063A, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0640, 0x0641, 0x0642, 0x0643, 0x0644, 0x0645, 0x0646, 0x0647, 0x0648, 0x0649, 0x064A, 0x064B, 0x064C, 0x064D, 0x064E, 0x064F,
+ 0x0650, 0x0651, 0x0652, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000
}
diff --git a/tex/context/base/regi-8859-7.lua b/tex/context/base/regi-8859-7.lua
index cee253582..08cbbab6e 100644
--- a/tex/context/base/regi-8859-7.lua
+++ b/tex/context/base/regi-8859-7.lua
@@ -6,21 +6,21 @@ if not modules then modules = { } end modules ['regi-8859-7'] = {
license = "see context related readme files"
}
-regimes.data["8859-7"] = { [0] =
- 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
- 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
- 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
- 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
- 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
- 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
- 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
- 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
- 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087, 0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x008D, 0x008E, 0x008F,
- 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, 0x0098, 0x0099, 0x009A, 0x009B, 0x009C, 0x009D, 0x009E, 0x009F,
- 0x00A0, 0x2018, 0x2019, 0x00A3, 0x20AC, 0x20AF, 0x00A6, 0x00A7, 0x00A8, 0x00A9, 0x037A, 0x00AB, 0x00AC, 0x00AD, 0x0000, 0x2015,
- 0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x0384, 0x0385, 0x0386, 0x00B7, 0x0388, 0x0389, 0x038A, 0x00BB, 0x038C, 0x00BD, 0x038E, 0x038F,
- 0x0390, 0x0391, 0x0392, 0x0393, 0x0394, 0x0395, 0x0396, 0x0397, 0x0398, 0x0399, 0x039A, 0x039B, 0x039C, 0x039D, 0x039E, 0x039F,
- 0x03A0, 0x03A1, 0x0000, 0x03A3, 0x03A4, 0x03A5, 0x03A6, 0x03A7, 0x03A8, 0x03A9, 0x03AA, 0x03AB, 0x03AC, 0x03AD, 0x03AE, 0x03AF,
- 0x03B0, 0x03B1, 0x03B2, 0x03B3, 0x03B4, 0x03B5, 0x03B6, 0x03B7, 0x03B8, 0x03B9, 0x03BA, 0x03BB, 0x03BC, 0x03BD, 0x03BE, 0x03BF,
- 0x03C0, 0x03C1, 0x03C2, 0x03C3, 0x03C4, 0x03C5, 0x03C6, 0x03C7, 0x03C8, 0x03C9, 0x03CA, 0x03CB, 0x03CC, 0x03CD, 0x03CE, 0x0000
+return { [0] =
+ 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
+ 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
+ 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
+ 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
+ 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
+ 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
+ 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
+ 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
+ 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087, 0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x008D, 0x008E, 0x008F,
+ 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, 0x0098, 0x0099, 0x009A, 0x009B, 0x009C, 0x009D, 0x009E, 0x009F,
+ 0x00A0, 0x2018, 0x2019, 0x00A3, 0x20AC, 0x20AF, 0x00A6, 0x00A7, 0x00A8, 0x00A9, 0x037A, 0x00AB, 0x00AC, 0x00AD, 0x0000, 0x2015,
+ 0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x0384, 0x0385, 0x0386, 0x00B7, 0x0388, 0x0389, 0x038A, 0x00BB, 0x038C, 0x00BD, 0x038E, 0x038F,
+ 0x0390, 0x0391, 0x0392, 0x0393, 0x0394, 0x0395, 0x0396, 0x0397, 0x0398, 0x0399, 0x039A, 0x039B, 0x039C, 0x039D, 0x039E, 0x039F,
+ 0x03A0, 0x03A1, 0x0000, 0x03A3, 0x03A4, 0x03A5, 0x03A6, 0x03A7, 0x03A8, 0x03A9, 0x03AA, 0x03AB, 0x03AC, 0x03AD, 0x03AE, 0x03AF,
+ 0x03B0, 0x03B1, 0x03B2, 0x03B3, 0x03B4, 0x03B5, 0x03B6, 0x03B7, 0x03B8, 0x03B9, 0x03BA, 0x03BB, 0x03BC, 0x03BD, 0x03BE, 0x03BF,
+ 0x03C0, 0x03C1, 0x03C2, 0x03C3, 0x03C4, 0x03C5, 0x03C6, 0x03C7, 0x03C8, 0x03C9, 0x03CA, 0x03CB, 0x03CC, 0x03CD, 0x03CE, 0x0000
}
diff --git a/tex/context/base/regi-8859-8.lua b/tex/context/base/regi-8859-8.lua
index 062b080ad..b69609991 100644
--- a/tex/context/base/regi-8859-8.lua
+++ b/tex/context/base/regi-8859-8.lua
@@ -6,21 +6,21 @@ if not modules then modules = { } end modules ['regi-8859-8'] = {
license = "see context related readme files"
}
-regimes.data["8859-8"] = { [0] =
- 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
- 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
- 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
- 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
- 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
- 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
- 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
- 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
- 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087, 0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x008D, 0x008E, 0x008F,
- 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, 0x0098, 0x0099, 0x009A, 0x009B, 0x009C, 0x009D, 0x009E, 0x009F,
- 0x00A0, 0x0000, 0x00A2, 0x00A3, 0x00A4, 0x00A5, 0x00A6, 0x00A7, 0x00A8, 0x00A9, 0x00D7, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x00AF,
- 0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x00B4, 0x00B5, 0x00B6, 0x00B7, 0x00B8, 0x00B9, 0x00F7, 0x00BB, 0x00BC, 0x00BD, 0x00BE, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x2017,
- 0x05D0, 0x05D1, 0x05D2, 0x05D3, 0x05D4, 0x05D5, 0x05D6, 0x05D7, 0x05D8, 0x05D9, 0x05DA, 0x05DB, 0x05DC, 0x05DD, 0x05DE, 0x05DF,
- 0x05E0, 0x05E1, 0x05E2, 0x05E3, 0x05E4, 0x05E5, 0x05E6, 0x05E7, 0x05E8, 0x05E9, 0x05EA, 0x0000, 0x0000, 0x200E, 0x200F, 0x0000
+return { [0] =
+ 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
+ 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
+ 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
+ 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
+ 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
+ 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
+ 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
+ 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
+ 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087, 0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x008D, 0x008E, 0x008F,
+ 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, 0x0098, 0x0099, 0x009A, 0x009B, 0x009C, 0x009D, 0x009E, 0x009F,
+ 0x00A0, 0x0000, 0x00A2, 0x00A3, 0x00A4, 0x00A5, 0x00A6, 0x00A7, 0x00A8, 0x00A9, 0x00D7, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x00AF,
+ 0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x00B4, 0x00B5, 0x00B6, 0x00B7, 0x00B8, 0x00B9, 0x00F7, 0x00BB, 0x00BC, 0x00BD, 0x00BE, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x2017,
+ 0x05D0, 0x05D1, 0x05D2, 0x05D3, 0x05D4, 0x05D5, 0x05D6, 0x05D7, 0x05D8, 0x05D9, 0x05DA, 0x05DB, 0x05DC, 0x05DD, 0x05DE, 0x05DF,
+ 0x05E0, 0x05E1, 0x05E2, 0x05E3, 0x05E4, 0x05E5, 0x05E6, 0x05E7, 0x05E8, 0x05E9, 0x05EA, 0x0000, 0x0000, 0x200E, 0x200F, 0x0000
}
diff --git a/tex/context/base/regi-8859-9.lua b/tex/context/base/regi-8859-9.lua
index 2af118a8c..773307fff 100644
--- a/tex/context/base/regi-8859-9.lua
+++ b/tex/context/base/regi-8859-9.lua
@@ -6,21 +6,21 @@ if not modules then modules = { } end modules ['regi-8859-9'] = {
license = "see context related readme files"
}
-regimes.data["8859-9"] = { [0] =
- 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
- 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
- 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
- 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
- 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
- 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
- 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
- 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
- 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087, 0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x008D, 0x008E, 0x008F,
- 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, 0x0098, 0x0099, 0x009A, 0x009B, 0x009C, 0x009D, 0x009E, 0x009F,
- 0x00A0, 0x00A1, 0x00A2, 0x00A3, 0x00A4, 0x00A5, 0x00A6, 0x00A7, 0x00A8, 0x00A9, 0x00AA, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x00AF,
- 0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x00B4, 0x00B5, 0x00B6, 0x00B7, 0x00B8, 0x00B9, 0x00BA, 0x00BB, 0x00BC, 0x00BD, 0x00BE, 0x00BF,
- 0x00C0, 0x00C1, 0x00C2, 0x00C3, 0x00C4, 0x00C5, 0x00C6, 0x00C7, 0x00C8, 0x00C9, 0x00CA, 0x00CB, 0x00CC, 0x00CD, 0x00CE, 0x00CF,
- 0x011E, 0x00D1, 0x00D2, 0x00D3, 0x00D4, 0x00D5, 0x00D6, 0x00D7, 0x00D8, 0x00D9, 0x00DA, 0x00DB, 0x00DC, 0x0130, 0x015E, 0x00DF,
- 0x00E0, 0x00E1, 0x00E2, 0x00E3, 0x00E4, 0x00E5, 0x00E6, 0x00E7, 0x00E8, 0x00E9, 0x00EA, 0x00EB, 0x00EC, 0x00ED, 0x00EE, 0x00EF,
- 0x011F, 0x00F1, 0x00F2, 0x00F3, 0x00F4, 0x00F5, 0x00F6, 0x00F7, 0x00F8, 0x00F9, 0x00FA, 0x00FB, 0x00FC, 0x0131, 0x015F, 0x00FF
+return { [0] =
+ 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
+ 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
+ 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
+ 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
+ 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
+ 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
+ 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
+ 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
+ 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087, 0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x008D, 0x008E, 0x008F,
+ 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, 0x0098, 0x0099, 0x009A, 0x009B, 0x009C, 0x009D, 0x009E, 0x009F,
+ 0x00A0, 0x00A1, 0x00A2, 0x00A3, 0x00A4, 0x00A5, 0x00A6, 0x00A7, 0x00A8, 0x00A9, 0x00AA, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x00AF,
+ 0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x00B4, 0x00B5, 0x00B6, 0x00B7, 0x00B8, 0x00B9, 0x00BA, 0x00BB, 0x00BC, 0x00BD, 0x00BE, 0x00BF,
+ 0x00C0, 0x00C1, 0x00C2, 0x00C3, 0x00C4, 0x00C5, 0x00C6, 0x00C7, 0x00C8, 0x00C9, 0x00CA, 0x00CB, 0x00CC, 0x00CD, 0x00CE, 0x00CF,
+ 0x011E, 0x00D1, 0x00D2, 0x00D3, 0x00D4, 0x00D5, 0x00D6, 0x00D7, 0x00D8, 0x00D9, 0x00DA, 0x00DB, 0x00DC, 0x0130, 0x015E, 0x00DF,
+ 0x00E0, 0x00E1, 0x00E2, 0x00E3, 0x00E4, 0x00E5, 0x00E6, 0x00E7, 0x00E8, 0x00E9, 0x00EA, 0x00EB, 0x00EC, 0x00ED, 0x00EE, 0x00EF,
+ 0x011F, 0x00F1, 0x00F2, 0x00F3, 0x00F4, 0x00F5, 0x00F6, 0x00F7, 0x00F8, 0x00F9, 0x00FA, 0x00FB, 0x00FC, 0x0131, 0x015F, 0x00FF
}
diff --git a/tex/context/base/regi-cp1250.lua b/tex/context/base/regi-cp1250.lua
index a37ca46b4..00d55d1b8 100644
--- a/tex/context/base/regi-cp1250.lua
+++ b/tex/context/base/regi-cp1250.lua
@@ -6,21 +6,21 @@ if not modules then modules = { } end modules ['regi-cp1250'] = {
license = "see context related readme files"
}
-regimes.data["cp1250"] = { [0] =
- 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
- 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
- 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
- 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
- 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
- 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
- 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
- 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
- 0x20AC, 0x0000, 0x201A, 0x0000, 0x201E, 0x2026, 0x2020, 0x2021, 0x0000, 0x2030, 0x0160, 0x2039, 0x015A, 0x0164, 0x017D, 0x0179,
- 0x0000, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014, 0x0000, 0x2122, 0x0161, 0x203A, 0x015B, 0x0165, 0x017E, 0x017A,
- 0x00A0, 0x02C7, 0x02D8, 0x0141, 0x00A4, 0x0104, 0x00A6, 0x00A7, 0x00A8, 0x00A9, 0x015E, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x017B,
- 0x00B0, 0x00B1, 0x02DB, 0x0142, 0x00B4, 0x00B5, 0x00B6, 0x00B7, 0x00B8, 0x0105, 0x015F, 0x00BB, 0x013D, 0x02DD, 0x013E, 0x017C,
- 0x0154, 0x00C1, 0x00C2, 0x0102, 0x00C4, 0x0139, 0x0106, 0x00C7, 0x010C, 0x00C9, 0x0118, 0x00CB, 0x011A, 0x00CD, 0x00CE, 0x010E,
- 0x0110, 0x0143, 0x0147, 0x00D3, 0x00D4, 0x0150, 0x00D6, 0x00D7, 0x0158, 0x016E, 0x00DA, 0x0170, 0x00DC, 0x00DD, 0x0162, 0x00DF,
- 0x0155, 0x00E1, 0x00E2, 0x0103, 0x00E4, 0x013A, 0x0107, 0x00E7, 0x010D, 0x00E9, 0x0119, 0x00EB, 0x011B, 0x00ED, 0x00EE, 0x010F,
- 0x0111, 0x0144, 0x0148, 0x00F3, 0x00F4, 0x0151, 0x00F6, 0x00F7, 0x0159, 0x016F, 0x00FA, 0x0171, 0x00FC, 0x00FD, 0x0163, 0x02D9
+return { [0] =
+ 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
+ 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
+ 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
+ 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
+ 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
+ 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
+ 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
+ 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
+ 0x20AC, 0x0000, 0x201A, 0x0000, 0x201E, 0x2026, 0x2020, 0x2021, 0x0000, 0x2030, 0x0160, 0x2039, 0x015A, 0x0164, 0x017D, 0x0179,
+ 0x0000, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014, 0x0000, 0x2122, 0x0161, 0x203A, 0x015B, 0x0165, 0x017E, 0x017A,
+ 0x00A0, 0x02C7, 0x02D8, 0x0141, 0x00A4, 0x0104, 0x00A6, 0x00A7, 0x00A8, 0x00A9, 0x015E, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x017B,
+ 0x00B0, 0x00B1, 0x02DB, 0x0142, 0x00B4, 0x00B5, 0x00B6, 0x00B7, 0x00B8, 0x0105, 0x015F, 0x00BB, 0x013D, 0x02DD, 0x013E, 0x017C,
+ 0x0154, 0x00C1, 0x00C2, 0x0102, 0x00C4, 0x0139, 0x0106, 0x00C7, 0x010C, 0x00C9, 0x0118, 0x00CB, 0x011A, 0x00CD, 0x00CE, 0x010E,
+ 0x0110, 0x0143, 0x0147, 0x00D3, 0x00D4, 0x0150, 0x00D6, 0x00D7, 0x0158, 0x016E, 0x00DA, 0x0170, 0x00DC, 0x00DD, 0x0162, 0x00DF,
+ 0x0155, 0x00E1, 0x00E2, 0x0103, 0x00E4, 0x013A, 0x0107, 0x00E7, 0x010D, 0x00E9, 0x0119, 0x00EB, 0x011B, 0x00ED, 0x00EE, 0x010F,
+ 0x0111, 0x0144, 0x0148, 0x00F3, 0x00F4, 0x0151, 0x00F6, 0x00F7, 0x0159, 0x016F, 0x00FA, 0x0171, 0x00FC, 0x00FD, 0x0163, 0x02D9
}
diff --git a/tex/context/base/regi-cp1251.lua b/tex/context/base/regi-cp1251.lua
index 42fe0b340..7bb72e0cc 100644
--- a/tex/context/base/regi-cp1251.lua
+++ b/tex/context/base/regi-cp1251.lua
@@ -6,21 +6,21 @@ if not modules then modules = { } end modules ['regi-cp1251'] = {
license = "see context related readme files"
}
-regimes.data["cp1251"] = { [0] =
- 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
- 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
- 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
- 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
- 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
- 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
- 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
- 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
- 0x0402, 0x0403, 0x201A, 0x0453, 0x201E, 0x2026, 0x2020, 0x2021, 0x20AC, 0x2030, 0x0409, 0x2039, 0x040A, 0x040C, 0x040B, 0x040F,
- 0x0452, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014, 0x0000, 0x2122, 0x0459, 0x203A, 0x045A, 0x045C, 0x045B, 0x045F,
- 0x00A0, 0x040E, 0x045E, 0x0408, 0x00A4, 0x0490, 0x00A6, 0x00A7, 0x0401, 0x00A9, 0x0404, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x0407,
- 0x00B0, 0x00B1, 0x0406, 0x0456, 0x0491, 0x00B5, 0x00B6, 0x00B7, 0x0451, 0x2116, 0x0454, 0x00BB, 0x0458, 0x0405, 0x0455, 0x0457,
- 0x0410, 0x0411, 0x0412, 0x0413, 0x0414, 0x0415, 0x0416, 0x0417, 0x0418, 0x0419, 0x041A, 0x041B, 0x041C, 0x041D, 0x041E, 0x041F,
- 0x0420, 0x0421, 0x0422, 0x0423, 0x0424, 0x0425, 0x0426, 0x0427, 0x0428, 0x0429, 0x042A, 0x042B, 0x042C, 0x042D, 0x042E, 0x042F,
- 0x0430, 0x0431, 0x0432, 0x0433, 0x0434, 0x0435, 0x0436, 0x0437, 0x0438, 0x0439, 0x043A, 0x043B, 0x043C, 0x043D, 0x043E, 0x043F,
- 0x0440, 0x0441, 0x0442, 0x0443, 0x0444, 0x0445, 0x0446, 0x0447, 0x0448, 0x0449, 0x044A, 0x044B, 0x044C, 0x044D, 0x044E, 0x044F
+return { [0] =
+ 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
+ 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
+ 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
+ 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
+ 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
+ 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
+ 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
+ 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
+ 0x0402, 0x0403, 0x201A, 0x0453, 0x201E, 0x2026, 0x2020, 0x2021, 0x20AC, 0x2030, 0x0409, 0x2039, 0x040A, 0x040C, 0x040B, 0x040F,
+ 0x0452, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014, 0x0000, 0x2122, 0x0459, 0x203A, 0x045A, 0x045C, 0x045B, 0x045F,
+ 0x00A0, 0x040E, 0x045E, 0x0408, 0x00A4, 0x0490, 0x00A6, 0x00A7, 0x0401, 0x00A9, 0x0404, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x0407,
+ 0x00B0, 0x00B1, 0x0406, 0x0456, 0x0491, 0x00B5, 0x00B6, 0x00B7, 0x0451, 0x2116, 0x0454, 0x00BB, 0x0458, 0x0405, 0x0455, 0x0457,
+ 0x0410, 0x0411, 0x0412, 0x0413, 0x0414, 0x0415, 0x0416, 0x0417, 0x0418, 0x0419, 0x041A, 0x041B, 0x041C, 0x041D, 0x041E, 0x041F,
+ 0x0420, 0x0421, 0x0422, 0x0423, 0x0424, 0x0425, 0x0426, 0x0427, 0x0428, 0x0429, 0x042A, 0x042B, 0x042C, 0x042D, 0x042E, 0x042F,
+ 0x0430, 0x0431, 0x0432, 0x0433, 0x0434, 0x0435, 0x0436, 0x0437, 0x0438, 0x0439, 0x043A, 0x043B, 0x043C, 0x043D, 0x043E, 0x043F,
+ 0x0440, 0x0441, 0x0442, 0x0443, 0x0444, 0x0445, 0x0446, 0x0447, 0x0448, 0x0449, 0x044A, 0x044B, 0x044C, 0x044D, 0x044E, 0x044F
}
diff --git a/tex/context/base/regi-cp1252.lua b/tex/context/base/regi-cp1252.lua
index 74b2f3761..86954c9af 100644
--- a/tex/context/base/regi-cp1252.lua
+++ b/tex/context/base/regi-cp1252.lua
@@ -6,21 +6,21 @@ if not modules then modules = { } end modules ['regi-cp1252'] = {
license = "see context related readme files"
}
-regimes.data["cp1252"] = { [0] =
- 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
- 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
- 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
- 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
- 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
- 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
- 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
- 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
- 0x20AC, 0x0000, 0x201A, 0x0192, 0x201E, 0x2026, 0x2020, 0x2021, 0x02C6, 0x2030, 0x0160, 0x2039, 0x0152, 0x0000, 0x017D, 0x0000,
- 0x0000, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014, 0x02DC, 0x2122, 0x0161, 0x203A, 0x0153, 0x0000, 0x017E, 0x0178,
- 0x00A0, 0x00A1, 0x00A2, 0x00A3, 0x00A4, 0x00A5, 0x00A6, 0x00A7, 0x00A8, 0x00A9, 0x00AA, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x00AF,
- 0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x00B4, 0x00B5, 0x00B6, 0x00B7, 0x00B8, 0x00B9, 0x00BA, 0x00BB, 0x00BC, 0x00BD, 0x00BE, 0x00BF,
- 0x00C0, 0x00C1, 0x00C2, 0x00C3, 0x00C4, 0x00C5, 0x00C6, 0x00C7, 0x00C8, 0x00C9, 0x00CA, 0x00CB, 0x00CC, 0x00CD, 0x00CE, 0x00CF,
- 0x00D0, 0x00D1, 0x00D2, 0x00D3, 0x00D4, 0x00D5, 0x00D6, 0x00D7, 0x00D8, 0x00D9, 0x00DA, 0x00DB, 0x00DC, 0x00DD, 0x00DE, 0x00DF,
- 0x00E0, 0x00E1, 0x00E2, 0x00E3, 0x00E4, 0x00E5, 0x00E6, 0x00E7, 0x00E8, 0x00E9, 0x00EA, 0x00EB, 0x00EC, 0x00ED, 0x00EE, 0x00EF,
- 0x00F0, 0x00F1, 0x00F2, 0x00F3, 0x00F4, 0x00F5, 0x00F6, 0x00F7, 0x00F8, 0x00F9, 0x00FA, 0x00FB, 0x00FC, 0x00FD, 0x00FE, 0x00FF
+return { [0] =
+ 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
+ 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
+ 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
+ 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
+ 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
+ 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
+ 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
+ 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
+ 0x20AC, 0x0000, 0x201A, 0x0192, 0x201E, 0x2026, 0x2020, 0x2021, 0x02C6, 0x2030, 0x0160, 0x2039, 0x0152, 0x0000, 0x017D, 0x0000,
+ 0x0000, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014, 0x02DC, 0x2122, 0x0161, 0x203A, 0x0153, 0x0000, 0x017E, 0x0178,
+ 0x00A0, 0x00A1, 0x00A2, 0x00A3, 0x00A4, 0x00A5, 0x00A6, 0x00A7, 0x00A8, 0x00A9, 0x00AA, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x00AF,
+ 0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x00B4, 0x00B5, 0x00B6, 0x00B7, 0x00B8, 0x00B9, 0x00BA, 0x00BB, 0x00BC, 0x00BD, 0x00BE, 0x00BF,
+ 0x00C0, 0x00C1, 0x00C2, 0x00C3, 0x00C4, 0x00C5, 0x00C6, 0x00C7, 0x00C8, 0x00C9, 0x00CA, 0x00CB, 0x00CC, 0x00CD, 0x00CE, 0x00CF,
+ 0x00D0, 0x00D1, 0x00D2, 0x00D3, 0x00D4, 0x00D5, 0x00D6, 0x00D7, 0x00D8, 0x00D9, 0x00DA, 0x00DB, 0x00DC, 0x00DD, 0x00DE, 0x00DF,
+ 0x00E0, 0x00E1, 0x00E2, 0x00E3, 0x00E4, 0x00E5, 0x00E6, 0x00E7, 0x00E8, 0x00E9, 0x00EA, 0x00EB, 0x00EC, 0x00ED, 0x00EE, 0x00EF,
+ 0x00F0, 0x00F1, 0x00F2, 0x00F3, 0x00F4, 0x00F5, 0x00F6, 0x00F7, 0x00F8, 0x00F9, 0x00FA, 0x00FB, 0x00FC, 0x00FD, 0x00FE, 0x00FF
}
diff --git a/tex/context/base/regi-cp1253.lua b/tex/context/base/regi-cp1253.lua
index f14a186bb..31a411efe 100644
--- a/tex/context/base/regi-cp1253.lua
+++ b/tex/context/base/regi-cp1253.lua
@@ -6,21 +6,21 @@ if not modules then modules = { } end modules ['regi-cp1253'] = {
license = "see context related readme files"
}
-regimes.data["cp1253"] = { [0] =
- 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
- 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
- 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
- 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
- 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
- 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
- 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
- 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
- 0x20AC, 0x0000, 0x201A, 0x0192, 0x201E, 0x2026, 0x2020, 0x2021, 0x0000, 0x2030, 0x0000, 0x2039, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014, 0x0000, 0x2122, 0x0000, 0x203A, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x00A0, 0x0385, 0x0386, 0x00A3, 0x00A4, 0x00A5, 0x00A6, 0x00A7, 0x00A8, 0x00A9, 0x0000, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x2015,
- 0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x0384, 0x00B5, 0x00B6, 0x00B7, 0x0388, 0x0389, 0x038A, 0x00BB, 0x038C, 0x00BD, 0x038E, 0x038F,
- 0x0390, 0x0391, 0x0392, 0x0393, 0x0394, 0x0395, 0x0396, 0x0397, 0x0398, 0x0399, 0x039A, 0x039B, 0x039C, 0x039D, 0x039E, 0x039F,
- 0x03A0, 0x03A1, 0x0000, 0x03A3, 0x03A4, 0x03A5, 0x03A6, 0x03A7, 0x03A8, 0x03A9, 0x03AA, 0x03AB, 0x03AC, 0x03AD, 0x03AE, 0x03AF,
- 0x03B0, 0x03B1, 0x03B2, 0x03B3, 0x03B4, 0x03B5, 0x03B6, 0x03B7, 0x03B8, 0x03B9, 0x03BA, 0x03BB, 0x03BC, 0x03BD, 0x03BE, 0x03BF,
- 0x03C0, 0x03C1, 0x03C2, 0x03C3, 0x03C4, 0x03C5, 0x03C6, 0x03C7, 0x03C8, 0x03C9, 0x03CA, 0x03CB, 0x03CC, 0x03CD, 0x03CE, 0x0000
+return { [0] =
+ 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
+ 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
+ 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
+ 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
+ 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
+ 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
+ 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
+ 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
+ 0x20AC, 0x0000, 0x201A, 0x0192, 0x201E, 0x2026, 0x2020, 0x2021, 0x0000, 0x2030, 0x0000, 0x2039, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014, 0x0000, 0x2122, 0x0000, 0x203A, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x00A0, 0x0385, 0x0386, 0x00A3, 0x00A4, 0x00A5, 0x00A6, 0x00A7, 0x00A8, 0x00A9, 0x0000, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x2015,
+ 0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x0384, 0x00B5, 0x00B6, 0x00B7, 0x0388, 0x0389, 0x038A, 0x00BB, 0x038C, 0x00BD, 0x038E, 0x038F,
+ 0x0390, 0x0391, 0x0392, 0x0393, 0x0394, 0x0395, 0x0396, 0x0397, 0x0398, 0x0399, 0x039A, 0x039B, 0x039C, 0x039D, 0x039E, 0x039F,
+ 0x03A0, 0x03A1, 0x0000, 0x03A3, 0x03A4, 0x03A5, 0x03A6, 0x03A7, 0x03A8, 0x03A9, 0x03AA, 0x03AB, 0x03AC, 0x03AD, 0x03AE, 0x03AF,
+ 0x03B0, 0x03B1, 0x03B2, 0x03B3, 0x03B4, 0x03B5, 0x03B6, 0x03B7, 0x03B8, 0x03B9, 0x03BA, 0x03BB, 0x03BC, 0x03BD, 0x03BE, 0x03BF,
+ 0x03C0, 0x03C1, 0x03C2, 0x03C3, 0x03C4, 0x03C5, 0x03C6, 0x03C7, 0x03C8, 0x03C9, 0x03CA, 0x03CB, 0x03CC, 0x03CD, 0x03CE, 0x0000
}
diff --git a/tex/context/base/regi-cp1254.lua b/tex/context/base/regi-cp1254.lua
index 76fbe9c49..73b9927c6 100644
--- a/tex/context/base/regi-cp1254.lua
+++ b/tex/context/base/regi-cp1254.lua
@@ -6,21 +6,21 @@ if not modules then modules = { } end modules ['regi-cp1254'] = {
license = "see context related readme files"
}
-regimes.data["cp1254"] = { [0] =
- 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
- 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
- 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
- 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
- 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
- 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
- 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
- 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
- 0x20AC, 0x0000, 0x201A, 0x0192, 0x201E, 0x2026, 0x2020, 0x2021, 0x02C6, 0x2030, 0x0160, 0x2039, 0x0152, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014, 0x02DC, 0x2122, 0x0161, 0x203A, 0x0153, 0x0000, 0x0000, 0x0178,
- 0x00A0, 0x00A1, 0x00A2, 0x00A3, 0x00A4, 0x00A5, 0x00A6, 0x00A7, 0x00A8, 0x00A9, 0x00AA, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x00AF,
- 0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x00B4, 0x00B5, 0x00B6, 0x00B7, 0x00B8, 0x00B9, 0x00BA, 0x00BB, 0x00BC, 0x00BD, 0x00BE, 0x00BF,
- 0x00C0, 0x00C1, 0x00C2, 0x00C3, 0x00C4, 0x00C5, 0x00C6, 0x00C7, 0x00C8, 0x00C9, 0x00CA, 0x00CB, 0x00CC, 0x00CD, 0x00CE, 0x00CF,
- 0x011E, 0x00D1, 0x00D2, 0x00D3, 0x00D4, 0x00D5, 0x00D6, 0x00D7, 0x00D8, 0x00D9, 0x00DA, 0x00DB, 0x00DC, 0x0130, 0x015E, 0x00DF,
- 0x00E0, 0x00E1, 0x00E2, 0x00E3, 0x00E4, 0x00E5, 0x00E6, 0x00E7, 0x00E8, 0x00E9, 0x00EA, 0x00EB, 0x00EC, 0x00ED, 0x00EE, 0x00EF,
- 0x011F, 0x00F1, 0x00F2, 0x00F3, 0x00F4, 0x00F5, 0x00F6, 0x00F7, 0x00F8, 0x00F9, 0x00FA, 0x00FB, 0x00FC, 0x0131, 0x015F, 0x00FF
+return { [0] =
+ 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
+ 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
+ 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
+ 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
+ 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
+ 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
+ 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
+ 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
+ 0x20AC, 0x0000, 0x201A, 0x0192, 0x201E, 0x2026, 0x2020, 0x2021, 0x02C6, 0x2030, 0x0160, 0x2039, 0x0152, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014, 0x02DC, 0x2122, 0x0161, 0x203A, 0x0153, 0x0000, 0x0000, 0x0178,
+ 0x00A0, 0x00A1, 0x00A2, 0x00A3, 0x00A4, 0x00A5, 0x00A6, 0x00A7, 0x00A8, 0x00A9, 0x00AA, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x00AF,
+ 0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x00B4, 0x00B5, 0x00B6, 0x00B7, 0x00B8, 0x00B9, 0x00BA, 0x00BB, 0x00BC, 0x00BD, 0x00BE, 0x00BF,
+ 0x00C0, 0x00C1, 0x00C2, 0x00C3, 0x00C4, 0x00C5, 0x00C6, 0x00C7, 0x00C8, 0x00C9, 0x00CA, 0x00CB, 0x00CC, 0x00CD, 0x00CE, 0x00CF,
+ 0x011E, 0x00D1, 0x00D2, 0x00D3, 0x00D4, 0x00D5, 0x00D6, 0x00D7, 0x00D8, 0x00D9, 0x00DA, 0x00DB, 0x00DC, 0x0130, 0x015E, 0x00DF,
+ 0x00E0, 0x00E1, 0x00E2, 0x00E3, 0x00E4, 0x00E5, 0x00E6, 0x00E7, 0x00E8, 0x00E9, 0x00EA, 0x00EB, 0x00EC, 0x00ED, 0x00EE, 0x00EF,
+ 0x011F, 0x00F1, 0x00F2, 0x00F3, 0x00F4, 0x00F5, 0x00F6, 0x00F7, 0x00F8, 0x00F9, 0x00FA, 0x00FB, 0x00FC, 0x0131, 0x015F, 0x00FF
}
diff --git a/tex/context/base/regi-cp1255.lua b/tex/context/base/regi-cp1255.lua
index 9ea807fbd..2abb16b54 100644
--- a/tex/context/base/regi-cp1255.lua
+++ b/tex/context/base/regi-cp1255.lua
@@ -6,21 +6,21 @@ if not modules then modules = { } end modules ['regi-cp1255'] = {
license = "see context related readme files"
}
-regimes.data["cp1255"] = { [0] =
- 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
- 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
- 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
- 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
- 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
- 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
- 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
- 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
- 0x20AC, 0x0000, 0x201A, 0x0192, 0x201E, 0x2026, 0x2020, 0x2021, 0x02C6, 0x2030, 0x0000, 0x2039, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014, 0x02DC, 0x2122, 0x0000, 0x203A, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x00A0, 0x00A1, 0x00A2, 0x00A3, 0x20AA, 0x00A5, 0x00A6, 0x00A7, 0x00A8, 0x00A9, 0x00D7, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x00AF,
- 0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x00B4, 0x00B5, 0x00B6, 0x00B7, 0x00B8, 0x00B9, 0x00F7, 0x00BB, 0x00BC, 0x00BD, 0x00BE, 0x00BF,
- 0x05B0, 0x05B1, 0x05B2, 0x05B3, 0x05B4, 0x05B5, 0x05B6, 0x05B7, 0x05B8, 0x05B9, 0x0000, 0x05BB, 0x05BC, 0x05BD, 0x05BE, 0x05BF,
- 0x05C0, 0x05C1, 0x05C2, 0x05C3, 0x05F0, 0x05F1, 0x05F2, 0x05F3, 0x05F4, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x05D0, 0x05D1, 0x05D2, 0x05D3, 0x05D4, 0x05D5, 0x05D6, 0x05D7, 0x05D8, 0x05D9, 0x05DA, 0x05DB, 0x05DC, 0x05DD, 0x05DE, 0x05DF,
- 0x05E0, 0x05E1, 0x05E2, 0x05E3, 0x05E4, 0x05E5, 0x05E6, 0x05E7, 0x05E8, 0x05E9, 0x05EA, 0x0000, 0x0000, 0x200E, 0x200F, 0x0000
+return { [0] =
+ 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
+ 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
+ 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
+ 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
+ 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
+ 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
+ 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
+ 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
+ 0x20AC, 0x0000, 0x201A, 0x0192, 0x201E, 0x2026, 0x2020, 0x2021, 0x02C6, 0x2030, 0x0000, 0x2039, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014, 0x02DC, 0x2122, 0x0000, 0x203A, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x00A0, 0x00A1, 0x00A2, 0x00A3, 0x20AA, 0x00A5, 0x00A6, 0x00A7, 0x00A8, 0x00A9, 0x00D7, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x00AF,
+ 0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x00B4, 0x00B5, 0x00B6, 0x00B7, 0x00B8, 0x00B9, 0x00F7, 0x00BB, 0x00BC, 0x00BD, 0x00BE, 0x00BF,
+ 0x05B0, 0x05B1, 0x05B2, 0x05B3, 0x05B4, 0x05B5, 0x05B6, 0x05B7, 0x05B8, 0x05B9, 0x0000, 0x05BB, 0x05BC, 0x05BD, 0x05BE, 0x05BF,
+ 0x05C0, 0x05C1, 0x05C2, 0x05C3, 0x05F0, 0x05F1, 0x05F2, 0x05F3, 0x05F4, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x05D0, 0x05D1, 0x05D2, 0x05D3, 0x05D4, 0x05D5, 0x05D6, 0x05D7, 0x05D8, 0x05D9, 0x05DA, 0x05DB, 0x05DC, 0x05DD, 0x05DE, 0x05DF,
+ 0x05E0, 0x05E1, 0x05E2, 0x05E3, 0x05E4, 0x05E5, 0x05E6, 0x05E7, 0x05E8, 0x05E9, 0x05EA, 0x0000, 0x0000, 0x200E, 0x200F, 0x0000
}
diff --git a/tex/context/base/regi-cp1256.lua b/tex/context/base/regi-cp1256.lua
index e77525bcf..a0697c321 100644
--- a/tex/context/base/regi-cp1256.lua
+++ b/tex/context/base/regi-cp1256.lua
@@ -6,21 +6,21 @@ if not modules then modules = { } end modules ['regi-cp1256'] = {
license = "see context related readme files"
}
-regimes.data["cp1256"] = { [0] =
- 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
- 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
- 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
- 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
- 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
- 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
- 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
- 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
- 0x20AC, 0x067E, 0x201A, 0x0192, 0x201E, 0x2026, 0x2020, 0x2021, 0x02C6, 0x2030, 0x0679, 0x2039, 0x0152, 0x0686, 0x0698, 0x0688,
- 0x06AF, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014, 0x06A9, 0x2122, 0x0691, 0x203A, 0x0153, 0x200C, 0x200D, 0x06BA,
- 0x00A0, 0x060C, 0x00A2, 0x00A3, 0x00A4, 0x00A5, 0x00A6, 0x00A7, 0x00A8, 0x00A9, 0x06BE, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x00AF,
- 0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x00B4, 0x00B5, 0x00B6, 0x00B7, 0x00B8, 0x00B9, 0x061B, 0x00BB, 0x00BC, 0x00BD, 0x00BE, 0x061F,
- 0x06C1, 0x0621, 0x0622, 0x0623, 0x0624, 0x0625, 0x0626, 0x0627, 0x0628, 0x0629, 0x062A, 0x062B, 0x062C, 0x062D, 0x062E, 0x062F,
- 0x0630, 0x0631, 0x0632, 0x0633, 0x0634, 0x0635, 0x0636, 0x00D7, 0x0637, 0x0638, 0x0639, 0x063A, 0x0640, 0x0641, 0x0642, 0x0643,
- 0x00E0, 0x0644, 0x00E2, 0x0645, 0x0646, 0x0647, 0x0648, 0x00E7, 0x00E8, 0x00E9, 0x00EA, 0x00EB, 0x0649, 0x064A, 0x00EE, 0x00EF,
- 0x064B, 0x064C, 0x064D, 0x064E, 0x00F4, 0x064F, 0x0650, 0x00F7, 0x0651, 0x00F9, 0x0652, 0x00FB, 0x00FC, 0x200E, 0x200F, 0x06D2
+return { [0] =
+ 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
+ 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
+ 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
+ 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
+ 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
+ 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
+ 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
+ 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
+ 0x20AC, 0x067E, 0x201A, 0x0192, 0x201E, 0x2026, 0x2020, 0x2021, 0x02C6, 0x2030, 0x0679, 0x2039, 0x0152, 0x0686, 0x0698, 0x0688,
+ 0x06AF, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014, 0x06A9, 0x2122, 0x0691, 0x203A, 0x0153, 0x200C, 0x200D, 0x06BA,
+ 0x00A0, 0x060C, 0x00A2, 0x00A3, 0x00A4, 0x00A5, 0x00A6, 0x00A7, 0x00A8, 0x00A9, 0x06BE, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x00AF,
+ 0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x00B4, 0x00B5, 0x00B6, 0x00B7, 0x00B8, 0x00B9, 0x061B, 0x00BB, 0x00BC, 0x00BD, 0x00BE, 0x061F,
+ 0x06C1, 0x0621, 0x0622, 0x0623, 0x0624, 0x0625, 0x0626, 0x0627, 0x0628, 0x0629, 0x062A, 0x062B, 0x062C, 0x062D, 0x062E, 0x062F,
+ 0x0630, 0x0631, 0x0632, 0x0633, 0x0634, 0x0635, 0x0636, 0x00D7, 0x0637, 0x0638, 0x0639, 0x063A, 0x0640, 0x0641, 0x0642, 0x0643,
+ 0x00E0, 0x0644, 0x00E2, 0x0645, 0x0646, 0x0647, 0x0648, 0x00E7, 0x00E8, 0x00E9, 0x00EA, 0x00EB, 0x0649, 0x064A, 0x00EE, 0x00EF,
+ 0x064B, 0x064C, 0x064D, 0x064E, 0x00F4, 0x064F, 0x0650, 0x00F7, 0x0651, 0x00F9, 0x0652, 0x00FB, 0x00FC, 0x200E, 0x200F, 0x06D2
}
diff --git a/tex/context/base/regi-cp1257.lua b/tex/context/base/regi-cp1257.lua
index 1b5d53379..6e39c10d4 100644
--- a/tex/context/base/regi-cp1257.lua
+++ b/tex/context/base/regi-cp1257.lua
@@ -6,21 +6,21 @@ if not modules then modules = { } end modules ['regi-cp1257'] = {
license = "see context related readme files"
}
-regimes.data["cp1257"] = { [0] =
- 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
- 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
- 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
- 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
- 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
- 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
- 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
- 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
- 0x20AC, 0x0000, 0x201A, 0x0000, 0x201E, 0x2026, 0x2020, 0x2021, 0x0000, 0x2030, 0x0000, 0x2039, 0x0000, 0x00A8, 0x02C7, 0x00B8,
- 0x0000, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014, 0x0000, 0x2122, 0x0000, 0x203A, 0x0000, 0x00AF, 0x02DB, 0x0000,
- 0x00A0, 0x0000, 0x00A2, 0x00A3, 0x00A4, 0x0000, 0x00A6, 0x00A7, 0x00D8, 0x00A9, 0x0156, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x00C6,
- 0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x00B4, 0x00B5, 0x00B6, 0x00B7, 0x00F8, 0x00B9, 0x0157, 0x00BB, 0x00BC, 0x00BD, 0x00BE, 0x00E6,
- 0x0104, 0x012E, 0x0100, 0x0106, 0x00C4, 0x00C5, 0x0118, 0x0112, 0x010C, 0x00C9, 0x0179, 0x0116, 0x0122, 0x0136, 0x012A, 0x013B,
- 0x0160, 0x0143, 0x0145, 0x00D3, 0x014C, 0x00D5, 0x00D6, 0x00D7, 0x0172, 0x0141, 0x015A, 0x016A, 0x00DC, 0x017B, 0x017D, 0x00DF,
- 0x0105, 0x012F, 0x0101, 0x0107, 0x00E4, 0x00E5, 0x0119, 0x0113, 0x010D, 0x00E9, 0x017A, 0x0117, 0x0123, 0x0137, 0x012B, 0x013C,
- 0x0161, 0x0144, 0x0146, 0x00F3, 0x014D, 0x00F5, 0x00F6, 0x00F7, 0x0173, 0x0142, 0x015B, 0x016B, 0x00FC, 0x017C, 0x017E, 0x02D9
+return { [0] =
+ 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
+ 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
+ 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
+ 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
+ 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
+ 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
+ 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
+ 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
+ 0x20AC, 0x0000, 0x201A, 0x0000, 0x201E, 0x2026, 0x2020, 0x2021, 0x0000, 0x2030, 0x0000, 0x2039, 0x0000, 0x00A8, 0x02C7, 0x00B8,
+ 0x0000, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014, 0x0000, 0x2122, 0x0000, 0x203A, 0x0000, 0x00AF, 0x02DB, 0x0000,
+ 0x00A0, 0x0000, 0x00A2, 0x00A3, 0x00A4, 0x0000, 0x00A6, 0x00A7, 0x00D8, 0x00A9, 0x0156, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x00C6,
+ 0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x00B4, 0x00B5, 0x00B6, 0x00B7, 0x00F8, 0x00B9, 0x0157, 0x00BB, 0x00BC, 0x00BD, 0x00BE, 0x00E6,
+ 0x0104, 0x012E, 0x0100, 0x0106, 0x00C4, 0x00C5, 0x0118, 0x0112, 0x010C, 0x00C9, 0x0179, 0x0116, 0x0122, 0x0136, 0x012A, 0x013B,
+ 0x0160, 0x0143, 0x0145, 0x00D3, 0x014C, 0x00D5, 0x00D6, 0x00D7, 0x0172, 0x0141, 0x015A, 0x016A, 0x00DC, 0x017B, 0x017D, 0x00DF,
+ 0x0105, 0x012F, 0x0101, 0x0107, 0x00E4, 0x00E5, 0x0119, 0x0113, 0x010D, 0x00E9, 0x017A, 0x0117, 0x0123, 0x0137, 0x012B, 0x013C,
+ 0x0161, 0x0144, 0x0146, 0x00F3, 0x014D, 0x00F5, 0x00F6, 0x00F7, 0x0173, 0x0142, 0x015B, 0x016B, 0x00FC, 0x017C, 0x017E, 0x02D9
}
diff --git a/tex/context/base/regi-cp1258.lua b/tex/context/base/regi-cp1258.lua
index 271db3009..cf64d2ab6 100644
--- a/tex/context/base/regi-cp1258.lua
+++ b/tex/context/base/regi-cp1258.lua
@@ -6,21 +6,21 @@ if not modules then modules = { } end modules ['regi-cp1258'] = {
license = "see context related readme files"
}
-regimes.data["cp1258"] = { [0] =
- 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
- 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
- 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
- 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
- 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
- 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
- 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
- 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
- 0x20AC, 0x0000, 0x201A, 0x0192, 0x201E, 0x2026, 0x2020, 0x2021, 0x02C6, 0x2030, 0x0000, 0x2039, 0x0152, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014, 0x02DC, 0x2122, 0x0000, 0x203A, 0x0153, 0x0000, 0x0000, 0x0178,
- 0x00A0, 0x00A1, 0x00A2, 0x00A3, 0x00A4, 0x00A5, 0x00A6, 0x00A7, 0x00A8, 0x00A9, 0x00AA, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x00AF,
- 0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x00B4, 0x00B5, 0x00B6, 0x00B7, 0x00B8, 0x00B9, 0x00BA, 0x00BB, 0x00BC, 0x00BD, 0x00BE, 0x00BF,
- 0x00C0, 0x00C1, 0x00C2, 0x0102, 0x00C4, 0x00C5, 0x00C6, 0x00C7, 0x00C8, 0x00C9, 0x00CA, 0x00CB, 0x0300, 0x00CD, 0x00CE, 0x00CF,
- 0x0110, 0x00D1, 0x0309, 0x00D3, 0x00D4, 0x01A0, 0x00D6, 0x00D7, 0x00D8, 0x00D9, 0x00DA, 0x00DB, 0x00DC, 0x01AF, 0x0303, 0x00DF,
- 0x00E0, 0x00E1, 0x00E2, 0x0103, 0x00E4, 0x00E5, 0x00E6, 0x00E7, 0x00E8, 0x00E9, 0x00EA, 0x00EB, 0x0301, 0x00ED, 0x00EE, 0x00EF,
- 0x0111, 0x00F1, 0x0323, 0x00F3, 0x00F4, 0x01A1, 0x00F6, 0x00F7, 0x00F8, 0x00F9, 0x00FA, 0x00FB, 0x00FC, 0x01B0, 0x20AB, 0x00FF
+return { [0] =
+ 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
+ 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
+ 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
+ 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
+ 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
+ 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
+ 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
+ 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
+ 0x20AC, 0x0000, 0x201A, 0x0192, 0x201E, 0x2026, 0x2020, 0x2021, 0x02C6, 0x2030, 0x0000, 0x2039, 0x0152, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014, 0x02DC, 0x2122, 0x0000, 0x203A, 0x0153, 0x0000, 0x0000, 0x0178,
+ 0x00A0, 0x00A1, 0x00A2, 0x00A3, 0x00A4, 0x00A5, 0x00A6, 0x00A7, 0x00A8, 0x00A9, 0x00AA, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x00AF,
+ 0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x00B4, 0x00B5, 0x00B6, 0x00B7, 0x00B8, 0x00B9, 0x00BA, 0x00BB, 0x00BC, 0x00BD, 0x00BE, 0x00BF,
+ 0x00C0, 0x00C1, 0x00C2, 0x0102, 0x00C4, 0x00C5, 0x00C6, 0x00C7, 0x00C8, 0x00C9, 0x00CA, 0x00CB, 0x0300, 0x00CD, 0x00CE, 0x00CF,
+ 0x0110, 0x00D1, 0x0309, 0x00D3, 0x00D4, 0x01A0, 0x00D6, 0x00D7, 0x00D8, 0x00D9, 0x00DA, 0x00DB, 0x00DC, 0x01AF, 0x0303, 0x00DF,
+ 0x00E0, 0x00E1, 0x00E2, 0x0103, 0x00E4, 0x00E5, 0x00E6, 0x00E7, 0x00E8, 0x00E9, 0x00EA, 0x00EB, 0x0301, 0x00ED, 0x00EE, 0x00EF,
+ 0x0111, 0x00F1, 0x0323, 0x00F3, 0x00F4, 0x01A1, 0x00F6, 0x00F7, 0x00F8, 0x00F9, 0x00FA, 0x00FB, 0x00FC, 0x01B0, 0x20AB, 0x00FF
}
diff --git a/tex/context/base/regi-demo.lua b/tex/context/base/regi-demo.lua
new file mode 100644
index 000000000..689f44e32
--- /dev/null
+++ b/tex/context/base/regi-demo.lua
@@ -0,0 +1,22 @@
+if not modules then modules = { } end modules ['regi-demo'] = {
+ version = 1.001,
+ comment = "companion to regi-ini.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+-- digits -> *
+
+return {
+ [0x0030] = 0x002A,
+ [0x0031] = 0x002A,
+ [0x0032] = 0x002A,
+ [0x0033] = 0x002A,
+ [0x0034] = 0x002A,
+ [0x0035] = 0x002A,
+ [0x0036] = 0x002A,
+ [0x0037] = 0x002A,
+ [0x0038] = 0x002A,
+ [0x0039] = 0x002A,
+}
diff --git a/tex/context/base/regi-ini.lua b/tex/context/base/regi-ini.lua
index d3444e6f4..c6dae61c1 100644
--- a/tex/context/base/regi-ini.lua
+++ b/tex/context/base/regi-ini.lua
@@ -6,147 +6,216 @@ if not modules then modules = { } end modules ['regi-ini'] = {
license = "see context related readme files"
}
-local utf = unicode.utf8
-local char, utfchar, gsub = string.char, utf.char, string.gsub
-
--[[ldx--
<p>Regimes take care of converting the input characters into
<l n='utf'/> sequences. The conversion tables are loaded at
runtime.</p>
--ldx]]--
-regimes = regimes or { }
-local regimes = regimes
+local utfchar = utf.char
+local char, gsub, format = string.char, string.gsub, string.format
+local next, setmetatable = next, setmetatable
+local insert, remove = table.insert, table.remove
-regimes.data = regimes.data or { }
-local data = regimes.data
+local sequencers = utilities.sequencers
+local textlineactions = resolvers.openers.helpers.textlineactions
-regimes.utf = regimes.utf or { }
+--[[ldx--
+<p>We will hook regime handling code into the input methods.</p>
+--ldx]]--
--- regimes.synonyms = regimes.synonyms or { }
--- local synonyms = regimes.synonyms
---
--- if storage then
--- storage.register("regimes/synonyms", synonyms, "regimes.synonyms")
--- else
--- regimes.synonyms = { }
--- end
+local trace_translating = false trackers.register("regimes.translating", function(v) trace_translating = v end)
+
+local report_loading = logs.new("regimes","loading")
+local report_translating = logs.new("regimes","translating")
-local synonyms = {
-
- ["windows-1250"] = "cp1250",
- ["windows-1251"] = "cp1251",
- ["windows-1252"] = "cp1252",
- ["windows-1253"] = "cp1253",
- ["windows-1254"] = "cp1254",
- ["windows-1255"] = "cp1255",
- ["windows-1256"] = "cp1256",
- ["windows-1257"] = "cp1257",
- ["windows-1258"] = "cp1258",
-
- ["il1"] = "8859-1",
- ["il2"] = "8859-2",
- ["il3"] = "8859-3",
- ["il4"] = "8859-4",
- ["il5"] = "8859-9",
- ["il6"] = "8859-10",
- ["il7"] = "8859-13",
- ["il8"] = "8859-14",
- ["il9"] = "8859-15",
- ["il10"] = "8859-16",
-
- ["iso-8859-1"] = "8859-1",
- ["iso-8859-2"] = "8859-2",
- ["iso-8859-3"] = "8859-3",
- ["iso-8859-4"] = "8859-4",
- ["iso-8859-9"] = "8859-9",
- ["iso-8859-10"] = "8859-10",
- ["iso-8859-13"] = "8859-13",
- ["iso-8859-14"] = "8859-14",
- ["iso-8859-15"] = "8859-15",
- ["iso-8859-16"] = "8859-16",
-
- ["latin1"] = "8859-1",
- ["latin2"] = "8859-2",
- ["latin3"] = "8859-3",
- ["latin4"] = "8859-4",
- ["latin5"] = "8859-9",
- ["latin6"] = "8859-10",
- ["latin7"] = "8859-13",
- ["latin8"] = "8859-14",
- ["latin9"] = "8859-15",
- ["latin10"] = "8859-16",
-
- ["utf-8"] = "utf",
- ["utf8"] = "utf",
-
- ["windows"] = "cp1252",
+regimes = regimes or { }
+local regimes = regimes
+local mapping = {
+ utf = false
}
-regimes.currentregime = "utf"
+local synonyms = { -- backward compatibility list
+
+ ["windows-1250"] = "cp1250",
+ ["windows-1251"] = "cp1251",
+ ["windows-1252"] = "cp1252",
+ ["windows-1253"] = "cp1253",
+ ["windows-1254"] = "cp1254",
+ ["windows-1255"] = "cp1255",
+ ["windows-1256"] = "cp1256",
+ ["windows-1257"] = "cp1257",
+ ["windows-1258"] = "cp1258",
+
+ ["il1"] = "8859-1",
+ ["il2"] = "8859-2",
+ ["il3"] = "8859-3",
+ ["il4"] = "8859-4",
+ ["il5"] = "8859-9",
+ ["il6"] = "8859-10",
+ ["il7"] = "8859-13",
+ ["il8"] = "8859-14",
+ ["il9"] = "8859-15",
+ ["il10"] = "8859-16",
+
+ ["iso-8859-1"] = "8859-1",
+ ["iso-8859-2"] = "8859-2",
+ ["iso-8859-3"] = "8859-3",
+ ["iso-8859-4"] = "8859-4",
+ ["iso-8859-9"] = "8859-9",
+ ["iso-8859-10"] = "8859-10",
+ ["iso-8859-13"] = "8859-13",
+ ["iso-8859-14"] = "8859-14",
+ ["iso-8859-15"] = "8859-15",
+ ["iso-8859-16"] = "8859-16",
+
+ ["latin1"] = "8859-1",
+ ["latin2"] = "8859-2",
+ ["latin3"] = "8859-3",
+ ["latin4"] = "8859-4",
+ ["latin5"] = "8859-9",
+ ["latin6"] = "8859-10",
+ ["latin7"] = "8859-13",
+ ["latin8"] = "8859-14",
+ ["latin9"] = "8859-15",
+ ["latin10"] = "8859-16",
+
+ ["utf-8"] = "utf",
+ ["utf8"] = "utf",
+ [""] = "utf",
+
+ ["windows"] = "cp1252",
---[[ldx--
-<p>We will hook regime handling code into the input methods.</p>
---ldx]]--
+}
+
+local currentregime = "utf"
-function regimes.number(n)
- if type(n) == "string" then return tonumber(n,16) else return n end
+local function loadregime(mapping,regime)
+ local name = resolvers.findfile(format("regi-%s.lua",regime)) or ""
+ local data = name ~= "" and dofile(name)
+ if data then
+ vector = { }
+ for eightbit, unicode in next, data do
+ vector[char(eightbit)] = utfchar(unicode)
+ end
+ report_loading("vector '%s' is loaded",regime)
+ else
+ vector = false
+ report_loading("vector '%s' is unknown",regime)
+ end
+ mapping[regime] = vector
+ return vector
end
-function regimes.setsynonym(synonym,target) -- more or less obsolete
- synonyms[synonym] = target
+setmetatable(mapping, { __index = loadregime })
+
+local function translate(line,regime)
+ if line and #line > 0 then
+ local map = mapping[regime and synonyms[regime] or regime or currentregime]
+ if map then
+ line = gsub(line,".",map)
+ end
+ end
+ return line
end
-function regimes.truename(regime)
- context((regime and synonyms[synonym] or regime) or regimes.currentregime)
+local function disable()
+ currentregime = "utf"
+ sequencers.disableaction(textlineactions,"regimes.process")
end
-function regimes.load(regime)
+local function enable(regime)
regime = synonyms[regime] or regime
- if not data[regime] then
- environment.loadluafile("regi-"..regime, 1.001)
- if data[regime] then
- regimes.utf[regime] = { }
- for k,v in next, data[regime] do
- regimes.utf[regime][char(k)] = utfchar(v)
- end
+ if mapping[regime] == false then
+ disable()
+ else
+ currentregime = regime
+ sequencers.enableaction(textlineactions,"regimes.process")
+ end
+end
+
+regimes.translate = translate
+regimes.enable = enable
+regimes.disable = disable
+
+-- The following function can be used when we want to make sure that
+-- utf gets passed unharmed. This is needed for modules.
+
+local level = 0
+
+function regimes.process(str)
+ if level == 0 then
+ str = translate(str,currentregime)
+ if trace_translating then
+ report_translating("utf: %s",str)
end
end
+ return str
end
-function regimes.translate(line,regime)
- regime = synonyms[regime] or regime
- if regime and line then
- local rur = regimes.utf[regime]
- if rur then
- return (gsub(line,"(.)",rur)) -- () redundant
+function regimes.push()
+ level = level + 1
+ if trace_translating then
+ report_translating("pushing level %s",level)
+ end
+end
+
+function regimes.pop()
+ if level > 0 then
+ if trace_translating then
+ report_translating("popping level %s",level)
end
+ level = level - 1
end
- return line
end
-local sequencers = utilities.sequencers
-local textlineactions = resolvers.openers.helpers.textlineactions
+sequencers.prependaction(textlineactions,"system","regimes.process")
+sequencers.disableaction(textlineactions,"regimes.process")
+
+-- interface:
-function regimes.process(s)
- return regimes.translate(s,regimes.currentregime)
+commands.enableregime = enable
+commands.disableregime = disable
+
+function commands.currentregime()
+ context(currentregime)
end
-function regimes.enable(regime)
- regime = synonyms[regime] or regime
- if data[regime] then
- regimes.currentregime = regime
- sequencers.enableaction(textlineactions,"regimes.process")
- else
- sequencers.disableaction(textlineactions,"regimes.process")
+local stack = { }
+
+function commands.startregime(regime)
+ insert(stack,currentregime)
+ if trace_translating then
+ report_translating("start '%s'",regime)
end
+ enable(regime)
end
-function regimes.disable()
- regimes.currentregime = "utf"
- sequencers.disableaction(textlineactions,"regimes.process")
+function commands.stopregime()
+ if #stack > 0 then
+ local regime = remove(stack)
+ if trace_translating then
+ report_translating("stop '%s'",regime)
+ end
+ enable(regime)
+ end
end
-utilities.sequencers.prependaction(textlineactions,"system","regimes.process")
-utilities.sequencers.disableaction(textlineactions,"regimes.process")
+-- obsolete:
+--
+-- function regimes.setsynonym(synonym,target)
+-- synonyms[synonym] = target
+-- end
+--
+-- function regimes.truename(regime)
+-- return regime and synonyms[regime] or regime or currentregime
+-- end
+--
+-- function commands.trueregimename(regime)
+-- context(regimes.truename(regime))
+-- end
+--
+-- function regimes.load(regime)
+-- return mapping[synonyms[regime] or regime]
+-- end
diff --git a/tex/context/base/regi-ini.mkiv b/tex/context/base/regi-ini.mkiv
index b306d87f4..41f001426 100644
--- a/tex/context/base/regi-ini.mkiv
+++ b/tex/context/base/regi-ini.mkiv
@@ -11,45 +11,39 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-\unprotect
-
-%D First some initialization code:
-
\registerctxluafile{regi-ini}{1.001}
-%D \macros
-%D {currentregime}
-
-\def\currentregime{utf}
-
-%D \macros
-%D {defineregimesynonym,trueregimename}
-
-\unexpanded\def\defineregimesynonym % more or less obsolete
- {\dodoubleargument\dodefineregimesynonym}
-
-\def\dodefineregimesynonym[#1][#2]%
- {\ctxlua{regimes.setsynonym("#1","#2")}}
-
-\def\trueregimename#1%
- {\ctxlua{regimes.truename("#1")}}
-
-%D \macros
-%D {useregime}
-
-\def\useregime[#1]%
- {\processcommalist[#1]\douseregime}
-
-\def\douseregime#1%
- {\ctxlua{regimes.load("#1")}}
+\unprotect
%D \macros
-%D {enableregime,disableregime}
-
-\def\enableregime[#1]%
- {\edef\currentregime{\ctxlua{regimes.load("#1") regimes.enable("#1") regimes.truename()}}}
-
-\def\disableregime
- {\edef\currentregime{\ctxlua{regimes.disable()}}}
+%D {enableregime,disableregime,currentregime}
+%D
+%D Beware, the enable and disable commands are global switches, so
+%D best use the start|/|stop commands.
+
+\unexpanded\def\enableregime[#1]{\ctxcommand{enableregime("#1")}}
+\unexpanded\def\disableregime {\ctxcommand{disableregime()}}
+\unexpanded\def\startregime [#1]{\ctxcommand{startregime("#1")}}
+\unexpanded\def\stopregime {\ctxcommand{stopregime()}}
+ \def\currentregime {\ctxcommand{currentregime()}}
+
+% D \macros
+% D {defineregimesynonym,trueregimename}
+%
+% \unexpanded\def\defineregimesynonym % more or less obsolete
+% {\dodoubleargument\dodefineregimesynonym}
+%
+% \def\dodefineregimesynonym[#1][#2]%
+% {\ctxlua{regimes.setsynonym("#1","#2")}}
+%
+% \def\trueregimename#1%
+% {\ctxcommand{trueregimename("#1")}}
+
+% D \macros
+% D {useregime}
+% D
+% D This one is sort of obsolete but we keep them around.
+
+\unexpanded\def\useregime[#1]{}
\protect \endinput
diff --git a/tex/context/base/scrp-ini.lua b/tex/context/base/scrp-ini.lua
index 5b012890d..2d36fd973 100644
--- a/tex/context/base/scrp-ini.lua
+++ b/tex/context/base/scrp-ini.lua
@@ -13,7 +13,7 @@ local texwrite = tex.write
local trace_analyzing = false trackers.register("scripts.analyzing", function(v) trace_analyzing = v end)
local trace_injections = false trackers.register("scripts.injections", function(v) trace_injections = v end)
-local report_preprocessing = logs.new("preprocessing")
+local report_preprocessing = logs.new("scripts","preprocessing")
local allocate = utilities.storage.allocate
diff --git a/tex/context/base/sort-ini.lua b/tex/context/base/sort-ini.lua
index 2cf92bf67..793022e52 100644
--- a/tex/context/base/sort-ini.lua
+++ b/tex/context/base/sort-ini.lua
@@ -50,7 +50,7 @@ local allocate = utilities.storage.allocate
local trace_tests = false trackers.register("sorters.tests", function(v) trace_tests = v end)
-local report_sorters = logs.new("sorters")
+local report_sorters = logs.new("languages","sorters")
local comparers = { }
local splitters = { }
diff --git a/tex/context/base/spac-ver.lua b/tex/context/base/spac-ver.lua
index 958d1ad7a..c10ff18fd 100644
--- a/tex/context/base/spac-ver.lua
+++ b/tex/context/base/spac-ver.lua
@@ -46,9 +46,9 @@ local trace_vspacing = false trackers.register("builders.vspacing",
local trace_vsnapping = false trackers.register("builders.vsnapping", function(v) trace_vsnapping = v end)
local trace_vpacking = false trackers.register("builders.vpacking", function(v) trace_vpacking = v end)
-local report_vspacing = logs.new("vspacing")
-local report_collapser = logs.new("collapser")
-local report_snapper = logs.new("snapper")
+local report_vspacing = logs.new("vspacing","spacing")
+local report_collapser = logs.new("vspacing","collapsing")
+local report_snapper = logs.new("vspacing","snapping")
local a_skipcategory = attributes.private('skipcategory')
local a_skippenalty = attributes.private('skippenalty')
diff --git a/tex/context/base/spac-ver.mkiv b/tex/context/base/spac-ver.mkiv
index fa408ec38..1da6d6d7c 100644
--- a/tex/context/base/spac-ver.mkiv
+++ b/tex/context/base/spac-ver.mkiv
@@ -1854,13 +1854,13 @@
% \def\disablevspacing{\the\everydisablevspacing}
%
% \appendtoks
-% \writestatus\m!systems{! ! enabling vspacing ! !}%
+% \writestatus\m!system{! ! enabling vspacing ! !}%
% \settrue\vspacingenabled
% \ctxlua{builders.vspacing.enable()}%
% \to \everyenablevspacing
%
% \appendtoks
-% \writestatus\m!systems{! ! disabling vspacing ! !}%
+% \writestatus\m!system{! ! disabling vspacing ! !}%
% \setfalse\vspacingenabled
% \ctxlua{builders.vspacing.disable()}%
% \to \everydisablevspacing
diff --git a/tex/context/base/status-files.pdf b/tex/context/base/status-files.pdf
index c9b8be6bd..139a75836 100644
--- a/tex/context/base/status-files.pdf
+++ b/tex/context/base/status-files.pdf
Binary files differ
diff --git a/tex/context/base/strc-bkm.lua b/tex/context/base/strc-bkm.lua
index 08f26c88f..84bb73e80 100644
--- a/tex/context/base/strc-bkm.lua
+++ b/tex/context/base/strc-bkm.lua
@@ -21,7 +21,7 @@ local codeinjections = backends.codeinjections
local trace_bookmarks = false trackers.register("references.bookmarks", function(v) trace_bookmarks = v end)
-local report_bookmarks = logs.new("bookmarks")
+local report_bookmarks = logs.new("structure","bookmarks")
local structures = structures
diff --git a/tex/context/base/strc-doc.lua b/tex/context/base/strc-doc.lua
index 7e95fb563..8195bdecf 100644
--- a/tex/context/base/strc-doc.lua
+++ b/tex/context/base/strc-doc.lua
@@ -25,7 +25,7 @@ local variables = interfaces.variables
local trace_sectioning = false trackers.register("structures.sectioning", function(v) trace_sectioning = v end)
local trace_detail = false trackers.register("structures.detail", function(v) trace_detail = v end)
-local report_structure = logs.new("structure")
+local report_structure = logs.new("structure","sectioning")
local structures, context = structures, context
@@ -322,7 +322,7 @@ function sections.somelevel(given)
-- given.numberdata = nil
end
-function sections.writestatus()
+function sections.reportstructure()
if sections.verbose then
local numbers, ownnumbers, status, depth = data.numbers, data.ownnumbers, data.status, data.depth
local d = status[depth]
@@ -332,11 +332,11 @@ function sections.writestatus()
local t = (l ~= "" and l) or d.titledata.title or "[no title]"
local m = d.metadata.name
if o and not find(o,"^%.*$") then
- commands.writestatus("structure","%s @ level %i : (%s) %s -> %s",m,depth,n,o,t)
+ report_structure("%s @ level %i : (%s) %s -> %s",m,depth,n,o,t)
elseif d.directives and d.directives.hidenumber then
- commands.writestatus("structure","%s @ level %i : (%s) -> %s",m,depth,n,t)
+ report_structure("%s @ level %i : (%s) -> %s",m,depth,n,t)
else
- commands.writestatus("structure","%s @ level %i : %s -> %s",m,depth,n,t)
+ report_structure("%s @ level %i : %s -> %s",m,depth,n,t)
end
end
end
diff --git a/tex/context/base/strc-doc.mkiv b/tex/context/base/strc-doc.mkiv
index 972e50f78..2d05bf04d 100644
--- a/tex/context/base/strc-doc.mkiv
+++ b/tex/context/base/strc-doc.mkiv
@@ -178,7 +178,7 @@
{\xdef\currentstructureattribute {\ctxlua {tex.write(structures.references.setinternalreference("\currentstructurereferenceprefix","\currentstructurereference",\nextinternalreference,"\@@iafocus"))}}%
\xdef\currentstructuresynchronize{\ctxlatelua{structures.lists.enhance(#1)}}}
-\def\reportcurrentstructure{\ctxlua{structures.sections.writestatus()}}
+\def\reportcurrentstructure{\ctxlua{structures.sections.reportstructure()}}
% Beware: we need to flush the data to the list explicitly. This is because
% node in inserted and we may want control over when that happens.
diff --git a/tex/context/base/strc-ini.lua b/tex/context/base/strc-ini.lua
index 88c1d344d..69d7528dd 100644
--- a/tex/context/base/strc-ini.lua
+++ b/tex/context/base/strc-ini.lua
@@ -31,7 +31,7 @@ local ctxcatcodes, xmlcatcodes, notcatcodes = tex.ctxcatcodes, tex.xmlcatcodes,
local trace_processors = false trackers.register("structures.processors", function(v) trace_processors = v end)
-local report_processors = logs.new("processors")
+local report_processors = logs.new("structure","processors")
-- move this
diff --git a/tex/context/base/strc-lst.lua b/tex/context/base/strc-lst.lua
index 8278a66d9..fca7f56e3 100644
--- a/tex/context/base/strc-lst.lua
+++ b/tex/context/base/strc-lst.lua
@@ -21,7 +21,7 @@ local allocate, mark, checked = utilities.storage.allocate, utilities.storage.ma
local trace_lists = false trackers.register("structures.lists", function(v) trace_lists = v end)
-local report_lists = logs.new("lists")
+local report_lists = logs.new("structure","lists")
local ctxcatcodes = tex.ctxcatcodes
diff --git a/tex/context/base/strc-lst.mkiv b/tex/context/base/strc-lst.mkiv
index eb876452c..50458c4d5 100644
--- a/tex/context/base/strc-lst.mkiv
+++ b/tex/context/base/strc-lst.mkiv
@@ -211,7 +211,7 @@
\definelistextra
[\v!page]
- [\c!before={\showmessage\m!systems{14}{\currentlist/\currentlistindex}\page}]
+ [\c!before={\showmessage\m!system{14}{\currentlist/\currentlistindex}\page}]
\def\processlistextrabefore{\executeifdefined{\??li:\c!extras:\currentlistextra:\c!before}\relax}
\def\processlistextraafter {\executeifdefined{\??li:\c!extras:\currentlistextra:\c!after }\relax}
@@ -639,7 +639,7 @@
% \begingroup
% \edef\listelements{\listparameter\c!pageboundaries}%
% \normalexpanded{\noexpand\doifinset{#3}{\listelements}}
-% {\showmessage\m!systems{14}{#3}%
+% {\showmessage\m!system{14}{#3}%
% \page}%
% \endgroup
\dontcomplain
diff --git a/tex/context/base/strc-mar.lua b/tex/context/base/strc-mar.lua
index d990b4fff..c14d93a43 100644
--- a/tex/context/base/strc-mar.lua
+++ b/tex/context/base/strc-mar.lua
@@ -22,13 +22,13 @@ local traversenodes = node.traverse
local texsetattribute = tex.setattribute
local texbox = tex.box
-local a_marks = attributes.private('marks')
+local a_marks = attributes.private("structure","marks")
local trace_marks_set = false trackers.register("marks.set", function(v) trace_marks_set = v end)
local trace_marks_get = false trackers.register("marks.get", function(v) trace_marks_get = v end)
local trace_marks_all = false trackers.register("marks.detail", function(v) trace_marks_all = v end)
-local report_marks = logs.new("marks")
+local report_marks = logs.new("structure","marks")
local variables = interfaces.variables
diff --git a/tex/context/base/strc-not.lua b/tex/context/base/strc-not.lua
index 222623a59..ebc25dd5d 100644
--- a/tex/context/base/strc-not.lua
+++ b/tex/context/base/strc-not.lua
@@ -12,7 +12,7 @@ local texcount = tex.count
local trace_notes = false trackers.register("structures.notes", function(v) trace_notes = v end)
-local report_notes = logs.new("notes")
+local report_notes = logs.new("structure","notes")
local structures = structures
local helpers = structures.helpers
diff --git a/tex/context/base/strc-num.lua b/tex/context/base/strc-num.lua
index 1fefd864c..8f4f0e245 100644
--- a/tex/context/base/strc-num.lua
+++ b/tex/context/base/strc-num.lua
@@ -14,7 +14,7 @@ local allocate, mark = utilities.storage.allocate, utilities.storage.mark
local trace_counters = false trackers.register("structures.counters", function(v) trace_counters = v end)
-local report_counters = logs.new("counters")
+local report_counters = logs.new("structure","counters")
local structures = structures
diff --git a/tex/context/base/strc-pag.lua b/tex/context/base/strc-pag.lua
index 3dc70b6a3..19af8cbc4 100644
--- a/tex/context/base/strc-pag.lua
+++ b/tex/context/base/strc-pag.lua
@@ -13,7 +13,7 @@ local allocate, mark = utilities.storage.allocate, utilities.storage.mark
local trace_pages = false trackers.register("structures.pages", function(v) trace_pages = v end)
-local report_pages = logs.new("pages")
+local report_pages = logs.new("structure","pages")
local structures = structures
diff --git a/tex/context/base/strc-ref.lua b/tex/context/base/strc-ref.lua
index ff773e9a0..522442982 100644
--- a/tex/context/base/strc-ref.lua
+++ b/tex/context/base/strc-ref.lua
@@ -16,7 +16,7 @@ local allocate = utilities.storage.allocate
local trace_referencing = false trackers.register("structures.referencing", function(v) trace_referencing = v end)
-local report_references = logs.new("references")
+local report_references = logs.new("structure","references")
local variables = interfaces.variables
local constants = interfaces.constants
diff --git a/tex/context/base/strc-ref.mkiv b/tex/context/base/strc-ref.mkiv
index a9a19515c..b91940523 100644
--- a/tex/context/base/strc-ref.mkiv
+++ b/tex/context/base/strc-ref.mkiv
@@ -258,7 +258,7 @@
%D \stoptabulate
\def\usereferences[#1]% not yet
- {\writestatus\m!systems{references from other files are handled automatically}}
+ {\writestatus\m!system{references from other files are handled automatically}}
%D As mentioned we will also use the cross reference mechanism
%D for navigational purposes. The main reason for this is that
diff --git a/tex/context/base/strc-reg.lua b/tex/context/base/strc-reg.lua
index 7e392ba72..3220b3f61 100644
--- a/tex/context/base/strc-reg.lua
+++ b/tex/context/base/strc-reg.lua
@@ -16,7 +16,7 @@ local allocate, mark = utilities.storage.allocate, utilities.storage.mark
local trace_registers = false trackers.register("structures.registers", function(v) trace_registers = v end)
-local report_registers = logs.new("registers")
+local report_registers = logs.new("structure","registers")
local structures = structures
local registers = structures.registers
diff --git a/tex/context/base/strc-sec.mkiv b/tex/context/base/strc-sec.mkiv
index 94e97ea24..c9a5f870f 100644
--- a/tex/context/base/strc-sec.mkiv
+++ b/tex/context/base/strc-sec.mkiv
@@ -531,7 +531,7 @@
\xdef\currentstructureheadcoupling{\structuresectionheadcoupling\currentstructurehead}%
\xdef\currentstructureheadsection {\structuresectionheadsection \currentstructureheadcoupling}%
\xdef\currentstructureheadlevel {\structuresectionlevel \currentstructureheadsection}%
- %writestatus\m!systems{setup: \currentstructurehead,\currentstructureheadcoupling,\currentstructureheadsection,\currentstructureheadlevel}%
+ %writestatus\m!system{setup: \currentstructurehead,\currentstructureheadcoupling,\currentstructureheadsection,\currentstructureheadlevel}%
%
\setstructureheadreference % does not do much currently
\setstructureheadincrement
diff --git a/tex/context/base/strc-tag.lua b/tex/context/base/strc-tag.lua
index f853cdd85..5563cd834 100644
--- a/tex/context/base/strc-tag.lua
+++ b/tex/context/base/strc-tag.lua
@@ -17,7 +17,7 @@ local settings_to_hash = utilities.parsers.settings_to_hash
local trace_tags = false trackers.register("structures.tags", function(v) trace_tags = v end)
-local report_tags = logs.new("tags")
+local report_tags = logs.new("structure","tags")
local attributes, structures = attributes, structures
diff --git a/tex/context/base/supp-box.lua b/tex/context/base/supp-box.lua
index c40995562..be5bc2864 100644
--- a/tex/context/base/supp-box.lua
+++ b/tex/context/base/supp-box.lua
@@ -8,6 +8,8 @@ if not modules then modules = { } end modules ['supp-box'] = {
-- this is preliminary code
+local report_hyphenation = logs.new("languages","hyphenation")
+
local nodecodes = nodes.nodecodes
local disc_code = nodecodes.disc
@@ -45,7 +47,7 @@ end
commands.hyphenatedlist = hyphenatedlist
function commands.showhyphenatedinlist(list)
- commands.writestatus("show hyphens",nodes.listtoutf(list))
+ report_hyphenation("show: %s",nodes.listtoutf(list))
end
function checkedlist(list)
diff --git a/tex/context/base/supp-fil.lua b/tex/context/base/supp-fil.lua
index acc3bbe66..357de5eca 100644
--- a/tex/context/base/supp-fil.lua
+++ b/tex/context/base/supp-fil.lua
@@ -9,6 +9,7 @@ if not modules then modules = { } end modules ['supp-fil'] = {
-- This module will be redone !
-- context is not defined yet! todo! (we need to load tupp-fil after cld)
+-- todo: move startreadingfile to lua and push regime there
--[[ldx--
<p>It's more convenient to manipulate filenames (paths) in
@@ -23,8 +24,8 @@ local isfile = lfs.isfile
local trace_modules = false trackers.register("modules.loading", function(v) trace_modules = v end)
local trace_files = false trackers.register("resolvers.readfile", function(v) trace_files = v end)
-local report_modules = logs.new("modules")
-local report_files = logs.new("resolvers")
+local report_modules = logs.new("resolvers","modules")
+local report_files = logs.new("resolvers","files")
commands = commands or { }
local commands = commands
@@ -305,17 +306,17 @@ function commands.usemodules(prefix,askedname,truename)
if trace_modules then
report_modules("skipping '%s' (not found)",truename)
else
- interfaces.showmessage("systems",6,askedname)
+ interfaces.showmessage("system",6,askedname)
end
elseif status == 1 then
if not trace_modules then
- interfaces.showmessage("systems",5,askedname)
+ interfaces.showmessage("system",5,askedname)
end
else
if trace_modules then
report_modules("skipping '%s' (already loaded)",truename)
else
- interfaces.showmessage("systems",7,askedname)
+ interfaces.showmessage("system",7,askedname)
end
end
modstatus[hashname] = status
diff --git a/tex/context/base/supp-fil.mkiv b/tex/context/base/supp-fil.mkiv
index 555d1240a..6b9af21ce 100644
--- a/tex/context/base/supp-fil.mkiv
+++ b/tex/context/base/supp-fil.mkiv
@@ -412,10 +412,12 @@
{\global\advance\readingfilelevel\plusone
\the\everystartreadingfile
\pushcatcodetable % saveguard
+ \ctxlua{regimes.push()}% temporarily this way
}% \setcatcodetable\prtcatcodes % no longer in mkiv, has to be done explictly
\unexpanded\def\stopreadingfile
{\popcatcodetable % saveguard
+ \ctxlua{regimes.pop()}% temporarily this way
\the\everystopreadingfile
\global\advance\readingfilelevel\minusone}
diff --git a/tex/context/base/supp-ran.lua b/tex/context/base/supp-ran.lua
index 5263208eb..0be9f66fd 100644
--- a/tex/context/base/supp-ran.lua
+++ b/tex/context/base/supp-ran.lua
@@ -9,7 +9,7 @@ if not modules then modules = { } end modules ['supp-ran'] = {
-- We cannot ask for the current seed, so we need some messy hack
-- here.
-local report_system = logs.new("system")
+local report_system = logs.new("system","randomizer")
commands = commands or { }
local commands = commands
@@ -19,12 +19,15 @@ local random, randomseed, round, seed, last = math.random, math.randomseed, math
local texwrite = tex.write
function math.setrandomseedi(n,comment)
+ if not n then
+--~ n = 0.5 -- hack
+ end
if n <= 1 then
n = n*1073741823 -- maxcount
end
n = round(n)
if false then
- report_system("setting random seed to %s (%s)",n,comment or "normal")
+ report_system("setting seed to %s (%s)",n,comment or "normal")
end
randomseed(n)
last = random(0,1073741823) -- we need an initial value
diff --git a/tex/context/base/syst-aux.mkiv b/tex/context/base/syst-aux.mkiv
index 461c84117..17169acbf 100644
--- a/tex/context/base/syst-aux.mkiv
+++ b/tex/context/base/syst-aux.mkiv
@@ -2091,7 +2091,7 @@
\setnewconstant\expectedarguments \zerocount
\def\showargumenterror#1#2%
- {\writestatus{systems}{\number#1 argument(s) expected in line #2}}
+ {\writestatus{system}{\number#1 argument(s) expected in line #2}}
\def\doshowargumenterror
{\ifnum\expectedarguments>\noexpectedarguments
@@ -4534,7 +4534,7 @@
%D \CONTEXT only defines lowcased macros.
\def\showdefinederror#1#2%
- {\writestatus\m!systems{#1 #2 replaces a macro, use CAPITALS!}}
+ {\writestatus\m!system{#1 #2 replaces a macro, use CAPITALS!}}
\def\checkdefined#1#2#3%
{\doifdefined{#3}{\showdefinederror{#2}{#3}}}
@@ -6945,10 +6945,10 @@
\def\retestfeature % timer support is new per 10/5/2005
{\bgroup
\ifcase\interactionmode\let\wait\relax\fi
- \writestatus\m!systems{starting feature test}\wait
+ \writestatus\m!system{starting feature test}\wait
\resettimer
\featuretest\zerocount \dotestfeature
- \writestatus\m!systems{feature test done (\elapsedseconds s)}%
+ \writestatus\m!system{feature test done (\elapsedseconds s)}%
\wait
\egroup}
diff --git a/tex/context/base/syst-ini.mkiv b/tex/context/base/syst-ini.mkiv
index 293ce4258..63cf65f35 100644
--- a/tex/context/base/syst-ini.mkiv
+++ b/tex/context/base/syst-ini.mkiv
@@ -257,7 +257,9 @@
%D evolved from code that dealt with older engines but as all engines
%D now provide many registers we removed all traces.
-\def\writestatus#1#2{\immediate\write16{#1: #2}} \def\space { }
+\ifdefined\writestatus \else
+ \def\writestatus#1#2{\immediate\write16{#1: #2}}
+\fi
\def\allocateregisteryes#1#2#3#4#5% last class method max name
{\ifnum#1<#4\relax
diff --git a/tex/context/base/syst-lua.lua b/tex/context/base/syst-lua.lua
index da9269ac3..fefe415cf 100644
--- a/tex/context/base/syst-lua.lua
+++ b/tex/context/base/syst-lua.lua
@@ -14,8 +14,9 @@ local ctxcatcodes = tex.ctxcatcodes
commands = commands or { } -- cs = commands -- shorter, maybe some day, not used now
-function commands.writereport(...) logs.report(...) end -- not that efficient
-function commands.writestatus(...) logs.status(...) end
+function commands.writestatus(...) logs.status(...) end -- overloaded later
+
+-- todo: use shorter names i.e. less tokenization
local function testcase(b)
if b then -- looks faster with if than with expression
diff --git a/tex/context/base/syst-mes.mkiv b/tex/context/base/syst-mes.mkiv
index af792aba9..070c7af72 100644
--- a/tex/context/base/syst-mes.mkiv
+++ b/tex/context/base/syst-mes.mkiv
@@ -11,9 +11,6 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-\setnewconstant\statuswidth 15
-\setnewconstant\statuswrite 16
-
\newtoks\everywritestring
\def\writedirect {\immediate\write\statuswrite}
@@ -22,17 +19,4 @@
\let\writebanner \writestring
\let\message \normalmessage
-\ifx\normalwritestatus\undefined \def\normalwritestatus#1#2{\writedirect{#1 : #2}} \fi
-
-% no xml logging in format generation
-
-\everyjob {% we can redefine at the lua end !
- \doif {\ctxlua{tex.sprint(logs.getmethod())}} {xml} {%
- \long\def\writebanner #1{\writestring {<m t='banner'>#1</m>}}%
- \long\def\writestatus#1#2{\writestring {<m t='#1'>#2</m>}}%
- \long\def\message #1{\normalmessage{<m t='message'>#1</m>}}%
- \let\normalwritestatus\writestatus
- }%
-}
-
\endinput
diff --git a/tex/context/base/tabl-ntb.mkiv b/tex/context/base/tabl-ntb.mkiv
index e3e88d83f..11acaff9e 100644
--- a/tex/context/base/tabl-ntb.mkiv
+++ b/tex/context/base/tabl-ntb.mkiv
@@ -851,7 +851,7 @@
\def\eTBL{\tbltoks\@EA\@EA\@EA{\@EA\the\@EA\tbltoks\@EA\begintblrow\the\tblrowtoks\endtblrow}}%
\def\prelocateTBLerror
- {\writestatus\m!systems{fatal error: use \string\prelocateTBLrows\space to increase table memory (now: \number\prelocatedTBLrows)}}
+ {\writestatus\m!system{fatal error: use \string\prelocateTBLrows\space to increase table memory (now: \number\prelocatedTBLrows)}}
\def\prelocateTBLrows#1% we start at zero so we have one to much, better play safe anyway
{\dostepwiserecurse\prelocatedTBLrows{#1}\plusone{\expandafter\newtoks\csname tbl:\recurselevel\endcsname}%
diff --git a/tex/context/base/trac-deb.lua b/tex/context/base/trac-deb.lua
index 87355c61a..fdcc5513e 100644
--- a/tex/context/base/trac-deb.lua
+++ b/tex/context/base/trac-deb.lua
@@ -14,7 +14,7 @@ local texdimen, textoks, texcount = tex.dimen, tex.toks, tex.count
-- maybe tracers -> tracers.tex (and tracers.lua for current debugger)
-local report_system = logs.new("system")
+local report_system = logs.new("system","tex")
tracers = tracers or { }
local tracers = tracers
diff --git a/tex/context/base/trac-deb.mkiv b/tex/context/base/trac-deb.mkiv
index e88a8a3f2..2eb44247a 100644
--- a/tex/context/base/trac-deb.mkiv
+++ b/tex/context/base/trac-deb.mkiv
@@ -33,3 +33,5 @@
\def\showdebuginfo{\ctxlua{lmx.showdebuginfo()}}
\def\overloaderror{\ctxlua{lmx.overloaderror()}} % \enabledirectives[system.showerror]
+
+\def\showlogcategories {\ctxlua{logs.show()}}
diff --git a/tex/context/base/trac-inf.lua b/tex/context/base/trac-inf.lua
index aa224cf38..79007953a 100644
--- a/tex/context/base/trac-inf.lua
+++ b/tex/context/base/trac-inf.lua
@@ -137,19 +137,21 @@ function statistics.show(reporter)
end
end
-
-local template, nn = nil, 0 -- we only calcute it once
+local template, report_statistics, nn = nil, nil, 0 -- we only calcute it once
function statistics.showjobstat(tag,data,n)
- if type(data) == "table" then
+ if not logs then
+ -- sorry
+ elseif type(data) == "table" then
for i=1,#data do
statistics.showjobstat(tag,data[i],n)
end
else
if not template or n > nn then
- template, n = format("%%-%ss: %%-%ss - %%s",15,n), nn
+ template, n = format("%%-%ss - %%s",n), nn
+ report_statistics = logs.new("mkiv lua stats")
end
- write_nl(format(template,"mkiv lua stats",tag,data))
+ report_statistics(format(template,tag,data))
end
end
@@ -170,7 +172,7 @@ function statistics.runtime()
end
function statistics.timed(action,report)
- report = report or logs.simple
+ report = report or logs.new("system")
starttiming("run")
action()
stoptiming("run")
diff --git a/tex/context/base/trac-log.lua b/tex/context/base/trac-log.lua
index 6160e1b0f..41bd40eaf 100644
--- a/tex/context/base/trac-log.lua
+++ b/tex/context/base/trac-log.lua
@@ -6,22 +6,21 @@ if not modules then modules = { } end modules ['trac-log'] = {
license = "see context related readme files"
}
--- xml logging is only usefull in normal runs, not in ini mode
--- it looks like some tex logging (like filenames) is broken (no longer
--- interceoted at the tex end so the xml variant is not that useable now)
+-- todo: less categories, more subcategories (e.g. nodes)
--~ io.stdout:setvbuf("no")
--~ io.stderr:setvbuf("no")
local write_nl, write = texio and texio.write_nl or print, texio and texio.write or io.write
-local format, gmatch = string.format, string.gmatch
+local format, gmatch, find = string.format, string.gmatch, string.find
+local concat = table.concat
+local escapedpattern = string.escapedpattern
local texcount = tex and tex.count
+local next, type = next, type
--[[ldx--
-<p>This is a prelude to a more extensive logging module. For the sake
-of parsing log files, in addition to the standard logging we will
-provide an <l n='xml'/> structured file. Actually, any logging that
-is hooked into callbacks will be \XML\ by default.</p>
+<p>This is a prelude to a more extensive logging module. We no longer
+provide <l n='xml'/> based logging a sparsing is relatively easy anyway.</p>
--ldx]]--
logs = logs or { }
@@ -39,109 +38,239 @@ webpage : http://www.pragma-ade.nl / http://tex.aanhet.net
wiki : http://contextgarden.net
]]
-local functions = {
- 'report', 'status', 'start', 'stop', 'push', 'pop', 'line', 'direct',
- 'start_run', 'stop_run',
- 'start_page_number', 'stop_page_number',
- 'report_output_pages', 'report_output_log',
- 'report_tex_stat', 'report_job_stat',
- 'show_open', 'show_close', 'show_load',
- 'dummy',
-}
+-- local functions = {
+-- 'report', 'status', 'start', 'stop', 'line', 'direct',
+-- 'start_run', 'stop_run',
+-- 'start_page_number', 'stop_page_number',
+-- 'report_output_pages', 'report_output_log',
+-- 'report_tex_stat', 'report_job_stat',
+-- 'show_open', 'show_close', 'show_load',
+-- 'dummy',
+-- }
-local method = "nop"
+-- basic loggers
-function logs.setmethod(newmethod)
- method = newmethod
- -- a direct copy might be faster but let's try this for a while
- setmetatable(logs, { __index = logs[method] })
-end
+local function ignore() end
-function logs.getmethod()
- return method
-end
+setmetatable(logs, { __index = function(t,k) t[k] = ignore ; return ignore end })
--- installer
+-- local separator = (tex and (tex.jobname or tex.formatname)) and ">" or "|"
-local data = { }
+local report, subreport
-function logs.new(category)
- local logger = data[category]
- if not logger then
- logger = function(...)
- logs.report(category,...)
+if tex and tex.jobname or tex.formatname then
+
+ report = function(a,b,c,...)
+ if c then
+ write_nl(format("%-15s > %s\n",a,format(b,c,...)))
+ elseif b then
+ write_nl(format("%-15s > %s\n",a,b))
+ elseif a then
+ write_nl(format("%-15s >\n", a))
+ else
+ write_nl("\n")
end
- data[category] = logger
end
- return logger
-end
---~ local report = logs.new("fonts")
-
--- nop logging (maybe use __call instead)
+ subreport = function(a,sub,b,c,...)
+ if c then
+ write_nl(format("%-15s > %s > %s\n",a,sub,format(b,c,...)))
+ elseif b then
+ write_nl(format("%-15s > %s > %s\n",a,sub,b))
+ elseif a then
+ write_nl(format("%-15s > %s >\n", a,sub))
+ else
+ write_nl("\n")
+ end
+ end
-local noplog = { } logs.nop = noplog setmetatable(logs, { __index = noplog })
+else
-for i=1,#functions do
- noplog[functions[i]] = function() end
-end
+ report = function(a,b,c,...)
+ if c then
+ write_nl(format("%-15s | %s",a,format(b,c,...)))
+ elseif b then
+ write_nl(format("%-15s | %s",a,b))
+ elseif a then
+ write_nl(format("%-15s |", a))
+ else
+ write_nl("")
+ end
+ end
--- tex logging
+ subreport = function(a,sub,b,c,...)
+ if c then
+ write_nl(format("%-15s | %s | %s",a,sub,format(b,c,...)))
+ elseif b then
+ write_nl(format("%-15s | %s | %s",a,sub,b))
+ elseif a then
+ write_nl(format("%-15s | %s |", a,sub))
+ else
+ write_nl("")
+ end
+ end
-local texlog = { } logs.tex = texlog setmetatable(texlog, { __index = noplog })
+end
-function texlog.report(a,b,c,...)
---~ print(a,b,c,...)
+function logs.status(a,b,c,...) -- at the tex end
if c then
- write_nl(format("%-16s> %s\n",a,format(b,c,...)))
+ write_nl(format("%-15s : %s\n",a,format(b,c,...)))
elseif b then
- write_nl(format("%-16s> %s\n",a,b))
+ write_nl(format("%-15s : %s\n",a,b)) -- b can have %'s
+ elseif a then
+ write_nl(format("%-15s :\n", a))
else
- write_nl(format("%-16s>\n",a))
+ write_nl("\n")
end
end
-function texlog.status(a,b,c,...)
- if c then
- write_nl(format("%-16s: %s\n",a,format(b,c,...)))
- elseif b then
- write_nl(format("%-16s: %s\n",a,b)) -- b can have %'s
- else
- write_nl(format("%-16s:>\n",a))
+logs.report = report
+logs.subreport = subreport
+
+-- installer
+
+-- todo: renew (un) locks when a new one is added and wildcard
+
+local data, states = { }, nil
+
+function logs.reporter(category,subcategory)
+ local logger = data[category]
+ if not logger then
+ local state = false
+ if states == true then
+ state = true
+ elseif type(states) == "table" then
+ for c, _ in next, states do
+ if find(category,c) then
+ state = true
+ break
+ end
+ end
+ end
+ logger = {
+ reporters = { },
+ state = state,
+ }
+ data[category] = logger
+ end
+ local reporter = logger.reporters[subcategory or "default"]
+ if not reporter then
+ if subcategory then
+ reporter = function(...)
+ if not logger.state then
+ subreport(category,subcategory,...)
+ end
+ end
+ logger.reporters[subcategory] = reporter
+ else
+ local tag = category
+ reporter = function(...)
+ if not logger.state then
+ report(category,...)
+ end
+ end
+ logger.reporters.default = reporter
+ end
end
+ return reporter
end
-function texlog.line(fmt,...) -- new
- if fmt then
- write_nl(format(fmt,...))
+logs.new = logs.reporter
+
+local function doset(category,value)
+ if category == true then
+ -- lock all
+ category, value = "*", true
+ elseif category == false then
+ -- unlock all
+ category, value = "*", false
+ elseif value == nil then
+ -- lock selective
+ value = true
+ end
+ if category == "*" then
+ states = value
+ for k, v in next, data do
+ v.state = value
+ end
else
- write_nl("")
+ states = utilities.parsers.settings_to_hash(category)
+ for c, _ in next, states do
+ if data[c] then
+ v.state = value
+ else
+ c = escapedpattern(c,true)
+ for k, v in next, data do
+ if find(k,c) then
+ v.state = value
+ end
+ end
+ end
+ end
end
end
---~ local hasscheme = url.hasscheme
+function logs.disable(category,value)
+ doset(category,value == nil and true or value)
+end
---~ function texlog.show_open(name)
---~ if hasscheme(name) ~= "virtual" then
---~ write(format("(",name)) -- tex adds a space
---~ end
---~ end
+function logs.enable(category)
+ doset(category,false)
+end
---~ function texlog.show_close(name)
---~ if hasscheme(name) ~= "virtual" then
---~ write(")") -- tex adds a space
---~ end
---~ end
+function logs.categories()
+ return table.sortedkeys(data)
+end
+
+function logs.show()
+ local n, c, s, max = 0, 0, 0, 0
+ for category, v in table.sortedpairs(data) do
+ n = n + 1
+ local state = v.state
+ local reporters = v.reporters
+ local nc = #category
+ if nc > c then
+ c = nc
+ end
+ for subcategory, _ in next, reporters do
+ local ns = #subcategory
+ if ns > c then
+ s = ns
+ end
+ local m = nc + ns
+ if m > max then
+ max = m
+ end
+ end
+ local subcategories = concat(table.sortedkeys(reporters),", ")
+ if state == true then
+ state = "disabled"
+ elseif state == false then
+ state = "enabled"
+ else
+ state = "unknown"
+ end
+ -- no new here
+ report("logging","category: '%s', subcategories: '%s', state: '%s'",category,subcategories,state)
+ end
+ report("logging","categories: %s, max category: %s, max subcategory: %s, max combined: %s",n,c,s,max)
+end
+
+directives.register("logs.blocked", function(v)
+ doset(v,true)
+end)
+
+-- tex specific loggers (might move elsewhere)
+
+local report_pages = logs.reporter("pages") -- not needed but saves checking when we grep for it
local real, user, sub
-function texlog.start_page_number()
+function logs.start_page_number()
real, user, sub = texcount.realpageno, texcount.userpageno, texcount.subpageno
end
-local report_pages = logs.new("pages") -- not needed but saves checking when we grep for it
-
-function texlog.stop_page_number()
+function logs.stop_page_number()
if real > 0 then
if user > 0 then
if sub > 0 then
@@ -158,176 +287,98 @@ function texlog.stop_page_number()
io.flush()
end
-texlog.report_job_stat = statistics and statistics.showjobstat
+logs.report_job_stat = statistics and statistics.showjobstat
--- xml logging
+local report_files = logs.reporter("files")
-local xmllog = { } logs.xml = xmllog setmetatable(xmllog, { __index = noplog })
+local nesting = 0
+local verbose = false
-function xmllog.report(category,fmt,s,...) -- new
- if s then
- write_nl(format("<r category='%s'>%s</r>",category,format(fmt,s,...)))
- elseif fmt then
- write_nl(format("<r category='%s'>%s</r>",category,fmt))
- else
- write_nl(format("<r category='%s'/>",category))
+function logs.show_open(name)
+ if verbose then
+ nesting = nesting + 1
+ report_files("level %s, opening %s",nesting,name)
end
end
-function xmllog.status(category,fmt,s,...)
- if s then
- write_nl(format("<s category='%s'>%s</r>",category,format(fmt,s,...)))
- elseif fmt then
- write_nl(format("<s category='%s'>%s</r>",category,fmt))
- else
- write_nl(format("<s category='%s'/>",category))
+function logs.show_close(name)
+ if verbose then
+ report_files("level %s, closing %s",nesting,name)
+ nesting = nesting - 1
end
end
-function xmllog.line(fmt,...) -- new
- if fmt then
- write_nl(format("<r>%s</r>",format(fmt,...)))
- else
- write_nl("<r/>")
+function logs.show_load(name)
+ if verbose then
+ report_files("level %s, loading %s",nesting+1,name)
end
end
-function xmllog.start() write_nl("<%s>" ) end
-function xmllog.stop () write_nl("</%s>") end
-function xmllog.push () write_nl("<!-- ") end
-function xmllog.pop () write_nl(" -->" ) end
-
-function xmllog.start_run()
- write_nl("<?xml version='1.0' standalone='yes'?>")
- write_nl("<job>") -- xmlns='www.pragma-ade.com/luatex/schemas/context-job.rng'
- write_nl("")
-end
-
-function xmllog.stop_run()
- write_nl("</job>")
-end
-
-function xmllog.start_page_number()
- write_nl(format("<p real='%s' page='%s' sub='%s'", texcount.realpageno, texcount.userpageno, texcount.subpageno))
-end
+-- there may be scripts out there using this:
-function xmllog.stop_page_number()
- write("/>")
- write_nl("")
-end
+local simple = logs.reporter("comment")
-function xmllog.report_output_pages(p,b)
- write_nl(format("<v k='pages' v='%s'/>", p))
- write_nl(format("<v k='bytes' v='%s'/>", b))
- write_nl("")
-end
+logs.simple = simple
+logs.simpleline = simple
-function xmllog.report_output_log()
- -- nothing
-end
-
-function xmllog.report_tex_stat(k,v)
- write_nl("log","<v k='"..k.."'>"..tostring(v).."</v>")
-end
-
-local nesting = 0
-
-function xmllog.show_open(name)
- nesting = nesting + 1
- write_nl(format("<f l='%s' n='%s'>",nesting,name))
-end
-
-function xmllog.show_close(name)
- write("</f> ")
- nesting = nesting - 1
-end
-
-function xmllog.show_load(name)
- write_nl(format("<f l='%s' n='%s'/>",nesting+1,name))
-end
-
--- initialization
-
-if tex and (tex.jobname or tex.formatname) then
- -- todo: this can be set in mtxrun ... or maybe we should just forget about this alternative format
- if (os.getenv("mtx.directives.logmethod") or os.getenv("mtx_directives_logmethod")) == "xml" then
- logs.setmethod('xml')
- else
- logs.setmethod('tex')
- end
-else
- logs.setmethod('nop')
-end
+-- obsolete
--- logging in runners -> these are actually the nop loggers
+function logs.setprogram () end -- obsolete
+function logs.extendbanner() end -- obsolete
+function logs.reportlines () end -- obsolete
+function logs.reportbanner() end -- obsolete
+function logs.reportline () end -- obsolete
+function logs.simplelines () end -- obsolete
+function logs.help () end -- obsolete
-local name, banner = 'report', 'context'
+-- applications
-function noplog.report(category,fmt,...) -- todo: fmt,s
- if fmt then
- write_nl(format("%s | %s: %s",name,category,format(fmt,...)))
- elseif category then
- write_nl(format("%s | %s",name,category))
- else
- write_nl(format("%s |",name))
+local function reportlines(t,str)
+ if str then
+ for line in gmatch(str,"(.-)[\n\r]") do
+ t.report(line)
+ end
end
end
-noplog.status = noplog.report -- just to be sure, never used
-
-function noplog.simple(fmt,...) -- todo: fmt,s
- if fmt then
- write_nl(format("%s | %s",name,format(fmt,...)))
- else
- write_nl(format("%s |",name))
+local function reportbanner(t)
+ local banner = t.banner
+ if banner then
+ t.report(banner)
+ t.report()
end
end
-if utilities then
- utilities.report = function(...) logs.simple(...) end
-end
-
-function logs.setprogram(newname,newbanner)
- name, banner = newname, newbanner
-end
-
-function logs.extendbanner(newbanner)
- banner = banner .. " | ".. newbanner
-end
-
-function logs.reportlines(str) -- todo: <lines></lines>
- for line in gmatch(str,"(.-)[\n\r]") do
- logs.report(line)
+local function reporthelp(t,...)
+ local helpinfo = t.helpinfo
+ if type(helpinfo) == "string" then
+ reportlines(t,helpinfo)
+ elseif type(helpinfo) == "table" then
+ local tags = { ... }
+ for i=1,#tags do
+ reportlines(t,t.helpinfo[tags[i]])
+ if i < #tags then
+ t.report()
+ end
+ end
end
end
-function logs.reportline() -- for scripts too
- logs.report()
+local function reportinfo(t)
+ t.report()
+ reportlines(t,moreinfo)
end
-function logs.simpleline()
- logs.report()
+function logs.application(t)
+ t.name = t.name or "unknown"
+ t.banner = t.banner
+ t.report = logs.reporter(t.name)
+ t.help = function(...) reportbanner(t) ; reporthelp(t,...) ; reportinfo(t) end
+ t.identify = function() reportbanner(t) end
+ return t
end
-function logs.simplelines(str) -- todo: <lines></lines>
- for line in gmatch(str,"(.-)[\n\r]") do
- logs.simple(line)
- end
-end
-
-function logs.reportbanner() -- for scripts too
- logs.report(banner)
-end
-
-function logs.help(message,option)
- logs.reportbanner()
- logs.reportline()
- logs.reportlines(message)
- if option ~= "nomoreinfo" then
- logs.reportline()
- logs.reportlines(moreinfo)
- end
-end
+-- somewhat special
-- logging to a file
@@ -340,7 +391,7 @@ end
function logs.system(whereto,process,jobname,category,...)
local message = format("%s %s => %s => %s => %s\r",os.date("%d/%m/%y %H:%m:%S"),process,jobname,category,format(...))
for i=1,10 do
- local f = io.open(whereto,"a")
+ local f = io.open(whereto,"a") -- we can consider keepint the file open
if f then
f:write(message)
f:close()
@@ -351,52 +402,24 @@ function logs.system(whereto,process,jobname,category,...)
end
end
--- bonus
-
-function logs.fatal(where,...)
- logs.report(where,"fatal error: %s, aborting now",format(...))
- os.exit()
-end
-
---~ the traditional tex page number logging
---~
---~ function logs.tex.start_page_number()
---~ local real, user, sub = texcount.realpageno, texcount.userpageno, texcount.subpageno
---~ if real > 0 then
---~ if user > 0 then
---~ if sub > 0 then
---~ write(format("[%s.%s.%s",real,user,sub))
---~ else
---~ write(format("[%s.%s",real,user))
---~ end
---~ else
---~ write(format("[%s",real))
---~ end
---~ else
---~ write("[-")
---~ end
---~ end
---~
---~ function logs.tex.stop_page_number()
---~ write("]")
---~ end
+local report_system = logs.reporter("system","logs")
function logs.obsolete(old,new)
local o = loadstring("return " .. new)()
if type(o) == "function" then
return function(...)
- logs.report("system","function %s is obsolete, use %s",old,new)
+ report_system("function %s is obsolete, use %s",old,new)
loadstring(old .. "=" .. new .. " return ".. old)()(...)
end
elseif type(o) == "table" then
local t, m = { }, { }
m.__index = function(t,k)
- logs.report("system","table %s is obsolete, use %s",old,new)
+ report_system("table %s is obsolete, use %s",old,new)
m.__index, m.__newindex = o, o
return o[k]
end
m.__newindex = function(t,k,v)
- logs.report("system","table %s is obsolete, use %s",old,new)
+ report_system("table %s is obsolete, use %s",old,new)
m.__index, m.__newindex = o, o
o[k] = v
end
@@ -408,6 +431,10 @@ function logs.obsolete(old,new)
end
end
+if utilities then
+ utilities.report = report_system
+end
+
if tex and tex.error then
function logs.texerrormessage(...) -- for the moment we put this function here
tex.error(format(...), { })
diff --git a/tex/context/base/trac-pro.lua b/tex/context/base/trac-pro.lua
index b06d63cfe..596d40897 100644
--- a/tex/context/base/trac-pro.lua
+++ b/tex/context/base/trac-pro.lua
@@ -17,7 +17,7 @@ local getmetatable, setmetatable, rawset, type = getmetatable, setmetatable, raw
local trace_namespaces = false trackers.register("system.namespaces", function(v) trace_namespaces = v end)
-local report_system = logs.new("system")
+local report_system = logs.new("system","protection")
namespaces = namespaces or { }
local namespaces = namespaces
diff --git a/tex/context/base/trac-set.lua b/tex/context/base/trac-set.lua
index df0c4fe5c..3cf14acb2 100644
--- a/tex/context/base/trac-set.lua
+++ b/tex/context/base/trac-set.lua
@@ -26,14 +26,10 @@ local data = { } -- maybe just local
local trace_initialize = false -- only for testing during development
-local function report(a,b,...)
- texio.write_nl(format("%-16s> %s",a,format(b,...)))
-end
-
function setters.initialize(filename,name,values) -- filename only for diagnostics
- local data = data[name]
- if data then
- data = data.data
+ local setter = data[name]
+ if setter then
+ local data = data.data
if data then
for key, value in next, values do
-- key = gsub(key,"_",".")
@@ -42,7 +38,7 @@ function setters.initialize(filename,name,values) -- filename only for diagnosti
if functions then
if #functions > 0 and not functions.value then
if trace_initialize then
- report(name,"executing %s (%s -> %s)",key,filename,tostring(value))
+ setter.report("executing %s (%s -> %s)",key,filename,tostring(value))
end
for i=1,#functions do
functions[i](value)
@@ -50,7 +46,7 @@ function setters.initialize(filename,name,values) -- filename only for diagnosti
functions.value = value
else
if trace_initialize then
- report(name,"skipping %s (%s -> %s)",key,filename,tostring(value))
+ setter.report("skipping %s (%s -> %s)",key,filename,tostring(value))
end
end
else
@@ -59,7 +55,7 @@ function setters.initialize(filename,name,values) -- filename only for diagnosti
functions = { default = value }
data[key] = functions
if trace_initialize then
- report(name,"storing %s (%s -> %s)",key,filename,tostring(value))
+ setter.report("storing %s (%s -> %s)",key,filename,tostring(value))
end
end
end
@@ -86,10 +82,11 @@ local function set(t,what,newvalue)
else
value = is_boolean(value,value)
end
+ w = escapedpattern(w,true)
for name, functions in next, data do
if done[name] then
-- prevent recursion due to wildcards
- elseif find(name,escapedpattern(w,true)) then
+ elseif find(name,w) then
done[name] = true
for i=1,#functions do
functions[i](value)
@@ -131,7 +128,7 @@ function setters.register(t,what,...)
functions = { }
data[what] = functions
if trace_initialize then
- report(t.name,"defining %s",what)
+ t.report("defining %s",what)
end
end
local default = functions.default -- can be set from cnf file
@@ -139,7 +136,7 @@ function setters.register(t,what,...)
local typ = type(fnc)
if typ == "string" then
if trace_initialize then
- report(t.name,"coupling %s to %s",what,fnc)
+ t.report("coupling %s to %s",what,fnc)
end
local s = fnc -- else wrong reference
fnc = function(value) set(t,s,value) end
@@ -193,9 +190,9 @@ function setters.list(t) -- pattern
end
function setters.show(t)
- commands.writestatus("","")
- local list = setters.list(t)
local category = t.name
+ local list = setters.list(t)
+ t.report()
for k=1,#list do
local name = list[k]
local functions = t.data[name]
@@ -203,10 +200,10 @@ function setters.show(t)
local value, default, modules = functions.value, functions.default, #functions
value = value == nil and "unset" or tostring(value)
default = default == nil and "unset" or tostring(default)
- commands.writestatus(category,format("%-30s modules: %2i default: %5s value: %5s",name,modules,default,value))
+ t.report("%-30s modules: %2i default: %6s value: %6s",name,modules,default,value)
end
end
- commands.writestatus("","")
+ t.report()
end
-- we could have used a bit of oo and the trackers:enable syntax but
@@ -216,57 +213,62 @@ end
local enable, disable, register, list, show = setters.enable, setters.disable, setters.register, setters.list, setters.show
+local function report(setter,...)
+ local report = logs and logs.report
+ if report then
+ report(setter.name,...)
+ else -- fallback, as this module is loaded before the logger
+ write_nl(format("%-16s: %s\n",setter.name,format(...)))
+ end
+end
+
function setters.new(name)
- local t -- we need to access it in t
- t = {
+ local setter -- we need to access it in setter itself
+ setter = {
data = allocate(), -- indexed, but also default and value fields
name = name,
- enable = function(...) enable (t,...) end,
- disable = function(...) disable (t,...) end,
- register = function(...) register(t,...) end,
- list = function(...) list (t,...) end,
- show = function(...) show (t,...) end,
+ report = function(...) report (setter,...) end,
+ enable = function(...) enable (setter,...) end,
+ disable = function(...) disable (setter,...) end,
+ register = function(...) register(setter,...) end,
+ list = function(...) list (setter,...) end,
+ show = function(...) show (setter,...) end,
}
- data[name] = t
- return t
+ data[name] = setter
+ return setter
end
trackers = setters.new("trackers")
directives = setters.new("directives")
experiments = setters.new("experiments")
-local t_enable, t_disable = trackers .enable, trackers .disable
-local d_enable, d_disable = directives .enable, directives .disable
-local e_enable, e_disable = experiments.enable, experiments.disable
+local t_enable, t_disable, t_report = trackers .enable, trackers .disable, trackers .report
+local d_enable, d_disable, d_report = directives .enable, directives .disable, directives .report
+local e_enable, e_disable, e_report = experiments.enable, experiments.disable, experiments.report
-- nice trick: we overload two of the directives related functions with variants that
-- do tracing (itself using a tracker) .. proof of concept
-local function report(...) -- messy .. chicken or egg
- local p = (commands and commands.writestatus) or (logs and logs.report)
- if p then p(...) end
-end
-
local trace_directives = false local trace_directives = false trackers.register("system.directives", function(v) trace_directives = v end)
local trace_experiments = false local trace_experiments = false trackers.register("system.experiments", function(v) trace_experiments = v end)
function directives.enable(...)
- report("directives","enabling: %s",concat({...}," "))
+ d_report("enabling: %s",concat({...}," "))
d_enable(...)
end
function directives.disable(...)
- report("directives","disabling: %s",concat({...}," "))
+ d_report("disabling: %s",concat({...}," "))
d_disable(...)
end
function experiments.enable(...)
- report("experiments","enabling: %s",concat({...}," "))
+ e_report("enabling: %s",concat({...}," "))
e_enable(...)
end
function experiments.disable(...)
- report("experiments","disabling: %s",concat({...}," "))
+ e_report("disabling: %s",concat({...}," "))
e_disable(...)
end
diff --git a/tex/context/base/trac-tim.lua b/tex/context/base/trac-tim.lua
index 2917a5686..de7ceca46 100644
--- a/tex/context/base/trac-tim.lua
+++ b/tex/context/base/trac-tim.lua
@@ -10,6 +10,7 @@ local format, gsub = string.format, string.gsub
local concat, sort = table.concat, table.sort
local next, tonumber = next, tonumber
+moduledata = moduledata or { }
moduledata.progress = moduledata.progress or { }
local progress = moduledata.progress
diff --git a/tex/context/base/type-ini.mkiv b/tex/context/base/type-ini.mkiv
index 5c716abbe..f4b2b13d9 100644
--- a/tex/context/base/type-ini.mkiv
+++ b/tex/context/base/type-ini.mkiv
@@ -153,15 +153,6 @@
\def\doprocesstypescriptfile
{\ctxcommand{doprocesstypescriptfile("\currenttypefile")}}
-% \def\doprocesstypescriptfile
-% {\startreadingfile
-% \pushendofline
-% \unprotect
-% \readfile{\currenttypefile.\mksuffix}\donothing{\readfile\currenttypefile\donothing\donothing}%
-% \protect
-% \popendofline
-% \stopreadingfile}
-
\def\usetypescriptonce
{\dotripleempty\dousetypescriptonce}
diff --git a/tex/context/base/type-otf.mkiv b/tex/context/base/type-otf.mkiv
index 097141f5d..8d6cb1aad 100644
--- a/tex/context/base/type-otf.mkiv
+++ b/tex/context/base/type-otf.mkiv
@@ -1459,6 +1459,7 @@
\stoptypescript
\starttypescript [math] [asana] [name]
+ \loadfontgoodies[asana-math]
\definefontsynonym [MathRoman] [AsanaMath] [\s!features=\s!math\mathsizesuffix]
\stoptypescript
@@ -1494,12 +1495,15 @@
\stoptypescript
\starttypescript [math] [cambria,cambria-m,cambria-a] [name]
+ \loadfontgoodies[cambria-math]
\definefontsynonym [MathRoman] [CambriaMath] [\s!features=\s!math\mathsizesuffix]
\stoptypescript
\starttypescript [math] [cambria-x] [name]
+ \loadfontgoodies[cambria-math]
\definefontsynonym [MathRoman] [CambriaMath] [\s!features=\s!math]
\stoptypescript
\starttypescript [math] [cambria-y] [name]
+ \loadfontgoodies[cambria-math]
\definefontsynonym [MathRoman] [CambriaMath] [\s!features=\s!math-nostack\mathsizesuffix]
\stoptypescript
diff --git a/tex/context/base/typo-brk.lua b/tex/context/base/typo-brk.lua
index 87645e05a..7111497fc 100644
--- a/tex/context/base/typo-brk.lua
+++ b/tex/context/base/typo-brk.lua
@@ -15,7 +15,7 @@ local format = string.format
local trace_breakpoints = false trackers.register("typesetters.breakpoints", function(v) trace_breakpoints = v end)
-local report_breakpoints = logs.new("breakpoints")
+local report_breakpoints = logs.new("typesetting","breakpoints")
local nodes, node = nodes, node
diff --git a/tex/context/base/typo-cap.lua b/tex/context/base/typo-cap.lua
index eee5208a4..f157ce875 100644
--- a/tex/context/base/typo-cap.lua
+++ b/tex/context/base/typo-cap.lua
@@ -12,7 +12,7 @@ local div = math.div
local trace_casing = false trackers.register("typesetters.casing", function(v) trace_casing = v end)
-local report_casing = logs.new("casing")
+local report_casing = logs.new("typesetting","casing")
local nodes, node = nodes, node
diff --git a/tex/context/base/typo-dig.lua b/tex/context/base/typo-dig.lua
index 840ef54d8..3ef8e162b 100644
--- a/tex/context/base/typo-dig.lua
+++ b/tex/context/base/typo-dig.lua
@@ -15,7 +15,7 @@ local round, div = math.round, math.div
local trace_digits = false trackers.register("typesetters.digits", function(v) trace_digits = v end)
-local report_digits = logs.new("digits")
+local report_digits = logs.new("typesetting","digits")
local nodes, node = nodes, node
diff --git a/tex/context/base/typo-dir.lua b/tex/context/base/typo-dir.lua
index 006c184c6..5a427ef55 100644
--- a/tex/context/base/typo-dir.lua
+++ b/tex/context/base/typo-dir.lua
@@ -14,11 +14,11 @@ local utfchar = utf.char
-- vertical space handler
-local trace_directions = false trackers.register("typesetters.directions", function(v) trace_directions = v end)
+local nodes, node = nodes, node
-local report_directions = logs.new("directions")
+local trace_directions = false trackers.register("typesetters.directions", function(v) trace_directions = v end)
-local nodes, node = nodes, node
+local report_directions = logs.new("typesetting","directions")
local has_attribute = node.has_attribute
local unset_attribute = node.unset_attribute
diff --git a/tex/context/base/typo-rep.lua b/tex/context/base/typo-rep.lua
index 5519207e2..f90ce16ef 100644
--- a/tex/context/base/typo-rep.lua
+++ b/tex/context/base/typo-rep.lua
@@ -13,7 +13,7 @@ if not modules then modules = { } end modules ['typo-rep'] = {
local trace_stripping = false trackers.register("nodes.stripping", function(v) trace_stripping = v end)
trackers.register("fonts.stripping", function(v) trace_stripping = v end)
-local report_fonts = logs.new("fonts")
+local report_stripping = logs.new("fonts","stripping")
local nodes, node = nodes, node
@@ -50,20 +50,20 @@ end
local function process(what,head,current,char)
if what == true then
if trace_stripping then
- report_fonts("deleting 0x%05X from text",char)
+ report_stripping("deleting 0x%05X from text",char)
end
head, current = delete_node(head,current)
elseif type(what) == "function" then
head, current = what(head,current)
current = current.next
if trace_stripping then
- report_fonts("processing 0x%05X in text",char)
+ report_stripping("processing 0x%05X in text",char)
end
elseif what then -- assume node
head, current = replace_node(head,current,copy_node(what))
current = current.next
if trace_stripping then
- report_fonts("replacing 0x%05X in text",char)
+ report_stripping("replacing 0x%05X in text",char)
end
end
return head, current
diff --git a/tex/context/base/typo-spa.lua b/tex/context/base/typo-spa.lua
index e351cc9f7..2b89df515 100644
--- a/tex/context/base/typo-spa.lua
+++ b/tex/context/base/typo-spa.lua
@@ -15,7 +15,7 @@ local utfchar = utf.char
local trace_spacing = false trackers.register("typesetters.spacing", function(v) trace_spacing = v end)
-local report_spacing = logs.new("spacing")
+local report_spacing = logs.new("typesetting","spacing")
local nodes, fonts, node = nodes, fonts, node
diff --git a/tex/context/base/util-lua.lua b/tex/context/base/util-lua.lua
index 6ad325fcf..93ae16f47 100644
--- a/tex/context/base/util-lua.lua
+++ b/tex/context/base/util-lua.lua
@@ -8,7 +8,7 @@ if not modules then modules = { } end modules ['util-lua'] = {
utilities = utilities or {}
utilities.lua = utilities.lua or { }
-utilities.report = utilities.report or print
+utilities.report = logs and logs.new("system") or print
function utilities.lua.compile(luafile,lucfile,cleanup,strip) -- defaults: cleanup=false strip=true
utilities.report("lua: compiling %s into %s",luafile,lucfile)
diff --git a/tex/context/base/util-mrg.lua b/tex/context/base/util-mrg.lua
index 8b09d4ee6..6eba76d99 100644
--- a/tex/context/base/util-mrg.lua
+++ b/tex/context/base/util-mrg.lua
@@ -14,7 +14,7 @@ local type, next = type, next
utilities = utilities or {}
utilities.merger = utilities.merger or { } -- maybe mergers
-utilities.report = utilities.report or print
+utilities.report = logs and logs.new("system") or print
local merger = utilities.merger
diff --git a/tex/context/base/x-asciimath.lua b/tex/context/base/x-asciimath.lua
index 925911a8d..affb24ef9 100644
--- a/tex/context/base/x-asciimath.lua
+++ b/tex/context/base/x-asciimath.lua
@@ -16,7 +16,7 @@ local asciimath = { }
local moduledata = moduledata or { }
moduledata.asciimath = asciimath
-local report_asciimath = logs.new("asciimath")
+local report_asciimath = logs.new("mathematics","asciimath")
local format = string.format
local texsprint, ctxcatcodes = tex.sprint, tex.ctxcatcodes
@@ -170,22 +170,22 @@ local parser
local function converted(original,totex)
local ok, result
if trace_mapping then
- report_asciimath("original : %s",original)
+ report_asciimath("original : %s",original)
end
local premapped = lpegmatch(premapper,original)
if premapped then
if trace_mapping then
- report_asciimath("prepared : %s",premapped)
+ report_asciimath("prepared : %s",premapped)
end
local parsed = lpegmatch(parser,premapped)
if parsed then
if trace_mapping then
- report_asciimath("parsed : %s",parsed)
+ report_asciimath("parsed : %s",parsed)
end
local postmapped = lpegmatch(postmapper,parsed)
if postmapped then
if trace_mapping then
- report_asciimath("finalized : %s",postmapped)
+ report_asciimath("finalized: %s",postmapped)
end
result, ok = postmapped, true
else
diff --git a/tex/context/fonts/asana-math.lfg b/tex/context/fonts/asana-math.lfg
new file mode 100644
index 000000000..160b310f5
--- /dev/null
+++ b/tex/context/fonts/asana-math.lfg
@@ -0,0 +1,25 @@
+-- This patch code is moved from font-pat.lua to this goodies
+-- files as it does not belomg in the core code.
+
+local patches = fonts.otf.enhancers.patches
+
+local function patch(data,filename,threshold)
+ local m = data.metadata.math
+ if m then
+ local d = m.DisplayOperatorMinHeight or 0
+ if d < threshold then
+ patches.report("DisplayOperatorMinHeight(%s -> %s)",d,threshold)
+ m.DisplayOperatorMinHeight = threshold
+ end
+ end
+end
+
+patches.register("after","check math parameters","asana",function(data,filename) patch(data,filename,1350) end)
+
+return {
+ name = "lm-asana",
+ version = "1.00",
+ comment = "Goodies that complement asana.",
+ author = "Hans Hagen",
+ copyright = "ConTeXt development team",
+}
diff --git a/tex/context/fonts/cambria-math.lfg b/tex/context/fonts/cambria-math.lfg
new file mode 100644
index 000000000..26972c9e4
--- /dev/null
+++ b/tex/context/fonts/cambria-math.lfg
@@ -0,0 +1,26 @@
+-- This patch code is moved from font-pat.lua to this goodies
+-- files as it does not belomg in the core code.
+
+local patches = fonts.otf.enhancers.patches
+
+local function patch(data,filename,threshold)
+ local m = data.metadata.math
+ if m then
+ local d = m.DisplayOperatorMinHeight or 0
+ if d < threshold then
+ patches.report("DisplayOperatorMinHeight(%s -> %s)",d,threshold)
+ m.DisplayOperatorMinHeight = threshold
+ end
+ end
+end
+
+patches.register("after","check math parameters","cambria", function(data,filename) patch(data,filename,2800) end)
+patches.register("after","check math parameters","cambmath",function(data,filename) patch(data,filename,2800) end)
+
+return {
+ name = "lm-cambria",
+ version = "1.00",
+ comment = "Goodies that complement cambria.",
+ author = "Hans Hagen",
+ copyright = "ConTeXt development team",
+}
diff --git a/tex/context/fonts/lm-math.lfg b/tex/context/fonts/lm-math.lfg
index 9b2fe0f2d..042f3026e 100644
--- a/tex/context/fonts/lm-math.lfg
+++ b/tex/context/fonts/lm-math.lfg
@@ -1,3 +1,34 @@
+-- This patch code is moved from font-pat.lua to this goodies
+-- files as it does not belomg in the core code.
+
+local patches = fonts.otf.enhancers.patches
+
+local function patch(data,filename)
+ local uni_to_ind = data.map.map
+ if not uni_to_ind[0x391] then
+ -- beware, this is a hack, features for latin often don't apply to greek
+ -- but lm has not much features anyway (and only greek for math)
+ patches.report("adding 13 greek capitals")
+ uni_to_ind[0x391] = uni_to_ind[0x41]
+ uni_to_ind[0x392] = uni_to_ind[0x42]
+ uni_to_ind[0x395] = uni_to_ind[0x45]
+ uni_to_ind[0x397] = uni_to_ind[0x48]
+ uni_to_ind[0x399] = uni_to_ind[0x49]
+ uni_to_ind[0x39A] = uni_to_ind[0x4B]
+ uni_to_ind[0x39C] = uni_to_ind[0x4D]
+ uni_to_ind[0x39D] = uni_to_ind[0x4E]
+ uni_to_ind[0x39F] = uni_to_ind[0x4F]
+ uni_to_ind[0x3A1] = uni_to_ind[0x52]
+ uni_to_ind[0x3A4] = uni_to_ind[0x54]
+ uni_to_ind[0x3A7] = uni_to_ind[0x58]
+ uni_to_ind[0x396] = uni_to_ind[0x5A]
+ end
+end
+
+patches.register("after","prepare glyphs","^lmroman", patch)
+patches.register("after","prepare glyphs","^lmsans", patch)
+patches.register("after","prepare glyphs","^lmtypewriter",patch)
+
-- rm-lmr5 : LMMathRoman5-Regular
-- rm-lmbx5 : LMMathRoman5-Bold ]
-- lmbsy5 : LMMathSymbols5-BoldItalic
diff --git a/tex/generic/context/luatex-fonts-merged.lua b/tex/generic/context/luatex-fonts-merged.lua
index 1391e8fc8..4312d66ab 100644
--- a/tex/generic/context/luatex-fonts-merged.lua
+++ b/tex/generic/context/luatex-fonts-merged.lua
@@ -1,6 +1,6 @@
-- merged file : luatex-fonts-merged.lua
-- parent file : luatex-fonts.lua
--- merge date : 02/05/11 11:37:54
+-- merge date : 02/08/11 10:06:31
do -- begin closure to overcome local limits and interference
@@ -99,11 +99,7 @@ local simple_escapes = {
}
function string.escapedpattern(str,simple)
- if simple then
- return (gsub(str,".",simple_escapes))
- else
- return (gsub(str,".",patterns_escapes))
- end
+ return (gsub(str,".",simple and simple_escapes or patterns_escapes))
end
function string.topattern(str,lowercase,strict)
@@ -556,11 +552,7 @@ local p = Cs((S("-.+*%()[]") / patterns_escapes + anything)^0)
local s = Cs((S("-.+*%()[]") / simple_escapes + anything)^0)
function string.escapedpattern(str,simple)
- if simple then
- return match(s,str)
- else
- return match(p,str)
- end
+ return match(simple and s or p,str)
end
-- utf extensies
@@ -2606,11 +2598,11 @@ containers = containers or { }
local containers = containers
containers.usecache = true
-local report_cache = logs.new("cache")
+local report_containers = logs.new("resolvers","containers")
local function report(container,tag,name)
if trace_cache or trace_containers then
- report_cache("container: %s, tag: %s, name: %s",container.subcategory,tag,name or 'invalid')
+ report_containers("container: %s, tag: %s, name: %s",container.subcategory,tag,name or 'invalid')
end
end
@@ -2879,7 +2871,7 @@ local next = next
local trace_injections = false trackers.register("nodes.injections", function(v) trace_injections = v end)
-local report_injections = logs.new("injections")
+local report_injections = logs.new("nodes","injections")
local attributes, nodes, node = attributes, nodes, node
@@ -3332,7 +3324,7 @@ local write_nl = texio.write_nl
local lower = string.lower
local allocate, mark = utilities.storage.allocate, utilities.storage.mark
-local report_define = logs.new("define fonts")
+local report_defining = logs.new("fonts","defining")
fontloader.totable = fontloader.to_table
@@ -3421,7 +3413,7 @@ function fonts.fontformat(filename,default)
if format then
return format
else
- report_define("unable to determine font format for '%s'",filename)
+ report_defining("unable to determine font format for '%s'",filename)
return default
end
end
@@ -3448,7 +3440,7 @@ local allocate = utilities.storage.allocate
local trace_defining = false trackers.register("fonts.defining", function(v) trace_defining = v end)
local trace_scaling = false trackers.register("fonts.scaling" , function(v) trace_scaling = v end)
-local report_define = logs.new("define fonts")
+local report_defining = logs.new("fonts","defining")
-- tfmdata has also fast access to indices and unicodes
-- to be checked: otf -> tfm -> tfmscaled
@@ -3494,7 +3486,7 @@ function tfm.read_from_tfm(specification)
local fname, tfmdata = specification.filename or "", nil
if fname ~= "" then
if trace_defining then
- report_define("loading tfm file %s at size %s",fname,specification.size)
+ report_defining("loading tfm file %s at size %s",fname,specification.size)
end
tfmdata = font.read_tfm(fname,specification.size) -- not cached, fast enough
if tfmdata then
@@ -3517,7 +3509,7 @@ function tfm.read_from_tfm(specification)
tfm.enhance(tfmdata,specification)
end
elseif trace_defining then
- report_define("loading tfm with name %s fails",specification.name)
+ report_defining("loading tfm with name %s fails",specification.name)
end
return tfmdata
end
@@ -3853,7 +3845,7 @@ function tfm.scale(tfmtable, scaledpoints, relativeid)
end
end
-- if trace_scaling then
- -- report_define("t=%s, u=%s, i=%s, n=%s c=%s",k,chr.tounicode or "",index or 0,description.name or '-',description.class or '-')
+ -- report_defining("t=%s, u=%s, i=%s, n=%s c=%s",k,chr.tounicode or "",index or 0,description.name or '-',description.class or '-')
-- end
if tounicode then
local tu = tounicode[index] -- nb: index!
@@ -3890,7 +3882,7 @@ function tfm.scale(tfmtable, scaledpoints, relativeid)
if vn then
chr.next = vn
--~ if v.vert_variants or v.horiz_variants then
- --~ report_define("glyph 0x%05X has combination of next, vert_variants and horiz_variants",index)
+ --~ report_defining("glyph 0x%05X has combination of next, vert_variants and horiz_variants",index)
--~ end
else
local vv = v.vert_variants
@@ -4062,11 +4054,11 @@ function tfm.scale(tfmtable, scaledpoints, relativeid)
-- can have multiple subfonts
if hasmath then
if trace_defining then
- report_define("math enabled for: name '%s', fullname: '%s', filename: '%s'",t.name or "noname",t.fullname or "nofullname",t.filename or "nofilename")
+ report_defining("math enabled for: name '%s', fullname: '%s', filename: '%s'",t.name or "noname",t.fullname or "nofullname",t.filename or "nofilename")
end
else
if trace_defining then
- report_define("math disabled for: name '%s', fullname: '%s', filename: '%s'",t.name or "noname",t.fullname or "nofullname",t.filename or "nofilename")
+ report_defining("math disabled for: name '%s', fullname: '%s', filename: '%s'",t.name or "noname",t.fullname or "nofullname",t.filename or "nofilename")
end
t.nomath, t.MathConstants = true, nil
end
@@ -4075,8 +4067,8 @@ function tfm.scale(tfmtable, scaledpoints, relativeid)
t.psname = t.fontname or (t.fullname and fonts.names.cleanname(t.fullname))
end
if trace_defining then
- report_define("used for accessing (sub)font: '%s'",t.psname or "nopsname")
- report_define("used for subsetting: '%s'",t.fontname or "nofontname")
+ report_defining("used for accessing (sub)font: '%s'",t.psname or "nopsname")
+ report_defining("used for subsetting: '%s'",t.fontname or "nofontname")
end
-- this will move up (side effect of merging split call)
t.factor = delta
@@ -4179,18 +4171,18 @@ function tfm.checkedfilename(metadata,whatever)
askedfilename = resolvers.resolve(askedfilename) -- no shortcut
foundfilename = resolvers.findbinfile(askedfilename,"") or ""
if foundfilename == "" then
- report_define("source file '%s' is not found",askedfilename)
+ report_defining("source file '%s' is not found",askedfilename)
foundfilename = resolvers.findbinfile(file.basename(askedfilename),"") or ""
if foundfilename ~= "" then
- report_define("using source file '%s' (cache mismatch)",foundfilename)
+ report_defining("using source file '%s' (cache mismatch)",foundfilename)
end
end
elseif whatever then
- report_define("no source file for '%s'",whatever)
+ report_defining("no source file for '%s'",whatever)
foundfilename = ""
end
metadata.foundfilename = foundfilename
- -- report_define("using source file '%s'",foundfilename)
+ -- report_defining("using source file '%s'",foundfilename)
end
return foundfilename
end
@@ -4219,7 +4211,7 @@ local lpegmatch = lpeg.match
local trace_loading = false trackers.register("otf.loading", function(v) trace_loading = v end)
-local report_otf = logs.new("load otf")
+local report_otf = logs.new("fonts","otf loading")
local fonts = fonts
@@ -5341,7 +5333,7 @@ local utfbyte = utf.byte
local trace_loading = false trackers.register("otf.loading", function(v) trace_loading = v end)
local trace_unimapping = false trackers.register("otf.unimapping", function(v) trace_unimapping = v end)
-local report_otf = logs.new("load otf")
+local report_otf = logs.new("fonts","otf loading")
--[[ldx--
<p>Eventually this code will disappear because map files are kind
@@ -5638,7 +5630,7 @@ local trace_sequences = false trackers.register("otf.sequences", function(v)
local trace_math = false trackers.register("otf.math", function(v) trace_math = v end)
local trace_defining = false trackers.register("fonts.defining", function(v) trace_defining = v end)
-local report_otf = logs.new("load otf")
+local report_otf = logs.new("fonts","otf loading")
local starttiming, stoptiming, elapsedtime = statistics.starttiming, statistics.stoptiming, statistics.elapsedtime
@@ -5658,6 +5650,7 @@ otf.features.default = otf.features.default or { }
otf.enhancers = allocate()
local enhancers = otf.enhancers
enhancers.patches = { }
+local patches = enhancers.patches
local definers = fonts.definers
@@ -5870,11 +5863,11 @@ local ordered_enhancers = {
local actions = { }
-enhancers.patches.before = allocate()
-enhancers.patches.after = allocate()
+patches.before = allocate()
+patches.after = allocate()
-local before = enhancers.patches.before
-local after = enhancers.patches.after
+local before = patches.before
+local after = patches.after
local function enhance(name,data,filename,raw,verbose)
local enhancer = actions[name]
@@ -5918,9 +5911,9 @@ function enhancers.apply(data,filename,raw,verbose)
ioflush() -- we want instant messages
end
--- enhancers.patches.register("before","migrate metadata","cambria",function() end)
+-- patches.register("before","migrate metadata","cambria",function() end)
-function enhancers.patches.register(what,where,pattern,action)
+function patches.register(what,where,pattern,action)
local ww = what[where]
if ww then
ww[pattern] = action
@@ -5929,6 +5922,12 @@ function enhancers.patches.register(what,where,pattern,action)
end
end
+function patches.report(fmt,...)
+ if trace_loading then
+ report_otf("patching: " ..fmt,...)
+ end
+end
+
function enhancers.register(what,action) -- only already registered can be overloaded
actions[what] = action
end
@@ -7531,7 +7530,7 @@ if not modules then modules = { } end modules ['font-otd'] = {
local trace_dynamics = false trackers.register("otf.dynamics", function(v) trace_dynamics = v end)
-local report_otf = logs.new("load otf")
+local report_otf = logs.new("fonts","otf loading")
local fonts = fonts
local otf = fonts.otf
@@ -7705,7 +7704,7 @@ local trace_ligatures = false trackers.register("otf.ligatures", function
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.new("otf prepare")
+local report_prepare = logs.new("fonts","otf prepare")
local wildcard = "*"
local default = "dflt"
@@ -8223,11 +8222,11 @@ local trace_steps = false trackers.register("otf.steps", function
local trace_skips = false trackers.register("otf.skips", function(v) trace_skips = v end)
local trace_directions = false trackers.register("otf.directions", function(v) trace_directions = v end)
-local report_direct = logs.new("otf direct")
-local report_subchain = logs.new("otf subchain")
-local report_chain = logs.new("otf chain")
-local report_process = logs.new("otf process")
-local report_prepare = logs.new("otf prepare")
+local report_direct = logs.new("fonts","otf direct")
+local report_subchain = logs.new("fonts","otf subchain")
+local report_chain = logs.new("fonts","otf chain")
+local report_process = logs.new("fonts","otf process")
+local report_prepare = logs.new("fonts","otf prepare")
trackers.register("otf.verbose_chain", function(v) otf.setcontextchain(v and "verbose") end)
trackers.register("otf.normal_chain", function(v) otf.setcontextchain(v and "normal") end)
@@ -11096,7 +11095,7 @@ local trace_loading = false trackers.register("otf.loading", function(v) trace_
local fonts = fonts
local otf = fonts.otf
-local report_otf = logs.new("load otf")
+local report_otf = logs.new("fonts","otf loading")
-- instead of "script = "DFLT", langs = { 'dflt' }" we now use wildcards (we used to
-- have always); some day we can write a "force always when true" trick for other
@@ -15303,8 +15302,8 @@ local directive_embedall = false directives.register("fonts.embedall", function
trackers.register("fonts.loading", "fonts.defining", "otf.loading", "afm.loading", "tfm.loading")
trackers.register("fonts.all", "fonts.*", "otf.*", "afm.*", "tfm.*")
-local report_define = logs.new("define fonts")
-local report_afm = logs.new("load afm")
+local report_defining = logs.new("fonts","defining")
+local report_afm = logs.new("fonts","afm loading")
--[[ldx--
<p>Here we deal with defining fonts. We do so by intercepting the
@@ -15419,7 +15418,7 @@ end
function definers.makespecification(specification, lookup, name, sub, method, detail, size)
size = size or 655360
if trace_defining then
- report_define("%s -> lookup: %s, name: %s, sub: %s, method: %s, detail: %s",
+ report_defining("%s -> lookup: %s, name: %s, sub: %s, method: %s, detail: %s",
specification, (lookup ~= "" and lookup) or "[file]", (name ~= "" and name) or "-",
(sub ~= "" and sub) or "-", (method ~= "" and method) or "-", (detail ~= "" and detail) or "-")
end
@@ -15627,14 +15626,14 @@ function tfm.read(specification)
local reader = readers[lower(forced)]
tfmtable = reader and reader(specification)
if not tfmtable then
- report_define("forced type %s of %s not found",forced,specification.name)
+ report_defining("forced type %s of %s not found",forced,specification.name)
end
else
for s=1,#sequence do -- reader sequence
local reader = sequence[s]
if readers[reader] then -- not really needed
if trace_defining then
- report_define("trying (reader sequence driven) type %s for %s with file %s",reader,specification.name,specification.filename or "unknown")
+ report_defining("trying (reader sequence driven) type %s for %s with file %s",reader,specification.name,specification.filename or "unknown")
end
tfmtable = readers[reader](specification)
if tfmtable then
@@ -15659,7 +15658,7 @@ function tfm.read(specification)
end
end
if not tfmtable then
- report_define("font with asked name '%s' is not found using lookup '%s'",specification.name,specification.lookup)
+ report_defining("font with asked name '%s' is not found using lookup '%s'",specification.name,specification.lookup)
end
return tfmtable
end
@@ -15877,7 +15876,7 @@ function definers.register(tfmdata,id) -- will be overloaded
local hash = tfmdata.hash
if not internalized[hash] then
if trace_defining then
- report_define("registering font, id: %s, hash: %s",id or "?",hash or "?")
+ report_defining("registering font, id: %s, hash: %s",id or "?",hash or "?")
end
fonts.identifiers[id] = tfmdata
internalized[hash] = id
@@ -15945,9 +15944,9 @@ function definers.read(specification,size,id) -- id can be optional, name can al
end
lastdefined = tfmdata or id -- todo ! ! ! ! !
if not tfmdata then -- or id?
- report_define( "unknown font %s, loading aborted",specification.name)
+ report_defining( "unknown font %s, loading aborted",specification.name)
elseif trace_defining and type(tfmdata) == "table" then
- report_define("using %s font with id %s, name:%s size:%s bytes:%s encoding:%s fullname:%s filename:%s",
+ report_defining("using %s font with id %s, name:%s size:%s bytes:%s encoding:%s fullname:%s filename:%s",
tfmdata.type or "unknown",
id or "?",
tfmdata.name or "?",
@@ -15967,18 +15966,18 @@ function vf.find(name)
local format = fonts.logger.format(name)
if format == 'tfm' or format == 'ofm' then
if trace_defining then
- report_define("locating vf for %s",name)
+ report_defining("locating vf for %s",name)
end
return findbinfile(name,"ovf")
else
if trace_defining then
- report_define("vf for %s is already taken care of",name)
+ report_defining("vf for %s is already taken care of",name)
end
return nil -- ""
end
else
if trace_defining then
- report_define("locating vf for %s",name)
+ report_defining("locating vf for %s",name)
end
return findbinfile(name,"ovf")
end