22 Jun
2010
22 Jun
'10
12:56 p.m.
Am 22.06.10 09:10, schrieb Hans Hagen:
On 21-6-2010 10:16, Wolfgang Schuster wrote:
\unexpanded\def\mbox {\ifmmode\normalmbox\else\dontleavehmode\normalhbox\fi}
as i never use this command it won't break my documents -)
thanks, this looks good
in retrospect it's tricky ...
\setbox0\mbox{...}
will break then
at the cost of a box register even this works \def\mbox {\ifmmode\normalmbox\else\specialmbox\fi} \newbox\textmbox \def\specialmbox {\normalhbox\bgroup \dowithnextbox{\global\setbox\textmbox\box\nextbox\egroup\dontleavehmode\box\textmbox}\normalhbox} \starttext \hbox{text} text text \mbox{text} text text \setbox0\hbox{bar}\setbox1\mbox{foo}\box1\box0 \stoptext Wolfgang