Dave Jarvis' Repositories

git clone https://repo.autonoma.ca/repo/recipe-books.git
# Introduction #

This page describes the steps to create a theme. Creating a theme involves:

* Create an Aspect
* Create a Snippet
* Insert LaTeX Code
* Create Theme Name
* Create a Theme

To create a theme, you must use the recipe book admin application.

# Create an Aspect #

Login to the recipe book admin application, then create an aspect as follows:

1. Click **Book Aspect Name**.
1. Click **Add New**.
1. Set **Code** to an appropriate and unique value (all uppercase, use underscores for spaces).
    * Example: LAYOUT
1. Set **Label** to the code's human-readable equivalent (use title case).
    * Example: Page Layout
1. Set **Description** to a short sentence that clarifies the intent of the aspect.
    * Example: Changes the arrangement of recipe parts on the page.
1. Click **Save**.

The aspect is created.

# Create a Snippet #

LaTeX code must be associated with a named snippet. Create a snippet as follows:

1. Click **Book Snippet**.
1. Click **Add New**.
1. Set **Code** to an appropriate and unique value (all uppercase, use underscores for spaces).
    * Example: ONE_COLUMN_SPREAD_REVERSE
1. Set **Label** to the code's human-readable equivalent (use title case).
    * Example: Full Page Pictures
1. Set **Aspect Code** to this snippet's associated aspect.
    * Example: Page Layout
1. Click **Save**.

The snippet is created.

# Insert LaTeX Code #

Insert LaTeX code and associate it with a snippet as follows:

1. Click **Book Latex**.
1. Click **Add New**.
1. Set **Latex** to the portion of LaTeX code that accomplishes a single unit of work (e.g., sets the book's colours), ensuring there is exactly one blank line at the end of the snippet.
1. Set **Snippet Code** to the appropriate snippet.
1. Click **Save**.

The LaTeX code is inserted into the database.

# Create Theme Name #

Before creating a theme, a new theme name should be created as follows:

1. Click **Book Theme Name**.
1. Click **Add New**.
1. Set **Code** to an appropriate and unique value (all uppercase, use underscores for spaces).
    * Example: MODERN_SQUARES
1. Set **Label** to the code's human-readable equivalent (use title case).
    * Example: Modern Squares
1. Click **Save**.

The book theme name is created.

# Create a Theme #

A book theme consists of a theme code, an aspect code, and a snippet code. Associate these as follows:

1. Click **Book Theme**.
1. Click **Add New**.
1. Set **Theme Code** to the name of the theme.
1. Set **Aspect Code** to the aspect of the theme (all aspects must be unique per theme).
1. Set **Snippet Code** to the snippet associated with the aspect set in the previous step.

Repeat these steps until all required aspects (colour scheme, page layout, list style, etc.) for a theme are set.

The new theme is created.