ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* context mkiv bug + related feature request + related question
@ 2009-06-22  3:36 Yue Wang
  2009-06-25 12:15 ` Yue Wang
  2009-07-18 11:51 ` Yue Wang
  0 siblings, 2 replies; 6+ messages in thread
From: Yue Wang @ 2009-06-22  3:36 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hi, Hans:


bug report :
here is the test file. (old version of mkiv produce right result.
current mkii result is also right)
It is a bug introduced in this/last month.
The code is a stripped down version of
http://wiki.contextgarden.net/Horizontal_Table_of_Contents (altough it
doesn't show toc horizontally)

\newcount\chapcounter \chapcounter=0
\def\tocchap#1#2#3{\advance\chapcounter by 1 #1 #2%
	\placelist[section][criterium=chapter,number=\chapcounter]}
\starttext
\placelist[chapter][alternative=command,command=\tocchap]
\chapter{hello} \section{hello} \section{hello}
\chapter{good} \section{good} \section{good}
\chapter{bad} \section{bad} \section{bad}
\stoptext

feature request:

btw, Hans, context should give an option to iterate through all the
chapters/sections to do something tricky.
using \chaptercounter is a really bad idea (the materials should
follow strict rules, like cannot jump from chap 1 to chap 3).
I think with mkiv it is able to achieve that.

question:

I want to show toc before each chapter, and the toc only shows the
following chapter name in red.
How can I do that?
e.g. show the following before chapter 3

% A Page
Chap1
sec 1 sec 2 sec 3
Chap2
sec 1 sec 2 sec 3
Chap 3  %in red
sec 1 sec 2 sec 3 %in Red
Chap4
sec 1 sec 2 sec 3
% Next Page
Chapter 3 % title
a lot of materials


Yue Wang
___________________________________________________________________________________
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] 6+ messages in thread

* Re: context mkiv bug + related feature request + related question
  2009-06-22  3:36 context mkiv bug + related feature request + related question Yue Wang
@ 2009-06-25 12:15 ` Yue Wang
  2009-07-18 11:51 ` Yue Wang
  1 sibling, 0 replies; 6+ messages in thread
From: Yue Wang @ 2009-06-25 12:15 UTC (permalink / raw)
  To: mailing list for ConTeXt users

any help?

On Mon, Jun 22, 2009 at 11:36 AM, Yue Wang<yuleopen@gmail.com> wrote:
> Hi, Hans:
>
>
> bug report :
> here is the test file. (old version of mkiv produce right result.
> current mkii result is also right)
> It is a bug introduced in this/last month.
> The code is a stripped down version of
> http://wiki.contextgarden.net/Horizontal_Table_of_Contents (altough it
> doesn't show toc horizontally)
>
> \newcount\chapcounter \chapcounter=0
> \def\tocchap#1#2#3{\advance\chapcounter by 1 #1 #2%
>        \placelist[section][criterium=chapter,number=\chapcounter]}
> \starttext
> \placelist[chapter][alternative=command,command=\tocchap]
> \chapter{hello} \section{hello} \section{hello}
> \chapter{good} \section{good} \section{good}
> \chapter{bad} \section{bad} \section{bad}
> \stoptext
>
> feature request:
>
> btw, Hans, context should give an option to iterate through all the
> chapters/sections to do something tricky.
> using \chaptercounter is a really bad idea (the materials should
> follow strict rules, like cannot jump from chap 1 to chap 3).
> I think with mkiv it is able to achieve that.
>
> question:
>
> I want to show toc before each chapter, and the toc only shows the
> following chapter name in red.
> How can I do that?
> e.g. show the following before chapter 3
>
> % A Page
> Chap1
> sec 1 sec 2 sec 3
> Chap2
> sec 1 sec 2 sec 3
> Chap 3  %in red
> sec 1 sec 2 sec 3 %in Red
> Chap4
> sec 1 sec 2 sec 3
> % Next Page
> Chapter 3 % title
> a lot of materials
>
>
> Yue Wang
>
___________________________________________________________________________________
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] 6+ messages in thread

* Re: context mkiv bug + related feature request + related question
  2009-06-22  3:36 context mkiv bug + related feature request + related question Yue Wang
  2009-06-25 12:15 ` Yue Wang
@ 2009-07-18 11:51 ` Yue Wang
  2009-07-18 13:45   ` Mohamed Bana
  2009-07-19 11:21   ` Hans Hagen
  1 sibling, 2 replies; 6+ messages in thread
From: Yue Wang @ 2009-07-18 11:51 UTC (permalink / raw)
  To: mailing list for ConTeXt users

This bug is still not solved in the current context mkiv version.

On Mon, Jun 22, 2009 at 11:36 AM, Yue Wang<yuleopen@gmail.com> wrote:
> Hi, Hans:
>
>
> bug report :
> here is the test file. (old version of mkiv produce right result.
> current mkii result is also right)
> It is a bug introduced in this/last month.
> The code is a stripped down version of
> http://wiki.contextgarden.net/Horizontal_Table_of_Contents (altough it
> doesn't show toc horizontally)
>
> \newcount\chapcounter \chapcounter=0
> \def\tocchap#1#2#3{\advance\chapcounter by 1 #1 #2%
>        \placelist[section][criterium=chapter,number=\chapcounter]}
> \starttext
> \placelist[chapter][alternative=command,command=\tocchap]
> \chapter{hello} \section{hello} \section{hello}
> \chapter{good} \section{good} \section{good}
> \chapter{bad} \section{bad} \section{bad}
> \stoptext
>
> feature request:
>
> btw, Hans, context should give an option to iterate through all the
> chapters/sections to do something tricky.
> using \chaptercounter is a really bad idea (the materials should
> follow strict rules, like cannot jump from chap 1 to chap 3).
> I think with mkiv it is able to achieve that.
>
> question:
>
> I want to show toc before each chapter, and the toc only shows the
> following chapter name in red.
> How can I do that?
> e.g. show the following before chapter 3
>
> % A Page
> Chap1
> sec 1 sec 2 sec 3
> Chap2
> sec 1 sec 2 sec 3
> Chap 3  %in red
> sec 1 sec 2 sec 3 %in Red
> Chap4
> sec 1 sec 2 sec 3
> % Next Page
> Chapter 3 % title
> a lot of materials
>
>
> Yue Wang
>
___________________________________________________________________________________
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] 6+ messages in thread

* Re: context mkiv bug + related feature request + related question
  2009-07-18 11:51 ` Yue Wang
@ 2009-07-18 13:45   ` Mohamed Bana
  2009-07-19 10:27     ` Hans Hagen
  2009-07-19 11:21   ` Hans Hagen
  1 sibling, 1 reply; 6+ messages in thread
From: Mohamed Bana @ 2009-07-18 13:45 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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

i'd like to ask what sort of regression testing you guys are doing.  it's
very clear that things are constantly breaking, and even trivial ones but
aren't being spotted.

2009/7/18 Yue Wang <yuleopen@gmail.com>

> This bug is still not solved in the current context mkiv version.
>
> On Mon, Jun 22, 2009 at 11:36 AM, Yue Wang<yuleopen@gmail.com> wrote:
> > Hi, Hans:
> >
> >
> > bug report :
> > here is the test file. (old version of mkiv produce right result.
> > current mkii result is also right)
> > It is a bug introduced in this/last month.
> > The code is a stripped down version of
> > http://wiki.contextgarden.net/Horizontal_Table_of_Contents (altough it
> > doesn't show toc horizontally)
> >
> > \newcount\chapcounter \chapcounter=0
> > \def\tocchap#1#2#3{\advance\chapcounter by 1 #1 #2%
> >        \placelist[section][criterium=chapter,number=\chapcounter]}
> > \starttext
> > \placelist[chapter][alternative=command,command=\tocchap]
> > \chapter{hello} \section{hello} \section{hello}
> > \chapter{good} \section{good} \section{good}
> > \chapter{bad} \section{bad} \section{bad}
> > \stoptext
> >
> > feature request:
> >
> > btw, Hans, context should give an option to iterate through all the
> > chapters/sections to do something tricky.
> > using \chaptercounter is a really bad idea (the materials should
> > follow strict rules, like cannot jump from chap 1 to chap 3).
> > I think with mkiv it is able to achieve that.
> >
> > question:
> >
> > I want to show toc before each chapter, and the toc only shows the
> > following chapter name in red.
> > How can I do that?
> > e.g. show the following before chapter 3
> >
> > % A Page
> > Chap1
> > sec 1 sec 2 sec 3
> > Chap2
> > sec 1 sec 2 sec 3
> > Chap 3  %in red
> > sec 1 sec 2 sec 3 %in Red
> > Chap4
> > sec 1 sec 2 sec 3
> > % Next Page
> > Chapter 3 % title
> > a lot of materials
> >
> >
> > Yue Wang
> >
>
> ___________________________________________________________________________________
> 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
>
> ___________________________________________________________________________________
>

[-- Attachment #1.2: Type: text/html, Size: 3489 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] 6+ messages in thread

* Re: context mkiv bug + related feature request + related question
  2009-07-18 13:45   ` Mohamed Bana
@ 2009-07-19 10:27     ` Hans Hagen
  0 siblings, 0 replies; 6+ messages in thread
From: Hans Hagen @ 2009-07-19 10:27 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Mohamed Bana wrote:

> i'd like to ask what sort of regression testing you guys are doing.  it's
> very clear that things are constantly breaking, and even trivial ones but
> aren't being spotted.

we have a couple of test docs but no regression suits .. there have been 
several attempts to set this up but no one is following up on that 
consistently and it's not something that taco and i are going to 
maintain (too much to do already)

anyhow, most reports about bugs refer to mkiv and esp structure related 
things; keep in mind that most counter, number conversion, multipass 
info, etc has been completely rewritten from scratch so there are 
definitely bugs esp in gray areas and since some of the control model 
has changed, we even will have differnces in configuration between mkii 
and mkiv (topic for the context meeting)

this will sort itself out as more is tested

Hans


-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
      tel: 038 477 53 69 | fax: 038 477 53 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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: context mkiv bug + related feature request + related question
  2009-07-18 11:51 ` Yue Wang
  2009-07-18 13:45   ` Mohamed Bana
@ 2009-07-19 11:21   ` Hans Hagen
  1 sibling, 0 replies; 6+ messages in thread
From: Hans Hagen @ 2009-07-19 11:21 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Yue Wang wrote:
> This bug is still not solved in the current context mkiv version.
> 
> On Mon, Jun 22, 2009 at 11:36 AM, Yue Wang<yuleopen@gmail.com> wrote:
>> Hi, Hans:
>>
>>
>> bug report :
>> here is the test file. (old version of mkiv produce right result.
>> current mkii result is also right)
>> It is a bug introduced in this/last month.
>> The code is a stripped down version of
>> http://wiki.contextgarden.net/Horizontal_Table_of_Contents (altough it
>> doesn't show toc horizontally)
>>
>> \newcount\chapcounter \chapcounter=0
>> \def\tocchap#1#2#3{\advance\chapcounter by 1 #1 #2%
>>        \placelist[section][criterium=chapter,number=\chapcounter]}
>> \starttext
>> \placelist[chapter][alternative=command,command=\tocchap]
>> \chapter{hello} \section{hello} \section{hello}
>> \chapter{good} \section{good} \section{good}
>> \chapter{bad} \section{bad} \section{bad}
>> \stoptext

add \number in front of \listparameter\c!number in strc-lst.mkiv or just 
in front of your \chapcounter

\number\listparameter\c!number

(info passed to lua has to be expanded)

actually, there is in mkii:

\starttext

\placelist[chapter][after={\placelist[section][criterium=local]}]

\chapter{hello} \section{hello} \section{hello}
\chapter{good} \section{good} \section{good}
\chapter{bad} \section{bad} \section{bad}

\stoptext

but that does not yet work in mkiv

>> feature request:
>>
>> btw, Hans, context should give an option to iterate through all the
>> chapters/sections to do something tricky.
>> using \chaptercounter is a really bad idea (the materials should
>> follow strict rules, like cannot jump from chap 1 to chap 3).
>> I think with mkiv it is able to achieve that.

sure, but that's for later; the mkiv structure code has much more 
possibilities but first i want to have the standard features complete 
and debugged

>> question:
>>
>> I want to show toc before each chapter, and the toc only shows the
>> following chapter name in red.
>> How can I do that?
>> e.g. show the following before chapter 3
>>
>> % A Page
>> Chap1
>> sec 1 sec 2 sec 3
>> Chap2
>> sec 1 sec 2 sec 3
>> Chap 3  %in red
>> sec 1 sec 2 sec 3 %in Red
>> Chap4
>> sec 1 sec 2 sec 3
>> % Next Page
>> Chapter 3 % title
>> a lot of materials
>>
>>
>> Yue Wang
>>
> ___________________________________________________________________________________
> 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
> ___________________________________________________________________________________


-- 

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
      tel: 038 477 53 69 | fax: 038 477 53 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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

end of thread, other threads:[~2009-07-19 11:21 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-06-22  3:36 context mkiv bug + related feature request + related question Yue Wang
2009-06-25 12:15 ` Yue Wang
2009-07-18 11:51 ` Yue Wang
2009-07-18 13:45   ` Mohamed Bana
2009-07-19 10:27     ` Hans Hagen
2009-07-19 11:21   ` 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).