We describe the programmatic structure of the content.
Global directory structure
A collection of Ximera activities should be organized as a single directory that contains
- All the activities, with activities that are directly related located within distinct own directories.
- A preamble file, if it is needed.
- A
xourse
file at the top level of the directory.
As an example, see our directory for calculus. In this directory, the preamble is
called preamble.tex
, each collection of related activities are in their own
directories, and these activities are collected via xourse
files, for example
calculus1.tex.
Activity directory structure
Each collection of activities that would form a ‘‘section/chapter’’ of a book should be located in their own directories. In some sense the author should imagine these as being self-standing. As an example check out this collection.
Ideally the directory containing the activity would contain all the documents needed to understand and (re)produce the activity from an authors point of view. Other files that might be included could be: PDF’s of papers, Mathematica documents that were used to develop examples, etc.
Document structure
Each activity has the following document structure:
\documentclass{ximera}
\input{../preamble.tex}
\title{A title}
\begin{document}
\begin{abstract}
Write an abstract.
\end{abstract}
\maketitle
The body of the document.
\end{document}
With the mooculus
project, we have additional, optional structure added. See
digInInstantaneousVelocity.tex
Xourse
The xourse
file ‘‘glues’’ all of the activities together. The basic structure of a xourse
file is:
\documentclass{xourse}
\input{../preamble.tex}
\title{The title of the book}
\begin{document}
\maketitle
\activity{myFirstActivity/myFirstActivity.tex}
\activity{aGreatSecondActivity/aGreatSecondActivity.tex}
\activity{anotherActivity/anotherActivity.tex}
\end{document}
Note, while any names can be used for directories and files, we strongly encourage you to use names that are ‘‘obvious’’ from the point of view of someone who is a user of your project. The course file for calculus1 is located at the top-level of calculus.
Publishing textbooks
To obtain a ‘‘fancy’’ layout of your textbook, we suggest a custom package, for example here are the style files. Creation of a style file is beyond the scope of this document.