diff options
author | Hans Hagen <pragma@wxs.nl> | 2014-06-22 19:58:00 +0200 |
---|---|---|
committer | Hans Hagen <pragma@wxs.nl> | 2014-06-22 19:58:00 +0200 |
commit | a9c288d372917c485a2882593ed18c8044bf82f1 (patch) | |
tree | 5dde88ef6591400030e42184ec2913b08ad394b9 /tex/context/base/publ-aut.lua | |
parent | 460d0ab518e3f51383c332b82045fe3ee14ca255 (diff) | |
download | context-a9c288d372917c485a2882593ed18c8044bf82f1.tar.gz |
beta 2014.06.22 19:58
Diffstat (limited to 'tex/context/base/publ-aut.lua')
-rw-r--r-- | tex/context/base/publ-aut.lua | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/tex/context/base/publ-aut.lua b/tex/context/base/publ-aut.lua index 9f100ec42..72766763d 100644 --- a/tex/context/base/publ-aut.lua +++ b/tex/context/base/publ-aut.lua @@ -18,6 +18,7 @@ local tostring = tostring local concat = table.concat local lpeg = lpeg local utfchar = utf.char +local formatters = string.formatters local P, C, V, Cs, Ct, lpegmatch, lpegpatterns = lpeg.P, lpeg.C, lpeg.V, lpeg.Cs, lpeg.Ct, lpeg.match, lpeg.patterns @@ -413,13 +414,26 @@ local function concatnames(t,settings) end end +local f_invalid = formatters["<invalid %s: %s>"] + function authors.concat(dataset,tag,field,settings) table.setmetatableindex(settings,defaultsettings) local combiner = settings.combiner if not combiner or type(combiner) == "string" then combiner = authors[combiner or "normal"] or authors.normal end - local split = datasets[dataset].details[tag][field] + local ds = datasets[dataset] + if not ds then + return f_invalid("dataset",dataset) + end + local dt = ds.details[tag] + if not dt then + return f_invalid("details",tag) + end + local split = dt[field] + if not split then + return f_invalid("field",field) + end local etallimit = settings.etallimit or 1000 local etaldisplay = settings.etaldisplay or etallimit local max = split and #split or 0 |