[NTG-context] Re: Score sums and references

2023-12-13 Thread Jairo A. del Rio
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

[NTG-context] Re: Score sums and references

2023-12-13 Thread Hans Hagen
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]}

[NTG-context] Re: \doifemptyelse issue?

2023-11-14 Thread Bruce Horrocks
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 >>

[NTG-context] Re: \doifemptyelse issue?

2023-11-14 Thread Hans Hagen
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

[NTG-context] \doifemptyelse issue?

2023-11-13 Thread Bruce Horrocks
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

[NTG-context] Re: Experiments with \doloopoverlist

2023-08-17 Thread Hans Hagen via ntg-context
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

[NTG-context] Experiments with \doloopoverlist

2023-08-16 Thread Andres Conrado Montoya
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}},

[NTG-context] store data in the first run for later runs?

2020-11-06 Thread Pablo Rodriguez
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,

Re: [NTG-context] invoking ConTeXt from .bat file in Win7

2020-10-28 Thread Pablo Rodriguez
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

Re: [NTG-context] invoking ConTeXt from .bat file in Win7

2020-10-28 Thread Aditya Mahajan
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

Re: [NTG-context] Let chapter start on odd page and make the even page before show an image

2020-05-29 Thread Aditya Mahajan
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

Re: [NTG-context] Let chapter start on odd page and make the even page before show an image

2020-05-29 Thread Jan U. Hasecke
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

Re: [NTG-context] Let chapter start on odd page and make the even page before show an image

2020-05-29 Thread Wolfgang Schuster
  [alternative=doublesided] \setupexternalfigures   [location=default] \definedataset [chapter] \startsetups [chapter:before]   \page[yes]   \doglobal\increment\ChapterCounter   \doifoddpageelse     {}     {\doifsomething    {\datasetvariable{chapter}{\ChapterCounter}{image

Re: [NTG-context] fancy chapter setup

2020-01-13 Thread Wolfgang Schuster
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  

Re: [NTG-context] passing variables/data between context and lua

2019-10-06 Thread Wolfgang Schuster
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

Re: [NTG-context] passing variables/data between context and lua

2019-10-05 Thread Rudolf Bahr
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

Re: [NTG-context] pagereferences

2016-01-17 Thread Wolfgang Schuster
[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

Re: [NTG-context] deferred variable lookup in environment?

2013-02-05 Thread Ingo Hohmann
. 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

Re: [NTG-context] deferred variable lookup in environment?

2013-02-01 Thread Marco Patzer
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

[NTG-context] Multipass Datasets doesn't work

2012-10-29 Thread Martin Fechner
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

Re: [NTG-context] Multipass Datasets doesn't work

2012-10-29 Thread Wolfgang Schuster
\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

Re: [NTG-context] [dev-context] Storing and retrieving two-pass data

2012-04-20 Thread luigi scarso
=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