Graphics, Figures & Tableslisting not floating

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
htabbara
Posts: 1
Joined: Wed Jun 01, 2011 6:30 pm

listing not floating

Post by htabbara »

Hello everyone,

I am using the listings package and the listings are not floating from page to page though i use float like the following:

Code: Select all

\lstset{language=java}
\begin{lstlisting}[float,frame=trbl,caption={update method},
  captionpos=b,label=updatemethod]{}
private void update()
{
....
}
\end{lstlisting}
Please help ........
Last edited by Stefan Kottwitz on Wed Jun 01, 2011 6:48 pm, edited 1 time in total.

Recommended reading 2024:

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

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

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

Re: listing not floating

Post by 5gon12eder »

There must be an additional problem because take what you've given, the code block actually floats.

Best
I'm using pdfTeX, Version 3.1415926-1.40.10 (TeX Live 2009/Debian).
Post Reply