Am 10.12.2013 um 12:23 schrieb Pavel Stupin
Hello:
I'm struggling with understanding the way \define is supposed to work. I would like to have a macros to generate tables and populate them with some specific data submitted as arguments. I apologize for my lack of understanding of the very basics, but e.g. the following code just doesn't compile:
\define[1]\mytable{ \startxtable \startxrow \startxcell #1 \stopxcell \stopxrow \stopxtable}
\mytable{abc}
I would appreciate your help and maybe some references to read (if any) in order to educate myself.
The problem in your example isn’t define but the stable which uses a buffer to collect the content and buffers and be used in \def or \define commands. What you can do in this case is to replace \startxtable with \startembeddedxtable and change your code to \dfeine[1]\mytable {\startembeddedxtable \startxrow \startxcell#1\stopxcell \stopxrow \stopembeddedxtable} Wolfgang