summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2007-08-08 14:35:00 +0200
committerHans Hagen <pragma@wxs.nl>2007-08-08 14:35:00 +0200
commitc8af1ed872c4bfaf97e229a8faf3b0a4b603d32c (patch)
treebaf07b91089069755a878960fd04a354d1e55cf2
parentaacdde41ef02392949aee16b2e428a8913d27efe (diff)
downloadcontext-c8af1ed872c4bfaf97e229a8faf3b0a4b603d32c.tar.gz
stable 2007.08.08 14:35
-rw-r--r--scripts/context/lua/luatools.lua104
-rw-r--r--scripts/context/lua/mtx-context.lua223
-rw-r--r--scripts/context/lua/mtx-fonts.lua10
-rw-r--r--scripts/context/lua/mtxrun.lua103
-rw-r--r--scripts/context/ruby/ctxtools.rb15
-rw-r--r--tex/context/base/cont-new.mkiv6
-rw-r--r--tex/context/base/cont-new.tex6
-rw-r--r--tex/context/base/context.tex2
-rw-r--r--tex/context/base/core-obj.mkii2
-rw-r--r--tex/context/base/core-obj.tex4
-rw-r--r--tex/context/base/font-afm.lua3
-rw-r--r--tex/context/base/font-def.lua37
-rw-r--r--tex/context/base/font-otf.lua2
-rw-r--r--tex/context/base/font-tfm.lua26
-rw-r--r--tex/context/base/l-file.lua33
-rw-r--r--tex/context/base/l-utils.lua9
-rw-r--r--tex/context/base/luat-inp.lua50
-rw-r--r--tex/context/base/luat-tmp.lua9
-rw-r--r--tex/context/base/type-otf.tex166
-rw-r--r--tex/context/interface/keys-cz.xml2
-rw-r--r--tex/context/interface/keys-de.xml2
-rw-r--r--tex/context/interface/keys-en.xml2
-rw-r--r--tex/context/interface/keys-fr.xml2
-rw-r--r--tex/context/interface/keys-it.xml2
-rw-r--r--tex/context/interface/keys-nl.xml2
-rw-r--r--tex/context/interface/keys-ro.xml2
-rw-r--r--tex/context/sample/ward.tex2
-rw-r--r--web2c/context.cnf4
28 files changed, 635 insertions, 195 deletions
diff --git a/scripts/context/lua/luatools.lua b/scripts/context/lua/luatools.lua
index 0eb63c873..e46337223 100644
--- a/scripts/context/lua/luatools.lua
+++ b/scripts/context/lua/luatools.lua
@@ -1105,8 +1105,12 @@ function file.extname(name)
return name:match("^.+%.(.-)$") or ""
end
-function file.join(...) -- args
- return (string.gsub(table.concat({...},"/"),"\\","/"))
+function file.join(...)
+ local t = { ... }
+ for i=1,#t do
+ t[i] = (t[i]:gsub("\\","/")):gsub("/+$","")
+ end
+ return table.concat(t,"/")
end
function file.is_writable(name)
@@ -1129,16 +1133,31 @@ function file.is_readable(name)
end
end
+--~ function file.split_path(str)
+--~ if str:find(';') then
+--~ return str:splitchr(";")
+--~ else
+--~ return str:splitchr(io.pathseparator)
+--~ end
+--~ end
+
+-- todo: lpeg
+
function file.split_path(str)
- if str:find(';') then
- return str:splitchr(";")
- else
- return str:splitchr(io.pathseparator)
+ local t = { }
+ str = str:gsub("\\", "/")
+ str = str:gsub("(%a):([;/])", "%1\001%2")
+ for name in str:gmatch("([^;:]+)") do
+ if name ~= "" then
+ name = name:gsub("\001",":")
+ t[#t+1] = name
+ end
end
+ return t
end
function file.join_path(tab)
- return table.concat(tab,io.pathseparator)
+ return table.concat(tab,io.pathseparator) -- can have trailing //
end
--~ print('test' .. " == " .. file.collapse_path("test"))
@@ -1577,7 +1596,14 @@ end
function utils.lua.compile(luafile, lucfile)
-- utils.report("compiling",luafile,"into",lucfile)
os.remove(lucfile)
- return (os.execute("luac -s -o " .. string.quote(lucfile) .. " " .. string.quote(luafile)) == 0)
+ local command = "-s -o " .. string.quote(lucfile) .. " " .. string.quote(luafile)
+ if os.execute("texluac " .. command) == 0 then
+ return true
+ elseif os.execute("luac " .. command) == 0 then
+ return true
+ else
+ return false
+ end
end
@@ -1744,7 +1770,9 @@ end
-- (any case), rest paths (so no need for optimization). Or maybe a
-- separate table that matches lowercase names to mixed case when
-- present. In that case the lower() cases can go away. I will do that
--- only when we run into problems with names.
+-- only when we run into problems with names ... well ... Iwona-Regular.
+
+-- Beware, loading and saving is overloaded in luat-tmp!
if not versions then versions = { } end versions['luat-inp'] = 1.001
if not environment then environment = { } end
@@ -1808,12 +1836,14 @@ input.suffixes['lua'] = { 'lua', 'luc', 'tma', 'tmc' }
-- here we catch a few new thingies
function input.checkconfigdata(instance)
- if input.env(instance,"LUAINPUTS") == "" then
- instance.environment["LUAINPUTS"] = ".;$TEXINPUTS;$TEXMFSCRIPTS"
- end
- if input.env(instance,"FONTFEATURES") == "" then
- instance.environment["FONTFEATURES"] = ".;$OPENTYPEFONTS;$TTFONTS;$T1FONTS;$AFMFONTS"
+ function fix(varname,default)
+ local proname = varname .. "." .. instance.progname or "crap"
+ if not instance.environment[proname] and not instance.variables[proname] == "" and not instance.environment[varname] and not instance.variables[varname] == "" then
+ instance.variables[varname] = default
+ end
end
+ fix("LUAINPUTS" , ".;$TEXINPUTS;$TEXMFSCRIPTS")
+ fix("FONTFEATURES", ".;$OPENTYPEFONTS;$TTFONTS;$T1FONTS;$AFMFONTS")
end
-- backward compatible ones
@@ -1849,6 +1879,7 @@ function input.reset()
instance.variables = { }
instance.expansions = { }
instance.files = { }
+ instance.remap = { }
instance.configuration = { }
instance.found = { }
instance.foundintrees = { }
@@ -1969,7 +2000,7 @@ function input.reportlines(str)
for _,v in pairs(str) do input.report(v) end
end
-input.settrace(os.getenv("MTX.INPUT.TRACE") or os.getenv("MTX_INPUT_TRACE") or input.trace or 0)
+input.settrace(tonumber(os.getenv("MTX.INPUT.TRACE") or os.getenv("MTX_INPUT_TRACE") or input.trace or 0))
-- These functions can be used to test the performance, especially
-- loading the database files.
@@ -2350,6 +2381,10 @@ function input.generators.tex(instance,specification)
end
else
files[name] = path
+ local lower = name:lower()
+ if name ~= lower then
+ files["remap:"..lower] = name
+ end
end
end
end
@@ -2380,6 +2415,10 @@ function input.generators.tex(instance,specification)
end
else
files[line] = path -- string
+ local lower = line:lower()
+ if line ~= lower then
+ files["remap:"..lower] = line
+ end
end
else
path = line:match("%.%/(.-)%:$") or path -- match could be nil due to empty line
@@ -2840,8 +2879,8 @@ function input.aux.expanded_path(instance,pathlist)
local pre, mid, post = v:match(pattern)
if pre and mid and post then
more = true
- -- for _,vv in ipairs(mid:splitchr(',')) do
- for vv in string.gmatch(mid..',',"(.-),") do
+--~ for vv in string.gmatch(mid..',',"(.-),") do
+ for vv in string.gmatch(mid,"([^,]+)") do
if vv == '.' then
t[#t+1] = pre..post
else
@@ -2915,11 +2954,20 @@ function input.aux.collect_files(instance,names)
end
for _, hash in pairs(instance.hashes) do
local blobpath = hash.tag
- if blobpath and instance.files[blobpath] then
+ local files = blobpath and instance.files[blobpath]
+ if files then
if input.trace > 2 then
input.logger('? blobpath do',blobpath .. " (" .. bname ..")")
end
- local blobfile = instance.files[blobpath][bname]
+ local blobfile = files[bname]
+ if not blobfile then
+ local rname = "remap:"..bname
+ blobfile = files[rname]
+ if blobfile then
+ bname = files[rname]
+ blobfile = files[bname]
+ end
+ end
if blobfile then
if type(blobfile) == 'string' then
if not dname or blobfile:find(dname) then
@@ -3547,14 +3595,16 @@ end
-- beware: i need to check where we still need a / on windows:
function input.clean_path(str)
- -- return string.gsub(string.gsub(string.gsub(str,"\\","/"),"^!+",""),"//$","/")
- return (string.gsub(string.gsub(str,"\\","/"),"^!+",""))
+--~ return (((str:gsub("\\","/")):gsub("^!+","")):gsub("//+","//"))
+ return ((str:gsub("\\","/")):gsub("^!+",""))
end
+
function input.do_with_path(name,func)
for _, v in pairs(input.expanded_path_list(instance,name)) do
func("^"..input.clean_path(v))
end
end
+
function input.do_with_var(name,func)
func(input.aux.expanded_var(name))
end
@@ -3623,16 +3673,16 @@ cache = cache or { }
dir = dir or { }
texmf = texmf or { }
-cache.path = nil
+cache.path = cache.path or nil
cache.base = cache.base or "luatex-cache"
cache.more = cache.more or "context"
cache.direct = false -- true is faster but may need huge amounts of memory
cache.trace = false
cache.tree = false
-cache.temp = os.getenv("TEXMFCACHE") or os.getenv("HOME") or os.getenv("HOMEPATH") or os.getenv("VARTEXMF") or os.getenv("TEXMFVAR") or os.getenv("TMP") or os.getenv("TEMP") or os.getenv("TMPDIR") or nil
-cache.paths = { cache.temp }
+cache.temp = cache.temp or os.getenv("TEXMFCACHE") or os.getenv("HOME") or os.getenv("HOMEPATH") or os.getenv("VARTEXMF") or os.getenv("TEXMFVAR") or os.getenv("TMP") or os.getenv("TEMP") or os.getenv("TMPDIR") or nil
+cache.paths = cache.paths or { cache.temp }
-if not cache.temp then
+if not cache.temp or cache.temp == "" then
print("\nFATAL ERROR: NO VALID TEMPORARY PATH\n")
os.exit()
end
@@ -3666,6 +3716,7 @@ function cache.setpath(instance,...)
if not cache.path then
cache.path = cache.temp
end
+ cache.path = input.clean_path(cache.path) -- to be sure
if lfs then
cache.tree = cache.tree or cache.treehash(instance)
if cache.tree then
@@ -5021,6 +5072,7 @@ function input.my_make_format(instance,texname)
end
function input.my_run_format(instance,name,data)
+ -- hm, rather old code here; we can now use the file.whatever functions
if name and (name ~= "") then
local barename = name:gsub("%.%a+$","")
local fmtname = ""
@@ -5032,7 +5084,7 @@ function input.my_run_format(instance,name,data)
fmtname = input.find_files(instance,barename..".fmt")[1] or ""
end
fmtname = input.clean_path(fmtname)
- local barename = fmtname:gsub("%.%a+$","")
+ barename = fmtname:gsub("%.%a+$","")
if fmtname == "" then
input.report("no format with name",name)
else
diff --git a/scripts/context/lua/mtx-context.lua b/scripts/context/lua/mtx-context.lua
new file mode 100644
index 000000000..864fd2267
--- /dev/null
+++ b/scripts/context/lua/mtx-context.lua
@@ -0,0 +1,223 @@
+dofile(input.find_file(instance,"luat-log.lua"))
+
+texmf.instance = instance -- we need to get rid of this / maybe current instance in global table
+
+scripts = scripts or { }
+scripts.context = scripts.context or { }
+
+function io.copydata(fromfile,tofile)
+ io.savedata(tofile,io.loaddata(fromfile) or "")
+end
+
+function input.locate_format(name) -- move this to core / luat-xxx
+ local barename, fmtname = name:gsub("%.%a+$",""), ""
+ if input.usecache then
+ local path = file.join(cache.setpath(instance,"formats")) -- maybe platform
+ fmtname = file.join(path,barename..".fmt") or ""
+ end
+ if fmtname == "" then
+ fmtname = input.find_files(instance,barename..".fmt")[1] or ""
+ end
+ fmtname = input.clean_path(fmtname)
+ if fmtname ~= "" then
+ barename = fmtname:gsub("%.%a+$","")
+ local luaname, lucname = barename .. ".lua", barename .. ".luc"
+ if io.exists(lucname) then
+ return barename, luaname
+ elseif io.exists(luaname) then
+ return barename, luaname
+ end
+ end
+ return nil, nil
+end
+
+scripts.context.multipass = {
+ suffixes = { ".tuo", ".tuc" },
+ nofruns = 8,
+}
+
+function scripts.context.multipass.hashfiles(jobname)
+ local hash = { }
+ for _, suffix in ipairs(scripts.context.multipass.suffixes) do
+ local full = jobname .. suffix
+ hash[full] = md5.hex(io.loaddata(full) or "unknown")
+ end
+ return hash
+end
+
+function scripts.context.multipass.changed(oldhash, newhash)
+ for k,v in pairs(oldhash) do
+ if v ~= newhash[k] then
+ return true
+ end
+ end
+ return false
+end
+
+scripts.context.backends = {
+ pdftex = 'pdftex',
+ luatex = 'pdftex',
+ pdf = 'pdftex',
+ dvi = 'dvipdfmx',
+ dvips = 'dvips'
+}
+
+function scripts.context.multipass.makeoptionfile(jobname)
+ local f = io.open(jobname..".top","w")
+ if f then
+ local finalrun, kindofrun, currentrun = false, 0, 0
+ local function setvalue(flag,format,hash,default)
+ local a = environment.argument(flag)
+ a = a or default
+ if a and a ~= "" then
+ if hash then
+ if hash[a] then
+ f:write(format:format(a),"\n")
+ end
+ else
+ f:write(format:format(a),"\n")
+ end
+ end
+ end
+ local function setvalues(flag,format)
+ local a = environment.argument(flag)
+ if a and a ~= "" then
+ for _, v in a:gmatch("([^,]+)") do
+ f:write(format:format(v),"\n")
+ end
+ end
+ end
+ local function setfixed(flag,format,...)
+ if environment.argument(flag) then
+ f:write(format:format(...),"\n")
+ end
+ end
+ local function setalways(format,...)
+ f:write(format:format(...),"\n")
+ end
+ setalways("\\unprotect")
+ setvalue('output' , "\\setupoutput[%s]", scripts.context.backends, 'pdftex')
+ setalways( "\\setupsystem[\\c!n=%s,\\c!m=%s]", kindofrun, currentrun)
+ setalways( "\\setupsystem[\\c!type=%s]",os.platform)
+ setfixed ("batchmode" , "\\batchmode")
+ setfixed ("nonstopmode", "\\nonstopmode")
+ setfixed ("paranoid" , "\\def\\maxreadlevel{1}")
+ setvalue ("modefile" , "\\readlocfile{%s}{}{}")
+ setvalue ("result" , "\\setupsystem[file=%s]")
+ setvalue("path" , "\\usepath[%s]")
+ setfixed("color" , "\\setupcolors[\\c!state=\\v!start]")
+ setfixed("nompmode" , "\\runMPgraphicsfalse") -- obsolete, we assume runtime mp graphics
+ setfixed("nomprun" , "\\runMPgraphicsfalse") -- obsolete, we assume runtime mp graphics
+ setfixed("automprun" , "\\runMPgraphicsfalse") -- obsolete, we assume runtime mp graphics
+ setfixed("fast" , "\\fastmode\n")
+ setfixed("silentmode" , "\\silentmode\n")
+ setvalue("separation" , "\\setupcolors[\\c!split=%s]")
+ setvalue("setuppath" , "\\setupsystem[\\c!directory={%s}]")
+ setfixed("noarrange" , "\\setuparranging[\\v!disable]")
+ if environment.argument('arrange') and not finalrun then
+ setalways( "\\setuparranging[\\v!disable]")
+ end
+ setvalue("modes" , "\\enablemode[%s]")
+ setvalue("mode" , "\\enablemode[%s]")
+ setvalue("arguments" , "\\setupenv[%s]")
+ setvalue("randomseed" , "\\setupsystem[\\c!random=%s]")
+ setvalue("filters" , "\\useXMLfilter[%s]")
+ setvalue("usemodules" , "\\usemodule[%s]")
+ setvalue("environments", "\\environment %s ")
+ setalways( "\\protect")
+ setalways( "\\endinput")
+ f:close()
+ end
+end
+
+function scripts.context.multipass.copyluafile(jobname)
+ io.savedata(jobname..".tuc",io.loaddata(jobname..".tua") or "")
+end
+
+function scripts.context.multipass.copytuifile(jobname)
+ local f, g = io.open(jobname..".tui"), io.open(jobname..".tuo",'w')
+ if f and g then
+ g:write("% traditional utility file, only commands written by mtxrun/context\n%\n")
+ for line in f:lines() do
+ if line:find("^c ") then
+ g:write((line:gsub("^c ","")),"\n")
+ end
+ end
+ f:close()
+ g:close()
+ end
+end
+
+function scripts.context.run()
+ -- todo: interface
+ local files = environment.files
+ if #files > 0 then
+ input.identify_cnf(instance)
+ input.load_cnf(instance)
+ input.expand_variables(instance)
+ local formatname = "cont-en"
+ local formatfile, scriptfile = input.locate_format(formatname)
+ if formatfile and scriptfile then
+ for _, filename in ipairs(files) do
+ local basename, pathname = file.basename(filename), file.dirname(filename)
+ local jobname = file.removesuffix(basename)
+ if pathname ~= "" and pathname ~= "." then
+ filename = "./" .. filename
+ end
+ local command = "luatex --fmt=" .. string.quote(formatfile) .. " --lua=" .. string.quote(scriptfile) .. " " .. string.quote(filename)
+ local oldhash, newhash = scripts.context.multipass.hashfiles(jobname), { }
+ scripts.context.multipass.makeoptionfile(jobname)
+ for i=1, scripts.context.multipass.nofruns do
+ input.report(string.format("run %s: %s",i,command))
+ local returncode = os.execute(command)
+ input.report("return code: " .. returncode)
+ if returncode > 0 then
+ input.reportr("fatal error, run aborted")
+ break
+ else
+ scripts.context.multipass.copyluafile(jobname)
+ scripts.context.multipass.copytuifile(jobname)
+ newhash = scripts.context.multipass.hashfiles(jobname)
+ if scripts.context.multipass.changed(oldhash,newhash) then
+ oldhash = newhash
+ else
+ break
+ end
+ end
+ end
+ end
+ else
+ input.error("no format found with name " .. formatname)
+ end
+ end
+end
+
+function scripts.context.make()
+ -- hack, should also be a shared function
+ for _, name in ipairs( { "cont-en", "cont-nl", "mptopdf" } ) do
+ local command = "luatools --make --compile " .. name
+ input.report("running command: " .. command)
+ os.execute(command)
+ end
+end
+
+banner = banner .. " | context tools "
+
+messages.help = [[
+--run process (one or more) files
+--make generate formats
+]]
+
+input.verbose = true
+input.start_timing(scripts.context)
+
+if environment.argument("run") then
+ scripts.context.run()
+elseif environment.argument("make") then
+ scripts.context.make()
+else
+ input.help(banner,messages.help)
+end
+
+input.stop_timing(scripts.context)
+input.report("total runtime: " .. input.elapsedtime(scripts.context))
diff --git a/scripts/context/lua/mtx-fonts.lua b/scripts/context/lua/mtx-fonts.lua
index 10211fe22..ba5215ab1 100644
--- a/scripts/context/lua/mtx-fonts.lua
+++ b/scripts/context/lua/mtx-fonts.lua
@@ -6,6 +6,10 @@ texmf.instance = instance -- we need to get rid of this / maybe current instance
scripts = scripts or { }
scripts.fonts = scripts.fonts or { }
+function scripts.fonts.reload()
+ fonts.names.load(true)
+end
+
function scripts.fonts.list(pattern,reload,all)
if reload then
logs.report("fontnames","reloading font database")
@@ -68,15 +72,17 @@ end
banner = banner .. " | font tools "
messages.help = [[
+--reload generate new font database
--list list installed fonts
--save save open type font in raw table
--pattern=str filter files
---reload generate new font database
--all provide alternatives
]]
-if environment.argument("list") then
+if environment.argument("reload") then
+ scripts.fonts.reload()
+elseif environment.argument("list") then
local pattern = environment.argument("pattern") or environment.files[1] or ""
local all = environment.argument("all")
local reload = environment.argument("reload")
diff --git a/scripts/context/lua/mtxrun.lua b/scripts/context/lua/mtxrun.lua
index d5a0701c9..caaca8d30 100644
--- a/scripts/context/lua/mtxrun.lua
+++ b/scripts/context/lua/mtxrun.lua
@@ -1111,8 +1111,12 @@ function file.extname(name)
return name:match("^.+%.(.-)$") or ""
end
-function file.join(...) -- args
- return (string.gsub(table.concat({...},"/"),"\\","/"))
+function file.join(...)
+ local t = { ... }
+ for i=1,#t do
+ t[i] = (t[i]:gsub("\\","/")):gsub("/+$","")
+ end
+ return table.concat(t,"/")
end
function file.is_writable(name)
@@ -1135,16 +1139,31 @@ function file.is_readable(name)
end
end
+--~ function file.split_path(str)
+--~ if str:find(';') then
+--~ return str:splitchr(";")
+--~ else
+--~ return str:splitchr(io.pathseparator)
+--~ end
+--~ end
+
+-- todo: lpeg
+
function file.split_path(str)
- if str:find(';') then
- return str:splitchr(";")
- else
- return str:splitchr(io.pathseparator)
+ local t = { }
+ str = str:gsub("\\", "/")
+ str = str:gsub("(%a):([;/])", "%1\001%2")
+ for name in str:gmatch("([^;:]+)") do
+ if name ~= "" then
+ name = name:gsub("\001",":")
+ t[#t+1] = name
+ end
end
+ return t
end
function file.join_path(tab)
- return table.concat(tab,io.pathseparator)
+ return table.concat(tab,io.pathseparator) -- can have trailing //
end
--~ print('test' .. " == " .. file.collapse_path("test"))
@@ -1433,7 +1452,14 @@ end
function utils.lua.compile(luafile, lucfile)
-- utils.report("compiling",luafile,"into",lucfile)
os.remove(lucfile)
- return (os.execute("luac -s -o " .. string.quote(lucfile) .. " " .. string.quote(luafile)) == 0)
+ local command = "-s -o " .. string.quote(lucfile) .. " " .. string.quote(luafile)
+ if os.execute("texluac " .. command) == 0 then
+ return true
+ elseif os.execute("luac " .. command) == 0 then
+ return true
+ else
+ return false
+ end
end
@@ -1600,7 +1626,9 @@ end
-- (any case), rest paths (so no need for optimization). Or maybe a
-- separate table that matches lowercase names to mixed case when
-- present. In that case the lower() cases can go away. I will do that
--- only when we run into problems with names.
+-- only when we run into problems with names ... well ... Iwona-Regular.
+
+-- Beware, loading and saving is overloaded in luat-tmp!
if not versions then versions = { } end versions['luat-inp'] = 1.001
if not environment then environment = { } end
@@ -1664,12 +1692,14 @@ input.suffixes['lua'] = { 'lua', 'luc', 'tma', 'tmc' }
-- here we catch a few new thingies
function input.checkconfigdata(instance)
- if input.env(instance,"LUAINPUTS") == "" then
- instance.environment["LUAINPUTS"] = ".;$TEXINPUTS;$TEXMFSCRIPTS"
- end
- if input.env(instance,"FONTFEATURES") == "" then
- instance.environment["FONTFEATURES"] = ".;$OPENTYPEFONTS;$TTFONTS;$T1FONTS;$AFMFONTS"
+ function fix(varname,default)
+ local proname = varname .. "." .. instance.progname or "crap"
+ if not instance.environment[proname] and not instance.variables[proname] == "" and not instance.environment[varname] and not instance.variables[varname] == "" then
+ instance.variables[varname] = default
+ end
end
+ fix("LUAINPUTS" , ".;$TEXINPUTS;$TEXMFSCRIPTS")
+ fix("FONTFEATURES", ".;$OPENTYPEFONTS;$TTFONTS;$T1FONTS;$AFMFONTS")
end
-- backward compatible ones
@@ -1705,6 +1735,7 @@ function input.reset()
instance.variables = { }
instance.expansions = { }
instance.files = { }
+ instance.remap = { }
instance.configuration = { }
instance.found = { }
instance.foundintrees = { }
@@ -1825,7 +1856,7 @@ function input.reportlines(str)
for _,v in pairs(str) do input.report(v) end
end
-input.settrace(os.getenv("MTX.INPUT.TRACE") or os.getenv("MTX_INPUT_TRACE") or input.trace or 0)
+input.settrace(tonumber(os.getenv("MTX.INPUT.TRACE") or os.getenv("MTX_INPUT_TRACE") or input.trace or 0))
-- These functions can be used to test the performance, especially
-- loading the database files.
@@ -2206,6 +2237,10 @@ function input.generators.tex(instance,specification)
end
else
files[name] = path
+ local lower = name:lower()
+ if name ~= lower then
+ files["remap:"..lower] = name
+ end
end
end
end
@@ -2236,6 +2271,10 @@ function input.generators.tex(instance,specification)
end
else
files[line] = path -- string
+ local lower = line:lower()
+ if line ~= lower then
+ files["remap:"..lower] = line
+ end
end
else
path = line:match("%.%/(.-)%:$") or path -- match could be nil due to empty line
@@ -2696,8 +2735,8 @@ function input.aux.expanded_path(instance,pathlist)
local pre, mid, post = v:match(pattern)
if pre and mid and post then
more = true
- -- for _,vv in ipairs(mid:splitchr(',')) do
- for vv in string.gmatch(mid..',',"(.-),") do
+--~ for vv in string.gmatch(mid..',',"(.-),") do
+ for vv in string.gmatch(mid,"([^,]+)") do
if vv == '.' then
t[#t+1] = pre..post
else
@@ -2771,11 +2810,20 @@ function input.aux.collect_files(instance,names)
end
for _, hash in pairs(instance.hashes) do
local blobpath = hash.tag
- if blobpath and instance.files[blobpath] then
+ local files = blobpath and instance.files[blobpath]
+ if files then
if input.trace > 2 then
input.logger('? blobpath do',blobpath .. " (" .. bname ..")")
end
- local blobfile = instance.files[blobpath][bname]
+ local blobfile = files[bname]
+ if not blobfile then
+ local rname = "remap:"..bname
+ blobfile = files[rname]
+ if blobfile then
+ bname = files[rname]
+ blobfile = files[bname]
+ end
+ end
if blobfile then
if type(blobfile) == 'string' then
if not dname or blobfile:find(dname) then
@@ -3403,14 +3451,16 @@ end
-- beware: i need to check where we still need a / on windows:
function input.clean_path(str)
- -- return string.gsub(string.gsub(string.gsub(str,"\\","/"),"^!+",""),"//$","/")
- return (string.gsub(string.gsub(str,"\\","/"),"^!+",""))
+--~ return (((str:gsub("\\","/")):gsub("^!+","")):gsub("//+","//"))
+ return ((str:gsub("\\","/")):gsub("^!+",""))
end
+
function input.do_with_path(name,func)
for _, v in pairs(input.expanded_path_list(instance,name)) do
func("^"..input.clean_path(v))
end
end
+
function input.do_with_var(name,func)
func(input.aux.expanded_var(name))
end
@@ -3479,16 +3529,16 @@ cache = cache or { }
dir = dir or { }
texmf = texmf or { }
-cache.path = nil
+cache.path = cache.path or nil
cache.base = cache.base or "luatex-cache"
cache.more = cache.more or "context"
cache.direct = false -- true is faster but may need huge amounts of memory
cache.trace = false
cache.tree = false
-cache.temp = os.getenv("TEXMFCACHE") or os.getenv("HOME") or os.getenv("HOMEPATH") or os.getenv("VARTEXMF") or os.getenv("TEXMFVAR") or os.getenv("TMP") or os.getenv("TEMP") or os.getenv("TMPDIR") or nil
-cache.paths = { cache.temp }
+cache.temp = cache.temp or os.getenv("TEXMFCACHE") or os.getenv("HOME") or os.getenv("HOMEPATH") or os.getenv("VARTEXMF") or os.getenv("TEXMFVAR") or os.getenv("TMP") or os.getenv("TEMP") or os.getenv("TMPDIR") or nil
+cache.paths = cache.paths or { cache.temp }
-if not cache.temp then
+if not cache.temp or cache.temp == "" then
print("\nFATAL ERROR: NO VALID TEMPORARY PATH\n")
os.exit()
end
@@ -3522,6 +3572,7 @@ function cache.setpath(instance,...)
if not cache.path then
cache.path = cache.temp
end
+ cache.path = input.clean_path(cache.path) -- to be sure
if lfs then
cache.tree = cache.tree or cache.treehash(instance)
if cache.tree then
@@ -4557,7 +4608,7 @@ elseif environment.argument("selfclean") then
-- remove embedded libraries
utils.merger.selfclean(own.name)
elseif environment.arguments["selfupdate"] then
- input.my_prepare_b(instance)
+ input.runners.my_prepare_b(instance)
input.verbose = true
input.update_script(own.name,"mtxrun")
elseif environment.argument("ctxlua") or environment.argument("internal") then
diff --git a/scripts/context/ruby/ctxtools.rb b/scripts/context/ruby/ctxtools.rb
index 724f5593f..598bfac20 100644
--- a/scripts/context/ruby/ctxtools.rb
+++ b/scripts/context/ruby/ctxtools.rb
@@ -2653,13 +2653,14 @@ class Commands
end
def remakeformats
- return system("mktexlsr")
- return system("luatools --selfupdate")
- return system("mtxrun --selfupdate")
- return system("luatools --generate")
- return system("texmfstart texexec --make --all --fast --pdftex")
- return system("texmfstart texexec --make --all --fast --luatex")
- return system("texmfstart texexec --make --all --fast --xetex")
+ system("mktexlsr")
+ system("luatools --selfupdate")
+ system("mtxrun --selfupdate")
+ system("luatools --generate")
+ system("texmfstart texexec --make --all --fast --pdftex")
+ system("texmfstart texexec --make --all --fast --luatex")
+ system("texmfstart texexec --make --all --fast --xetex")
+ return true
end
if localtree = locatedlocaltree then
diff --git a/tex/context/base/cont-new.mkiv b/tex/context/base/cont-new.mkiv
index b7b069b45..0a4803c4a 100644
--- a/tex/context/base/cont-new.mkiv
+++ b/tex/context/base/cont-new.mkiv
@@ -11,7 +11,11 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-\ctxlua { fonts.define.method = 2 }
+\appendtoks
+ \writestatus\m!lua{tfm over afm, wide fonts not yet supported}
+\to \everystoptext
+
+\ctxlua { fonts.define.method = 2 } % normally 3
\unprotect
diff --git a/tex/context/base/cont-new.tex b/tex/context/base/cont-new.tex
index 941fc6a31..d2154bec8 100644
--- a/tex/context/base/cont-new.tex
+++ b/tex/context/base/cont-new.tex
@@ -11,9 +11,7 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-% it's about time to clean up this file ...
-
-\newcontextversion{2007.07.25 12:35}
+\newcontextversion{2007.08.08 14:35}
%D This file is loaded at runtime, thereby providing an
%D excellent place for hacks, patches, extensions and new
@@ -21,6 +19,8 @@
\unprotect
+% it's about time to clean up this file ...
+
\writestatus{\m!systems}{beware: some patches loaded from cont-new.tex}
% \ifx\pdfmapfile \undefined \else \pdfmapfile{ } \fi
diff --git a/tex/context/base/context.tex b/tex/context/base/context.tex
index 8a412745b..fd7fe52ec 100644
--- a/tex/context/base/context.tex
+++ b/tex/context/base/context.tex
@@ -42,7 +42,7 @@
%D your styles an modules.
\edef\contextformat {\jobname}
-\edef\contextversion{2007.08.07 01:37}
+\edef\contextversion{2007.08.08 14:35}
%D For those who want to use this:
diff --git a/tex/context/base/core-obj.mkii b/tex/context/base/core-obj.mkii
index efc166555..361c1a979 100644
--- a/tex/context/base/core-obj.mkii
+++ b/tex/context/base/core-obj.mkii
@@ -13,7 +13,7 @@
\unprotect
-\def\checkobjectreferences
+\def\mkcheckobjectreferences
{\startnointerference
\protectlabels
\doutilities{objectreferences}\jobname\empty\relax\relax
diff --git a/tex/context/base/core-obj.tex b/tex/context/base/core-obj.tex
index 8741c3968..d8de15133 100644
--- a/tex/context/base/core-obj.tex
+++ b/tex/context/base/core-obj.tex
@@ -91,6 +91,10 @@
\newif\ifinobject
+\ifx\mkcheckobjectreferences\undefined \let\mkcheckobjectreferences\relax \fi
+
+\def\checkobjectreferences{\mkcheckobjectreferences}
+
\def\objectplaceholder{NOT YET FLUSHED}%
\def\presetobject#1#2% \global added
diff --git a/tex/context/base/font-afm.lua b/tex/context/base/font-afm.lua
index 7f4107386..8afeb84e0 100644
--- a/tex/context/base/font-afm.lua
+++ b/tex/context/base/font-afm.lua
@@ -406,7 +406,7 @@ function fonts.afm.set_features(tfmdata)
end
function fonts.afm.afm_to_tfm(specification)
- local afmfile = specification.filename
+ local afmfile = specification.filename or specification.name
local features = specification.features.normal
local cache_id = specification.hash
local tfmdata = containers.read(fonts.tfm.cache, cache_id) -- cache with features applied
@@ -455,7 +455,6 @@ function fonts.tfm.read_from_afm(specification)
filename = name
end
if filename ~= "" then
- specification.filename = filename .. ".afm"
tfmtable = fonts.afm.afm_to_tfm(specification)
if tfmtable then
tfmtable.name = name
diff --git a/tex/context/base/font-def.lua b/tex/context/base/font-def.lua
index cb8e6f75b..aba0728d0 100644
--- a/tex/context/base/font-def.lua
+++ b/tex/context/base/font-def.lua
@@ -40,7 +40,7 @@ interface.</p>
fonts.define.method = 3 -- 1: tfm 2: tfm and if not then afm 3: afm and if not then tfm
fonts.define.auto_afm = true
fonts.define.auto_otf = true
-fonts.define.specify = { }
+fonts.define.specify = fonts.define.specify or { }
fonts.define.splitsymbols = ""
fonts.define.methods = fonts.define.methods or { }
@@ -190,9 +190,15 @@ function fonts.tfm.read(specification)
if not tfmtable then
if specification.forced and specification.forced ~= "" then
tfmtable = fonts.tfm.readers[specification.forced](specification)
+ if not tfmtable then
+ logs.error("define font",string.format("forced type %s of %s not found",specification.forced,specification.name))
+ end
else
for _, reader in ipairs(fonts.tfm.readers.sequence) do
if fonts.tfm.readers[reader] then -- not really needed
+ if fonts.trace then
+ logs.report("define font",string.format("trying type %s for %s with file %s",reader,specification.name,specification.filename or "unknown"))
+ end
tfmtable = fonts.tfm.readers[reader](specification)
if tfmtable then break end
end
@@ -209,6 +215,9 @@ function fonts.tfm.read(specification)
end
input.stop_timing(fonts)
garbagecollector.pop()
+ if not tfmtable then
+ logs.error("define font",string.format("font with name %s is not found",specification.name))
+ end
return tfmtable
end
@@ -254,8 +263,8 @@ function fonts.tfm.readers.opentype(specification,suffix,what)
local fullname, tfmtable = nil, nil
fullname = input.findbinfile(texmf.instance,specification.name,suffix)
if fullname and fullname ~= "" then
- specification.filename, specification.format = fullname, what
- tfmtable = fonts.tfm.read_from_open_type(specification)
+ specification.filename, specification.format = fullname, what -- hm, so we do set the filename, then
+ tfmtable = fonts.tfm.read_from_open_type(specification) -- we need to do it for all matches / todo
fonts.logger.save(tfmtable,suffix,specification)
end
return tfmtable
@@ -268,23 +277,24 @@ function fonts.tfm.readers.otf(specification) return fonts.tfm.readers.opentype(
function fonts.tfm.readers.ttf(specification) return fonts.tfm.readers.opentype(specification,"ttf","truetype") end
function fonts.tfm.readers.ttc(specification) return fonts.tfm.readers.opentype(specification,"ttf","truetype") end -- !!
-function fonts.tfm.readers.afm(specification)
+function fonts.tfm.readers.afm(specification,method)
local fullname, tfmtable = nil, nil
- if fonts.define.method == 2 then
+ method = method or fonts.define.method
+ if method == 2 then
fullname = input.findbinfile(texmf.instance,specification.name,"ofm") -- ?
- if not (fullname and fullname ~= "") then
- specification.filename = fullname
+ if not fullname or fullname == "" then
tfmtable = fonts.tfm.read_from_afm(specification)
fonts.logger.save(tfmtable,'afm',specification)
+ else
+ specification.filename = fullname
+ tfmtable = fonts.tfm.read_from_tfm(specification)
end
- elseif fonts.define.method == 3 then
--- maybe also findbinfile here
+ elseif method == 3 then -- maybe also findbinfile here
if fonts.define.auto_afm then
tfmtable = fonts.tfm.read_from_afm(specification)
fonts.logger.save(tfmtable,'afm',specification)
end
- elseif fonts.define.method == 4 then
--- maybe also findbinfile here
+ elseif method == 4 then -- maybe also findbinfile here
tfmtable = fonts.tfm.read_from_afm(specification)
fonts.logger.save(tfmtable,'afm',specification)
end
@@ -361,7 +371,7 @@ end
fonts.define.register_split(":", fonts.define.specify.colonized)
-fonts.define.specify.context_setups = fonts.define.specify.context_setups or { }
+fonts.define.specify.context_setups = fonts.define.specify.context_setups or { }
input.storage.register(false,"fonts/setups", fonts.define.specify.context_setups, "fonts.define.specify.context_setups")
@@ -448,6 +458,9 @@ function fonts.define.read(name,size,id)
fonts.tfm.id[id] = fontdata
fonts.tfm.internalized[hash] = id
end
+ if not fontdata then
+ logs.error("defining font", string.format("name: %s, loading aborted",specification.name))
+ end
return fontdata
end
diff --git a/tex/context/base/font-otf.lua b/tex/context/base/font-otf.lua
index c6a100566..8dec45481 100644
--- a/tex/context/base/font-otf.lua
+++ b/tex/context/base/font-otf.lua
@@ -1643,7 +1643,7 @@ do
end
local lookupdata = otfdata.lookups[lookupname]
if not lookupdata then
- texio.write_nl(string.format("error, missing lookupdata table %s",lookupname))
+ logs.error("otf process", string.format("missing lookupdata table %s",lookupname))
elseif lookupdata.rules then
for nofrules, rule in ipairs(lookupdata.rules) do
local coverage = rule.coverage
diff --git a/tex/context/base/font-tfm.lua b/tex/context/base/font-tfm.lua
index b07f0a062..61b1d3a94 100644
--- a/tex/context/base/font-tfm.lua
+++ b/tex/context/base/font-tfm.lua
@@ -17,6 +17,7 @@ fonts.logger = fonts.logger or { }
fonts.loadtime = 0
fonts.tfm = fonts.tfm or { }
fonts.triggers = fonts.triggers or { } -- brrr
+fonts.trace = false
--[[ldx--
<p>The next function encapsulates the standard <l n='tfm'/> loader as
@@ -24,7 +25,30 @@ supplied by <l n='luatex'/>.</p>
--ldx]]--
function fonts.tfm.read_from_tfm(specification)
- return font.read_tfm(specification.name,specification.size)
+ local fname, tfmdata = specification.filename, nil
+ if fname then
+ -- safeguard, we use tfm as fallback
+ local suffix = file.extname(fname)
+ if suffix ~= "" and suffix ~= "tfm" then
+ fname = ""
+ end
+ end
+ if not fname or fname == "" then
+ fname = input.findbinfile(texmf.instance, specification.name, 'ofm')
+ else
+ fname = input.findbinfile(texmf.instance, fname, 'ofm')
+ end
+ if fname and fname ~= "" then
+ if fonts.trace then
+ logs.report("define font",string.format("loading tfm file %s at size %s",fname,specification.size))
+ end
+ tfmdata = font.read_tfm(fname,specification.size)
+ else
+ if fonts.trace then
+ logs.report("define font",string.format("loading tfm with name %s fails",specification.name))
+ end
+ end
+ return tfmdata
end
--[[ldx--
diff --git a/tex/context/base/l-file.lua b/tex/context/base/l-file.lua
index ca983402b..67bf44b5a 100644
--- a/tex/context/base/l-file.lua
+++ b/tex/context/base/l-file.lua
@@ -36,8 +36,12 @@ function file.extname(name)
return name:match("^.+%.(.-)$") or ""
end
-function file.join(...) -- args
- return (string.gsub(table.concat({...},"/"),"\\","/"))
+function file.join(...)
+ local t = { ... }
+ for i=1,#t do
+ t[i] = (t[i]:gsub("\\","/")):gsub("/+$","")
+ end
+ return table.concat(t,"/")
end
function file.is_writable(name)
@@ -60,16 +64,31 @@ function file.is_readable(name)
end
end
+--~ function file.split_path(str)
+--~ if str:find(';') then
+--~ return str:splitchr(";")
+--~ else
+--~ return str:splitchr(io.pathseparator)
+--~ end
+--~ end
+
+-- todo: lpeg
+
function file.split_path(str)
- if str:find(';') then
- return str:splitchr(";")
- else
- return str:splitchr(io.pathseparator)
+ local t = { }
+ str = str:gsub("\\", "/")
+ str = str:gsub("(%a):([;/])", "%1\001%2")
+ for name in str:gmatch("([^;:]+)") do
+ if name ~= "" then
+ name = name:gsub("\001",":")
+ t[#t+1] = name
+ end
end
+ return t
end
function file.join_path(tab)
- return table.concat(tab,io.pathseparator)
+ return table.concat(tab,io.pathseparator) -- can have trailing //
end
--~ print('test' .. " == " .. file.collapse_path("test"))
diff --git a/tex/context/base/l-utils.lua b/tex/context/base/l-utils.lua
index 96273106a..02efebe08 100644
--- a/tex/context/base/l-utils.lua
+++ b/tex/context/base/l-utils.lua
@@ -116,6 +116,13 @@ end
function utils.lua.compile(luafile, lucfile)
-- utils.report("compiling",luafile,"into",lucfile)
os.remove(lucfile)
- return (os.execute("luac -s -o " .. string.quote(lucfile) .. " " .. string.quote(luafile)) == 0)
+ local command = "-s -o " .. string.quote(lucfile) .. " " .. string.quote(luafile)
+ if os.execute("texluac " .. command) == 0 then
+ return true
+ elseif os.execute("luac " .. command) == 0 then
+ return true
+ else
+ return false
+ end
end
diff --git a/tex/context/base/luat-inp.lua b/tex/context/base/luat-inp.lua
index 798105718..656bd76a1 100644
--- a/tex/context/base/luat-inp.lua
+++ b/tex/context/base/luat-inp.lua
@@ -14,7 +14,9 @@
-- (any case), rest paths (so no need for optimization). Or maybe a
-- separate table that matches lowercase names to mixed case when
-- present. In that case the lower() cases can go away. I will do that
--- only when we run into problems with names.
+-- only when we run into problems with names ... well ... Iwona-Regular.
+
+-- Beware, loading and saving is overloaded in luat-tmp!
if not versions then versions = { } end versions['luat-inp'] = 1.001
if not environment then environment = { } end
@@ -78,12 +80,14 @@ input.suffixes['lua'] = { 'lua', 'luc', 'tma', 'tmc' }
-- here we catch a few new thingies
function input.checkconfigdata(instance)
- if input.env(instance,"LUAINPUTS") == "" then
- instance.environment["LUAINPUTS"] = ".;$TEXINPUTS;$TEXMFSCRIPTS"
- end
- if input.env(instance,"FONTFEATURES") == "" then
- instance.environment["FONTFEATURES"] = ".;$OPENTYPEFONTS;$TTFONTS;$T1FONTS;$AFMFONTS"
+ function fix(varname,default)
+ local proname = varname .. "." .. instance.progname or "crap"
+ if not instance.environment[proname] and not instance.variables[proname] == "" and not instance.environment[varname] and not instance.variables[varname] == "" then
+ instance.variables[varname] = default
+ end
end
+ fix("LUAINPUTS" , ".;$TEXINPUTS;$TEXMFSCRIPTS")
+ fix("FONTFEATURES", ".;$OPENTYPEFONTS;$TTFONTS;$T1FONTS;$AFMFONTS")
end
-- backward compatible ones
@@ -119,6 +123,7 @@ function input.reset()
instance.variables = { }
instance.expansions = { }
instance.files = { }
+ instance.remap = { }
instance.configuration = { }
instance.found = { }
instance.foundintrees = { }
@@ -239,7 +244,7 @@ function input.reportlines(str)
for _,v in pairs(str) do input.report(v) end
end
-input.settrace(os.getenv("MTX.INPUT.TRACE") or os.getenv("MTX_INPUT_TRACE") or input.trace or 0)
+input.settrace(tonumber(os.getenv("MTX.INPUT.TRACE") or os.getenv("MTX_INPUT_TRACE") or input.trace or 0))
-- These functions can be used to test the performance, especially
-- loading the database files.
@@ -620,6 +625,10 @@ function input.generators.tex(instance,specification)
end
else
files[name] = path
+ local lower = name:lower()
+ if name ~= lower then
+ files["remap:"..lower] = name
+ end
end
end
end
@@ -650,6 +659,10 @@ function input.generators.tex(instance,specification)
end
else
files[line] = path -- string
+ local lower = line:lower()
+ if line ~= lower then
+ files["remap:"..lower] = line
+ end
end
else
path = line:match("%.%/(.-)%:$") or path -- match could be nil due to empty line
@@ -1110,8 +1123,8 @@ function input.aux.expanded_path(instance,pathlist)
local pre, mid, post = v:match(pattern)
if pre and mid and post then
more = true
- -- for _,vv in ipairs(mid:splitchr(',')) do
- for vv in string.gmatch(mid..',',"(.-),") do
+--~ for vv in string.gmatch(mid..',',"(.-),") do
+ for vv in string.gmatch(mid,"([^,]+)") do
if vv == '.' then
t[#t+1] = pre..post
else
@@ -1185,11 +1198,20 @@ function input.aux.collect_files(instance,names)
end
for _, hash in pairs(instance.hashes) do
local blobpath = hash.tag
- if blobpath and instance.files[blobpath] then
+ local files = blobpath and instance.files[blobpath]
+ if files then
if input.trace > 2 then
input.logger('? blobpath do',blobpath .. " (" .. bname ..")")
end
- local blobfile = instance.files[blobpath][bname]
+ local blobfile = files[bname]
+ if not blobfile then
+ local rname = "remap:"..bname
+ blobfile = files[rname]
+ if blobfile then
+ bname = files[rname]
+ blobfile = files[bname]
+ end
+ end
if blobfile then
if type(blobfile) == 'string' then
if not dname or blobfile:find(dname) then
@@ -1817,14 +1839,16 @@ end
-- beware: i need to check where we still need a / on windows:
function input.clean_path(str)
- -- return string.gsub(string.gsub(string.gsub(str,"\\","/"),"^!+",""),"//$","/")
- return (string.gsub(string.gsub(str,"\\","/"),"^!+",""))
+--~ return (((str:gsub("\\","/")):gsub("^!+","")):gsub("//+","//"))
+ return ((str:gsub("\\","/")):gsub("^!+",""))
end
+
function input.do_with_path(name,func)
for _, v in pairs(input.expanded_path_list(instance,name)) do
func("^"..input.clean_path(v))
end
end
+
function input.do_with_var(name,func)
func(input.aux.expanded_var(name))
end
diff --git a/tex/context/base/luat-tmp.lua b/tex/context/base/luat-tmp.lua
index d11ae6329..84966bd2c 100644
--- a/tex/context/base/luat-tmp.lua
+++ b/tex/context/base/luat-tmp.lua
@@ -26,16 +26,16 @@ cache = cache or { }
dir = dir or { }
texmf = texmf or { }
-cache.path = nil
+cache.path = cache.path or nil
cache.base = cache.base or "luatex-cache"
cache.more = cache.more or "context"
cache.direct = false -- true is faster but may need huge amounts of memory
cache.trace = false
cache.tree = false
-cache.temp = os.getenv("TEXMFCACHE") or os.getenv("HOME") or os.getenv("HOMEPATH") or os.getenv("VARTEXMF") or os.getenv("TEXMFVAR") or os.getenv("TMP") or os.getenv("TEMP") or os.getenv("TMPDIR") or nil
-cache.paths = { cache.temp }
+cache.temp = cache.temp or os.getenv("TEXMFCACHE") or os.getenv("HOME") or os.getenv("HOMEPATH") or os.getenv("VARTEXMF") or os.getenv("TEXMFVAR") or os.getenv("TMP") or os.getenv("TEMP") or os.getenv("TMPDIR") or nil
+cache.paths = cache.paths or { cache.temp }
-if not cache.temp then
+if not cache.temp or cache.temp == "" then
print("\nFATAL ERROR: NO VALID TEMPORARY PATH\n")
os.exit()
end
@@ -69,6 +69,7 @@ function cache.setpath(instance,...)
if not cache.path then
cache.path = cache.temp
end
+ cache.path = input.clean_path(cache.path) -- to be sure
if lfs then
cache.tree = cache.tree or cache.treehash(instance)
if cache.tree then
diff --git a/tex/context/base/type-otf.tex b/tex/context/base/type-otf.tex
index ee51c559c..d1de4bd10 100644
--- a/tex/context/base/type-otf.tex
+++ b/tex/context/base/type-otf.tex
@@ -343,7 +343,7 @@
% qplb TeXGyrePagella-Bold
% qplbi TeXGyrePagella-BoldItalic
-\starttypescript [serif] [palatino]
+\starttypescript [serif] [palatino,pagella]
\definefontsynonym [Palatino] [texgyrepagella-regular] [features=default]
\definefontsynonym [Palatino-Italic] [texgyrepagella-italic] [features=default]
\definefontsynonym [Palatino-Bold] [texgyrepagella-bold] [features=default]
@@ -498,39 +498,39 @@
% Antykwa Torunska (GUST)
\starttypescript [serif] [antykwa-torunska,antykwa-torunska-light,antykwa-torunska-cond,antykwa-torunska-lightcond]
- \definefontsynonym [AntykwaTorunska-Bold] [AntykwaTorunska-Bold] [features=default]
- \definefontsynonym [AntykwaTorunska-BoldItalic] [AntykwaTorunska-BoldItalic] [features=default]
- \definefontsynonym [AntykwaTorunska-Light] [AntykwaTorunskaLight-Regular] [features=default]
- \definefontsynonym [AntykwaTorunska-LightItalic] [AntykwaTorunskaLight-Italic] [features=default]
- \definefontsynonym [AntykwaTorunska-Medium] [AntykwaTorunskaMed-Regular] [features=default]
- \definefontsynonym [AntykwaTorunska-MedItalic] [AntykwaTorunskaMed-Italic] [features=default]
- \definefontsynonym [AntykwaTorunska-Regular] [AntykwaTorunska-Regular] [features=default]
- \definefontsynonym [AntykwaTorunska-Italic] [AntykwaTorunska-Italic] [features=default]
- \definefontsynonym [AntykwaTorunska-CondBold] [AntykwaTorunskaCond-Bold] [features=default]
- \definefontsynonym [AntykwaTorunska-CondBoldItalic] [AntykwaTorunskaCond-BoldItalic] [features=default]
- \definefontsynonym [AntykwaTorunska-CondLight] [AntykwaTorunskaCondLight-Regular] [features=default]
- \definefontsynonym [AntykwaTorunska-CondLightItalic] [AntykwaTorunskaCondLight-Italic] [features=default]
- \definefontsynonym [AntykwaTorunska-CondMedium] [AntykwaTorunskaCondMed-Regular] [features=default]
- \definefontsynonym [AntykwaTorunska-CondMedItalic] [AntykwaTorunskaCondMed-Italic] [features=default]
- \definefontsynonym [AntykwaTorunska-CondRegular] [AntykwaTorunskaCond-Regular] [features=default]
- \definefontsynonym [AntykwaTorunska-CondItalic] [AntykwaTorunskaCond-Italic] [features=default]
-
- \definefontsynonym [AntykwaTorunska-BoldCap] [AntykwaTorunska-Bold] [features=smallcaps]
- \definefontsynonym [AntykwaTorunska-BoldItalicCap] [AntykwaTorunska-BoldItalic] [features=smallcaps]
- \definefontsynonym [AntykwaTorunska-LightCap] [AntykwaTorunskaLight-Regular] [features=smallcaps]
- \definefontsynonym [AntykwaTorunska-LightItalicCap] [AntykwaTorunskaLight-Italic] [features=smallcaps]
- \definefontsynonym [AntykwaTorunska-MediumCap] [AntykwaTorunskaMed-Regular] [features=smallcaps]
- \definefontsynonym [AntykwaTorunska-MedItalicCap] [AntykwaTorunskaMed-Italic] [features=smallcaps]
- \definefontsynonym [AntykwaTorunska-Cap] [AntykwaTorunska-Regular] [features=smallcaps]
- \definefontsynonym [AntykwaTorunska-ItalicCap] [AntykwaTorunska-Italic] [features=smallcaps]
- \definefontsynonym [AntykwaTorunska-CondBoldCap] [AntykwaTorunskaCond-Bold] [features=smallcaps]
- \definefontsynonym [AntykwaTorunska-CondBoldItalicCap] [AntykwaTorunskaCond-BoldItalic] [features=smallcaps]
- \definefontsynonym [AntykwaTorunska-CondLightCap] [AntykwaTorunskaCondLight-Regular] [features=smallcaps]
- \definefontsynonym [AntykwaTorunska-CondLightItalicCap][AntykwaTorunskaCondLight-Italic] [features=smallcaps]
- \definefontsynonym [AntykwaTorunska-CondMediumCap] [AntykwaTorunskaCondMed-Regular] [features=smallcaps]
- \definefontsynonym [AntykwaTorunska-CondMedItalicCap] [AntykwaTorunskaCondMed-Italic] [features=smallcaps]
- \definefontsynonym [AntykwaTorunska-CondCap] [AntykwaTorunskaCond-Regular] [features=smallcaps]
- \definefontsynonym [AntykwaTorunska-CondItalicCap] [AntykwaTorunskaCond-Italic] [features=smallcaps]
+ \definefontsynonym [AntykwaTorunska-Bold] [antykwatorunska-bold] [features=default]
+ \definefontsynonym [AntykwaTorunska-BoldItalic] [antykwatorunska-bolditalic] [features=default]
+ \definefontsynonym [AntykwaTorunska-Light] [antykwatorunskalight-regular] [features=default]
+ \definefontsynonym [AntykwaTorunska-LightItalic] [antykwatorunskalight-italic] [features=default]
+ \definefontsynonym [AntykwaTorunska-Medium] [antykwatorunskamed-regular] [features=default]
+ \definefontsynonym [AntykwaTorunska-MedItalic] [antykwatorunskamed-italic] [features=default]
+ \definefontsynonym [AntykwaTorunska-Regular] [antykwatorunska-regular] [features=default]
+ \definefontsynonym [AntykwaTorunska-Italic] [antykwatorunska-italic] [features=default]
+ \definefontsynonym [AntykwaTorunska-CondBold] [antykwatorunskacond-bold] [features=default]
+ \definefontsynonym [AntykwaTorunska-CondBoldItalic] [antykwatorunskacond-bolditalic] [features=default]
+ \definefontsynonym [AntykwaTorunska-CondLight] [antykwatorunskacondlight-regular] [features=default]
+ \definefontsynonym [AntykwaTorunska-CondLightItalic] [antykwatorunskacondlight-italic] [features=default]
+ \definefontsynonym [AntykwaTorunska-CondMedium] [antykwatorunskacondmed-regular] [features=default]
+ \definefontsynonym [AntykwaTorunska-CondMedItalic] [antykwatorunskacondmed-italic] [features=default]
+ \definefontsynonym [AntykwaTorunska-CondRegular] [antykwatorunskacond-regular] [features=default]
+ \definefontsynonym [AntykwaTorunska-CondItalic] [antykwatorunskacond-italic] [features=default]
+
+ \definefontsynonym [AntykwaTorunska-BoldCap] [antykwatorunska-bold] [features=smallcaps]
+ \definefontsynonym [AntykwaTorunska-BoldItalicCap] [antykwatorunska-bolditalic] [features=smallcaps]
+ \definefontsynonym [AntykwaTorunska-LightCap] [antykwatorunskalight-regular] [features=smallcaps]
+ \definefontsynonym [AntykwaTorunska-LightItalicCap] [antykwatorunskalight-italic] [features=smallcaps]
+ \definefontsynonym [AntykwaTorunska-MediumCap] [antykwatorunskamed-regular] [features=smallcaps]
+ \definefontsynonym [AntykwaTorunska-MedItalicCap] [antykwatorunskamed-italic] [features=smallcaps]
+ \definefontsynonym [AntykwaTorunska-Cap] [antykwatorunska-regular] [features=smallcaps]
+ \definefontsynonym [AntykwaTorunska-ItalicCap] [antykwatorunska-italic] [features=smallcaps]
+ \definefontsynonym [AntykwaTorunska-CondBoldCap] [antykwatorunskacond-bold] [features=smallcaps]
+ \definefontsynonym [AntykwaTorunska-CondBoldItalicCap] [antykwatorunskacond-bolditalic] [features=smallcaps]
+ \definefontsynonym [AntykwaTorunska-CondLightCap] [antykwatorunskacondlight-regular] [features=smallcaps]
+ \definefontsynonym [AntykwaTorunska-CondLightItalicCap][antykwatorunskacondlight-italic] [features=smallcaps]
+ \definefontsynonym [AntykwaTorunska-CondMediumCap] [antykwatorunskacondmed-regular] [features=smallcaps]
+ \definefontsynonym [AntykwaTorunska-CondMedItalicCap] [antykwatorunskacondmed-italic] [features=smallcaps]
+ \definefontsynonym [AntykwaTorunska-CondCap] [antykwatorunskacond-regular] [features=smallcaps]
+ \definefontsynonym [AntykwaTorunska-CondItalicCap] [antykwatorunskacond-italic] [features=smallcaps]
\stoptypescript
\starttypescript [math] [antykwa-torunska] [default]
@@ -583,49 +583,49 @@
% maybe this will change in Iwona-Math-Letters and Iwona-Math-Letters-Italic
\starttypescript [sans] [iwona-light,iwona,iwona-medium,iwona-heavy,iwona-light-cond,iwona-cond,iwona-medium-cond,iwona-heavy-cond]
- \definefontsynonym [Iwona-Regular] [Iwona-Regular] [features=default]
- \definefontsynonym [Iwona-RegularItalic] [Iwona-Italic] [features=default]
- \definefontsynonym [Iwona-Bold] [Iwona-Bold] [features=default]
- \definefontsynonym [Iwona-BoldItalic] [Iwona-BoldItalic] [features=default]
- \definefontsynonym [Iwona-Light] [IwonaLight-Regular] [features=default]
- \definefontsynonym [Iwona-LightItalic] [IwonaLight-Italic] [features=default]
- \definefontsynonym [Iwona-Medium] [IwonaMedium-Regular] [features=default]
- \definefontsynonym [Iwona-MediumItalic] [IwonaMedium-Italic] [features=default]
- \definefontsynonym [Iwona-Heavy] [IwonaHeavy-Regular] [features=default]
- \definefontsynonym [Iwona-HeavyItalic] [IwonaHeavy-Italic] [features=default]
-
- \definefontsynonym [Iwona-CondLight] [IwonaCond-Regular] [features=default]
- \definefontsynonym [Iwona-CondRegular] [IwonaCond-Italic] [features=default]
- \definefontsynonym [Iwona-CondMedium] [IwonaCond-Bold] [features=default]
- \definefontsynonym [Iwona-CondBold] [IwonaCond-BoldItalic] [features=default]
- \definefontsynonym [Iwona-CondHeavy] [IwonaCondLight-Regular] [features=default]
- \definefontsynonym [Iwona-CondLightItalic] [IwonaCondLight-Italic] [features=default]
- \definefontsynonym [Iwona-CondRegularItalic] [IwonaCondMedium-Regular] [features=default]
- \definefontsynonym [Iwona-CondMediumItalic] [IwonaCondMedium-Italic] [features=default]
- \definefontsynonym [Iwona-CondBoldItalic] [IwonaCondHeavy-Regular] [features=default]
- \definefontsynonym [Iwona-CondHeavyItalic] [IwonaCondHeavy-Italic] [features=default]
-
- \definefontsynonym [Iwona-CapsLight] [Iwona-Regular] [features=smallcaps]
- \definefontsynonym [Iwona-CapsRegular] [Iwona-Italic] [features=smallcaps]
- \definefontsynonym [Iwona-CapsMedium] [Iwona-Bold] [features=smallcaps]
- \definefontsynonym [Iwona-CapsBold] [Iwona-BoldItalic] [features=smallcaps]
- \definefontsynonym [Iwona-CapsHeavy] [IwonaLight-Regular] [features=smallcaps]
- \definefontsynonym [Iwona-CapsLightItalic] [IwonaLight-Italic] [features=smallcaps]
- \definefontsynonym [Iwona-CapsRegularItalic] [IwonaMedium-Regular] [features=smallcaps]
- \definefontsynonym [Iwona-CapsMediumItalic] [IwonaMedium-Italic] [features=smallcaps]
- \definefontsynonym [Iwona-CapsBoldItalic] [IwonaHeavy-Regular] [features=smallcaps]
- \definefontsynonym [Iwona-CapsHeavyItalic] [IwonaHeavy-Italic] [features=smallcaps]
-
- \definefontsynonym [Iwona-CondCapsLight] [IwonaCond-Regular] [features=smallcaps]
- \definefontsynonym [Iwona-CondCapsRegular] [IwonaCond-Italic] [features=smallcaps]
- \definefontsynonym [Iwona-CondCapsMedium] [IwonaCond-Bold] [features=smallcaps]
- \definefontsynonym [Iwona-CondCapsBold] [IwonaCond-BoldItalic] [features=smallcaps]
- \definefontsynonym [Iwona-CondCapsHeavy] [IwonaCondLight-Regular] [features=smallcaps]
- \definefontsynonym [Iwona-CondCapsLightItalic] [IwonaCondLight-Italic] [features=smallcaps]
- \definefontsynonym [Iwona-CondCapsRegularItalic] [IwonaCondMedium-Regular] [features=smallcaps]
- \definefontsynonym [Iwona-CondCapsMediumItalic] [IwonaCondMedium-Italic] [features=smallcaps]
- \definefontsynonym [Iwona-CondCapsBoldItalic] [IwonaCondHeavy-Regular] [features=smallcaps]
- \definefontsynonym [Iwona-CondCapsHeavyItalic] [IwonaCondHeavy-Italic] [features=smallcaps]
+ \definefontsynonym [Iwona-Regular] [iwona-regular] [features=default]
+ \definefontsynonym [Iwona-RegularItalic] [iwona-italic] [features=default]
+ \definefontsynonym [Iwona-Bold] [iwona-bold] [features=default]
+ \definefontsynonym [Iwona-BoldItalic] [iwona-bolditalic] [features=default]
+ \definefontsynonym [Iwona-Light] [iwonalight-regular] [features=default]
+ \definefontsynonym [Iwona-LightItalic] [iwonalight-italic] [features=default]
+ \definefontsynonym [Iwona-Medium] [iwonamedium-regular] [features=default]
+ \definefontsynonym [Iwona-MediumItalic] [iwonamedium-italic] [features=default]
+ \definefontsynonym [Iwona-Heavy] [iwonaheavy-regular] [features=default]
+ \definefontsynonym [Iwona-HeavyItalic] [iwonaheavy-italic] [features=default]
+
+ \definefontsynonym [Iwona-CondLight] [iwonacond-regular] [features=default]
+ \definefontsynonym [Iwona-CondRegular] [iwonacond-italic] [features=default]
+ \definefontsynonym [Iwona-CondMedium] [iwonacond-bold] [features=default]
+ \definefontsynonym [Iwona-CondBold] [iwonacond-bolditalic] [features=default]
+ \definefontsynonym [Iwona-CondHeavy] [iwonacondlight-regular] [features=default]
+ \definefontsynonym [Iwona-CondLightItalic] [iwonacondlight-italic] [features=default]
+ \definefontsynonym [Iwona-CondRegularItalic] [iwonacondmedium-regular] [features=default]
+ \definefontsynonym [Iwona-CondMediumItalic] [iwonacondmedium-italic] [features=default]
+ \definefontsynonym [Iwona-CondBoldItalic] [iwonacondheavy-regular] [features=default]
+ \definefontsynonym [Iwona-CondHeavyItalic] [iwonacondheavy-italic] [features=default]
+
+ \definefontsynonym [Iwona-CapsLight] [iwona-regular] [features=smallcaps]
+ \definefontsynonym [Iwona-CapsRegular] [iwona-italic] [features=smallcaps]
+ \definefontsynonym [Iwona-CapsMedium] [iwona-bold] [features=smallcaps]
+ \definefontsynonym [Iwona-CapsBold] [iwona-bolditalic] [features=smallcaps]
+ \definefontsynonym [Iwona-CapsHeavy] [iwonalight-regular] [features=smallcaps]
+ \definefontsynonym [Iwona-CapsLightItalic] [iwonalight-italic] [features=smallcaps]
+ \definefontsynonym [Iwona-CapsRegularItalic] [iwonamedium-regular] [features=smallcaps]
+ \definefontsynonym [Iwona-CapsMediumItalic] [iwonamedium-italic] [features=smallcaps]
+ \definefontsynonym [Iwona-CapsBoldItalic] [iwonaheavy-regular] [features=smallcaps]
+ \definefontsynonym [Iwona-CapsHeavyItalic] [iwonaheavy-italic] [features=smallcaps]
+
+ \definefontsynonym [Iwona-CondCapsLight] [iwonacond-regular] [features=smallcaps]
+ \definefontsynonym [Iwona-CondCapsRegular] [iwonacond-italic] [features=smallcaps]
+ \definefontsynonym [Iwona-CondCapsMedium] [iwonacond-bold] [features=smallcaps]
+ \definefontsynonym [Iwona-CondCapsBold] [iwonacond-bolditalic] [features=smallcaps]
+ \definefontsynonym [Iwona-CondCapsHeavy] [iwonacondlight-regular] [features=smallcaps]
+ \definefontsynonym [Iwona-CondCapsLightItalic] [iwonacondlight-italic] [features=smallcaps]
+ \definefontsynonym [Iwona-CondCapsRegularItalic] [iwonacondmedium-regular] [features=smallcaps]
+ \definefontsynonym [Iwona-CondCapsMediumItalic] [iwonacondmedium-italic] [features=smallcaps]
+ \definefontsynonym [Iwona-CondCapsBoldItalic] [iwonacondheavy-regular] [features=smallcaps]
+ \definefontsynonym [Iwona-CondCapsHeavyItalic] [iwonacondheavy-italic] [features=smallcaps]
\stoptypescript
\starttypescript [math] [iwona] [default]
@@ -715,6 +715,18 @@
\definefontsynonym [MartinVogel] [fmvr8x]
\stoptypescript
+% Temp here
+
+\starttypescript [serif] [charter]
+ \definefontsynonym [Charter-Roman] [name:CharterBT-Roman] % or: [bchr8a]
+ \definefontsynonym [Charter-Italic] [name:CharterBT-Italic] % or: [bchri8a]
+ \definefontsynonym [Charter-Bold] [name:CharterBT-Bold] % or: [bchb8a]
+ \definefontsynonym [Charter-BoldItalic] [name:CharterBT-BoldItalic] % or: [bchbi8a]
+ \definefontsynonym [Charter-Slanted] [name:CharterBT-Italic] % or: [bchri8a]
+ \definefontsynonym [Charter-BoldSlanted] [name:CharterBT-BoldItalic] % or: [bchbi8a]
+ \definefontsynonym [Charter-Roman-Caps] [name:CharterBT-SmallCap] % or: [bchrc8a]
+\stoptypescript
+
\stoptypescriptcollection
\endinput
diff --git a/tex/context/interface/keys-cz.xml b/tex/context/interface/keys-cz.xml
index 7bb8e9000..b7385fccb 100644
--- a/tex/context/interface/keys-cz.xml
+++ b/tex/context/interface/keys-cz.xml
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
-<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" name="context" language="cz" version="2007.08.07 01:37">
+<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" name="context" language="cz" version="2007.08.08 14:35">
<cd:variables>
<cd:variable name="lesshyphenation" value="lesshyphenation"/>
diff --git a/tex/context/interface/keys-de.xml b/tex/context/interface/keys-de.xml
index 9611a5593..e740f71ff 100644
--- a/tex/context/interface/keys-de.xml
+++ b/tex/context/interface/keys-de.xml
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
-<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" name="context" language="de" version="2007.08.07 01:37">
+<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" name="context" language="de" version="2007.08.08 14:35">
<cd:variables>
<cd:variable name="lesshyphenation" value="lesshyphenation"/>
diff --git a/tex/context/interface/keys-en.xml b/tex/context/interface/keys-en.xml
index 2b623712e..8705ff11f 100644
--- a/tex/context/interface/keys-en.xml
+++ b/tex/context/interface/keys-en.xml
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
-<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" name="context" language="en" version="2007.08.07 01:37">
+<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" name="context" language="en" version="2007.08.08 14:35">
<cd:variables>
<cd:variable name="lesshyphenation" value="lesshyphenation"/>
diff --git a/tex/context/interface/keys-fr.xml b/tex/context/interface/keys-fr.xml
index afdee8099..1f78f000e 100644
--- a/tex/context/interface/keys-fr.xml
+++ b/tex/context/interface/keys-fr.xml
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
-<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" name="context" language="fr" version="2007.08.07 01:37">
+<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" name="context" language="fr" version="2007.08.08 14:35">
<cd:variables>
<cd:variable name="lesshyphenation" value="lesshyphenation"/>
diff --git a/tex/context/interface/keys-it.xml b/tex/context/interface/keys-it.xml
index 3a6de75a1..1de46baa0 100644
--- a/tex/context/interface/keys-it.xml
+++ b/tex/context/interface/keys-it.xml
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
-<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" name="context" language="it" version="2007.08.07 01:37">
+<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" name="context" language="it" version="2007.08.08 14:35">
<cd:variables>
<cd:variable name="lesshyphenation" value="lesshyphenation"/>
diff --git a/tex/context/interface/keys-nl.xml b/tex/context/interface/keys-nl.xml
index 5fccd10a7..eac4f545d 100644
--- a/tex/context/interface/keys-nl.xml
+++ b/tex/context/interface/keys-nl.xml
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
-<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" name="context" language="nl" version="2007.08.07 01:37">
+<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" name="context" language="nl" version="2007.08.08 14:35">
<cd:variables>
<cd:variable name="lesshyphenation" value="lesshyphenation"/>
diff --git a/tex/context/interface/keys-ro.xml b/tex/context/interface/keys-ro.xml
index f1194cf49..2bf0b1792 100644
--- a/tex/context/interface/keys-ro.xml
+++ b/tex/context/interface/keys-ro.xml
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
-<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" name="context" language="ro" version="2007.08.07 01:37">
+<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" name="context" language="ro" version="2007.08.08 14:35">
<cd:variables>
<cd:variable name="lesshyphenation" value="lesshyphenation"/>
diff --git a/tex/context/sample/ward.tex b/tex/context/sample/ward.tex
index a95b90f5f..f73b62a58 100644
--- a/tex/context/sample/ward.tex
+++ b/tex/context/sample/ward.tex
@@ -2,4 +2,4 @@ The Earth, as a habitat for animal life, is in old age and
has a fatal illness. Several, in fact. It would be happening
whether humans had ever evolved or not. But our presence is
like the effect of an old|-|age patient who smokes many packs
-of cigarettes per day |.| and we humans are the cigarettes. \ No newline at end of file
+of cigarettes per day |=| and we humans are the cigarettes.
diff --git a/web2c/context.cnf b/web2c/context.cnf
index c5aec83d9..abe0d0b65 100644
--- a/web2c/context.cnf
+++ b/web2c/context.cnf
@@ -126,8 +126,8 @@ RUBYINPUTS = .;$CTXDEVRBPATH;$TEXMF/scripts/context/ruby
JAVAINPUTS = .;$CTXDEVJVPATH;$TEXMF/scripts/context/java
% LUAINPUTS = .;$TEXINPUTS;$TEXMFSCRIPTS
-LUAINPUTS = .;$CTXDEVLUPATH;$TEXINPUTS;$TEXMF/scripts/context/lua.;
-TEXMFSCRIPTS = .;$CTXDEVLUPATH;$TEXINPUTS;$CTXDEVRBPATH;$CTXDEVPLPATH;$TEXMF/scripts/context
+LUAINPUTS = .;$CTXDEVLUPATH;$TEXINPUTS;$TEXMF/scripts/context/lua
+TEXMFSCRIPTS = .;$CTXDEVLUPATH;$TEXINPUTS;$CTXDEVRBPATH;$CTXDEVPLPATH;$TEXMF/scripts/context//
% RUBYINPUTS = .;$CTXDEVPLPATH;$TEXMF/scripts/{$progname,$engine,}/ruby
% LUAINPUTS = .;$CTXDEVPYPATH;$TEXMF/scripts/{$progname,$engine,}/lua