From f3d55cd2bd81fbf44a74e44686fc7b4675bce31f Mon Sep 17 00:00:00 2001 From: Context Git Mirror Bot Date: Wed, 31 Dec 2014 17:15:05 +0100 Subject: 2014-12-31 16:54:00 --- tex/context/base/cont-log.mkiv | 2 +- tex/context/base/cont-new.mkiv | 2 +- tex/context/base/context-version.pdf | Bin 4386 -> 4385 bytes tex/context/base/context.mkiv | 2 +- tex/context/base/data-res.lua | 7 +++- tex/context/base/l-file.lua | 4 +- tex/context/base/publ-dat.lua | 10 +++-- tex/context/base/status-files.pdf | Bin 24874 -> 24873 bytes tex/context/base/status-lua.pdf | Bin 345890 -> 345975 bytes tex/context/base/trac-lmx.lua | 5 +-- tex/context/base/util-prs.lua | 44 ++++++++++++++++----- tex/generic/context/luatex/luatex-fonts-merged.lua | 2 +- 12 files changed, 55 insertions(+), 23 deletions(-) (limited to 'tex') diff --git a/tex/context/base/cont-log.mkiv b/tex/context/base/cont-log.mkiv index ee0dbb09d..cb3b6a58e 100644 --- a/tex/context/base/cont-log.mkiv +++ b/tex/context/base/cont-log.mkiv @@ -93,7 +93,7 @@ \unexpanded\def\Context % wrong usage of \getscaledglyph {\dontleavehmode \begingroup - C\kern -.0667\emwidth{.8}\empty{O\kern -.0667\emwidth N\kern + C\kern -.0667\emwidth\getscaledglyph{.8}\empty{O\kern -.0667\emwidth N\kern -.0549\emwidth T\doifitalicelse{\kern-.1\emwidth}{\kern-.1667\emwidth}\lower.5\exheight\hbox {E}\doifitalicelse\empty{\kern-.11em}X\kern-.055\emwidth T}% \endgroup} diff --git a/tex/context/base/cont-new.mkiv b/tex/context/base/cont-new.mkiv index 7d03cf1a5..ed1b174c8 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{2014.12.30 09:48} +\newcontextversion{2014.12.31 16:52} %D This file is loaded at runtime, thereby providing an excellent place for %D hacks, patches, extensions and new features. diff --git a/tex/context/base/context-version.pdf b/tex/context/base/context-version.pdf index 7b10218d4..c9fef1602 100644 Binary files a/tex/context/base/context-version.pdf and b/tex/context/base/context-version.pdf differ diff --git a/tex/context/base/context.mkiv b/tex/context/base/context.mkiv index a533be7f9..f8c1bd0be 100644 --- a/tex/context/base/context.mkiv +++ b/tex/context/base/context.mkiv @@ -28,7 +28,7 @@ %D up and the dependencies are more consistent. \edef\contextformat {\jobname} -\edef\contextversion{2014.12.30 09:48} +\edef\contextversion{2014.12.31 16:52} \edef\contextkind {beta} %D For those who want to use this: diff --git a/tex/context/base/data-res.lua b/tex/context/base/data-res.lua index dbd212921..26cfe673a 100644 --- a/tex/context/base/data-res.lua +++ b/tex/context/base/data-res.lua @@ -253,6 +253,7 @@ function resolvers.newinstance() -- todo: all vars will become lowercase and alp savelists = true, pattern = nil, -- lists force_suffixes = true, + pathstack = { }, } setmetatableindex(variables,function(t,k) @@ -1365,14 +1366,16 @@ local function makepathlist(list,filetype) if pathlist and #pathlist > 0 then for k=1,#pathlist do local path = pathlist[k] + local prescanned = find(path,'^!!') + local resursive = find(path,'//$') local pathname = lpegmatch(inhibitstripper,path) local expression = makepathexpression(pathname) local barename = gsub(pathname,"/+$","") barename = resolveprefix(barename) local scheme = url.hasscheme(barename) local schemename = gsub(barename,"%.%*$",'') -- after scheme - local prescanned = path ~= pathname -- ^!! - local resursive = find(pathname,'//$') + -- local prescanned = path ~= pathname -- ^!! + -- local resursive = find(pathname,'//$') entry[k] = { path = path, pathname = pathname, diff --git a/tex/context/base/l-file.lua b/tex/context/base/l-file.lua index 2c471d727..7ed6370f2 100644 --- a/tex/context/base/l-file.lua +++ b/tex/context/base/l-file.lua @@ -157,8 +157,8 @@ file.suffix = suffixonly file.suffixesonly = suffixesonly file.suffixes = suffixesonly -file.dirname = pathpart -- obsolete -file.extname = suffixonly -- obsolete +file.dirname = pathpart -- obsolete +file.extname = suffixonly -- obsolete -- actually these are schemes diff --git a/tex/context/base/publ-dat.lua b/tex/context/base/publ-dat.lua index 88631a0d6..f022f6ade 100644 --- a/tex/context/base/publ-dat.lua +++ b/tex/context/base/publ-dat.lua @@ -1034,11 +1034,15 @@ do return values end) - casters.keyword = utilities.parsers.settings_to_array + local keywordsplitter = utilities.parsers.groupedsplitat(";,") - local pagessplitter = lpeg.splitat(P("-")^1) + casters.keyword = function(str) + return lpegmatch(keywordsplitter,str) + end + + local pagessplitter = lpeg.splitat(P("-")^1) - casters.pagenumber = function(str) + casters.pagenumber = function(str) local first, last = lpegmatch(pagessplitter,str) return first and last and { first, last } or str end diff --git a/tex/context/base/status-files.pdf b/tex/context/base/status-files.pdf index d5af6d8ff..85959a730 100644 Binary files a/tex/context/base/status-files.pdf and b/tex/context/base/status-files.pdf differ diff --git a/tex/context/base/status-lua.pdf b/tex/context/base/status-lua.pdf index 0b601c9ba..a62ccd5b5 100644 Binary files a/tex/context/base/status-lua.pdf and b/tex/context/base/status-lua.pdf differ diff --git a/tex/context/base/trac-lmx.lua b/tex/context/base/trac-lmx.lua index d85bd81d5..4f4ea62c4 100644 --- a/tex/context/base/trac-lmx.lua +++ b/tex/context/base/trac-lmx.lua @@ -665,14 +665,13 @@ function lmx.color(r,g,b,a) end end - -- these can be overloaded lmx.lmxfile = string.itself lmx.htmfile = string.itself lmx.popupfile = os.launch -function lmxmake(name,variables) +local function lmxmake(name,variables) local lmxfile = lmx.lmxfile(name) local htmfile = lmx.htmfile(name) if lmxfile == htmfile then @@ -682,7 +681,7 @@ function lmxmake(name,variables) return htmfile end -lmxmake = lmx.make +lmx.make = lmxmake function lmx.show(name,variables) local htmfile = lmxmake(name,variables) diff --git a/tex/context/base/util-prs.lua b/tex/context/base/util-prs.lua index 642968ccb..302b98441 100644 --- a/tex/context/base/util-prs.lua +++ b/tex/context/base/util-prs.lua @@ -167,7 +167,7 @@ local value = P(lbrace * C((nobrace + nestedbraces)^0) * rbrace) + C((nestedbraces + (1-comma))^0) local pattern = spaces * Ct(value*(separator*value)^0) --- "aap, {noot}, mies" : outer {} removes, leading spaces ignored +-- "aap, {noot}, mies" : outer {} removed, leading spaces ignored patterns.settings_to_array = pattern @@ -195,12 +195,40 @@ end -- -- "{123} , 456 " -> "123" "456" -local separator = space^0 * comma * space^0 -local value = P(lbrace * C((nobrace + nestedbraces)^0) * rbrace) - + C((nestedbraces + (1-(space^0*(comma+P(-1)))))^0) -local withvalue = Carg(1) * value / function(f,s) return f(s) end -local pattern_a = spaces * Ct(value*(separator*value)^0) -local pattern_b = spaces * withvalue * (separator*withvalue)^0 +-- local separator = space^0 * comma * space^0 +-- local value = P(lbrace * C((nobrace + nestedbraces)^0) * rbrace) +-- + C((nestedbraces + (1-(space^0*(comma+P(-1)))))^0) +-- local withvalue = Carg(1) * value / function(f,s) return f(s) end +-- local pattern_a = spaces * Ct(value*(separator*value)^0) +-- local pattern_b = spaces * withvalue * (separator*withvalue)^0 + +local cache_a = { } +local cache_b = { } + +function parsers.groupedsplitat(symbol,withaction) + if not symbol then + symbol = "," + end + local pattern = (withaction and cache_b or cache_a)[symbol] + if not pattern then + local symbols = S(symbol) + local separator = space^0 * symbols * space^0 + local value = P(lbrace * C((nobrace + nestedbraces)^0) * rbrace) + + C((nestedbraces + (1-(space^0*(symbols+P(-1)))))^0) + if withaction then + local withvalue = Carg(1) * value / function(f,s) return f(s) end + pattern = spaces * withvalue * (separator*withvalue)^0 + cache_b[symbol] = pattern + else + pattern = spaces * Ct(value*(separator*value)^0) + cache_a[symbol] = pattern + end + end + return pattern +end + +local pattern_a = parsers.groupedsplitat(",",false) +local pattern_b = parsers.groupedsplitat(",",true) function parsers.stripped_settings_to_array(str) if not str or str == "" then @@ -221,8 +249,6 @@ end -- parsers.process_stripped_settings("{123} , 456 ",function(s) print("["..s.."]") end) -- parsers.process_stripped_settings("123 , 456 ",function(s) print("["..s.."]") end) --- - local function set(t,v) t[#t+1] = v end diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua index 884c5885e..6500989cc 100644 --- a/tex/generic/context/luatex/luatex-fonts-merged.lua +++ b/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 : 12/30/14 09:48:12 +-- merge date : 12/31/14 16:52:11 do -- begin closure to overcome local limits and interference -- cgit v1.2.3