Am 21.06.10 22:04, schrieb Hans Hagen:
On 21-6-2010 8:03, Wolfgang Schuster wrote:
Am 21.06.10 19:50, schrieb Matija Å uklje:
Dne ponedeljek 21. junija 2010 ob 19:47:08 je Wolfgang Schuster napisal(a):
Am 21.06.10 18:53, schrieb Yury G. Kudryashov:
Try \hbox{word} (AFAIR, this is a plain TeX command) If you want a context command then use \mbox ;) Is there any practical difference?
No but i wish there is one, e.g. the following example shows a problem with \hbox.
\starttext \hbox{test} text text \blank \dontleavehmode\hbox{test} text text \stoptext
As you can see in the output the first 'test' starts 'text text' on a new line and i forced \hbox to appear in horizontal mode with \dontleavehmode and this can't be changed because \hbox is a TeX primitive and you have to rely on this behaviour. The \mbox command isn't a primitive and i would be so easy to add \dontleavehmode to it's definition to make sure the text after \mbox won't appear on a new line, this means in this example both lines result in the same output.
\starttext \dontleavehmode\hbox{test} text text \blank \mbox{test} text text \stoptext
we can have
\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 Wolfgang