# Introduction #
The database contains fragments of LaTeX code. The relationship between a book's theme and LaTeX code is illustrated in the following diagram:

Each fragment of LaTeX code is assigned to a *snippet*. Multiple snippets can be associated with an *aspect*. In effect, aspects can be thought of as *snippet categories*. Each theme consists of a unique set of aspects.
# Book Creation #
When the user creates a book, a basic theme is automatically assigned. At any time, the user may change the book's theme. Changing a book's theme wipes out any other customizations that the user may have applied to the book.
After selecting a theme, the user may opt to tweak any aspect of that theme. For example, the user might want to apply a different set of colours to an existing theme.
# Example Scenario #
The following LaTeX code is named Čiurlionis, which has a corresponding snippet code of CIURLIONIS:
The system includes an aspect of COLOUR_SCHEME, having a label of "Colour Scheme". The label is presented to the user, but the code is used by the system.
The system also includes a theme of MODERN_SQUARE, having a label of "Modern Square".
The theme table could have an entry of **MODERN_SQUARE**, **COLOUR_SCHEME**, **CIURLIONIS**. When the user selects the MODERN_SQUARE theme, the CIURLIONIS colour scheme is automatically set as a preference for the book's theme.