1

I have a few MATLAB files with over 100 lines of code but when I use \lstinputlisting, I only get about the first 50 lines or so and it doesn't show up on the next page. Presumably, it's floating away somewhere on the same page. I've tried using \afterpage, \clearpage, \cleardoublepage, \pagebreak, and \newpage, but none of them help.

I'm a beginner with LaTeX and would appreciate any help that I can get.

Thanks!!

\lstset {language=Matlab,%  
    %basicstyle=\color{red},  
    breaklines=true,%  
    morekeywords={matlab2tikz},    
    keywordstyle=\color{blue},%  
    morekeywords=[2]{1}, keywordstyle=[2]{\color{black}},  
    identifierstyle=\color{black},%  
    stringstyle=\color{mylilas},  
    commentstyle=\color{mygreen},%  
    showstringspaces=false,  
    numbers=left,%  
    numberstyle={\tiny \color{black}},% size of the numbers  
    numbersep=9pt,  
     emph=[1]{for,end,break},emphstyle=[1]\color{red},    
    %emph=[2]{word1,word2}, emphstyle=[2]{style},      
}
Torbjørn T.
  • 206,688

0 Answers0