summaryrefslogtreecommitdiff
path: root/tex
diff options
context:
space:
mode:
Diffstat (limited to 'tex')
-rw-r--r--tex/context/base/cont-new.mkiv2
-rw-r--r--tex/context/base/context-version.pdfbin4382 -> 4381 bytes
-rw-r--r--tex/context/base/context.mkiv2
-rw-r--r--tex/context/base/publ-aut.lua4
-rw-r--r--tex/context/base/publ-reg.lua56
-rw-r--r--tex/context/base/status-files.pdfbin24708 -> 24702 bytes
-rw-r--r--tex/context/base/status-lua.pdfbin333912 -> 333910 bytes
-rw-r--r--tex/generic/context/luatex/luatex-fonts-merged.lua2
8 files changed, 37 insertions, 29 deletions
diff --git a/tex/context/base/cont-new.mkiv b/tex/context/base/cont-new.mkiv
index c762b8773..ffa81330a 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.10.30 19:00}
+\newcontextversion{2014.10.30 20:05}
%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 5de272046..3bce35aea 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 a508baabb..91a684a24 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.10.30 19:00}
+\edef\contextversion{2014.10.30 20:05}
\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 9b9b84e4c..ed02ace54 100644
--- a/tex/context/base/publ-aut.lua
+++ b/tex/context/base/publ-aut.lua
@@ -383,11 +383,11 @@ local splitter = sorters.splitters.utf
local pubsorters = { }
authors.sorters = pubsorters
-local function components(snippet)
+local function components(snippet,short)
local vons = snippet.vons
local surnames = snippet.surnames
local initials = snippet.initials
- local firstnames = snippet.firstnames
+ local firstnames = not short and snippet.firstnames
local juniors = snippet.juniors
return
vons and #vons > 0 and concat(vons, " ") or "",
diff --git a/tex/context/base/publ-reg.lua b/tex/context/base/publ-reg.lua
index a7dc989e8..7ff284d49 100644
--- a/tex/context/base/publ-reg.lua
+++ b/tex/context/base/publ-reg.lua
@@ -24,7 +24,7 @@ local v_all = variables.all
local datasets = publications.datasets
local specifications = { }
local sequence = { }
-local flushers = { }
+local flushers = table.setmetatableindex(function(t,k) t[k] = default return default end)
function commands.setbtxregister(specification)
local name = specification.name
@@ -80,21 +80,18 @@ function commands.btxtoregister(dataset,tag)
local current = datasets[dataset]
local entry = current.luadata[tag]
if entry then
- local register = step.register
- local field = step.field
- local processor = step.processor
- local alternative = step.alternative
- local flusher = flushers[field] or flushers.default
+ local processor = step.processor
if processor and processor ~= "" then
- processor = "btx:r:" .. processor
+ step.processor = "btx:r:" .. processor
end
- flusher(register,dataset,tag,field,processor,alternative,current,entry,current.details[tag])
+ flushers[step.field or "default"](step,dataset,tag,current,entry,current.details[tag])
end
done[tag] = true
end
end
end
end
+
-- context.setregisterentry (
-- { register },
-- {
@@ -105,42 +102,53 @@ end
local ctx_dosetfastregisterentry = context.dosetfastregisterentry -- register entry key
-local p_keywords = lpeg.tsplitat(lpeg.patterns.whitespace^0 * lpeg.P(";") * lpeg.patterns.whitespace^0)
-local serialize = publications.serializeauthor
-local components = publications.authorcomponents
-local f_author = formatters[ [[\btxindexedauthor{%s}{%s}{%s}{%s}{%s}{%s}]] ]
+local p_keywords = lpeg.tsplitat(lpeg.patterns.whitespace^0 * lpeg.P(";") * lpeg.patterns.whitespace^0)
+local serialize = publications.serializeauthor
+local components = publications.authorcomponents
+local f_author = formatters[ [[\btxindexedauthor{%s}{%s}{%s}{%s}{%s}{%s}]] ]
-function flushers.default(register,dataset,tag,field,processor,alternative,current,entry,detail)
+function flushers.default(specification,dataset,tag,current,entry,detail)
+ local field = specification.field
local k = detail[field] or entry[field]
if k then
- ctx_dosetfastregisterentry(register,k,"",processor,"")
+ ctx_dosetfastregisterentry(specification.register,k,"",specification.processor,"")
end
end
-function flushers.author(register,dataset,tag,field,processor,alternative,current,entry,detail)
+local shorts = {
+ normalshort = true,
+ invertedshort = true,
+}
+
+function flushers.author(specification,dataset,tag,current,entry,detail)
if detail then
+ local field = specification.field
local author = detail[field]
if author then
+ local alternative = specification.alternative or "invertedshort"
+ local short = shorts[alternative]
+ local register = specification.register
+ local processor = specification.processor
for i=1,#author do
local a = author[i]
local k = serialize(a)
- local e = f_author(alternative or "invertedshort",components(a))
- ctx_dosetfastregisterentry(register,e,k,processor,"") -- todo .. sort key
+ local e = f_author(alternative,components(a,short))
+ ctx_dosetfastregisterentry(register,e,k,processor,"")
end
end
end
end
-function flushers.keywords(register,dataset,tag,field,processor,alternative,current,entry,detail)
+function flushers.keywords(specification,dataset,tag,current,entry,detail)
if entry then
- local keywords = entry[field]
- if keywords then
- keywords = lpegmatch(p_keywords,keywords)
+ local value = entry[specification.field]
+ if value then
+ local keywords = lpegmatch(p_keywords,value)
+ local register = specification.register
+ local processor = specification.processor
for i=1,#keywords do
- local k = keywords[i]
- ctx_dosetfastregisterentry(register,k,"",processor,"")
+ ctx_dosetfastregisterentry(register,keywords[i],"",processor,"")
end
end
end
end
-
diff --git a/tex/context/base/status-files.pdf b/tex/context/base/status-files.pdf
index 884260cf2..1af607c01 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 e8bac42cc..027f891fc 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 fbb2a8b6e..d47158c88 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 : 10/30/14 19:00:01
+-- merge date : 10/30/14 20:05:59
do -- begin closure to overcome local limits and interference