summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarius <mariausol@gmail.com>2014-01-19 01:20:15 +0200
committerMarius <mariausol@gmail.com>2014-01-19 01:20:15 +0200
commit2cfd594ab60ba445bc2efac7a2eac2d6df23f3b9 (patch)
treec57d2f794a20c03a718689c72b5749dc038b35d8
parent11620c88a569cbab66c50271f7cc41a4e99973ff (diff)
downloadcontext-2cfd594ab60ba445bc2efac7a2eac2d6df23f3b9.tar.gz
beta 2014.01.19 00:10
-rw-r--r--doc/context/manuals/allkind/mkiv-publications.tex5
-rw-r--r--tex/context/base/cont-new.mkiv2
-rw-r--r--tex/context/base/context-version.pdfbin4086 -> 4083 bytes
-rw-r--r--tex/context/base/context.mkiv2
-rw-r--r--tex/context/base/publ-aut.lua46
-rw-r--r--tex/context/base/sort-ini.lua43
-rw-r--r--tex/context/base/status-files.pdfbin24785 -> 24795 bytes
-rw-r--r--tex/context/base/status-lua.pdfbin229057 -> 229198 bytes
-rw-r--r--tex/generic/context/luatex/luatex-fonts-merged.lua2
9 files changed, 67 insertions, 33 deletions
diff --git a/doc/context/manuals/allkind/mkiv-publications.tex b/doc/context/manuals/allkind/mkiv-publications.tex
index 6fe7f5b4e..8d88e5dbd 100644
--- a/doc/context/manuals/allkind/mkiv-publications.tex
+++ b/doc/context/manuals/allkind/mkiv-publications.tex
@@ -885,7 +885,10 @@ We can now typeset the entries with:
\typebuffer
Because we just want to show the entries, and have no citations that force them
-to be shown, we have to the \type {method} to \type {dataset}.
+to be shown, we have to the \type {method} to \type {dataset}. \footnote {Gavin
+Harrison is in my opinion one of the most creative, diverse and interesting
+drummers of our time. It's also fascinating to watch him play and a welcome
+distraction from writing code and manuals.}
\blank \getbuffer \blank
diff --git a/tex/context/base/cont-new.mkiv b/tex/context/base/cont-new.mkiv
index 0e5cda579..3c2859c98 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.01.18 13:23}
+\newcontextversion{2014.01.19 00:10}
%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 39af93301..6d5db6f4a 100644
--- a/tex/context/base/context-version.pdf
+++ b/tex/context/base/context-version.pdf
Binary files differ
diff --git a/tex/context/base/context.mkiv b/tex/context/base/context.mkiv
index b3743bbe3..90d9cb30e 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.01.18 13:23}
+\edef\contextversion{2014.01.19 00:10}
\edef\contextkind {beta}
%D For those who want to use this:
diff --git a/tex/context/base/publ-aut.lua b/tex/context/base/publ-aut.lua
index 12256f74e..92069245b 100644
--- a/tex/context/base/publ-aut.lua
+++ b/tex/context/base/publ-aut.lua
@@ -465,26 +465,40 @@ function authors.sorted(dataset,list,sorttype) -- experimental
if entry then
local key = entry[sorttype]
local suf = tostring(i)
+ local split
if key then
- local split = { }
- for i=1,#key do
- local k = key[i]
- local vons = table.concat(k.vons," ")
- local surnames = table.concat(k.surnames," ")
- local assembled = (#vons > 0 and vons .. " " .. surnames) or surnames
- split[i] = splitter(strip(assembled .. ":" .. suf))
+ split = { }
+ local n = #key
+ if n > 0 then
+ -- least efficient
+ for i=1,n do
+ local k = key[i]
+ local vons = k.vons
+ local surs = k.surnames
+ local vons = vons and concat(vons," ")
+ local surs = surs and concat(surs," ") or ""
+ local assembled = (vons and #vons > 0 and vons .. " " .. surs) or surs
+ split[i] = splitter(strip(assembled),true)
+ end
+ split[n+1] = splitter(suf)
+ else
+ -- medium efficient
+ local k = key[1]
+ local vons = k.vons
+ local surs = k.surnames
+ local vons = vons and concat(vons," ")
+ local surs = surs and concat(surs," ") or ""
+ local assembled = (vons and #vons > 0 and vons .. " " .. surs) or surs
+ split = splitter(strip(assembled..":"..suf),true)
end
- valid[i] = {
- index = i,
- split = split,
- }
else
- local split = splitter(suf)
- valid[i] = {
- index = i,
- split = split,
- }
+ -- efficient fallback
+ split = splitter(suf,true)
end
+ valid[i] = {
+ index = i,
+ split = split,
+ }
end
end
-- inspect(valid)
diff --git a/tex/context/base/sort-ini.lua b/tex/context/base/sort-ini.lua
index 479d1c489..2a3ea1e89 100644
--- a/tex/context/base/sort-ini.lua
+++ b/tex/context/base/sort-ini.lua
@@ -120,7 +120,7 @@ local sorters = sorters
local constants = sorters.constants
local data, language, method, digits
-local replacements, m_mappings, z_mappings, p_mappings, entries, orders, lower, upper, method, sequence
+local replacements, m_mappings, z_mappings, p_mappings, entries, orders, lower, upper, method, sequence, usedinsequence
local thefirstofsplit
local mte = { -- todo: assign to t
@@ -334,6 +334,8 @@ local function setlanguage(l,m,d,u)
end
end
data.sequence = sequence
+ usedinsequence = table.tohash(sequence)
+ data.usedinsequence = usedinsequence
if trace_tests then
report_sorters("using sort sequence: % t",sequence)
end
@@ -372,6 +374,8 @@ local function basicsort(sort_a,sort_b)
return 0
end
+-- todo: compile compare function
+
function comparers.basic(a,b) -- trace ea and eb
local ea, eb = a.split, b.split
local na, nb = #ea, #eb
@@ -477,7 +481,7 @@ sorters.firstofsplit = firstofsplit
-- for the moment we use an inefficient bunch of tables but once
-- we know what combinations make sense we can optimize this
-function splitters.utf(str) -- we could append m and u but this is cleaner, s is for tracing
+function splitters.utf(str,checked) -- we could append m and u but this is cleaner, s is for tracing
if #replacements > 0 then
-- todo make an lpeg for this
for k=1,#replacements do
@@ -580,18 +584,31 @@ function splitters.utf(str) -- we could append m and u but this is cleaner, s is
-- p_mapping = { p_mappings[fs][1] }
-- end
-- end
- local t = {
- ch = char,
- uc = byte,
- mc = m_case,
- zc = z_case,
- pc = p_case,
- mm = m_mapping,
- zm = z_mapping,
- pm = p_mapping,
- }
- return t
+ if checked then
+ return {
+ ch = usedinsequence.ch and char or nil, -- not in sequence
+ uc = usedinsequence.uc and byte or nil,
+ mc = usedinsequence.mc and m_case or nil,
+ zc = usedinsequence.zc and z_case or nil,
+ pc = usedinsequence.pc and p_case or nil,
+ mm = usedinsequence.mm and m_mapping or nil,
+ zm = usedinsequence.zm and z_mapping or nil,
+ pm = usedinsequence.pm and p_mapping or nil,
+ }
+ else
+ return {
+ ch = char,
+ uc = byte,
+ mc = m_case,
+ zc = z_case,
+ pc = p_case,
+ mm = m_mapping,
+ zm = z_mapping,
+ pm = p_mapping,
+ }
+ end
+
end
local function packch(entry)
diff --git a/tex/context/base/status-files.pdf b/tex/context/base/status-files.pdf
index 2daf3dee7..118cfa85b 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 23966b542..aaf1a3fe1 100644
--- a/tex/context/base/status-lua.pdf
+++ b/tex/context/base/status-lua.pdf
Binary files differ
diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua
index e85e075a6..ea6a3a34e 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 : 01/18/14 13:23:27
+-- merge date : 01/19/14 00:10:42
do -- begin closure to overcome local limits and interference