ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* framed items
@ 2009-11-16  8:21 Thomas A. Schmitz
  2009-11-16  8:33 ` Aditya Mahajan
  0 siblings, 1 reply; 33+ messages in thread
From: Thomas A. Schmitz @ 2009-11-16  8:21 UTC (permalink / raw)
  To: mailing ConTeXt users list for

Hi all,

maybe there is already code for that, but I haven't found it: is it  
possible to have itemgroups where every single item is within a frame  
(this is something that may be interesting for presentations)? Just to  
give you an idea of what I want to achieve, here's a short example:

\setuplayout[width=10cm]

\starttext
\setupframed[offset=2mm,
	     corner=round,
	     background=color,
	     backgroundcolor=blue,
	     foregroundcolor=white,
	     frame=off,
	     strut=no,
	     align=normal,
	     width=\textwidth]

\startitemize[n]
\item \framed{The text of this item is made very long because it is  
intended to
show the effect of what happens when an item extends to more than just  
one
line.}
\item \framed{This item is relatively short, but also fills more than  
one
line.}
\stopitemize

\stoptext

The problem is the vertical alignment of the item number, which should  
be at the top of the frame. Is this possible?

All best

Thomas
___________________________________________________________________________________
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] 33+ messages in thread

* Re: framed items
  2009-11-16  8:21 framed items Thomas A. Schmitz
@ 2009-11-16  8:33 ` Aditya Mahajan
  2009-11-16  8:41   ` Thomas A. Schmitz
  0 siblings, 1 reply; 33+ messages in thread
From: Aditya Mahajan @ 2009-11-16  8:33 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Mon, 16 Nov 2009, Thomas A. Schmitz wrote:

> Hi all,
>
> maybe there is already code for that, but I haven't found it: is it possible 
> to have itemgroups where every single item is within a frame (this is 
> something that may be interesting for presentations)? Just to give you an 
> idea of what I want to achieve, here's a short example:
>
> \setuplayout[width=10cm]
>
> \starttext
> \setupframed[offset=2mm,
> 	     corner=round,
> 	     background=color,
> 	     backgroundcolor=blue,
> 	     foregroundcolor=white,
> 	     frame=off,
> 	     strut=no,
> 	     align=normal,
> 	     width=\textwidth]
>
> \startitemize[n]
> \item \framed{The text of this item is made very long because it is intended 
> to
> show the effect of what happens when an item extends to more than just one
> line.}
> \item \framed{This item is relatively short, but also fills more than one
> line.}
> \stopitemize
>
> \stoptext
>
> The problem is the vertical alignment of the item number, which should be at 
> the top of the frame. Is this possible?

Add location=top to \setupframed.

Aditya
___________________________________________________________________________________
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] 33+ messages in thread

* Re: framed items
  2009-11-16  8:33 ` Aditya Mahajan
@ 2009-11-16  8:41   ` Thomas A. Schmitz
  2009-11-16  8:45     ` Wolfgang Schuster
                       ` (2 more replies)
  0 siblings, 3 replies; 33+ messages in thread
From: Thomas A. Schmitz @ 2009-11-16  8:41 UTC (permalink / raw)
  To: mailing list for ConTeXt users


On Nov 16, 2009, at 9:33 AM, Aditya Mahajan wrote:

>> The problem is the vertical alignment of the item number, which  
>> should be at the top of the frame. Is this possible?
>
> Add location=top to \setupframed.
>
> Aditya

Oh, that's good, thanks Aditya! The baselines still don't quite agree,  
but it's just a minor difference.

Thomas
___________________________________________________________________________________
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] 33+ messages in thread

* Re: framed items
  2009-11-16  8:41   ` Thomas A. Schmitz
@ 2009-11-16  8:45     ` Wolfgang Schuster
  2009-11-16  8:47     ` Aditya Mahajan
  2009-11-16  8:55     ` Wolfgang Schuster
  2 siblings, 0 replies; 33+ messages in thread
From: Wolfgang Schuster @ 2009-11-16  8:45 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 16.11.2009 um 09:41 schrieb Thomas A. Schmitz:

> 
> On Nov 16, 2009, at 9:33 AM, Aditya Mahajan wrote:
> 
>>> The problem is the vertical alignment of the item number, which should be at the top of the frame. Is this possible?
>> 
>> Add location=top to \setupframed.
>> 
>> Aditya
> 
> Oh, that's good, thanks Aditya! The baselines still don't quite agree, but it's just a minor difference.

strut=yes

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] 33+ messages in thread

* Re: framed items
  2009-11-16  8:41   ` Thomas A. Schmitz
  2009-11-16  8:45     ` Wolfgang Schuster
@ 2009-11-16  8:47     ` Aditya Mahajan
  2009-11-16  8:55     ` Wolfgang Schuster
  2 siblings, 0 replies; 33+ messages in thread
From: Aditya Mahajan @ 2009-11-16  8:47 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Mon, 16 Nov 2009, Thomas A. Schmitz wrote:

>
> On Nov 16, 2009, at 9:33 AM, Aditya Mahajan wrote:
>
>>> The problem is the vertical alignment of the item number, which should be 
>>> at the top of the frame. Is this possible?
>> 
>> Add location=top to \setupframed.
>> 
>> Aditya
>
> Oh, that's good, thanks Aditya! The baselines still don't quite agree, but 
> it's just a minor difference.

location=high and add

\setupitemize[inbetween={\blank[3*line]}]

(maybe increase bottom blank also)

Aditya
___________________________________________________________________________________
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] 33+ messages in thread

* Re: framed items
  2009-11-16  8:41   ` Thomas A. Schmitz
  2009-11-16  8:45     ` Wolfgang Schuster
  2009-11-16  8:47     ` Aditya Mahajan
@ 2009-11-16  8:55     ` Wolfgang Schuster
  2009-11-16  9:09       ` Thomas A. Schmitz
  2009-11-16  9:12       ` Aditya Mahajan
  2 siblings, 2 replies; 33+ messages in thread
From: Wolfgang Schuster @ 2009-11-16  8:55 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 16.11.2009 um 09:41 schrieb Thomas A. Schmitz:

> 
> On Nov 16, 2009, at 9:33 AM, Aditya Mahajan wrote:
> 
>>> The problem is the vertical alignment of the item number, which should be at the top of the frame. Is this possible?
>> 
>> Add location=top to \setupframed.
>> 
>> Aditya
> 
> Oh, that's good, thanks Aditya! The baselines still don't quite agree, but it's just a minor difference.

If you hadn't notice the item is wider then the running text, in MkIV
you can say 'width=\dimexpr\textwidth-\itemgrouplistwidth\relax'
(not the best method but \localhsize is not available)

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] 33+ messages in thread

* Re: framed items
  2009-11-16  8:55     ` Wolfgang Schuster
@ 2009-11-16  9:09       ` Thomas A. Schmitz
  2009-11-16  9:16         ` Wolfgang Schuster
  2009-11-16  9:26         ` luigi scarso
  2009-11-16  9:12       ` Aditya Mahajan
  1 sibling, 2 replies; 33+ messages in thread
From: Thomas A. Schmitz @ 2009-11-16  9:09 UTC (permalink / raw)
  To: mailing list for ConTeXt users


On Nov 16, 2009, at 9:55 AM, Wolfgang Schuster wrote:

> If you hadn't notice the item is wider then the running text, in MkIV
> you can say 'width=\dimexpr\textwidth-\itemgrouplistwidth\relax'
> (not the best method but \localhsize is not available)
>
> Wolfgang
>

Aditya, Wolfgang,

thanks a lot, I now get the visual output I want! So the question  
remains: any way of making this a hook for startitemize so it gets  
applied to every \item automatically?

Thomas
___________________________________________________________________________________
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] 33+ messages in thread

* Re: framed items
  2009-11-16  8:55     ` Wolfgang Schuster
  2009-11-16  9:09       ` Thomas A. Schmitz
@ 2009-11-16  9:12       ` Aditya Mahajan
  2009-11-16  9:14         ` luigi scarso
  1 sibling, 1 reply; 33+ messages in thread
From: Aditya Mahajan @ 2009-11-16  9:12 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Mon, 16 Nov 2009, Wolfgang Schuster wrote:

>
> Am 16.11.2009 um 09:41 schrieb Thomas A. Schmitz:
>
>>
>> On Nov 16, 2009, at 9:33 AM, Aditya Mahajan wrote:
>>
>>>> The problem is the vertical alignment of the item number, which should be at the top of the frame. Is this possible?
>>>
>>> Add location=top to \setupframed.
>>>
>>> Aditya
>>
>> Oh, that's good, thanks Aditya! The baselines still don't quite agree, but it's just a minor difference.
>
> If you hadn't notice the item is wider then the running text, in MkIV
> you can say 'width=\dimexpr\textwidth-\itemgrouplistwidth\relax'
> (not the best method but \localhsize is not available)

Shoudn't width=broad just work? It doesn't, so I consider this a bug.

Aditya
___________________________________________________________________________________
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] 33+ messages in thread

* Re: framed items
  2009-11-16  9:12       ` Aditya Mahajan
@ 2009-11-16  9:14         ` luigi scarso
  2009-11-16  9:17           ` Aditya Mahajan
  0 siblings, 1 reply; 33+ messages in thread
From: luigi scarso @ 2009-11-16  9:14 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Mon, Nov 16, 2009 at 10:12 AM, Aditya Mahajan <adityam@umich.edu> wrote:
> On Mon, 16 Nov 2009, Wolfgang Schuster wrote:
>
>>
>> Am 16.11.2009 um 09:41 schrieb Thomas A. Schmitz:
>>
>>>
>>> On Nov 16, 2009, at 9:33 AM, Aditya Mahajan wrote:
>>>
>>>>> The problem is the vertical alignment of the item number, which should
>>>>> be at the top of the frame. Is this possible?
>>>>
>>>> Add location=top to \setupframed.
>>>>
>>>> Aditya
>>>
>>> Oh, that's good, thanks Aditya! The baselines still don't quite agree,
>>> but it's just a minor difference.
>>
>> If you hadn't notice the item is wider then the running text, in MkIV
>> you can say 'width=\dimexpr\textwidth-\itemgrouplistwidth\relax'
>> (not the best method but \localhsize is not available)
>
> Shoudn't width=broad just work? It doesn't, so I consider this a bug.
I don't remember :
is  broad  related to \hsize or \textwidth ?

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


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

* Re: framed items
  2009-11-16  9:09       ` Thomas A. Schmitz
@ 2009-11-16  9:16         ` Wolfgang Schuster
  2009-11-16  9:26         ` luigi scarso
  1 sibling, 0 replies; 33+ messages in thread
From: Wolfgang Schuster @ 2009-11-16  9:16 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 16.11.2009 um 10:09 schrieb Thomas A. Schmitz:

> 
> On Nov 16, 2009, at 9:55 AM, Wolfgang Schuster wrote:
> 
>> If you hadn't notice the item is wider then the running text, in MkIV
>> you can say 'width=\dimexpr\textwidth-\itemgrouplistwidth\relax'
>> (not the best method but \localhsize is not available)
>> 
>> Wolfgang
>> 
> 
> Aditya, Wolfgang,
> 
> thanks a lot, I now get the visual output I want! So the question remains: any way of making this a hook for startitemize so it gets applied to every \item automatically?

\startitemize[n][command=\framed]

\item {The text of this item is made very long because it is intended to show
    the effect of what happens when an item extends to more than just one line.}

\item {This item is relatively short, but also fills more than one line.}

\stopitemize

\startitemize[n][command=\dowithpargument\framed]

\item The text of this item is made very long because it is intended to
show the effect of what happens when an item extends to more than just one
line.

\item This item is relatively short, but also fills more than one
line.

\stopitemize

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] 33+ messages in thread

* Re: framed items
  2009-11-16  9:14         ` luigi scarso
@ 2009-11-16  9:17           ` Aditya Mahajan
  2009-11-16  9:27             ` luigi scarso
  2009-11-16 20:58             ` luigi scarso
  0 siblings, 2 replies; 33+ messages in thread
From: Aditya Mahajan @ 2009-11-16  9:17 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Mon, 16 Nov 2009, luigi scarso wrote:

> On Mon, Nov 16, 2009 at 10:12 AM, Aditya Mahajan <adityam@umich.edu> wrote:
>> On Mon, 16 Nov 2009, Wolfgang Schuster wrote:
>>
>>>
>>> Am 16.11.2009 um 09:41 schrieb Thomas A. Schmitz:
>>>
>>>>
>>>> On Nov 16, 2009, at 9:33 AM, Aditya Mahajan wrote:
>>>>
>>>>>> The problem is the vertical alignment of the item number, which should
>>>>>> be at the top of the frame. Is this possible?
>>>>>
>>>>> Add location=top to \setupframed.
>>>>>
>>>>> Aditya
>>>>
>>>> Oh, that's good, thanks Aditya! The baselines still don't quite agree,
>>>> but it's just a minor difference.
>>>
>>> If you hadn't notice the item is wider then the running text, in MkIV
>>> you can say 'width=\dimexpr\textwidth-\itemgrouplistwidth\relax'
>>> (not the best method but \localhsize is not available)
>>
>> Shoudn't width=broad just work? It doesn't, so I consider this a bug.
> I don't remember :
> is  broad  related to \hsize or \textwidth ?

I always thought that broad should use as much space as possible. So, 
anything more or less is a bug :)

Aditya
___________________________________________________________________________________
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] 33+ messages in thread

* Re: framed items
  2009-11-16  9:09       ` Thomas A. Schmitz
  2009-11-16  9:16         ` Wolfgang Schuster
@ 2009-11-16  9:26         ` luigi scarso
  1 sibling, 0 replies; 33+ messages in thread
From: luigi scarso @ 2009-11-16  9:26 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Mon, Nov 16, 2009 at 10:09 AM, Thomas A. Schmitz
<thomas.schmitz@uni-bonn.de> wrote:
>
> On Nov 16, 2009, at 9:55 AM, Wolfgang Schuster wrote:
>
>> If you hadn't notice the item is wider then the running text, in MkIV
>> you can say 'width=\dimexpr\textwidth-\itemgrouplistwidth\relax'
>> (not the best method but \localhsize is not available)
>>
>> Wolfgang
>>
>
> Aditya, Wolfgang,
>
> thanks a lot, I now get the visual output I want! So the question remains:
> any way of making this a hook for startitemize so it gets applied to every
> \item automatically?
There is always a non-context solution, (so it's a kind of off-topic here...)
More seriously (well, only a bit), it can be seen as a sort of syntathic sugar
(just because I like coffe with sugar, but it' a taste of mine..)

\setuplayout[width=10cm]
\long\def\TSIF#1{\item \framed\bgroup #1}
\def\TSIFE{\egroup}
\starttext
\setupframed[offset=2mm,
            corner=round,
            background=color,
            backgroundcolor=blue,
            foregroundcolor=white,
            frame=off,
            strut=no,inbetween={\blank[3*line]}
            location=high,
            align=normal,
            width=\textwidth]

\startitemize[n]
\item \framed{The text of this item is made very long because it is intended to
show the effect of what happens when an item extends to more than just one
line.}
\item \framed{This item is relatively short, but also fills more than one
line.}

\TSIF%
This item is relatively short, but also fills more than one
\TSIFE

\TSIF%
This item is relatively short, but also fills more than one
\TSIFE

\stopitemize

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


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

* Re: framed items
  2009-11-16  9:17           ` Aditya Mahajan
@ 2009-11-16  9:27             ` luigi scarso
  2009-11-16 20:58             ` luigi scarso
  1 sibling, 0 replies; 33+ messages in thread
From: luigi scarso @ 2009-11-16  9:27 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Mon, Nov 16, 2009 at 10:17 AM, Aditya Mahajan <adityam@umich.edu> wrote:
> On Mon, 16 Nov 2009, luigi scarso wrote:
>
>> On Mon, Nov 16, 2009 at 10:12 AM, Aditya Mahajan <adityam@umich.edu>
>> wrote:
>>>
>>> On Mon, 16 Nov 2009, Wolfgang Schuster wrote:
>>>
>>>>
>>>> Am 16.11.2009 um 09:41 schrieb Thomas A. Schmitz:
>>>>
>>>>>
>>>>> On Nov 16, 2009, at 9:33 AM, Aditya Mahajan wrote:
>>>>>
>>>>>>> The problem is the vertical alignment of the item number, which
>>>>>>> should
>>>>>>> be at the top of the frame. Is this possible?
>>>>>>
>>>>>> Add location=top to \setupframed.
>>>>>>
>>>>>> Aditya
>>>>>
>>>>> Oh, that's good, thanks Aditya! The baselines still don't quite agree,
>>>>> but it's just a minor difference.
>>>>
>>>> If you hadn't notice the item is wider then the running text, in MkIV
>>>> you can say 'width=\dimexpr\textwidth-\itemgrouplistwidth\relax'
>>>> (not the best method but \localhsize is not available)
>>>
>>> Shoudn't width=broad just work? It doesn't, so I consider this a bug.
>>
>> I don't remember :
>> is  broad  related to \hsize or \textwidth ?
>
> I always thought that broad should use as much space as possible. So,
> anything more or less is a bug :)
Yes, but \maxdimen is as much space as possible.... :-)
Anyway I will give it a look.


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

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

* Re: framed items
  2009-11-16  9:17           ` Aditya Mahajan
  2009-11-16  9:27             ` luigi scarso
@ 2009-11-16 20:58             ` luigi scarso
  2009-11-16 21:29               ` Aditya Mahajan
  1 sibling, 1 reply; 33+ messages in thread
From: luigi scarso @ 2009-11-16 20:58 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Mon, Nov 16, 2009 at 10:17 AM, Aditya Mahajan <adityam@umich.edu> wrote:
> I always thought that broad should use as much space as possible. So,
> anything more or less is a bug :)

\starttext
\dorecurse{20}{%
\hsize=\dimexpr \textwidth / 20 *\recurselevel\relax
\framed[width=broad,align=middle]{  }
\blank
}
\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  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: framed items
  2009-11-16 20:58             ` luigi scarso
@ 2009-11-16 21:29               ` Aditya Mahajan
  2009-11-16 21:46                 ` luigi scarso
  0 siblings, 1 reply; 33+ messages in thread
From: Aditya Mahajan @ 2009-11-16 21:29 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Mon, 16 Nov 2009, luigi scarso wrote:

> On Mon, Nov 16, 2009 at 10:17 AM, Aditya Mahajan <adityam@umich.edu> wrote:
>> I always thought that broad should use as much space as possible. So,
>> anything more or less is a bug :)
>
> \starttext
> \dorecurse{20}{%
> \hsize=\dimexpr \textwidth / 20 *\recurselevel\relax
> \framed[width=broad,align=middle]{  }
> \blank
> }
> \stoptext

\starttext
\dorecurse{20}{%
\hsize=\dimexpr \textwidth / 20 *\recurselevel\relax
\framed[width=broad,align=middle]{  }
\startitemize
   \item \framed[width=broad,align=middle]{}
   \item \framed[width=\hsize,align=middle]{}
\stopitemize
\page
}
\stoptext

I think that itemize should adjust \hsize, so this is probably a bug in 
itemize.

Aditya
___________________________________________________________________________________
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] 33+ messages in thread

* Re: framed items
  2009-11-16 21:29               ` Aditya Mahajan
@ 2009-11-16 21:46                 ` luigi scarso
  2009-11-16 21:56                   ` Wolfgang Schuster
  2009-11-16 21:58                   ` Aditya Mahajan
  0 siblings, 2 replies; 33+ messages in thread
From: luigi scarso @ 2009-11-16 21:46 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Mon, Nov 16, 2009 at 10:29 PM, Aditya Mahajan <adityam@umich.edu> wrote:

> I think that itemize should adjust \hsize, so this is probably a bug in
> itemize.
hmm I'm not sure to understand what you mean
What is wrong in this ?

\starttext
\dorecurse{20}{%
\hsize=\dimexpr \textwidth / 20 *\recurselevel\relax
\framed[width=broad,align=middle]{\the\hsize}%% A
\startitemize
 \item \framed[width=broad,align=middle]{\the\hsize}%%  B
 \item \framed[width=\hsize,align=middle]{\the\hsize}%%  C
\stopitemize
\page
}
\stoptext

I see A = B = C; is it correct ?

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


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

* Re: framed items
  2009-11-16 21:46                 ` luigi scarso
@ 2009-11-16 21:56                   ` Wolfgang Schuster
  2009-11-16 21:58                   ` Aditya Mahajan
  1 sibling, 0 replies; 33+ messages in thread
From: Wolfgang Schuster @ 2009-11-16 21:56 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 16.11.2009 um 22:46 schrieb luigi scarso:

> On Mon, Nov 16, 2009 at 10:29 PM, Aditya Mahajan <adityam@umich.edu> wrote:
> 
>> I think that itemize should adjust \hsize, so this is probably a bug in
>> itemize.
> hmm I'm not sure to understand what you mean
> What is wrong in this ?
> 
> \starttext
> \dorecurse{20}{%
> \hsize=\dimexpr \textwidth / 20 *\recurselevel\relax
> \framed[width=broad,align=middle]{\the\hsize}%% A
> \startitemize
> \item \framed[width=broad,align=middle]{\the\hsize}%%  B
> \item \framed[width=\hsize,align=middle]{\the\hsize}%%  C
> \stopitemize
> \page
> }
> \stoptext
> 
> I see A = B = C; is it correct ?

No, b and c should be equal but narrower than a because there is less space
between the item symbol and the right margin as you have in the running text.

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] 33+ messages in thread

* Re: framed items
  2009-11-16 21:46                 ` luigi scarso
  2009-11-16 21:56                   ` Wolfgang Schuster
@ 2009-11-16 21:58                   ` Aditya Mahajan
  2009-11-16 22:20                     ` luigi scarso
  1 sibling, 1 reply; 33+ messages in thread
From: Aditya Mahajan @ 2009-11-16 21:58 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Mon, 16 Nov 2009, luigi scarso wrote:

> On Mon, Nov 16, 2009 at 10:29 PM, Aditya Mahajan <adityam@umich.edu> wrote:
>
>> I think that itemize should adjust \hsize, so this is probably a bug in
>> itemize.
> hmm I'm not sure to understand what you mean
> What is wrong in this ?
>
> \starttext
> \dorecurse{20}{%
> \hsize=\dimexpr \textwidth / 20 *\recurselevel\relax
> \framed[width=broad,align=middle]{\the\hsize}%% A
> \startitemize
> \item \framed[width=broad,align=middle]{\the\hsize}%%  B
> \item \framed[width=\hsize,align=middle]{\the\hsize}%%  C
> \stopitemize
> \page
> }
> \stoptext
>
> I see A = B = C; is it correct ?

That is wrong behaviour.We should have B = C = A - itemgrouplistwidth.

Otherwise, the frames inside the itemize environment exceed the total 
width.

Aditya
___________________________________________________________________________________
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] 33+ messages in thread

* Re: framed items
  2009-11-16 21:58                   ` Aditya Mahajan
@ 2009-11-16 22:20                     ` luigi scarso
  2009-11-16 22:31                       ` luigi scarso
  0 siblings, 1 reply; 33+ messages in thread
From: luigi scarso @ 2009-11-16 22:20 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Mon, Nov 16, 2009 at 10:58 PM, Aditya Mahajan <adityam@umich.edu> wrote:
> On Mon, 16 Nov 2009, luigi scarso wrote:
>
>> On Mon, Nov 16, 2009 at 10:29 PM, Aditya Mahajan <adityam@umich.edu>
>> wrote:
>>
>>> I think that itemize should adjust \hsize, so this is probably a bug in
>>> itemize.
>>
>> hmm I'm not sure to understand what you mean
>> What is wrong in this ?
>>
>> \starttext
>> \dorecurse{20}{%
>> \hsize=\dimexpr \textwidth / 20 *\recurselevel\relax
>> \framed[width=broad,align=middle]{\the\hsize}%% A
>> \startitemize
>> \item \framed[width=broad,align=middle]{\the\hsize}%%  B
>> \item \framed[width=\hsize,align=middle]{\the\hsize}%%  C
>> \stopitemize
>> \page
>> }
>> \stoptext
>>
>> I see A = B = C; is it correct ?
>
> That is wrong behaviour.We should have B = C = A - itemgrouplistwidth.
>
> Otherwise, the frames inside the itemize environment exceed the total width.
Ah, but I'm not sure that  \hsize and \startitemize must play well together
\showframe
\starttext
\dorecurse{1}{%
\hsize=\dimexpr \textwidth / 1 *\recurselevel\relax
\framed[width=broad,align=middle]{\the\hsize}
\startitemize
 \item \framed[width=broad,align=middle]{\the\currentitemmaxwidth,\the\hsize,\the\localhsize}
 \item \framed[width=\hsize,align=middle]{\the\hsize}
 \item \the\hsize \input tufte \the\hsize %
\stopitemize
\page
}
\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  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: framed items
  2009-11-16 22:20                     ` luigi scarso
@ 2009-11-16 22:31                       ` luigi scarso
  2009-11-16 22:36                         ` Wolfgang Schuster
  0 siblings, 1 reply; 33+ messages in thread
From: luigi scarso @ 2009-11-16 22:31 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Mon, Nov 16, 2009 at 11:20 PM, luigi scarso <luigi.scarso@gmail.com> wrote:
>> That is wrong behaviour.We should have B = C = A - itemgrouplistwidth.
>>
>> Otherwise, the frames inside the itemize environment exceed the total width.
 -- Sorry wrong post --

 \showframe
 \starttext
 \dorecurse{1}{%
 \hsize=\dimexpr \textwidth / 1 *\recurselevel\relax
 \framed[width=broad,align=middle]{\the\hsize}
 \startitemize
  \item \framed[width=broad,align=middle]{\the\hsize}
  \item \framed[width=\hsize,align=middle]{\the\hsize}
  \item \the\hsize \input tufte \the\hsize %
 \stopitemize
 \page
 }
 \stoptext

I'm ( still :-) )
not sure that  \hsize and \startitemize must play well together,
I will give it a look.


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

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

* Re: framed items
  2009-11-16 22:31                       ` luigi scarso
@ 2009-11-16 22:36                         ` Wolfgang Schuster
  2009-11-16 22:42                           ` luigi scarso
  0 siblings, 1 reply; 33+ messages in thread
From: Wolfgang Schuster @ 2009-11-16 22:36 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 16.11.2009 um 23:31 schrieb luigi scarso:

> I'm ( still :-) )
> not sure that  \hsize and \startitemize must play well together,
> I will give it a look.

That's why we have \localhsize but it's not working.

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] 33+ messages in thread

* Re: framed items
  2009-11-16 22:36                         ` Wolfgang Schuster
@ 2009-11-16 22:42                           ` luigi scarso
  2009-11-16 22:49                             ` luigi scarso
  0 siblings, 1 reply; 33+ messages in thread
From: luigi scarso @ 2009-11-16 22:42 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Mon, Nov 16, 2009 at 11:36 PM, Wolfgang Schuster
<schuster.wolfgang@googlemail.com> wrote:

> That's why we have \localhsize but it's not working.
yes, I was looking at \localhsize in the first post


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


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

* Re: framed items
  2009-11-16 22:42                           ` luigi scarso
@ 2009-11-16 22:49                             ` luigi scarso
  2009-11-16 23:01                               ` Wolfgang Schuster
  0 siblings, 1 reply; 33+ messages in thread
From: luigi scarso @ 2009-11-16 22:49 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Mon, Nov 16, 2009 at 11:42 PM, luigi scarso <luigi.scarso@gmail.com> wrote:
> On Mon, Nov 16, 2009 at 11:36 PM, Wolfgang Schuster
> <schuster.wolfgang@googlemail.com> wrote:
>
>> That's why we have \localhsize but it's not working.


\showframe
\starttext
\dorecurse{1}{%
\hsize=\dimexpr \textwidth / 1 *\recurselevel\relax
\framed[width=broad,align=middle]{\the\hsize}
\bgroup
\startitemize
\advance\hsize -\itemgrouplistwidth\relax%
 \item \framed[width=broad,align=middle]{\the\hsize,\the\localhsize,\the\itemgrouplistwidth}
% \item \framed[width=\dimexpr\hsize-\itemgrouplistwidth\relax,align=middle]{\the\hsize}
  \item \framed[width=\hsize,align=middle]{\the\hsize}
 \item \the\hsize \input tufte \the\hsize %
\stopitemize
\egroup
\page
}
\stoptext

that's all x me now.

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


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

* Re: framed items
  2009-11-16 22:49                             ` luigi scarso
@ 2009-11-16 23:01                               ` Wolfgang Schuster
  2009-11-16 23:19                                 ` luigi scarso
  0 siblings, 1 reply; 33+ messages in thread
From: Wolfgang Schuster @ 2009-11-16 23:01 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 16.11.2009 um 23:49 schrieb luigi scarso:

> \showframe
> \starttext
> \dorecurse{1}{%
> \hsize=\dimexpr \textwidth / 1 *\recurselevel\relax
> \framed[width=broad,align=middle]{\the\hsize}
> \bgroup
> \startitemize
> \advance\hsize -\itemgrouplistwidth\relax%
> \item \framed[width=broad,align=middle]{\the\hsize,\the\localhsize,\the\itemgrouplistwidth}
> % \item \framed[width=\dimexpr\hsize-\itemgrouplistwidth\relax,align=middle]{\the\hsize}
>  \item \framed[width=\hsize,align=middle]{\the\hsize}
> \item \the\hsize \input tufte \the\hsize %
> \stopitemize
> \egroup
> \page
> }
> \stoptext
> 
> that's all x me now.

as you can see in the third item the width of the text (\input tufte)
is too narrow because of the reduced \hsize but this works

\showframe
\starttext
\framed[width=\hsize,align=middle]{\the\hsize}
\startitemize
\setlocalhsize
\item \framed[width=\hsize,align=middle]     {\the\hsize}
\item \framed[width=\localhsize,align=middle]{\the\localhsize}
\stopitemize
\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] 33+ messages in thread

* Re: framed items
  2009-11-16 23:01                               ` Wolfgang Schuster
@ 2009-11-16 23:19                                 ` luigi scarso
  2009-11-16 23:24                                   ` Wolfgang Schuster
  0 siblings, 1 reply; 33+ messages in thread
From: luigi scarso @ 2009-11-16 23:19 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Tue, Nov 17, 2009 at 12:01 AM, Wolfgang Schuster
<schuster.wolfgang@googlemail.com> wrote:
>
> Am 16.11.2009 um 23:49 schrieb luigi scarso:
>
>> \showframe
>> \starttext
>> \dorecurse{1}{%
>> \hsize=\dimexpr \textwidth / 1 *\recurselevel\relax
>> \framed[width=broad,align=middle]{\the\hsize}
>> \bgroup
>> \startitemize
>> \advance\hsize -\itemgrouplistwidth\relax%
>> \item \framed[width=broad,align=middle]{\the\hsize,\the\localhsize,\the\itemgrouplistwidth}
>> % \item \framed[width=\dimexpr\hsize-\itemgrouplistwidth\relax,align=middle]{\the\hsize}
>>  \item \framed[width=\hsize,align=middle]{\the\hsize}
>> \item \the\hsize \input tufte \the\hsize %
>> \stopitemize
>> \egroup
>> \page
>> }
>> \stoptext
>>
>> that's all x me now.
>
> as you can see in the third item the width of the text (\input tufte)
> is too narrow because of the reduced \hsize but this works
yes too narrow,
but with this still
width=broad is not good,
because  broad should be now egual to \localhsize
and not \hsize,
if I understand what Aditya said.

\showframe
\starttext
\framed[width=\hsize,align=middle]{\the\hsize}
\startitemize
\setlocalhsize
\item \framed[width=\hsize,align=middle]     {\the\hsize}
\item \framed[width=broad,align=middle]     {\the\hsize}
\item \framed[width=\localhsize,align=middle]{\the\localhsize}
\stopitemize
\stoptext

(go to sleep now...see you tomorrow)

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

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

* Re: framed items
  2009-11-16 23:19                                 ` luigi scarso
@ 2009-11-16 23:24                                   ` Wolfgang Schuster
  2009-11-17  5:52                                     ` luigi scarso
  0 siblings, 1 reply; 33+ messages in thread
From: Wolfgang Schuster @ 2009-11-16 23:24 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 17.11.2009 um 00:19 schrieb luigi scarso:

>> as you can see in the third item the width of the text (\input tufte)
>> is too narrow because of the reduced \hsize but this works
> yes too narrow,
> but with this still
> width=broad is not good,
> because  broad should be now egual to \localhsize
> and not \hsize,
> if I understand what Aditya said.

from pack-rul:

   \else\ifx\localwidth\v!broad
     \boxhaswidthtrue
     \!!framedwidth\hsize
   \else\ifx\localwidth\v!local
     \boxhaswidthtrue
     \setlocalhsize
     \!!framedwidth\localhsize

use \framed[width=local] and don't forget \setlocalhsize after \startitemize.

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] 33+ messages in thread

* Re: framed items
  2009-11-16 23:24                                   ` Wolfgang Schuster
@ 2009-11-17  5:52                                     ` luigi scarso
  2009-11-17  8:12                                       ` luigi scarso
  2009-11-17 15:32                                       ` Aditya Mahajan
  0 siblings, 2 replies; 33+ messages in thread
From: luigi scarso @ 2009-11-17  5:52 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Tue, Nov 17, 2009 at 12:24 AM, Wolfgang Schuster
<schuster.wolfgang@googlemail.com> wrote:
> from pack-rul:
>
>   \else\ifx\localwidth\v!broad
>     \boxhaswidthtrue
>     \!!framedwidth\hsize
>   \else\ifx\localwidth\v!local
>     \boxhaswidthtrue
>     \setlocalhsize
>     \!!framedwidth\localhsize
>
> use \framed[width=local] and don't forget \setlocalhsize after \startitemize.
yes, right. I remembered of something similar
That's what I mean with not sure that  \hsize and \startitemize must
play well together


\showframe
\starttext
\framed[width=\hsize,align=middle]{width=hsize\the\hsize}
\startitemize
\setlocalhsize
\item \framed[width=\hsize,align=middle]     {width=hsize,hsize=\the\hsize}
\item \framed[width=broad,align=middle]     {width=broad,hsize=\the\hsize}
\item \framed[width=local,align=middle]     {width=local,hsize=\the\hsize}
\item \framed[width=\localhsize,align=middle]{width=localsize,hsize=\the\hsize,localsize=\the\localhsize}
\stopitemize
\stoptext

Aditya, what do you think  ?

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

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

* Re: framed items
  2009-11-17  5:52                                     ` luigi scarso
@ 2009-11-17  8:12                                       ` luigi scarso
  2009-11-17  8:38                                         ` Wolfgang Schuster
  2009-11-17 15:32                                       ` Aditya Mahajan
  1 sibling, 1 reply; 33+ messages in thread
From: luigi scarso @ 2009-11-17  8:12 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Tue, Nov 17, 2009 at 6:52 AM, luigi scarso <luigi.scarso@gmail.com> wrote:

> That's what I mean with not sure that  \hsize and \startitemize must
> play well together
No, sorry, wrong phrase.
What I mean is that  I already  found that  \startitemize and \framed with
width=broad was not ok, because broad is related to \hsize  but  it's
ok in other situations.


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

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

* Re: framed items
  2009-11-17  8:12                                       ` luigi scarso
@ 2009-11-17  8:38                                         ` Wolfgang Schuster
  0 siblings, 0 replies; 33+ messages in thread
From: Wolfgang Schuster @ 2009-11-17  8:38 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 17.11.2009 um 09:12 schrieb luigi scarso:

> What I mean is that  I already  found that  \startitemize and \framed with
> width=broad was not ok, because broad is related to \hsize  but  it's
> ok in other situations.

You can't use \hsize because it the width of the complete text area which
TeX use to determine line breaks and this includes in itemize the space
for the symbol and the left margin. To give the user a length he could
use on such a situation ConTeXt introduced \localhsize which compensates
\leftskip/\rightskip settings.

\starttext

\framed[width=broad]{}

\startnarrower[left]

\framed[width=broad]{}

\dontleavehmode\framed[width=broad]{}

\dontleavehmode\framed[width=local]{}

\stopnarrower

\blank

\hsize.5\hsize

\framed[width=broad]{}

\startnarrower[left]

\framed[width=broad]{}

\dontleavehmode\framed[width=broad]{}

\dontleavehmode\framed[width=local]{}

\stopnarrower

\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] 33+ messages in thread

* Re: framed items
  2009-11-17  5:52                                     ` luigi scarso
  2009-11-17  8:12                                       ` luigi scarso
@ 2009-11-17 15:32                                       ` Aditya Mahajan
  2009-11-17 15:34                                         ` luigi scarso
  1 sibling, 1 reply; 33+ messages in thread
From: Aditya Mahajan @ 2009-11-17 15:32 UTC (permalink / raw)
  To: mailing list for ConTeXt users

[-- Attachment #1: Type: TEXT/PLAIN, Size: 1357 bytes --]

On Tue, 17 Nov 2009, luigi scarso wrote:

> On Tue, Nov 17, 2009 at 12:24 AM, Wolfgang Schuster
> <schuster.wolfgang@googlemail.com> wrote:
>> from pack-rul:
>>
>>   \else\ifx\localwidth\v!broad
>>     \boxhaswidthtrue
>>     \!!framedwidth\hsize
>>   \else\ifx\localwidth\v!local
>>     \boxhaswidthtrue
>>     \setlocalhsize
>>     \!!framedwidth\localhsize
>>
>> use \framed[width=local] and don't forget \setlocalhsize after \startitemize.
> yes, right. I remembered of something similar
> That's what I mean with not sure that  \hsize and \startitemize must
> play well together
>
>
> \showframe
> \starttext
> \framed[width=\hsize,align=middle]{width=hsize\the\hsize}
> \startitemize
> \setlocalhsize
> \item \framed[width=\hsize,align=middle]     {width=hsize,hsize=\the\hsize}
> \item \framed[width=broad,align=middle]     {width=broad,hsize=\the\hsize}
> \item \framed[width=local,align=middle]     {width=local,hsize=\the\hsize}
> \item \framed[width=\localhsize,align=middle]{width=localsize,hsize=\the\hsize,localsize=\the\localhsize}
> \stopitemize
> \stoptext
>
> Aditya, what do you think  ?

I did not know about width=local (and therefore wanted width=broad to 
behave like it). Given that, I think that broad behaves just fine. These 
differnt options need to be documented better.

Aditya

[-- Attachment #2: Type: text/plain, Size: 486 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  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: framed items
  2009-11-17 15:32                                       ` Aditya Mahajan
@ 2009-11-17 15:34                                         ` luigi scarso
  2009-11-17 15:41                                           ` Aditya Mahajan
  0 siblings, 1 reply; 33+ messages in thread
From: luigi scarso @ 2009-11-17 15:34 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Tue, Nov 17, 2009 at 4:32 PM, Aditya Mahajan <adityam@umich.edu> wrote:

> I did not know about width=local (and therefore wanted width=broad to behave
> like it). Given that, I think that broad behaves just fine. These differnt
> options need to be documented better.
yes, in the wiki... where ?

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


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

* Re: framed items
  2009-11-17 15:34                                         ` luigi scarso
@ 2009-11-17 15:41                                           ` Aditya Mahajan
  2009-11-17 23:28                                             ` luigi scarso
  0 siblings, 1 reply; 33+ messages in thread
From: Aditya Mahajan @ 2009-11-17 15:41 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Tue, 17 Nov 2009, luigi scarso wrote:

> On Tue, Nov 17, 2009 at 4:32 PM, Aditya Mahajan <adityam@umich.edu> wrote:
>
>> I did not know about width=local (and therefore wanted width=broad to behave
>> like it). Given that, I think that broad behaves just fine. These differnt
>> options need to be documented better.
> yes, in the wiki... where ?

Not sure. It could go on the page on Framed, but how ConTeXt treats 
\textwidth, \hsize, \localhsize is more general, so maybe on a new page.

Aditya
___________________________________________________________________________________
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] 33+ messages in thread

* Re: framed items
  2009-11-17 15:41                                           ` Aditya Mahajan
@ 2009-11-17 23:28                                             ` luigi scarso
  0 siblings, 0 replies; 33+ messages in thread
From: luigi scarso @ 2009-11-17 23:28 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Tue, Nov 17, 2009 at 4:41 PM, Aditya Mahajan <adityam@umich.edu> wrote:
..
done at
http://wiki.contextgarden.net/Framed#Width_broad_and_local
-- 
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  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

end of thread, other threads:[~2009-11-17 23:28 UTC | newest]

Thread overview: 33+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-11-16  8:21 framed items Thomas A. Schmitz
2009-11-16  8:33 ` Aditya Mahajan
2009-11-16  8:41   ` Thomas A. Schmitz
2009-11-16  8:45     ` Wolfgang Schuster
2009-11-16  8:47     ` Aditya Mahajan
2009-11-16  8:55     ` Wolfgang Schuster
2009-11-16  9:09       ` Thomas A. Schmitz
2009-11-16  9:16         ` Wolfgang Schuster
2009-11-16  9:26         ` luigi scarso
2009-11-16  9:12       ` Aditya Mahajan
2009-11-16  9:14         ` luigi scarso
2009-11-16  9:17           ` Aditya Mahajan
2009-11-16  9:27             ` luigi scarso
2009-11-16 20:58             ` luigi scarso
2009-11-16 21:29               ` Aditya Mahajan
2009-11-16 21:46                 ` luigi scarso
2009-11-16 21:56                   ` Wolfgang Schuster
2009-11-16 21:58                   ` Aditya Mahajan
2009-11-16 22:20                     ` luigi scarso
2009-11-16 22:31                       ` luigi scarso
2009-11-16 22:36                         ` Wolfgang Schuster
2009-11-16 22:42                           ` luigi scarso
2009-11-16 22:49                             ` luigi scarso
2009-11-16 23:01                               ` Wolfgang Schuster
2009-11-16 23:19                                 ` luigi scarso
2009-11-16 23:24                                   ` Wolfgang Schuster
2009-11-17  5:52                                     ` luigi scarso
2009-11-17  8:12                                       ` luigi scarso
2009-11-17  8:38                                         ` Wolfgang Schuster
2009-11-17 15:32                                       ` Aditya Mahajan
2009-11-17 15:34                                         ` luigi scarso
2009-11-17 15:41                                           ` Aditya Mahajan
2009-11-17 23:28                                             ` luigi scarso

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