ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: "Wolfgang Schuster" <schuster.wolfgang@googlemail.com>
To: "mailing list for ConTeXt users" <ntg-context@ntg.nl>
Subject: Re: inframed : makes a newline
Date: Thu, 21 Aug 2008 11:48:07 +0200	[thread overview]
Message-ID: <115224fb0808210248t7ede9800t1c5704eae4a2857@mail.gmail.com> (raw)
In-Reply-To: <20080821092327.GA21130@gaston.couberia.bzh>

On Thu, Aug 21, 2008 at 11:23 AM, Peter Münster <pmlists@free.fr> wrote:
> On Thu, Aug 21 2008, Wolfgang Schuster wrote:
>
>> > For beginners (especially former LaTeX users), this is a real headache:
>> > \framed, \externalfigure and so on start sometimes a new paragraph, and
>> > sometimes not. In my opinion, these commands should behave like a simple
>> > hbox.
>>
>> But this is exactly what \framed does.
>>
>> \starttext
>> \framed{text}
>> \framed{text}
>> \hbox{text}
>> \hbox{text}
>> \stoptext
>
> Oh, you're right, I was pretty sure, that \hbox behaved like a normal
> letter...

AFAIK this was also in one of the exercises in the TeXbook, a \hbox in
vertical let you remain in vertical mode.

> Ok, then I would rather like to compare this with \parbox and
> \includegraphics from LaTeX: they behave like normal letters.
> Perhaps I've just spent too much of my life-time with LaTeX... :(
>
>
>> What you want produce also unwanted results in other commands.
>>
>> \starttext
>> \placefigure
>>   {Centered?}
>>   {\dontleavehmode\framed{No!}}
>> \stoptext
>
> I don't know, why this is not centred, but I would say, that
> \placefigure{Centred?}{\framed{test}}
> and
> \placefigure{Centred?}{test}
> should behave the same way.

In this yes but in my example the \dontleavehmodein front of \framed
forced TeX to go in horizontal mode and to use \hsize as width for
the float box.

\starttext
\ruledvbox{\hbox{text}}
\ruledvbox{\dontleavehmode\hbox{text}}
\stoptext

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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


      reply	other threads:[~2008-08-21  9:48 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-20  9:38 Eric DÉTREZ
2008-08-20 10:47 ` Peter Rolf
2008-08-20 18:32   ` Peter Münster
2008-08-21  7:29     ` Wolfgang Schuster
2008-08-21  9:23       ` Peter Münster
2008-08-21  9:48         ` Wolfgang Schuster [this message]

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=115224fb0808210248t7ede9800t1c5704eae4a2857@mail.gmail.com \
    --to=schuster.wolfgang@googlemail.com \
    --cc=ntg-context@ntg.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).