I'm having the following problem: I'm using the listings
package to render what is supposed to look like a teminal screenshot. But the background colour is striped. In my other code snippets the background colour is light gray so it is much less noticeable, but it's really ugly on the black background. I've looked at potential solutions online using \shaded
or colorbox
, but none have worked because of the shadowbox
I'm using.
Any input would be much appreciated.
\lstset{%
language=C, % choose the language of the code
basicstyle=\ttfamily\footnotesize\color{white} , % the size of the fonts that are used for the code
tabsize=2, % sets default tabsize to 2 spaces
captionpos=b, % sets the caption-position to bottom
breaklines=true, % sets automatic line breaking
breakatwhitespace=true, % sets if automatic breaks should only happen at whitespace
keywordstyle=\color{white},
commentstyle=\color{white},
stringstyle=\color{white},
numberstyle=\tiny\color{midgray}, % the style that is used for the line-numbers
stepnumber=2, % the step between two line-numbers. If it's 1, each line
% will be numbered
numbersep=5pt, % how far the line-numbers are from the code
frame=shadowbox,
rulesepcolor=\color{darkgray},
lineskip={-1.5pt}, % single line spacing
aboveskip=1.5\bigskipamount,
belowskip=\smallskipamount,
escapechar={\@},
showstringspaces=false,
backgroundcolor=\color{black}
}
\documentclass
and the appropriate packages so that those trying to help don't have to recreate it.lstlisting
environment (margin and white line)