Hello, the simple example from the mailing-list doesn't work with the latest beta. I think the core-dat.lua is corrupted (function commands.datasetvariable) \definedataset[test-1] \definedataset[test-2] \starttext \setdataset[test-1][x=Value X 1,y=Value Y 1] \setdataset[test-1][x=Value X 2,y=Value Y 2] \setdataset[test-2][a][name=Ben Lee User,job=Manager] \setdataset[test-2][b][title=TeX by Topic] \startlines \datasetvariable{test-1}{1}{x}:\datasetvariable{test-1}{1}{y} \datasetvariable{test-1}{2}{x}:\datasetvariable{test-1}{2}{y} \stoplines Name: \datasetvariable{test-2}{a}{name} \par Job: \datasetvariable{test-2}{a}{job} \par \stoptext Kind regards, Martin
Am 29.10.2012 um 09:52 schrieb Martin Fechner
Hello,
the simple example from the mailing-list doesn't work with the latest beta. I think the core-dat.lua is corrupted (function commands.datasetvariable)
\definedataset[test-1] \definedataset[test-2]
\starttext
\setdataset[test-1][x=Value X 1,y=Value Y 1] \setdataset[test-1][x=Value X 2,y=Value Y 2]
\setdataset[test-2][a][name=Ben Lee User,job=Manager] \setdataset[test-2][b][title=TeX by Topic]
\startlines \datasetvariable{test-1}{1}{x}:\datasetvariable{test-1}{1}{y} \datasetvariable{test-1}{2}{x}:\datasetvariable{test-1}{2}{y} \stoplines
Name: \datasetvariable{test-2}{a}{name} \par Job: \datasetvariable{test-2}{a}{job} \par
\stoptext
Change the following test in core-dat.lua: function commands.datasetvariable(name,tag,key) local t = collected[name] if t == nil then if trace_datasets then report_dataset("unknown: name %s (not passed to tex)",name) end elseif type(t) ~= "table" then context(tostring(t)) else t = t and (t[tag] or t[tonumber(tag)]) if not t then if trace_datasets then report_dataset("unknown: name %s with tag %s (not passed to tex)",name,tag) end - elseif type(t) ~= "table" then + elseif type(t) == "table" then local s = t[key] if type(s) ~= "table" then context(tostring(s)) elseif trace_datasets then report_dataset("table: name %s, tag %s (not passed to tex)",name,tag) end end end end Wolfgang
participants (2)
-
Martin Fechner
-
Wolfgang Schuster