Hi Hans,
the \structurevariable command which can be used the access the value in the
headings don’t show any text because context looks into the wrong table.
In strc-doc.lua something like this has to be changed (use the title data
subtable):
function sections.structuredata(depth,key,default,honorcatcodetable) -- todo:
spec table and then also depth
if depth then
depth = levelmap[depth] or tonumber(depth)
end
if not depth or depth == 0 then
depth = data.depth
end
local data = data.status[depth]
-- local d = data
local d = data.titledata
…
end
Example:
\setupheadertexts[chapter]
\define[2]\ChapterCommand
{\vbox\bgroup\starttabulate
\NC Title \EQ \structurevariable{title} \NC\NR
\NC Marking \EQ \structurevariable{marking} \NC\NR
\stoptabulate\egroup}
\setuphead[chapter][command=\ChapterCommand]
\starttext
\startchapter[title={Hello World},marking={A}]
\starttabulate
\NC Title \EQ \namedstructurevariable{chapter}{title} \NC\NR
\NC Marking \EQ \namedstructurevariable{chapter}{marking} \NC\NR
\stoptabulate
\stopchapter
\stoptext
Wolfgang
_______________________________________________
dev-context mailing list
[email protected]
http://www.ntg.nl/mailman/listinfo/dev-context