From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/14537 Path: main.gmane.org!not-for-mail From: Hans Hagen Newsgroups: gmane.comp.tex.context Subject: Re: typearea Date: Thu, 15 Jan 2004 11:23:35 +0100 Sender: ntg-context-admin@ntg.nl Message-ID: <6.0.1.1.2.20040115110819.0331eec0@server-1> References: Reply-To: ntg-context@ntg.nl NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1"; format=flowed Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1074162389 27340 80.91.224.253 (15 Jan 2004 10:26:29 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 15 Jan 2004 10:26:29 +0000 (UTC) Original-X-From: ntg-context-admin@ntg.nl Thu Jan 15 11:26:19 2004 Return-path: Original-Received: from ref.vet.uu.nl ([131.211.172.13] helo=ref.ntg.nl) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1Ah4hf-0005rr-00 for ; Thu, 15 Jan 2004 11:26:19 +0100 Original-Received: from ref.ntg.nl (localhost.localdomain [127.0.0.1]) by ref.ntg.nl (Postfix) with ESMTP id 4E61510B31; Thu, 15 Jan 2004 11:25:31 +0100 (MET) Original-Received: from mail.solcon.net (mail.solcon.net [212.45.33.5]) by ref.ntg.nl (Postfix) with ESMTP id 6838410B21 for ; Thu, 15 Jan 2004 11:24:07 +0100 (MET) Original-Received: from server-1.pragma-net.nl (dsl-212-84-128-085.solcon.nl [212.84.128.85]) by mail.solcon.net (8.11.6/8.9.3) with ESMTP id i0FAOku06625 for ; Thu, 15 Jan 2004 11:24:46 +0100 Original-Received: by server-1.pragma-net.nl (Postfix, from userid 65534) id C356D17B14; Thu, 15 Jan 2004 11:24:49 +0100 (CET) Original-Received: from laptop-3.wxs.nl (unknown [10.100.1.191]) by server-1.pragma-net.nl (Postfix) with ESMTP id 1823F17B47 for ; Thu, 15 Jan 2004 10:24:44 +0000 (UTC) X-Sender: hagen-mail@server-1 X-Mailer: QUALCOMM Windows Eudora Version 6.0.1.1 Original-To: ntg-context@ntg.nl In-Reply-To: Original-References: Errors-To: ntg-context-admin@ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.0.13 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.comp.tex.context:14537 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:14537 At 19:33 14/01/2004, you wrote: >On Sun, 11 Jan 2004, Peter M=FCnster wrote: > > > %%%%%% Here is the problem: dividing one length by another. %%%%%% [code skipped] Some days ago Willy Egger sent me a translation/summary of this koma page=20 size adventure. Since I opt for a more contexty solution i want to follow a stepwise=20 approach in getting this done. As a start: (1) the ratio: this is the most efficient and (on average) accurate=20 solution that also handles large paper sizes: %edef\layoutratio{\withoutpt{\the\dimexpr(8\paperheight/\dimexpr(\paperwidth= /=20 8192))}} %edef\layoutratio{\withoutpt{\the\dimexpr(4\paperheight/\dimexpr(\paperwidth= /16384))}} %edef\layoutratio{\withoutpt{\the\dimexpr(2\paperheight/\dimexpr(\paperwidth= /32768))}} \edef\layoutratio{\withoutpt{\the\dimexpr(2\paperheight/(\paperwidth/32768))= }} (2) for the moment this way, will be handled slightly different (because in= =20 context we can mix layouts and layouts can be dynamic \def\layoutwidth {10cm} \unprotected \def\layouthfheight {\dimexpr(\layoutparameter\c!hoofd+\layoutparameter\c!hoofdafstand+ \layoutparameter\c!voet +\layoutparameter\c!voetafstand )} \def\layoutheight {\dimexpr(\layoutratio\dimexpr(\layoutwidth)+\layouthfheight)} (3) this brings us: \definelayout [koma] % actually i want a better name since it's one of a set of=20 calculations [backspace=3D\dimexpr((\paperwidth-\layoutwidth)/2), width=3Dmiddle, % less rounding errors than \layoutwidth, cutspace=3D\dimexpr((\paperwidth-\layoutwidth)/2), header=3D2\lineheight, headerdistance=3D\lineheight, height=3Dmiddle, % less rounding errors than \layoutheight footerdistance=3D\lineheight, footer=3D2\lineheight, = topspace=3D\dimexpr(1\dimexpr(\paperheight-(\layoutheight+\layouthfheight))= /3), = bottomspace=3D\dimexpr(2\dimexpr(\paperheight-(\layoutheight+\layouthfheigh= t))/3)] \setuplayout [koma] (4) the 'number of chars per line' .. i'll come back to that Hans