Writing Code in Latex with float like environment

Listing package is used which can be consulted from lstlisting wiki. By default the listing is not float and its caption and labeling style is not symmetric as of general latex. The target of this tutorial is to get the output something like above. Heres the code

\begin{lstlisting}[float,caption={EPClaim Knowledge Representation},label=lst:epclaimknowledge]
Agent D2 {
knowledge = {haveProduct(fruits); N5(med,3);}

float option is used in start to make the lstlisting environment act as float same as of figures.

For the second step of making the border around your code add


just before


Latex Beginners Installation Notes on Windows

Starting writing documents in latex can be really a headache for beginners below I have compiled the basic installation instructions for minimum setup of latex environment on windows.


Sample Thesis written in latex

Mixtex is the latex environment and texnicenter is the IDE to develop latex documents. where as jabref is used to handle bibtex references in documents.

Do follow the sequence of installation as mentioned