Closed FrankMittelbach closed 5 years ago
This is the default behavior of keyval
. I thought this changed recently, but the the outer braces are still stripped off. So, I've added a warning in the docs (on p 3).
My understanding is that the default behavior of keyval is to strip spaces if not in {...}
. But I find it surprising that it needs 2 level of braces ... that sounds to be like a bug and I haven't seen that elsewhere before!
Sorry, but I can't see where the bug is. Compare with:
\usepackage{keyval}
\makeatletter
\define@key{test}{a}{\def\toshow{(#1)}\show\toshow}
\setkeys{test}{a={{; }}, a={; }, a={{ and }}, a={ and }}
Which shows:
->(; ).
->(;).
->( and ).
->(and).
ok, then it is a keyval (mis)feature. I opened up a report there.
This shows the problem: extra set of braces is needed to keep the spaces: