From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/30111 Path: news.gmane.org!not-for-mail From: Jano Kula Newsgroups: gmane.comp.tex.context Subject: Re: safe way of writing arguments Date: Tue, 08 Aug 2006 13:16:19 +0200 Message-ID: References: <44D84439.5080409@wxs.nl> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1155035906 23063 80.91.229.2 (8 Aug 2006 11:18:26 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 8 Aug 2006 11:18:26 +0000 (UTC) Original-X-From: ntg-context-bounces@ntg.nl Tue Aug 08 13:18:23 2006 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 ciao.gmane.org with esmtp (Exim 4.43) id 1GAPbL-000241-07 for gctc-ntg-context-518@m.gmane.org; Tue, 08 Aug 2006 13:18:23 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 7C0001FDE3; Tue, 8 Aug 2006 13:18:22 +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 04536-03; Tue, 8 Aug 2006 13:18:22 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 605281FDDC; Tue, 8 Aug 2006 13:16:30 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 3CA271FDDC for ; Tue, 8 Aug 2006 13:16: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 04537-03-2 for ; Tue, 8 Aug 2006 13:16:22 +0200 (CEST) Original-Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by ronja.ntg.nl (Postfix) with SMTP id 6E37E1FDD8 for ; Tue, 8 Aug 2006 13:16:22 +0200 (CEST) Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1GAPZH-0001oq-FY for ntg-context@ntg.nl; Tue, 08 Aug 2006 13:16:15 +0200 Original-Received: from 8.82.broadband2.iol.cz ([83.208.82.8]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 08 Aug 2006 13:16:15 +0200 Original-Received: from jano.kula by 8.82.broadband2.iol.cz with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 08 Aug 2006 13:16:15 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-To: ntg-context@ntg.nl Original-Lines: 66 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: 8.82.broadband2.iol.cz User-Agent: Thunderbird 1.5 (X11/20060313) In-Reply-To: <44D84439.5080409@wxs.nl> X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.7 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:30111 Archived-At: Hans Hagen wrote: > Jano Kula wrote: >> Hi! >> >> Is it safe to leave spare comma at the end of the key=value list or >> other list of arguments? >> > in most cases it is ok >> It is not nice, but when adding/commenting arguments in readable way >> (one per line) it's faster and while experimenting with parameters one >> doesn't have to care about the last comma adding or removing it back and >> forth, for example: >> >> \setuplayout[ >> grid=yes, >> %header=0mm, >> footer=7mm, >> %footerdistance=10mm, >> %cutspace=12mm, >> ] >> > in this case a space after 12mm is not that problematic because layout > are calculated in vertical mode and the 12 mm is used in assignments >> or >> >> \setuphead[ >> chapter, >> section, >> %subsection, >> %subsubsection, >> > hm, here it can be troublesome unless i catch an empty case (not sure); > if you run into troubles with such cases report it to the list and we > can see if we can catch it >> ][ >> textstyle=\ss, >> numberstyle=\ss, >> ] >> > Hans > > ----------------------------------------------------------------- > Hans Hagen | PRAGMA ADE > Ridderstraat 27 | 8061 GH Hasselt | The Netherlands > tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com > | www.pragma-pod.nl > ----------------------------------------------------------------- Thanks, I've found the example of the different behaviour, though the reason isn't the comma, but the space after the command, I think. So even writing parameters one-per-line (with space left behind = last one without comma or percent sign) can be dangerous. %\setuphead[chapter][style=\bfd] % works %\setuphead[chapter][style={\bfd}] % works %\setuphead[chapter][style={\bfd} ] % doesn't work %\setuphead[chapter][style={\bfd},] % works \starttext \chapter{Test chapter} \stoptext This is not seriuos, I just want to find, how the things work. Jano