* \mathpunctuationtrue and latest beta
@ 2004-07-10 10:14 Peter Münster
2004-07-14 13:38 ` Hans Hagen
0 siblings, 1 reply; 2+ messages in thread
From: Peter Münster @ 2004-07-10 10:14 UTC (permalink / raw)
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
--
http://pmrb.free.fr/contact/
_____________________________________
FilmSearch engine: http://f-s.sf.net/
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: \mathpunctuationtrue and latest beta
2004-07-10 10:14 \mathpunctuationtrue and latest beta Peter Münster
@ 2004-07-14 13:38 ` Hans Hagen
0 siblings, 0 replies; 2+ messages in thread
From: Hans Hagen @ 2004-07-14 13:38 UTC (permalink / raw)
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
-----------------------------------------------------------------
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-07-14 13:38 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-07-10 10:14 \mathpunctuationtrue and latest beta Peter Münster
2004-07-14 13:38 ` Hans Hagen
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).