Peter Münster wrote:
Hello, for some reasons I need something like this:
\mathpunctuationtrue \def\MyMacro#1{\stoptable\par#1} \starttext \starttable[|c|] \NC1\NC\AR \MyMacro{Peter, Olivier} % problem with comma \stoptext
But with the latest beta version, this works no more. Could you help please? Greetings, Peter
actually this is a combined problem: (1) in table there is a math switch (the following patch removes that one) and (2) you feed #1 to the macro while still in table mode and therefore in the math mode (outer box) and so the , is active etc etc, a solution for that is (for the unpatched table macro) to do a two step macro \unprotect \def\!ttBeginTableA[#1]{% \if #1u% % "unboxed" table \ifmmode \def\!ttEndTable{% % user had better be in display math mode \relax}% % and have only one table at the outer level \else % user had better be in vertical mode \bgroup \def\!ttEndTable{% \egroup}% \fi \else %\hbox\bgroup $ %\def\!ttEndTable{% % \egroup % for the \vtop, \vbox, or \vcenter, yet to come % $% for math mode % \egroup}% for the \hbox %\if #1t% % \vtop %\else % \if #1b% % \vbox % \else % \vcenter % math mode was essential for this % \fi %\fi % \hbox\bgroup \def\!ttEndTable{\egroup\egroup}% \if#1t% \vtop \else\if#1b% \vbox \else \def\!ttEndTable{\egroup$\egroup}% %$\vcenter \scratchtoks\everymath\everymath\emptytoks$\everymath\scratchtoks\vcenter \fi\fi % \bgroup % for the \vtop, \vbox, or \vcenter \fi \advance\!taRecursionLevel 1 % RecursionLevel governs initialization \let\!ttRightGlue=\relax % This may be changed by \JustCenter, etc \everycr={} \ifnum \!taRecursionLevel=1 \!ttInitializeTable \fi} \protect \mathpunctuationtrue \def\MyMacro{\stoptable\doMyMacro} \def\doMyMacro#1{\par#1} test, test \starttext {\starttable[|c|] \NC1,,10\NC\AR \MyMacro{Peter, Olivier} } \stoptext ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------