From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/16947 Path: main.gmane.org!not-for-mail From: Newsgroups: gmane.comp.tex.context Subject: RE: \setuplayout --- what do parameters mean? Date: Thu, 4 Nov 2004 11:59:43 +0100 Message-ID: References: <3.0.5.32.20041103184329.007fd9a0@mail.northcoast.com> Reply-To: jimarin@bayesinf.com, mailing list for ConTeXt users NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1099565991 21373 80.91.229.6 (4 Nov 2004 10:59:51 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 4 Nov 2004 10:59:51 +0000 (UTC) Original-X-From: ntg-context-bounces@ntg.nl Thu Nov 04 11:59:33 2004 Return-path: Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CPfL3-0002xS-00 for ; Thu, 04 Nov 2004 11:59:33 +0100 Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 15CD812784; Thu, 4 Nov 2004 11:59:32 +0100 (CET) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (ronja.vet.uu.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 06082-01; Thu, 4 Nov 2004 11:59:27 +0100 (CET) Original-Received: from ronja.vet.uu.nl (localhost.localdomain [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 4A63712775; Thu, 4 Nov 2004 11:59:27 +0100 (CET) Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 2E2C012775 for ; Thu, 4 Nov 2004 11:59:25 +0100 (CET) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (ronja.vet.uu.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 06070-02 for ; Thu, 4 Nov 2004 11:59:24 +0100 (CET) Original-Received: from proxy.bitmailer.com (unknown [195.16.159.8]) by ronja.ntg.nl (Postfix) with ESMTP id 844C11276D for ; Thu, 4 Nov 2004 11:59:24 +0100 (CET) Original-Received: from sraffa (200-205-95-10.customer.tdatabrasil.net.br [200.205.95.10]) by proxy.bitmailer.com (Postfix) with ESMTP id 8AB2310B4F1 for ; Thu, 4 Nov 2004 11:59:22 +0100 (CET) Original-To: "mailing list for ConTeXt users" X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0) In-Reply-To: <3.0.5.32.20041103184329.007fd9a0@mail.northcoast.com> Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 X-Virus-Scanned: by amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.5 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: by amavisd-new at ntg.nl Xref: main.gmane.org gmane.comp.tex.context:16947 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:16947 Hi David, I use the following code...which I borrowed and adapted from someone else (I think it was from Patrick Gundlach's http://levana.de/context/) to explore graphically the meanings of the parameters of \setuplayout. I used it when developing my own style for presentations...I am aware it may not be perfect but I hope it does help you Greetings Jose Ignacio Marin The code (the unknown commands like \Location \Style etc... are for you to substitute with values you want) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \setuplayout [ location=\Location, style=\Style, marking=\Marking, scale=\Scale, nx=\Nx, ny=\Ny, dx=\Dx, dy=\Dy, lines=\Lines, grid=\Grid, bottomspace=\BottomSpace, cutspace=\CutSpace, horoffset=\HorOffset, veroffset=\VerOffset, backspace=\BackSpace, leftmargin=\LeftMargin, leftmargindistance=\LeftMarginDistance, width=\Width, rightmargin=\LeftMargin, rightmargindistance=\LeftMarginDistance, topspace=\TopSpace, header=\Header, headerdistance=\HeaderDistance, height=\Height, footerdistance=\FooterDistance, footer=\Footer, paperwidth=\PaperWidth, paperheight=\PaperHeight, leftedge=\LeftEdge, leftedgedistance=\LeftEdgeDistance, rightedge=\RightEdge, rightedgedistance=\RightEdgeDistance, top=\Top, topdistance=\TopDistance, bottom=\Bottom, bottomdistance=\BottomDistance ] % PAGE TEST \startreusableMPgraphic{TestPage} StartPage; path p; fill Page withcolor .95white; % backspace and topspace p:= ulcorner Page -- llcorner Page -- llcorner Page shifted (BackSpace,0) -- ulcorner Page shifted (BackSpace,0) -- cycle; fill p withcolor transparent(1,0.5,green); p:= ulcorner Page -- urcorner Page -- urcorner Page shifted (0,-TopSpace) -- ulcorner Page shifted (0,-TopSpace) -- cycle; fill p withcolor transparent(1,0.5,blue); % a red bottom... p:= (Hstep[LeftEdge], Vstep[Bottom]) -- (Hstep[RightEdge],Vstep[Bottom]) -- (Hstep[RightEdge],Vstep[Bottom]+Vsize[Bottom]) -- (Hstep[LeftEdge], Vstep[Bottom]+Vsize[Bottom]) -- cycle; fill p withcolor transparent(1,0.5,red); % leftmargin and rightmargin p:= (Hstep[LeftMargin], Vstep[Text])-- (Hstep[LeftMargin] + Hsize[LeftMargin],Vstep[Text]) -- (Hstep[LeftMargin] + Hsize[LeftMargin],Vstep[Text]+Vsize[Text])-- (Hstep[LeftMargin], Vstep[Text]+Vsize[Text])-- cycle; draw p withpen pencircle scaled .5mm withcolor blue dashed evenly; p:= (Hstep[RightMargin], Vstep[Text])-- (Hstep[RightMargin] + Hsize[RightMargin],Vstep[Text]) -- (Hstep[RightMargin] + Hsize[RightMargin],Vstep[Text]+Vsize[Text])-- (Hstep[RightMargin], Vstep[Text]+Vsize[Text])-- cycle; draw p withpen pencircle scaled .5mm withcolor blue dashed evenly; % leftedge and rightedge p:= (Hstep[LeftEdge], Vstep[Text])-- (Hstep[LeftEdge] + Hsize[LeftEdge],Vstep[Text]) -- (Hstep[LeftEdge] + Hsize[LeftEdge],Vstep[Text]+Vsize[Text])-- (Hstep[LeftEdge], Vstep[Text]+Vsize[Text])-- cycle; draw p withpen pencircle scaled .5mm withcolor red dashed evenly; p:= (Hstep[RightEdge], Vstep[Text])-- (Hstep[RightEdge] + Hsize[RightEdge],Vstep[Text]) -- (Hstep[RightEdge] + Hsize[RightEdge],Vstep[Text]+Vsize[Text])-- (Hstep[RightEdge], Vstep[Text]+Vsize[Text])-- cycle; draw p withpen pencircle scaled .5mm withcolor red dashed evenly; % let's draw the header (notice that Vsize[Header] and HeaderHeight % are the same!) p:= (BackSpace, Vstep[Header]) -- (BackSpace+MakeupWidth, Vstep[Header]) -- (BackSpace+MakeupWidth, Vstep[Header]+Vsize[Header]) -- (BackSpace, Vstep[Header]+HeaderHeight) -- cycle ; draw p withpen pencircle scaled .5mm withcolor blue dashed evenly; % and now for the footer p:= (BackSpace, Vstep[Footer]) -- (BackSpace+MakeupWidth, Vstep[Footer]) -- (BackSpace+MakeupWidth, Vstep[Footer]+FooterHeight) -- (BackSpace, Vstep[Footer]+FooterHeight) -- cycle ; draw p withpen pencircle scaled .5mm withcolor blue dashed evenly; % And now for something completely different :) drawoptions (withcolor transparent (1,0.9,yellow) withpen pencircle scaled .3mm); draw Field [Text][Top]; draw Field [Text][Header]; draw Field [Text][Text]; draw Field [Text][Footer]; % Field[][] = Area[][] shifted Location[][] draw Area [Text][Bottom] shifted Location [Text][Bottom]; % needed, since LeftMargin+LeftMarginDistance > BackSpace setbounds currentpicture to boundingbox Page; \stopreusableMPgraphic \startbuffer[TestPage] \reuseMPgraphic{TestPage} \stopbuffer \startMPpage StartPage ; \stopMPpage %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -----Mensaje original----- De: ntg-context-bounces@ntg.nl [mailto:ntg-context-bounces@ntg.nl]En nombre de David Arnold Enviado el: jueves, 04 de noviembre de 2004 3:43 Para: ntg-context@ntg.nl Asunto: [NTG-context] \setuplayout --- what do parameters mean? All, When I see something like this: \setuplayout [topspace=10pt, header=40pt, headerdistance=20pt, height=middle, footerdistance=20pt, footer=0pt, bottomdistance=10pt, bottom=20pt, bottomspace=40pt, backspace=30pt, width=middle] I have a hard time working out what it means. I know I can do \showframe, but that doesn't indicate everything I need to see. Does anyone have a macro that shows ALL of these parameters in a visual way, similar to that on page 182 of the Latex User Guide, 2nd ed., Lamport? _______________________________________________ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context