LATEX-L Archives

Mailing list for the LaTeX3 project


Options: Use Classic View

Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

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

Print Reply
Heiko Oberdiek <[log in to unmask]>
Fri, 17 Sep 2010 20:03:04 +0200
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]>