From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/66033 Path: news.gmane.org!not-for-mail From: "Tom" Newsgroups: gmane.comp.tex.context Subject: Chapter Command causes ToC to not display correctly Date: Mon, 14 Feb 2011 09:40:25 -0500 Message-ID: <00a901cbcc55$1e662c10$5b328430$@com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1297694466 11780 80.91.229.12 (14 Feb 2011 14:41:06 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 14 Feb 2011 14:41:06 +0000 (UTC) To: Original-X-From: ntg-context-bounces@ntg.nl Mon Feb 14 15:41:02 2011 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Pozbq-0006Tt-Dx for gctc-ntg-context-518@m.gmane.org; Mon, 14 Feb 2011 15:41:02 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id AA756CA9D4; Mon, 14 Feb 2011 15:40:59 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 92nESbVlUQNm; Mon, 14 Feb 2011 15:40:46 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 2DC24CA9B7; Mon, 14 Feb 2011 15:40:46 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id F1F6FCA9B7 for ; Mon, 14 Feb 2011 15:40:43 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id CQIewgwF3py7 for ; Mon, 14 Feb 2011 15:40:22 +0100 (CET) Original-Received: from filter4-til.mf.surf.net (filter4-til.mf.surf.net [194.171.167.220]) by balder.ntg.nl (Postfix) with ESMTP id 1753CCA96B for ; Mon, 14 Feb 2011 15:40:22 +0100 (CET) Original-Received: from smtp1.ctinetworks.com (smtp1.ctinetworks.com [205.166.61.208]) by filter4-til.mf.surf.net (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id p1EEeJjr032371 for ; Mon, 14 Feb 2011 15:40:21 +0100 Original-Received: from TomPC (c-67-191-114-63.hsd1.fl.comcast.net [67.191.114.63]) by smtp1.ctinetworks.com (Postfix) with ESMTP id 2676058591A for ; Mon, 14 Feb 2011 09:40:17 -0500 (EST) X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: AcvMVR2UeDCFK4rXQ5qi2Ua5mxYeVA== Content-Language: en-us X-ctinetworks-Information: Please contact the ISP for more information X-ctinetworks-MailScanner-ID: 2676058591A.A99CE X-ctinetworks-VirusCheck: Found to be clean X-ctinetworks-SpamCheck: X-ctinetworks-Watermark: 1298558418.50279@N6lcGgUSsTMkSDfNk+LusA X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=205.166.61.208; country=US; region=PA; city=Mechanicsburg; latitude=40.2134; longitude=-77.0098; metrocode=566; areacode=717; http://maps.google.com/maps?q=40.2134,-77.0098&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 05E7OEj0k - 00aa4688c06e - 20110214 X-Scanned-By: CanIt (www . roaringpenguin . com) on 194.171.167.216 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.12 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:66033 Archived-At: The code below seems to work fine when the first MyChapterCommand is commented out and the second one is active. However, when the first one is active and the second one is commented out, the ToC does not display properly. What could be causing this to happen? I know that the first MyChapterCommand is not appropriate and use an appropriate on in the front matter environment for the actual book. \definetypeface [mainface] [rm] [serif] [palatino] [default] \definetypeface [mainface] [ss] [sans] [iwona-heavy] [default] \definetypeface [mainface] [tt] [mono] [modern] [default] \definetypeface [mainface] [mm] [math] [palatino] [default] \definetypeface [pagenumber] [ss] [sans] [iwona-light] [default] \definetypeface [dedication] [rm] [serif] [chancery] [default] \setupbodyfont[mainface] %\starthiding %Chapter number only - not appropriate for frontmatter \def\MyChapterCommand#1#2% #1 is number, #2 is text {\framed[frame=off,bottomframe=on,topframe=on] {\vbox{\centerline{ #1}}}} %\stophiding \starthiding %lines above and below chapter number and title \def\MyChapterCommand#1#2% #1 is number, #2 is text {\framed[frame=off,bottomframe=on,topframe=on] {\vbox{\headtext{chapter} #1\blank#2}}} \stophiding % headings \definestartstop[dedication][style={\switchtobodyfont[dedication,20pt]},befo re=\page] \definehead [intro] [chapter] \setuphead[chapter][style=\ss\bfd,alternative=middle, command=\MyChapterCommand, header=empty,footer=chapter, after={\blank[0.5in]},before={\blank[force,1.0in]} \placeinitial] \setuphead[intro][number=no] \setuphead[dedication][incrementnumber=no] \definecombinedlist [content][intro,chapter,section] % pagenumbers \setuppagenumbering [state=start,alternative=doublesided,conversion=numbers,location=] \setupheadertexts [chapter][pagenumber][pagenumber][My Book Title] \setupheader[style={\switchtobodyfont[pagenumber,20pt]\sl}] %turn on indentation \setupindenting[yes,medium,next] \starttext \dedication{} \startdedication \startalignment[middle] To someone who inspired or supported me. Let's see how this works for dedications that span multiple lines. \stopalignment \stopdedication \completecontent \intro{Introduction - Ag} \input knuth \chapter{First chapter - Ag} \input knuth \input knuth \input knuth \input knuth \input knuth \chapter{Second Chapter - Ag} \input knuth \stoptext Tom Benjey 717-258-9733 voice 717-243-0074 fax blog: www.TomBenjey.com ___________________________________________________________________________________ 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 ___________________________________________________________________________________