Friday, February 25, 2011

bugfix> remove unwanted spaces in tokenizer package

As notice here \GetTokens inserts unwanted spaces. The bugfix is to use the following code instead of just "\usepackage[trim]{tokenizer}":
\usepackage[trim]{tokenizer}  
 
\def\SH@GetTokens#1,#2\@empty{%
    \def\SH@token{#1}%
    \ifx\SH@trimtokens\SH@true% strip spaces if requested
        \TrimSpaces\SH@token%
    \fi%
    \SH@DefineCommand{\SH@FirstArgName}{\SH@token}%
    \SH@DefineCommand{\SH@SecondArgName}{#2}%
    }
\def\SH@CheckTokenSep#1,#2\@empty{%
    \def\SH@CTSArgTwo{#2}%
    \ifx\SH@CTSArgTwo\@empty%
        \edef\SH@TokenValid{\SH@false}%
    \else%
        \edef\SH@TokenValid{\SH@true}%
    \fi%
    }

I will report this bugfix to the developer Sascha Herpers

No comments:

Post a Comment