@@ -51,12 +51,11 @@ MathJax.Hub.Register.StartupHook("TeX Jax Ready",function () {
51
51
* Implement \newcommand{\name}[n][default]{...}
52
52
*/
53
53
NewCommand : function ( name ) {
54
- var CS = this . GetArgument ( name ) , cs = this . trimSpaces ( CS ) ,
54
+ var cs = this . trimSpaces ( this . GetArgument ( name ) ) ,
55
55
n = this . GetBrackets ( name ) ,
56
56
opt = this . GetBrackets ( name ) ,
57
57
def = this . GetArgument ( name ) ;
58
58
if ( cs . charAt ( 0 ) === "\\" ) { cs = cs . substr ( 1 ) }
59
- if ( cs === "" && CS . substr ( CS . length - 1 , 1 ) === " " ) { cs += " " }
60
59
if ( ! cs . match ( / ^ ( .| [ a - z ] + ) $ / i) ) {
61
60
TEX . Error ( [ "IllegalControlSequenceName" ,
62
61
"Illegal control sequence name for %1" , name ] ) ;
@@ -147,9 +146,8 @@ MathJax.Hub.Register.StartupHook("TeX Jax Ready",function () {
147
146
TEX . Error ( [ "MissingCS" ,
148
147
"%1 must be followed by a control sequence" , cmd ] )
149
148
}
150
- var cs = this . GetArgument ( cmd ) , CS = this . trimSpaces ( cs ) ;
151
- if ( CS == "\\" && cs . substr ( cs . length - 1 , 1 ) === " " ) { CS += " " }
152
- return CS . substr ( 1 ) ;
149
+ var cs = this . trimSpaces ( this . GetArgument ( cmd ) ) ;
150
+ return cs . substr ( 1 ) ;
153
151
} ,
154
152
155
153
/*
0 commit comments