Received: from mx0.gmx.net (mx0.gmx.net [213.165.64.100]) by h1439878.stratoserver.net (8.14.2/8.14.2/Debian-2build1) with SMTP id o8HI300B032000 for ; Fri, 17 Sep 2010 20:03:01 +0200 Received: (qmail 10924 invoked by alias); 17 Sep 2010 18:02:55 -0000 Delivered-To: GMX delivery to rainer.schoepf@gmx.net Received: (qmail invoked by alias); 17 Sep 2010 18:02:55 -0000 Received: from relay.uni-heidelberg.de (EHLO relay.uni-heidelberg.de) [129.206.100.212] by mx0.gmx.net (mx096) with SMTP; 17 Sep 2010 20:02:55 +0200 Received: from listserv.uni-heidelberg.de (listserv.uni-heidelberg.de [129.206.100.94]) by relay.uni-heidelberg.de (8.14.1/8.14.1) with ESMTP id o8HI1BKD005028 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 17 Sep 2010 20:01:11 +0200 Received: from listserv.uni-heidelberg.de (localhost.localdomain [127.0.0.1]) by listserv.uni-heidelberg.de (8.13.1/8.13.1) with ESMTP id o8HHkfs0013151; Fri, 17 Sep 2010 20:01:10 +0200 Received: by LISTSERV.UNI-HEIDELBERG.DE (LISTSERV-TCP/IP release 16.0) with spool id 454196 for LATEX-L@LISTSERV.UNI-HEIDELBERG.DE; Fri, 17 Sep 2010 20:01:10 +0200 Received: from relay.uni-heidelberg.de (relay.uni-heidelberg.de [129.206.100.212]) by listserv.uni-heidelberg.de (8.13.1/8.13.1) with ESMTP id o8HI1AjW004760 for ; Fri, 17 Sep 2010 20:01:10 +0200 Received: from mail-bw0-f49.google.com (mail-bw0-f49.google.com [209.85.214.49]) by relay.uni-heidelberg.de (8.14.1/8.14.1) with ESMTP id o8HI0v0N004852 for ; Fri, 17 Sep 2010 20:01:02 +0200 Received: by bwz19 with SMTP id 19so3283589bwz.22 for ; Fri, 17 Sep 2010 11:00:57 -0700 (PDT) Received: by 10.204.82.80 with SMTP id a16mr4249616bkl.39.1284746457272; Fri, 17 Sep 2010 11:00:57 -0700 (PDT) Received: from irwin.vpn.uni-freiburg.de (p54A2B882.dip.t-dialin.net [84.162.184.130]) by mx.google.com with ESMTPS id f18sm3859931bkf.15.2010.09.17.11.00.55 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 17 Sep 2010 11:00:56 -0700 (PDT) Received: by irwin.vpn.uni-freiburg.de (Postfix, from userid 500) id AC26D775C; Fri, 17 Sep 2010 20:03:04 +0200 (CEST) Mail-Followup-To: LATEX-L@LISTSERV.UNI-HEIDELBERG.DE References: <4C93A430.1020103@morningstar2.co.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Message-ID: <20100917180303.GA7348@oberdiek.my-fqdn.de> Date: Fri, 17 Sep 2010 20:03:04 +0200 Reply-To: Mailing list for the LaTeX3 project Sender: Mailing list for the LaTeX3 project From: Heiko Oberdiek Subject: Re: Option parsing bug or 'feature'? To: LATEX-L@listserv.uni-heidelberg.de In-Reply-To: <4C93A430.1020103@morningstar2.co.uk> Precedence: list List-Help: , List-Unsubscribe: List-Subscribe: List-Owner: List-Archive: X-GMX-Antispam: 0 (Mail was not recognized as spam); Detail=5D7Q89H36p4U4jfdfC5HDevlx1X2sAZgAaLl3DbFfW0PXxL7WgvovMFXXSEPrACW/b9IW Qp+GhEViZlUW4mdBntgP1X8KwB5tjHCA/yxSZMu7BXBiPs3ujyaoi2xLHDqpg8dk65Dhpb3Lg0c1 iTjGg==V1; X-Resent-By: Forwarder X-Resent-For: rainer.schoepf@gmx.net X-Resent-To: rainer@rainer-schoepf.de Status: R X-Status: X-Keywords: X-UID: 6397 On Fri, Sep 17, 2010 at 06:24:00PM +0100, Joseph Wright wrote: > I've had a bug for siunitx about option parsing, which seems to be a > kernel issue. There is a difference in handling between > > \usepackage[% > output-decimal-marker ={,} > ]{siunitx} > > and > > \usepackage[% > output-decimal-marker = {,} > ]{siunitx} > > with the later (with an extra space) failing. Is this a kernel bug > or a 'feature' of LaTeX2e? LaTeX2e uses \zap@space to remove the spaces in the option lists. As a side effect \zap@space also removes the braces around the comma, because the group is followed immediately after a space: \zap@space #1 #2->#1\ifx #2\@empty \else \expandafter \zap@space \fi #2 #1<-output-decimal-marker #2<-= \zap@space #1 #2->#1\ifx #2\@empty \else \expandafter \zap@space \fi #2 #1<-= #2<-, \zap@space #1 #2->#1\ifx #2\@empty \else \expandafter \zap@space \fi #2 #1<-, #2<-\@empty Then the comma becomes part of the syntax and is interpreted as option separator. For curiosity I have again compared the two packages kvoptions-patch and xkvltxp: \documentclass{article} \usepackage{kvoptions-patch} %\usepackage{xkvltxp} \usepackage[ output-decimal-marker = {,} ]{a} \begin{document} \end{document} and a.sty: \ProvidesPackage{a} \DeclareOption*{\typeout{[\CurrentOption]}} \ProcessOptions\relax \endinput Result: * xkvltxp: [ output-decimal-marker = {,} ] It doesn't remove spaces. * kvoptions-patch: [output-decimal-marker={,}] It removes the spaces before, after and around the equals sign. Both left the braces intact. Yours sincerely Heiko