diff options
author | Hans Hagen <pragma@wxs.nl> | 2018-07-25 20:24:04 +0200 |
---|---|---|
committer | Context Git Mirror Bot <phg@phi-gamma.net> | 2018-07-25 20:24:04 +0200 |
commit | 669436bb34437aee17f1823836cbbb16c570a505 (patch) | |
tree | 3d8c61e22805ff719007c10a44a8de0417211b00 /tex/context/base/mkiv/strc-tag.lua | |
parent | deab0bfe7f4be57121779e93bf291e518fda7cf3 (diff) | |
download | context-669436bb34437aee17f1823836cbbb16c570a505.tar.gz |
2018-07-25 19:49:00
Diffstat (limited to 'tex/context/base/mkiv/strc-tag.lua')
-rw-r--r-- | tex/context/base/mkiv/strc-tag.lua | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tex/context/base/mkiv/strc-tag.lua b/tex/context/base/mkiv/strc-tag.lua index 889ed4608..eca886f3a 100644 --- a/tex/context/base/mkiv/strc-tag.lua +++ b/tex/context/base/mkiv/strc-tag.lua @@ -46,6 +46,7 @@ local lasttags = { } local stacksize = 0 local metadata = nil -- applied to the next element local documentdata = { } +local extradata = false local tags = structures.tags tags.taglist = taglist -- can best be hidden @@ -126,6 +127,7 @@ local properties = allocate { -- todo: more "record = true" to improve forma listcontent = { pdf = "P", nature = "mixed" }, listdata = { pdf = "P", nature = "mixed" }, listpage = { pdf = "Reference", nature = "mixed" }, + listtext = { pdf = "Span", nature = "inline" }, delimitedblock = { pdf = "BlockQuote", nature = "display" }, delimited = { pdf = "Quote", nature = "inline" }, @@ -206,6 +208,10 @@ local properties = allocate { -- todo: more "record = true" to improve forma combinationpair = { pdf = "Span", nature = "display" }, combinationcontent = { pdf = "Span", nature = "mixed" }, combinationcaption = { pdf = "Span", nature = "mixed" }, + + publications = { pdf = "Div", nature = "display" }, + publication = { pdf = "Div", nature = "mixed" }, + pubfld = { pdf = "Span", nature = "inline" }, } tags.properties = properties @@ -289,6 +295,20 @@ function tags.getmetadata() return documentdata or { } end +function tags.registerextradata(name,serializer) + if type(serializer) == "function" then + if extradata then + extradata[name] = serializer + else + extradata = { [name] = serializer } + end + end +end + +function tags.getextradata() + return extradata +end + function tags.start(tag,specification) if not enabled then codeinjections.enabletags() |