6. Understanding Layout#

Before you get started creating a new Textbook, you must familiarize yourself with the layout of the OPE template. There are three different parts of the OPE template:

  1. Textbook Content (tb)

  2. Lecture Notes (ln)

  3. Lab Manual (lm)

The files associated with each will contain the two letters that appear in parenthesis above. For example, files associated with textbook content will have tb in the file name (such as tb_config.yml). Going forward in this guide, xx will be used to refer to a file that is not specific to any of the three, but rather all of them (such as xx_config.yml).

6.1. Important files#

  • Makefile: The top level Makefile automates the tasks of building and publishing the book content. This includes the textbook, the lecture notes, and the lab manual. You can see a list of build targets by running the “Make” command in the same directory as the Makefile.

  • xx_config.yml: This config file is used to change book settings such as: title, author, logo, URL to publish to, and jupyter extensions you would like enabled, etc.

  • xx_toc.yml: This file is used to modify the different sections of the book. In the section labeled parts, you can add a new section by specifying it’s caption (name of section), whether it is numbered or not, and then you may specify the different sub sections within that section by specifying the files associated with that subsections content.

    • The caption name does not have to be the same name as the directory containing the content for that section (ex. part1 does not have to have the caption: ‘part1’)

    • The basic layout for a section is as follows:

     - caption: 'Name of section'
        numbered: true
        chapters:
        - file: directory/file
    
  • intro_xx.md: This file is used to create the landing page for the textbook. The content within this file will be the first page displayed when accessing the textbook, lecture notes, or lab manual.