summaryrefslogtreecommitdiff
path: root/tex/context/base/mkiv/publ-inc.lua
blob: 9231be3c192f2b8d280a08b977151866025d99a7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
if not modules then modules = { } end modules ['publ-inc'] = {
    version   = 1.001,
    comment   = "this module part of publication support",
    author    = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
    copyright = "PRAGMA ADE / ConTeXt Development Team",
    license   = "see context related readme files"
}

local fullstrip = string.fullstrip
local datasets, savers = publications.datasets, publications.savers
local assignbuffer = buffers.assign

interfaces.implement {
    name      = "btxentrytobuffer",
    arguments = "3 strings",
    actions   = function(dataset,tag,target)
        local d = datasets[dataset]
        if d then
            d = d.luadata[tag]
        end
        if d then
            d = fullstrip(savers.bib(dataset,false,{ [tag] = d }))
        end
        assignbuffer(target,d or "")
    end
}