Have a look at the example and study the source files for creating it. The source for example.tex contains comments that explain the structures and commands used.
The source files for this document: