When I try to insert a \multicolumn with a macro created using xparse's \NewDocumentCommand, I get a Misplaced \omit error. When I define the "same" command using \def, every thing works fine.

How come? Can I work around this somehow?



% This definition does not work.

% This one does.
% \multicolumn{1}{c}{asdf}%


\begin{tabular}{ c }

  • \NewDocumentCommand defines the macro as robust, you can use \NewExpandableDocumentCommand instead.
    – Skillmon
    Commented Dec 5, 2019 at 14:20

1 Answer 1


\multicolumn should be the first thing in a cell (after macro expansion). With \NewDocumentCommand this is not possible.

You need


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .