Hi,
I'm including C++ code using the listings package and one file is longer than one page. Usually no problem, except that here the last part of the code is not shown on the next page. It just disappears at the end of the page. How can I solve this? Thank you.
General ⇒ listings | Displayed Code not wrapped to next Page
NEW: TikZ book now 40% off at Amazon.com for a short time.

listings | Displayed Code not wrapped to next Page
Please provide a
minimal working example. Otherwise it is impossible to give an answer. Thanks.
Regards

Regards
site moderator & package author
listings | Displayed Code not wrapped to next Page
Code: Select all
\usepackage[framed]{mcode}
\begin{document}
\begin{figure}[!ht]
\begin{lstlisting}
<long text>
\end{lstlisting}
\caption{main.cpp}
\label{main}
\end{figure}
Last edited by Stefan Kottwitz on Mon Jul 30, 2012 7:45 am, edited 1 time in total.
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
listings | Displayed Code not wrapped to next Page
This is not a minimal example, only a loosely code snippet. Please follow the link that Clemens has given you and obey exactly the instructions for building a proper example.
Thorsten
Thorsten
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10