Why does \lstinline
not break lines correctly like with \begin{lstlisting}
?
The text goes over the documentborder with \lstinline
.
Thank you!
\documentclass{scrreprt}
\usepackage{listings}
\lstset
{
breaklines=true,
breakatwhitespace=true,
frame=lines,
basicstyle=\ttfamily,
}
\begin{document}
\begin{lstlisting}
someverylongcode, whichneedssomelinebreak hereandthere, becauseotherwiseitwouldgooverthedocumentborder
\end{lstlisting}
\lstinline[language=C]!someverylongcode, whichneedssomelinebreak hereandthere, becauseotherwiseitwouldgooverthedocumentborder!
\end{document}
\lstinline
is\lstinline
, notlstonmorethanoneline
, i.e. it's not meant for multiline - display