4.3 How to Begin a New Document

The easiest way to begin a new document is to copy the directory for an existing document and then make the necessary changes for the new document. To facilitate this process, the proto-doc directory of the mysqldoc-toolset repository can be used as a basis for a new document. Use it like this (assuming that you are located in the root directory of the mysqldoc repository and want to create a new document directory named my-doc there):

  1. Make a copy of the proto-doc directory named my-doc:

    shell> cp -r ../mysqldoc-toolset/proto-doc my-doc
  2. Change location into the new directory:

    shell> cd my-doc
  3. Rename the proto-book.xml file to the name that you'll use for your document:

    shell> mv proto-book.xml my-doc.xml
  4. Look through my-doc.xml and edit as necessary. For example, change the title to something meaningful.

  5. Edit Makefile to change instances of proto-book to my-doc and instances of PROTO_BOOK to MY_DOC. Also read the other comments in the Makefile and make any appropriate changes.

  6. Update the Makefile to list the correct dependencies for the document:

    shell> make depend
  7. Update legalnotice.lang.xml with the actual copyright date.

  8. Change location a level up to the parent directory, add the new directory to the value of the SUBDIRS variable in the parent directory Makefile.

At this point, you can develop the document further to create its content. Use Section 4.4, “General Document Organization”, as a guide to structuring it.