Re: [NTG-context] TOC with Grey background for pages belonging to last section of every chapter

2015-02-02 Thread Wolfgang Schuster

 Am 02.02.2015 um 14:00 schrieb Keith J. Schultz keithjschu...@web.de:
 
 Hi Wolgang,
 
 I noticed that \startnamedsection does not add it to the TOC
 how would one go about having these „namedsections“ added to the TOC.
 
 regards
   Keith.
 
 Am 02.02.2015 um 12:51 schrieb Wolfgang Schuster 
 schuster.wolfg...@gmail.com mailto:schuster.wolfg...@gmail.com:
 
 You have to add „location=paragraph” to the textbackground setup.
 
 \definetextbackground
  [ChapterFrame]
  [frame=off,
   background=color,
   backgroundcolor=green,
   backgroundoffset=1ex,
   location=paragraph] % default: location=text
 
 \definehead [Framed][chapter]
 \definehead [Frameless] [chapter]
 
 \setuphead
  [Frameless]
  [before={\blank[2*line]}]
 
 \setuphead
  [Framed]
  [page=no,
   before=,
   beforesection={\page\blank[2*line]\starttextbackground[ChapterFrame]},
   aftersection=\stoptextbackground]
 
 \starttext
 
 \startnamedsection[Frameless][title=Chapter without frame]
 
 \input knuth
 
 \stopnamedsection
 
 \startnamedsection[Framed][title=Chapter with frame]
 
 \input knuth
 
 \stopnamedsection
 
 \stoptext

The command \startnamedsection[chapter] is the same as using \startchapter in 
your
document, the only difference is that you use the header-type as argument in 
the first
case while in the second case the head-type is part of the command name.

When you print your table of contents with the \placecontent or \completecontent
commands ConTeXt uses only headers which are in the list for the “content” list.
To print additional headers which are defined with \definehead in your document
you can either use \placelist[chapter,MYHEADER,section,…] instead of 
\placecontent
or you extend the list for “content” with 
\setupcombinedlist[content][list={chapter,MYHEADER,…}]
or \placecontent[list={chapter,MYHEADER,…}]

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] TOC with Grey background for pages belonging to last section of every chapter

2015-02-02 Thread Keith J. Schultz
Hi Wolgang,

I noticed that \startnamedsection does not add it to the TOC
how would one go about having these „namedsections“ added to the TOC.

regards
Keith.

 Am 02.02.2015 um 12:51 schrieb Wolfgang Schuster 
 schuster.wolfg...@gmail.com:
 
 You have to add „location=paragraph” to the textbackground setup.
 
 \definetextbackground
  [ChapterFrame]
  [frame=off,
   background=color,
   backgroundcolor=green,
   backgroundoffset=1ex,
   location=paragraph] % default: location=text
 
 \definehead [Framed][chapter]
 \definehead [Frameless] [chapter]
 
 \setuphead
  [Frameless]
  [before={\blank[2*line]}]
 
 \setuphead
  [Framed]
  [page=no,
   before=,
   beforesection={\page\blank[2*line]\starttextbackground[ChapterFrame]},
   aftersection=\stoptextbackground]
 
 \starttext
 
 \startnamedsection[Frameless][title=Chapter without frame]
 
 \input knuth
 
 \stopnamedsection
 
 \startnamedsection[Framed][title=Chapter with frame]
 
 \input knuth
 
 \stopnamedsection
 
 \stoptext
 

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