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
On 24-2-2012 17:52, Wolfgang Schuster wrote:
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.
... sorry for not being that reponsive but I'm recovering from a pretty heavy flu so a bit slow Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
On 24-2-2012 17:52, Wolfgang Schuster wrote:
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
no, it's a wrong change from split to match ... for k in gmatch(key,"[^%.]+") do and then \startchapter[title={Hello World},marking={A}][mybla=whatever] \starttabulate \NC Title \EQ \namedstructurevariable{chapter}{titledata.title} \NC\NR \NC Marking \EQ \namedstructurevariable{chapter}{titledata.marking} \NC\NR \NC Whatever \EQ \namedstructurevariable{chapter}{userdata.mybla} \NC\NR \stoptabulate \stopchapter ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
Am 02.03.2012 um 20:55 schrieb Hans Hagen:
On 24-2-2012 17:52, Wolfgang Schuster wrote:
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
no, it's a wrong change from split to match ...
for k in gmatch(key,"[^%.]+") do
and then
\startchapter[title={Hello World},marking={A}][mybla=whatever]
\starttabulate \NC Title \EQ \namedstructurevariable{chapter}{titledata.title} \NC\NR \NC Marking \EQ \namedstructurevariable{chapter}{titledata.marking} \NC\NR \NC Whatever \EQ \namedstructurevariable{chapter}{userdata.mybla} \NC\NR \stoptabulate
\stopchapter
Writing “titledata.title” is not very convent and it would be better when \strucuturevariable would always get titledata entries because for userdata you already provided the \structureuservariable command. %def\structurevariable #1{\ctxcommand{structurevariable("#1")}} \def\structurevariable #1{\ctxcommand{structurevariable("titledata.#1")}} Wolfgang
On 3-3-2012 09:51, Wolfgang Schuster wrote:
Writing “titledata.title” is not very convent and it would be better when \strucuturevariable would always get titledata entries because for userdata you already provided the \structureuservariable command.
I now support both ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
participants (2)
-
Hans Hagen
-
Wolfgang Schuster