Re: [NTG-context] Bug in startitemize

2016-03-07 Thread Otared Kavian
Thanks Wolfgang,

Your patch does indeed solve the problem, after rebuilding with

context --make —all

Best regards: OK

> On 07 Mar 2016, at 20:46, Wolfgang Schuster  
> wrote:
> 
>> Otared Kavian 7. März 2016 um 20:28
>> Hi Hans,
>> 
>> It seems that with the new beta (ConTeXt ver: 2016.03.04 10:39 MKIV beta 
>> fmt: 2016.3.7), there is a bug with random itemization.
>> I cannot tell exactly when this feature has been broken.
>> The problem is that for instance in the following example, sometimes the 
>> item C is repeated three times, sometimes A is repeated twice, etc.
> strc-itm.mkvi:
> 
> \def\strc_itemgroups_collected_flush
>   {\ifconditional\c_strc_itemgroups_randomize
>  
> \getrandomcount\c_strc_itemgroups_collected_current\plusone\c_strc_itemgroups_collected_stored
>\else
>  \advance\c_strc_itemgroups_collected_current\plusone
>\fi
>
> \ifcsname\??itemgroupstack\number\c_strc_itemgroups_collected_current\endcsname
>  \edef\collecteditemgroupitem{\lastnamedcs}%
>  \ifconditional\c_strc_itemgroups_horizontal
>\strc_itemgroups_collected_flush_horizontal
>  \else
>\collecteditemgroupitem
> +  
> \letbeundefined{\??itemgroupstack\number\c_strc_itemgroups_collected_current}%
>  \fi
>  \advance\c_strc_itemgroups_collected_done\plusone
>\fi
>\ifnum\c_strc_itemgroups_collected_done<\c_strc_itemgroups_collected_stored
>  \expandafter\strc_itemgroups_collected_flush
>\fi}
> 
> 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
> ___

___
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] Bug in startitemize

2016-03-07 Thread Wolfgang Schuster

Otared Kavian 
7. März 2016 um 20:28
Hi Hans,

It seems that with the new beta (ConTeXt ver: 2016.03.04 10:39 MKIV 
beta fmt: 2016.3.7), there is a bug with random itemization.

I cannot tell exactly when this feature has been broken.
The problem is that for instance in the following example, sometimes 
the item C is repeated three times, sometimes A is repeated twice, etc.

strc-itm.mkvi:

\def\strc_itemgroups_collected_flush
  {\ifconditional\c_strc_itemgroups_randomize
 
\getrandomcount\c_strc_itemgroups_collected_current\plusone\c_strc_itemgroups_collected_stored

   \else
 \advance\c_strc_itemgroups_collected_current\plusone
   \fi
   
\ifcsname\??itemgroupstack\number\c_strc_itemgroups_collected_current\endcsname

 \edef\collecteditemgroupitem{\lastnamedcs}%
 \ifconditional\c_strc_itemgroups_horizontal
   \strc_itemgroups_collected_flush_horizontal
 \else
   \collecteditemgroupitem
+  
\letbeundefined{\??itemgroupstack\number\c_strc_itemgroups_collected_current}%

 \fi
 \advance\c_strc_itemgroups_collected_done\plusone
   \fi
   
\ifnum\c_strc_itemgroups_collected_done<\c_strc_itemgroups_collected_stored

 \expandafter\strc_itemgroups_collected_flush
   \fi}

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
___

[NTG-context] Bug in startitemize

2016-03-07 Thread Otared Kavian
Hi Hans,

It seems that with the new beta (ConTeXt  ver: 2016.03.04 10:39 MKIV beta  fmt: 
2016.3.7), there is a bug with random itemization.
I cannot tell exactly when this feature has been broken.
The problem is that for instance in the following example, sometimes the item C 
is repeated three times, sometimes A is repeated twice, etc.

\starttext

\startitemize[n,random]
\startitem A \stopitem
\startitem B \stopitem
\startitem C \stopitem
\stopitemize

\stoptext

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
___

Re: [NTG-context] Bug in \startitemize[randomize]

2012-08-05 Thread Hans Hagen

On 4-8-2012 17:22, Aditya Mahajan wrote:

Hi,

\startitemize[randomize] does not randomize properly (one entry at
random is gobbled and another is repeated in its place). I guess that
this is because of an off-by-one error somewhere.

Example (from: http://tex.stackexchange.com/a/65662/323)

 \defineitemgroup[institm]

 \setupinstitm[1][text, random]
 \setupinstitm[1][symbol=2, indentnext=no, intro=yes]

 \starttext

 \startTEXpage[offset=5mm]
 \bold{Contributions}
 \startinstitm
   \startitem Foo Pvt Ltd {\sc nsw} \stopitem
   \startitem Bar Pvt Ltd {\sc vic} \stopitem
   \startitem Baz Pvt Ltd {\sc abc} \stopitem
 \stopinstitm
 \stopTEXpage

 \stoptext


an \if going wild du eto a lack of \relax'ing

\unexpanded\def\getrandomcount #1#2#3%
  {#1=\ctxcommand{getrandomcounta(\number#2,\number#3)}\relax}


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


[NTG-context] Bug in \startitemize[randomize]

2012-08-04 Thread Aditya Mahajan

Hi,

\startitemize[randomize] does not randomize properly (one entry at random 
is gobbled and another is repeated in its place). I guess that this is 
because of an off-by-one error somewhere.


Example (from: http://tex.stackexchange.com/a/65662/323)

\defineitemgroup[institm]

\setupinstitm[1][text, random]
\setupinstitm[1][symbol=2, indentnext=no, intro=yes]

\starttext

\startTEXpage[offset=5mm]
\bold{Contributions}
\startinstitm
  \startitem Foo Pvt Ltd {\sc nsw} \stopitem
  \startitem Bar Pvt Ltd {\sc vic} \stopitem
  \startitem Baz Pvt Ltd {\sc abc} \stopitem
\stopinstitm
\stopTEXpage

\stoptext

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
___


[NTG-context] Bug in \startitemize?

2008-08-27 Thread Marcin Borkowski
Hi!

And again, I have a problem with itemizations.  This won't work:

\startitemize
\item aaa
\item bbb
  \startitemize[packed,joinedup]
  \item xxx
  \item yyy
  \item zzz
  \stopitemize
\item ccc
\stopitemize

More precisely, the joinedup option does not work in the inner
itemization.  Replacing [packed,joinedup] with
[packed,joinedup,columns,two] helps - but I don't want two columns...

And another problem, connected with this one: is there a joineddown
option, symmetrical to joinedup?

Thanks in advance

-- 
Marcin Borkowski (http://mbork.faculty.fmcs.amu.edu.pl)

Well, I admit that I quite like the Emacs operating system.  The only
problem with it is that it lacks a good ASCII editor.
___
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
___


[NTG-context] Bug in startitemize[text] ?

2007-02-06 Thread Aditya Mahajan
Hi Hans,

\startitemize[text] causes a par break at the end. From the code, it 
looks like it should not. Here is an example

\starttext
Some garbage text
\startitemize[text,r]
   \item This is a test
   \item Which does not work
\stopitemize
the garbage continues
\stoptext

There is a par break after the second item. The code in core-itm tries 
hard to introduce a \par when \listitemtext is true, but somewhere a 
\par slips in. I could not find out why this happens.

Also, does it make sense to disable stopper in case of 
\startitemize[text], by

\def\dododosetupitemgroupconstant[#1][#2#3#4]% * permits [2]
   {\processaction
  [#2#3#4]
  [   \v!packed*=\packitems,
.
\v!text*=\settrue\textlistitem
  \settrue\inlinelistitem
  \settrue\joinedlistitem %
  \setitemparameter{#1}\c!placestopper{\v!no}%
  ^^^ added !?
  \packitems,
 \v!columns*=\packitems,
   .
   ]}


I always find myself doing \startitemize[text,r][stopper=]

Aditya
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context