From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/28991 Path: news.gmane.org!not-for-mail From: Aditya Mahajan Newsgroups: gmane.comp.tex.context Subject: Re: Newbie questions Date: Wed, 28 Jun 2006 21:12:55 -0400 (EDT) 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 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1151543606 12302 80.91.229.2 (29 Jun 2006 01:13:26 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 29 Jun 2006 01:13:26 +0000 (UTC) Original-X-From: ntg-context-bounces@ntg.nl Thu Jun 29 03:13:22 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 1Fvl5m-0000WX-MF for gctc-ntg-context-518@m.gmane.org; Thu, 29 Jun 2006 03:13:14 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 846AA12896; Thu, 29 Jun 2006 03:13:14 +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 08102-01; Thu, 29 Jun 2006 03:13:08 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 340911288F; Thu, 29 Jun 2006 03:13:08 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 8BFD71288F for ; Thu, 29 Jun 2006 03:13:05 +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 08101-01 for ; Thu, 29 Jun 2006 03:13:01 +0200 (CEST) Original-Received: from tombraider.mr.itd.umich.edu (smtp.mail.umich.edu [141.211.93.161]) by ronja.ntg.nl (Postfix) with SMTP id 5B2E41288C for ; Thu, 29 Jun 2006 03:13:00 +0200 (CEST) Original-Received: FROM aditya.annarb01.mi.comcast.net (c-68-40-50-205.hsd1.mi.comcast.net [68.40.50.205]) BY tombraider.mr.itd.umich.edu ID 44A3291A.CFC37.18082 ; 28 Jun 2006 21:12:58 -0400 Original-To: mailing list for ConTeXt users In-Reply-To: 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:28991 Archived-At: On Wed, 28 Jun 2006, Thomas Moore wrote: > Dear ConTeXt gurus: I am not a context guru, but will still give it a shot ;) > 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 I am not sure what about the exact layout you are trying to achieve. Does this give you what you want. \setuppapersize[letter] \setuppagenumbering [alternative=doublesided,location=] \setuplayout [backspace=1.0in, topspace=0.5in, width=4.5in, height=9.5in, rightmargin=2.35in, rightmargindistance=0.15in, leftmargin=0in, leftmargindistance=0in, header=\normallineheight, headerdistance=\dimexpr0.5in-\normallineheight, footer=0in] \setupheadertexts[chapter][pagenumber][pagenumber][chapter] \setupbackgrounds[header][text][bottomframe=on,rulethickness=1pt] \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 Aditya > 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 > _______________________________________________ > ntg-context mailing list > ntg-context@ntg.nl > http://www.ntg.nl/mailman/listinfo/ntg-context > > > -- Aditya Mahajan, EECS Systems, University of Michigan http://www.eecs.umich.edu/~adityam || Ph: 7342624008