summaryrefslogtreecommitdiff
path: root/tex/context/base
diff options
context:
space:
mode:
Diffstat (limited to 'tex/context/base')
-rw-r--r--tex/context/base/cont-new.tex2
-rw-r--r--tex/context/base/context.tex2
-rw-r--r--tex/context/base/lang-ger.tex2
-rw-r--r--tex/context/base/sort-ini.lua10
-rw-r--r--tex/context/base/strc-ref.lua18
-rw-r--r--tex/context/base/typo-krn.lua2
6 files changed, 23 insertions, 13 deletions
diff --git a/tex/context/base/cont-new.tex b/tex/context/base/cont-new.tex
index 4c5e918ec..e6c4c69e1 100644
--- a/tex/context/base/cont-new.tex
+++ b/tex/context/base/cont-new.tex
@@ -11,7 +11,7 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-\newcontextversion{2010.09.16 10:46}
+\newcontextversion{2010.09.18 12:08}
%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.tex b/tex/context/base/context.tex
index d67a066d0..2a1eea762 100644
--- a/tex/context/base/context.tex
+++ b/tex/context/base/context.tex
@@ -20,7 +20,7 @@
%D your styles an modules.
\edef\contextformat {\jobname}
-\edef\contextversion{2010.09.16 10:46}
+\edef\contextversion{2010.09.18 12:08}
%D For those who want to use this:
diff --git a/tex/context/base/lang-ger.tex b/tex/context/base/lang-ger.tex
index 5124f7501..a3cf45e20 100644
--- a/tex/context/base/lang-ger.tex
+++ b/tex/context/base/lang-ger.tex
@@ -116,7 +116,7 @@
\c!leftquotation=\upperleftdoublesixquote,
\c!rightquotation=\upperrightdoubleninequote,
\c!date={\v!year,\ ,\v!month,\ ,\v!day},
- \s!patterns=\s!nl]
+ \s!patterns=\s!af] % was nl
\installlanguage
[\s!nb]
diff --git a/tex/context/base/sort-ini.lua b/tex/context/base/sort-ini.lua
index 17cef9890..eebbb9aff 100644
--- a/tex/context/base/sort-ini.lua
+++ b/tex/context/base/sort-ini.lua
@@ -113,13 +113,13 @@ local function basicsort(sort_a,sort_b)
end
end
-function comparers.basic(a,b)
+function comparers.basic(a,b) -- trace ea and eb
local ea, eb = a.split, b.split
local na, nb = #ea, #eb
if na == 0 and nb == 0 then
-- simple variant (single word)
local result = basicsort(ea.e,eb.e)
- return result == 0 and result or basicsort(ea.m,eb.m)
+ return (result == 0 and result) or basicsort(ea.m,eb.m)
else
-- complex variant, used in register (multiple words)
local result = 0
@@ -199,7 +199,9 @@ function splitters.utf(str)
e[n] = currentmappings[ec] or mc
m[n] = mc
end
- return { s = s, e = e, m = m }
+ local t = { s = s, e = e, m = m }
+--~ table.print(t)
+ return t
end
-- we can use one array instead (sort of like in mkii)
@@ -263,7 +265,7 @@ function sorters.sort(entries,cmp)
if trace_tests then
sort(entries,function(a,b)
local r = cmp(a,b)
- report_sorters("%s %s %s",pack(a),(not r and "?") or (r<0 and "<") or (r>0 and ">") or "=",pack(b))
+ report_sorters("%s %s %s (%s)",pack(a),(not r and "?") or (r<0 and "<") or (r>0 and ">") or "=",pack(b),r)
return r == -1
end)
local s
diff --git a/tex/context/base/strc-ref.lua b/tex/context/base/strc-ref.lua
index 4962b8d8f..9345dc3bf 100644
--- a/tex/context/base/strc-ref.lua
+++ b/tex/context/base/strc-ref.lua
@@ -632,6 +632,8 @@ end
-- t.special t.operation t.arguments t.outer t.inner
+local prefixsplitter = lpeg.splitat(":")
+
local function resolve(prefix,reference,args,set) -- we start with prefix,reference
texcount.referencehastexstate = 0
if reference and reference ~= "" then
@@ -653,13 +655,19 @@ local function resolve(prefix,reference,args,set) -- we start with prefix,refere
if var then
var.reference = ri
if not var.outer and var.inner then
---~ local d = defined[prefix]
---~ d = d and d[var.inner]
+ local d = defined[prefix]
+ d = d and d[var.inner]
--~ if not d then
---~ d = defined[""]
---~ d = d and d[var.inner]
+--~ local p, r = lpegmatch(prefixsplitter,var.inner)
+--~ d = defined[p]
+--~ d = d and d[r]
+--~ print(p,r,d)
+--~ table.print(defined)
--~ end
- local d = defined[prefix] or defined[""]
+ if not d then
+ d = defined[""]
+ d = d and d[var.inner]
+ end
d = d and d[var.inner]
if d then
resolve(prefix,d[2],var.arguments,set) -- args can be nil
diff --git a/tex/context/base/typo-krn.lua b/tex/context/base/typo-krn.lua
index 97a6f61a4..83f2e9102 100644
--- a/tex/context/base/typo-krn.lua
+++ b/tex/context/base/typo-krn.lua
@@ -28,7 +28,7 @@ local texattribute = tex.attribute
local nodepool = nodes.pool
local tasks = nodes.tasks
-local new_gluespec = nodepool.glue_spec
+local new_gluespec = nodepool.gluespec
local new_kern = nodepool.kern
local nodecodes = nodes.nodecodes