title: How to break listing to pages in latex?
body: <p>I'm trying to split my listing into several pages, but unfortunately, it doesn't work.</p>
  
  <p>I have read it should work automatically if you set <code>breaklines=true</code>. I can't. Is there another option without creating multiple listings?</p>
  
  <pre><code>    \lstset{numbers=left,
      columns=fullflexible,
      stepnumber=1,
      basicstyle=\footnotesize\ttfamily,
      numberstyle=\color{lineNumberColor}\tiny,
      inputencoding=utf8,
      showtabs=false,
      extendedchars=true,
      showstringspaces=false,
      showspaces=false,
      tabsize=4,
      postbreak=\raisebox{0ex}[0ex][0ex]{\ensuremath{\color{pred}\hookrightarrow\space}},
      commentstyle=\slshape\color{commentColor},
      keywordstyle=\color{keywordColor}\bfseries,
      stringstyle=\color{stringColor}\ttfamily,
      breaklines=true,
      breakatwhitespace=true,
  }
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/dLgmx.png" rel="noreferrer"><img src="https://i.stack.imgur.com/dLgmx.png" alt="example"></a></p>