summaryrefslogtreecommitdiff
path: root/tex
diff options
context:
space:
mode:
Diffstat (limited to 'tex')
-rw-r--r--tex/context/base/cont-new.mkii2
-rw-r--r--tex/context/base/cont-new.mkiv2
-rw-r--r--tex/context/base/context.mkii2
-rw-r--r--tex/context/base/context.mkiv2
-rw-r--r--tex/context/base/l-lpeg.lua32
-rw-r--r--tex/context/base/lxml-lpt.lua8
-rw-r--r--tex/context/base/status-files.pdfbin24378 -> 24380 bytes
-rw-r--r--tex/context/base/status-lua.pdfbin191343 -> 191341 bytes
-rw-r--r--tex/context/base/trac-lmx.lua14
-rw-r--r--tex/generic/context/luatex/luatex-fonts-merged.lua34
10 files changed, 16 insertions, 80 deletions
diff --git a/tex/context/base/cont-new.mkii b/tex/context/base/cont-new.mkii
index d2d1fa4a6..5bc49b4d0 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{2012.08.27 17:12}
+\newcontextversion{2012.08.28 20:00}
%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 d12e7ddf1..14fc10ce7 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{2012.08.27 17:12}
+\newcontextversion{2012.08.28 20:00}
%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.mkii b/tex/context/base/context.mkii
index b49c39293..0fd18a46a 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{2012.08.27 17:12}
+\edef\contextversion{2012.08.28 20:00}
%D For those who want to use this:
diff --git a/tex/context/base/context.mkiv b/tex/context/base/context.mkiv
index 8089824fc..1a587fcc4 100644
--- a/tex/context/base/context.mkiv
+++ b/tex/context/base/context.mkiv
@@ -25,7 +25,7 @@
%D up and the dependencies are more consistent.
\edef\contextformat {\jobname}
-\edef\contextversion{2012.08.27 17:12}
+\edef\contextversion{2012.08.28 20:00}
%D For those who want to use this:
diff --git a/tex/context/base/l-lpeg.lua b/tex/context/base/l-lpeg.lua
index 73a276f8a..b00b4c3bb 100644
--- a/tex/context/base/l-lpeg.lua
+++ b/tex/context/base/l-lpeg.lua
@@ -17,38 +17,6 @@ local lpeg = require("lpeg")
local report = texio and texio.write_nl or print
--- Watch this: Lua does some juggling with replacement values and although lpeg itself is agnostic of
--- % characters, the replacement isn't. Now, in all of the context sources these are only a few cases
--- where capture replacement instring happens. Interesting is that the string parsing already happens
--- when the lpeg is made, but nevertheless is a not that useful (at least for me) feature that has the
--- side effect that one always has to do %% in order to get a %. Okay, now that I know it is there, I
--- might use it more often.
---
--- local p = P("@") / "%"
--- lpeg.print(p) print(lpeg.match(p,"@"))
---
--- local p = P("@") / "%%"
--- lpeg.print(p) print(lpeg.match(p,"@"))
---
--- local p = C("@") * C("!") / "%2%1"
--- lpeg.print(p) print(lpeg.match(p,"@!"))
---
--- TRICKY:
---
--- local P, R, Cs = lpeg.P, lpeg.R, lpeg.Cs
---
--- local p = Cs(P("+")^0 * R("09")^1 * P(-1)) / function(s) return "l==" .. s end
--- print(lpeg.match(Cs(p),"+10"))
---
--- local p = P("+")^0 * R("09")^1 * P(-1) / function(s) return "l==" .. s end
--- print(lpeg.match(Cs(p),"+10"))
---
--- local p = Cs(P("+")^0 * R("09")^1 * P(-1)) / "l==%1"
--- print(lpeg.match(Cs(p),"+10"))
---
--- local p = P("+")^0 * R("09")^1 * P(-1) / "l==%1"
--- print(lpeg.match(Cs(p),"+10"))
-
-- local lpmatch = lpeg.match
-- local lpprint = lpeg.print
-- local lpp = lpeg.P
diff --git a/tex/context/base/lxml-lpt.lua b/tex/context/base/lxml-lpt.lua
index 9c784d3f5..426e07b15 100644
--- a/tex/context/base/lxml-lpt.lua
+++ b/tex/context/base/lxml-lpt.lua
@@ -542,11 +542,9 @@ local lp_attribute = (P("@") + P("attribute::")) / "" * Cc("(ll.at and ll.at['")
-- lp_fastpos_p = (P("+")^0 * R("09")^1 * P(-1)) / function(s) return "l==" .. s end
-- lp_fastpos_n = (P("-") * R("09")^1 * P(-1)) / function(s) return "(" .. s .. "<0 and (#list+".. s .. "==l))" end
---
--- Cs really needed here:
-lp_fastpos_p = C(P("+")^0 * R("09")^1 * P(-1)) / "l==%1"
-lp_fastpos_n = C(P("-") * R("09")^1 * P(-1)) / "(%1<0 and (#list+%1==l))"
+lp_fastpos_p = P("+")^0 * R("09")^1 * P(-1) / "l==%0"
+lp_fastpos_n = P("-") * R("09")^1 * P(-1) / "(%0<0 and (#list+%0==l))"
local lp_fastpos = lp_fastpos_n + lp_fastpos_p
@@ -556,7 +554,7 @@ local lp_reserved = C("and") + C("or") + C("not") + C("div") + C("mod") + C("tr
-- return t .. "("
-- end
-local lp_lua_function = C(R("az","AZ","__")^1 * (P(".") * R("az","AZ","__")^1)^1) * ("(") / "%1("
+local lp_lua_function = (R("az","AZ","__")^1 * (P(".") * R("az","AZ","__")^1)^1) * ("(") / "%0("
local lp_function = C(R("az","AZ","__")^1) * P("(") / function(t) -- todo: better . handling
if expressions[t] then
diff --git a/tex/context/base/status-files.pdf b/tex/context/base/status-files.pdf
index 2ac601dce..20c7b966c 100644
--- a/tex/context/base/status-files.pdf
+++ b/tex/context/base/status-files.pdf
Binary files differ
diff --git a/tex/context/base/status-lua.pdf b/tex/context/base/status-lua.pdf
index ae15165ed..37adeca31 100644
--- a/tex/context/base/status-lua.pdf
+++ b/tex/context/base/status-lua.pdf
Binary files differ
diff --git a/tex/context/base/trac-lmx.lua b/tex/context/base/trac-lmx.lua
index 04740d0d5..e1805099e 100644
--- a/tex/context/base/trac-lmx.lua
+++ b/tex/context/base/trac-lmx.lua
@@ -95,7 +95,7 @@ lmx.html = html
function html.td(str)
if type(str) == "table" then
for i=1,#str do -- spoils t !
- str[i] = format("<td>%s</td>",str[i])
+ str[i] = format("<td>%s</td>",str[i] or "")
end
result[#result+1] = concat(str)
else
@@ -200,7 +200,7 @@ local function do_type_variable(str)
end
local function do_include(filename) -- todo: store paths of loaded files
- local stylepath = do_variable('includepath') -- variables[str]
+ local stylepath = lmxvariables.includepath
local data = loadedfile(filename)
if (not data or data == "") and stylepath and stylepath ~= "" then
data = loadedfile(file.join(stylepath,filename))
@@ -370,9 +370,11 @@ local luacodecss = beginluacss
* (1-endluacss)^1
* endluacss
-local othercode = Cc(" p[==[")
- * (1-beginluaxml-beginluacss)^1
- * Cc("]==] ")
+-- local othercode = Cc(" p[==[")
+-- * (1-beginluaxml-beginluacss)^1
+-- * Cc("]==] ")
+
+local othercode = (1-beginluaxml-beginluacss)^1 / " p[==[%0]==] "
local include = ((beginembedxml * P("lmx-include") * whitespace) / "")
* (argument / lmx.include)
@@ -418,7 +420,6 @@ function lmxnew(data,defaults)
data = data or ""
local known = cache[data]
if not known then
- defaults = defaults or { }
data = lpegmatch(pattern_1,data)
data = lpegmatch(pattern_2,data,1,{})
data = lpegmatch(pattern_3,data)
@@ -426,6 +427,7 @@ function lmxnew(data,defaults)
if converted then
converted = converted()
end
+ defaults = defaults or { }
local converter
if converted then
converter = function(variables)
diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua
index 670573dd8..afdabf931 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 : 08/27/12 17:12:53
+-- merge date : 08/28/12 20:00:42
do -- begin closure to overcome local limits and interference
@@ -1135,38 +1135,6 @@ local lpeg = require("lpeg")
local report = texio and texio.write_nl or print
--- Watch this: Lua does some juggling with replacement values and although lpeg itself is agnostic of
--- % characters, the replacement isn't. Now, in all of the context sources these are only a few cases
--- where capture replacement instring happens. Interesting is that the string parsing already happens
--- when the lpeg is made, but nevertheless is a not that useful (at least for me) feature that has the
--- side effect that one always has to do %% in order to get a %. Okay, now that I know it is there, I
--- might use it more often.
---
--- local p = P("@") / "%"
--- lpeg.print(p) print(lpeg.match(p,"@"))
---
--- local p = P("@") / "%%"
--- lpeg.print(p) print(lpeg.match(p,"@"))
---
--- local p = C("@") * C("!") / "%2%1"
--- lpeg.print(p) print(lpeg.match(p,"@!"))
---
--- TRICKY:
---
--- local P, R, Cs = lpeg.P, lpeg.R, lpeg.Cs
---
--- local p = Cs(P("+")^0 * R("09")^1 * P(-1)) / function(s) return "l==" .. s end
--- print(lpeg.match(Cs(p),"+10"))
---
--- local p = P("+")^0 * R("09")^1 * P(-1) / function(s) return "l==" .. s end
--- print(lpeg.match(Cs(p),"+10"))
---
--- local p = Cs(P("+")^0 * R("09")^1 * P(-1)) / "l==%1"
--- print(lpeg.match(Cs(p),"+10"))
---
--- local p = P("+")^0 * R("09")^1 * P(-1) / "l==%1"
--- print(lpeg.match(Cs(p),"+10"))
-
-- local lpmatch = lpeg.match
-- local lpprint = lpeg.print
-- local lpp = lpeg.P