# [NTG-context] Is there some ways to group sections in a given chapter together in toc?

Hans Hagen pragma at wxs.nl
Mon Sep 1 12:04:48 CEST 2008

```Yue Wang wrote:
> Hi, Hans:
>
>
>
> chapter 1  chapter2  chapter3
> sec1.1       sec2.1     sec 3.1
> sec1.2       sec2.1     sec 3.2
> sec1.3                       sec 3.3
> sec1.4
>
> I think I should create a frame for each chapter and its sections.
> However, whether the inbetween key or the command key is hard to add a
> command before chapter1 (use before key) and after sec1.4 (cannot use
> after key for chapter 1) at the same time to group them all together.
>
> Is this design possible in ConTeXt? How can I do this? Thank you!

best direct such questions to the list

\starttext

\placelist[section][criterium=chapter,number=2]

\chapter{first}
\section{a}
\section{b}
\chapter{second}
\section{c}
\section{d}

\stoptext

-----------------------------------------------------------------