ai2472206...@yeah.net schrieb am 29.05.2024 um 14:05:
I'm defining a command to generate options for multiple choice questions,
but at the moment I'm stuck at this step.
I want to get a number and assign a value to the counter, but why can't I get
it?
%%%%
\starttext
\defin
> it?
>
>
> \starttext
> \definedataset [myset]
> \setdataset[myset] [foo=1,boo=4]
> \newcount\tempa
> \datasetvariable{myset}{1}{boo} % definitely get 4
> %\tempa=\datasetvariable{myset}{1}{boo} % why i cannt pass 4 to tempa?
> %\number\tempa
> \stoptex
I'm defining a command to generate options for multiple choice questions,
but at the moment I'm stuck at this step.
I want to get a number and assign a value to the counter, but why can't I get
it?
%%%%
\starttext
\definedataset [myset]
\setdataset[myset] [foo=1,boo=4]
size query so I added that. Your
data is missins commas so let's fix that first
\definedataset[autores]
\setdataset[autores]
[
nombre={Angie Natalia Farfán Acevedo},
cvlac={https://scienti.minciencias.gov.co/cvlac/visualizador/generarCurriculoCv.do?cod_rh=0002125949},
oes not require inlineuserdata?
%% MWE:
\setupinteraction[state=start]
\define[2]\imghref{\bgroup\goto{#1}[url(#2)]\egroup}
\defineexternalfigure[logo][height=1em]
\definedataset[autores]
\setdataset[autores][
nombre={Angie Natalia Farfán Acevedo},
cvlac={
https://scienti.minciencias.gov.co/cvl
El mié, 24 de mar. de 2021 a la(s) 16:47, Hans Hagen (j.ha...@xs4all.nl)
escribió:
> On 3/24/2021 6:33 PM, Jairo A. del Rio wrote:
> > Hi, Hans. Here's my (miserably failing) attempt:
> >
> > \definedataset[nicedata]
> >
> > \starttext
> >
>
On 3/24/2021 6:33 PM, Jairo A. del Rio wrote:
Hi, Hans. Here's my (miserably failing) attempt:
\definedataset[nicedata]
\starttext
\startluacode
local name = "nicedata"
-- For exposition only
local function dofactorial(n)
local function inner(c,m)
if m<2 then return c
ribió:
> On Wed, 24 Mar 2021, Jairo A. del Rio wrote:
>
> > Hi, Hans. Here's my (miserably failing) attempt:
> >
> > \definedataset[nicedata]
> >
> > \starttext
> >
> > \startluacode
> >
> > local name = "nicedata"
> &
Hi, Hans. Here's my (miserably failing) attempt:
\definedataset[nicedata]
\starttext
\startluacode
local name = "nicedata"
-- For exposition only
local function dofactorial(n)
local function inner(c,m)
if m<2 then return c end
return inner(c*m, m-1)
end
return inner
On 12/9/2020 1:08 PM, Bruce Horrocks wrote:
Here's an odd quirk...
I wanted to get at some of my dataset data for use outside of ConTeXt so I
thought I would just extract it from the .tuc file. MWE:
\definedataset [MyDS][delay=yes]
\starttext
\input tufte
\setdataset
Here's an odd quirk...
I wanted to get at some of my dataset data for use outside of ConTeXt so I
thought I would just extract it from the .tuc file. MWE:
\definedataset [MyDS][delay=yes]
\starttext
\input tufte
\setdataset [MyDS]
[ title={Test title},
page={\userpagen
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,
t with
the first run mode.
\startmode[*first]
\startluacode
io.write("\n\n Document URL?")
document.url_address = io.read()
\stopluacode
\definedataset[document_data]
\setdataset[document_data]
[url=\cldcontext{document.url_address}]
\stopmode
\star
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
on 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
er to change?
You can use the dataset command which lets you store other information,
e.g. the current value of the visible pagenumber.
\definedataset[hans][delay=yes]
\setupuserpagenumber[number=3]
\starttext
One\setdataset[hans][one][pagenumber=\userpagenumber]
\page[+2]
Two\setdataset[
{\framed[frame=on, width=4cm, height=2cm]{%%
\doiftextelse{\mydate}{\mydate}{\currentdate}}}
\setupbackgrounds
[page]
[background=firstpage]
\definedataset
[mydata]
\setdataset
[mydata]
[date]
[date=2011-11-11]
\starttext
\doiftextelse{\mydate}{\mydate}{\currentdate}
\stoptext
Marco
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]
> \defineda
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=Va
arbitrary data to be stores you need to used datasets,
as explained in
http://wiki.contextgarden.net/Command/definedataset
Hmm, the wiki only covers the TeX macro interface whilst I am
mainly concerned with passing stuff right from the Lua end.
From my reading of core-dat.lua I gather that there is
be stores you need to used datasets,
> as explained in
>
> http://wiki.contextgarden.net/Command/definedataset
Hmm, the wiki only covers the TeX macro interface whilst I am
mainly concerned with passing stuff right from the Lua end.
From my reading of core-dat.lua I gather that there is not
g/context/tex/texmf-context/tex/context/base/cont-yes.mkiv: LuaTeX error ...
···
Bug?
no, feature. job variables are just key/values and accessible at the tex
end (you store 'works too' in 'bar')
if you want arbitrary data to be stores you n
ed to avoid. Apparently I missed the obvious,
> there is no special magic needed:
>
> % doesn't seem to be necessary
> % \definedataset [test]
>
> \setdataset [test] [foo] [foo=first]
> \setdataset [test] [foo] [foo=second]
>
> \setdataset [test] [bar] [bar=first]
&
25 matches
Mail list logo