* Multipass Datasets doesn't work
@ 2012-10-29 8:52 Martin Fechner
2012-10-29 9:13 ` Wolfgang Schuster
0 siblings, 1 reply; 3+ messages in thread
From: Martin Fechner @ 2012-10-29 8:52 UTC (permalink / raw)
To: mailing list for ConTeXt users
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
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Multipass Datasets doesn't work
2012-10-29 8:52 Multipass Datasets doesn't work Martin Fechner
@ 2012-10-29 9:13 ` Wolfgang Schuster
2012-10-29 9:44 ` Martin Fechner
0 siblings, 1 reply; 3+ messages in thread
From: Wolfgang Schuster @ 2012-10-29 9:13 UTC (permalink / raw)
To: mailing list for ConTeXt users
Am 29.10.2012 um 09:52 schrieb Martin Fechner <fechner@bbaw.de>:
> 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
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-10-29 9:44 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-29 8:52 Multipass Datasets doesn't work Martin Fechner
2012-10-29 9:13 ` Wolfgang Schuster
2012-10-29 9:44 ` Martin Fechner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).