summaryrefslogtreecommitdiff
path: root/tex/context/base/mkiv/publ-tra.lua
diff options
context:
space:
mode:
Diffstat (limited to 'tex/context/base/mkiv/publ-tra.lua')
-rw-r--r--tex/context/base/mkiv/publ-tra.lua25
1 files changed, 12 insertions, 13 deletions
diff --git a/tex/context/base/mkiv/publ-tra.lua b/tex/context/base/mkiv/publ-tra.lua
index 4b03307ac..b3d40be61 100644
--- a/tex/context/base/mkiv/publ-tra.lua
+++ b/tex/context/base/mkiv/publ-tra.lua
@@ -42,7 +42,6 @@ local ctx_monobold = ctx_formatted.monobold
local ctx_verbatim = ctx_formatted.verbatim
local ctx_rotate = context.rotate
-local ctx_llap = context.llap
local ctx_rlap = context.rlap
local ctx_page = context.page
@@ -102,9 +101,6 @@ function tracers.showdatasetcompleteness(settings)
local fielddata = specification and specifications[specification] or specifications.apa
local categories = fielddata.categories
- -- local lpegmatch = lpeg.match
- -- local texescape = lpeg.patterns.texescape
-
local preamble = { "|lTBw(5em)|lBTp(10em)|plT|" }
local function identified(tag,category,crossref,index)
@@ -145,8 +141,8 @@ function tracers.showdatasetcompleteness(settings)
ctx_NC()
if indirect then
context("\\darkblue")
- ctx_verbatim(value)
- elseif value then
+ end
+ if value then
ctx_verbatim(value)
end
ctx_NC() ctx_NR()
@@ -157,7 +153,7 @@ function tracers.showdatasetcompleteness(settings)
local function special(done,key,value)
ctx_NC() if not done then ctx_monobold("special") end
ctx_NC() context(key)
- ctx_NC() ctx_verbatim(value)
+ ctx_NC() if value then ctx_verbatim(value) end
ctx_NC() ctx_NR()
return done or true
end
@@ -165,7 +161,7 @@ function tracers.showdatasetcompleteness(settings)
local function extra(done,key,value)
ctx_NC() if not done then ctx_monobold("extra") end
ctx_NC() context(key)
- ctx_NC() ctx_verbatim(value)
+ ctx_NC() if value then ctx_verbatim(value) end
ctx_NC() ctx_NR()
return done or true
end
@@ -352,7 +348,9 @@ function tracers.showdatasetauthors(settings)
ctx_verbatim(i)
end
ctx_NC()
- ctx_verbatim(k)
+ if k then
+ ctx_verbatim(k)
+ end
ctx_EQ()
if type(v) == "table" then
local t = { }
@@ -364,8 +362,9 @@ function tracers.showdatasetauthors(settings)
t[i] = vi
end
end
- ctx_verbatim(concat(t, " | "))
- else
+ v = concat(t, " | ")
+ end
+ if v then
ctx_verbatim(v)
end
ctx_NC()
@@ -380,9 +379,9 @@ function tracers.showdatasetauthors(settings)
end
local function commonrow(key,value)
- ctx_NC() ctx_rlap(function() ctx_verbatim(key) end)
+ ctx_NC() if key then ctx_rlap(function() ctx_verbatim(key) end) end
ctx_NC()
- ctx_EQ() ctx_verbatim(value)
+ ctx_EQ() if value then ctx_verbatim(value) end
ctx_NC() ctx_NR()
end