From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/58237 Path: news.gmane.org!not-for-mail From: "Tom" Newsgroups: gmane.comp.tex.context Subject: (no subject) Date: Sun, 18 Apr 2010 20:11:08 -0400 Message-ID: <015d01cadf54$cfdd3c70$6f97b550$@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 1271635959 4024 80.91.229.12 (19 Apr 2010 00:12:39 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 19 Apr 2010 00:12:39 +0000 (UTC) To: Original-X-From: ntg-context-bounces@ntg.nl Mon Apr 19 02:12:37 2010 connect(): No such file or directory 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 1O3ebL-0007XW-25 for gctc-ntg-context-518@m.gmane.org; Mon, 19 Apr 2010 02:12:35 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 857BAC9ADD; Mon, 19 Apr 2010 02:12:33 +0200 (CEST) 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 t4yeRxZSMyT3; Mon, 19 Apr 2010 02:12:20 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 8BEF4C9BB3; Mon, 19 Apr 2010 02:12:20 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 948FFC9BC4 for ; Mon, 19 Apr 2010 02:12:19 +0200 (CEST) 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 JTfl0NYF+s+U for ; Mon, 19 Apr 2010 02:12:07 +0200 (CEST) Original-Received: from smtp2.ctinetworks.com (smtp2.ctinetworks.com [205.166.61.227]) by balder.ntg.nl (Postfix) with ESMTP id 649D3C9ADD for ; Mon, 19 Apr 2010 02:12:07 +0200 (CEST) Original-Received: from TomPC (dsl-206-251-1-229.dsl0.crls.pa.net [206.251.1.229]) by smtp2.ctinetworks.com (Postfix) with ESMTP id EE6001A7563 for ; Sun, 18 Apr 2010 20:12:03 -0400 (EDT) X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: AcrfVM+IfvCZk9x2SyOuetcnCGsm4Q== Content-Language: en-us X-ctinetworks-Information: Please contact the ISP for more information X-ctinetworks-MailScanner-ID: EE6001A7563.EB6AB X-ctinetworks-VirusCheck: Found to be clean X-ctinetworks-SpamCheck: X-ctinetworks-Watermark: 1272499925.88289@lrhApvAkTYiHLpqt2zuE9Q 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:58237 Archived-At: The following example computes page numbers correctly, places the correct entries into the TOC, and produces the desired page headers on the first pages of chapters. However, there are some things it doesn't do properly: 1. It puts headers on blank pages at the ends of chapters even after I inserted the code that takes care of that problem. 2. It seems to ignore some commands or wait until the next chapter to implement them. An example is the header on page vi. It's supposed to read vi............................Contents 3. It seems that commands in the \startsectionenvironment frontmatter block are ignored or overridden by commands that are for the body part. That is why I have so many setup commands ib the \starttext section. %figure on left - chapter number and title on right \def\MyChapterCommandM#1#2% #1 is number, #2 is text {\startfiguretext[left]{none} {\externalfigure[cow][width=.2\textwidth]} {\framed[frame=off,align=middle,width=broad] {\switchtobodyfont[15pt] #1\\\blank[small] #2}} \stopfiguretext} %no figure on left - chapter number and title on right \def\MyFrontMatterCommandM#1#2% #1 is number, #2 is text {\framed[frame=off,align=middle,width=broad] {\switchtobodyfont[15pt] #1\\\blank[small] #2}} %eliminate headers on blank page at end of chapter \definepagebreak[mychapterpagebreak][yes,header,next] %put pagenumber on bottom of first page of chapter \definetext[chapter][footer][pagenumber] \setuphead[chapter][header=high,footer=chapter,page=right] \setuppagenumbering[location=] \startsectionblockenvironment[frontpart] \definehead[mycontenttitle][chapter] \setuphead[mycontenttitle] [command=\MyFrontMatterCommandM, number=no,textstyle=\ss\bf, header=empty,footer=empty,page=mychapterpagebreak, numbercommand=\ss\bf\em\tfd,after=\vskip 0.5in \placeinitial %comment out this line to eliminate drop capitals ] \stopsectionblockenvironment \startsectionblockenvironment[bodypart] \setupheadertexts [chapter][pagenumber][pagenumber][Content Example] \setuphead[chapter][page=mychapterpagebreak] \setuphead[chapter] [command=\MyChapterCommandM,textstyle=\ss\bf, header=empty,footer=empty,page=mychapterpagebreak, numbercommand=\ss\bf\em\tfd,after=\vskip 0.5in,before=\vskip 1.0in \placeinitial %comment out this line to eliminate drop capitals ] \stopsectionblockenvironment \startsectionblockenvironment[appendix] \setupsectionblock[appendix][page=appendicespagebreak] \stopsectionblockenvironment \starttext \startfrontmatter \setuppagenumbering[state=start,alternative=doublesided,conversion=romannume rals] Some random text to occupy front matter pages. \blank[medium] \input knuth \input knuth \input knuth \input knuth \input knuth \input knuth \input knuth \input knuth \input knuth \input knuth \input knuth \page[right] %\starthiding \setuphead[title] [command=\MyFrontMatterCommandM, number=no,textstyle=\ss\bf, header=empty,footer=pagenumber,page=mychapterpagebreak, numbercommand=\ss\bf\em\tfd,after=\vskip 0.5in \placeinitial %comment out this line to eliminate drop capitals ] \setupheadertexts [Contents][pagenumber][pagenumber][Contents] \title{Content} %\stophiding %\mycontenttitle{Content} %displays Contents but drops the TOC \placecontent[alternative=c] \blank[medium] Random text added to push TOC onto a second page to test page headers. \blank[medium] \input knuth \input knuth \input knuth \input knuth \setupheadertexts [chapter][pagenumber][pagenumber][Content Example] \setuphead[chapter] [command=\MyFrontMatterCommandM, number=no,textstyle=\ss\bf, header=empty,footer=pagenumber,page=mychapterpagebreak, numbercommand=\ss\bf\em\tfd,after=\vskip 0.5in \placeinitial %comment out this line to eliminate drop capitals ] \chapter{Preface} \input knuth \page[right] %switch from lower case Roman numberals to Arabic numbers \setuppagenumbering[state=start,alternative=doublesided,conversion=numbers] \setuppagenumber[state=start,number=1] \setuphead[chapter] [command=\MyChapterCommandM,textstyle=\ss\bf, header=empty,footer=pagenumber,page=mychapterpagebreak, numbercommand=\ss\bf\em\tfd,after=\vskip 0.5in,before=\vskip 1.0in \placeinitial %comment out this line to eliminate drop capitals ] \chapter{Introduction} \input knuth \input knuth \input knuth \input knuth \input knuth \input knuth \input knuth \input knuth \input knuth \input knuth \input knuth \stopfrontmatter \startbodymatter \chapter{Chapter One} \input knuth \input knuth \input knuth \input knuth \input knuth \input knuth \input knuth \input knuth \input knuth \input knuth \chapter{Chapter Two} \input knuth \stopbodymatter \startappendices \page[stop] \stopappendices \stoptext Tom Benjey 717-258-9733 voice 717-243-0074 fax Twitter: @TomBenjey ___________________________________________________________________________________ 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 ___________________________________________________________________________________