Re: How to forbid horizontal overflows totally (in some cases)?

"Jairo A. del Rio" <[email protected]>
Newsgroups gmane.comp.tex.context
Message-ID <CAKyqqaYJ6qWMpw5zG32k1ERvTwt1TCBwGCOerQ8=xBcceZpV9Q@mail.gmail.com>
Thank you very much, Wolfgang! This does what I intended.

El sáb, 28 mar 2026 a la(s) 2:35 a.m., Wolfgang Schuster (
[email protected]) escribió:

> Am 28.03.2026 um 01:52 schrieb Jairo A. del Rio:
> > Hi, I want to know if ConTeXt currently has a simpler mechanism to
> > achieve what is in the title, i.e., avoid text overflows at all.
> > Something similar to "ugly MSWord justify" for some specific cases. I've
> > attached an example of what I need to do and what I've come up with so
> > far (formulas are just for testing, not actual content).
>
> You can use a large value for \emergencystretch, e.g. extremestretch
> sets the value to 10*bodyfontsize.
>
> \showframe
>
> \starttext
>
> \startalignment[extremestretch,paragraph]
>
> \startluacode
>
> local op = {
>    {"+", function(a,b) return a + b end},
>    {"-", function(a,b) return a - b end},
>    {"*", function(a,b) return a * b end}
> }
>
> context.dontleavehmode()
> for i = 1, 100 do
>    local a = math.random(1,1000)
>    local b = math.random(1,1000)
>    local o = math.random(1,3)
>    context.hbox(string.formatters["%d%s%d = %d"](a, op[1][1], b,
> op[1][2](a,b)))
>    context.space()
> end
>
> \stopluacode
>
> \stopalignment
>
> \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.