From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/32615 Path: news.gmane.org!not-for-mail From: David Arnold Newsgroups: gmane.comp.tex.context Subject: Re: Header problem in project Date: Mon, 8 Jan 2007 12:30:00 -0800 Message-ID: References: <45A295A4.3060401@elvenkind.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v752.2) Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1168288419 18034 80.91.229.12 (8 Jan 2007 20:33:39 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 8 Jan 2007 20:33:39 +0000 (UTC) Original-X-From: ntg-context-bounces@ntg.nl Mon Jan 08 21:33:34 2007 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by lo.gmane.org with esmtp (Exim 4.50) id 1H41BN-0008SA-7e for gctc-ntg-context-518@m.gmane.org; Mon, 08 Jan 2007 21:33:25 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 7267E1FFF8; Mon, 8 Jan 2007 21:30:06 +0100 (CET) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 28064-03; Mon, 8 Jan 2007 21:30:05 +0100 (CET) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 342701FFCF; Mon, 8 Jan 2007 21:28:17 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id EEE0C1FFD1 for ; Mon, 8 Jan 2007 21:28:14 +0100 (CET) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 27473-07-5 for ; Mon, 8 Jan 2007 21:28:10 +0100 (CET) Original-Received: from fed1rmmtao05.cox.net (fed1rmmtao05.cox.net [68.230.241.34]) by ronja.ntg.nl (Postfix) with ESMTP id ECAAC1FFCE for ; Mon, 8 Jan 2007 21:28:09 +0100 (CET) Original-Received: from fed1rmimpo02.cox.net ([70.169.32.72]) by fed1rmmtao05.cox.net (InterMail vM.6.01.06.03 201-2131-130-104-20060516) with ESMTP id <20070108203126.IDAO15640.fed1rmmtao05.cox.net@fed1rmimpo02.cox.net> for ; Mon, 8 Jan 2007 15:31:26 -0500 Original-Received: from [10.0.1.2] ([75.111.18.179]) by fed1rmimpo02.cox.net with bizsmtp id 8kXf1W00T3row3P0000000; Mon, 08 Jan 2007 15:31:42 -0500 In-Reply-To: <45A295A4.3060401@elvenkind.com> Original-To: mailing list for ConTeXt users X-Mailer: Apple Mail (2.752.2) X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.7 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 X-Virus-Scanned: amavisd-new at ntg.nl Xref: news.gmane.org gmane.comp.tex.context:32615 Archived-At: Taco et all, From what I could deduce, our former macro for placeanswers was a group. \def\placeanswers{ \bgroup \doifmodeelse{short} { \keepblocks[shortsubanswer,longsubanswer] \answers{Answers}\vskip 1em\startcolumnset[answers] \selectblocks[shortanswer][criterium=section] \stopcolumnset } { \keepblocks[shortsubanswer,longsubanswer] \answers{Solutions}\vskip 1em \selectblocks[longanswer][criterium=section] } \egroup } It occurred at the end of an exercise set like this: %%% ENDTESTBANK %%%================================================ \stopquestions \placeanswers\kern0pt \stopcomponent So when the group was finished, the header for the component took over. Here is the fix I found. I just set new headers for the rest of the way. \def\placeanswers{\doifmode{long}{% \page[yes] \def\headermarkleft{{\sc Chapter \headnumber[chapter]}} \def\headermarkright{{\sc{}Section \headnumber[section]}} \setupheadertexts[][\headermarkright][\headermarkleft][]} \bgroup \doifmodeelse{short} { \keepblocks[shortsubanswer,longsubanswer] \answers{Answers}\vskip 1em\startcolumnset[answers] \selectblocks[shortanswer][criterium=section] \stopcolumnset } { \keepblocks[shortsubanswer,longsubanswer] \answers{Solutions}\vskip 1em \selectblocks[longanswer][criterium=section] } \egroup } So now when we compile with: texmfstart texexec --mode=long,paging section1exercise We get what we want, which is no page numbers in the headers once the solutions start. You can see the result at: http://msenux.redwoods.edu/IntAlgText2/chapter2/section1solutions.pdf We have a paging mode and a perl script that syncs the page numbers at the beginning of this document with the chapter page numbers. Thanks. On Jan 8, 2007, at 11:04 AM, Taco Hoekwater wrote: > David Arnold wrote: >> >> \placeanswers\kern0pt >> >> \stopcomponent >> >> When we compile section1exercises.tex with texmfstart texexec -- >> mode=long section1exercises, all is well until the last page, where >> the former header is used instead of the header defined in the >> \placeanswers macro. But we want to finish out the document from the >> point we put the \placeanswers with the second header. >> >> Any suggestions? > > Does ending with \placeanswers\page help? > > Taco > _______________________________________________ > ntg-context mailing list > ntg-context@ntg.nl > http://www.ntg.nl/mailman/listinfo/ntg-context