four
> >
> > \normalexpanded{\reference[trick]{\the\lmao}} % 10 printed above
> > \stoptext
> >
> > I want the result of a sum (either via Lua or TeX) to be printed before
> > summands in text, but without the mess of reference options such as
> > interaction
integerdef\DSlmao=0
\starttext
Sum: \datasetvariable{test-1}{1}{whatever}
\startlines
+1\advance\DSlmao\plusone
+2\advance\DSlmao\plustwo
+3\advance\DSlmao\plusthree
+4\advance\DSlmao\plusfour
\stoplines
\normalexpanded{\setdataset[test-1][whatever=\the\DSlmao]}
ng an
>> old document.
>
> because it's not empty (it's a command that you pass)
>
>> ---start---
>> \setdataset [DS] [a=]
>> \setdataset [DS] [a=]
>> \starttext
>> :\datasetvariable{DS}{1}{a}: \crlf
>> :\datasetvariable{DS}{2}{a}: \crlf
>>
t---
\setdataset [DS] [a=]
\setdataset [DS] [a=]
\starttext
:\datasetvariable{DS}{1}{a}: \crlf
:\datasetvariable{DS}{2}{a}: \crlf
\doifemptyelse{\datasetvariable{DS}{1}{a}}{true}{false}
\doifemptyelse{\datasetvariable{DS}{2}{a}}{true}{false}
\stoptext
---end---
ConTeXt ver: 2
The following MWE gives "false false" instead of "false true". I'm sure this
used to work (18 months or more ago!) as I found it when re-processing an old
document.
---start---
\setdataset [DS] [a=]
\setdataset [DS] [a=]
\starttext
:\datasetvariable{DS}{1}{a}: \crlf
as intermediate:
% \startsetups[userdata:idautor]
% \dontleavehmode
% \imghref
% {\externalfigure[cvlac.pdf][logo]}
% {\datasetvariable{autores}{\recurselevel}{vclac}}
% \quad
% \imghref
% {\externalfigure[orcid.pdf][logo]}
% {\datasetvariable{autores}{\recurselevel}{orcid
of the "autores" dataset? and
use indexes?
\dorecurse{5}{
\startuserdata[idautor][
author={\datasetvariable{autores}{\recurselevel}{nombre}},
cvlac={\datasetvariable{autores}{\recurselevel}{cvlac}},
orcid={\datasetvariable{autores}{\recurselevel}{orcid}},
ter the first one see to empty
the data in the Lua table.
Adapting a sample from the wiki:
\starttext
\definedataset[somedataset]
\startmode[*first]
\setdataset[somedataset][wantscake=yes, wantsdeath=no]
\stopmode
Do you want cake? \datasetvariable{somedataset}{1}{wantscake}.\\
BTW,
tly. So, it might be better to ask the
> information in the first run and save it in the tuc file using the two
> pass mechanism:
>
> https://wiki.contextgarden.net/Command/datasetvariable
Many thanks for your reply, Aditya.
Your approach is really interesting, but I don’t know how to mix i
is? The new information can lead to
an extra line-break or extra page-break, which might then need an extra run to
resolve correctly. So, it might be better to ask the information in the first
run and save it in the tuc file using the two pass mechanism:
https://wiki.contextgarden.n
On Fri, 29 May 2020, Jan U. Hasecke wrote:
One and a half question.
Why did you set \ChapterCounter explizitly and why is \ChapterCounter
part of the datasetvariable?
\dataset... is a high level interface for collecting two-pass data in ConTeXt.
Here is a simple example:
\definedataset
Hi Wolfgang,
thank you very much. Amazing!
Am 29.05.20 um 15:35 schrieb Wolfgang Schuster:
> \definedataset [chapter]
>
> \startsetups [chapter:before]
>
> \page[yes]
>
> \doglobal\increment\ChapterCounter
>
> \doifoddpageelse
> {}
> {\doifsom
[alternative=doublesided]
\setupexternalfigures
[location=default]
\definedataset [chapter]
\startsetups [chapter:before]
\page[yes]
\doglobal\increment\ChapterCounter
\doifoddpageelse
{}
{\doifsomething
{\datasetvariable{chapter}{\ChapterCounter}{image
istinction and the \page command in my setup, the
header text changed too early.
\definedataset[chapter]
\startsetups[chapter:leftpage]
\page[left]
\doglobal\increment\ChapterData
\doifsomething{\datasetvariable{chapter}{\ChapterData}{subtitle}}
{
\starttabulate
the "reset" key is used before the values in
\setvariables are stored while "set" is used after the values are stored.
I don't understand it. Has it something to do with "Command/datasetvariable"?
No, this is a different mechanism to save values between different
ConTeX
4]
>
> Points: \getvariable{martin}{points}
>
> The answer is \getvariable{martin}{answer}.
>
> \stoptext
Hello Wolfgang,
what exactly does the command
"\setvariable{martin}{set}{\directsetup{martin}}"?
I d
[two][pagenumber=\userpagenumber]
Three\setdataset[hans][three][pagenumber=\userpagenumber]
\blank
\ifnum0\datasetvariable{hans}{two}{realpage}=0\datasetvariable{hans}{one}{realpage}
The references are on the same page.
\else
The references are on different pages.
\fi
\blank
\ifnum0\data
.
This is what I've tried, but it is always the currentdate, that is
displayes.
You are trying to use the date before it is defined. You can use a
two-pass mechanism:
\define\mydate{\datasetvariable{mydata}{date}{date}}
Thank you Marco, this works.
Is it possible to update fields in the datasetvariables
the currentdate, that is
displayes.
You are trying to use the date before it is defined. You can use a
two-pass mechanism:
\define\mydate{\datasetvariable{mydata}{date}{date}}
\definelayer
[firstpage]
\setlayer
[firstpage]
[hoffset=14cm, voffset=3.5cm]
{\framed[frame=on, width=4cm, height=2cm
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
\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
=second]
\setdataset [test] [bar] [bar=third]
\starttext
foo is: \datasetvariable{test}{foo}{foo}\crlf
bar is: \datasetvariable{test}{bar}{bar}
\stoptext
Wikified:
http://wiki.contextgarden.net/System_Macros/Key_Value_Assignments#Two-pass_data
Two-pass data is data that can
22 matches
Mail list logo