summaryrefslogtreecommitdiff
path: root/tex/context/base/mkiv/publ-inc.lua
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2018-07-17 18:25:12 +0200
committerContext Git Mirror Bot <phg42.2a@gmail.com>2018-07-17 18:25:12 +0200
commit57dbee16f3a8e09e688f792c6e36a53de798e6cb (patch)
treeb33d22d8d6abc98577d8d242e2c5bbacdd4bb234 /tex/context/base/mkiv/publ-inc.lua
parenta8f63ee70a866cce43ee4b1bb5ba95ef8044243f (diff)
downloadcontext-57dbee16f3a8e09e688f792c6e36a53de798e6cb.tar.gz
2018-07-17 17:32:00
Diffstat (limited to 'tex/context/base/mkiv/publ-inc.lua')
-rw-r--r--tex/context/base/mkiv/publ-inc.lua26
1 files changed, 26 insertions, 0 deletions
diff --git a/tex/context/base/mkiv/publ-inc.lua b/tex/context/base/mkiv/publ-inc.lua
new file mode 100644
index 000000000..9231be3c1
--- /dev/null
+++ b/tex/context/base/mkiv/publ-inc.lua
@@ -0,0 +1,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
+}