summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
Diffstat (limited to 'Master')
-rwxr-xr-xMaster/bin/alpha-linux/mtxrun45
-rwxr-xr-xMaster/bin/amd64-freebsd/mtxrun45
-rwxr-xr-xMaster/bin/amd64-kfreebsd/mtxrun45
-rwxr-xr-xMaster/bin/armel-linux/mtxrun45
-rwxr-xr-xMaster/bin/i386-cygwin/mtxrun45
-rwxr-xr-xMaster/bin/i386-freebsd/mtxrun45
-rwxr-xr-xMaster/bin/i386-kfreebsd/mtxrun45
-rwxr-xr-xMaster/bin/i386-linux/mtxrun45
-rwxr-xr-xMaster/bin/i386-netbsd/mtxrun45
-rwxr-xr-xMaster/bin/i386-solaris/mtxrun45
-rwxr-xr-xMaster/bin/mips-irix/mtxrun45
-rwxr-xr-xMaster/bin/mipsel-linux/mtxrun45
-rwxr-xr-xMaster/bin/powerpc-aix/mtxrun45
-rwxr-xr-xMaster/bin/powerpc-linux/mtxrun45
-rwxr-xr-xMaster/bin/sparc-solaris/mtxrun45
-rwxr-xr-xMaster/bin/universal-darwin/mtxrun45
-rwxr-xr-xMaster/bin/win32/mtxrun.lua45
-rwxr-xr-xMaster/bin/x86_64-darwin/mtxrun45
-rwxr-xr-xMaster/bin/x86_64-linux/mtxrun45
-rwxr-xr-xMaster/bin/x86_64-solaris/mtxrun45
-rw-r--r--Master/texmf-dist/scripts/context/lua/mtx-update.lua4
-rw-r--r--Master/texmf-dist/scripts/context/lua/mtx-watch.lua35
-rwxr-xr-xMaster/texmf-dist/scripts/context/lua/mtxrun.lua45
-rw-r--r--Master/texmf-dist/scripts/context/stubs/mswin/mtxrun.lua45
-rwxr-xr-xMaster/texmf-dist/scripts/context/stubs/unix/mtxrun45
-rw-r--r--Master/texmf-dist/tex/context/base/bibl-tra.lua73
-rw-r--r--Master/texmf-dist/tex/context/base/chem-ini.mkiv8
-rw-r--r--Master/texmf-dist/tex/context/base/cont-new.mkii2
-rw-r--r--Master/texmf-dist/tex/context/base/cont-new.mkiv2
-rw-r--r--Master/texmf-dist/tex/context/base/context-version.pdfbin4111 -> 4133 bytes
-rw-r--r--Master/texmf-dist/tex/context/base/context-version.pngbin106155 -> 106192 bytes
-rw-r--r--Master/texmf-dist/tex/context/base/context.mkii2
-rw-r--r--Master/texmf-dist/tex/context/base/context.mkiv2
-rw-r--r--Master/texmf-dist/tex/context/base/data-exp.lua18
-rw-r--r--Master/texmf-dist/tex/context/base/data-lst.lua2
-rw-r--r--Master/texmf-dist/tex/context/base/data-pre.lua20
-rw-r--r--Master/texmf-dist/tex/context/base/data-res.lua18
-rw-r--r--Master/texmf-dist/tex/context/base/data-tmf.lua1
-rw-r--r--Master/texmf-dist/tex/context/base/font-ota.lua10
-rw-r--r--Master/texmf-dist/tex/context/base/font-otn.lua8
-rw-r--r--Master/texmf-dist/tex/context/base/lpdf-ano.lua18
-rw-r--r--Master/texmf-dist/tex/context/base/s-inf-04.mkiv48
-rw-r--r--Master/texmf-dist/tex/context/base/status-files.pdfbin24381 -> 24428 bytes
-rw-r--r--Master/texmf-dist/tex/context/base/status-lua.pdfbin180184 -> 180037 bytes
-rw-r--r--Master/texmf-dist/tex/context/base/status-mkiv.lua2
-rw-r--r--Master/texmf-dist/tex/context/base/strc-con.mkvi2
-rw-r--r--Master/texmf-dist/tex/context/base/strc-ini.lua8
-rw-r--r--Master/texmf-dist/tex/context/base/strc-ref.lua48
-rw-r--r--Master/texmf-dist/tex/context/base/strc-ref.mkvi2
-rw-r--r--Master/texmf-dist/tex/generic/context/luatex/luatex-fonts-merged.lua20
50 files changed, 895 insertions, 493 deletions
diff --git a/Master/bin/alpha-linux/mtxrun b/Master/bin/alpha-linux/mtxrun
index e8f229572cc..51cbb95f269 100755
--- a/Master/bin/alpha-linux/mtxrun
+++ b/Master/bin/alpha-linux/mtxrun
@@ -11004,27 +11004,30 @@ local function f_second(a,b)
return concat(t,",")
end
+-- old {a,b}{c,d} => ac ad bc bd
+--
-- local function f_both(a,b)
-- local t, n = { }, 0
--- for sb in gmatch(b,"[^,]+") do -- and not sa
--- for sa in gmatch(a,"[^,]+") do -- sb
+-- for sa in gmatch(a,"[^,]+") do
+-- for sb in gmatch(b,"[^,]+") do
-- n = n + 1 ; t[n] = sa .. sb
-- end
-- end
-- return concat(t,",")
-- end
+--
+-- new {a,b}{c,d} => ac bc ad bd
local function f_both(a,b)
local t, n = { }, 0
- for sa in gmatch(a,"[^,]+") do
- for sb in gmatch(b,"[^,]+") do
+ for sb in gmatch(b,"[^,]+") do -- and not sa
+ for sa in gmatch(a,"[^,]+") do -- sb
n = n + 1 ; t[n] = sa .. sb
end
end
return concat(t,",")
end
-
local left = P("{")
local right = P("}")
local var = P((1 - S("{}" ))^0)
@@ -11039,9 +11042,6 @@ local l_rest = Cs( ( left * var * (left/"") * var * (right/"") * var * right
local stripper_1 = lpeg.stripper ("{}@")
local replacer_1 = lpeg.replacer { { ",}", ",@}" }, { "{,", "{@," }, }
--- old {a,b}{c,d} => ac ad bc bd
--- new {a,b}{c,d} => ac bc ad bd
-
local function splitpathexpr(str, newlist, validate) -- I couldn't resist lpegging it (nice exercise).
if trace_expansions then
report_expansions("expanding variable '%s'",str)
@@ -11169,7 +11169,7 @@ local stripper = Cs(
)
function resolvers.checkedvariable(str) -- assumes str is a string
- return lpegmatch(stripper,str) or str
+ return type(str) == "string" and lpegmatch(stripper,str) or str
end
-- The path splitter:
@@ -12333,8 +12333,10 @@ resolvers.luacnfstate = "unknown"
-- selfautoparent:texmf/web2c
if environment.default_texmfcnf then
+ -- unfortunately we now have quite some overkill in the spec (not so nice on a network)
resolvers.luacnfspec = environment.default_texmfcnf
else
+ -- resolvers.luacnfspec = "selfautoparent:texmf{-local,-context,}/web2c"
resolvers.luacnfspec = "{selfautoloc:,selfautodir:,selfautoparent:}{,/texmf{-local,}/web2c}"
end
@@ -12673,7 +12675,7 @@ local function load_configuration_files()
instance.loaderror = true
end
elseif trace_locating then
- report_resolving("skipping configuration file '%s' (no file)",filename)
+ report_resolving("skipping configuration file '%s' (no valid format)",filename)
end
instance.order[#instance.order+1] = instance.setups[pathname]
if instance.loaderror then
@@ -14028,13 +14030,21 @@ function resolvers.resetresolve(str)
end
local function resolve(str) -- use schemes, this one is then for the commandline only
- local res = resolved[str]
- if not res then
- res = gsub(str,"([a-z][a-z]+):([^ \"\';]*)",_resolve_) -- home:xx;selfautoparent:xx; etc
- resolved[str] = res
- abstract[res] = str
+ if type(str) == "table" then
+ local t = { }
+ for i=1,#str do
+ t[i] = resolve(str[i])
+ end
+ return t
+ else
+ local res = resolved[str]
+ if not res then
+ res = gsub(str,"([a-z][a-z]+):([^ \"\';,]*)",_resolve_) -- home:xx;selfautoparent:xx; etc (comma added)
+ resolved[str] = res
+ abstract[res] = str
+ end
+ return res
end
- return res
end
local function unresolve(str)
@@ -15223,6 +15233,7 @@ function resolvers.load_tree(tree,resolve)
-- local AUTOPARENT etc. although these are alwasy set new.
if resolve then
+ -- resolvers.luacnfspec = resolvers.joinpath(resolvers.resolve(resolvers.expandedpathfromlist(resolvers.splitpath(resolvers.luacnfspec))))
resolvers.luacnfspec = resolvers.resolve(resolvers.luacnfspec)
end
@@ -15298,7 +15309,7 @@ function resolvers.listers.variables(pattern)
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")
+ report_lists(" res: %s",tabstr(resolvers.resolve(expansions[key])) or "unset")
end
end
instance.environment = fastcopy(env)
diff --git a/Master/bin/amd64-freebsd/mtxrun b/Master/bin/amd64-freebsd/mtxrun
index e8f229572cc..51cbb95f269 100755
--- a/Master/bin/amd64-freebsd/mtxrun
+++ b/Master/bin/amd64-freebsd/mtxrun
@@ -11004,27 +11004,30 @@ local function f_second(a,b)
return concat(t,",")
end
+-- old {a,b}{c,d} => ac ad bc bd
+--
-- local function f_both(a,b)
-- local t, n = { }, 0
--- for sb in gmatch(b,"[^,]+") do -- and not sa
--- for sa in gmatch(a,"[^,]+") do -- sb
+-- for sa in gmatch(a,"[^,]+") do
+-- for sb in gmatch(b,"[^,]+") do
-- n = n + 1 ; t[n] = sa .. sb
-- end
-- end
-- return concat(t,",")
-- end
+--
+-- new {a,b}{c,d} => ac bc ad bd
local function f_both(a,b)
local t, n = { }, 0
- for sa in gmatch(a,"[^,]+") do
- for sb in gmatch(b,"[^,]+") do
+ for sb in gmatch(b,"[^,]+") do -- and not sa
+ for sa in gmatch(a,"[^,]+") do -- sb
n = n + 1 ; t[n] = sa .. sb
end
end
return concat(t,",")
end
-
local left = P("{")
local right = P("}")
local var = P((1 - S("{}" ))^0)
@@ -11039,9 +11042,6 @@ local l_rest = Cs( ( left * var * (left/"") * var * (right/"") * var * right
local stripper_1 = lpeg.stripper ("{}@")
local replacer_1 = lpeg.replacer { { ",}", ",@}" }, { "{,", "{@," }, }
--- old {a,b}{c,d} => ac ad bc bd
--- new {a,b}{c,d} => ac bc ad bd
-
local function splitpathexpr(str, newlist, validate) -- I couldn't resist lpegging it (nice exercise).
if trace_expansions then
report_expansions("expanding variable '%s'",str)
@@ -11169,7 +11169,7 @@ local stripper = Cs(
)
function resolvers.checkedvariable(str) -- assumes str is a string
- return lpegmatch(stripper,str) or str
+ return type(str) == "string" and lpegmatch(stripper,str) or str
end
-- The path splitter:
@@ -12333,8 +12333,10 @@ resolvers.luacnfstate = "unknown"
-- selfautoparent:texmf/web2c
if environment.default_texmfcnf then
+ -- unfortunately we now have quite some overkill in the spec (not so nice on a network)
resolvers.luacnfspec = environment.default_texmfcnf
else
+ -- resolvers.luacnfspec = "selfautoparent:texmf{-local,-context,}/web2c"
resolvers.luacnfspec = "{selfautoloc:,selfautodir:,selfautoparent:}{,/texmf{-local,}/web2c}"
end
@@ -12673,7 +12675,7 @@ local function load_configuration_files()
instance.loaderror = true
end
elseif trace_locating then
- report_resolving("skipping configuration file '%s' (no file)",filename)
+ report_resolving("skipping configuration file '%s' (no valid format)",filename)
end
instance.order[#instance.order+1] = instance.setups[pathname]
if instance.loaderror then
@@ -14028,13 +14030,21 @@ function resolvers.resetresolve(str)
end
local function resolve(str) -- use schemes, this one is then for the commandline only
- local res = resolved[str]
- if not res then
- res = gsub(str,"([a-z][a-z]+):([^ \"\';]*)",_resolve_) -- home:xx;selfautoparent:xx; etc
- resolved[str] = res
- abstract[res] = str
+ if type(str) == "table" then
+ local t = { }
+ for i=1,#str do
+ t[i] = resolve(str[i])
+ end
+ return t
+ else
+ local res = resolved[str]
+ if not res then
+ res = gsub(str,"([a-z][a-z]+):([^ \"\';,]*)",_resolve_) -- home:xx;selfautoparent:xx; etc (comma added)
+ resolved[str] = res
+ abstract[res] = str
+ end
+ return res
end
- return res
end
local function unresolve(str)
@@ -15223,6 +15233,7 @@ function resolvers.load_tree(tree,resolve)
-- local AUTOPARENT etc. although these are alwasy set new.
if resolve then
+ -- resolvers.luacnfspec = resolvers.joinpath(resolvers.resolve(resolvers.expandedpathfromlist(resolvers.splitpath(resolvers.luacnfspec))))
resolvers.luacnfspec = resolvers.resolve(resolvers.luacnfspec)
end
@@ -15298,7 +15309,7 @@ function resolvers.listers.variables(pattern)
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")
+ report_lists(" res: %s",tabstr(resolvers.resolve(expansions[key])) or "unset")
end
end
instance.environment = fastcopy(env)
diff --git a/Master/bin/amd64-kfreebsd/mtxrun b/Master/bin/amd64-kfreebsd/mtxrun
index e8f229572cc..51cbb95f269 100755
--- a/Master/bin/amd64-kfreebsd/mtxrun
+++ b/Master/bin/amd64-kfreebsd/mtxrun
@@ -11004,27 +11004,30 @@ local function f_second(a,b)
return concat(t,",")
end
+-- old {a,b}{c,d} => ac ad bc bd
+--
-- local function f_both(a,b)
-- local t, n = { }, 0
--- for sb in gmatch(b,"[^,]+") do -- and not sa
--- for sa in gmatch(a,"[^,]+") do -- sb
+-- for sa in gmatch(a,"[^,]+") do
+-- for sb in gmatch(b,"[^,]+") do
-- n = n + 1 ; t[n] = sa .. sb
-- end
-- end
-- return concat(t,",")
-- end
+--
+-- new {a,b}{c,d} => ac bc ad bd
local function f_both(a,b)
local t, n = { }, 0
- for sa in gmatch(a,"[^,]+") do
- for sb in gmatch(b,"[^,]+") do
+ for sb in gmatch(b,"[^,]+") do -- and not sa
+ for sa in gmatch(a,"[^,]+") do -- sb
n = n + 1 ; t[n] = sa .. sb
end
end
return concat(t,",")
end
-
local left = P("{")
local right = P("}")
local var = P((1 - S("{}" ))^0)
@@ -11039,9 +11042,6 @@ local l_rest = Cs( ( left * var * (left/"") * var * (right/"") * var * right
local stripper_1 = lpeg.stripper ("{}@")
local replacer_1 = lpeg.replacer { { ",}", ",@}" }, { "{,", "{@," }, }
--- old {a,b}{c,d} => ac ad bc bd
--- new {a,b}{c,d} => ac bc ad bd
-
local function splitpathexpr(str, newlist, validate) -- I couldn't resist lpegging it (nice exercise).
if trace_expansions then
report_expansions("expanding variable '%s'",str)
@@ -11169,7 +11169,7 @@ local stripper = Cs(
)
function resolvers.checkedvariable(str) -- assumes str is a string
- return lpegmatch(stripper,str) or str
+ return type(str) == "string" and lpegmatch(stripper,str) or str
end
-- The path splitter:
@@ -12333,8 +12333,10 @@ resolvers.luacnfstate = "unknown"
-- selfautoparent:texmf/web2c
if environment.default_texmfcnf then
+ -- unfortunately we now have quite some overkill in the spec (not so nice on a network)
resolvers.luacnfspec = environment.default_texmfcnf
else
+ -- resolvers.luacnfspec = "selfautoparent:texmf{-local,-context,}/web2c"
resolvers.luacnfspec = "{selfautoloc:,selfautodir:,selfautoparent:}{,/texmf{-local,}/web2c}"
end
@@ -12673,7 +12675,7 @@ local function load_configuration_files()
instance.loaderror = true
end
elseif trace_locating then
- report_resolving("skipping configuration file '%s' (no file)",filename)
+ report_resolving("skipping configuration file '%s' (no valid format)",filename)
end
instance.order[#instance.order+1] = instance.setups[pathname]
if instance.loaderror then
@@ -14028,13 +14030,21 @@ function resolvers.resetresolve(str)
end
local function resolve(str) -- use schemes, this one is then for the commandline only
- local res = resolved[str]
- if not res then
- res = gsub(str,"([a-z][a-z]+):([^ \"\';]*)",_resolve_) -- home:xx;selfautoparent:xx; etc
- resolved[str] = res
- abstract[res] = str
+ if type(str) == "table" then
+ local t = { }
+ for i=1,#str do
+ t[i] = resolve(str[i])
+ end
+ return t
+ else
+ local res = resolved[str]
+ if not res then
+ res = gsub(str,"([a-z][a-z]+):([^ \"\';,]*)",_resolve_) -- home:xx;selfautoparent:xx; etc (comma added)
+ resolved[str] = res
+ abstract[res] = str
+ end
+ return res
end
- return res
end
local function unresolve(str)
@@ -15223,6 +15233,7 @@ function resolvers.load_tree(tree,resolve)
-- local AUTOPARENT etc. although these are alwasy set new.
if resolve then
+ -- resolvers.luacnfspec = resolvers.joinpath(resolvers.resolve(resolvers.expandedpathfromlist(resolvers.splitpath(resolvers.luacnfspec))))
resolvers.luacnfspec = resolvers.resolve(resolvers.luacnfspec)
end
@@ -15298,7 +15309,7 @@ function resolvers.listers.variables(pattern)
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")
+ report_lists(" res: %s",tabstr(resolvers.resolve(expansions[key])) or "unset")
end
end
instance.environment = fastcopy(env)
diff --git a/Master/bin/armel-linux/mtxrun b/Master/bin/armel-linux/mtxrun
index e8f229572cc..51cbb95f269 100755
--- a/Master/bin/armel-linux/mtxrun
+++ b/Master/bin/armel-linux/mtxrun
@@ -11004,27 +11004,30 @@ local function f_second(a,b)
return concat(t,",")
end
+-- old {a,b}{c,d} => ac ad bc bd
+--
-- local function f_both(a,b)
-- local t, n = { }, 0
--- for sb in gmatch(b,"[^,]+") do -- and not sa
--- for sa in gmatch(a,"[^,]+") do -- sb
+-- for sa in gmatch(a,"[^,]+") do
+-- for sb in gmatch(b,"[^,]+") do
-- n = n + 1 ; t[n] = sa .. sb
-- end
-- end
-- return concat(t,",")
-- end
+--
+-- new {a,b}{c,d} => ac bc ad bd
local function f_both(a,b)
local t, n = { }, 0
- for sa in gmatch(a,"[^,]+") do
- for sb in gmatch(b,"[^,]+") do
+ for sb in gmatch(b,"[^,]+") do -- and not sa
+ for sa in gmatch(a,"[^,]+") do -- sb
n = n + 1 ; t[n] = sa .. sb
end
end
return concat(t,",")
end
-
local left = P("{")
local right = P("}")
local var = P((1 - S("{}" ))^0)
@@ -11039,9 +11042,6 @@ local l_rest = Cs( ( left * var * (left/"") * var * (right/"") * var * right
local stripper_1 = lpeg.stripper ("{}@")
local replacer_1 = lpeg.replacer { { ",}", ",@}" }, { "{,", "{@," }, }
--- old {a,b}{c,d} => ac ad bc bd
--- new {a,b}{c,d} => ac bc ad bd
-
local function splitpathexpr(str, newlist, validate) -- I couldn't resist lpegging it (nice exercise).
if trace_expansions then
report_expansions("expanding variable '%s'",str)
@@ -11169,7 +11169,7 @@ local stripper = Cs(
)
function resolvers.checkedvariable(str) -- assumes str is a string
- return lpegmatch(stripper,str) or str
+ return type(str) == "string" and lpegmatch(stripper,str) or str
end
-- The path splitter:
@@ -12333,8 +12333,10 @@ resolvers.luacnfstate = "unknown"
-- selfautoparent:texmf/web2c
if environment.default_texmfcnf then
+ -- unfortunately we now have quite some overkill in the spec (not so nice on a network)
resolvers.luacnfspec = environment.default_texmfcnf
else
+ -- resolvers.luacnfspec = "selfautoparent:texmf{-local,-context,}/web2c"
resolvers.luacnfspec = "{selfautoloc:,selfautodir:,selfautoparent:}{,/texmf{-local,}/web2c}"
end
@@ -12673,7 +12675,7 @@ local function load_configuration_files()
instance.loaderror = true
end
elseif trace_locating then
- report_resolving("skipping configuration file '%s' (no file)",filename)
+ report_resolving("skipping configuration file '%s' (no valid format)",filename)
end
instance.order[#instance.order+1] = instance.setups[pathname]
if instance.loaderror then
@@ -14028,13 +14030,21 @@ function resolvers.resetresolve(str)
end
local function resolve(str) -- use schemes, this one is then for the commandline only
- local res = resolved[str]
- if not res then
- res = gsub(str,"([a-z][a-z]+):([^ \"\';]*)",_resolve_) -- home:xx;selfautoparent:xx; etc
- resolved[str] = res
- abstract[res] = str
+ if type(str) == "table" then
+ local t = { }
+ for i=1,#str do
+ t[i] = resolve(str[i])
+ end
+ return t
+ else
+ local res = resolved[str]
+ if not res then
+ res = gsub(str,"([a-z][a-z]+):([^ \"\';,]*)",_resolve_) -- home:xx;selfautoparent:xx; etc (comma added)
+ resolved[str] = res
+ abstract[res] = str
+ end
+ return res
end
- return res
end
local function unresolve(str)
@@ -15223,6 +15233,7 @@ function resolvers.load_tree(tree,resolve)
-- local AUTOPARENT etc. although these are alwasy set new.
if resolve then
+ -- resolvers.luacnfspec = resolvers.joinpath(resolvers.resolve(resolvers.expandedpathfromlist(resolvers.splitpath(resolvers.luacnfspec))))
resolvers.luacnfspec = resolvers.resolve(resolvers.luacnfspec)
end
@@ -15298,7 +15309,7 @@ function resolvers.listers.variables(pattern)
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")
+ report_lists(" res: %s",tabstr(resolvers.resolve(expansions[key])) or "unset")
end
end
instance.environment = fastcopy(env)
diff --git a/Master/bin/i386-cygwin/mtxrun b/Master/bin/i386-cygwin/mtxrun
index e8f229572cc..51cbb95f269 100755
--- a/Master/bin/i386-cygwin/mtxrun
+++ b/Master/bin/i386-cygwin/mtxrun
@@ -11004,27 +11004,30 @@ local function f_second(a,b)
return concat(t,",")
end
+-- old {a,b}{c,d} => ac ad bc bd
+--
-- local function f_both(a,b)
-- local t, n = { }, 0
--- for sb in gmatch(b,"[^,]+") do -- and not sa
--- for sa in gmatch(a,"[^,]+") do -- sb
+-- for sa in gmatch(a,"[^,]+") do
+-- for sb in gmatch(b,"[^,]+") do
-- n = n + 1 ; t[n] = sa .. sb
-- end
-- end
-- return concat(t,",")
-- end
+--
+-- new {a,b}{c,d} => ac bc ad bd
local function f_both(a,b)
local t, n = { }, 0
- for sa in gmatch(a,"[^,]+") do
- for sb in gmatch(b,"[^,]+") do
+ for sb in gmatch(b,"[^,]+") do -- and not sa
+ for sa in gmatch(a,"[^,]+") do -- sb
n = n + 1 ; t[n] = sa .. sb
end
end
return concat(t,",")
end
-
local left = P("{")
local right = P("}")
local var = P((1 - S("{}" ))^0)
@@ -11039,9 +11042,6 @@ local l_rest = Cs( ( left * var * (left/"") * var * (right/"") * var * right
local stripper_1 = lpeg.stripper ("{}@")
local replacer_1 = lpeg.replacer { { ",}", ",@}" }, { "{,", "{@," }, }
--- old {a,b}{c,d} => ac ad bc bd
--- new {a,b}{c,d} => ac bc ad bd
-
local function splitpathexpr(str, newlist, validate) -- I couldn't resist lpegging it (nice exercise).
if trace_expansions then
report_expansions("expanding variable '%s'",str)
@@ -11169,7 +11169,7 @@ local stripper = Cs(
)
function resolvers.checkedvariable(str) -- assumes str is a string
- return lpegmatch(stripper,str) or str
+ return type(str) == "string" and lpegmatch(stripper,str) or str
end
-- The path splitter:
@@ -12333,8 +12333,10 @@ resolvers.luacnfstate = "unknown"
-- selfautoparent:texmf/web2c
if environment.default_texmfcnf then
+ -- unfortunately we now have quite some overkill in the spec (not so nice on a network)
resolvers.luacnfspec = environment.default_texmfcnf
else
+ -- resolvers.luacnfspec = "selfautoparent:texmf{-local,-context,}/web2c"
resolvers.luacnfspec = "{selfautoloc:,selfautodir:,selfautoparent:}{,/texmf{-local,}/web2c}"
end
@@ -12673,7 +12675,7 @@ local function load_configuration_files()
instance.loaderror = true
end
elseif trace_locating then
- report_resolving("skipping configuration file '%s' (no file)",filename)
+ report_resolving("skipping configuration file '%s' (no valid format)",filename)
end
instance.order[#instance.order+1] = instance.setups[pathname]
if instance.loaderror then
@@ -14028,13 +14030,21 @@ function resolvers.resetresolve(str)
end
local function resolve(str) -- use schemes, this one is then for the commandline only
- local res = resolved[str]
- if not res then
- res = gsub(str,"([a-z][a-z]+):([^ \"\';]*)",_resolve_) -- home:xx;selfautoparent:xx; etc
- resolved[str] = res
- abstract[res] = str
+ if type(str) == "table" then
+ local t = { }
+ for i=1,#str do
+ t[i] = resolve(str[i])
+ end
+ return t
+ else
+ local res = resolved[str]
+ if not res then
+ res = gsub(str,"([a-z][a-z]+):([^ \"\';,]*)",_resolve_) -- home:xx;selfautoparent:xx; etc (comma added)
+ resolved[str] = res
+ abstract[res] = str
+ end
+ return res
end
- return res
end
local function unresolve(str)
@@ -15223,6 +15233,7 @@ function resolvers.load_tree(tree,resolve)
-- local AUTOPARENT etc. although these are alwasy set new.
if resolve then
+ -- resolvers.luacnfspec = resolvers.joinpath(resolvers.resolve(resolvers.expandedpathfromlist(resolvers.splitpath(resolvers.luacnfspec))))
resolvers.luacnfspec = resolvers.resolve(resolvers.luacnfspec)
end
@@ -15298,7 +15309,7 @@ function resolvers.listers.variables(pattern)
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")
+ report_lists(" res: %s",tabstr(resolvers.resolve(expansions[key])) or "unset")
end
end
instance.environment = fastcopy(env)
diff --git a/Master/bin/i386-freebsd/mtxrun b/Master/bin/i386-freebsd/mtxrun
index e8f229572cc..51cbb95f269 100755
--- a/Master/bin/i386-freebsd/mtxrun
+++ b/Master/bin/i386-freebsd/mtxrun
@@ -11004,27 +11004,30 @@ local function f_second(a,b)
return concat(t,",")
end
+-- old {a,b}{c,d} => ac ad bc bd
+--
-- local function f_both(a,b)
-- local t, n = { }, 0
--- for sb in gmatch(b,"[^,]+") do -- and not sa
--- for sa in gmatch(a,"[^,]+") do -- sb
+-- for sa in gmatch(a,"[^,]+") do
+-- for sb in gmatch(b,"[^,]+") do
-- n = n + 1 ; t[n] = sa .. sb
-- end
-- end
-- return concat(t,",")
-- end
+--
+-- new {a,b}{c,d} => ac bc ad bd
local function f_both(a,b)
local t, n = { }, 0
- for sa in gmatch(a,"[^,]+") do
- for sb in gmatch(b,"[^,]+") do
+ for sb in gmatch(b,"[^,]+") do -- and not sa
+ for sa in gmatch(a,"[^,]+") do -- sb
n = n + 1 ; t[n] = sa .. sb
end
end
return concat(t,",")
end
-
local left = P("{")
local right = P("}")
local var = P((1 - S("{}" ))^0)
@@ -11039,9 +11042,6 @@ local l_rest = Cs( ( left * var * (left/"") * var * (right/"") * var * right
local stripper_1 = lpeg.stripper ("{}@")
local replacer_1 = lpeg.replacer { { ",}", ",@}" }, { "{,", "{@," }, }
--- old {a,b}{c,d} => ac ad bc bd
--- new {a,b}{c,d} => ac bc ad bd
-
local function splitpathexpr(str, newlist, validate) -- I couldn't resist lpegging it (nice exercise).
if trace_expansions then
report_expansions("expanding variable '%s'",str)
@@ -11169,7 +11169,7 @@ local stripper = Cs(
)
function resolvers.checkedvariable(str) -- assumes str is a string
- return lpegmatch(stripper,str) or str
+ return type(str) == "string" and lpegmatch(stripper,str) or str
end
-- The path splitter:
@@ -12333,8 +12333,10 @@ resolvers.luacnfstate = "unknown"
-- selfautoparent:texmf/web2c
if environment.default_texmfcnf then
+ -- unfortunately we now have quite some overkill in the spec (not so nice on a network)
resolvers.luacnfspec = environment.default_texmfcnf
else
+ -- resolvers.luacnfspec = "selfautoparent:texmf{-local,-context,}/web2c"
resolvers.luacnfspec = "{selfautoloc:,selfautodir:,selfautoparent:}{,/texmf{-local,}/web2c}"
end
@@ -12673,7 +12675,7 @@ local function load_configuration_files()
instance.loaderror = true
end
elseif trace_locating then
- report_resolving("skipping configuration file '%s' (no file)",filename)
+ report_resolving("skipping configuration file '%s' (no valid format)",filename)
end
instance.order[#instance.order+1] = instance.setups[pathname]
if instance.loaderror then
@@ -14028,13 +14030,21 @@ function resolvers.resetresolve(str)
end
local function resolve(str) -- use schemes, this one is then for the commandline only
- local res = resolved[str]
- if not res then
- res = gsub(str,"([a-z][a-z]+):([^ \"\';]*)",_resolve_) -- home:xx;selfautoparent:xx; etc
- resolved[str] = res
- abstract[res] = str
+ if type(str) == "table" then
+ local t = { }
+ for i=1,#str do
+ t[i] = resolve(str[i])
+ end
+ return t
+ else
+ local res = resolved[str]
+ if not res then
+ res = gsub(str,"([a-z][a-z]+):([^ \"\';,]*)",_resolve_) -- home:xx;selfautoparent:xx; etc (comma added)
+ resolved[str] = res
+ abstract[res] = str
+ end
+ return res
end
- return res
end
local function unresolve(str)
@@ -15223,6 +15233,7 @@ function resolvers.load_tree(tree,resolve)
-- local AUTOPARENT etc. although these are alwasy set new.
if resolve then
+ -- resolvers.luacnfspec = resolvers.joinpath(resolvers.resolve(resolvers.expandedpathfromlist(resolvers.splitpath(resolvers.luacnfspec))))
resolvers.luacnfspec = resolvers.resolve(resolvers.luacnfspec)
end
@@ -15298,7 +15309,7 @@ function resolvers.listers.variables(pattern)
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")
+ report_lists(" res: %s",tabstr(resolvers.resolve(expansions[key])) or "unset")
end
end
instance.environment = fastcopy(env)
diff --git a/Master/bin/i386-kfreebsd/mtxrun b/Master/bin/i386-kfreebsd/mtxrun
index e8f229572cc..51cbb95f269 100755
--- a/Master/bin/i386-kfreebsd/mtxrun
+++ b/Master/bin/i386-kfreebsd/mtxrun
@@ -11004,27 +11004,30 @@ local function f_second(a,b)
return concat(t,",")
end
+-- old {a,b}{c,d} => ac ad bc bd
+--
-- local function f_both(a,b)
-- local t, n = { }, 0
--- for sb in gmatch(b,"[^,]+") do -- and not sa
--- for sa in gmatch(a,"[^,]+") do -- sb
+-- for sa in gmatch(a,"[^,]+") do
+-- for sb in gmatch(b,"[^,]+") do
-- n = n + 1 ; t[n] = sa .. sb
-- end
-- end
-- return concat(t,",")
-- end
+--
+-- new {a,b}{c,d} => ac bc ad bd
local function f_both(a,b)
local t, n = { }, 0
- for sa in gmatch(a,"[^,]+") do
- for sb in gmatch(b,"[^,]+") do
+ for sb in gmatch(b,"[^,]+") do -- and not sa
+ for sa in gmatch(a,"[^,]+") do -- sb
n = n + 1 ; t[n] = sa .. sb
end
end
return concat(t,",")
end
-
local left = P("{")
local right = P("}")
local var = P((1 - S("{}" ))^0)
@@ -11039,9 +11042,6 @@ local l_rest = Cs( ( left * var * (left/"") * var * (right/"") * var * right
local stripper_1 = lpeg.stripper ("{}@")
local replacer_1 = lpeg.replacer { { ",}", ",@}" }, { "{,", "{@," }, }
--- old {a,b}{c,d} => ac ad bc bd
--- new {a,b}{c,d} => ac bc ad bd
-
local function splitpathexpr(str, newlist, validate) -- I couldn't resist lpegging it (nice exercise).
if trace_expansions then
report_expansions("expanding variable '%s'",str)
@@ -11169,7 +11169,7 @@ local stripper = Cs(
)
function resolvers.checkedvariable(str) -- assumes str is a string
- return lpegmatch(stripper,str) or str
+ return type(str) == "string" and lpegmatch(stripper,str) or str
end
-- The path splitter:
@@ -12333,8 +12333,10 @@ resolvers.luacnfstate = "unknown"
-- selfautoparent:texmf/web2c
if environment.default_texmfcnf then
+ -- unfortunately we now have quite some overkill in the spec (not so nice on a network)
resolvers.luacnfspec = environment.default_texmfcnf
else
+ -- resolvers.luacnfspec = "selfautoparent:texmf{-local,-context,}/web2c"
resolvers.luacnfspec = "{selfautoloc:,selfautodir:,selfautoparent:}{,/texmf{-local,}/web2c}"
end
@@ -12673,7 +12675,7 @@ local function load_configuration_files()
instance.loaderror = true
end
elseif trace_locating then
- report_resolving("skipping configuration file '%s' (no file)",filename)
+ report_resolving("skipping configuration file '%s' (no valid format)",filename)
end
instance.order[#instance.order+1] = instance.setups[pathname]
if instance.loaderror then
@@ -14028,13 +14030,21 @@ function resolvers.resetresolve(str)
end
local function resolve(str) -- use schemes, this one is then for the commandline only
- local res = resolved[str]
- if not res then
- res = gsub(str,"([a-z][a-z]+):([^ \"\';]*)",_resolve_) -- home:xx;selfautoparent:xx; etc
- resolved[str] = res
- abstract[res] = str
+ if type(str) == "table" then
+ local t = { }
+ for i=1,#str do
+ t[i] = resolve(str[i])
+ end
+ return t
+ else
+ local res = resolved[str]
+ if not res then
+ res = gsub(str,"([a-z][a-z]+):([^ \"\';,]*)",_resolve_) -- home:xx;selfautoparent:xx; etc (comma added)
+ resolved[str] = res
+ abstract[res] = str
+ end
+ return res
end
- return res
end
local function unresolve(str)
@@ -15223,6 +15233,7 @@ function resolvers.load_tree(tree,resolve)
-- local AUTOPARENT etc. although these are alwasy set new.
if resolve then
+ -- resolvers.luacnfspec = resolvers.joinpath(resolvers.resolve(resolvers.expandedpathfromlist(resolvers.splitpath(resolvers.luacnfspec))))
resolvers.luacnfspec = resolvers.resolve(resolvers.luacnfspec)
end
@@ -15298,7 +15309,7 @@ function resolvers.listers.variables(pattern)
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")
+ report_lists(" res: %s",tabstr(resolvers.resolve(expansions[key])) or "unset")
end
end
instance.environment = fastcopy(env)
diff --git a/Master/bin/i386-linux/mtxrun b/Master/bin/i386-linux/mtxrun
index e8f229572cc..51cbb95f269 100755
--- a/Master/bin/i386-linux/mtxrun
+++ b/Master/bin/i386-linux/mtxrun
@@ -11004,27 +11004,30 @@ local function f_second(a,b)
return concat(t,",")
end
+-- old {a,b}{c,d} => ac ad bc bd
+--
-- local function f_both(a,b)
-- local t, n = { }, 0
--- for sb in gmatch(b,"[^,]+") do -- and not sa
--- for sa in gmatch(a,"[^,]+") do -- sb
+-- for sa in gmatch(a,"[^,]+") do
+-- for sb in gmatch(b,"[^,]+") do
-- n = n + 1 ; t[n] = sa .. sb
-- end
-- end
-- return concat(t,",")
-- end
+--
+-- new {a,b}{c,d} => ac bc ad bd
local function f_both(a,b)
local t, n = { }, 0
- for sa in gmatch(a,"[^,]+") do
- for sb in gmatch(b,"[^,]+") do
+ for sb in gmatch(b,"[^,]+") do -- and not sa
+ for sa in gmatch(a,"[^,]+") do -- sb
n = n + 1 ; t[n] = sa .. sb
end
end
return concat(t,",")
end
-
local left = P("{")
local right = P("}")
local var = P((1 - S("{}" ))^0)
@@ -11039,9 +11042,6 @@ local l_rest = Cs( ( left * var * (left/"") * var * (right/"") * var * right
local stripper_1 = lpeg.stripper ("{}@")
local replacer_1 = lpeg.replacer { { ",}", ",@}" }, { "{,", "{@," }, }
--- old {a,b}{c,d} => ac ad bc bd
--- new {a,b}{c,d} => ac bc ad bd
-
local function splitpathexpr(str, newlist, validate) -- I couldn't resist lpegging it (nice exercise).
if trace_expansions then
report_expansions("expanding variable '%s'",str)
@@ -11169,7 +11169,7 @@ local stripper = Cs(
)
function resolvers.checkedvariable(str) -- assumes str is a string
- return lpegmatch(stripper,str) or str
+ return type(str) == "string" and lpegmatch(stripper,str) or str
end
-- The path splitter:
@@ -12333,8 +12333,10 @@ resolvers.luacnfstate = "unknown"
-- selfautoparent:texmf/web2c
if environment.default_texmfcnf then
+ -- unfortunately we now have quite some overkill in the spec (not so nice on a network)
resolvers.luacnfspec = environment.default_texmfcnf
else
+ -- resolvers.luacnfspec = "selfautoparent:texmf{-local,-context,}/web2c"
resolvers.luacnfspec = "{selfautoloc:,selfautodir:,selfautoparent:}{,/texmf{-local,}/web2c}"
end
@@ -12673,7 +12675,7 @@ local function load_configuration_files()
instance.loaderror = true
end
elseif trace_locating then
- report_resolving("skipping configuration file '%s' (no file)",filename)
+ report_resolving("skipping configuration file '%s' (no valid format)",filename)
end
instance.order[#instance.order+1] = instance.setups[pathname]
if instance.loaderror then
@@ -14028,13 +14030,21 @@ function resolvers.resetresolve(str)
end
local function resolve(str) -- use schemes, this one is then for the commandline only
- local res = resolved[str]
- if not res then
- res = gsub(str,"([a-z][a-z]+):([^ \"\';]*)",_resolve_) -- home:xx;selfautoparent:xx; etc
- resolved[str] = res
- abstract[res] = str
+ if type(str) == "table" then
+ local t = { }
+ for i=1,#str do
+ t[i] = resolve(str[i])
+ end
+ return t
+ else
+ local res = resolved[str]
+ if not res then
+ res = gsub(str,"([a-z][a-z]+):([^ \"\';,]*)",_resolve_) -- home:xx;selfautoparent:xx; etc (comma added)
+ resolved[str] = res
+ abstract[res] = str
+ end
+ return res
end
- return res
end
local function unresolve(str)
@@ -15223,6 +15233,7 @@ function resolvers.load_tree(tree,resolve)
-- local AUTOPARENT etc. although these are alwasy set new.
if resolve then
+ -- resolvers.luacnfspec = resolvers.joinpath(resolvers.resolve(resolvers.expandedpathfromlist(resolvers.splitpath(resolvers.luacnfspec))))
resolvers.luacnfspec = resolvers.resolve(resolvers.luacnfspec)
end
@@ -15298,7 +15309,7 @@ function resolvers.listers.variables(pattern)
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")
+ report_lists(" res: %s",tabstr(resolvers.resolve(expansions[key])) or "unset")
end
end
instance.environment = fastcopy(env)
diff --git a/Master/bin/i386-netbsd/mtxrun b/Master/bin/i386-netbsd/mtxrun
index e8f229572cc..51cbb95f269 100755
--- a/Master/bin/i386-netbsd/mtxrun
+++ b/Master/bin/i386-netbsd/mtxrun
@@ -11004,27 +11004,30 @@ local function f_second(a,b)
return concat(t,",")
end
+-- old {a,b}{c,d} => ac ad bc bd
+--
-- local function f_both(a,b)
-- local t, n = { }, 0
--- for sb in gmatch(b,"[^,]+") do -- and not sa
--- for sa in gmatch(a,"[^,]+") do -- sb
+-- for sa in gmatch(a,"[^,]+") do
+-- for sb in gmatch(b,"[^,]+") do
-- n = n + 1 ; t[n] = sa .. sb
-- end
-- end
-- return concat(t,",")
-- end
+--
+-- new {a,b}{c,d} => ac bc ad bd
local function f_both(a,b)
local t, n = { }, 0
- for sa in gmatch(a,"[^,]+") do
- for sb in gmatch(b,"[^,]+") do
+ for sb in gmatch(b,"[^,]+") do -- and not sa
+ for sa in gmatch(a,"[^,]+") do -- sb
n = n + 1 ; t[n] = sa .. sb
end
end
return concat(t,",")
end
-
local left = P("{")
local right = P("}")
local var = P((1 - S("{}" ))^0)
@@ -11039,9 +11042,6 @@ local l_rest = Cs( ( left * var * (left/"") * var * (right/"") * var * right
local stripper_1 = lpeg.stripper ("{}@")
local replacer_1 = lpeg.replacer { { ",}", ",@}" }, { "{,", "{@," }, }
--- old {a,b}{c,d} => ac ad bc bd
--- new {a,b}{c,d} => ac bc ad bd
-
local function splitpathexpr(str, newlist, validate) -- I couldn't resist lpegging it (nice exercise).
if trace_expansions then
report_expansions("expanding variable '%s'",str)
@@ -11169,7 +11169,7 @@ local stripper = Cs(
)
function resolvers.checkedvariable(str) -- assumes str is a string
- return lpegmatch(stripper,str) or str
+ return type(str) == "string" and lpegmatch(stripper,str) or str
end
-- The path splitter:
@@ -12333,8 +12333,10 @@ resolvers.luacnfstate = "unknown"
-- selfautoparent:texmf/web2c
if environment.default_texmfcnf then
+ -- unfortunately we now have quite some overkill in the spec (not so nice on a network)
resolvers.luacnfspec = environment.default_texmfcnf
else
+ -- resolvers.luacnfspec = "selfautoparent:texmf{-local,-context,}/web2c"
resolvers.luacnfspec = "{selfautoloc:,selfautodir:,selfautoparent:}{,/texmf{-local,}/web2c}"
end
@@ -12673,7 +12675,7 @@ local function load_configuration_files()
instance.loaderror = true
end
elseif trace_locating then
- report_resolving("skipping configuration file '%s' (no file)",filename)
+ report_resolving("skipping configuration file '%s' (no valid format)",filename)
end
instance.order[#instance.order+1] = instance.setups[pathname]
if instance.loaderror then
@@ -14028,13 +14030,21 @@ function resolvers.resetresolve(str)
end
local function resolve(str) -- use schemes, this one is then for the commandline only
- local res = resolved[str]
- if not res then
- res = gsub(str,"([a-z][a-z]+):([^ \"\';]*)",_resolve_) -- home:xx;selfautoparent:xx; etc
- resolved[str] = res
- abstract[res] = str
+ if type(str) == "table" then
+ local t = { }
+ for i=1,#str do
+ t[i] = resolve(str[i])
+ end
+ return t
+ else
+ local res = resolved[str]
+ if not res then
+ res = gsub(str,"([a-z][a-z]+):([^ \"\';,]*)",_resolve_) -- home:xx;selfautoparent:xx; etc (comma added)
+ resolved[str] = res
+ abstract[res] = str
+ end
+ return res
end
- return res
end
local function unresolve(str)
@@ -15223,6 +15233,7 @@ function resolvers.load_tree(tree,resolve)
-- local AUTOPARENT etc. although these are alwasy set new.
if resolve then
+ -- resolvers.luacnfspec = resolvers.joinpath(resolvers.resolve(resolvers.expandedpathfromlist(resolvers.splitpath(resolvers.luacnfspec))))
resolvers.luacnfspec = resolvers.resolve(resolvers.luacnfspec)
end
@@ -15298,7 +15309,7 @@ function resolvers.listers.variables(pattern)
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")
+ report_lists(" res: %s",tabstr(resolvers.resolve(expansions[key])) or "unset")
end
end
instance.environment = fastcopy(env)
diff --git a/Master/bin/i386-solaris/mtxrun b/Master/bin/i386-solaris/mtxrun
index e8f229572cc..51cbb95f269 100755
--- a/Master/bin/i386-solaris/mtxrun
+++ b/Master/bin/i386-solaris/mtxrun
@@ -11004,27 +11004,30 @@ local function f_second(a,b)
return concat(t,",")
end
+-- old {a,b}{c,d} => ac ad bc bd
+--
-- local function f_both(a,b)
-- local t, n = { }, 0
--- for sb in gmatch(b,"[^,]+") do -- and not sa
--- for sa in gmatch(a,"[^,]+") do -- sb
+-- for sa in gmatch(a,"[^,]+") do
+-- for sb in gmatch(b,"[^,]+") do
-- n = n + 1 ; t[n] = sa .. sb
-- end
-- end
-- return concat(t,",")
-- end
+--
+-- new {a,b}{c,d} => ac bc ad bd
local function f_both(a,b)
local t, n = { }, 0
- for sa in gmatch(a,"[^,]+") do
- for sb in gmatch(b,"[^,]+") do
+ for sb in gmatch(b,"[^,]+") do -- and not sa
+ for sa in gmatch(a,"[^,]+") do -- sb
n = n + 1 ; t[n] = sa .. sb
end
end
return concat(t,",")
end
-
local left = P("{")
local right = P("}")
local var = P((1 - S("{}" ))^0)
@@ -11039,9 +11042,6 @@ local l_rest = Cs( ( left * var * (left/"") * var * (right/"") * var * right
local stripper_1 = lpeg.stripper ("{}@")
local replacer_1 = lpeg.replacer { { ",}", ",@}" }, { "{,", "{@," }, }
--- old {a,b}{c,d} => ac ad bc bd
--- new {a,b}{c,d} => ac bc ad bd
-
local function splitpathexpr(str, newlist, validate) -- I couldn't resist lpegging it (nice exercise).
if trace_expansions then
report_expansions("expanding variable '%s'",str)
@@ -11169,7 +11169,7 @@ local stripper = Cs(
)
function resolvers.checkedvariable(str) -- assumes str is a string
- return lpegmatch(stripper,str) or str
+ return type(str) == "string" and lpegmatch(stripper,str) or str
end
-- The path splitter:
@@ -12333,8 +12333,10 @@ resolvers.luacnfstate = "unknown"
-- selfautoparent:texmf/web2c
if environment.default_texmfcnf then
+ -- unfortunately we now have quite some overkill in the spec (not so nice on a network)
resolvers.luacnfspec = environment.default_texmfcnf
else
+ -- resolvers.luacnfspec = "selfautoparent:texmf{-local,-context,}/web2c"
resolvers.luacnfspec = "{selfautoloc:,selfautodir:,selfautoparent:}{,/texmf{-local,}/web2c}"
end
@@ -12673,7 +12675,7 @@ local function load_configuration_files()
instance.loaderror = true
end
elseif trace_locating then
- report_resolving("skipping configuration file '%s' (no file)",filename)
+ report_resolving("skipping configuration file '%s' (no valid format)",filename)
end
instance.order[#instance.order+1] = instance.setups[pathname]
if instance.loaderror then
@@ -14028,13 +14030,21 @@ function resolvers.resetresolve(str)
end
local function resolve(str) -- use schemes, this one is then for the commandline only
- local res = resolved[str]
- if not res then
- res = gsub(str,"([a-z][a-z]+):([^ \"\';]*)",_resolve_) -- home:xx;selfautoparent:xx; etc
- resolved[str] = res
- abstract[res] = str
+ if type(str) == "table" then
+ local t = { }
+ for i=1,#str do
+ t[i] = resolve(str[i])
+ end
+ return t
+ else
+ local res = resolved[str]
+ if not res then
+ res = gsub(str,"([a-z][a-z]+):([^ \"\';,]*)",_resolve_) -- home:xx;selfautoparent:xx; etc (comma added)
+ resolved[str] = res
+ abstract[res] = str
+ end
+ return res
end
- return res
end
local function unresolve(str)
@@ -15223,6 +15233,7 @@ function resolvers.load_tree(tree,resolve)
-- local AUTOPARENT etc. although these are alwasy set new.
if resolve then
+ -- resolvers.luacnfspec = resolvers.joinpath(resolvers.resolve(resolvers.expandedpathfromlist(resolvers.splitpath(resolvers.luacnfspec))))
resolvers.luacnfspec = resolvers.resolve(resolvers.luacnfspec)
end
@@ -15298,7 +15309,7 @@ function resolvers.listers.variables(pattern)
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")
+ report_lists(" res: %s",tabstr(resolvers.resolve(expansions[key])) or "unset")
end
end
instance.environment = fastcopy(env)
diff --git a/Master/bin/mips-irix/mtxrun b/Master/bin/mips-irix/mtxrun
index e8f229572cc..51cbb95f269 100755
--- a/Master/bin/mips-irix/mtxrun
+++ b/Master/bin/mips-irix/mtxrun
@@ -11004,27 +11004,30 @@ local function f_second(a,b)
return concat(t,",")
end
+-- old {a,b}{c,d} => ac ad bc bd
+--
-- local function f_both(a,b)
-- local t, n = { }, 0
--- for sb in gmatch(b,"[^,]+") do -- and not sa
--- for sa in gmatch(a,"[^,]+") do -- sb
+-- for sa in gmatch(a,"[^,]+") do
+-- for sb in gmatch(b,"[^,]+") do
-- n = n + 1 ; t[n] = sa .. sb
-- end
-- end
-- return concat(t,",")
-- end
+--
+-- new {a,b}{c,d} => ac bc ad bd
local function f_both(a,b)
local t, n = { }, 0
- for sa in gmatch(a,"[^,]+") do
- for sb in gmatch(b,"[^,]+") do
+ for sb in gmatch(b,"[^,]+") do -- and not sa
+ for sa in gmatch(a,"[^,]+") do -- sb
n = n + 1 ; t[n] = sa .. sb
end
end
return concat(t,",")
end
-
local left = P("{")
local right = P("}")
local var = P((1 - S("{}" ))^0)
@@ -11039,9 +11042,6 @@ local l_rest = Cs( ( left * var * (left/"") * var * (right/"") * var * right
local stripper_1 = lpeg.stripper ("{}@")
local replacer_1 = lpeg.replacer { { ",}", ",@}" }, { "{,", "{@," }, }
--- old {a,b}{c,d} => ac ad bc bd
--- new {a,b}{c,d} => ac bc ad bd
-
local function splitpathexpr(str, newlist, validate) -- I couldn't resist lpegging it (nice exercise).
if trace_expansions then
report_expansions("expanding variable '%s'",str)
@@ -11169,7 +11169,7 @@ local stripper = Cs(
)
function resolvers.checkedvariable(str) -- assumes str is a string
- return lpegmatch(stripper,str) or str
+ return type(str) == "string" and lpegmatch(stripper,str) or str
end
-- The path splitter:
@@ -12333,8 +12333,10 @@ resolvers.luacnfstate = "unknown"
-- selfautoparent:texmf/web2c
if environment.default_texmfcnf then
+ -- unfortunately we now have quite some overkill in the spec (not so nice on a network)
resolvers.luacnfspec = environment.default_texmfcnf
else
+ -- resolvers.luacnfspec = "selfautoparent:texmf{-local,-context,}/web2c"
resolvers.luacnfspec = "{selfautoloc:,selfautodir:,selfautoparent:}{,/texmf{-local,}/web2c}"
end
@@ -12673,7 +12675,7 @@ local function load_configuration_files()
instance.loaderror = true
end
elseif trace_locating then
- report_resolving("skipping configuration file '%s' (no file)",filename)
+ report_resolving("skipping configuration file '%s' (no valid format)",filename)
end
instance.order[#instance.order+1] = instance.setups[pathname]
if instance.loaderror then
@@ -14028,13 +14030,21 @@ function resolvers.resetresolve(str)
end
local function resolve(str) -- use schemes, this one is then for the commandline only
- local res = resolved[str]
- if not res then
- res = gsub(str,"([a-z][a-z]+):([^ \"\';]*)",_resolve_) -- home:xx;selfautoparent:xx; etc
- resolved[str] = res
- abstract[res] = str
+ if type(str) == "table" then
+ local t = { }
+ for i=1,#str do
+ t[i] = resolve(str[i])
+ end
+ return t
+ else
+ local res = resolved[str]
+ if not res then
+ res = gsub(str,"([a-z][a-z]+):([^ \"\';,]*)",_resolve_) -- home:xx;selfautoparent:xx; etc (comma added)
+ resolved[str] = res
+ abstract[res] = str
+ end
+ return res
end
- return res
end
local function unresolve(str)
@@ -15223,6 +15233,7 @@ function resolvers.load_tree(tree,resolve)
-- local AUTOPARENT etc. although these are alwasy set new.
if resolve then
+ -- resolvers.luacnfspec = resolvers.joinpath(resolvers.resolve(resolvers.expandedpathfromlist(resolvers.splitpath(resolvers.luacnfspec))))
resolvers.luacnfspec = resolvers.resolve(resolvers.luacnfspec)
end
@@ -15298,7 +15309,7 @@ function resolvers.listers.variables(pattern)
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")
+ report_lists(" res: %s",tabstr(resolvers.resolve(expansions[key])) or "unset")
end
end
instance.environment = fastcopy(env)
diff --git a/Master/bin/mipsel-linux/mtxrun b/Master/bin/mipsel-linux/mtxrun
index e8f229572cc..51cbb95f269 100755
--- a/Master/bin/mipsel-linux/mtxrun
+++ b/Master/bin/mipsel-linux/mtxrun
@@ -11004,27 +11004,30 @@ local function f_second(a,b)
return concat(t,",")
end
+-- old {a,b}{c,d} => ac ad bc bd
+--
-- local function f_both(a,b)
-- local t, n = { }, 0
--- for sb in gmatch(b,"[^,]+") do -- and not sa
--- for sa in gmatch(a,"[^,]+") do -- sb
+-- for sa in gmatch(a,"[^,]+") do
+-- for sb in gmatch(b,"[^,]+") do
-- n = n + 1 ; t[n] = sa .. sb
-- end
-- end
-- return concat(t,",")
-- end
+--
+-- new {a,b}{c,d} => ac bc ad bd
local function f_both(a,b)
local t, n = { }, 0
- for sa in gmatch(a,"[^,]+") do
- for sb in gmatch(b,"[^,]+") do
+ for sb in gmatch(b,"[^,]+") do -- and not sa
+ for sa in gmatch(a,"[^,]+") do -- sb
n = n + 1 ; t[n] = sa .. sb
end
end
return concat(t,",")
end
-
local left = P("{")
local right = P("}")
local var = P((1 - S("{}" ))^0)
@@ -11039,9 +11042,6 @@ local l_rest = Cs( ( left * var * (left/"") * var * (right/"") * var * right
local stripper_1 = lpeg.stripper ("{}@")
local replacer_1 = lpeg.replacer { { ",}", ",@}" }, { "{,", "{@," }, }
--- old {a,b}{c,d} => ac ad bc bd
--- new {a,b}{c,d} => ac bc ad bd
-
local function splitpathexpr(str, newlist, validate) -- I couldn't resist lpegging it (nice exercise).
if trace_expansions then
report_expansions("expanding variable '%s'",str)
@@ -11169,7 +11169,7 @@ local stripper = Cs(
)
function resolvers.checkedvariable(str) -- assumes str is a string
- return lpegmatch(stripper,str) or str
+ return type(str) == "string" and lpegmatch(stripper,str) or str
end
-- The path splitter:
@@ -12333,8 +12333,10 @@ resolvers.luacnfstate = "unknown"
-- selfautoparent:texmf/web2c
if environment.default_texmfcnf then
+ -- unfortunately we now have quite some overkill in the spec (not so nice on a network)
resolvers.luacnfspec = environment.default_texmfcnf
else
+ -- resolvers.luacnfspec = "selfautoparent:texmf{-local,-context,}/web2c"
resolvers.luacnfspec = "{selfautoloc:,selfautodir:,selfautoparent:}{,/texmf{-local,}/web2c}"
end
@@ -12673,7 +12675,7 @@ local function load_configuration_files()
instance.loaderror = true
end
elseif trace_locating then
- report_resolving("skipping configuration file '%s' (no file)",filename)
+ report_resolving("skipping configuration file '%s' (no valid format)",filename)
end
instance.order[#instance.order+1] = instance.setups[pathname]
if instance.loaderror then
@@ -14028,13 +14030,21 @@ function resolvers.resetresolve(str)
end
local function resolve(str) -- use schemes, this one is then for the commandline only
- local res = resolved[str]
- if not res then
- res = gsub(str,"([a-z][a-z]+):([^ \"\';]*)",_resolve_) -- home:xx;selfautoparent:xx; etc
- resolved[str] = res
- abstract[res] = str
+ if type(str) == "table" then
+ local t = { }
+ for i=1,#str do
+ t[i] = resolve(str[i])
+ end
+ return t
+ else
+ local res = resolved[str]
+ if not res then
+ res = gsub(str,"([a-z][a-z]+):([^ \"\';,]*)",_resolve_) -- home:xx;selfautoparent:xx; etc (comma added)
+ resolved[str] = res
+ abstract[res] = str
+ end
+ return res
end
- return res
end
local function unresolve(str)
@@ -15223,6 +15233,7 @@ function resolvers.load_tree(tree,resolve)
-- local AUTOPARENT etc. although these are alwasy set new.
if resolve then
+ -- resolvers.luacnfspec = resolvers.joinpath(resolvers.resolve(resolvers.expandedpathfromlist(resolvers.splitpath(resolvers.luacnfspec))))
resolvers.luacnfspec = resolvers.resolve(resolvers.luacnfspec)
end
@@ -15298,7 +15309,7 @@ function resolvers.listers.variables(pattern)
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")
+ report_lists(" res: %s",tabstr(resolvers.resolve(expansions[key])) or "unset")
end
end
instance.environment = fastcopy(env)
diff --git a/Master/bin/powerpc-aix/mtxrun b/Master/bin/powerpc-aix/mtxrun
index e8f229572cc..51cbb95f269 100755
--- a/Master/bin/powerpc-aix/mtxrun
+++ b/Master/bin/powerpc-aix/mtxrun
@@ -11004,27 +11004,30 @@ local function f_second(a,b)
return concat(t,",")
end
+-- old {a,b}{c,d} => ac ad bc bd
+--
-- local function f_both(a,b)
-- local t, n = { }, 0
--- for sb in gmatch(b,"[^,]+") do -- and not sa
--- for sa in gmatch(a,"[^,]+") do -- sb
+-- for sa in gmatch(a,"[^,]+") do
+-- for sb in gmatch(b,"[^,]+") do
-- n = n + 1 ; t[n] = sa .. sb
-- end
-- end
-- return concat(t,",")
-- end
+--
+-- new {a,b}{c,d} => ac bc ad bd
local function f_both(a,b)
local t, n = { }, 0
- for sa in gmatch(a,"[^,]+") do
- for sb in gmatch(b,"[^,]+") do
+ for sb in gmatch(b,"[^,]+") do -- and not sa
+ for sa in gmatch(a,"[^,]+") do -- sb
n = n + 1 ; t[n] = sa .. sb
end
end
return concat(t,",")
end
-
local left = P("{")
local right = P("}")
local var = P((1 - S("{}" ))^0)
@@ -11039,9 +11042,6 @@ local l_rest = Cs( ( left * var * (left/"") * var * (right/"") * var * right
local stripper_1 = lpeg.stripper ("{}@")
local replacer_1 = lpeg.replacer { { ",}", ",@}" }, { "{,", "{@," }, }
--- old {a,b}{c,d} => ac ad bc bd
--- new {a,b}{c,d} => ac bc ad bd
-
local function splitpathexpr(str, newlist, validate) -- I couldn't resist lpegging it (nice exercise).
if trace_expansions then
report_expansions("expanding variable '%s'",str)
@@ -11169,7 +11169,7 @@ local stripper = Cs(
)
function resolvers.checkedvariable(str) -- assumes str is a string
- return lpegmatch(stripper,str) or str
+ return type(str) == "string" and lpegmatch(stripper,str) or str
end
-- The path splitter:
@@ -12333,8 +12333,10 @@ resolvers.luacnfstate = "unknown"
-- selfautoparent:texmf/web2c
if environment.default_texmfcnf then
+ -- unfortunately we now have quite some overkill in the spec (not so nice on a network)
resolvers.luacnfspec = environment.default_texmfcnf
else
+ -- resolvers.luacnfspec = "selfautoparent:texmf{-local,-context,}/web2c"
resolvers.luacnfspec = "{selfautoloc:,selfautodir:,selfautoparent:}{,/texmf{-local,}/web2c}"
end
@@ -12673,7 +12675,7 @@ local function load_configuration_files()
instance.loaderror = true
end
elseif trace_locating then
- report_resolving("skipping configuration file '%s' (no file)",filename)
+ report_resolving("skipping configuration file '%s' (no valid format)",filename)
end
instance.order[#instance.order+1] = instance.setups[pathname]
if instance.loaderror then
@@ -14028,13 +14030,21 @@ function resolvers.resetresolve(str)
end
local function resolve(str) -- use schemes, this one is then for the commandline only
- local res = resolved[str]
- if not res then
- res = gsub(str,"([a-z][a-z]+):([^ \"\';]*)",_resolve_) -- home:xx;selfautoparent:xx; etc
- resolved[str] = res
- abstract[res] = str
+ if type(str) == "table" then
+ local t = { }
+ for i=1,#str do
+ t[i] = resolve(str[i])
+ end
+ return t
+ else
+ local res = resolved[str]
+ if not res then
+ res = gsub(str,"([a-z][a-z]+):([^ \"\';,]*)",_resolve_) -- home:xx;selfautoparent:xx; etc (comma added)
+ resolved[str] = res
+ abstract[res] = str
+ end
+ return res
end
- return res
end
local function unresolve(str)
@@ -15223,6 +15233,7 @@ function resolvers.load_tree(tree,resolve)
-- local AUTOPARENT etc. although these are alwasy set new.
if resolve then
+ -- resolvers.luacnfspec = resolvers.joinpath(resolvers.resolve(resolvers.expandedpathfromlist(resolvers.splitpath(resolvers.luacnfspec))))
resolvers.luacnfspec = resolvers.resolve(resolvers.luacnfspec)
end
@@ -15298,7 +15309,7 @@ function resolvers.listers.variables(pattern)
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")
+ report_lists(" res: %s",tabstr(resolvers.resolve(expansions[key])) or "unset")
end
end
instance.environment = fastcopy(env)
diff --git a/Master/bin/powerpc-linux/mtxrun b/Master/bin/powerpc-linux/mtxrun
index e8f229572cc..51cbb95f269 100755
--- a/Master/bin/powerpc-linux/mtxrun
+++ b/Master/bin/powerpc-linux/mtxrun
@@ -11004,27 +11004,30 @@ local function f_second(a,b)
return concat(t,",")
end
+-- old {a,b}{c,d} => ac ad bc bd
+--
-- local function f_both(a,b)
-- local t, n = { }, 0
--- for sb in gmatch(b,"[^,]+") do -- and not sa
--- for sa in gmatch(a,"[^,]+") do -- sb
+-- for sa in gmatch(a,"[^,]+") do
+-- for sb in gmatch(b,"[^,]+") do
-- n = n + 1 ; t[n] = sa .. sb
-- end
-- end
-- return concat(t,",")
-- end
+--
+-- new {a,b}{c,d} => ac bc ad bd
local function f_both(a,b)
local t, n = { }, 0
- for sa in gmatch(a,"[^,]+") do
- for sb in gmatch(b,"[^,]+") do
+ for sb in gmatch(b,"[^,]+") do -- and not sa
+ for sa in gmatch(a,"[^,]+") do -- sb
n = n + 1 ; t[n] = sa .. sb
end
end
return concat(t,",")
end
-
local left = P("{")
local right = P("}")
local var = P((1 - S("{}" ))^0)
@@ -11039,9 +11042,6 @@ local l_rest = Cs( ( left * var * (left/"") * var * (right/"") * var * right
local stripper_1 = lpeg.stripper ("{}@")
local replacer_1 = lpeg.replacer { { ",}", ",@}" }, { "{,", "{@," }, }
--- old {a,b}{c,d} => ac ad bc bd
--- new {a,b}{c,d} => ac bc ad bd
-
local function splitpathexpr(str, newlist, validate) -- I couldn't resist lpegging it (nice exercise).
if trace_expansions then
report_expansions("expanding variable '%s'",str)
@@ -11169,7 +11169,7 @@ local stripper = Cs(
)
function resolvers.checkedvariable(str) -- assumes str is a string
- return lpegmatch(stripper,str) or str
+ return type(str) == "string" and lpegmatch(stripper,str) or str
end
-- The path splitter:
@@ -12333,8 +12333,10 @@ resolvers.luacnfstate = "unknown"
-- selfautoparent:texmf/web2c
if environment.default_texmfcnf then
+ -- unfortunately we now have quite some overkill in the spec (not so nice on a network)
resolvers.luacnfspec = environment.default_texmfcnf
else
+ -- resolvers.luacnfspec = "selfautoparent:texmf{-local,-context,}/web2c"
resolvers.luacnfspec = "{selfautoloc:,selfautodir:,selfautoparent:}{,/texmf{-local,}/web2c}"
end
@@ -12673,7 +12675,7 @@ local function load_configuration_files()
instance.loaderror = true
end
elseif trace_locating then
- report_resolving("skipping configuration file '%s' (no file)",filename)
+ report_resolving("skipping configuration file '%s' (no valid format)",filename)
end
instance.order[#instance.order+1] = instance.setups[pathname]
if instance.loaderror then
@@ -14028,13 +14030,21 @@ function resolvers.resetresolve(str)
end
local function resolve(str) -- use schemes, this one is then for the commandline only
- local res = resolved[str]
- if not res then
- res = gsub(str,"([a-z][a-z]+):([^ \"\';]*)",_resolve_) -- home:xx;selfautoparent:xx; etc
- resolved[str] = res
- abstract[res] = str
+ if type(str) == "table" then
+ local t = { }
+ for i=1,#str do
+ t[i] = resolve(str[i])
+ end
+ return t
+ else
+ local res = resolved[str]
+ if not res then
+ res = gsub(str,"([a-z][a-z]+):([^ \"\';,]*)",_resolve_) -- home:xx;selfautoparent:xx; etc (comma added)
+ resolved[str] = res
+ abstract[res] = str
+ end
+ return res
end
- return res
end
local function unresolve(str)
@@ -15223,6 +15233,7 @@ function resolvers.load_tree(tree,resolve)
-- local AUTOPARENT etc. although these are alwasy set new.
if resolve then
+ -- resolvers.luacnfspec = resolvers.joinpath(resolvers.resolve(resolvers.expandedpathfromlist(resolvers.splitpath(resolvers.luacnfspec))))
resolvers.luacnfspec = resolvers.resolve(resolvers.luacnfspec)
end
@@ -15298,7 +15309,7 @@ function resolvers.listers.variables(pattern)
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")
+ report_lists(" res: %s",tabstr(resolvers.resolve(expansions[key])) or "unset")
end
end
instance.environment = fastcopy(env)
diff --git a/Master/bin/sparc-solaris/mtxrun b/Master/bin/sparc-solaris/mtxrun
index e8f229572cc..51cbb95f269 100755
--- a/Master/bin/sparc-solaris/mtxrun
+++ b/Master/bin/sparc-solaris/mtxrun
@@ -11004,27 +11004,30 @@ local function f_second(a,b)
return concat(t,",")
end
+-- old {a,b}{c,d} => ac ad bc bd
+--
-- local function f_both(a,b)
-- local t, n = { }, 0
--- for sb in gmatch(b,"[^,]+") do -- and not sa
--- for sa in gmatch(a,"[^,]+") do -- sb
+-- for sa in gmatch(a,"[^,]+") do
+-- for sb in gmatch(b,"[^,]+") do
-- n = n + 1 ; t[n] = sa .. sb
-- end
-- end
-- return concat(t,",")
-- end
+--
+-- new {a,b}{c,d} => ac bc ad bd
local function f_both(a,b)
local t, n = { }, 0
- for sa in gmatch(a,"[^,]+") do
- for sb in gmatch(b,"[^,]+") do
+ for sb in gmatch(b,"[^,]+") do -- and not sa
+ for sa in gmatch(a,"[^,]+") do -- sb
n = n + 1 ; t[n] = sa .. sb
end
end
return concat(t,",")
end
-
local left = P("{")
local right = P("}")
local var = P((1 - S("{}" ))^0)
@@ -11039,9 +11042,6 @@ local l_rest = Cs( ( left * var * (left/"") * var * (right/"") * var * right
local stripper_1 = lpeg.stripper ("{}@")
local replacer_1 = lpeg.replacer { { ",}", ",@}" }, { "{,", "{@," }, }
--- old {a,b}{c,d} => ac ad bc bd
--- new {a,b}{c,d} => ac bc ad bd
-
local function splitpathexpr(str, newlist, validate) -- I couldn't resist lpegging it (nice exercise).
if trace_expansions then
report_expansions("expanding variable '%s'",str)
@@ -11169,7 +11169,7 @@ local stripper = Cs(
)
function resolvers.checkedvariable(str) -- assumes str is a string
- return lpegmatch(stripper,str) or str
+ return type(str) == "string" and lpegmatch(stripper,str) or str
end
-- The path splitter:
@@ -12333,8 +12333,10 @@ resolvers.luacnfstate = "unknown"
-- selfautoparent:texmf/web2c
if environment.default_texmfcnf then
+ -- unfortunately we now have quite some overkill in the spec (not so nice on a network)
resolvers.luacnfspec = environment.default_texmfcnf
else
+ -- resolvers.luacnfspec = "selfautoparent:texmf{-local,-context,}/web2c"
resolvers.luacnfspec = "{selfautoloc:,selfautodir:,selfautoparent:}{,/texmf{-local,}/web2c}"
end
@@ -12673,7 +12675,7 @@ local function load_configuration_files()
instance.loaderror = true
end
elseif trace_locating then
- report_resolving("skipping configuration file '%s' (no file)",filename)
+ report_resolving("skipping configuration file '%s' (no valid format)",filename)
end
instance.order[#instance.order+1] = instance.setups[pathname]
if instance.loaderror then
@@ -14028,13 +14030,21 @@ function resolvers.resetresolve(str)
end
local function resolve(str) -- use schemes, this one is then for the commandline only
- local res = resolved[str]
- if not res then
- res = gsub(str,"([a-z][a-z]+):([^ \"\';]*)",_resolve_) -- home:xx;selfautoparent:xx; etc
- resolved[str] = res
- abstract[res] = str
+ if type(str) == "table" then
+ local t = { }
+ for i=1,#str do
+ t[i] = resolve(str[i])
+ end
+ return t
+ else
+ local res = resolved[str]
+ if not res then
+ res = gsub(str,"([a-z][a-z]+):([^ \"\';,]*)",_resolve_) -- home:xx;selfautoparent:xx; etc (comma added)
+ resolved[str] = res
+ abstract[res] = str
+ end
+ return res
end
- return res
end
local function unresolve(str)
@@ -15223,6 +15233,7 @@ function resolvers.load_tree(tree,resolve)
-- local AUTOPARENT etc. although these are alwasy set new.
if resolve then
+ -- resolvers.luacnfspec = resolvers.joinpath(resolvers.resolve(resolvers.expandedpathfromlist(resolvers.splitpath(resolvers.luacnfspec))))
resolvers.luacnfspec = resolvers.resolve(resolvers.luacnfspec)
end
@@ -15298,7 +15309,7 @@ function resolvers.listers.variables(pattern)
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")
+ report_lists(" res: %s",tabstr(resolvers.resolve(expansions[key])) or "unset")
end
end
instance.environment = fastcopy(env)
diff --git a/Master/bin/universal-darwin/mtxrun b/Master/bin/universal-darwin/mtxrun
index e8f229572cc..51cbb95f269 100755
--- a/Master/bin/universal-darwin/mtxrun
+++ b/Master/bin/universal-darwin/mtxrun
@@ -11004,27 +11004,30 @@ local function f_second(a,b)
return concat(t,",")
end
+-- old {a,b}{c,d} => ac ad bc bd
+--
-- local function f_both(a,b)
-- local t, n = { }, 0
--- for sb in gmatch(b,"[^,]+") do -- and not sa
--- for sa in gmatch(a,"[^,]+") do -- sb
+-- for sa in gmatch(a,"[^,]+") do
+-- for sb in gmatch(b,"[^,]+") do
-- n = n + 1 ; t[n] = sa .. sb
-- end
-- end
-- return concat(t,",")
-- end
+--
+-- new {a,b}{c,d} => ac bc ad bd
local function f_both(a,b)
local t, n = { }, 0
- for sa in gmatch(a,"[^,]+") do
- for sb in gmatch(b,"[^,]+") do
+ for sb in gmatch(b,"[^,]+") do -- and not sa
+ for sa in gmatch(a,"[^,]+") do -- sb
n = n + 1 ; t[n] = sa .. sb
end
end
return concat(t,",")
end
-
local left = P("{")
local right = P("}")
local var = P((1 - S("{}" ))^0)
@@ -11039,9 +11042,6 @@ local l_rest = Cs( ( left * var * (left/"") * var * (right/"") * var * right
local stripper_1 = lpeg.stripper ("{}@")
local replacer_1 = lpeg.replacer { { ",}", ",@}" }, { "{,", "{@," }, }
--- old {a,b}{c,d} => ac ad bc bd
--- new {a,b}{c,d} => ac bc ad bd
-
local function splitpathexpr(str, newlist, validate) -- I couldn't resist lpegging it (nice exercise).
if trace_expansions then
report_expansions("expanding variable '%s'",str)
@@ -11169,7 +11169,7 @@ local stripper = Cs(
)
function resolvers.checkedvariable(str) -- assumes str is a string
- return lpegmatch(stripper,str) or str
+ return type(str) == "string" and lpegmatch(stripper,str) or str
end
-- The path splitter:
@@ -12333,8 +12333,10 @@ resolvers.luacnfstate = "unknown"
-- selfautoparent:texmf/web2c
if environment.default_texmfcnf then
+ -- unfortunately we now have quite some overkill in the spec (not so nice on a network)
resolvers.luacnfspec = environment.default_texmfcnf
else
+ -- resolvers.luacnfspec = "selfautoparent:texmf{-local,-context,}/web2c"
resolvers.luacnfspec = "{selfautoloc:,selfautodir:,selfautoparent:}{,/texmf{-local,}/web2c}"
end
@@ -12673,7 +12675,7 @@ local function load_configuration_files()
instance.loaderror = true
end
elseif trace_locating then
- report_resolving("skipping configuration file '%s' (no file)",filename)
+ report_resolving("skipping configuration file '%s' (no valid format)",filename)
end
instance.order[#instance.order+1] = instance.setups[pathname]
if instance.loaderror then
@@ -14028,13 +14030,21 @@ function resolvers.resetresolve(str)
end
local function resolve(str) -- use schemes, this one is then for the commandline only
- local res = resolved[str]
- if not res then
- res = gsub(str,"([a-z][a-z]+):([^ \"\';]*)",_resolve_) -- home:xx;selfautoparent:xx; etc
- resolved[str] = res
- abstract[res] = str
+ if type(str) == "table" then
+ local t = { }
+ for i=1,#str do
+ t[i] = resolve(str[i])
+ end
+ return t
+ else
+ local res = resolved[str]
+ if not res then
+ res = gsub(str,"([a-z][a-z]+):([^ \"\';,]*)",_resolve_) -- home:xx;selfautoparent:xx; etc (comma added)
+ resolved[str] = res
+ abstract[res] = str
+ end
+ return res
end
- return res
end
local function unresolve(str)
@@ -15223,6 +15233,7 @@ function resolvers.load_tree(tree,resolve)
-- local AUTOPARENT etc. although these are alwasy set new.
if resolve then
+ -- resolvers.luacnfspec = resolvers.joinpath(resolvers.resolve(resolvers.expandedpathfromlist(resolvers.splitpath(resolvers.luacnfspec))))
resolvers.luacnfspec = resolvers.resolve(resolvers.luacnfspec)
end
@@ -15298,7 +15309,7 @@ function resolvers.listers.variables(pattern)
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")
+ report_lists(" res: %s",tabstr(resolvers.resolve(expansions[key])) or "unset")
end
end
instance.environment = fastcopy(env)
diff --git a/Master/bin/win32/mtxrun.lua b/Master/bin/win32/mtxrun.lua
index e8f229572cc..51cbb95f269 100755
--- a/Master/bin/win32/mtxrun.lua
+++ b/Master/bin/win32/mtxrun.lua
@@ -11004,27 +11004,30 @@ local function f_second(a,b)
return concat(t,",")
end
+-- old {a,b}{c,d} => ac ad bc bd
+--
-- local function f_both(a,b)
-- local t, n = { }, 0
--- for sb in gmatch(b,"[^,]+") do -- and not sa
--- for sa in gmatch(a,"[^,]+") do -- sb
+-- for sa in gmatch(a,"[^,]+") do
+-- for sb in gmatch(b,"[^,]+") do
-- n = n + 1 ; t[n] = sa .. sb
-- end
-- end
-- return concat(t,",")
-- end
+--
+-- new {a,b}{c,d} => ac bc ad bd
local function f_both(a,b)
local t, n = { }, 0
- for sa in gmatch(a,"[^,]+") do
- for sb in gmatch(b,"[^,]+") do
+ for sb in gmatch(b,"[^,]+") do -- and not sa
+ for sa in gmatch(a,"[^,]+") do -- sb
n = n + 1 ; t[n] = sa .. sb
end
end
return concat(t,",")
end
-
local left = P("{")
local right = P("}")
local var = P((1 - S("{}" ))^0)
@@ -11039,9 +11042,6 @@ local l_rest = Cs( ( left * var * (left/"") * var * (right/"") * var * right
local stripper_1 = lpeg.stripper ("{}@")
local replacer_1 = lpeg.replacer { { ",}", ",@}" }, { "{,", "{@," }, }
--- old {a,b}{c,d} => ac ad bc bd
--- new {a,b}{c,d} => ac bc ad bd
-
local function splitpathexpr(str, newlist, validate) -- I couldn't resist lpegging it (nice exercise).
if trace_expansions then
report_expansions("expanding variable '%s'",str)
@@ -11169,7 +11169,7 @@ local stripper = Cs(
)
function resolvers.checkedvariable(str) -- assumes str is a string
- return lpegmatch(stripper,str) or str
+ return type(str) == "string" and lpegmatch(stripper,str) or str
end
-- The path splitter:
@@ -12333,8 +12333,10 @@ resolvers.luacnfstate = "unknown"
-- selfautoparent:texmf/web2c
if environment.default_texmfcnf then
+ -- unfortunately we now have quite some overkill in the spec (not so nice on a network)
resolvers.luacnfspec = environment.default_texmfcnf
else
+ -- resolvers.luacnfspec = "selfautoparent:texmf{-local,-context,}/web2c"
resolvers.luacnfspec = "{selfautoloc:,selfautodir:,selfautoparent:}{,/texmf{-local,}/web2c}"
end
@@ -12673,7 +12675,7 @@ local function load_configuration_files()
instance.loaderror = true
end
elseif trace_locating then
- report_resolving("skipping configuration file '%s' (no file)",filename)
+ report_resolving("skipping configuration file '%s' (no valid format)",filename)
end
instance.order[#instance.order+1] = instance.setups[pathname]
if instance.loaderror then
@@ -14028,13 +14030,21 @@ function resolvers.resetresolve(str)
end
local function resolve(str) -- use schemes, this one is then for the commandline only
- local res = resolved[str]
- if not res then
- res = gsub(str,"([a-z][a-z]+):([^ \"\';]*)",_resolve_) -- home:xx;selfautoparent:xx; etc
- resolved[str] = res
- abstract[res] = str
+ if type(str) == "table" then
+ local t = { }
+ for i=1,#str do
+ t[i] = resolve(str[i])
+ end
+ return t
+ else
+ local res = resolved[str]
+ if not res then
+ res = gsub(str,"([a-z][a-z]+):([^ \"\';,]*)",_resolve_) -- home:xx;selfautoparent:xx; etc (comma added)
+ resolved[str] = res
+ abstract[res] = str
+ end
+ return res
end
- return res
end
local function unresolve(str)
@@ -15223,6 +15233,7 @@ function resolvers.load_tree(tree,resolve)
-- local AUTOPARENT etc. although these are alwasy set new.
if resolve then
+ -- resolvers.luacnfspec = resolvers.joinpath(resolvers.resolve(resolvers.expandedpathfromlist(resolvers.splitpath(resolvers.luacnfspec))))
resolvers.luacnfspec = resolvers.resolve(resolvers.luacnfspec)
end
@@ -15298,7 +15309,7 @@ function resolvers.listers.variables(pattern)
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")
+ report_lists(" res: %s",tabstr(resolvers.resolve(expansions[key])) or "unset")
end
end
instance.environment = fastcopy(env)
diff --git a/Master/bin/x86_64-darwin/mtxrun b/Master/bin/x86_64-darwin/mtxrun
index e8f229572cc..51cbb95f269 100755
--- a/Master/bin/x86_64-darwin/mtxrun
+++ b/Master/bin/x86_64-darwin/mtxrun
@@ -11004,27 +11004,30 @@ local function f_second(a,b)
return concat(t,",")
end
+-- old {a,b}{c,d} => ac ad bc bd
+--
-- local function f_both(a,b)
-- local t, n = { }, 0
--- for sb in gmatch(b,"[^,]+") do -- and not sa
--- for sa in gmatch(a,"[^,]+") do -- sb
+-- for sa in gmatch(a,"[^,]+") do
+-- for sb in gmatch(b,"[^,]+") do
-- n = n + 1 ; t[n] = sa .. sb
-- end
-- end
-- return concat(t,",")
-- end
+--
+-- new {a,b}{c,d} => ac bc ad bd
local function f_both(a,b)
local t, n = { }, 0
- for sa in gmatch(a,"[^,]+") do
- for sb in gmatch(b,"[^,]+") do
+ for sb in gmatch(b,"[^,]+") do -- and not sa
+ for sa in gmatch(a,"[^,]+") do -- sb
n = n + 1 ; t[n] = sa .. sb
end
end
return concat(t,",")
end
-
local left = P("{")
local right = P("}")
local var = P((1 - S("{}" ))^0)
@@ -11039,9 +11042,6 @@ local l_rest = Cs( ( left * var * (left/"") * var * (right/"") * var * right
local stripper_1 = lpeg.stripper ("{}@")
local replacer_1 = lpeg.replacer { { ",}", ",@}" }, { "{,", "{@," }, }
--- old {a,b}{c,d} => ac ad bc bd
--- new {a,b}{c,d} => ac bc ad bd
-
local function splitpathexpr(str, newlist, validate) -- I couldn't resist lpegging it (nice exercise).
if trace_expansions then
report_expansions("expanding variable '%s'",str)
@@ -11169,7 +11169,7 @@ local stripper = Cs(
)
function resolvers.checkedvariable(str) -- assumes str is a string
- return lpegmatch(stripper,str) or str
+ return type(str) == "string" and lpegmatch(stripper,str) or str
end
-- The path splitter:
@@ -12333,8 +12333,10 @@ resolvers.luacnfstate = "unknown"
-- selfautoparent:texmf/web2c
if environment.default_texmfcnf then
+ -- unfortunately we now have quite some overkill in the spec (not so nice on a network)
resolvers.luacnfspec = environment.default_texmfcnf
else
+ -- resolvers.luacnfspec = "selfautoparent:texmf{-local,-context,}/web2c"
resolvers.luacnfspec = "{selfautoloc:,selfautodir:,selfautoparent:}{,/texmf{-local,}/web2c}"
end
@@ -12673,7 +12675,7 @@ local function load_configuration_files()
instance.loaderror = true
end
elseif trace_locating then
- report_resolving("skipping configuration file '%s' (no file)",filename)
+ report_resolving("skipping configuration file '%s' (no valid format)",filename)
end
instance.order[#instance.order+1] = instance.setups[pathname]
if instance.loaderror then
@@ -14028,13 +14030,21 @@ function resolvers.resetresolve(str)
end
local function resolve(str) -- use schemes, this one is then for the commandline only
- local res = resolved[str]
- if not res then
- res = gsub(str,"([a-z][a-z]+):([^ \"\';]*)",_resolve_) -- home:xx;selfautoparent:xx; etc
- resolved[str] = res
- abstract[res] = str
+ if type(str) == "table" then
+ local t = { }
+ for i=1,#str do
+ t[i] = resolve(str[i])
+ end
+ return t
+ else
+ local res = resolved[str]
+ if not res then
+ res = gsub(str,"([a-z][a-z]+):([^ \"\';,]*)",_resolve_) -- home:xx;selfautoparent:xx; etc (comma added)
+ resolved[str] = res
+ abstract[res] = str
+ end
+ return res
end
- return res
end
local function unresolve(str)
@@ -15223,6 +15233,7 @@ function resolvers.load_tree(tree,resolve)
-- local AUTOPARENT etc. although these are alwasy set new.
if resolve then
+ -- resolvers.luacnfspec = resolvers.joinpath(resolvers.resolve(resolvers.expandedpathfromlist(resolvers.splitpath(resolvers.luacnfspec))))
resolvers.luacnfspec = resolvers.resolve(resolvers.luacnfspec)
end
@@ -15298,7 +15309,7 @@ function resolvers.listers.variables(pattern)
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")
+ report_lists(" res: %s",tabstr(resolvers.resolve(expansions[key])) or "unset")
end
end
instance.environment = fastcopy(env)
diff --git a/Master/bin/x86_64-linux/mtxrun b/Master/bin/x86_64-linux/mtxrun
index e8f229572cc..51cbb95f269 100755
--- a/Master/bin/x86_64-linux/mtxrun
+++ b/Master/bin/x86_64-linux/mtxrun
@@ -11004,27 +11004,30 @@ local function f_second(a,b)
return concat(t,",")
end
+-- old {a,b}{c,d} => ac ad bc bd
+--
-- local function f_both(a,b)
-- local t, n = { }, 0
--- for sb in gmatch(b,"[^,]+") do -- and not sa
--- for sa in gmatch(a,"[^,]+") do -- sb
+-- for sa in gmatch(a,"[^,]+") do
+-- for sb in gmatch(b,"[^,]+") do
-- n = n + 1 ; t[n] = sa .. sb
-- end
-- end
-- return concat(t,",")
-- end
+--
+-- new {a,b}{c,d} => ac bc ad bd
local function f_both(a,b)
local t, n = { }, 0
- for sa in gmatch(a,"[^,]+") do
- for sb in gmatch(b,"[^,]+") do
+ for sb in gmatch(b,"[^,]+") do -- and not sa
+ for sa in gmatch(a,"[^,]+") do -- sb
n = n + 1 ; t[n] = sa .. sb
end
end
return concat(t,",")
end
-
local left = P("{")
local right = P("}")
local var = P((1 - S("{}" ))^0)
@@ -11039,9 +11042,6 @@ local l_rest = Cs( ( left * var * (left/"") * var * (right/"") * var * right
local stripper_1 = lpeg.stripper ("{}@")
local replacer_1 = lpeg.replacer { { ",}", ",@}" }, { "{,", "{@," }, }
--- old {a,b}{c,d} => ac ad bc bd
--- new {a,b}{c,d} => ac bc ad bd
-
local function splitpathexpr(str, newlist, validate) -- I couldn't resist lpegging it (nice exercise).
if trace_expansions then
report_expansions("expanding variable '%s'",str)
@@ -11169,7 +11169,7 @@ local stripper = Cs(
)
function resolvers.checkedvariable(str) -- assumes str is a string
- return lpegmatch(stripper,str) or str
+ return type(str) == "string" and lpegmatch(stripper,str) or str
end
-- The path splitter:
@@ -12333,8 +12333,10 @@ resolvers.luacnfstate = "unknown"
-- selfautoparent:texmf/web2c
if environment.default_texmfcnf then
+ -- unfortunately we now have quite some overkill in the spec (not so nice on a network)
resolvers.luacnfspec = environment.default_texmfcnf
else
+ -- resolvers.luacnfspec = "selfautoparent:texmf{-local,-context,}/web2c"
resolvers.luacnfspec = "{selfautoloc:,selfautodir:,selfautoparent:}{,/texmf{-local,}/web2c}"
end
@@ -12673,7 +12675,7 @@ local function load_configuration_files()
instance.loaderror = true
end
elseif trace_locating then
- report_resolving("skipping configuration file '%s' (no file)",filename)
+ report_resolving("skipping configuration file '%s' (no valid format)",filename)
end
instance.order[#instance.order+1] = instance.setups[pathname]
if instance.loaderror then
@@ -14028,13 +14030,21 @@ function resolvers.resetresolve(str)
end
local function resolve(str) -- use schemes, this one is then for the commandline only
- local res = resolved[str]
- if not res then
- res = gsub(str,"([a-z][a-z]+):([^ \"\';]*)",_resolve_) -- home:xx;selfautoparent:xx; etc
- resolved[str] = res
- abstract[res] = str
+ if type(str) == "table" then
+ local t = { }
+ for i=1,#str do
+ t[i] = resolve(str[i])
+ end
+ return t
+ else
+ local res = resolved[str]
+ if not res then
+ res = gsub(str,"([a-z][a-z]+):([^ \"\';,]*)",_resolve_) -- home:xx;selfautoparent:xx; etc (comma added)
+ resolved[str] = res
+ abstract[res] = str
+ end
+ return res
end
- return res
end
local function unresolve(str)
@@ -15223,6 +15233,7 @@ function resolvers.load_tree(tree,resolve)
-- local AUTOPARENT etc. although these are alwasy set new.
if resolve then
+ -- resolvers.luacnfspec = resolvers.joinpath(resolvers.resolve(resolvers.expandedpathfromlist(resolvers.splitpath(resolvers.luacnfspec))))
resolvers.luacnfspec = resolvers.resolve(resolvers.luacnfspec)
end
@@ -15298,7 +15309,7 @@ function resolvers.listers.variables(pattern)
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")
+ report_lists(" res: %s",tabstr(resolvers.resolve(expansions[key])) or "unset")
end
end
instance.environment = fastcopy(env)
diff --git a/Master/bin/x86_64-solaris/mtxrun b/Master/bin/x86_64-solaris/mtxrun
index e8f229572cc..51cbb95f269 100755
--- a/Master/bin/x86_64-solaris/mtxrun
+++ b/Master/bin/x86_64-solaris/mtxrun
@@ -11004,27 +11004,30 @@ local function f_second(a,b)
return concat(t,",")
end
+-- old {a,b}{c,d} => ac ad bc bd
+--
-- local function f_both(a,b)
-- local t, n = { }, 0
--- for sb in gmatch(b,"[^,]+") do -- and not sa
--- for sa in gmatch(a,"[^,]+") do -- sb
+-- for sa in gmatch(a,"[^,]+") do
+-- for sb in gmatch(b,"[^,]+") do
-- n = n + 1 ; t[n] = sa .. sb
-- end
-- end
-- return concat(t,",")
-- end
+--
+-- new {a,b}{c,d} => ac bc ad bd
local function f_both(a,b)
local t, n = { }, 0
- for sa in gmatch(a,"[^,]+") do
- for sb in gmatch(b,"[^,]+") do
+ for sb in gmatch(b,"[^,]+") do -- and not sa
+ for sa in gmatch(a,"[^,]+") do -- sb
n = n + 1 ; t[n] = sa .. sb
end
end
return concat(t,",")
end
-
local left = P("{")
local right = P("}")
local var = P((1 - S("{}" ))^0)
@@ -11039,9 +11042,6 @@ local l_rest = Cs( ( left * var * (left/"") * var * (right/"") * var * right
local stripper_1 = lpeg.stripper ("{}@")
local replacer_1 = lpeg.replacer { { ",}", ",@}" }, { "{,", "{@," }, }
--- old {a,b}{c,d} => ac ad bc bd
--- new {a,b}{c,d} => ac bc ad bd
-
local function splitpathexpr(str, newlist, validate) -- I couldn't resist lpegging it (nice exercise).
if trace_expansions then
report_expansions("expanding variable '%s'",str)
@@ -11169,7 +11169,7 @@ local stripper = Cs(
)
function resolvers.checkedvariable(str) -- assumes str is a string
- return lpegmatch(stripper,str) or str
+ return type(str) == "string" and lpegmatch(stripper,str) or str
end
-- The path splitter:
@@ -12333,8 +12333,10 @@ resolvers.luacnfstate = "unknown"
-- selfautoparent:texmf/web2c
if environment.default_texmfcnf then
+ -- unfortunately we now have quite some overkill in the spec (not so nice on a network)
resolvers.luacnfspec = environment.default_texmfcnf
else
+ -- resolvers.luacnfspec = "selfautoparent:texmf{-local,-context,}/web2c"
resolvers.luacnfspec = "{selfautoloc:,selfautodir:,selfautoparent:}{,/texmf{-local,}/web2c}"
end
@@ -12673,7 +12675,7 @@ local function load_configuration_files()
instance.loaderror = true
end
elseif trace_locating then
- report_resolving("skipping configuration file '%s' (no file)",filename)
+ report_resolving("skipping configuration file '%s' (no valid format)",filename)
end
instance.order[#instance.order+1] = instance.setups[pathname]
if instance.loaderror then
@@ -14028,13 +14030,21 @@ function resolvers.resetresolve(str)
end
local function resolve(str) -- use schemes, this one is then for the commandline only
- local res = resolved[str]
- if not res then
- res = gsub(str,"([a-z][a-z]+):([^ \"\';]*)",_resolve_) -- home:xx;selfautoparent:xx; etc
- resolved[str] = res
- abstract[res] = str
+ if type(str) == "table" then
+ local t = { }
+ for i=1,#str do
+ t[i] = resolve(str[i])
+ end
+ return t
+ else
+ local res = resolved[str]
+ if not res then
+ res = gsub(str,"([a-z][a-z]+):([^ \"\';,]*)",_resolve_) -- home:xx;selfautoparent:xx; etc (comma added)
+ resolved[str] = res
+ abstract[res] = str
+ end
+ return res
end
- return res
end
local function unresolve(str)
@@ -15223,6 +15233,7 @@ function resolvers.load_tree(tree,resolve)
-- local AUTOPARENT etc. although these are alwasy set new.
if resolve then
+ -- resolvers.luacnfspec = resolvers.joinpath(resolvers.resolve(resolvers.expandedpathfromlist(resolvers.splitpath(resolvers.luacnfspec))))
resolvers.luacnfspec = resolvers.resolve(resolvers.luacnfspec)
end
@@ -15298,7 +15309,7 @@ function resolvers.listers.variables(pattern)
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")
+ report_lists(" res: %s",tabstr(resolvers.resolve(expansions[key])) or "unset")
end
end
instance.environment = fastcopy(env)
diff --git a/Master/texmf-dist/scripts/context/lua/mtx-update.lua b/Master/texmf-dist/scripts/context/lua/mtx-update.lua
index 52c72da6d4d..037de8650ff 100644
--- a/Master/texmf-dist/scripts/context/lua/mtx-update.lua
+++ b/Master/texmf-dist/scripts/context/lua/mtx-update.lua
@@ -67,8 +67,8 @@ scripts.update.texformats = {
}
scripts.update.mpformats = {
- "metafun",
- "mpost",
+ -- "metafun",
+ -- "mpost",
}
-- experimental is not functional at the moment
diff --git a/Master/texmf-dist/scripts/context/lua/mtx-watch.lua b/Master/texmf-dist/scripts/context/lua/mtx-watch.lua
index 118d1a8154e..36a3176c41a 100644
--- a/Master/texmf-dist/scripts/context/lua/mtx-watch.lua
+++ b/Master/texmf-dist/scripts/context/lua/mtx-watch.lua
@@ -70,7 +70,6 @@ local function noset(t)
end
end
-
-- todo: split order (o-name.luj) and combine with atime to determine sort order.
local function glob(files,path) -- some day: sort by name (order prefix) and atime
@@ -89,8 +88,10 @@ local function glob(files,path) -- some day: sort by name (order prefix) and ati
glob(files,name)
end
elseif name:find(".%luj$") then
- -- files[name] = a.change or a.ctime or a.modification or a.mtime
- files[#files+1] = { dirname(name), basename(name) }
+ local bname = basename(name)
+ local dname = dirname(name)
+ local order = tonumber(bname:match("^(%d+)")) or 0
+ files[#files+1] = { dname, bname, order }
end
end
end
@@ -98,13 +99,31 @@ end
local clock = os.gettimeofday or os.time -- we cannot trust os.clock on linux
+-- local function filenamesort(a,b)
+-- local fa, da = a[1], a[2]
+-- local fb, db = b[1], b[2]
+-- if da == db then
+-- return fa < fb
+-- else
+-- return da < db
+-- end
+-- end
+
local function filenamesort(a,b)
- local fa, da = a[1], a[2]
- local fb, db = b[1], b[2]
- if da == db then
- return fa < fb
+ local fa, oa = a[2], a[3]
+ local fb, ob = b[2], b[3]
+ if fa == fb then
+ if oa == ob then
+ return a[1] < b[1] -- order file dir
+ else
+ return oa < ob -- order file
+ end
else
- return da < db
+ if oa == ob then
+ return fa < fb -- order file
+ else
+ return oa < ob -- order file
+ end
end
end
diff --git a/Master/texmf-dist/scripts/context/lua/mtxrun.lua b/Master/texmf-dist/scripts/context/lua/mtxrun.lua
index e8f229572cc..51cbb95f269 100755
--- a/Master/texmf-dist/scripts/context/lua/mtxrun.lua
+++ b/Master/texmf-dist/scripts/context/lua/mtxrun.lua
@@ -11004,27 +11004,30 @@ local function f_second(a,b)
return concat(t,",")
end
+-- old {a,b}{c,d} => ac ad bc bd
+--
-- local function f_both(a,b)
-- local t, n = { }, 0
--- for sb in gmatch(b,"[^,]+") do -- and not sa
--- for sa in gmatch(a,"[^,]+") do -- sb
+-- for sa in gmatch(a,"[^,]+") do
+-- for sb in gmatch(b,"[^,]+") do
-- n = n + 1 ; t[n] = sa .. sb
-- end
-- end
-- return concat(t,",")
-- end
+--
+-- new {a,b}{c,d} => ac bc ad bd
local function f_both(a,b)
local t, n = { }, 0
- for sa in gmatch(a,"[^,]+") do
- for sb in gmatch(b,"[^,]+") do
+ for sb in gmatch(b,"[^,]+") do -- and not sa
+ for sa in gmatch(a,"[^,]+") do -- sb
n = n + 1 ; t[n] = sa .. sb
end
end
return concat(t,",")
end
-
local left = P("{")
local right = P("}")
local var = P((1 - S("{}" ))^0)
@@ -11039,9 +11042,6 @@ local l_rest = Cs( ( left * var * (left/"") * var * (right/"") * var * right
local stripper_1 = lpeg.stripper ("{}@")
local replacer_1 = lpeg.replacer { { ",}", ",@}" }, { "{,", "{@," }, }
--- old {a,b}{c,d} => ac ad bc bd
--- new {a,b}{c,d} => ac bc ad bd
-
local function splitpathexpr(str, newlist, validate) -- I couldn't resist lpegging it (nice exercise).
if trace_expansions then
report_expansions("expanding variable '%s'",str)
@@ -11169,7 +11169,7 @@ local stripper = Cs(
)
function resolvers.checkedvariable(str) -- assumes str is a string
- return lpegmatch(stripper,str) or str
+ return type(str) == "string" and lpegmatch(stripper,str) or str
end
-- The path splitter:
@@ -12333,8 +12333,10 @@ resolvers.luacnfstate = "unknown"
-- selfautoparent:texmf/web2c
if environment.default_texmfcnf then
+ -- unfortunately we now have quite some overkill in the spec (not so nice on a network)
resolvers.luacnfspec = environment.default_texmfcnf
else
+ -- resolvers.luacnfspec = "selfautoparent:texmf{-local,-context,}/web2c"
resolvers.luacnfspec = "{selfautoloc:,selfautodir:,selfautoparent:}{,/texmf{-local,}/web2c}"
end
@@ -12673,7 +12675,7 @@ local function load_configuration_files()
instance.loaderror = true
end
elseif trace_locating then
- report_resolving("skipping configuration file '%s' (no file)",filename)
+ report_resolving("skipping configuration file '%s' (no valid format)",filename)
end
instance.order[#instance.order+1] = instance.setups[pathname]
if instance.loaderror then
@@ -14028,13 +14030,21 @@ function resolvers.resetresolve(str)
end
local function resolve(str) -- use schemes, this one is then for the commandline only
- local res = resolved[str]
- if not res then
- res = gsub(str,"([a-z][a-z]+):([^ \"\';]*)",_resolve_) -- home:xx;selfautoparent:xx; etc
- resolved[str] = res
- abstract[res] = str
+ if type(str) == "table" then
+ local t = { }
+ for i=1,#str do
+ t[i] = resolve(str[i])
+ end
+ return t
+ else
+ local res = resolved[str]
+ if not res then
+ res = gsub(str,"([a-z][a-z]+):([^ \"\';,]*)",_resolve_) -- home:xx;selfautoparent:xx; etc (comma added)
+ resolved[str] = res
+ abstract[res] = str
+ end
+ return res
end
- return res
end
local function unresolve(str)
@@ -15223,6 +15233,7 @@ function resolvers.load_tree(tree,resolve)
-- local AUTOPARENT etc. although these are alwasy set new.
if resolve then
+ -- resolvers.luacnfspec = resolvers.joinpath(resolvers.resolve(resolvers.expandedpathfromlist(resolvers.splitpath(resolvers.luacnfspec))))
resolvers.luacnfspec = resolvers.resolve(resolvers.luacnfspec)
end
@@ -15298,7 +15309,7 @@ function resolvers.listers.variables(pattern)
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")
+ report_lists(" res: %s",tabstr(resolvers.resolve(expansions[key])) or "unset")
end
end
instance.environment = fastcopy(env)
diff --git a/Master/texmf-dist/scripts/context/stubs/mswin/mtxrun.lua b/Master/texmf-dist/scripts/context/stubs/mswin/mtxrun.lua
index e8f229572cc..51cbb95f269 100644
--- a/Master/texmf-dist/scripts/context/stubs/mswin/mtxrun.lua
+++ b/Master/texmf-dist/scripts/context/stubs/mswin/mtxrun.lua
@@ -11004,27 +11004,30 @@ local function f_second(a,b)
return concat(t,",")
end
+-- old {a,b}{c,d} => ac ad bc bd
+--
-- local function f_both(a,b)
-- local t, n = { }, 0
--- for sb in gmatch(b,"[^,]+") do -- and not sa
--- for sa in gmatch(a,"[^,]+") do -- sb
+-- for sa in gmatch(a,"[^,]+") do
+-- for sb in gmatch(b,"[^,]+") do
-- n = n + 1 ; t[n] = sa .. sb
-- end
-- end
-- return concat(t,",")
-- end
+--
+-- new {a,b}{c,d} => ac bc ad bd
local function f_both(a,b)
local t, n = { }, 0
- for sa in gmatch(a,"[^,]+") do
- for sb in gmatch(b,"[^,]+") do
+ for sb in gmatch(b,"[^,]+") do -- and not sa
+ for sa in gmatch(a,"[^,]+") do -- sb
n = n + 1 ; t[n] = sa .. sb
end
end
return concat(t,",")
end
-
local left = P("{")
local right = P("}")
local var = P((1 - S("{}" ))^0)
@@ -11039,9 +11042,6 @@ local l_rest = Cs( ( left * var * (left/"") * var * (right/"") * var * right
local stripper_1 = lpeg.stripper ("{}@")
local replacer_1 = lpeg.replacer { { ",}", ",@}" }, { "{,", "{@," }, }
--- old {a,b}{c,d} => ac ad bc bd
--- new {a,b}{c,d} => ac bc ad bd
-
local function splitpathexpr(str, newlist, validate) -- I couldn't resist lpegging it (nice exercise).
if trace_expansions then
report_expansions("expanding variable '%s'",str)
@@ -11169,7 +11169,7 @@ local stripper = Cs(
)
function resolvers.checkedvariable(str) -- assumes str is a string
- return lpegmatch(stripper,str) or str
+ return type(str) == "string" and lpegmatch(stripper,str) or str
end
-- The path splitter:
@@ -12333,8 +12333,10 @@ resolvers.luacnfstate = "unknown"
-- selfautoparent:texmf/web2c
if environment.default_texmfcnf then
+ -- unfortunately we now have quite some overkill in the spec (not so nice on a network)
resolvers.luacnfspec = environment.default_texmfcnf
else
+ -- resolvers.luacnfspec = "selfautoparent:texmf{-local,-context,}/web2c"
resolvers.luacnfspec = "{selfautoloc:,selfautodir:,selfautoparent:}{,/texmf{-local,}/web2c}"
end
@@ -12673,7 +12675,7 @@ local function load_configuration_files()
instance.loaderror = true
end
elseif trace_locating then
- report_resolving("skipping configuration file '%s' (no file)",filename)
+ report_resolving("skipping configuration file '%s' (no valid format)",filename)
end
instance.order[#instance.order+1] = instance.setups[pathname]
if instance.loaderror then
@@ -14028,13 +14030,21 @@ function resolvers.resetresolve(str)
end
local function resolve(str) -- use schemes, this one is then for the commandline only
- local res = resolved[str]
- if not res then
- res = gsub(str,"([a-z][a-z]+):([^ \"\';]*)",_resolve_) -- home:xx;selfautoparent:xx; etc
- resolved[str] = res
- abstract[res] = str
+ if type(str) == "table" then
+ local t = { }
+ for i=1,#str do
+ t[i] = resolve(str[i])
+ end
+ return t
+ else
+ local res = resolved[str]
+ if not res then
+ res = gsub(str,"([a-z][a-z]+):([^ \"\';,]*)",_resolve_) -- home:xx;selfautoparent:xx; etc (comma added)
+ resolved[str] = res
+ abstract[res] = str
+ end
+ return res
end
- return res
end
local function unresolve(str)
@@ -15223,6 +15233,7 @@ function resolvers.load_tree(tree,resolve)
-- local AUTOPARENT etc. although these are alwasy set new.
if resolve then
+ -- resolvers.luacnfspec = resolvers.joinpath(resolvers.resolve(resolvers.expandedpathfromlist(resolvers.splitpath(resolvers.luacnfspec))))
resolvers.luacnfspec = resolvers.resolve(resolvers.luacnfspec)
end
@@ -15298,7 +15309,7 @@ function resolvers.listers.variables(pattern)
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")
+ report_lists(" res: %s",tabstr(resolvers.resolve(expansions[key])) or "unset")
end
end
instance.environment = fastcopy(env)
diff --git a/Master/texmf-dist/scripts/context/stubs/unix/mtxrun b/Master/texmf-dist/scripts/context/stubs/unix/mtxrun
index e8f229572cc..51cbb95f269 100755
--- a/Master/texmf-dist/scripts/context/stubs/unix/mtxrun
+++ b/Master/texmf-dist/scripts/context/stubs/unix/mtxrun
@@ -11004,27 +11004,30 @@ local function f_second(a,b)
return concat(t,",")
end
+-- old {a,b}{c,d} => ac ad bc bd
+--
-- local function f_both(a,b)
-- local t, n = { }, 0
--- for sb in gmatch(b,"[^,]+") do -- and not sa
--- for sa in gmatch(a,"[^,]+") do -- sb
+-- for sa in gmatch(a,"[^,]+") do
+-- for sb in gmatch(b,"[^,]+") do
-- n = n + 1 ; t[n] = sa .. sb
-- end
-- end
-- return concat(t,",")
-- end
+--
+-- new {a,b}{c,d} => ac bc ad bd
local function f_both(a,b)
local t, n = { }, 0
- for sa in gmatch(a,"[^,]+") do
- for sb in gmatch(b,"[^,]+") do
+ for sb in gmatch(b,"[^,]+") do -- and not sa
+ for sa in gmatch(a,"[^,]+") do -- sb
n = n + 1 ; t[n] = sa .. sb
end
end
return concat(t,",")
end
-
local left = P("{")
local right = P("}")
local var = P((1 - S("{}" ))^0)
@@ -11039,9 +11042,6 @@ local l_rest = Cs( ( left * var * (left/"") * var * (right/"") * var * right
local stripper_1 = lpeg.stripper ("{}@")
local replacer_1 = lpeg.replacer { { ",}", ",@}" }, { "{,", "{@," }, }
--- old {a,b}{c,d} => ac ad bc bd
--- new {a,b}{c,d} => ac bc ad bd
-
local function splitpathexpr(str, newlist, validate) -- I couldn't resist lpegging it (nice exercise).
if trace_expansions then
report_expansions("expanding variable '%s'",str)
@@ -11169,7 +11169,7 @@ local stripper = Cs(
)
function resolvers.checkedvariable(str) -- assumes str is a string
- return lpegmatch(stripper,str) or str
+ return type(str) == "string" and lpegmatch(stripper,str) or str
end
-- The path splitter:
@@ -12333,8 +12333,10 @@ resolvers.luacnfstate = "unknown"
-- selfautoparent:texmf/web2c
if environment.default_texmfcnf then
+ -- unfortunately we now have quite some overkill in the spec (not so nice on a network)
resolvers.luacnfspec = environment.default_texmfcnf
else
+ -- resolvers.luacnfspec = "selfautoparent:texmf{-local,-context,}/web2c"
resolvers.luacnfspec = "{selfautoloc:,selfautodir:,selfautoparent:}{,/texmf{-local,}/web2c}"
end
@@ -12673,7 +12675,7 @@ local function load_configuration_files()
instance.loaderror = true
end
elseif trace_locating then
- report_resolving("skipping configuration file '%s' (no file)",filename)
+ report_resolving("skipping configuration file '%s' (no valid format)",filename)
end
instance.order[#instance.order+1] = instance.setups[pathname]
if instance.loaderror then
@@ -14028,13 +14030,21 @@ function resolvers.resetresolve(str)
end
local function resolve(str) -- use schemes, this one is then for the commandline only
- local res = resolved[str]
- if not res then
- res = gsub(str,"([a-z][a-z]+):([^ \"\';]*)",_resolve_) -- home:xx;selfautoparent:xx; etc
- resolved[str] = res
- abstract[res] = str
+ if type(str) == "table" then
+ local t = { }
+ for i=1,#str do
+ t[i] = resolve(str[i])
+ end
+ return t
+ else
+ local res = resolved[str]
+ if not res then
+ res = gsub(str,"([a-z][a-z]+):([^ \"\';,]*)",_resolve_) -- home:xx;selfautoparent:xx; etc (comma added)
+ resolved[str] = res
+ abstract[res] = str
+ end
+ return res
end
- return res
end
local function unresolve(str)
@@ -15223,6 +15233,7 @@ function resolvers.load_tree(tree,resolve)
-- local AUTOPARENT etc. although these are alwasy set new.
if resolve then
+ -- resolvers.luacnfspec = resolvers.joinpath(resolvers.resolve(resolvers.expandedpathfromlist(resolvers.splitpath(resolvers.luacnfspec))))
resolvers.luacnfspec = resolvers.resolve(resolvers.luacnfspec)
end
@@ -15298,7 +15309,7 @@ function resolvers.listers.variables(pattern)
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")
+ report_lists(" res: %s",tabstr(resolvers.resolve(expansions[key])) or "unset")
end
end
instance.environment = fastcopy(env)
diff --git a/Master/texmf-dist/tex/context/base/bibl-tra.lua b/Master/texmf-dist/tex/context/base/bibl-tra.lua
index d6644664529..6341898eef5 100644
--- a/Master/texmf-dist/tex/context/base/bibl-tra.lua
+++ b/Master/texmf-dist/tex/context/base/bibl-tra.lua
@@ -129,37 +129,58 @@ end
function hacks.resolve(prefix,block,reference) -- maybe already feed it split
-- needs checking (the prefix in relation to components)
- local subset = references.collected[prefix or ""] or references.collected[""]
- if subset then
+ local subsets
+ local collected = references.collected
+ if prefix and prefix ~= "" then
+ subsets = { collected[prefix] or collected[""] }
+ else
+ local components = references.productdata.components
+ local subset = collected[""]
+ if subset then
+ subsets = { subset }
+ else
+ subsets = { }
+ end
+ for i=1,#components do
+ local subset = collected[components[i]]
+ if subset then
+ subsets[#subsets+1] = subset
+ end
+ end
+ end
+ if #subsets > 0 then
local result, nofresult, done = { }, 0, { }
block = tonumber(block)
- for rest in gmatch(reference,"[^, ]+") do
- local blk, tag, found = block, nil, nil
- if block then
- tag = blk .. ":" .. rest
- found = subset[tag]
- if not found then
- for i=block-1,1,-1 do
- tag = i .. ":" .. rest
- found = subset[tag]
- if found then
- blk = i
- break
+ for i=1,#subsets do
+ local subset = subsets[i]
+ for rest in gmatch(reference,"[^, ]+") do
+ local blk, tag, found = block, nil, nil
+ if block then
+ tag = blk .. ":" .. rest
+ found = subset[tag]
+ if not found then
+ for i=block-1,1,-1 do
+ tag = i .. ":" .. rest
+ found = subset[tag]
+ if found then
+ blk = i
+ break
+ end
end
end
end
- end
- if not found then
- blk = "*"
- tag = blk .. ":" .. rest
- found = subset[tag]
- end
- if found then
- local current = tonumber(found.entries and found.entries.text) -- tonumber needed
- if current and not done[current] then
- nofresult = nofresult + 1
- result[nofresult] = { blk, rest, current }
- done[current] = true
+ if not found then
+ blk = "*"
+ tag = blk .. ":" .. rest
+ found = subset[tag]
+ end
+ if found then
+ local current = tonumber(found.entries and found.entries.text) -- tonumber needed
+ if current and not done[current] then
+ nofresult = nofresult + 1
+ result[nofresult] = { blk, rest, current }
+ done[current] = true
+ end
end
end
end
diff --git a/Master/texmf-dist/tex/context/base/chem-ini.mkiv b/Master/texmf-dist/tex/context/base/chem-ini.mkiv
index c0a1d021e7c..357bceefa66 100644
--- a/Master/texmf-dist/tex/context/base/chem-ini.mkiv
+++ b/Master/texmf-dist/tex/context/base/chem-ini.mkiv
@@ -22,7 +22,8 @@
%D Quick and dirty:
%D
%D \starttyping
-%D \def\molecule#1{$\enablesupersub\tf#1$}
+%D \unexpanded\def\molecule#1%
+%D {$\enablesupersub\tf#1$}
%D \stoptyping
%D
%D Using \LUA:
@@ -35,11 +36,12 @@
%D
%D \typebuffer \getbuffer
-\def\molecule#1{\ctxcommand{molecule(\!!bs#1\!!es)}}
+\unexpanded\def\molecule#1%
+ {\ctxcommand{molecule(\!!bs#1\!!es)}}
%D For old times sake:
-\def\chem#1#2#3%
+\unexpanded\def\chem#1#2#3%
{\dontleavehmode\begingroup#1\lohi{#2}{#3}\endgroup}
\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/cont-new.mkii b/Master/texmf-dist/tex/context/base/cont-new.mkii
index 6fec69ba09d..94e836e1d9f 100644
--- a/Master/texmf-dist/tex/context/base/cont-new.mkii
+++ b/Master/texmf-dist/tex/context/base/cont-new.mkii
@@ -11,7 +11,7 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-\newcontextversion{2012.05.23 23:31}
+\newcontextversion{2012.05.24 19:36}
%D This file is loaded at runtime, thereby providing an
%D excellent place for hacks, patches, extensions and new
diff --git a/Master/texmf-dist/tex/context/base/cont-new.mkiv b/Master/texmf-dist/tex/context/base/cont-new.mkiv
index a1b22eb78cb..d134237417a 100644
--- a/Master/texmf-dist/tex/context/base/cont-new.mkiv
+++ b/Master/texmf-dist/tex/context/base/cont-new.mkiv
@@ -11,7 +11,7 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-\newcontextversion{2012.05.23 23:31}
+\newcontextversion{2012.05.24 19:36}
%D This file is loaded at runtime, thereby providing an
%D excellent place for hacks, patches, extensions and new
diff --git a/Master/texmf-dist/tex/context/base/context-version.pdf b/Master/texmf-dist/tex/context/base/context-version.pdf
index e9e731e57a3..dc456136f95 100644
--- a/Master/texmf-dist/tex/context/base/context-version.pdf
+++ b/Master/texmf-dist/tex/context/base/context-version.pdf
Binary files differ
diff --git a/Master/texmf-dist/tex/context/base/context-version.png b/Master/texmf-dist/tex/context/base/context-version.png
index 11ae2e330e0..bc31e8a30fa 100644
--- a/Master/texmf-dist/tex/context/base/context-version.png
+++ b/Master/texmf-dist/tex/context/base/context-version.png
Binary files differ
diff --git a/Master/texmf-dist/tex/context/base/context.mkii b/Master/texmf-dist/tex/context/base/context.mkii
index e38253f18fb..1e8d73c4c5e 100644
--- a/Master/texmf-dist/tex/context/base/context.mkii
+++ b/Master/texmf-dist/tex/context/base/context.mkii
@@ -20,7 +20,7 @@
%D your styles an modules.
\edef\contextformat {\jobname}
-\edef\contextversion{2012.05.23 23:31}
+\edef\contextversion{2012.05.24 19:36}
%D For those who want to use this:
diff --git a/Master/texmf-dist/tex/context/base/context.mkiv b/Master/texmf-dist/tex/context/base/context.mkiv
index 28d2507916a..98898765ff5 100644
--- a/Master/texmf-dist/tex/context/base/context.mkiv
+++ b/Master/texmf-dist/tex/context/base/context.mkiv
@@ -23,7 +23,7 @@
%D up and the dependencies are more consistent.
\edef\contextformat {\jobname}
-\edef\contextversion{2012.05.23 23:31}
+\edef\contextversion{2012.05.24 19:36}
%D For those who want to use this:
diff --git a/Master/texmf-dist/tex/context/base/data-exp.lua b/Master/texmf-dist/tex/context/base/data-exp.lua
index 1e323728c86..8040e5963e9 100644
--- a/Master/texmf-dist/tex/context/base/data-exp.lua
+++ b/Master/texmf-dist/tex/context/base/data-exp.lua
@@ -42,27 +42,30 @@ local function f_second(a,b)
return concat(t,",")
end
+-- old {a,b}{c,d} => ac ad bc bd
+--
-- local function f_both(a,b)
-- local t, n = { }, 0
--- for sb in gmatch(b,"[^,]+") do -- and not sa
--- for sa in gmatch(a,"[^,]+") do -- sb
+-- for sa in gmatch(a,"[^,]+") do
+-- for sb in gmatch(b,"[^,]+") do
-- n = n + 1 ; t[n] = sa .. sb
-- end
-- end
-- return concat(t,",")
-- end
+--
+-- new {a,b}{c,d} => ac bc ad bd
local function f_both(a,b)
local t, n = { }, 0
- for sa in gmatch(a,"[^,]+") do
- for sb in gmatch(b,"[^,]+") do
+ for sb in gmatch(b,"[^,]+") do -- and not sa
+ for sa in gmatch(a,"[^,]+") do -- sb
n = n + 1 ; t[n] = sa .. sb
end
end
return concat(t,",")
end
-
local left = P("{")
local right = P("}")
local var = P((1 - S("{}" ))^0)
@@ -77,9 +80,6 @@ local l_rest = Cs( ( left * var * (left/"") * var * (right/"") * var * right
local stripper_1 = lpeg.stripper ("{}@")
local replacer_1 = lpeg.replacer { { ",}", ",@}" }, { "{,", "{@," }, }
--- old {a,b}{c,d} => ac ad bc bd
--- new {a,b}{c,d} => ac bc ad bd
-
local function splitpathexpr(str, newlist, validate) -- I couldn't resist lpegging it (nice exercise).
if trace_expansions then
report_expansions("expanding variable '%s'",str)
@@ -207,7 +207,7 @@ local stripper = Cs(
)
function resolvers.checkedvariable(str) -- assumes str is a string
- return lpegmatch(stripper,str) or str
+ return type(str) == "string" and lpegmatch(stripper,str) or str
end
-- The path splitter:
diff --git a/Master/texmf-dist/tex/context/base/data-lst.lua b/Master/texmf-dist/tex/context/base/data-lst.lua
index b1dedfae389..c86e58fd82a 100644
--- a/Master/texmf-dist/tex/context/base/data-lst.lua
+++ b/Master/texmf-dist/tex/context/base/data-lst.lua
@@ -49,7 +49,7 @@ function resolvers.listers.variables(pattern)
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")
+ report_lists(" res: %s",tabstr(resolvers.resolve(expansions[key])) or "unset")
end
end
instance.environment = fastcopy(env)
diff --git a/Master/texmf-dist/tex/context/base/data-pre.lua b/Master/texmf-dist/tex/context/base/data-pre.lua
index 383ca291e97..5b25c5f874d 100644
--- a/Master/texmf-dist/tex/context/base/data-pre.lua
+++ b/Master/texmf-dist/tex/context/base/data-pre.lua
@@ -122,13 +122,21 @@ function resolvers.resetresolve(str)
end
local function resolve(str) -- use schemes, this one is then for the commandline only
- local res = resolved[str]
- if not res then
- res = gsub(str,"([a-z][a-z]+):([^ \"\';]*)",_resolve_) -- home:xx;selfautoparent:xx; etc
- resolved[str] = res
- abstract[res] = str
+ if type(str) == "table" then
+ local t = { }
+ for i=1,#str do
+ t[i] = resolve(str[i])
+ end
+ return t
+ else
+ local res = resolved[str]
+ if not res then
+ res = gsub(str,"([a-z][a-z]+):([^ \"\';,]*)",_resolve_) -- home:xx;selfautoparent:xx; etc (comma added)
+ resolved[str] = res
+ abstract[res] = str
+ end
+ return res
end
- return res
end
local function unresolve(str)
diff --git a/Master/texmf-dist/tex/context/base/data-res.lua b/Master/texmf-dist/tex/context/base/data-res.lua
index 335c44dc171..01b5f25254e 100644
--- a/Master/texmf-dist/tex/context/base/data-res.lua
+++ b/Master/texmf-dist/tex/context/base/data-res.lua
@@ -91,20 +91,14 @@ resolvers.luacnfstate = "unknown"
if environment.default_texmfcnf then
-- unfortunately we now have quite some overkill in the spec (not so nice on a network)
- local luacnfspec = environment.default_texmfcnf
- -- we also want to use this in the minimals / standalone
- -- bu tit's too tricky as it can be an expanded spec
- -- luacnfspec = gsub(luacnfspec,"%-local","-local,-context")
- -- and we also need to support the home dir (for taco)
- resolvers.luacnfspec = 'home:texmf/web2c;' .. luacnfspec
-elseif this_is_texlive then
- -- old, in case default_texmfcnf is not supported yet
- resolvers.luacnfspec = 'selfautodir:;selfautoparent:;{selfautodir:,selfautoparent:}{/share,}/texmf{-local,}/web2c'
+ resolvers.luacnfspec = environment.default_texmfcnf
else
- -- the best for the minimals / standalone
- resolvers.luacnfspec = 'home:texmf/web2c;selfautoparent:texmf{-local,-context,}/web2c'
+ -- resolvers.luacnfspec = "selfautoparent:texmf{-local,-context,}/web2c"
+ resolvers.luacnfspec = "{selfautoloc:,selfautodir:,selfautoparent:}{,/texmf{-local,}/web2c}"
end
+resolvers.luacnfspec = 'home:texmf/web2c;' .. resolvers.luacnfspec
+
-- which (as we want users to use the web2c path) be can be simplified to this:
--
-- if environment and environment.ownpath and string.find(environment.ownpath,"[\\/]texlive[\\/]") then
@@ -446,7 +440,7 @@ local function load_configuration_files()
instance.loaderror = true
end
elseif trace_locating then
- report_resolving("skipping configuration file '%s' (no file)",filename)
+ report_resolving("skipping configuration file '%s' (no valid format)",filename)
end
instance.order[#instance.order+1] = instance.setups[pathname]
if instance.loaderror then
diff --git a/Master/texmf-dist/tex/context/base/data-tmf.lua b/Master/texmf-dist/tex/context/base/data-tmf.lua
index 260beb9f431..75dcdd956f5 100644
--- a/Master/texmf-dist/tex/context/base/data-tmf.lua
+++ b/Master/texmf-dist/tex/context/base/data-tmf.lua
@@ -52,6 +52,7 @@ function resolvers.load_tree(tree,resolve)
-- local AUTOPARENT etc. although these are alwasy set new.
if resolve then
+ -- resolvers.luacnfspec = resolvers.joinpath(resolvers.resolve(resolvers.expandedpathfromlist(resolvers.splitpath(resolvers.luacnfspec))))
resolvers.luacnfspec = resolvers.resolve(resolvers.luacnfspec)
end
diff --git a/Master/texmf-dist/tex/context/base/font-ota.lua b/Master/texmf-dist/tex/context/base/font-ota.lua
index c4663e1f4ed..edf5996b3df 100644
--- a/Master/texmf-dist/tex/context/base/font-ota.lua
+++ b/Master/texmf-dist/tex/context/base/font-ota.lua
@@ -235,15 +235,19 @@ local isol_fina_medi_init = {
[0x076D] = true, [0x076E] = true, [0x076F] = true, [0x0770] = true,
[0x0772] = true, [0x0775] = true, [0x0776] = true, [0x0777] = true,
[0x077A] = true, [0x077B] = true, [0x077C] = true, [0x077D] = true,
- [0x077E] = true, [0x077F] = true, [zwj] = true,
+ [0x077E] = true, [0x077F] = true,
-- syriac
[0x0712] = true, [0x0713] = true, [0x0714] = true, [0x071A] = true,
[0x071B] = true, [0x071C] = true, [0x071D] = true, [0x071F] = true,
[0x0720] = true, [0x0721] = true, [0x0722] = true, [0x0723] = true,
- [0x0725] = true, [0x0726] = true, [0x0727] = true, [0x0729] = true,
- [0x072B] = true, [0x0724] = true, [0x0706] = true, [0x0707] = true,
+ [0x0724] = true, [0x0725] = true, [0x0726] = true, [0x0727] = true,
+ [0x0729] = true, [0x072B] = true,
+
+ -- also
+
+ [zwj] = true,
}
local arab_warned = { }
diff --git a/Master/texmf-dist/tex/context/base/font-otn.lua b/Master/texmf-dist/tex/context/base/font-otn.lua
index 7a5708583d0..d97ef7363b7 100644
--- a/Master/texmf-dist/tex/context/base/font-otn.lua
+++ b/Master/texmf-dist/tex/context/base/font-otn.lua
@@ -1167,7 +1167,11 @@ function chainprocs.gsub_ligature(start,stop,kind,chainname,currentcontext,looku
logwarning("%s: no ligatures starting with %s",cref(kind,chainname,chainlookupname,lookupname,chainindex),gref(startchar))
end
else
- local s, discfound, last, nofreplacements = start.next, false, stop, 0
+ local s = start.next
+ local discfound = false
+ local last = stop
+ local nofreplacements = 0
+ local skipmark = currentlookup.flags[1]
while s do
local id = s.id
if id == disc_code then
@@ -1175,7 +1179,7 @@ function chainprocs.gsub_ligature(start,stop,kind,chainname,currentcontext,looku
discfound = true
else
local schar = s.char
- if marks[schar] then -- marks
+ if skipmark and marks[schar] then -- marks
s = s.next
else
local lg = ligatures[schar]
diff --git a/Master/texmf-dist/tex/context/base/lpdf-ano.lua b/Master/texmf-dist/tex/context/base/lpdf-ano.lua
index 4d0a55f806b..154296e9be2 100644
--- a/Master/texmf-dist/tex/context/base/lpdf-ano.lua
+++ b/Master/texmf-dist/tex/context/base/lpdf-ano.lua
@@ -317,11 +317,16 @@ end node.free(lln)
-- -- -- --
-- -- -- --
+local done = { } -- prevent messages
+
function nodeinjections.destination(width,height,depth,name,view)
- if trace_destinations then
- report_destination("w=%s, h=%s, d=%s, n=%s, v=%s",width,height,depth,name,view or "no view")
+ if not done[name] then
+ done[name] = true
+ if trace_destinations then
+ 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
- return pdfdestination_node(width,height,depth,name,view)
end
-- runners and specials
@@ -341,7 +346,12 @@ runners["inner"] = function(var,actions)
else
var.inner = nil
end
- return link(nil,nil,var.inner,var.r,actions)
+ local prefix = var.p
+ local inner = var.inner
+ if inner and prefix and prefix ~= "" then
+ inner = prefix .. ":" .. inner -- might not always be ok
+ end
+ return link(nil,nil,inner,var.r,actions)
end
runners["inner with arguments"] = function(var,actions)
diff --git a/Master/texmf-dist/tex/context/base/s-inf-04.mkiv b/Master/texmf-dist/tex/context/base/s-inf-04.mkiv
new file mode 100644
index 00000000000..862bed72f29
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/s-inf-04.mkiv
@@ -0,0 +1,48 @@
+\usemodule[art-01]
+
+\setupbodyfont[10pt]
+
+\starttext
+
+ \startluacode
+
+ context.subject("Configuration files")
+
+ local configurations = resolvers.instance.specification
+
+ context.starttabulate { "|Tl|Tl|" }
+ for i=1,#configurations do
+ context.NC()
+ context(i)
+ context.NC()
+ context.verbatim(resolvers.resolve(configurations[i]))
+ context.NC()
+ context.NR()
+ end
+ context.stoptabulate()
+
+ local list = resolvers.expandedpathfromlist(resolvers.splitpath(resolvers.luacnfspec))
+
+ context.subject("Configuration paths")
+
+ -- context.verbatim(resolvers.luacnfspec)
+
+ context.starttabulate { "|Tl|Tl|" }
+ for i=1,#list do
+ local li = resolvers.resolve(list[i])
+ context.NC()
+ if lfs.isdir(li) then
+ context("-")
+ else
+ context("+")
+ end
+ context.NC()
+ context.verbatim(li)
+ context.NC()
+ context.NR()
+ end
+ context.stoptabulate()
+
+ \stopluacode
+
+\stoptext
diff --git a/Master/texmf-dist/tex/context/base/status-files.pdf b/Master/texmf-dist/tex/context/base/status-files.pdf
index 2fbed7a151f..a1fb1c9c8c6 100644
--- a/Master/texmf-dist/tex/context/base/status-files.pdf
+++ b/Master/texmf-dist/tex/context/base/status-files.pdf
Binary files differ
diff --git a/Master/texmf-dist/tex/context/base/status-lua.pdf b/Master/texmf-dist/tex/context/base/status-lua.pdf
index 3eee265ed68..dcdf423f294 100644
--- a/Master/texmf-dist/tex/context/base/status-lua.pdf
+++ b/Master/texmf-dist/tex/context/base/status-lua.pdf
Binary files differ
diff --git a/Master/texmf-dist/tex/context/base/status-mkiv.lua b/Master/texmf-dist/tex/context/base/status-mkiv.lua
index 5c54b079f19..a94080378a3 100644
--- a/Master/texmf-dist/tex/context/base/status-mkiv.lua
+++ b/Master/texmf-dist/tex/context/base/status-mkiv.lua
@@ -1318,7 +1318,7 @@ return {
{
filename = "chem-ini",
marktype = "mkiv",
- status = "unknown",
+ status = "okay",
},
{
filename = "chem-str",
diff --git a/Master/texmf-dist/tex/context/base/strc-con.mkvi b/Master/texmf-dist/tex/context/base/strc-con.mkvi
index 220de809a3b..956acaae506 100644
--- a/Master/texmf-dist/tex/context/base/strc-con.mkvi
+++ b/Master/texmf-dist/tex/context/base/strc-con.mkvi
@@ -400,6 +400,7 @@
\fi
\advance\ifx#1\v!flushleft\rightskip\else\leftskip\fi\constructionsheaddistance % only difference and wrong anyway
\ifhbox\constructionheadbox\unhcopy\else\copy\fi\constructionheadbox}%
+\setbox\constructionheadbox\hbox{\box\constructionheadbox}% needed in case of e.g. a real big head font, see descriptions-006.tex
\ht\constructionheadbox\strutht
\dp\constructionheadbox\strutdp}
@@ -415,6 +416,7 @@
\setupalign[\p_headalign]% use fast one
\fi
\ifhbox\constructionheadbox\unhcopy\else\copy\fi\constructionheadbox}%
+\setbox\constructionheadbox\hbox{\box\constructionheadbox}% needed in case of e.g. a real big head font, see descriptions-006.tex
\ht\constructionheadbox\strutht
\dp\constructionheadbox\strutdp}
diff --git a/Master/texmf-dist/tex/context/base/strc-ini.lua b/Master/texmf-dist/tex/context/base/strc-ini.lua
index c246ccd2762..78efcad815a 100644
--- a/Master/texmf-dist/tex/context/base/strc-ini.lua
+++ b/Master/texmf-dist/tex/context/base/strc-ini.lua
@@ -287,11 +287,9 @@ local splitter = lpeg.splitat("::")
function sets.get(namespace,block,name,level,default) -- check if name is passed
--fixed::R:a: ...
local kind, rest = lpegmatch(splitter,name)
- if kind and rest then
- if kind == "fixed" then
- local s = settings_to_array(rest)
- return s[level] or default
- end
+ if rest and kind == "fixed" then -- fixed::n,a,i
+ local s = settings_to_array(rest)
+ return s[level] or s[#s] or default
end
--
local ds = setlist[namespace]
diff --git a/Master/texmf-dist/tex/context/base/strc-ref.lua b/Master/texmf-dist/tex/context/base/strc-ref.lua
index 8a478a4e6e7..092babfaed6 100644
--- a/Master/texmf-dist/tex/context/base/strc-ref.lua
+++ b/Master/texmf-dist/tex/context/base/strc-ref.lua
@@ -261,17 +261,28 @@ references.setcomponent = setcomponent
function references.set(kind,prefix,tag,data)
-- setcomponent(data)
- local pd = tobesaved[prefix]
+ local pd = tobesaved[prefix] -- nicer is a metatable
if not pd then
pd = { }
tobesaved[prefix] = pd
end
+ local n = 0
for ref in gmatch(tag,"[^,]+") do
if ref ~= "" then
- pd[ref] = data
- context.dofinishsomereference(kind,prefix,ref)
+ if pd[ref] then
+ if prefix and prefix ~= "" then
+ report_references("redundant reference: %q in namespace %q",ref,prefix)
+ else
+ report_references("redundant reference %q",ref)
+ end
+ else
+ n = n + 1
+ pd[ref] = data
+ context.dofinishsomereference(kind,prefix,ref)
+ end
end
end
+ return n > 0
end
function references.enhance(prefix,tag)
@@ -348,14 +359,22 @@ local function register_from_lists(collected,derived,pages,sections)
if reference ~= "" then
local kind, realpage = m.kind, r.realpage
if kind and realpage then
- local d = derived[prefix] if not d then d = { } derived[prefix] = d end
-local c = derived[component] if not c then c = { } derived[component] = c end
+ local d = derived[prefix]
+ if not d then
+ d = { }
+ derived[prefix] = d
+ end
+ local c = derived[component]
+ if not c then
+ c = { }
+ derived[component] = c
+ end
local t = { kind, i, entry }
for s in gmatch(reference,"%s*([^,]+)") do
if trace_referencing then
report_references("list entry %s provides %s reference '%s' on realpage %s",i,kind,s,realpage)
end
-c[s] = c[s] or t -- share them
+ c[s] = c[s] or t -- share them
d[s] = d[s] or t -- share them
g[s] = g[s] or t -- first wins
end
@@ -768,12 +787,14 @@ table.setmetatableindex(externals,function(t,k) -- either or not automatically
return false
end)
-local productdata = {
+local productdata = allocate {
productreferences = { },
componentreferences = { },
components = { },
}
+references.productdata = productdata
+
local function loadproductreferences(productname,componentname,utilitydata)
local struc = utilitydata.structures
if struc then
@@ -923,6 +944,11 @@ local function loadproductcomponents(product,component,utilitydata)
productdata.components = componentlist(job and job.structure and job.structure.collected) or { }
end
+references.registerinitializer(function(tobesaved,collected)
+ -- not that much related to tobesaved or collected
+ productdata.components = componentlist(job.structure.collected) or { }
+end)
+
function structures.references.loadpresets(product,component) -- we can consider a special components hash
if product and component and product~= "" and component ~= "" and not productdata.product then -- maybe: productdata.filename ~= filename
productdata.product = product
@@ -1294,6 +1320,7 @@ local function identify_inner_or_outer(set,var,i)
end
local components = job.structure.components
+
if components then
for i=1,#components do
local component = components[i]
@@ -1585,8 +1612,11 @@ function references.setinternalreference(prefix,tag,internal,view) -- needs chec
end
function references.setandgetattribute(kind,prefix,tag,data,view) -- maybe do internal automatically here
- references.set(kind,prefix,tag,data)
- texcount.lastdestinationattribute = references.setinternalreference(prefix,tag,nil,view) or -0x7FFFFFFF
+ if references.set(kind,prefix,tag,data) then
+ texcount.lastdestinationattribute = references.setinternalreference(prefix,tag,nil,view) or unsetvalue
+ else
+ texcount.lastdestinationattribute = unsetvalue
+ end
end
function references.getinternalreference(n) -- n points into list (todo: registers)
diff --git a/Master/texmf-dist/tex/context/base/strc-ref.mkvi b/Master/texmf-dist/tex/context/base/strc-ref.mkvi
index 161502c9bf5..ee45d76fafe 100644
--- a/Master/texmf-dist/tex/context/base/strc-ref.mkvi
+++ b/Master/texmf-dist/tex/context/base/strc-ref.mkvi
@@ -685,7 +685,7 @@
\ifx\@@rfprefix\empty
\let\referenceprefix\empty
\else\ifx\@@rfprefix\incrementreferenceprefix
- \advance\prefixcounter \plusone % should be global
+ \global\advance\prefixcounter \plusone
\edef\referenceprefix{\the\prefixcounter}%
\let\@@rfprefix\s!unknown
\else\ifx\@@rfprefix\decrementreferenceprefix
diff --git a/Master/texmf-dist/tex/generic/context/luatex/luatex-fonts-merged.lua b/Master/texmf-dist/tex/generic/context/luatex/luatex-fonts-merged.lua
index b47e3299fa7..32f7365f0f7 100644
--- a/Master/texmf-dist/tex/generic/context/luatex/luatex-fonts-merged.lua
+++ b/Master/texmf-dist/tex/generic/context/luatex/luatex-fonts-merged.lua
@@ -1,6 +1,6 @@
-- merged file : luatex-fonts-merged.lua
-- parent file : luatex-fonts.lua
--- merge date : 05/23/12 23:31:34
+-- merge date : 05/24/12 19:36:52
do -- begin closure to overcome local limits and interference
@@ -9741,7 +9741,11 @@ function chainprocs.gsub_ligature(start,stop,kind,chainname,currentcontext,looku
logwarning("%s: no ligatures starting with %s",cref(kind,chainname,chainlookupname,lookupname,chainindex),gref(startchar))
end
else
- local s, discfound, last, nofreplacements = start.next, false, stop, 0
+ local s = start.next
+ local discfound = false
+ local last = stop
+ local nofreplacements = 0
+ local skipmark = currentlookup.flags[1]
while s do
local id = s.id
if id == disc_code then
@@ -9749,7 +9753,7 @@ function chainprocs.gsub_ligature(start,stop,kind,chainname,currentcontext,looku
discfound = true
else
local schar = s.char
- if marks[schar] then -- marks
+ if skipmark and marks[schar] then -- marks
s = s.next
else
local lg = ligatures[schar]
@@ -11983,15 +11987,19 @@ local isol_fina_medi_init = {
[0x076D] = true, [0x076E] = true, [0x076F] = true, [0x0770] = true,
[0x0772] = true, [0x0775] = true, [0x0776] = true, [0x0777] = true,
[0x077A] = true, [0x077B] = true, [0x077C] = true, [0x077D] = true,
- [0x077E] = true, [0x077F] = true, [zwj] = true,
+ [0x077E] = true, [0x077F] = true,
-- syriac
[0x0712] = true, [0x0713] = true, [0x0714] = true, [0x071A] = true,
[0x071B] = true, [0x071C] = true, [0x071D] = true, [0x071F] = true,
[0x0720] = true, [0x0721] = true, [0x0722] = true, [0x0723] = true,
- [0x0725] = true, [0x0726] = true, [0x0727] = true, [0x0729] = true,
- [0x072B] = true, [0x0724] = true, [0x0706] = true, [0x0707] = true,
+ [0x0724] = true, [0x0725] = true, [0x0726] = true, [0x0727] = true,
+ [0x0729] = true, [0x072B] = true,
+
+ -- also
+
+ [zwj] = true,
}
local arab_warned = { }