Re: line break after hbox or framed

Emanuel Han <[email protected]>
Newsgroups gmane.comp.tex.context
Message-ID <[email protected]>
Thank you Wolfgang, your solution works.

What is a „horizontal mode“? I didn’t find any information about 
neither „horizontal mode“ nor \dontleavehmode in the Wiki.

Best regards

On 7 Apr 2026, at 12:08, Wolfgang Schuster wrote:

> Am 07.04.2026 um 04:15 schrieb Emanuel Han:
>> I observed that there is a line break after hbox or framed, if these 
>> elements are at the beginning of a paragraph (which is not the case 
>> when they are not at the beginning of the paragraph). How can I 
>> circumvent this, so that there is no line break?
>>
>> \definehbox[fiveem][5em]
>>
>> \starttext
>>
>> \hboxfiveem{A} text \hboxfiveem{A} \hboxfiveem{A}.
>>
>> \framed{B} text \framed{B} \framed{B}.
>>
>> \stoptext
>
> You need \dontleavehmode before the first box to switch to horizontal 
> mode.
>
> \definehbox[fiveem][5em]
>
> \starttext
>
> \dontleavehmode\hboxfiveem{A} text \hboxfiveem{A} \hboxfiveem{A}.
>
> \dontleavehmode\framed{B} text \framed{B} \framed{B}.
>
> %\dontleavehmode\horizontalbox[width=5em]{A} text 
> \horizontalbox[width=5em]{A} \horizontalbox[width=5em]{A}
>
> \stoptext
>
> Wolfgang
>
> ___________________________________________________________________________________
> If your question is of interest to others as well, please add an entry 
> to the Wiki!
>
> maillist : [email protected] / 
> https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
> webpage  : https://www.pragma-ade.nl / https://context.aanhet.net 
> (mirror)
> archive  : https://github.com/contextgarden/context
> wiki     : https://wiki.contextgarden.net
> ___________________________________________________________________________________

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : [email protected] / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.