From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/14408 Path: main.gmane.org!not-for-mail From: Hans Hagen Newsgroups: gmane.comp.tex.context Subject: Re: Draw grid Date: Sat, 03 Jan 2004 22:13:52 +0100 Sender: ntg-context-admin@ntg.nl Message-ID: <6.0.1.1.2.20040103221155.01e76ec0@localhost> References: <3.0.5.32.20040102103448.00984d20@mail.northcoast.com> Reply-To: ntg-context@ntg.nl NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-Trace: sea.gmane.org 1073249680 10486 80.91.224.253 (4 Jan 2004 20:54:40 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 4 Jan 2004 20:54:40 +0000 (UTC) Cc: ntg-context@ntg.nl Original-X-From: ntg-context-admin@ntg.nl Sun Jan 04 21:54:37 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 1AdFGf-0007qu-00 for ; Sun, 04 Jan 2004 21:54:37 +0100 Original-Received: from ref.ntg.nl (localhost.localdomain [127.0.0.1]) by ref.ntg.nl (Postfix) with ESMTP id AE84510B50; Sun, 4 Jan 2004 21:54:03 +0100 (MET) Original-Received: from mail.solcon.net (mail.solcon.net [212.45.33.5]) by ref.ntg.nl (Postfix) with ESMTP id D07CC10B3C for ; Sun, 4 Jan 2004 21:52:09 +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 i04KqMp07535; Sun, 4 Jan 2004 21:52:22 +0100 Original-Received: by server-1.pragma-net.nl (Postfix, from userid 65534) id 4E6F92E94C; Sun, 4 Jan 2004 21:52:31 +0100 (CET) Original-Received: from laptop-3.wxs.nl (unknown [10.100.1.1]) by server-1.pragma-net.nl (Postfix) with ESMTP id 189B917FD2; Sun, 4 Jan 2004 20:52:29 +0000 (UTC) X-Sender: hagen-mail@localhost X-Mailer: QUALCOMM Windows Eudora Version 6.0.1.1 Original-To: David Arnold In-Reply-To: <3.0.5.32.20040102103448.00984d20@mail.northcoast.com> Original-References: <3.0.5.32.20040102103448.00984d20@mail.northcoast.com> 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:14408 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:14408 Hi David, I added to mp-tool: % showgrid(-5,10,1cm,-10,10,1cm); def showgrid (expr MinX, MaxX, DeltaX, MinY, MaxY, DeltaY)= begingroup save defaultfont, defaultscale, size ; string defaultfont ; defaultfont := "cmtt10"; % i.e. infofont numeric defaultscale ; defaultscale := 8pt / fontsize defaultfont; numeric size ; size := 2pt ; for x=MinX upto MaxX : for y=MinY upto MaxY : draw (x*DeltaX, y*DeltaY) withpen pencircle scaled if (x mod 5 = 0) and (y mod 5 = 0) : 1.5size withcolor .50white else : size withcolor .75white fi ; endfor ; endfor ; for x=MinX upto MaxX: label.bot(decimal x, (x*DeltaX,-size)); endfor ; for y=MinY upto MaxY: label.lft(decimal y, (-size,y*DeltaY)) ; endfor ; endgroup enddef; I also send you a supp-pdf that does not fail on you example (peculiar sequence of settings catched) Hans