1

! LaTeX3 Error: Unknown argument type 'k' for the command while typesetting the document. the command used is \command**{\cmd}{\oldcmd}{\lparen\rparen}

The definition is

\NewDocumentCommand{\NewMathFun}{ssmmm}{%
  \IfBooleanTF{#2}{%
    \expandafter\let\csname OP\CsToStr{#3}\endcsname#4%
  }{%
    \IfBooleanTF{#1}{%
      \expandafter\DeclareMathOperator\expandafter*\csname OP\CsToStr{#3}\endcsname{#4}%
    }{%
      \expandafter\DeclareMathOperator\csname OP\CsToStr{#3}\endcsname{#4}%
    }%
  }
  \NewDocumentCommand{#3}{ s k_ k^ k@ > {\SplitArgument{1}{}} D<>{#5} o}{%
    \csname OP\CsToStr{#3}\endcsname\IfNoValueF{##2}{_{##2}}\IfNoValueF{##3}{^{##3}}%
    \IfNoValueTF{##6}%
      {}%
      {\NewMathFunInternal{##1}##5{##6}\IfNoValueF{##4}{{##4}}%
    }%
  }%
}
\let\OLDdim\dim
\let\dim\undefined
\NewMathFun**{\dim}{\OLDdim}{\lparen\rparen}
  • 2
    For some time xparse provided an experimental k argument type, then superseded by the e argument type. Please, show the faulty definition and we can help in fixing it. – egreg Sep 19 '19 at 16:38
  • 1
    is that a definition that you just wrote (in which case you are using old documentation) or is it in a package from ctan (in which case it needs updating) ? – David Carlisle Sep 19 '19 at 19:19
  • 1
    The details on the switch from k to e type arguments is discussed in Xparse's new e-type argument (replacement for k-type argument). – Peter Grill Sep 19 '19 at 19:57
  • 1
    @siracusa Yes, the problem is resolved. The question can be closed. The resolution was done by replacing all "k" with an "e" argument type. – Senthil Sep 28 '19 at 15:40
  • 4
    I'm voting to close this question as off-topic because it was solved in the comments – siracusa Sep 29 '19 at 0:28

Browse other questions tagged or ask your own question.