ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* stretch framed text to width
@ 2013-10-08 18:04 Pablo Rodriguez
  2013-10-08 18:15 ` Wolfgang Schuster
  0 siblings, 1 reply; 5+ messages in thread
From: Pablo Rodriguez @ 2013-10-08 18:04 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Dear list,

I have a very simple request, but I wasn’t able to find information on
the wiki or the ConTeXt manual. Here is the sample:

   \starttext
   \framed[width=40mm]{word}
   \stoptext

How can I get the word stretched to the frame width?

Many thanks for your help,


Pablo
-- 
http://www.ousia.tk
___________________________________________________________________________________
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
___________________________________________________________________________________


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

* Re: stretch framed text to width
  2013-10-08 18:04 stretch framed text to width Pablo Rodriguez
@ 2013-10-08 18:15 ` Wolfgang Schuster
  2013-10-08 19:40   ` Pablo Rodriguez
  2013-10-09  5:11   ` Anomaly in " hwitloc
  0 siblings, 2 replies; 5+ messages in thread
From: Wolfgang Schuster @ 2013-10-08 18:15 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 08.10.2013 um 20:04 schrieb Pablo Rodriguez <oinos@gmx.es>:

> Dear list,
> 
> I have a very simple request, but I wasn’t able to find information on
> the wiki or the ConTeXt manual. Here is the sample:
> 
>   \starttext
>   \framed[width=40mm]{word}
>   \stoptext
> 
> How can I get the word stretched to the frame width?

\starttext

\framed[width=40mm]{word}

\framed[width=40mm]{\stretched[features=none,width=\framedwidth]{word}}

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


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

* Re: stretch framed text to width
  2013-10-08 18:15 ` Wolfgang Schuster
@ 2013-10-08 19:40   ` Pablo Rodriguez
  2013-10-09  5:11   ` Anomaly in " hwitloc
  1 sibling, 0 replies; 5+ messages in thread
From: Pablo Rodriguez @ 2013-10-08 19:40 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 10/08/2013 08:15 PM, Wolfgang Schuster wrote:
> Am 08.10.2013 um 20:04 schrieb Pablo Rodriguez <oinos@gmx.es>:
>> [...]
>> How can I get the word stretched to the frame width?
> 
> \starttext
> \framed[width=40mm]{word}
> \framed[width=40mm]{\stretched[features=none,width=\framedwidth]{word}}
> \stoptext

Many thanks for your help, Wolfgang.


Pablo
-- 
http://www.ousia.tk
___________________________________________________________________________________
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
___________________________________________________________________________________


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

* Anomaly in stretch framed text to width
  2013-10-08 18:15 ` Wolfgang Schuster
  2013-10-08 19:40   ` Pablo Rodriguez
@ 2013-10-09  5:11   ` hwitloc
  2013-10-09  8:38     ` Hans Hagen
  1 sibling, 1 reply; 5+ messages in thread
From: hwitloc @ 2013-10-09  5:11 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Wolfgang Schuster wrote:
> .... snipped ..
>
> \starttext
> \framed[width=40mm]{word}
> \framed[width=40mm]{\stretched[features=none,width=\framedwidth]{word}}
> \stoptext
> 

I also appreciate the example provided by Wolfgang.  I have found an anomaly which produces incorrect results on my system.

Versin:  mtx-context     | current version: 2013.09.03 16:23


Not so minimal, minimal example.  I did a range of values for comparison.
Problem is:
   1. I expect a one character word to be centered.  Not necessary but I expected this, because all words >1 character do center alignment.

   2. The letter 'w' for some reason binds to the next character and produces an incorrect result.

   3. In the last table the letters 'db' seem to be stuck together when the word is seven characters or more.  This anomalous unsymmetric binding also occurs in the 2nd and 3rd tables, as well.

\starttext

 \framed[width=45mm]{\stretched[features=none,width=\framedwidth]{1}} 
 \framed[width=45mm]{\stretched[features=none,width=\framedwidth]{12}} 
 \framed[width=45mm]{\stretched[features=none,width=\framedwidth]{123}} 
 \framed[width=45mm]{\stretched[features=none,width=\framedwidth]{1234}} 
 \framed[width=45mm]{\stretched[features=none,width=\framedwidth]{12345}} 
 \framed[width=45mm]{\stretched[features=none,width=\framedwidth]{123456}} 
 \framed[width=45mm]{\stretched[features=none,width=\framedwidth]{1234567}} 
 \framed[width=45mm]{\stretched[features=none,width=\framedwidth]{12345678}} 
 \framed[width=45mm]{\stretched[features=none,width=\framedwidth]{123456789}} 
 \framed[width=45mm]{\stretched[features=none,width=\framedwidth]{1234567890}} 

\blank[big]

 \framed[width=45mm]{\stretched[features=none,width=\framedwidth]{w}} 
 \framed[width=45mm]{\stretched[features=none,width=\framedwidth]{wo}} 
 \framed[width=45mm]{\stretched[features=none,width=\framedwidth]{wor}} 
 \framed[width=45mm]{\stretched[features=none,width=\framedwidth]{word}} 
 \framed[width=45mm]{\stretched[features=none,width=\framedwidth]{wordw}} 
 \framed[width=45mm]{\stretched[features=none,width=\framedwidth]{wordwo}} 
 \framed[width=45mm]{\stretched[features=none,width=\framedwidth]{wordwor}} 
 \framed[width=45mm]{\stretched[features=none,width=\framedwidth]{wordword}} 
 \framed[width=45mm]{\stretched[features=none,width=\framedwidth]{wordwordw}} 
 \framed[width=45mm]{\stretched[features=none,width=\framedwidth]{wordwordwo}}  

\blank[big]

 \framed[width=45mm]{\stretched[features=none,width=\framedwidth]{w}}
 \framed[width=45mm]{\stretched[features=none,width=\framedwidth]{wa}}
 \framed[width=45mm]{\stretched[features=none,width=\framedwidth]{war}}
 \framed[width=45mm]{\stretched[features=none,width=\framedwidth]{ward}}
 \framed[width=45mm]{\stretched[features=none,width=\framedwidth]{wardw}}
 \framed[width=45mm]{\stretched[features=none,width=\framedwidth]{wardwa}}
 \framed[width=45mm]{\stretched[features=none,width=\framedwidth]{wardwar}}
 \framed[width=45mm]{\stretched[features=none,width=\framedwidth]{wardward}}
 \framed[width=45mm]{\stretched[features=none,width=\framedwidth]{wardwardw}}
 \framed[width=45mm]{\stretched[features=none,width=\framedwidth]{wardwardwa}}

\blank[big]

 \framed[width=45mm]{\stretched[features=none,width=\framedwidth]{b}}
 \framed[width=45mm]{\stretched[features=none,width=\framedwidth]{ba}}
 \framed[width=45mm]{\stretched[features=none,width=\framedwidth]{bar}}
 \framed[width=45mm]{\stretched[features=none,width=\framedwidth]{bard}}
 \framed[width=45mm]{\stretched[features=none,width=\framedwidth]{bardb}}
 \framed[width=45mm]{\stretched[features=none,width=\framedwidth]{bardba}}
 \framed[width=45mm]{\stretched[features=none,width=\framedwidth]{bardbar}}
 \framed[width=45mm]{\stretched[features=none,width=\framedwidth]{bardbard}}
 \framed[width=45mm]{\stretched[features=none,width=\framedwidth]{bardbardb}}
 \framed[width=45mm]{\stretched[features=none,width=\framedwidth]{bardbardba}}

\stoptext

Is this a caculation / rouding / logic error ?  
___________________________________________________________________________________
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
___________________________________________________________________________________


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

* Re: Anomaly in stretch framed text to width
  2013-10-09  5:11   ` Anomaly in " hwitloc
@ 2013-10-09  8:38     ` Hans Hagen
  0 siblings, 0 replies; 5+ messages in thread
From: Hans Hagen @ 2013-10-09  8:38 UTC (permalink / raw)
  To: ntg-context

On 10/9/2013 7:11 AM, hwitloc@gmail.com wrote:
>
> Wolfgang Schuster wrote:
>> .... snipped ..
>>
>> \starttext
>> \framed[width=40mm]{word}
>> \framed[width=40mm]{\stretched[features=none,width=\framedwidth]{word}}
>> \stoptext
>>
>
> I also appreciate the example provided by Wolfgang.  I have found an anomaly which produces incorrect results on my system.
>
> Versin:  mtx-context     | current version: 2013.09.03 16:23
>
>
> Not so minimal, minimal example.  I did a range of values for comparison.
> Problem is:
>     1. I expect a one character word to be centered.  Not necessary but I expected this, because all words >1 character do center alignment.
>
>     2. The letter 'w' for some reason binds to the next character and produces an incorrect result.
>
>     3. In the last table the letters 'db' seem to be stuck together when the word is seven characters or more.  This anomalous unsymmetric binding also occurs in the 2nd and 3rd tables, as well.

normally this goes unnoticed because we don't add that much stretch 
(there is a hyphenation point in between that needs a special treatment)

> \starttext
>
>   \framed[width=45mm]{\stretched[features=none,width=\framedwidth]{1}}
>   \framed[width=45mm]{\stretched[features=none,width=\framedwidth]{12}}
>   \framed[width=45mm]{\stretched[features=none,width=\framedwidth]{123}}
>   \framed[width=45mm]{\stretched[features=none,width=\framedwidth]{1234}}
>   \framed[width=45mm]{\stretched[features=none,width=\framedwidth]{12345}}
>   \framed[width=45mm]{\stretched[features=none,width=\framedwidth]{123456}}
>   \framed[width=45mm]{\stretched[features=none,width=\framedwidth]{1234567}}
>   \framed[width=45mm]{\stretched[features=none,width=\framedwidth]{12345678}}
>   \framed[width=45mm]{\stretched[features=none,width=\framedwidth]{123456789}}
>   \framed[width=45mm]{\stretched[features=none,width=\framedwidth]{1234567890}}
>
> \blank[big]
>
>   \framed[width=45mm]{\stretched[features=none,width=\framedwidth]{w}}
>   \framed[width=45mm]{\stretched[features=none,width=\framedwidth]{wo}}
>   \framed[width=45mm]{\stretched[features=none,width=\framedwidth]{wor}}
>   \framed[width=45mm]{\stretched[features=none,width=\framedwidth]{word}}
>   \framed[width=45mm]{\stretched[features=none,width=\framedwidth]{wordw}}
>   \framed[width=45mm]{\stretched[features=none,width=\framedwidth]{wordwo}}
>   \framed[width=45mm]{\stretched[features=none,width=\framedwidth]{wordwor}}
>   \framed[width=45mm]{\stretched[features=none,width=\framedwidth]{wordword}}
>   \framed[width=45mm]{\stretched[features=none,width=\framedwidth]{wordwordw}}
>   \framed[width=45mm]{\stretched[features=none,width=\framedwidth]{wordwordwo}}
>
> \blank[big]
>
>   \framed[width=45mm]{\stretched[features=none,width=\framedwidth]{w}}
>   \framed[width=45mm]{\stretched[features=none,width=\framedwidth]{wa}}
>   \framed[width=45mm]{\stretched[features=none,width=\framedwidth]{war}}
>   \framed[width=45mm]{\stretched[features=none,width=\framedwidth]{ward}}
>   \framed[width=45mm]{\stretched[features=none,width=\framedwidth]{wardw}}
>   \framed[width=45mm]{\stretched[features=none,width=\framedwidth]{wardwa}}
>   \framed[width=45mm]{\stretched[features=none,width=\framedwidth]{wardwar}}
>   \framed[width=45mm]{\stretched[features=none,width=\framedwidth]{wardward}}
>   \framed[width=45mm]{\stretched[features=none,width=\framedwidth]{wardwardw}}
>   \framed[width=45mm]{\stretched[features=none,width=\framedwidth]{wardwardwa}}
>
> \blank[big]
>
>   \framed[width=45mm]{\stretched[features=none,width=\framedwidth]{b}}
>   \framed[width=45mm]{\stretched[features=none,width=\framedwidth]{ba}}
>   \framed[width=45mm]{\stretched[features=none,width=\framedwidth]{bar}}
>   \framed[width=45mm]{\stretched[features=none,width=\framedwidth]{bard}}
>   \framed[width=45mm]{\stretched[features=none,width=\framedwidth]{bardb}}
>   \framed[width=45mm]{\stretched[features=none,width=\framedwidth]{bardba}}
>   \framed[width=45mm]{\stretched[features=none,width=\framedwidth]{bardbar}}
>   \framed[width=45mm]{\stretched[features=none,width=\framedwidth]{bardbard}}
>   \framed[width=45mm]{\stretched[features=none,width=\framedwidth]{bardbardb}}
>   \framed[width=45mm]{\stretched[features=none,width=\framedwidth]{bardbardba}}
>
> \stoptext
>
> Is this a caculation / rouding / logic error ?

more a limitation of disc nodes; i now handle some cases in a special 
way (will upload new beta later)

Hans

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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
___________________________________________________________________________________


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

end of thread, other threads:[~2013-10-09  8:38 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-10-08 18:04 stretch framed text to width Pablo Rodriguez
2013-10-08 18:15 ` Wolfgang Schuster
2013-10-08 19:40   ` Pablo Rodriguez
2013-10-09  5:11   ` Anomaly in " hwitloc
2013-10-09  8:38     ` Hans Hagen

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