summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorContext Git Mirror Bot <phg42.2a@gmail.com>2014-10-29 19:15:03 +0100
committerContext Git Mirror Bot <phg42.2a@gmail.com>2014-10-29 19:15:03 +0100
commit46ad5337af14360d52018b342c1c3fdee7dc7cf6 (patch)
treeaab133b66e3616a29737bb3aff57ca06fa3fd58a
parent8b2d210bded556395191e66f360a5ef35e5e1f8d (diff)
downloadcontext-46ad5337af14360d52018b342c1c3fdee7dc7cf6.tar.gz
2014-10-29 17:49:00
-rw-r--r--tex/context/base/cont-new.mkiv2
-rw-r--r--tex/context/base/context-version.pdfbin4383 -> 4378 bytes
-rw-r--r--tex/context/base/context.mkiv2
-rw-r--r--tex/context/base/core-uti.lua2
-rw-r--r--tex/context/base/publ-aut.lua25
-rw-r--r--tex/context/base/publ-ini.mkiv68
-rw-r--r--tex/context/base/publ-reg.lua43
-rw-r--r--tex/context/base/publ-tra.lua2
-rw-r--r--tex/context/base/status-files.pdfbin24688 -> 24707 bytes
-rw-r--r--tex/context/base/status-lua.pdfbin333716 -> 333766 bytes
-rw-r--r--tex/generic/context/luatex/luatex-fonts-merged.lua2
11 files changed, 71 insertions, 75 deletions
diff --git a/tex/context/base/cont-new.mkiv b/tex/context/base/cont-new.mkiv
index 90c5f8b0f..ec8c4c627 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.29 15:20}
+\newcontextversion{2014.10.29 17:47}
%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 22337038f..977943fe9 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 8bd607974..798cac076 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.29 15:20}
+\edef\contextversion{2014.10.29 17:47}
\edef\contextkind {beta}
%D For those who want to use this:
diff --git a/tex/context/base/core-uti.lua b/tex/context/base/core-uti.lua
index 4075043af..ecb90d24b 100644
--- a/tex/context/base/core-uti.lua
+++ b/tex/context/base/core-uti.lua
@@ -36,7 +36,7 @@ local report_passes = logs.reporter("job","passes")
job = job or { }
local job = job
-job.version = 1.26
+job.version = 1.27
job.packversion = 1.02
-- some day we will implement loading of other jobs and then we need
diff --git a/tex/context/base/publ-aut.lua b/tex/context/base/publ-aut.lua
index 8e1b20219..d108ae42f 100644
--- a/tex/context/base/publ-aut.lua
+++ b/tex/context/base/publ-aut.lua
@@ -381,6 +381,20 @@ local splitter = sorters.splitters.utf
local pubsorters = { }
authors.sorters = pubsorters
+local function components(snippet)
+ local vons = snippet.vons
+ local surnames = snippet.surnames
+ local initials = snippet.initials
+ local firstnames = snippet.firstnames
+ local juniors = snippet.juniors
+ return
+ vons and #vons > 0 and concat(vons, " ") or "",
+ surnames and #surnames > 0 and concat(surnames, " ") or "",
+ initials and #initials > 0 and concat(initials, " ") or "",
+ firstnames and #firstnames > 0 and concat(firstnames," ") or "",
+ juniors and #juniors > 0 and concat(juniors, " ") or ""
+end
+
local function writer(key,snippets)
if not key then
return ""
@@ -401,6 +415,7 @@ local function writer(key,snippets)
local vons = k.vons
local surnames = k.surnames
local initials = k.initials
+ local juniors = k.juniors
if vons and #vons > 0 then
s = s + 1 ; snippets[s] = concat(vons," ")
end
@@ -410,12 +425,15 @@ local function writer(key,snippets)
if initials and #initials > 0 then
s = s + 1 ; snippets[s] = concat(initials," ")
end
+ if juniors and #juniors > 0 then
+ s = s + 1 ; snippets[s] = concat(juniors," ")
+ end
end
return concat(snippets," ",1,s)
end
-writers.author = writer
-writers.editor = editor
+writers.author = writer
+writers.editor = editor
-- how to deal with publisher?
@@ -450,7 +468,8 @@ function authors.getauthor(dataset,tag,categories)
end
end
-publications.serializeauthor = writer -- helper
+publications.serializeauthor = function(a) return writer { a } end
+publications.authorcomponents = components
local function newsplitter(splitter)
return table.setmetatableindex({},function(t,k) -- could be done in the sorter but seldom that many shared
diff --git a/tex/context/base/publ-ini.mkiv b/tex/context/base/publ-ini.mkiv
index 391c9c7d8..b17eb347b 100644
--- a/tex/context/base/publ-ini.mkiv
+++ b/tex/context/base/publ-ini.mkiv
@@ -1289,56 +1289,20 @@
\ctxcommand{btxtoregister("\currentbtxdataset","\currentbtxtag")}%
\to \t_btx_reference_inject
-% \unexpanded\def\dosetfastregisterentry#1#2#3% register entry key
-% {\begingroup
-% \edef\currentregister{#1}%
-% \setnextinternalreference
-% \xdef\currentregisternumber{\ctxcommand{storeregister{
-% metadata = { name = "\currentregister" },
-% entries = { { \!!bs#2\!!es }, { \!!bs#3\!!es } },
-% }
-% }}%
-% \xdef\currentregistersynchronize{\ctxlatecommand{enhanceregister("\currentregister",\currentregisternumber)}}%
-% \currentregistersynchronize % here?
-% \dostarttagged\t!registerlocation\currentregister
-% \attribute\destinationattribute\lastdestinationattribute \signalcharacter % no \strut as it will be removed during cleanup
-% \dotagregisterlocation
-% \dostoptagged
-% \endgroup}
-
-% \unexpanded\def\btx_flush_specific_field#1#2#3#4#5% dataset tag field variant value
-% {\begingroup
-% \edef\currentbtxdataset{#1}%
-% \edef\currentbtxtag {#2}%
-% \edef\currentbtxfield {#3}%
-% \let\currentbtxlistvariant\currentbtxfield
-% \edef\currentbtxcitevariant{#4}%
-% \usebtxregisterstyleandcolor\c!style\c!color
-% \edef\tempstring{\currentbtxalternative:register:\currentbtxcitevariant}%
-% \doifsetupselse\tempstring{\fastsetup\tempstring}{#5}%
-% \endgroup}
-
-% \unexpanded\def\btx_flush_specific_author#1#2#3#4#5% dataset tag field variantindex
-% {\begingroup
-% \edef\currentbtxdataset{#1}%
-% \edef\currentbtxtag {#2}%
-% \edef\currentbtxfield {#3}%
-% \let\currentbtxlistvariant\currentbtxfield
-% \edef\currentbtxcitevariant{#4}%
-% \ctxcommand{btxauthor("\currentbtxdataset","\currentbtxtag","\currentbtxfield",{
-% kind = "list",
-% index = \number#5,
-% combiner = "\currentbtxcitevariant",
-% })}%
-% \endgroup}
-
-% \let\dobtxindexedfield \btx_flush_specific_field % used at lua end
-% \let\dobtxindexedauthor\btx_flush_specific_author % used at lua end
-
-\unexpanded\def\dobtxindexedfield#1% value
+\unexpanded\def\btxindexedauthor#1#2#3#4#5#6% alternative von last first junior
{\begingroup
- \usebtxregisterstyleandcolor\c!style\c!color
- #1%
+ \def\currentbtxcitevariant{#1}%
+ \ifx\currentbtxcitevariant\empty
+ \edef\currentbtxcitevariant{invertedshort}%
+ \fi
+ \let\currentbtxlistvariant\currentbtxcitevariant % we inherit
+ \the\everysetupbtxciteplacement
+ \def\currentbtxvons {#2}%
+ \def\currentbtxsurnames {#3}%
+ \def\currentbtxinitials {#4}%
+ \def\currentbtxfirstnames {#5}%
+ \def\currentbtxjuniors {#6}%
+ \fastsetup{\s!btx:\s!cite:\s!author:\currentbtxcitevariant}%
\endgroup}
%D Defaults:
@@ -1467,6 +1431,9 @@
[page]
\definebtxcitevariant
+ [invertedshort]
+
+\definebtxcitevariant
[short]
[\c!left={[},
\c!middle={, },
@@ -1537,6 +1504,9 @@
[artauthor]
[author]
+\definebtxlistvariant
+ [invertedshort]
+
% Not that efficient but ...
\setupbtxcitevariant
diff --git a/tex/context/base/publ-reg.lua b/tex/context/base/publ-reg.lua
index 80a3b789c..a7dc989e8 100644
--- a/tex/context/base/publ-reg.lua
+++ b/tex/context/base/publ-reg.lua
@@ -7,6 +7,7 @@ if not modules then modules = { } end modules ['publ-reg'] = {
}
local formatters = string.formatters
+local concat = table.concat
local sortedhash = table.sortedhash
local lpegmatch = lpeg.match
@@ -50,13 +51,14 @@ function commands.setbtxregister(specification)
--
-- check all
--
- d.active = specification.state ~= v_stop
- d.once = specification.method == v_once or false
- d.field = field
- d.processor = name ~= register and name or ""
- d.register = register
- d.dataset = dataset
- d.done = d.done or { }
+ d.active = specification.state ~= v_stop
+ d.once = specification.method == v_once or false
+ d.field = field
+ d.processor = name ~= register and name or ""
+ d.alternative = d.alternative or specification.alternative
+ d.register = register
+ d.dataset = dataset
+ d.done = d.done or { }
--
sequence = { }
for register, s in sortedhash(specifications) do
@@ -78,14 +80,15 @@ 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 flusher = flushers[field] or flushers.default
+ local register = step.register
+ local field = step.field
+ local processor = step.processor
+ local alternative = step.alternative
+ local flusher = flushers[field] or flushers.default
if processor and processor ~= "" then
processor = "btx:r:" .. processor
end
- flusher(register,dataset,tag,field,processor,current,entry,current.details[tag])
+ flusher(register,dataset,tag,field,processor,alternative,current,entry,current.details[tag])
end
done[tag] = true
end
@@ -103,28 +106,32 @@ 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 writer = publications.serializeauthor
+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,current,entry,detail)
+function flushers.default(register,dataset,tag,field,processor,alternative,current,entry,detail)
local k = detail[field] or entry[field]
if k then
ctx_dosetfastregisterentry(register,k,"",processor,"")
end
end
-function flushers.author(register,dataset,tag,field,processor,current,entry,detail)
+function flushers.author(register,dataset,tag,field,processor,alternative,current,entry,detail)
if detail then
local author = detail[field]
if author then
for i=1,#author do
- local k = writer { author[i] }
- ctx_dosetfastregisterentry(register,k,"",processor,"") -- todo .. sort key
+ 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
end
end
end
end
-function flushers.keywords(register,dataset,tag,field,processor,current,entry,detail)
+function flushers.keywords(register,dataset,tag,field,processor,alternative,current,entry,detail)
if entry then
local keywords = entry[field]
if keywords then
diff --git a/tex/context/base/publ-tra.lua b/tex/context/base/publ-tra.lua
index 531a9409a..85660fdd8 100644
--- a/tex/context/base/publ-tra.lua
+++ b/tex/context/base/publ-tra.lua
@@ -186,7 +186,7 @@ function tracers.showdatasetcompleteness(settings)
end
end
if not okay then
- done = required(done,foundfields,table.concat(r,"\\space\\letterbar\\space"))
+ done = required(done,foundfields,table.concat(r," {\\letterbar} "))
end
elseif rawget(entry,r) then
done = required(done,foundfields,r,entry[r])
diff --git a/tex/context/base/status-files.pdf b/tex/context/base/status-files.pdf
index bc04db1f0..2cb0e81eb 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 8c24e51d1..60d6a7a2e 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 5b9fc4f45..301a4c73e 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/29/14 15:20:43
+-- merge date : 10/29/14 17:47:31
do -- begin closure to overcome local limits and interference