Generallistings - package caption below the list

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
samy
Posts: 4
Joined: Tue Aug 28, 2007 11:03 am

listings - package caption below the list

Post by samy »

Hi community,
I´m using the listings package and I try to write the caption below the listbox.
But I can`t find the right command.

\lstinputlisting[backgroundcolor=\color{rahmen},frame=single,label=lst:bresenham,caption=Bresenham-Algorithmus,numbers=left, numberstyle=\tiny, numbersep=5pt]{listings/umsetzung/bresenham.txt}

if I tryed is with captionpos I got a title below and above the listing!!!

captionpos=hsubset of tbi
specifies the positions of the caption: top and/or bottom of the listing.



Can someone give me a hint?
THX samy

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

nunolf
Posts: 14
Joined: Wed Jul 18, 2007 1:41 pm

listings - package caption below the list

Post by nunolf »

Hi Samy

Play with the belowcaptionskip argument. By default its value is \smallskipamount.
Example:

Code: Select all

\lstinputlisting[ ... ,captionpos=b,caption=Bresenham-Algorithmus, belowcaptionskip=4pt]{listings/umsetzung/bresenham.txt}
Cheers,
N.
Post Reply