publ-inc.lua /size: 824 b    last modification: 2020-07-01 14:35
1if not modules then modules = { } end modules ['publ-inc'] = {
2    version   = 1.001,
3    comment   = "this module part of publication support",
4    author    = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
5    copyright = "PRAGMA ADE / ConTeXt Development Team",
6    license   = "see context related readme files"
7}
8
9local fullstrip = string.fullstrip
10local datasets, savers = publications.datasets, publications.savers
11local assignbuffer = buffers.assign
12
13interfaces.implement {
14    name      = "btxentrytobuffer",
15    arguments = "3 strings",
16    actions   = function(dataset,tag,target)
17        local d = datasets[dataset]
18        if d then
19            d = d.luadata[tag]
20        end
21        if d then
22            d = fullstrip(savers.bib(dataset,false,{ [tag] = d }))
23        end
24        assignbuffer(target,d or "")
25    end
26}
27