From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/28990 Path: news.gmane.org!not-for-mail From: Thomas Moore Newsgroups: gmane.comp.tex.context Subject: Re: Newbie questions Date: Wed, 28 Jun 2006 17:33:23 -0700 Message-ID: References: <6faad9f00606250833o4bbcd54am9ea50b8e27e66d5e@mail.gmail.com> <449EBFB5.2070100@wxs.nl> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 (Apple Message framework v750) Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1151541208 6599 80.91.229.2 (29 Jun 2006 00:33:28 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 29 Jun 2006 00:33:28 +0000 (UTC) Original-X-From: ntg-context-bounces@ntg.nl Thu Jun 29 02:33:21 2006 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 ciao.gmane.org with esmtp (Exim 4.43) id 1FvkTA-0007bd-GP for gctc-ntg-context-518@m.gmane.org; Thu, 29 Jun 2006 02:33:20 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id C683112897; Thu, 29 Jun 2006 02:33:19 +0200 (CEST) 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 07224-06; Thu, 29 Jun 2006 02:33:12 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 3CA8E12887; Thu, 29 Jun 2006 02:33:12 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 866A412887 for ; Thu, 29 Jun 2006 02:33:10 +0200 (CEST) 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 07248-09-2 for ; Thu, 29 Jun 2006 02:33:06 +0200 (CEST) Original-Received: from iron1.pomona.edu (iron1.pomona.edu [134.173.71.136]) by ronja.ntg.nl (Postfix) with SMTP id 0CD6B12864 for ; Thu, 29 Jun 2006 02:33:05 +0200 (CEST) Original-Received: from exchange2.campus.pomona.edu (HELO EVSSTUDENT.campus.pomona.edu) ([134.173.71.129]) by iron1.pomona.edu with ESMTP; 28 Jun 2006 17:33:04 -0700 X-IronPort-AV: i="4.06,190,1149490800"; d="scan'208"; a="2284430:sNHT21479864" Original-Received: from frontend1.campus.pomona.edu ([134.173.71.134]) by EVSSTUDENT.campus.pomona.edu with Microsoft SMTPSVC(6.0.3790.211); Wed, 28 Jun 2006 17:33:11 -0700 Original-Received: from [134.173.84.18] ([134.173.84.18]) by frontend1.campus.pomona.edu with Microsoft SMTPSVC(6.0.3790.211); Wed, 28 Jun 2006 17:32:54 -0700 In-Reply-To: Original-To: mailing list for ConTeXt users X-Mailer: Apple Mail (2.750) X-OriginalArrivalTime: 29 Jun 2006 00:32:54.0787 (UTC) FILETIME=[8FEB1530:01C69B13] 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:28990 Archived-At: Dear ConTeXt gurus: OK, I have gotten some off-list help from Mojca, who has answered most of my questions and helped me polish the two page version of my code (thanks, Mojca!). I have included what he helped me work out below. There is one remaining problem. The first page is correct, but very subsequent page has a correct-looking header and another superimposed. The second superimposed header is not wide enough and has the wrong page number (the number of the previous page), though the page number is on the correct side. It is as if the page output command from TeX is issuing the \setups command *twice*, once before fully updating variables like \rightmarginwidth and the page number, and once after setups have been done correctly. Is this a bug, or am I doing something stupid? Thanks for any insight, Tom Code follows: \usemodule[amsl] \usemodule[newmat] \setuppapersize[letter] \setuppagenumbering [alternative=doublesided] \setuplayout [backspace=1.0in, topspace=0.5in, width=4.5in, height=9.5in, rightmargin=2.35in, rightmargindistance=0.15in, leftmargin=0in, leftmargindistance=0in, header=0.5 in, footer=0in] \definelayer [leftpage] [hoffset=\the\dimexpr\cutspace-\leftmarginwidth-\leftmargindistance \relax, % for left pages voffset=\topspace, width=\paperwidth, height=\paperheight] \definelayer [rightpage] [hoffset=\the\dimexpr\backspace\relax, % for right pages voffset=\topspace, width=\paperwidth, height=\paperheight] \setupbackgrounds [leftpage] [background=leftpage] \setupbackgrounds [rightpage] [background=rightpage] \startsetups page:setup \setlayerframed [leftpage] [preset=lefttop] [width=\dimexpr\textwidth+\leftmarginwidth+\leftmargindistance \relax, % for left pages rulethickness=1pt, frame=off, bottomframe=on] {\pagenumber\hfill\getmarking[chapter][first]} % for left pages \setlayerframed [rightpage] [preset=lefttop] [width=\dimexpr\textwidth+\rightmarginwidth+\rightmargindistance \relax, % for right pages rulethickness=1pt, frame=off, bottomframe=on] {\getmarking[chapter][first]\hfill\pagenumber} % for right pages \stopsetups \setupheadertexts [\setups{page:setup}] \starttext \chapter{Test} This is a test of some math stuff. $0 = g_{\mu\nu}dx^\nu dx^\nu$. \dorecurse{10}{\input knuth} \showlayout \stoptext