From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/28836 Path: news.gmane.org!not-for-mail From: "Mojca Miklavec" Newsgroups: gmane.comp.tex.context Subject: Re: Newbie questions Date: Sun, 25 Jun 2006 17:33:05 +0200 Message-ID: <6faad9f00606250833o4bbcd54am9ea50b8e27e66d5e@mail.gmail.com> References: 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 1151249605 3281 80.91.229.2 (25 Jun 2006 15:33:25 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 25 Jun 2006 15:33:25 +0000 (UTC) Original-X-From: ntg-context-bounces@ntg.nl Sun Jun 25 17:33:23 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 1FuWbu-0000Mm-DK for gctc-ntg-context-518@m.gmane.org; Sun, 25 Jun 2006 17:33:18 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 33DEC127A5; Sun, 25 Jun 2006 17:33:18 +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 19876-08; Sun, 25 Jun 2006 17:33:09 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 1F6601279C; Sun, 25 Jun 2006 17:33:09 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 7D2A71279C for ; Sun, 25 Jun 2006 17:33:07 +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 25362-03-2 for ; Sun, 25 Jun 2006 17:33:06 +0200 (CEST) Original-Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.174]) by ronja.ntg.nl (Postfix) with SMTP id 1C74312784 for ; Sun, 25 Jun 2006 17:33:05 +0200 (CEST) Original-Received: by ug-out-1314.google.com with SMTP id k40so723067ugc for ; Sun, 25 Jun 2006 08:33:05 -0700 (PDT) Original-Received: by 10.78.164.13 with SMTP id m13mr1779527hue; Sun, 25 Jun 2006 08:33:05 -0700 (PDT) Original-Received: by 10.78.72.12 with HTTP; Sun, 25 Jun 2006 08:33:05 -0700 (PDT) Original-To: "mailing list for ConTeXt users" In-Reply-To: Content-Disposition: inline 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:28836 Archived-At: On 6/24/06, Thomas Moore wrote: > 1. I have successfully set up a doublesided layout that has a text > column and an outer margin for margin notes and some small figures. I > would like to set up a header that has the chapter number and name > (e.g. "3. Third Chapter Name") on the inner edge of the text column, > and the page number aligned with the *outer* edge of the margin and a > 1-pt rule below the entire header (from below the chapter number to > below the page number). How would one do this elegantly (or even > inelegantly)? First forget about the wrong pagenumber positioning. Here's the most elegant solution for drawing the line: \setuppagenumbering [alternative=doublesided, location=] \setupheadertexts [pagenumber] [chapter] [chapter] [pagenumber] \setuplayout [header=15pt, headerdistance=20pt] \setupbackgrounds [header] [text] [bottomframe=on, rulethickness=1pt] \starttext \chapter{first} \dorecurse{50}{\input tufte } \chapter{second} \dorecurse{20}{\input tufte } \stoptext But I don't know if there's a simple extention to it to draw the missing line inbetween. Here's another solution, which is the wrong way of doing things (it's way too slow and meant for more complex things than a simple rule, but could be optimezed if "useMPgraphic" was replaced with "reusable" or "unique"). Also try \showlayout and see meta-pag.tex in the ConTeXt source. \startuseMPgraphic{PageFrame} StartPage ; y1=y2=PaperHeight-TopSpace-HeaderHeight; if OnRightPage : x2 = BackSpace+TextWidth = x1 + LeftMarginDistance + LeftMarginWidth + TextWidth; else: x2 = BackSpace = x1 - (RightMarginDistance + RightMarginWidth + TextWidth); fi; draw z1--z2 withpen pencircle scaled 1pt; StopPage; \stopuseMPgraphic \defineoverlay [PageFrame][\useMPgraphic{PageFrame}] \setupbackgrounds [page] [background=PageFrame] The trird solutions is probably the way to go, but it influences only a single page and \getmarking[chapter] has no influence. I guess that a minor modification is needed to handle both left & right page properly and to put that layer over all pages, not only on the first one: \definelayer [page] [width=\paperwidth, height=\paperheight] \setupbackgrounds [page] [background=page] \setlayerframed [page] [voffset=\topspace, hoffset=\the\dimexpr\backspace-\leftmarginwidth-\leftmargindistance\relax, preset=lefttop] [width=\the\dimexpr\textwidth+\leftmarginwidth+\leftmargindistance\relax, rulethickness=1pt, frame=off, bottomframe=on] {\pagenumber\hfill\getmarking[chapter][first]} Hoping that someone can fix at least one of the solutions above to work as intended, Mojca