From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/28960 Path: news.gmane.org!not-for-mail From: Thomas Moore Newsgroups: gmane.comp.tex.context Subject: Re: Newbie questions Date: Wed, 28 Jun 2006 11:36:39 -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 1151519861 599 80.91.229.2 (28 Jun 2006 18:37:41 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 28 Jun 2006 18:37:41 +0000 (UTC) Original-X-From: ntg-context-bounces@ntg.nl Wed Jun 28 20:37:32 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 1FveuE-0006cx-J9 for gctc-ntg-context-518@m.gmane.org; Wed, 28 Jun 2006 20:36:55 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 5D6DF12892; Wed, 28 Jun 2006 20:36:54 +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 20618-01-3; Wed, 28 Jun 2006 20:36:43 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id AC80B1287B; Wed, 28 Jun 2006 20:36:42 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id D172C1287B for ; Wed, 28 Jun 2006 20:36:38 +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 20618-01-2 for ; Wed, 28 Jun 2006 20:36:31 +0200 (CEST) Original-Received: from iron1.pomona.edu (iron1.pomona.edu [134.173.71.136]) by ronja.ntg.nl (Postfix) with SMTP id 933C512873 for ; Wed, 28 Jun 2006 20:36:29 +0200 (CEST) Original-Received: from exchange1.campus.pomona.edu (HELO mail.pomona.edu) ([134.173.71.128]) by iron1.pomona.edu with ESMTP; 28 Jun 2006 11:36:20 -0700 X-IronPort-AV: i="4.06,189,1149490800"; d="scan'208"; a="2257855:sNHT24336732" Original-Received: from frontend1.campus.pomona.edu ([134.173.71.134]) by mail.pomona.edu with Microsoft SMTPSVC(6.0.3790.211); Wed, 28 Jun 2006 11:36:10 -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 11:36:10 -0700 In-Reply-To: <449EBFB5.2070100@wxs.nl> Original-To: mailing list for ConTeXt users X-Mailer: Apple Mail (2.750) X-OriginalArrivalTime: 28 Jun 2006 18:36:10.0548 (UTC) FILETIME=[B9FF6740:01C69AE1] 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:28960 Archived-At: On Jun 25, 2006, at 9:54 AM, Hans Hagen wrote: > Mojca Miklavec wrote: >> >> ....Hoping that someone can fix at least one of the solutions >> above to >> work as intended, >> > > ok, here is a trick: .... > now, the left right page problem is up to you ... keep in mind that > we have > > \setupbackgrounds > [leftpage] > [...] > > \setupbackgrounds > [rightpage] > [...] Thanks, Mojca, for your ideas! Special thanks to Hans, whose solution seemed efficient and worked like a charm (after I made one minor fix). I have attached to the end of this message code that works well on *either* right pages *or* left pages. Now I'd like to extend the code so that it would work on *both* kinds of pages. But my experimentation has raised the following questions: 1. When I change the \setupbackgrounds [page][background=thepage] in the code shown below to \setupbackgrounds [rightpage] [background=thepage], I expected that the left page would have no header and the right page would have the appropriate header. However, when I do this, I get two superimposed headers with different lengths on right pages (and nothing, as expected, on left pages). Why do I get *two* headers on the right page? 2. I also do not understand \startsetups command, which I could not find in the ConTexT manual or in the online summary of ConTexT commands. It looks like the purpose of this command is to put a wrapper around the \setlayerframed command so that it can be used in the \setupheadertexts command. Is this right? Also: a. I guess that I don't understand why the \setlayerframed command could not be used directly in the \setupheadertexts command: why do we need the wrapper? b. And why this particular wrapping command? (\startfoo ... \stopfoo doesn't work.) c. Also, I am assuming that the colon is simply part of the name assigned to this setup and has no other significance: is this right? 3. So, my guess (once problem 1 is fixed), is that I will define *two* layers (one for right pages and one for left pages), and do a \setupbackground [rightpage][background=therightpage] and a \setupbackground[leftpage][background=theleftpage]. But I don't know what to do inside the \startsetup ... \stopsetup. Do I have a pair of \setlayerframed statements? Do I surround this pair with something like an if onRightPage ... if onLeftPage statement? Or do I put the if-then statements *inside* the \setlayerframed statement? Thanks for any help... 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 [thepage] %[hoffset=\the\dimexpr\cutspace-\leftmarginwidth- \leftmargindistance\relax, % for left pages [hoffset=\the\dimexpr\backspace\relax, % for right pages voffset=\topspace, width=\paperwidth, height=\paperheight] \setupbackgrounds [page] [background=thepage] \startsetups page:setup \setlayerframed [thepage] [preset=lefttop] % [width=\dimexpr\textwidth+\leftmarginwidth+\leftmargindistance \relax, % for left pages [width=\dimexpr\textwidth+\rightmarginwidth+\rightmargindistance \relax, % for right pages rulethickness=1pt, frame=off, bottomframe=on] % {\pagenumber\hfill\getmarking[chapter][first]} % for left pages {\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