# nag complains about \centerline in environment “shaded” from package framed

Running this with Miktex, pdflatex, Windows, TeXnicCenter, everything fully up to date:

\documentclass{article}

\usepackage[l2tabu]{nag}
\usepackage{xcolor}
\usepackage{framed}

\definecolor{shadecolor}{named}{lightgray}

\begin{document}

\begin{shaded}
Foo Bar
\end{shaded}

\end{document}


gives:

Package nag Warning: Command \centerline is TeX.
(nag)                Use \centering or center environment instead on input line 13.


Is there anything I can do about it without changing the package itself? Any better packages than framed available that can do the same (page breaking colored boxed)? If not, how to contact the author of the package and inform him?

-
Time to check out mdframed –  percusse Sep 28 '12 at 8:56
Welcome to TeX.SE. I don't know much about the framed package, but @percusse has a good point: mdframed works very nicely and also handles page breaks. –  Peter Grill Sep 28 '12 at 8:59
Thanks, mdframed works great. :) –  Foo Bar Sep 28 '12 at 9:10
@FooBar Another way is to avoid nag altogether. In my opinion it breaks more than it fixes. –  egreg Sep 28 '12 at 9:12
For me, up until now, nag helped more than it made wrong/senseless suggestions. So, for the time beeing I'd rather keep it. Especially because I sometimes have to work on very old latex documents written by several people (that can be annoying sometimes, I tell you ;) )... –  Foo Bar Sep 28 '12 at 9:20

## 1 Answer

Since nobody gave an answer, but only comments, I'll write the answer myself from the comments.

1. nag complain is wrong fussy
2. mdframed is more flexible than framed and doesn't produce this warning
-
nag is not really wrong, but only too fussy. –  egreg Oct 1 '12 at 17:30