From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/83955 Path: news.gmane.org!not-for-mail From: Wolfgang Schuster Newsgroups: gmane.comp.tex.context Subject: Re: left bracket in string.format() Date: Mon, 26 Aug 2013 17:40:53 +0200 Message-ID: <21CFE584-BFD9-4215-8760-4BDC07D5E071@gmail.com> References: <521B6DC0.5080907@gmx.net> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 (Mac OS X Mail 6.5 \(1508\)) Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1377531674 20705 80.91.229.3 (26 Aug 2013 15:41:14 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 26 Aug 2013 15:41:14 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Mon Aug 26 17:41:18 2013 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([5.39.185.229]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1VDyur-00036s-Dq for gctc-ntg-context-518@m.gmane.org; Mon, 26 Aug 2013 17:41:17 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 9EC6410201; Mon, 26 Aug 2013 17:40:00 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 1Ttf1qQ4GK4J; Mon, 26 Aug 2013 17:39:49 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id 644E8101F7; Mon, 26 Aug 2013 17:39:49 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id F2CB9101F7 for ; Mon, 26 Aug 2013 17:39:47 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id ga8YLYKBFjQh for ; Mon, 26 Aug 2013 17:39:37 +0200 (CEST) Original-Received: from filter3-ams.mf.surf.net (filter3-ams.mf.surf.net [192.87.102.71]) by balder.ntg.nl (Postfix) with ESMTP id 26082101F5 for ; Mon, 26 Aug 2013 17:39:37 +0200 (CEST) Original-Received: from mail-ee0-x234.google.com (mail-ee0-x234.google.com [IPv6:2a00:1450:4013:c00::234]) by filter3-ams.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id r7QFeqCJ013275 for ; Mon, 26 Aug 2013 17:40:52 +0200 Original-Received: by mail-ee0-f52.google.com with SMTP id c41so1711079eek.11 for ; Mon, 26 Aug 2013 08:40:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to; bh=P2XXk4kdZhGyP8WlFOwhoGFnIkDhjJFE33na1JcgsnU=; b=bKT5o9lg0nDxFRBhoGpmwHBtprrJMolSVxy1GR9lEjGZW6jWHK4aALqPQMZJ52YvN7 o1Ay+Xv/WA6ha19CMhkK4m+qeMigyrMB8WuHjtXo3lIz5n6MdAU55fRuxEphs332wi65 HJXiTRwpx7+944z2heVblNVXyMX7xvMorhlSJr4yrG2J2nCQE3Gv1IXoYug/IaYQD3gs 7R3YdThwbumSiwpTj9LBhDgiLYkxcAok0iDjTiAoB9RNgS452ml7E837wgrRjwuExPd6 B9/E00F+LoSGPLKZD9iOcXjM/qv+EJDsRm6xdV2K/E+u6PwRQ6lj7jMOymXsWVSMvEt4 p2hw== X-Received: by 10.14.109.69 with SMTP id r45mr662081eeg.79.1377531652627; Mon, 26 Aug 2013 08:40:52 -0700 (PDT) Original-Received: from keima.localdomain (x2f24600.dyn.telefonica.de. [2.242.70.0]) by mx.google.com with ESMTPSA id a6sm22224567eei.10.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 26 Aug 2013 08:40:52 -0700 (PDT) In-Reply-To: <521B6DC0.5080907@gmx.net> X-Mailer: Apple Mail (2.1508) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=2a00:1450:4013:c00::234; country=IE X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 03KhrEQsM - 463e31b12add - 20130826 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.14 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:83955 Archived-At: Am 26.08.2013 um 17:01 schrieb Peter Rolf : > Hi, > = > Not sure if this is a bug or intended behaviour. I want to fill a TABLE > row with "[]", but the leading left bracket causes some problems > here. I tried the syntax 'print(string.format("[%d]",10)' in pure lua > and the result is as desired. > = > %% -------------- > \starttext > = > \startluacode > context.bTABLE{} > context.bTR() > for i =3D 1,8 do > context.bTH() context(string.format("[%d]",i)) context.eTH() > end > context.eTR() > context.eTABLE() > \stopluacode > = > \stoptext > %% -------------- > = > gives > = > [..] > fonts > 'fallback modern rm 12pt' is loaded > setup > error in line 6, namespace '354>', key '1' > setup > error in line 9, namespace '354>', key '2' > setup > error in line 12, namespace '354>', key '3' > setup > error in line 15, namespace '354>', key '4' > setup > error in line 18, namespace '354>', key '5' > setup > error in line 21, namespace '354>', key '6' > setup > error in line 24, namespace '354>', key '7' > setup > error in line 27, namespace '354>', key '8' > [..] > = > and empty TABLE cells. Any help welcome. The \bTH command has a optional argument and when you print [] context take this as argument for \bTH. There are different ways to fix thi= s, one is to pass a empty argument to \bTH, e.g. "context.bTH{}" or you add \r= elax after the command, e.g. "context.bTH() context.relax()". BTW: You don=92t need string.format because =93context("[%d]",i)" is valid = input. Wolfgang ___________________________________________________________________________= ________ If your question is of interest to others as well, please add an entry to t= he Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-cont= ext webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________= ________