Graphics, Figures & TablesImage cuts Listing

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
xeon123
Posts: 3
Joined: Thu Jun 23, 2011 5:57 pm

Image cuts Listing

Post by xeon123 »

Hi,

I defined a lstinputlisting with the following code:

Code: Select all

% listing box definition
\lstset{
  basicstyle=\footnotesize\ttfamily, % Standardschrift
  % numbers=left,               % Ort der Zeilennummern
  numberstyle=\tiny,          % Stil der Zeilennummern
  % stepnumber=2,               % Abstand zwischen den
  % Zeilennummern
  numbersep=5pt,              % Abstand der Nummern zum Text
  tabsize=2,                  % Groesse von Tabs
  extendedchars=true,         %
  breaklines=true,            % Zeilen werden Umgebrochen
  keywordstyle=\color{red},
  frame=b,#1,
  % keywordstyle=[1]\textbf,    % Stil der Keywords
  % keywordstyle=[2]\textbf,    %
  % keywordstyle=[3]\textbf,    %
  % keywordstyle=[4]\textbf,   \sqrt{\sqrt{}} %
  stringstyle=\color{white}\ttfamily, % Farbe der String
  showspaces=false,           % Leerzeichen anzeigen ?
  Showtabs=false,             % Tabs anzeigen ?
  Xleftmargin=17pt,
  framexleftmargin=17pt,
  framexrightmargin=5pt,
  framexbottommargin=4pt,
  % backgroundcolor=\color{lightgray},
  showstringspaces=false      % Leerzeichen in Strings anzeigen
  % ?        
}
Now, when I use an image near an lstinputlisting, the image cuts the code.

Code: Select all

\lstinputlisting[label=mrsample,caption=Abstract Sample]{./source/Class.java}

\begin{figure}
  \centering
  \includegraphics[scale=.4]{./images/Image.png}
  \caption{Process}
  \label{fig:file}
\end{figure}
How can I avoid an image cut the lstinputlisting content?

Thanks,

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

5gon12eder
Posts: 126
Joined: Sun Feb 13, 2011 8:36 pm

Re: Image cuts Listing

Post by 5gon12eder »

Please post a minimal working example that reproduces your problem.
I'm using pdfTeX, Version 3.1415926-1.40.10 (TeX Live 2009/Debian).
Post Reply