LyXListings header ?

Information and discussion about LyX, a WYSIWYM editor, available for Linux, Windows and Mac OS X systems.
Post Reply
thedreamshaper
Posts: 44
Joined: Wed Aug 04, 2010 7:00 pm

Listings header ?

Post by thedreamshaper »

I recently read a paper wherein the listings each had a small header Like "Listing 14: EstOptions.m". Can anyone help me obtaining something similar in my LyX output :) ?

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

User avatar
Stefan Kottwitz
Site Admin
Posts: 10360
Joined: Mon Mar 10, 2008 9:44 pm

Listings header ?

Post by Stefan Kottwitz »

Hello,

did you search for this already in the listings manual?

Stefan
LaTeX.org admin
thorpn
Posts: 53
Joined: Mon Jul 30, 2012 7:30 pm

Listings header ?

Post by thorpn »

Thank you! was easily found there.

Here is a minimal working example

Code: Select all

\begin{lstlisting}[caption={Useless code},label=MyFancyCode]
% Calculates stuff
code stuff
\end{lstlisting} 
Post Reply