Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Possible Duplicate:
Is there a way to avoid repetitive compiler warning messages?

When debugging some stuff I sometimes have empty mdframes and I get the log file littered with tons of

"Package mdframed Warning: You got a bad break"

How can I disable this message for mdframed only? (I still need warnings/errors from other packages)

share|improve this question
    
The silence package as used here might be what you're looking for. –  Scott H. Jul 23 '12 at 2:46
add comment

marked as duplicate by egreg, cgnieder, lockstep, Marco Daniel, percusse Aug 18 '12 at 9:54

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

2 Answers

up vote 3 down vote accepted

As Scott H. suggests in a comment you can use the silence package for this purpose. Minimal example:

\documentclass{article}

\usepackage{silence}

\usepackage{mdframed}

\WarningFilter{mdframed}{You got a bad break}

\makeatletter

\mdf@PackageWarning{You got a bad break\MessageBreak
  because the last split box is empty\MessageBreak
  You have to change the settings}

\makeatother

\begin{document}

\end{document}
share|improve this answer
add comment

The mdframed package uses

\newcommand*\mdf@PackageWarning[1]{\PackageWarning{\mdframedpackagename}{#1}}

to report warning messages. So, to disable all warning messages from mdframed, you could redefine this in your preamble (after loading the mdframed package) to ignore the message:

\makeatletter
    \renewcommand*\mdf@PackageWarning[1]{}
\makeatother

Notes:

  • As Marco Daniel commented, this kind of solution is generally not a good idea as it will eliminate all warning message form the mdframed package. So if you want to eliminate just one message it is better to use the silence package as per the other answer.

References:

share|improve this answer
    
I think it's not a good idea ;-) –  Marco Daniel Jul 23 '12 at 9:41
add comment

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