diff options
Diffstat (limited to 'tex/context/base/publ-ini.lua')
-rw-r--r-- | tex/context/base/publ-ini.lua | 32 |
1 files changed, 25 insertions, 7 deletions
diff --git a/tex/context/base/publ-ini.lua b/tex/context/base/publ-ini.lua index 434728748..34c8a1236 100644 --- a/tex/context/base/publ-ini.lua +++ b/tex/context/base/publ-ini.lua @@ -99,6 +99,10 @@ local ctx_btxsetlistreference = context.btxsetlistreference local ctx_btxmissing = context.btxmissing local ctx_btxsettag = context.btxsettag +local ctx_btxsetlanguage = context.btxsetlanguage +local ctx_btxsetindex = context.btxsetindex +local ctx_btxsetcombis = context.btxsetcombis +local ctx_btxsetcategory = context.btxsetcategory local ctx_btxcitesetup = context.btxcitesetup local ctx_btxsetfirst = context.btxsetfirst local ctx_btxsetsecond = context.btxsetsecond @@ -962,15 +966,18 @@ function lists.flushentries(dataset,sortvariant) local tag = list[i][1] local entry = luadata[tag] if entry then - ctx_setvalue("currentbtxindex",i) -- todo: helper + ctx_btxsetindex(i) local combined = entry.combined if combined then - ctx_setvalue("currentbtxcombis",concat(combined,",")) - else - ctx_setvalue("currentbtxcombis","") + ctx_btxsetcombis(concat(combined,",")) + end + ctx_btxsetcategory(entry.category or "unknown") + ctx_btxsettag(tag) + ctx_btxhandlelistentry() + local language = entry.language + if language then + ctx_btxsetlanguage(language) end - ctx_setvalue("currentbtxcategory",entry.category or "unknown") - ctx_btxhandlelistentry(tag) -- pass i instead and also pass 'placed' end end end @@ -1060,7 +1067,6 @@ local function sortedtags(dataset,list,sorttype) tag = tag, split = sortsplitter(sortstripper(key)) } - else end end end @@ -1285,6 +1291,10 @@ local function processcite(dataset,reference,mark,compress,setup,getter,setter,c if internal then ctx_btxsetinternal(internal) end + local language = first.language + if language then + ctx_btxsetlanguage(language) + end if not setter(first,entry.last) then ctx_btxsetfirst(f_missing(first.tag)) end @@ -1299,6 +1309,10 @@ local function processcite(dataset,reference,mark,compress,setup,getter,setter,c if internal then ctx_btxsetinternal(internal) end + local language = entry.language + if language then + ctx_btxsetlanguage(language) + end if not setter(entry) then ctx_btxsetfirst(f_missing(tag)) end @@ -1320,6 +1334,10 @@ local function processcite(dataset,reference,mark,compress,setup,getter,setter,c if internal then ctx_btxsetinternal(internal) end + local language = entry.language + if language then + ctx_btxsetlanguage(language) + end ctx_btxsetconcat(state) if not setter(entry) then ctx_btxsetfirst(f_missing(entry.tag)) |