The package listings
provide the option rulecolor
.
rulecolor=\color{black},
To get a complete overview of all options have a look into the documentation.
An example with your settings is given below. I think with your settings you can see nothing.
\documentclass{article}
\usepackage{xcolor}
\usepackage{listings}
\lstset{
language=C++, % choose the language of the code
basicstyle=\fontfamily{pcr}\selectfont\footnotesize\color{red},
keywordstyle=\color{black}\bfseries, % style for keywords
numbers=none, % where to put the line-numbers
numberstyle=\tiny, % the size of the fonts that are used for the line-numbers
backgroundcolor=\color{darkgray},
showspaces=false, % show spaces adding particular underscores
showstringspaces=false, % underline spaces within strings
showtabs=false, % show tabs within strings adding particular underscores
frame=single, % adds a frame around the code
tabsize=2, % sets default tabsize to 2 spaces
rulesepcolor=\color{gray},
rulecolor=\color{black},
captionpos=b, % sets the caption-position to bottom
breaklines=true, % sets automatic line breaking
breakatwhitespace=false,
}
\begin{document}
\begin{lstlisting}
Some Code
for loop
if
return
\end{lstlisting}
\end{document}
The ulem
source states that:
To draw a line through text instead of under it (strike out) do under-line with negative depth.
So, the thickness of the strike is the same as that of the underline. From the ulem
package documentation:
The thickness of the underline rule is given by the command macro
\ULthickness
; use \renewcommand
(not the usual \setlength
) to change
it.
So, writing:
\documentclass[mathserif]{beamer}
\usepackage{ulem}
\newcommand{\soutthick}[1]{%
\renewcommand{\ULthickness}{2.4pt}%
\sout{#1}%
\renewcommand{\ULthickness}{.4pt}% Resetting to ulem default
}
\begin{document}
\begin{frame}
Next meetings:
\begin{itemize}
\item \soutthick{22.01.2016} (cancelled)
\item \sout{22.01.2016}
\item 28.01.2016
\end{itemize}
\end{frame}
\end{document}
you will get:
Best Answer
It is highly recommended that you post a minimal example. It is possible to only color the wave part by redefining the command
\uwave
or by creating a new command named\redwave
as you like.The
ulem
package uses the wiggle from the 6-pt lasy font and we just usetextcolor
to color it.One could extend the above code to give it a more semantic name, as suggested by TH and also to give an optional color. The MWE below defines a command
\colorwave
for this purpose.