Re: [NTG-context] \startitemize[columns] broken with backgrounds?

2012-01-23 Thread Otared Kavian
On 23 janv. 2012, at 08:45, Wolfgang Schuster wrote:

 
 Am 23.01.2012 um 08:39 schrieb Otared Kavian:
 
 Hi all,
 
 It seems that when using background, \startitemize[columns] does not work as 
 expected: there are no columns, and the numbers of the items are pushed to 
 the left. 
 
 You can use the columns environment (which is used by itemize) in a framed, 
 framed text or background environment.

Thanks Wolfgang for your attention.
Now that you mention this, I understand that the columns environment cannot be 
used at the same time as framed or background environments. Is this a definite 
barrier? 
As a matter of fact changing background to textbackground (as you suggested) 
did not work neither.

Have a nice day: OK

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


Re: [NTG-context] \startitemize[columns] broken with backgrounds?

2012-01-23 Thread Wolfgang Schuster

Am 23.01.2012 um 10:47 schrieb Otared Kavian:

 On 23 janv. 2012, at 08:45, Wolfgang Schuster wrote:
 
 
 Am 23.01.2012 um 08:39 schrieb Otared Kavian:
 
 Hi all,
 
 It seems that when using background, \startitemize[columns] does not work 
 as expected: there are no columns, and the numbers of the items are pushed 
 to the left. 
 
 You can use the columns environment (which is used by itemize) in a framed, 
 framed text or background environment.
 
 Thanks Wolfgang for your attention.
 Now that you mention this, I understand that the columns environment cannot 
 be used at the same time as framed or background environments. Is this a 
 definite barrier? 

It’s not a limitation of the mechanism \startcolumns uses to make multiple 
columns because the same mechanism is also used by \startsimplecolumns but of 
the implementation of the command. When you search the list archive you can 
find examples with streams which permit columns in \framed etc.

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
___


Re: [NTG-context] \startitemize[columns] broken with backgrounds?

2012-01-23 Thread Otared Kavian

On 23 janv. 2012, at 11:29, Wolfgang Schuster wrote:
 It’s not a limitation of the mechanism \startcolumns uses to make multiple 
 columns because the same mechanism is also used by \startsimplecolumns but of 
 the implementation of the command. When you search the list archive you can 
 find examples with streams which permit columns in \framed etc.
 
 Wolfgang

Thanks fo rthe explanations: indeed with my previous setups for having each 
exercise with a vertical rule at its left, the following modification works 
fine when I need items in two columns:

\startsimplecolumns
\startitemize[r,packed][margin=standard,stopper=,left={(},right={)},distance=1em]
\item $3x - 5 = 4$.
\item $(x-1)(x+3) = 5$.
\item $2 - 3x \geq 2 x - 8$.
\item $(x - 1) \leq (x-1)(x+2)$.
\item $2x^2 - 3x +1  0$.
\item $x^2 - 4x \geq x - x^2 - 1$.
\stopitemize
\stopsimplecolumns

Best regards: OK
___
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
___


[NTG-context] \startitemize[columns] broken with backgrounds?

2012-01-22 Thread Otared Kavian
Hi all,

It seems that when using background, \startitemize[columns] does not work as 
expected: there are no columns, and the numbers of the items are pushed to the 
left. 
Below is a not so minimal example: the resulting PDF can be found here:
http://dl.dropbox.com/u/4316076/enumeration-background-exo.pdf
I am not sure whether this behaviour began with a recent beta or  not. 
The version I am using is: ConTeXt  ver: 2012.01.16 18:33 MKIV.

Best regards: OK
%%% begin enumeration-background-exo.pdf
\definenumber[MyExoNumber][way=bysection,sectionumber=yes]
\setuptextrules[rulecolor=darkred]
\define\ExoCommand{\incrementnumber[MyExoNumber]
\textrule[top]{Exercise \getnumber[MyExoNumber]}
\startbackground[frame=off,leftframe=on,
framecolor=darkred]}

\defineenumeration[exo]
[location=hanging,
width=fit,
text={}, 
number=hide,
number=no,
before={\ExoCommand}, 
after={\stopbackground\blank}]

\defineconversion[exercice][\numbers]
\def\StartQuestions{%
\startitemize[exercice][width=2em,packed,style=bold,stopper=,right=)]}
\def\StopQuestions{\stopitemize}
\def\q{\item}

\starttext

%
\startexo
Prove that
\startformula
\cos(nt) + {\rm i}\sin(nt) = (\cos(t) + {\rm i}\sin(t))^n.
\stopformula
\StartQuestions
\dorecurse{5}{\q This is question \recurselevel. }
\StopQuestions
\stopexo
%

%
\startexo Solve the following equations or inequations:
\startitemize[r,packed,columns][stopper=,left={(},right={)},distance=1em]
\item $3x - 5 = 4$.
\item $(x-1)(x+3) = 5$.
\item $2 - 3x \geq 2 x - 8$.
\item $(x - 1) \leq (x-1)(x+2)$.
\item $2x^2 - 3x +1  0$.
\item $x^2 - 4x \geq x - x^2 - 1$.
\stopitemize
\stopexo
%

\stoptext
%%% end enumeration-background-exo.pdf
___
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
___