ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Wolfgang Schuster <schuster.wolfgang@googlemail.com>
To: Hans Hagen <pragma@wxs.nl>
Cc: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Omitting hyphenation
Date: Mon, 21 Jun 2010 22:16:50 +0200	[thread overview]
Message-ID: <4C1FC8B2.2030308@googlemail.com> (raw)
In-Reply-To: <4C1FC5CB.5010906@wxs.nl>

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
___________________________________________________________________________________
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	other threads:[~2010-06-21 20:16 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-21 16:32 Matija Šuklje
2010-06-21 16:53 ` Yury G. Kudryashov
2010-06-21 17:43   ` Matija Šuklje
2010-06-21 17:47   ` Wolfgang Schuster
2010-06-21 17:50     ` Matija Šuklje
2010-06-21 18:03       ` Wolfgang Schuster
2010-06-21 20:04         ` Hans Hagen
2010-06-21 20:16           ` Wolfgang Schuster [this message]
2010-06-22  7:10             ` Hans Hagen
2010-06-22 12:56               ` Wolfgang Schuster
2010-06-22  6:02         ` Marco
2010-06-21 17:45 ` Wolfgang Schuster
2010-06-21 20:00   ` Hans Hagen
2010-06-21 20:22     ` Wolfgang Schuster
2010-06-22  7:18       ` Hans Hagen
2010-06-22 12:55         ` Wolfgang Schuster
2010-06-24 21:30         ` Matija Šuklje
2010-06-24 21:42           ` Wolfgang Schuster
2010-06-24 21:48           ` Wolfgang Schuster
2010-06-24 21:52             ` Matija Šuklje

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4C1FC8B2.2030308@googlemail.com \
    --to=schuster.wolfgang@googlemail.com \
    --cc=ntg-context@ntg.nl \
    --cc=pragma@wxs.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).