When authoring a book, you will be provided with an account into a CVS repository. Since all the source files for your book are text files, CVS provides us with a ready-made solution that makes it possible for all the people involved in your project to collaborate freely.
File Structure
Each chapter of the book should be stored in its own directory inside the root of the repository. The directory should be named according to the chapter title, so that it can be easily told apart from the other chapters in the book. For example, if your chapter's title is “Extending Web Services,” the directory could be called extending_web_services. Note that, at this stage, we do not assign a chapter number in any form—this is done automatically by our software when it generates the final PDF of the book, depending on how we order each chapters in the layout phase.
The chapter's source file should be stored inside the directory and given the name chapter.src.txt. This will make it readable to any text editor on your end, while on our end the system will recognize it and compile it.
The chapter's directory can also contain an optional figures sub-directory, which can be used to store figures for the chapter.
You should always use a UTF-8-compliant text editor to create your text files. This will ensure that all special characters are encoded properly for our system to read.
=t= tag is used to indicate the beginning and end of the title.
Note that you cannot have any line breaks inside the title. Also, the title should be followed by an empty line.
The Body
Once you have completed the masthead, you can move on to the body of the chapter. Here, there are only a handful of rules to keep in mind.
First of all, for the most part you can type your text directly as if you were using a word processor; if you need to use characters outside the standard ASCII set, such as accented letters, em-dashes, and so forth, you can type them directly without having to worry about special encoding. On those operating systems that do not support extended character sets natively, most editors usually provide key combinations that make it possible to enter them anyway.
In any case, you need to ensure that, if you use non-ASCII character, your text editor is capable of saving files in UTF-8 format. This is very important, as our system may be unable to properly display your text otherwise.
Other than this particular precaution, there is very little that you need to worry about; paragraphs in your text are separated by two newline characters (in other words, press Enter twice and you've started a new paragraph), and there is no need to indent the first line of a new paragraph.
Formatting Text
Our system supports three types of inline text format:
Monospace text is enclosed by two single quote characters at each end. For example: ''monospace!'' becomes monospace
Headings
Headings (like the one above this line) are used to break up your chapter into smaller units that the reader can use as reference points to navigate the text. For book chapters, Ceres recognizes three levels of headings, identified by the =n= tag:
Headings are designed to be nested—you cannot jump from a level-1 heading directly to a level-3 heading, or the system will generate a compilation error.
Lists
Ceres only supports unordered lists. A list block is identified by a line that starts with a dash, followed by a space. For example:
This is normal text.
Floating Elements
“Floating elements” are elements outside the normal flow of your chapter's body. These include code listings, tables, figures and callouts.
In our design template, floating elements are actually anchored to the paragraph that precedes them. This makes the term “floating elements” a bit of a misnomer, since listings, tables and figures are rendered inline with the text. You should keep this in mind when writing your chapter, so that you can position these elements accordingly. For example, if you want to introduce a listing, you can reference it as “the listing below,” and then immediately follow that with the listing itself.
Code Listings
Code listings are encapsulated by a <code> tag, which must be on a line of its own:
<code> tag. The list is too long to include here, but chances are that any language you may need to highlight is actually supported by Ceres—including SQL, XML and HTML.
IMPORTANT: code listings should be wrapped at 70 characters.
Tables
Tables can be inserted directly in the body of your chapters using a syntax that is very similar to HTML (but much simpler and stricter). Here's an example:
align=“center” or valign=“top”, you simply specify one of left, right, center for horizontal alignment and top, bottom and middle for vertical alignment. As you can see above, the aligment parameters can be used to align both table cells and the table itself.
Here's what the table above will be rendered like:
| Position Name | Level | Salary |
|---|---|---|
| CEO | Senior | €100,000 |
| Vice President | Senior | €90,000 |
| Senior Architect | Senior | €70,000 |
| Developer | Intermediate | €50,000 |
Images
Images and figures can be embedded in your chapter by using the {{figure}} tag:
figures folder and reference them by filename only.
Note that any images you send must be in one of the following formats: GIF, PNG, JPG (RGB only), TIF (RGB only), BMP, EPS and PDF, with a minimum resolution of 300 dpi. Our preferred formats are TIF (using a lossless compression format) for rasterized images and EPS for lineart.
Here's an example:
{{sidebar, followed by a space and the title of the sidebar. You can then press ENTER twice (as if you were starting a new paragraph), followed by the body of the sidebar, which can contain pretty much any other formatting element, with the exclusion of another sidebar.