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 -)

Hans


-----------------------------------------------------------------
                                          Hans Hagen | PRAGMA ADE
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
    tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
                                             | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to