# Creating a document

This chapter describes creating books and articles: the main configuration files, example document files, and how to build a document.

Use the $ `publican create` command to create a new document, including all the necessary files for the document.

The $ `publican create` command accepts several options, detailed in this chapter. When an option can accept a value, separate the option from the value with a space or an equals sign; for example, `publican create --name New_Book` or `publican create --name=New_Book`.

`--help`

  print a list of all $ `publican create` command options.

`--name Doc_Name`

  set Doc_Name as the name of the book or article. This variable must not contain any spaces. For example, the command $ `create_book --name Test_Book` creates a book named `Test_Book` with all the necessary files to build the book, and sets the `BOOKID` in the `Test_Book.ent` file.

`--lang Language_Code`

  set Language_Code as the language code of the language in which the book or article will be authored. If you do not specify a language code, Publican defaults to `en-US` (American English). The `--lang` option sets the `xml_lang` in the `publican.cfg` file and creates a directory with this name in the document directory. When initially created, this directory contains some boilerplate XML files. Refer to for more information on `publican.cfg` parameters and for more detail on language codes.

`--version version`

  set version as the version number of the product that the book describes. For example, for Red Hat Enterprise Linux 5.1 you would use `5.1`. The default version is `0.1`. The `--version` option sets the `<productnumber>` tag in the `Book_Info.xml` or `Article_Info.xml` file. For more information refer to .

`--edition edition`

  set edition as the edition number of the book. This number indicates to users when a new edition of the book is released. The initial general availability (GA) release of the book should be edition `1.0`. The default value is `0`. The `--edition` option sets the `<edition>` tag in the `Book_Info.xml` or `Article_Info.xml` file. For more information refer to .

`--product Product_Name`

  set Product_Name as the name of the product that the book describes. This variable must not contain any spaces. For example, set this to `Fedora` for core Fedora documentation, and the name of the product for other products, for example, `Fedora_Directory_Server`. The default value is `Documentation`. The `--product` option sets the `<product name>` tag in the `Book_Info.xml` file or `Article_Info.xml` file and the `PRODUCT` entity in the `Doc_Name.ent` file.

`--type Article --name Article_Name`

  create an article instead of a book. Replace Article_Name with the article name. This variable must not contain any spaces. The `--type` option sets the `type` in the `publican.cfg` file. Refer to for more information on `publican.cfg` parameters.

`--type Set --name Set_Name`

  create a set of documents instead of a book. Replace Set_Name with the set name. This variable must not contain any spaces. The `--type` option sets the `type` in the `publican.cfg` file. Refer to for more information on `publican.cfg` parameters and to for details on using sets.

`--brand brand`

  set brand as the brand to use to style the output of this document, for example, `RedHat`, `fedora`, `JBoss`, `oVirt`, or `GIMP`. The default value is `common`, a default brand shipped with Publican. The `--brand` option sets the `brand` parameter in the `publican.cfg` file. Refer to for more information on `publican.cfg` parameters. This option requires the appropriate Publican brand package to be installed. For example, to build Red Hat branded books, you must install the `publican-redhat` package. Refer to for instructions on installing brand packages for Publican. If you do not specify a brand, Publican uses its built-in, default brand. Refer to for more information.

Before running the $ `publican create` command, use the $ `cd` command to change into the directory where you want the book to be created. For example, to create a book named `Test_Book` in the `my_books/` directory, run the following commands:

    $ cd my_books/
    $ publican create --name Test_Book

To see the results of this command on a computer with a Linux operating system, run the following:

    $ ls

The output should be similar to the following:

    Test_Book/

To see the contents of the new `Test_Book/` directory on a computer with a Linux operating system, run the following:

    $ cd Test_Book/
    $ ls

The output should be similar to the following:

    en-US/ publican.cfg