small abstracts in table of contents?
I have a standard ToC, but what I’d like to have is that each chapter item (I don’t go lower than that in the hierarchy) comes with its own little abstract.Is that possible? G
Am 25.11.2014 um 00:41 schrieb Gerben Wierda
: I have a standard ToC, but what I’d like to have is that each chapter item (I don’t go lower than that in the hierarchy) comes with its own little abstract.Is that possible?
You can use the \writebetweenlist or \writetolist commands for this. Wolfgang
Hi Gerben, As Wolfgang said, you can use something like this (example given by him some months ago on the mailing list): \definelist[chaptertext] \setuplist[chaptertext][style=\tfx,margin=3em,pagecommand=\gobbleoneargument] \starttext \placelist[chapter,chaptertext] \chapter{This is a chapter} \writetolist[chaptertext]{}{This is a small description of this chapter: \input ward } \input knuth.tex \stoptext Best regards: OK
On 25 Nov 2014, at 00:41, Gerben Wierda
wrote: I have a standard ToC, but what I’d like to have is that each chapter item (I don’t go lower than that in the hierarchy) comes with its own little abstract.Is that possible?
G ___________________________________________________________________________________ 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 ___________________________________________________________________________________
On 11/25/2014 8:18 AM, Otared Kavian wrote:
Hi Gerben,
As Wolfgang said, you can use something like this (example given by him some months ago on the mailing list):
\definelist[chaptertext] \setuplist[chaptertext][style=\tfx,margin=3em,pagecommand=\gobbleoneargument]
\starttext
\placelist[chapter,chaptertext]
\chapter{This is a chapter}
\writetolist[chaptertext]{}{This is a small description of this chapter: \input ward }
\input knuth.tex
\stoptext
The mkiv way: \starttext \unexpanded\def\ShowSummary#1#2#3% {\inleftmargin{#1}\structurelistuservariable{summary}\blank} \placelist[chapter][alternative=command,command=\ShowSummary] \startchapter [title={This is a chapter}] [summary={This is a small description of this chapter}] \input knuth.tex \stopchapter \startchapter [title={This is also a chapter}] [summary={This is a larger description of this chapter}] \input ward.tex \stopchapter \stoptext ----------------------------------------------------------------- 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 -----------------------------------------------------------------
This works, but not completely. I’ve added this to my environments file:
\definelist[chaptertext]
\setuplist[chaptertext][style=\itx,margin=3em,pagecommand=\gobbleoneargument]
and the contents list is created by
\title[h:toc]{Contents}
\placelist[chapter,chaptertext]
%\completecontent[level=chapter]
The %-outcommented was the original list. In the chapter file, it now says
\chapter[h:foo]{Foo}
\writetolist[chaptertext]{}{\input tufte}
The effect of this is that every chapter name in the list is typeset as \itx, not just the summary chaptertext. The chapter numbers are still in their original font and size.
G
On 25 Nov 2014, at 08:18, Otared Kavian
Hi Gerben,
As Wolfgang said, you can use something like this (example given by him some months ago on the mailing list):
\definelist[chaptertext] \setuplist[chaptertext][style=\tfx,margin=3em,pagecommand=\gobbleoneargument]
\starttext
\placelist[chapter,chaptertext]
\chapter{This is a chapter}
\writetolist[chaptertext]{}{This is a small description of this chapter: \input ward }
\input knuth.tex
\stoptext
Best regards: OK
On 25 Nov 2014, at 00:41, Gerben Wierda
wrote: I have a standard ToC, but what I’d like to have is that each chapter item (I don’t go lower than that in the hierarchy) comes with its own little abstract.Is that possible?
G ___________________________________________________________________________________ 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 ___________________________________________________________________________________
Hi Gerben, This shouldn’t be a problem, since you may give your own style to the list of chapters by saying for example \setuplist[chapter][style=\bf] or whatever style you wish. Best regards: OK
On 25 Nov 2014, at 14:49, Gerben Wierda
wrote: This works, but not completely. I’ve added this to my environments file:
\definelist[chaptertext] \setuplist[chaptertext][style=\itx,margin=3em,pagecommand=\gobbleoneargument]
and the contents list is created by
\title[h:toc]{Contents} \placelist[chapter,chaptertext] %\completecontent[level=chapter]
The %-outcommented was the original list. In the chapter file, it now says
\chapter[h:foo]{Foo} \writetolist[chaptertext]{}{\input tufte}
The effect of this is that every chapter name in the list is typeset as \itx, not just the summary chaptertext. The chapter numbers are still in their original font and size.
G
On 25 Nov 2014, at 08:18, Otared Kavian
mailto:otared@gmail.com> wrote: Hi Gerben,
As Wolfgang said, you can use something like this (example given by him some months ago on the mailing list):
\definelist[chaptertext] \setuplist[chaptertext][style=\tfx,margin=3em,pagecommand=\gobbleoneargument]
\starttext
\placelist[chapter,chaptertext]
\chapter{This is a chapter}
\writetolist[chaptertext]{}{This is a small description of this chapter: \input ward }
\input knuth.tex
\stoptext
Best regards: OK
On 25 Nov 2014, at 00:41, Gerben Wierda
mailto:Gerben.Wierda@RnA.nl> wrote: I have a standard ToC, but what I’d like to have is that each chapter item (I don’t go lower than that in the hierarchy) comes with its own little abstract.Is that possible?
G ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl mailto:ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl http://www.pragma-ade.nl/ / http://tex.aanhet.net http://tex.aanhet.net/ archive : http://foundry.supelec.fr/projects/contextrev/ http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net 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 mailto:ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl http://www.pragma-ade.nl/ / http://tex.aanhet.net http://tex.aanhet.net/ archive : http://foundry.supelec.fr/projects/contextrev/ http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net 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 ___________________________________________________________________________________
On 25 Nov 2014, at 15:12, Otared Kavian
Hi Gerben,
This shouldn’t be a problem, since you may give your own style to the list of chapters by saying for example
\setuplist[chapter][style=\bf]
or whatever style you wish.
I tried \definelist[chaptertext] \setuplist[chaptertext][style=\itx,margin=3em,pagecommand=\gobbleoneargument] \setuplist[chapter][style=\tfa,before={\blank[big]}] but what happens in the TOC is: - Chapter numbers and page numbers are \tfa - Chapter name seems \it - Chapter text is \itx In other words, the \itx command for chaptertext influences the style of chapter G Minimal example: \definelist[chaptertext] \setuplist[chaptertext][style=\itx,margin=3em,pagecommand=\gobbleoneargument] \setuplist[chapter][style=\tfa,before={\blank[big]}] \starttext \placelist[chapter,chaptertext] \chapter{This is a chapter} \writetolist[chaptertext]{}{This is a small description of this chapter: \input ward } \input knuth.tex \chapter{This is a chapter} \writetolist[chaptertext]{}{This is a small description of this chapter: \input ward } \input knuth.tex \chapter{This is a chapter} \writetolist[chaptertext]{}{This is a small description of this chapter: \input ward } \input knuth.tex \stoptext
Best regards: OK
On 25 Nov 2014, at 14:49, Gerben Wierda
wrote: This works, but not completely. I’ve added this to my environments file:
\definelist[chaptertext] \setuplist[chaptertext][style=\itx,margin=3em,pagecommand=\gobbleoneargument]
and the contents list is created by
\title[h:toc]{Contents} \placelist[chapter,chaptertext] %\completecontent[level=chapter]
The %-outcommented was the original list. In the chapter file, it now says
\chapter[h:foo]{Foo} \writetolist[chaptertext]{}{\input tufte}
The effect of this is that every chapter name in the list is typeset as \itx, not just the summary chaptertext. The chapter numbers are still in their original font and size.
G
On 25 Nov 2014, at 08:18, Otared Kavian
wrote: Hi Gerben,
As Wolfgang said, you can use something like this (example given by him some months ago on the mailing list):
\definelist[chaptertext] \setuplist[chaptertext][style=\tfx,margin=3em,pagecommand=\gobbleoneargument]
\starttext
\placelist[chapter,chaptertext]
\chapter{This is a chapter}
\writetolist[chaptertext]{}{This is a small description of this chapter: \input ward }
\input knuth.tex
\stoptext
Best regards: OK
On 25 Nov 2014, at 00:41, Gerben Wierda
wrote: I have a standard ToC, but what I’d like to have is that each chapter item (I don’t go lower than that in the hierarchy) comes with its own little abstract.Is that possible?
G ___________________________________________________________________________________ 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 ___________________________________________________________________________________
___________________________________________________________________________________ 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 ___________________________________________________________________________________
Hi Gerben, Sorry for not having been more cautious: what I sent you works fine with mkiv, but somehow in mkii giving a style for your list of « chaptertext » spills over to the list of « chapter »… The following seems to give your desired result in mkii: \definelist[chaptertext] \setuplist[chaptertext][pagecommand=\gobbleoneargument] \define[1]\ChapterAbstract{\writetolist[chaptertext]{}{\start\itx#1\stop}} \starttext \placelist[chapter,chaptertext] \chapter{This is a chapter} \ChapterAbstract{This is a small description of this chapter: \input ward } \input knuth.tex \stoptext Best regards: OK
On 25 Nov 2014, at 17:01, Gerben Wierda
wrote: On 25 Nov 2014, at 15:12, Otared Kavian
mailto:otared@gmail.com> wrote: Hi Gerben,
This shouldn’t be a problem, since you may give your own style to the list of chapters by saying for example
\setuplist[chapter][style=\bf]
or whatever style you wish.
I tried
\definelist[chaptertext] \setuplist[chaptertext][style=\itx,margin=3em,pagecommand=\gobbleoneargument] \setuplist[chapter][style=\tfa,before={\blank[big]}]
but what happens in the TOC is: - Chapter numbers and page numbers are \tfa - Chapter name seems \it - Chapter text is \itx
In other words, the \itx command for chaptertext influences the style of chapter
G
Minimal example:
\definelist[chaptertext] \setuplist[chaptertext][style=\itx,margin=3em,pagecommand=\gobbleoneargument] \setuplist[chapter][style=\tfa,before={\blank[big]}]
\starttext
\placelist[chapter,chaptertext]
\chapter{This is a chapter}
\writetolist[chaptertext]{}{This is a small description of this chapter: \input ward }
\input knuth.tex
\chapter{This is a chapter}
\writetolist[chaptertext]{}{This is a small description of this chapter: \input ward }
\input knuth.tex
\chapter{This is a chapter}
\writetolist[chaptertext]{}{This is a small description of this chapter: \input ward }
\input knuth.tex
\stoptext
Best regards: OK
On 25 Nov 2014, at 14:49, Gerben Wierda
mailto:Gerben.Wierda@RnA.nl> wrote: This works, but not completely. I’ve added this to my environments file:
\definelist[chaptertext] \setuplist[chaptertext][style=\itx,margin=3em,pagecommand=\gobbleoneargument]
and the contents list is created by
\title[h:toc]{Contents} \placelist[chapter,chaptertext] %\completecontent[level=chapter]
The %-outcommented was the original list. In the chapter file, it now says
\chapter[h:foo]{Foo} \writetolist[chaptertext]{}{\input tufte}
The effect of this is that every chapter name in the list is typeset as \itx, not just the summary chaptertext. The chapter numbers are still in their original font and size.
G
On 25 Nov 2014, at 08:18, Otared Kavian
mailto:otared@gmail.com> wrote: Hi Gerben,
As Wolfgang said, you can use something like this (example given by him some months ago on the mailing list):
\definelist[chaptertext] \setuplist[chaptertext][style=\tfx,margin=3em,pagecommand=\gobbleoneargument]
\starttext
\placelist[chapter,chaptertext]
\chapter{This is a chapter}
\writetolist[chaptertext]{}{This is a small description of this chapter: \input ward }
\input knuth.tex
\stoptext
Best regards: OK
On 25 Nov 2014, at 00:41, Gerben Wierda
mailto:Gerben.Wierda@RnA.nl> wrote: I have a standard ToC, but what I’d like to have is that each chapter item (I don’t go lower than that in the hierarchy) comes with its own little abstract.Is that possible?
G ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl mailto:ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl http://www.pragma-ade.nl/ / http://tex.aanhet.net http://tex.aanhet.net/ archive : http://foundry.supelec.fr/projects/contextrev/ http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net 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 mailto:ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl http://www.pragma-ade.nl/ / http://tex.aanhet.net http://tex.aanhet.net/ archive : http://foundry.supelec.fr/projects/contextrev/ http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net 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 mailto:ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl http://www.pragma-ade.nl/ / http://tex.aanhet.net http://tex.aanhet.net/ archive : http://foundry.supelec.fr/projects/contextrev/ http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net 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 mailto:ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl http://www.pragma-ade.nl/ / http://tex.aanhet.net http://tex.aanhet.net/ archive : http://foundry.supelec.fr/projects/contextrev/ http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net 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 ___________________________________________________________________________________
participants (4)
-
Gerben Wierda
-
Hans Hagen
-
Otared Kavian
-
Wolfgang Schuster