diff --git a/my-listings.sty b/my-listings.sty index b55e717f02049ea303e68765df717a39e8d2362f..35736d404ac7bd0c9ce7f2b161d65c2fc5144b1e 100644 --- a/my-listings.sty +++ b/my-listings.sty @@ -182,15 +182,10 @@ \RequirePackage{xcolor} \RequirePackage{caption} -\DeclareCaptionFont{white}{\color{black}} -\DeclareCaptionFormat{listing}{% - \colorbox{gray}{% - \noindent\parbox{\dimexpr\columnwidth-2\fboxsep}{#1#2#3}% - }% -} -\captionsetup[lstlisting]{format=listing, labelfont=white, textfont=white, - singlelinecheck=false, margin=0pt, font={bf}} +\DeclareCaptionFont{white}{\color{white}} +\captionsetup[lstlisting]{box=colorbox, boxcolor=gray, labelfont=white, + textfont=white, singlelinecheck=false, margin=0pt, font={bf}} \colorlet{isae@bggray}{gray!20} % styles