I want to include listings of external files in my document. These listings should have a solid background and rounded corners. The problem is, that if I define a style with frameround and backgroundcolor, the background overlaps the rounded corners.
\lstdefinestyle{cftemplate}{
frameround=tttt,
rulecolor=\color[rgb]{0.7, 0.7, 0.7},
frame=single,
backgroundcolor=\color[rgb]{0.95, 0.95, 0.95}
}
There already exists a question how this behavior can be prevented in a lstlisting. In particular the solution presented in this answer works well for me. So I tried to extend this solution so that it also works with \lstinputlisting. However, the obvious attempt to replace "lstlisting" with "lstinputlisting" in the code snippet did not work.
So my question is: How can I create a \lstinputlisting with a background and rounded corners, where the background does not overlap the rounded corners?

tcolorboxpackage. But now it looks very nice. Thanks! – Michael Osl Jul 16 '14 at 20:38