From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/36939 Path: news.gmane.org!not-for-mail From: Peter Rolf Newsgroups: gmane.comp.tex.context Subject: Re: need help with creating a grid with context Date: Wed, 10 Oct 2007 10:54:19 +0200 Message-ID: <470C933B.1060308@gmx.net> References: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1192006492 20994 80.91.229.12 (10 Oct 2007 08:54:52 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 10 Oct 2007 08:54:52 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Wed Oct 10 10:54:50 2007 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 lo.gmane.org with esmtp (Exim 4.50) id 1IfXL6-0005Uo-SM for gctc-ntg-context-518@m.gmane.org; Wed, 10 Oct 2007 10:54:48 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 190D81FBF9; Wed, 10 Oct 2007 10:54:42 +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 25400-04-4; Wed, 10 Oct 2007 10:54:35 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id EF1D21FB31; Wed, 10 Oct 2007 10:54:34 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 728971FAB6 for ; Wed, 10 Oct 2007 10:54:27 +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 25400-04-3 for ; Wed, 10 Oct 2007 10:54:20 +0200 (CEST) Original-Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by ronja.ntg.nl (Postfix) with SMTP id 601541FAAE for ; Wed, 10 Oct 2007 10:54:20 +0200 (CEST) Original-Received: (qmail invoked by alias); 10 Oct 2007 08:54:19 -0000 Original-Received: from i577ACEF9.versanet.de (EHLO [192.168.1.3]) [87.122.206.249] by mail.gmx.net (mp041) with SMTP; 10 Oct 2007 10:54:19 +0200 X-Authenticated: #24293357 X-Provags-ID: V01U2FsdGVkX1/Wrod9lpTWgohIVsofm+E4duo9CiJobWSsj+QWD8 E3bibFq1arlIMq User-Agent: Thunderbird 2.0.0.6 (Windows/20070728) In-Reply-To: X-Enigmail-Version: 0.95.3 X-Y-GMX-Trusted: 0 X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.9 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:36939 Archived-At: Hi Peter, MASON Peter J schrieb: > I'm trying to layout a grid of bullets. The results isn't the expected > one. Perhaps someone could offer help here? Thanks. > > Here's the sort of thing I'm doing .... > > \setuplayout[leftmargin=0pt, leftmargindistance=0pt, backspace=0pt, > rightmargin=0pt, rightmargindistance=0pt, cutspace=0pt, width=middle, > topspace=0pt, header=0pt, headerdistance=0pt, footer=0pt, > footerdistance=0pt, bottomspace=0pt, height=middle] > > %\showlayout > > \starttext > \setuppositioning[unit=cm] > \startpositioning > \newcount\Row > > \Row = 0 > \loop > { ^^ > \newcount\Col > ^^ > \Col = 0 > \loop > \position(\Col, \Row) {$\bullet$} > \ifnum\Col < 14 > \advance\Col by 1 > \repeat > } ^^ > \ifnum\Row < 36 > \advance\Row by 1 > \repeat > \stoppositioning > \stoptext > You introduce "spurious spaces" (line break sometimes adds a space) in you loops. See http://tug.ctan.org/tex-archive/info/texbytopic/ if you want to learn more about it. \starttext \setuppositioning[unit=cm] \startpositioning \newcount\Row \newcount\Col \Row=0 \dorecurse{36} {\Col=0 \dorecurse{14} {\position(\Col,\Row){$\bullet$} \advance\Col by 1 }% \advance\Row by 1 } \stoppositioning \stoptext Remove the comment sign behind the inner loop and see what happens. Also see http://wiki.contextgarden.net/System_Macros/Loops_and_Recursion for the nicer ConTeXt loop macros. Best wishes, Peter > > > Before printing, please consider the environment. > > IMPORTANT NOTICE: This e-mail and any attachment to it are intended only > to be read or used by the named addressee. It is confidential and may > contain legally privileged information. No confidentiality or privilege > is waived or lost by any mistaken transmission to you. The RTA is not > responsible for any unauthorised alterations to this e-mail or > attachment to it. Views expressed in this message are those of the > individual sender, and are not necessarily the views of the RTA. If you > receive this e-mail in error, please immediately delete it from your > system and notify the sender. You must not disclose, copy or use any > part of this e-mail if you are not the intended recipient. > > > > > ------------------------------------------------------------------------ > > ___________________________________________________________________________________ > If your question is of interest to others as well, please add an entry to the Wiki! > > maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context > webpage : http://www.pragma-ade.nl / http://tex.aanhet.net > archive : https://foundry.supelec.fr/projects/contextrev/ > wiki : http://contextgarden.net > ___________________________________________________________________________________ ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________