diff options
-rw-r--r-- | scripts/context/lua/mtx-context.lua | 21 | ||||
-rw-r--r-- | scripts/context/lua/mtx-flac.lua | 20 | ||||
-rw-r--r-- | tex/context/base/cont-new.mkii | 2 | ||||
-rw-r--r-- | tex/context/base/cont-new.mkiv | 2 | ||||
-rw-r--r-- | tex/context/base/context.mkii | 2 | ||||
-rw-r--r-- | tex/context/base/context.mkiv | 2 | ||||
-rw-r--r-- | tex/context/base/status-files.pdf | bin | 23594 -> 23635 bytes | |||
-rw-r--r-- | tex/context/base/status-lua.pdf | bin | 155253 -> 155254 bytes | |||
-rw-r--r-- | tex/context/base/strc-lst.lua | 4 | ||||
-rw-r--r-- | tex/context/base/strc-lst.mkiv | 2 | ||||
-rw-r--r-- | tex/generic/context/luatex-fonts-merged.lua | 2 |
11 files changed, 31 insertions, 26 deletions
diff --git a/scripts/context/lua/mtx-context.lua b/scripts/context/lua/mtx-context.lua index 36e3efb6b..540f35100 100644 --- a/scripts/context/lua/mtx-context.lua +++ b/scripts/context/lua/mtx-context.lua @@ -664,13 +664,17 @@ local function analyze(filename) -- only files on current path return nil end -local function makestub(template,filename,prepname) +local function makestub(wrap,template,filename,prepname) local stubname = file.replacesuffix(file.basename(filename),'run') local f = io.open(stubname,'w') if f then - f:write("\\starttext\n") + if wrap then + f:write("\\starttext\n") + end f:write(format(template,prepname or filename),"\n") - f:write("\\stoptext\n") + if wrap then + f:write("\\stoptext\n") + end f:close() filename = stubname end @@ -775,17 +779,18 @@ function scripts.context.run(ctxdata,filename) local suffix = file.extname(filename) or "?" if scripts.context.xmlsuffixes[suffix] or environment.argument("forcexml") then if environment.argument("mkii") then - filename = makestub("\\processXMLfilegrouped{%s}",filename) + filename = makestub(true,"\\processXMLfilegrouped{%s}",filename) else - filename = makestub("\\xmlprocess{\\xmldocument}{%s}{}",filename) + filename = makestub(true,"\\xmlprocess{\\xmldocument}{%s}{}",filename) end elseif scripts.context.cldsuffixes[suffix] or environment.argument("forcecld") then - filename = makestub("\\ctxlua{context.runfile('%s')}",filename) + -- self contained cld files need to have a starttext/stoptext (less fontloading) + filename = makestub(false,"\\ctxlua{context.runfile('%s')}",filename) elseif scripts.context.luasuffixes[suffix] or environment.argument("forcelua") then - filename = makestub("\\ctxlua{dofile('%s')}",filename) + filename = makestub(true,"\\ctxlua{dofile('%s')}",filename) elseif environment.argument("prep") then -- we need to keep the original jobname - filename = makestub("\\readfile{%s}{}{}",filename,ctxrunner.preppedfile(ctxdata,filename)) + filename = makestub(true,"\\readfile{%s}{}{}",filename,ctxrunner.preppedfile(ctxdata,filename)) end -- -- todo: also other stubs diff --git a/scripts/context/lua/mtx-flac.lua b/scripts/context/lua/mtx-flac.lua index dc7f89218..0f517f3d4 100644 --- a/scripts/context/lua/mtx-flac.lua +++ b/scripts/context/lua/mtx-flac.lua @@ -133,29 +133,29 @@ function flac.savecollection(pattern,filename) nofartists = nofartists + 1 f:write("\t<artist>\n") f:write("\t\t<name>" .. artist .. "</name>\n") - f:write("\t\t\t<albums>\n") + f:write("\t\t<albums>\n") for album, data in table.sortedpairs(albums) do nofalbums = nofalbums + 1 - f:write("\t\t\t\t<album year='" .. (data.year or 0) .. "'>\n") - f:write("\t\t\t\t\t<name>" .. album .. "</name>\n") - f:write("\t\t\t\t\t<tracks>\n") + f:write("\t\t\t<album year='" .. (data.year or 0) .. "'>\n") + f:write("\t\t\t\t<name>" .. album .. "</name>\n") + f:write("\t\t\t\t<tracks>\n") local tracks = data.tracks for i=1,#tracks do local track = tracks[i] if track then noftracks = noftracks + 1 - f:write("\t\t\t\t\t\t<track length='" .. track.length .. "'>" .. track.title .. "</track>\n") + f:write("\t\t\t\t\t<track length='" .. track.length .. "'>" .. track.title .. "</track>\n") else noferrors = noferrors + 1 flac.report("error in album: %q of artist",album,artist) - f:write("\t\t\t\t\t\t<error track='" .. i .. "'/>\n") + f:write("\t\t\t\t\t<error track='" .. i .. "'/>\n") end end - f:write("\t\t\t\t\t</tracks>\n") - f:write("\t\t\t\t</album>\n") + f:write("\t\t\t\t</tracks>\n") + f:write("\t\t\t</album>\n") end - f:write("\t\t\t</albums>\n") - f:write("\t\t</artist>\n") + f:write("\t\t</albums>\n") + f:write("\t</artist>\n") end f:write("</collection>\n") end diff --git a/tex/context/base/cont-new.mkii b/tex/context/base/cont-new.mkii index f18aa4a2c..dffa7076d 100644 --- a/tex/context/base/cont-new.mkii +++ b/tex/context/base/cont-new.mkii @@ -11,7 +11,7 @@ %C therefore copyrighted by \PRAGMA. See mreadme.pdf for %C details. -\newcontextversion{2011.04.22 18:17} +\newcontextversion{2011.04.23 22:29} %D This file is loaded at runtime, thereby providing an %D excellent place for hacks, patches, extensions and new diff --git a/tex/context/base/cont-new.mkiv b/tex/context/base/cont-new.mkiv index cd2518e64..71cbb42c5 100644 --- a/tex/context/base/cont-new.mkiv +++ b/tex/context/base/cont-new.mkiv @@ -11,7 +11,7 @@ %C therefore copyrighted by \PRAGMA. See mreadme.pdf for %C details. -\newcontextversion{2011.04.22 18:17} +\newcontextversion{2011.04.23 22:29} %D This file is loaded at runtime, thereby providing an %D excellent place for hacks, patches, extensions and new diff --git a/tex/context/base/context.mkii b/tex/context/base/context.mkii index 9b252fc19..40d111711 100644 --- a/tex/context/base/context.mkii +++ b/tex/context/base/context.mkii @@ -20,7 +20,7 @@ %D your styles an modules. \edef\contextformat {\jobname} -\edef\contextversion{2011.04.22 18:17} +\edef\contextversion{2011.04.23 22:29} %D For those who want to use this: diff --git a/tex/context/base/context.mkiv b/tex/context/base/context.mkiv index 9b783a093..a09b7866e 100644 --- a/tex/context/base/context.mkiv +++ b/tex/context/base/context.mkiv @@ -20,7 +20,7 @@ %D your styles an modules. \edef\contextformat {\jobname} -\edef\contextversion{2011.04.22 18:17} +\edef\contextversion{2011.04.23 22:29} %D For those who want to use this: diff --git a/tex/context/base/status-files.pdf b/tex/context/base/status-files.pdf Binary files differindex 03ad47eb3..2c76454fc 100644 --- a/tex/context/base/status-files.pdf +++ b/tex/context/base/status-files.pdf diff --git a/tex/context/base/status-lua.pdf b/tex/context/base/status-lua.pdf Binary files differindex 554a3d15f..9e8f90efa 100644 --- a/tex/context/base/status-lua.pdf +++ b/tex/context/base/status-lua.pdf diff --git a/tex/context/base/strc-lst.lua b/tex/context/base/strc-lst.lua index 086f42c93..21015e43a 100644 --- a/tex/context/base/strc-lst.lua +++ b/tex/context/base/strc-lst.lua @@ -489,11 +489,11 @@ function lists.location(n) texsprint(l.references.internal or n) end -function lists.label(n) +function lists.label(n,default) local l = lists.result[n] local t = l.titledata if t then - texsprint(t.label) + texsprint(t.label or default or "") end end diff --git a/tex/context/base/strc-lst.mkiv b/tex/context/base/strc-lst.mkiv index 26e2392bd..c2be8338a 100644 --- a/tex/context/base/strc-lst.mkiv +++ b/tex/context/base/strc-lst.mkiv @@ -564,7 +564,7 @@ \else\ifx\currentlistlabel\v!none % real minimal (as suggested by WS) \currentlistnumber \else\ifx\currentlistlabel\v!yes % auto (use value stored in tuc file) - \edef\currentlistlabel{\ctxlua{structures.lists.label(\currentlistindex)}}% + \edef\currentlistlabel{\ctxlua{structures.lists.label(\currentlistindex,"\currentlistlabel")}}% \leftlabeltext\currentlistlabel \listparameter\c!starter \currentlistnumber diff --git a/tex/generic/context/luatex-fonts-merged.lua b/tex/generic/context/luatex-fonts-merged.lua index e2c86f1ac..bab0b14bf 100644 --- a/tex/generic/context/luatex-fonts-merged.lua +++ b/tex/generic/context/luatex-fonts-merged.lua @@ -1,6 +1,6 @@ -- merged file : luatex-fonts-merged.lua -- parent file : luatex-fonts.lua --- merge date : 04/22/11 18:17:39 +-- merge date : 04/23/11 22:29:11 do -- begin closure to overcome local limits and interference |