LATEX-L Archives

Mailing list for the LaTeX3 project


Options: Use Classic View

Use Monospaced Font
Show Text Part by Default
Condense Mail Headers

Topic: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Sender: Mailing list for the LaTeX3 project <[log in to unmask]>
Date: Fri, 17 Sep 2010 20:03:04 +0200
Content-Disposition: inline
Reply-To: Mailing list for the LaTeX3 project <[log in to unmask]>
MIME-Version: 1.0
Message-ID: <[log in to unmask]>
In-Reply-To: <[log in to unmask]>
Content-Type: text/plain; charset=us-ascii
From: Heiko Oberdiek <[log in to unmask]>
Parts/Attachments: text/plain (69 lines)
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

  \zap@space #1 #2->#1\ifx #2\@empty \else \expandafter \zap@space \fi #2

  \zap@space #1 #2->#1\ifx #2\@empty \else \expandafter \zap@space \fi #2

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:

  output-decimal-marker = {,}

and a.sty:


* xkvltxp:
    [ output-decimal-marker = {,} ]
  It doesn't remove spaces.
* kvoptions-patch:
  It removes the spaces before, after and around the equals sign.

Both left the braces intact.

Yours sincerely
  Heiko <[log in to unmask]>