TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to suppress messages of the form:

* LaTeX warning: "xparse/redefine-command"
* Redefining document command \MyMacro with arg. spec. 'm' on line 29.

I tried to use the silence package, but can't determine how to correctly use that package for such errors.



%% All these attempts do not solve this problem.

\WarningFilter{latex}{LaTeX warning}
\WarningFilter{xparse}{LaTeX warning}

\WarningFilter{latex}{Redefining document command}
\WarningFilter{xparse}{Redefining document command}


\MyMacro{some text}


\MyMacro{some more text}
share|improve this question
silence will only silence output if it matches exactly and if it's produced by a specific command. – Werner Dec 11 '12 at 0:08
Related Question: Can I temporarily supress xparse's log messages?. – Peter Grill Jun 11 '13 at 15:26
up vote 16 down vote accepted

You can't use silence for this, because xparse and all packages in the l3kernel suite (LaTeX3) use a very different method for issuing warnings, and definitely not the \PackageWarning macros on which silence relies.

The correct way for suppressing warnings is


The code connected with this option is

\DeclareOption { log-declarations = false }
    \msg_redirect_module:nnn { LaTeX / xparse } { info }    { none }
    \msg_redirect_module:nnn { LaTeX / xparse } { warning } { none }

that redirects only messages from the xparse module to "none".

share|improve this answer
Do you know which introduced this? It hasn't been there since forever AFAIK. – Werner Dec 11 '12 at 0:10
@Werner What I know is that the option didn't really work until some reworking on the kernel (last summer, I believe). – egreg Dec 11 '12 at 0:14
@Werner As egreg says, the option has been there for some time (since I rewrote xparse), but it was broken for some time! – Joseph Wright Dec 11 '12 at 6:52

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.