Re: [NTG-context] \setvariables and database module

2018-02-01 Thread luigi scarso
On Wed, Jan 31, 2018 at 10:20 PM, Otared Kavian wrote: > > >> On 31 Jan 2018, at 18:11, Wolfgang Schuster >> wrote: >> >>> […] >>> Thanks again, but I wonder where did you find this trick?… in i-context.pdf >>> there is no entry for

Re: [NTG-context] \setvariables and database module

2018-01-31 Thread Otared Kavian
> On 31 Jan 2018, at 18:11, Wolfgang Schuster > wrote: > >> […] >> Thanks again, but I wonder where did you find this trick?… in i-context.pdf >> there is no entry for \defineseparatedlist… > > setup-en.pdf (and i-context.pdf) contains only commands from the

Re: [NTG-context] \setvariables and database module

2018-01-31 Thread Wolfgang Schuster
Otared Kavian 31. Januar 2018 um 17:58 Yes it does the job! Thanks again, but I wonder where did you find this trick?… in i-context.pdf there is no entry for \defineseparatedlist… setup-en.pdf (and i-context.pdf) contains only commands from the core. There are

Re: [NTG-context] \setvariables and database module

2018-01-31 Thread Otared Kavian
> On 31 Jan 2018, at 17:40, Wolfgang Schuster > wrote: > >> […] >> > Add “strip=yes” to remove spaces around the cells. > > \defineseparatedlist > [seplisttalk] > [separator={;}, >command=\maketalk, >strip=yes] > Yes it does the job! Thanks again,

Re: [NTG-context] \setvariables and database module

2018-01-31 Thread Wolfgang Schuster
Otared Kavian 30. Januar 2018 um 16:53 Hi again Wolfgang, I think I understood what is going wrong with my example after your hint: I have to remove all spaces around the separator and remove also the braces around each entry. That is the following works fine:

Re: [NTG-context] \setvariables and database module

2018-01-30 Thread Otared Kavian
> On 30 Jan 2018, at 19:05, Wolfgang Schuster > wrote: >> […] > Spaces after a control sequence are gobbled and multiple spaces are skipped. > > Braces around the filename are allowed because this function was added with > the extensions to the TeX binary (which

Re: [NTG-context] \setvariables and database module

2018-01-30 Thread Wolfgang Schuster
Otared Kavian 30. Januar 2018 um 18:56 Thanks again! That does it. However, it seems strange that the \externalfigure command does not accept a space in front of the file name nor after the file extension, while \input is very tolerant in that respect. Compare

Re: [NTG-context] \setvariables and database module

2018-01-30 Thread Otared Kavian
> On 30 Jan 2018, at 17:37, Wolfgang Schuster > wrote: > >> […] >> Is there a way to make the \defineseparatedlist command to be more tolerant >> for the filename? >> > No but you can remove the space with Lua. > >

Re: [NTG-context] \setvariables and database module

2018-01-30 Thread Wolfgang Schuster
Otared Kavian 30. Januar 2018 um 16:53 Hi again Wolfgang, I think I understood what is going wrong with my example after your hint: I have to remove all spaces around the separator and remove also the braces around each entry. That is the following works fine:

Re: [NTG-context] \setvariables and database module

2018-01-30 Thread Otared Kavian
> \startplacefigure[number=no] > \externalfigure[\getvariable{talk}{picture}] > \stopplacefigure > \page > \stopbuffer > > \setvariable{talk}{set}{\getbuffer[pagetalk]} > > \define[3]\maketalk{% > \setvariables[talk]% > [

Re: [NTG-context] \setvariables and database module

2018-01-30 Thread Otared Kavian
ptabulate \startplacefigure[number=no] \externalfigure[\getvariable{talk}{picture}] \stopplacefigure \page \stopbuffer \setvariable{talk}{set}{\getbuffer[pagetalk]} \define[3]\maketalk{% \setvariables[talk]% [speakername={#1},

Re: [NTG-context] \setvariables and database module

2018-01-30 Thread Wolfgang Schuster
Otared Kavian <mailto:ota...@gmail.com> 30. Januar 2018 um 15:44 Hi all, I need to create a document using a database and the \setvariables command (which I understood thanks to Wolfgang Schuster). Everything works fine except that using the approach below I need to change the e

[NTG-context] \setvariables and database module

2018-01-30 Thread Otared Kavian
Hi all, I need to create a document using a database and the \setvariables command (which I understood thanks to Wolfgang Schuster). Everything works fine except that using the approach below I need to change the entries in the database by enclosing each entry between a pair of braces

[NTG-context] Working with variables in MkIV (\ setvariables, \getparameters etc)

2012-09-09 Thread Jaroslav Hajtmar
Hello ConTeXist, Is it possible go through all the keys of \setvariables (getvariable) macro and create the appropriate macros, as in the case of \getparameters macro? I mean macro like \getallvariablesfrom[myfirstnamespace], which return contents of brackets macro \setvariables

Re: [NTG-context] Working with variables in MkIV (\ setvariables, \getparameters etc)

2012-09-09 Thread Wolfgang Schuster
Am 09.09.2012 um 10:42 schrieb Jaroslav Hajtmar hajt...@gyza.cz: Hello ConTeXist, Is it possible go through all the keys of \setvariables (getvariable) macro and create the appropriate macros, as in the case of \getparameters macro? I mean macro like \getallvariablesfrom

Re: [NTG-context] Working with variables in MkIV (\ setvariables, \getparameters etc)

2012-09-09 Thread Jaroslav Hajtmar
Thanx Wolfgang. I do not know anything about such a possibility. What do you mean? Can you show a simple example? I tried several options but nothing works. Here are some examples: \setvariables[myspacename][id=1, value={value}] \getparameters[myotherspacename][id=1, value={value}] \starttext

Re: [NTG-context] Working with variables in MkIV (\ setvariables, \getparameters etc)

2012-09-09 Thread Jaroslav Hajtmar
Thanx Wolfgang. So far I have never worked with namespaces as follows. I thought that \setvariables macro automatically namespace for variables creates and sets the values in it. Setvariables somehow connected with the creation of macro variables in the namespace of the given name? It appears

Re: [NTG-context] Working with variables in MkIV (\ setvariables, \getparameters etc)

2012-09-09 Thread Wolfgang Schuster
Am 09.09.2012 um 13:56 schrieb Jaroslav Hajtmar hajt...@gyza.cz: Thanx Wolfgang. So far I have never worked with namespaces as follows. I thought that \setvariables macro automatically namespace for variables creates and sets the values in it. Setvariables somehow connected

Re: [NTG-context] Working with variables in MkIV (\ setvariables, \getparameters etc)

2012-09-09 Thread Jaroslav Hajtmar
Thanx Wolfgang for your explanations. Jaroslav Hajtmar Dne 9.9.2012 14:44, Wolfgang Schuster napsal(a): Am 09.09.2012 um 13:56 schrieb Jaroslav Hajtmarhajt...@gyza.cz: Thanx Wolfgang. So far I have never worked with namespaces as follows. I thought that \setvariables macro

Re: [NTG-context] processing of setvariables/getvariables again

2005-10-24 Thread Thomas A. Schmitz
Taco, thanks so much! With a slight modification, your solution seems to work! I will have to test it a bit, but for the moment, it looks very good. Is the \appendtoks expensive in terms of TeX memory, cpu cycles, etc., or is it a good solution for the time being? All best, and many

Re: [NTG-context] processing of setvariables/getvariables again

2005-10-24 Thread Taco Hoekwater
Thomas A. Schmitz wrote: Is the \appendtoks expensive in terms of TeX memory, cpu cycles, etc., or is it a good solution for the time being? This solution is perfectly OK. If there was a way to pass arguments through \usemodule, that would be nicer, but if that never happens, this will

Re: [NTG-context] processing of setvariables/getvariables again

2005-10-22 Thread Taco Hoekwater
Thomas A. Schmitz wrote: Taco, I tried your suggestion, but I'm not sure I'm doing it the right way. I took the definition of \initialize... like so: \def\initializegreekfont% {\getvariable{Greek}{font}} \appendtoks \initializegreekfont \to \everystarttext % I guess I will need a

Re: [NTG-context] processing of setvariables/getvariables again

2005-10-21 Thread Taco Hoekwater
want to use the result [i.e. \getvariable {Greek}{font} and \getvariable{Greek}{scale}] within the module itself. Is this possible? Details: I want to organize the fonts in a typescript to be more flexible. So the module first defines the setupcommand: \def\setupgreek{\setvariables[Greek

Re: [NTG-context] processing of setvariables/getvariables again

2005-10-21 Thread Taco Hoekwater
Taco Hoekwater wrote: Hi Thomas, It looks like you are looking for (inside the module): \def\initializegreek {\switchtobodyfont[My\getvariable{Greek}{font}]} \appendtoks \initialize \to \everystarttext Sorry, of course this should read: \appendtoks \initializegreek \to

Re: [NTG-context] processing of setvariables/getvariables again

2005-10-21 Thread Thomas A. Schmitz
want to use the result [i.e. \getvariable {Greek}{font} and \getvariable{Greek}{scale}] within the module itself. Is this possible? Details: I want to organize the fonts in a typescript to be more flexible. So the module first defines the setupcommand: \def\setupgreek{\setvariables[Greek

Re: [NTG-context] processing of setvariables/getvariables again

2005-10-21 Thread Taco Hoekwater
Thomas A. Schmitz wrote: Hi Taco, thanks for your reply!! I have to catch a train now, but I'll try your suggestion tonight when I'm back. And yes, having the modulesomething variables would be great. What does \appendtoks do? It appends stuff to token registers (like \everystarttext)

Re: [NTG-context] processing of setvariables/getvariables again

2005-10-21 Thread Thomas A. Schmitz
Taco, I tried your suggestion, but I'm not sure I'm doing it the right way. I took the definition of \initialize... like so: \def\initializegreekfont% {\getvariable{Greek}{font}} \appendtoks \initializegreekfont \to \everystarttext % I guess I will need a similar procedure for

[NTG-context] processing of setvariables/getvariables again

2005-10-20 Thread Thomas A. Schmitz
the setupcommand: \def\setupgreek{\setvariables[Greek]} then it calls the typescript \usetypescriptfile[type-tasgreek] where all the Greek fonts are defined in this form: \starttypescript [serif] [GreekGentium] [agr] \definefontsynonym [Greekgentium-Roman] [genagr-GentiumAlt] [encoding=agr