summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tex/context/base/cont-new.mkiv2
-rw-r--r--tex/context/base/context-version.pdfbin4280 -> 4289 bytes
-rw-r--r--tex/context/base/context.mkiv2
-rw-r--r--tex/context/base/publ-imp-apa.mkvi70
-rw-r--r--tex/context/base/publ-ini.lua36
-rw-r--r--tex/context/base/publ-ini.mkiv65
-rw-r--r--tex/context/base/publ-tra.lua114
-rw-r--r--tex/context/base/status-files.pdfbin24609 -> 24625 bytes
-rw-r--r--tex/context/base/status-lua.pdfbin244753 -> 244758 bytes
-rw-r--r--tex/generic/context/luatex/luatex-fonts-merged.lua2
10 files changed, 163 insertions, 128 deletions
diff --git a/tex/context/base/cont-new.mkiv b/tex/context/base/cont-new.mkiv
index dfd35315d..c8dd779c2 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.05.27 00:31}
+\newcontextversion{2014.05.27 13:38}
%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 6f01102d3..af63d86c0 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 86ceb55fc..c58123cb0 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.05.27 00:31}
+\edef\contextversion{2014.05.27 13:38}
\edef\contextkind {beta}
%D For those who want to use this:
diff --git a/tex/context/base/publ-imp-apa.mkvi b/tex/context/base/publ-imp-apa.mkvi
index aa7f6ce6b..f7c04e6c7 100644
--- a/tex/context/base/publ-imp-apa.mkvi
+++ b/tex/context/base/publ-imp-apa.mkvi
@@ -22,6 +22,69 @@
%D The variables control the shared code for which we use a tex definition with
%D one argument, specifying the field name.
+% \setupbtxlabeltext
+% [en]
+% [mastersthesis={Master's thesis},
+% phdthesis={PhD thesis},
+% technicalreport={Technical report},
+% editor=editor,
+% editors=editors,
+% edition=edition,
+% volume=volume,
+% Volume=Volume,
+% number=number,
+% Number=Number,
+% in=in,
+% of=of,
+% In=In,
+% p=p,
+% pp=pp,
+% pages=pages,
+% and=and,
+% others={et al.}]
+%
+% \setupbtxlabeltext
+% [fr]
+% [mastersthesis={Thèse de master (DEA, DESS, master)},
+% phdthesis={Thèse de doctorat},
+% technicalreport={Rapport technique},
+% editor=éditeur,
+% editors=éditeurs,
+% edition=édition,
+% volume=volume,
+% Volume=Volume,
+% number=numéro,
+% Number=Numéro,
+% in=dans,
+% of=de,
+% In=Dans,
+% p=p,
+% pp=pp,
+% pages=pages,
+% and=et,
+% others={et al.}]
+%
+% \setupbtxlabeltext
+% [de]
+% [mastersthesis={Masterarbeit},
+% phdthesis={Dissertation},
+% technicalreport={Technischer Bericht},
+% editor=Herausgeber,
+% editors=Herausgeber,
+% edition=Auflage,
+% volume=Band,
+% Volume=Band,
+% number=Numer,
+% Number=Numer,
+% in=in,
+% of=von,
+% In=In,
+% p=S,
+% pp=S,
+% pages=Seiten,
+% and=und,
+% others={et al.}]
+
\setvariables
[btx:apa:publisher]
[left=\btxspace,
@@ -92,6 +155,13 @@
\endgroup
\stoptexdefinition
+% \starttexdefinition btx:apa:bold #field
+% \begingroup
+% \bf
+% \btxflush{#field}
+% \endgroup
+% \stoptexdefinition
+
\starttexdefinition btx:apa:title-and-series
\btxdoif {title} {
\btxflush{title}
diff --git a/tex/context/base/publ-ini.lua b/tex/context/base/publ-ini.lua
index 34c8a1236..00e82f23f 100644
--- a/tex/context/base/publ-ini.lua
+++ b/tex/context/base/publ-ini.lua
@@ -272,28 +272,32 @@ setmetatableindex(usedentries,function(t,k)
local internals = structures.references.internals
for i=1,#internals do
local entry = internals[i]
- local metadata = entry.metadata
- if metadata.kind == "full" then
- local userdata = entry.userdata
- if userdata then
- local set = userdata.btxset
- if set then
- local tag = userdata.btxref
- local s = usedentries[set]
- if s then
- local u = s[tag]
- if u then
- u[#u+1] = entry
+ if entry then
+ local metadata = entry.metadata
+ if metadata and metadata.kind == "full" then
+ local userdata = entry.userdata
+ if userdata then
+ local set = userdata.btxset
+ if set then
+ local tag = userdata.btxref
+ local s = usedentries[set]
+ if s then
+ local u = s[tag]
+ if u then
+ u[#u+1] = entry
+ else
+ s[tag] = { entry }
+ end
else
- s[tag] = { entry }
+ usedentries[set] = { [tag] = { entry } }
end
- else
- usedentries[set] = { [tag] = { entry } }
end
end
end
+ else
+ -- weird
end
--- table.save("temp.lua",usedentries)
+ -- table.save("temp.lua",usedentries)
end
return usedentries[k]
end
diff --git a/tex/context/base/publ-ini.mkiv b/tex/context/base/publ-ini.mkiv
index d4479d1e9..534cb3dc5 100644
--- a/tex/context/base/publ-ini.mkiv
+++ b/tex/context/base/publ-ini.mkiv
@@ -1188,68 +1188,3 @@
\loadbtxdefinitionfile[definitions]
\protect
-
-% define in lang-txt.lua:
-%
-% \setupbtxlabeltext
-% [en]
-% [mastersthesis={Master's thesis},
-% phdthesis={PhD thesis},
-% technicalreport={Technical report},
-% editor=editor,
-% editors=editors,
-% edition=edition,
-% volume=volume,
-% Volume=Volume,
-% number=number,
-% Number=Number,
-% in=in,
-% of=of,
-% In=In,
-% p=p,
-% pp=pp,
-% pages=pages,
-% and=and,
-% others={et al.}]
-%
-% \setupbtxlabeltext
-% [fr]
-% [mastersthesis={Thèse de master (DEA, DESS, master)},
-% phdthesis={Thèse de doctorat},
-% technicalreport={Rapport technique},
-% editor=éditeur,
-% editors=éditeurs,
-% edition=édition,
-% volume=volume,
-% Volume=Volume,
-% number=numéro,
-% Number=Numéro,
-% in=dans,
-% of=de,
-% In=Dans,
-% p=p,
-% pp=pp,
-% pages=pages,
-% and=et,
-% others={et al.}]
-%
-% \setupbtxlabeltext
-% [de]
-% [mastersthesis={Masterarbeit},
-% phdthesis={Dissertation},
-% technicalreport={Technischer Bericht},
-% editor=Herausgeber,
-% editors=Herausgeber,
-% edition=Auflage,
-% volume=Band,
-% Volume=Band,
-% number=Numer,
-% Number=Numer,
-% in=in,
-% of=von,
-% In=In,
-% p=S,
-% pp=S,
-% pages=Seiten,
-% and=und,
-% others={et al.}]
diff --git a/tex/context/base/publ-tra.lua b/tex/context/base/publ-tra.lua
index 4b75798bd..9f9e62dae 100644
--- a/tex/context/base/publ-tra.lua
+++ b/tex/context/base/publ-tra.lua
@@ -19,7 +19,7 @@ local datasets = publications.datasets
local context = context
local ctx_NC, ctx_NR, ctx_HL, ctx_FL, ctx_ML, ctx_LL = context.NC, context.NR, context.HL, context.FL, context.ML, context.LL
-local ctx_bold, ctx_rotate = context.bold, context.rotate
+local ctx_bold, ctx_rotate, ctx_llap = context.bold, context.rotate, context.llap
local ctx_darkgreen, ctx_darkred, ctx_darkblue = context.darkgreen, context.darkred, context.darkblue
local ctx_starttabulate, ctx_stoptabulate = context.starttabulate, context.stoptabulate
@@ -190,7 +190,7 @@ function tracers.showdatasetcompleteness(dataset)
local preamble = { "|lBTw(10em)|p|" }
- local function required(key,value,indirect)
+ local function required(foundfields,key,value,indirect)
ctx_NC() ctx_darkgreen(key)
ctx_NC() if indirect then
ctx_darkblue(value)
@@ -200,9 +200,10 @@ function tracers.showdatasetcompleteness(dataset)
ctx_darkred("\\tttf [missing]")
end
ctx_NC() ctx_NR()
+ foundfields[key] = nil
end
- local function optional(key,value,indirect)
+ local function optional(foundfields,key,value,indirect)
ctx_NC() context(key)
ctx_NC() if indirect then
ctx_darkblue(value)
@@ -210,10 +211,11 @@ function tracers.showdatasetcompleteness(dataset)
context(value)
end
ctx_NC() ctx_NR()
+ foundfields[key] = nil
end
- local function identified(tag,crossref)
- ctx_NC() context("tag")
+ local function identified(tag,category,crossref)
+ ctx_NC() context(category)
ctx_NC() if crossref then
context("\\tttf %s\\hfill\\darkblue => %s",tag,crossref)
else
@@ -222,60 +224,78 @@ function tracers.showdatasetcompleteness(dataset)
ctx_NC() ctx_NR()
end
+ local function extra(key,value)
+ ctx_NC() ctx_llap("+") context(key)
+ ctx_NC() context(value)
+ ctx_NC() ctx_NR()
+ end
+
local luadata = datasets[dataset].luadata
if next(luadata) then
- for tag, entry in table.sortedhash(luadata) do
+ for tag, entry in sortedhash(luadata) do
local category = entry.category
local fields = categories[category]
if fields then
+ local foundfields = { }
+ for k, v in next, entry do
+ foundfields[k] = true
+ end
ctx_starttabulate(preamble)
- identified(tag,entry.crossref)
- ctx_HL()
+ identified(tag,category,entry.crossref)
+ ctx_ML()
local requiredfields = fields.required
local optionalfields = fields.optional
- for i=1,#requiredfields do
- local r = requiredfields[i]
- if type(r) == "table" then
- local okay = true
- for i=1,#r do
- local ri = r[i]
- if rawget(entry,ri) then
- required(ri,entry[ri])
- okay = true
- elseif entry[ri] then
- required(ri,entry[ri],true)
- okay = true
+ if requiredfields then
+ for i=1,#requiredfields do
+ local r = requiredfields[i]
+ if type(r) == "table" then
+ local okay = true
+ for i=1,#r do
+ local ri = r[i]
+ if rawget(entry,ri) then
+ required(foundfields,ri,entry[ri])
+ okay = true
+ elseif entry[ri] then
+ required(foundfields,ri,entry[ri],true)
+ okay = true
+ end
end
+ if not okay then
+ required(foundfields,table.concat(r,"\\letterbar "))
+ end
+ elseif rawget(entry,r) then
+ required(foundfields,r,entry[r])
+ elseif entry[r] then
+ required(foundfields,r,entry[r],true)
+ else
+ required(foundfields,r)
end
- if not okay then
- required(table.concat(r,"\\letterbar "))
- end
- elseif rawget(entry,r) then
- required(r,entry[r])
- elseif entry[r] then
- required(r,entry[r],true)
- else
- required(r)
end
end
- for i=1,#optionalfields do
- local o = optionalfields[i]
- if type(o) == "table" then
- for i=1,#o do
- local oi = o[i]
- if rawget(entry,oi) then
- optional(oi,entry[oi])
- elseif entry[oi] then
- optional(oi,entry[oi],true)
+ if optionalfields then
+ for i=1,#optionalfields do
+ local o = optionalfields[i]
+ if type(o) == "table" then
+ for i=1,#o do
+ local oi = o[i]
+ if rawget(entry,oi) then
+ optional(foundfields,oi,entry[oi])
+ elseif entry[oi] then
+ optional(foundfields,oi,entry[oi],true)
+ end
end
+ elseif rawget(entry,o) then
+ optional(foundfields,o,entry[o])
+ elseif entry[o] then
+ optional(foundfields,o,entry[o],true)
end
- elseif rawget(entry,o) then
- optional(o,entry[o])
- elseif entry[o] then
- optional(o,entry[o],true)
end
end
+ foundfields.category = nil
+ for k, v in sortedhash(foundfields) do
+ extra(k,entry[k])
+ end
ctx_stoptabulate()
else
-- error
@@ -346,10 +366,16 @@ function tracers.addfield(f,c)
-- no checking now
if type(f) == "string" then
f = settings_to_array(f)
- if #f == 1 then
- f = f[1]
+ end
+ for i=1,#f do
+ local field = f[i]
+ if not table.contains(fields,field) then
+ fields[#fields+1] = field
end
end
+ if #f == 1 then
+ f = f[1]
+ end
if type(c) == "string" then
c = settings_to_array(c)
end
diff --git a/tex/context/base/status-files.pdf b/tex/context/base/status-files.pdf
index 55c2e37c8..c558cda00 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 cc3a209ba..950ef4853 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 55cb098a6..dc75ff5cd 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 : 05/27/14 00:31:03
+-- merge date : 05/27/14 13:38:31
do -- begin closure to overcome local limits and interference