On 05/26/2010 05:00 AM, Artimess wrote:
Hi ,
I need some help to create an environment or use an existing
environment or package that may exist to get coding examples like the
attached example in a manuscript.
The listings should have similar numbering scheme as Figures or tables
and I need to have a list of codings, like List of Figures, etc.
Two options:
1. Insert>Child Document, then choosing "Program Listing". The program
to be listed needs to be in an external file.
2. Insert>Float>Algorithm, and then, in the float, Insert>Program Listing.
If you don't like "Algorithm", you can define your own float as in the
attached module. Copy it to your LyX user layouts directory (e.g.,
$HOME/.lyx/layouts/), reconfigure LyX, and restart. Then it will be
available under Insert>Float.
rh
#\DeclareLyXModule{Listing Float}
#DescriptionBegin
#Adds a float for "Code Listing".
#DescriptionEnd
Format 11
Float
Type listing
GuiName Code Listing
Placement tbp
Extension lol
NumberWithin none
Style ruled
ListName "List of Listings"
LaTeXBuiltin false
End