Everything is in the title. The minimal example below
\documentclass[a4paper,11pt]{article}
\usepackage{listings}
\usepackage{xcolor}
% set the default code style
\lstset{
frame=tb, % draw a frame at the top and bottom of the code block
tabsize=4, % tab space width
showstringspaces=false, % don't mark spaces in strings
numbers=left, % display line numbers on the left
commentstyle=\color{green}, % comment color
keywordstyle=\color{blue}, % keyword color
stringstyle=\color{blue!60} % string color
}
\begin{document}
\begin{lstlisting}[language=C++,breaklines]
#include <iostream>
using namespace std;
int main() {
int a = 1;
if ( a == 1 )
cout << "Hello world" << endl;
return 0;
}
\end{lstlisting}
\end{document}
produces the following output
I find the spacing between = in the == operator too small. Therefore I would like to increase it. How can I do that ?
Thanks!
\lstset{literate={=}{{=\,}}1}
. – TeXnician Feb 10 '17 at 9:23