![](https://secure.gravatar.com/avatar/5faea8b4fa0adb143383811dc94f0d22.jpg?s=120&d=mm&r=g)
Hi Wolfgang, Thank you very much for your reply and your wise advice to use the \setvariable mechanism. It is indeed much more convenient to use for what I intend to do. The only remaining problem is that when several talks are included in my file (in the following example there three of them), then the entries to the register are correct but the associated pagenumbers are incorrect and are given the last pagenumber: in the following example all three talks are given the pagenumber 4 in the register. Is there something I am doing wrong? Thanks agin for your time and attention: Otared K. %%% begin register-talks.tex \setupinteraction[state=start] \defineregister[speakers] \setupregister [speakers] [style=sansbold, n=2] \startbuffer[pagetalk] \doflushatpar {\expanded{\speakers{\getvariable{talk}{speakername}}}% \expanded{\pagereference[talk:\getvariable{talk}{speakername}]}}% \starttabulate[|f{\bi}l|p|] \NC Speaker \EQ \getvariable{talk}{speakername} \NC\NR \NC Title \EQ \getvariable{talk}{title} \NC\NR \NC Time \EQ \getvariable{talk}{time} \NC\NR \NC Room \EQ \getvariable{talk}{room} \NC\NR \HL \stoptabulate \stopbuffer \setvariable{talk}{set}{\getbuffer[pagetalk]} \showframe[text][text] \starttext \setvariables[talk] [speakername={Gauss}, title={Remarks on Number Theory}, time={10:30}, room={A}] \page \setvariables[talk] [speakername={Poincaré}, title={Remarks on Relativity}, time={16:30}, room={B}] \page \setvariables[talk]% [speakername={Dirac}, title={Quaternions and the wave equation}, time={15:30}, room={B}] \page The talk about Gauss is on \at{page}[talk:Gauss]. \completeregister[speakers] \stoptext %%% end register-talks.tex
On 22 Jan 2018, at 20:26, Wolfgang Schuster
mailto:schuster.wolfgang@gmail.com> wrote: Otared Kavian mailto:otared@gmail.com 22. Januar 2018 um 19:53 Hi all,
I have a list of speakers (and abstracts of their talk) in a rather long document, and the name of each speaker is written to a register named speakers. Then with the command \getparameters[Talk] I get the name of each speaker and try to write it to the register with
\speakers{\TalkSpeakerName}
You have to add \expanded, i.e. \expanded{\speakers{...}}.
Indeed this does not work to obtain the result I am looking for: the sorting is indeed under the letter « t », and most importantly the register gets only the last name in the list instead of getting each speaker name.
The following is a (not so minimal…) example. Can anyone help me in this matter?
When you replace \getparameters with \setvariables you can set a command which is applied each time when you set new values.
\defineregister[speakers]
\setupregister [speakers] [style=sansbold, n=2]
\startbuffer[pagetalk] \doflushatpar {\expanded{\speakers{\getvariable{talk}{speakername}}}% \expanded{\pagereference[talk:\getvariable{talk}{speakername}]}}% \starttabulate[|f{\bi}l|p|] \NC Speaker \EQ \getvariable{talk}{speakername} \NC\NR \NC Title \EQ \getvariable{talk}{title} \NC\NR \NC Time \EQ \getvariable{talk}{time} \NC\NR \NC Room \EQ \getvariable{talk}{room} \NC\NR \HL \stoptabulate \stopbuffer
\setvariable{talk}{set}{\getbuffer[pagetalk]}
\showframe[text][text]
\starttext
\setvariables [talk] [speakername={Gauss}, title={Remarks on Number Theory}, time={10:30}, room={A}]
The talk about Gauss was on \at{page}[talk:Gauss].
\completeregister[speakers]
\stoptext
Wolfgang ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl mailto:ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl http://www.pragma-ade.nl/ / http://context.aanhet.net http://context.aanhet.net/ archive : https://bitbucket.org/phg/context-mirror/commits/ https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net http://contextgarden.net/ ___________________________________________________________________________________