ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* \processcommalist and load values into macros.
@ 2013-06-03 21:47 Jaroslav Hajtmar
  2013-06-04 17:34 ` Wolfgang Schuster
  0 siblings, 1 reply; 5+ messages in thread
From: Jaroslav Hajtmar @ 2013-06-03 21:47 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hello ConTeXist.
Obviously I have a problem with expansion. My question is:
How can I place the elements of the list into macros for later use?
Basically, my point is that I want assign individual values into macros 
within the cycle of ​​and those subsequently used in a buffer to 
creating my own report.
Perhaps is can be understood what I want from my minimal example.

Thanx
Jaroslav Hajtmar

Minimal example:


\let\filename\null
\let\firstname\null
\let\surname\null
\let\city\null
\let\street\null
\let\postcode\null


\def\dosomething#1{#1\par}

\def\loadlistdatatomacros#1,#2,#3,#4,#5 {
\global\def\firstname{#1}
\global\def\surname{#2}
\global\def\town{#3}
\global\def\street{#4}
\global\def\postcode{#5}
}




\startbuffer[mypostbuffer]
\dosomething

% \loadlistdatatomacros
FIRSTNAME: \firstname\par
SURNAME: \surname\par
CITY \city\par
STREET \street\par
POSTCODE \postcode\par
\page
\stopbuffer


\starttext


\processcommalist[
{John, Smith, Prague, Václavské náměstí 20, 11500 },
{Peter, Paul, Brno, Nad struhou 232/12, 234 20 },
{Annie, Walter, Ostrava, Pod lipami 7, 321 54 },
]{\getbuffer[mypostbuffer]}


\stoptext

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-06-04 21:23 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-03 21:47 \processcommalist and load values into macros Jaroslav Hajtmar
2013-06-04 17:34 ` Wolfgang Schuster
2013-06-04 18:26   ` Jaroslav Hajtmar
2013-06-04 18:40     ` Wolfgang Schuster
2013-06-04 21:23       ` Jaroslav Hajtmar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).