Product SiteDocumentation Site

6.2. Creating a New Document

When creating a new document, Publican allows you to choose between a book and an article. Compared to books, articles have a simpler structure, do not have a preface or a separate title page, and generally tend to be much shorter. Use an article if you intend to write a text with only a few pages. For larger documents, it is usually better to use a book.
To create a new book, type the following at a shell prompt:
publican create --type book --name "Document Name" --brand brand
Replace Document Name with the document title and brand with the brand you want to use (typically fedora). Similarly, to create a new article, run the following command:
publican create --type article --name "Document Name" --brand brand
Additionally, you can specify the --lang option followed by a language code (such as pt-BR or cs-CZ) to write the book in a language different than English.
The publican create command creates a new directory named Document_Name. This directory contains the publican.cfg configuration file and another directory named after the language code (that is, en-US/ by default), which contains boilerplate files as described in Table 6.1, “Files Created By Publican”.

Table 6.1. Files Created By Publican

Book Article Description
Document_Name.ent Document_Name.ent Contains local entities, such as YEAR and HOLDER, that are used in the copyright notice.
Document_Name.xml Document_Name.xml The main XML file that includes other files. Articles are usually written in this file.
Book_Info.xml Article_Info.xml Contains the document metadata, such as the title, subtitle, product name, or abstract.
Author_Group.xml Author_Group.xml Contains information about the document authors, editors, and other contributors.
Revision_History.xml Revision_History.xml Contains the revision history. Publican uses this file when it creates an RPM package.
Preface.xml Contains the default preface. Articles do not use this file.
Chapter.xml Contains a template of the first chapter. Articles do not use this file and a similar template is included in the main XML file instead.