Template:BookCat/doc

This template puts the page on which it's used into appropriate categories, based on certain page-naming and page-categorization conventions.

Usage
When used without parameters, it
 * places subpages of a book in the book's category and sorts them by chapter name.
 * places a book's templates in the book's template category . This only works if a book's templates begin with.
 * places a book's template category in the book's category and in.
 * places any other category in its parent, sorted by the category's last name. The parent has the same name except removing everything from the last slash on; and the last name is the part that was removed after that last slash.  For example,   would go in    with sort key.

Parameters
Optional parameter   changes the behavior on book pages, so that a book page with more than one slash in its name is placed in a subcategory of the category where its parent page would be placed, sorted by the page's last name. For example, using   on page    would put that page in    with sort key.

Optional parameter   changes the behavior on template pages to deep filing (so    would go in  ).