Changes

Jump to navigation Jump to search
523 bytes added ,  14:49, 13 October 2019
no edit summary
}}
== [[Help:Reference|Syntax]] (autogenerated) ==
<syntax>setdataset</syntax>
== [[Help:Reference|Syntax]] ==
<table cellspacing="4" cellpadding="2" class="cmd">
== Description ==
This command is used to store key-value pairs tables in a table previously defined with {{cmd|definedataset}}. The first argument is the data set name, the last argument is a list of key-value pairs of data that should be saved. The second  A middle argument is optional. When If provided, it specifies the name (or numerical index) at which the key-value table is not used, the data saved stored in the set dataset; if it is enumerated or when providedomitted, it the first anonymous table is stored at index 1, the identifier which can be used to address this particular saved key-value pairnext at index 2, and so on.
== Usage ==
<texcode>
\setdataset definedataset[somedataset] [foo=first, bar=second]</texcode> or
<texcode>% Store an anonymous table. It will be stored at point 1.\setdataset [somedataset] [alpha] [foo=first, bar=second]\setdataset [somedataset] [beta] [foowantscake=firstyes, barwantsdeath=secondno]</texcode>
% Store a table by name
\setdataset[somedataset][catnames][cat1=Georgina, cat2=George]
% The next anonymous table is stored at point 2.\setdataset[somedataset][name== See also ==<!-- something like {{cmd|goto}} -->Hans Hagen]
More detailled explanations and examples % We can be found under overwrite existing tables, even anonymous ones\setdataset[somedataset][System_Macros/Key_Value_Assignments|Key-Value Assignments1][wantscake=Yes please., wantsdeath=No thanks.] section Two-pass data.
% Retrieve a stored datum.
Do you want cake? \datasetvariable{somedataset}{1}{wantscake}.
% --> Do you want cake? Yes please.
</texcode>
{{cmd|definedataset}},{{cmd|datasetvariable}}== See also ==
* {{cmd|definedataset}}
* {{cmd|datasetvariable}}
* More detailed explanations and examples can be found in the Key-Value Assignments article, under the section [[System_Macros/Key_Value_Assignments#Multi-pass data|Multi-pass data]].
== Help from ConTeXt-Mailinglist/Forum ==
{{Forum|{{SUBPAGENAME}}}}
[[Category:CommandsCommand/Datasets|definedatasetsetdataset]]

Navigation menu