When using the lstlisting environment, I can't get it to break on a long line which contains only the *
character. This is my minimum working example. It produces a listing in which the text flows out of the listing's frame and does not produce correct line breaks. How do I fix this? I have tried different parameters in \lstset
, but nothing seems to work. How do I tell the listing environment that it's okay to break on a *
?
\usepackage{listings}
\begin{document}
\lstset{%
breaklines=true,
breakatwhitespace=false,
postbreak=\space,
tabsize=2,
basicstyle=\ttfamily\footnotesize,
showspaces=false,
showstringspaces=false,
extendedchars=true,
frame=single,
frameround=ffff,
aboveskip=1.5em
}
\begin{lstlisting}
**************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************** hello world
\end{lstlisting}
\end{document}