ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Filling a box
@ 2009-04-06 23:07 Diego Depaoli
  2009-04-06 23:14 ` Wolfgang Schuster
  0 siblings, 1 reply; 11+ messages in thread
From: Diego Depaoli @ 2009-04-06 23:07 UTC (permalink / raw)
  To: mailing list for ConTeXt users

________________
|i want a framed wh|
|ere the text flushes|
|to the next line with|
|out hyphenation.Th|
|ere is a way to get|
|this result?            |
----------------------------

Best regards
-- 
Diego Depaoli
___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Filling a box
  2009-04-06 23:07 Filling a box Diego Depaoli
@ 2009-04-06 23:14 ` Wolfgang Schuster
  2009-04-06 23:19   ` luigi scarso
  2009-04-07 21:31   ` Diego Depaoli
  0 siblings, 2 replies; 11+ messages in thread
From: Wolfgang Schuster @ 2009-04-06 23:14 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 07.04.2009 um 01:07 schrieb Diego Depaoli:

> ________________
> |i want a framed wh|
> |ere the text flushes|
> |to the next line with|
> |out hyphenation.Th|
> |ere is a way to get|
> |this result?            |
> ----------------------------

align={nothyphenated,...}

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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Filling a box
  2009-04-06 23:14 ` Wolfgang Schuster
@ 2009-04-06 23:19   ` luigi scarso
  2009-04-07 21:36     ` Diego Depaoli
  2009-04-07 21:31   ` Diego Depaoli
  1 sibling, 1 reply; 11+ messages in thread
From: luigi scarso @ 2009-04-06 23:19 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 463 bytes --]

On Tue, Apr 7, 2009 at 1:14 AM, Wolfgang Schuster <
schuster.wolfgang@googlemail.com> wrote:

>
> Am 07.04.2009 um 01:07 schrieb Diego Depaoli:
>
>  ________________
>> |i want a framed wh|
>> |ere the text flushes|
>> |to the next line with|
>> |out hyphenation.Th|
>> |ere is a way to get|
>> |this result?            |
>> ----------------------------
>>
> hmm what do you mean ?
It seems that you want to hyphenate, but you don't want to see '-' .


-- 
luigi

[-- Attachment #1.2: Type: text/html, Size: 971 bytes --]

[-- Attachment #2: Type: text/plain, Size: 487 bytes --]

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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Filling a box
  2009-04-06 23:14 ` Wolfgang Schuster
  2009-04-06 23:19   ` luigi scarso
@ 2009-04-07 21:31   ` Diego Depaoli
  1 sibling, 0 replies; 11+ messages in thread
From: Diego Depaoli @ 2009-04-07 21:31 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Tue, Apr 7, 2009 at 1:14 AM, Wolfgang Schuster
<schuster.wolfgang@googlemail.com> wrote:
>
> Am 07.04.2009 um 01:07 schrieb Diego Depaoli:
>
>> ________________
>> |i want a framed wh|
>> |ere the text flushes|
>> |to the next line with|
>> |out hyphenation.Th|
>> |ere is a way to get|
>> |this result?            |
>> ----------------------------
>
> align={nothyphenated,...}

Thanks Wolfgang for the reply, but this isn't exactly what I was looking for.
As you can see here
http://wiki.contextgarden.net/Framed
the box isn't filled on the right side because Context, in such way,
formats the text.
What I was looking for is a 'snaked' output where the text follows in
a new line once it reaches the right side of the box.

Cheers
-- 
Diego Depaoli
___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Filling a box
  2009-04-06 23:19   ` luigi scarso
@ 2009-04-07 21:36     ` Diego Depaoli
  2009-04-07 21:47       ` Wolfgang Schuster
  0 siblings, 1 reply; 11+ messages in thread
From: Diego Depaoli @ 2009-04-07 21:36 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Tue, Apr 7, 2009 at 1:19 AM, luigi scarso <luigi.scarso@gmail.com> wrote:
>
> hmm what do you mean ?
> It seems that you want to hyphenate, but you don't want to see '-' .
and I don't want to respect the hyphenation's rules.

-- 
Diego Depaoli
___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Filling a box
  2009-04-07 21:36     ` Diego Depaoli
@ 2009-04-07 21:47       ` Wolfgang Schuster
  2009-04-07 22:02         ` Diego Depaoli
  0 siblings, 1 reply; 11+ messages in thread
From: Wolfgang Schuster @ 2009-04-07 21:47 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 07.04.2009 um 23:36 schrieb Diego Depaoli:

> On Tue, Apr 7, 2009 at 1:19 AM, luigi scarso  
> <luigi.scarso@gmail.com> wrote:
>>
>> hmm what do you mean ?
>> It seems that you want to hyphenate, but you don't want to see '-' .
> and I don't want to respect the hyphenation's rules.

\starttext

\def\breakeverywhere#1{\if#1\normalspace\space\else#1\allowbreak\fi}

\framed
   [width=4cm,align=normal]
   {\handletokens i want a framed where the text flushes to the next  
line without hyphenation. There is a way to get this result?\with 
\breakeverywhere}

\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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Filling a box
  2009-04-07 21:47       ` Wolfgang Schuster
@ 2009-04-07 22:02         ` Diego Depaoli
  2009-04-07 22:13           ` luigi scarso
  2009-04-08  6:08           ` Bostjan Vesnicer
  0 siblings, 2 replies; 11+ messages in thread
From: Diego Depaoli @ 2009-04-07 22:02 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Tue, Apr 7, 2009 at 11:47 PM, Wolfgang Schuster
<schuster.wolfgang@googlemail.com> wrote:
>
> \starttext
>
> \def\breakeverywhere#1{\if#1\normalspace\space\else#1\allowbreak\fi}
>
> \framed
>  [width=4cm,align=normal]
>  {\handletokens i want a framed where the text flushes to the next line
> without hyphenation. There is a way to get this
> result?\with\breakeverywhere}
>
> \stoptext

YYYEEEEEEEEEEEEEESSSSSSSSSSSSS!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Many thanks Wolfgang

Paraphrasing Beyoncè
If I were a girl...


-- 
Diego Depaoli
___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Filling a box
  2009-04-07 22:02         ` Diego Depaoli
@ 2009-04-07 22:13           ` luigi scarso
  2009-04-07 22:19             ` Marcin Borkowski
  2009-04-08  6:08           ` Bostjan Vesnicer
  1 sibling, 1 reply; 11+ messages in thread
From: luigi scarso @ 2009-04-07 22:13 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Wed, Apr 8, 2009 at 12:02 AM, Diego Depaoli <trebestie@gmail.com> wrote:
> On Tue, Apr 7, 2009 at 11:47 PM, Wolfgang Schuster
> <schuster.wolfgang@googlemail.com> wrote:
>>
>> \starttext
>>
>> \def\breakeverywhere#1{\if#1\normalspace\space\else#1\allowbreak\fi}
>>
>> \framed
>>  [width=4cm,align=normal]
>>  {\handletokens i want a framed where the text flushes to the next line
>> without hyphenation. There is a way to get this
>> result?\with\breakeverywhere}
>>
>> \stoptext
>
> YYYEEEEEEEEEEEEEESSSSSSSSSSSSS!!!!!!!!!!!!!!!!!!!!!!!!!!!!
hmm.
I should say ni . The problem are spaces .
In this example I should expected that
hy- => hy
and some changes in glues
and nothing else.
Also text with \handletokens is ,well, "not so good " (ie horrible) .

\starttext

\def\breakeverywhere#1{\if#1\normalspace\space\else#1\allowbreak\fi}

\framed
 [width=4cm,align=normal]
 {i want a framed where the text flushes to the next line without
hyphenation. There is a way to get this result?}


\framed
 [width=4cm,align=normal]
 {\handletokens i want a framed where the text flushes to the next
line without hyphenation. There is a way to get this
result?\with\breakeverywhere}

\stoptext


-- 
luigi
___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Filling a box
  2009-04-07 22:13           ` luigi scarso
@ 2009-04-07 22:19             ` Marcin Borkowski
  2009-04-07 22:33               ` luigi scarso
  0 siblings, 1 reply; 11+ messages in thread
From: Marcin Borkowski @ 2009-04-07 22:19 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Dnia Wed, Apr 08, 2009 at 12:13:01AM +0200, luigi scarso napisa&#322;(a):
> On Wed, Apr 8, 2009 at 12:02 AM, Diego Depaoli <trebestie@gmail.com> wrote:
> > On Tue, Apr 7, 2009 at 11:47 PM, Wolfgang Schuster
> > <schuster.wolfgang@googlemail.com> wrote:
> >>
> >> \starttext
> >>
> >> \def\breakeverywhere#1{\if#1\normalspace\space\else#1\allowbreak\fi}
> >>
> >> \framed
> >>  [width=4cm,align=normal]
> >>  {\handletokens i want a framed where the text flushes to the next line
> >> without hyphenation. There is a way to get this
> >> result?\with\breakeverywhere}
> >>
> >> \stoptext
> >
> > YYYEEEEEEEEEEEEEESSSSSSSSSSSSS!!!!!!!!!!!!!!!!!!!!!!!!!!!!
> hmm.
> I should say ni . The problem are spaces .
> In this example I should expected that
> hy- => hy
> and some changes in glues
> and nothing else.
> Also text with \handletokens is ,well, "not so good " (ie horrible) .

I am not sure, but maybe that would be a good idea: gather 1,2,3,...
tokens and pack them (as a whole) into an hbox until its width is
greater than the frame width, output it, and repeat until there's
nothing left.  This would be very time-consuming (at least without lua),
but it should preserve kerns etc.

Also, instead of examining the width, one could probably pack the tokens
into an \hbox to ... {...} and examine the badness.

I don't dare to try to implement it, though - at least not at 00:17 AM;)

Regards

-- 
Marcin Borkowski (http://mbork.pl)
___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Filling a box
  2009-04-07 22:19             ` Marcin Borkowski
@ 2009-04-07 22:33               ` luigi scarso
  0 siblings, 0 replies; 11+ messages in thread
From: luigi scarso @ 2009-04-07 22:33 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Wed, Apr 8, 2009 at 12:19 AM, Marcin Borkowski
<mbork@atos.wmid.amu.edu.pl> wrote:
> Dnia Wed, Apr 08, 2009 at 12:13:01AM +0200, luigi scarso napisa&#322;(a):
>> On Wed, Apr 8, 2009 at 12:02 AM, Diego Depaoli <trebestie@gmail.com> wrote:
>> > On Tue, Apr 7, 2009 at 11:47 PM, Wolfgang Schuster
>> > <schuster.wolfgang@googlemail.com> wrote:
>> >>
>> >> \starttext
>> >>
>> >> \def\breakeverywhere#1{\if#1\normalspace\space\else#1\allowbreak\fi}
>> >>
>> >> \framed
>> >>  [width=4cm,align=normal]
>> >>  {\handletokens i want a framed where the text flushes to the next line
>> >> without hyphenation. There is a way to get this
>> >> result?\with\breakeverywhere}
>> >>
>> >> \stoptext
>> >
>> > YYYEEEEEEEEEEEEEESSSSSSSSSSSSS!!!!!!!!!!!!!!!!!!!!!!!!!!!!
>> hmm.
>> I should say ni . The problem are spaces .
>> In this example I should expected that
>> hy- => hy
>> and some changes in glues
>> and nothing else.
>> Also text with \handletokens is ,well, "not so good " (ie horrible) .
>
> I am not sure, but maybe that would be a good idea: gather 1,2,3,...
> tokens and pack them (as a whole) into an hbox until its width is
> greater than the frame width, output it, and repeat until there's
> nothing left.  This would be very time-consuming (at least without lua),
> but it should preserve kerns etc.
>
> Also, instead of examining the width, one could probably pack the tokens
> into an \hbox to ... {...} and examine the badness.
>
> I don't dare to try to implement it, though - at least not at 00:17 AM;)
or try-and-error with some elastic spaces

\def\breakeverywhere#1{\if#1\normalspace\hskip0.5ex
plus0.1ex\else#1\allowbreak\fi}

-- 
luigi
___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Filling a box
  2009-04-07 22:02         ` Diego Depaoli
  2009-04-07 22:13           ` luigi scarso
@ 2009-04-08  6:08           ` Bostjan Vesnicer
  1 sibling, 0 replies; 11+ messages in thread
From: Bostjan Vesnicer @ 2009-04-08  6:08 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 422 bytes --]

An almost identical solution is given on the wiki 
(http://wiki.contextgarden.net/Cropping_text)

Bostjan

>> \starttext
>>
>> \def\breakeverywhere#1{\if#1\normalspace\space\else#1\allowbreak\fi}
>>
>> \framed
>>  [width=4cm,align=normal]
>>  {\handletokens i want a framed where the text flushes to the next line
>> without hyphenation. There is a way to get this
>> result?\with\breakeverywhere}
>>
>> \stoptext
>>     

[-- Attachment #1.2: S/MIME Cryptographic Signature --]
[-- Type: application/x-pkcs7-signature, Size: 4617 bytes --]

[-- Attachment #2: Type: text/plain, Size: 487 bytes --]

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

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2009-04-08  6:08 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-04-06 23:07 Filling a box Diego Depaoli
2009-04-06 23:14 ` Wolfgang Schuster
2009-04-06 23:19   ` luigi scarso
2009-04-07 21:36     ` Diego Depaoli
2009-04-07 21:47       ` Wolfgang Schuster
2009-04-07 22:02         ` Diego Depaoli
2009-04-07 22:13           ` luigi scarso
2009-04-07 22:19             ` Marcin Borkowski
2009-04-07 22:33               ` luigi scarso
2009-04-08  6:08           ` Bostjan Vesnicer
2009-04-07 21:31   ` Diego Depaoli

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