ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Otared Kavian <otared@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: small abstracts in table of contents?
Date: Tue, 25 Nov 2014 17:37:09 +0100	[thread overview]
Message-ID: <BD532494-761D-4CD7-B6DF-0C4C098565DF@gmail.com> (raw)
In-Reply-To: <C0DE2871-D703-47A6-A663-1EF76C53341D@rna.nl>


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

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 <Gerben.Wierda@RnA.nl> wrote:
> 
> On 25 Nov 2014, at 15:12, Otared Kavian <otared@gmail.com <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 <Gerben.Wierda@RnA.nl <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 <otared@gmail.com <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 <Gerben.Wierda@RnA.nl <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
> ___________________________________________________________________________________


[-- Attachment #1.2: Type: text/html, Size: 13620 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 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  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

      reply	other threads:[~2014-11-25 16:37 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-24 23:41 Gerben Wierda
2014-11-25  5:41 ` Wolfgang Schuster
2014-11-25  7:18 ` Otared Kavian
2014-11-25  7:54   ` Hans Hagen
2014-11-25 13:49   ` Gerben Wierda
2014-11-25 14:12     ` Otared Kavian
2014-11-25 16:01       ` Gerben Wierda
2014-11-25 16:37         ` Otared Kavian [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=BD532494-761D-4CD7-B6DF-0C4C098565DF@gmail.com \
    --to=otared@gmail.com \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).