Book tool/Help/Books/for experts
This page is kept for historical interest. Any policies mentioned may be obsolete. If you want to revive the topic, you can use the talk page or start a discussion on the community forum. |
This page gives experienced users details on the advanced functions of the Book tool. Among other things it explains how the layout of books can be improved and how books are stored on Wikipedia.
Adding articles to a book
editAdd a particular revision to your book
Older revisions of a page can be added to a book collection instead of the current version by using the history tab. By choosing loading the relevant older revision from the history page, the wiki page can added to the book in the same way as before, by clicking the "Add wiki page" link in the menu on the left. (See the step by step guide for more help). If an older revision has been added, this specific revision will always be used. If you add the most current version of a wiki page, always the latest revision will be used.
Add the entire contents of a category in one click
To add the entire contents of a category in one click first navigate to the relevant category page. Then click the "Add category" link in the "Create a book" section of the menu on the left hand side.
Saving books
editFormat of stored book pages
A book with the title "My book" and the subtitle "Example", with two chapters named "Foo" and "Bar", each containing three articles, with the last article having a fixed revision number would be shown using the following syntax.
== My Book == === Example === ;Foo :[[First article]] :[[Second article]] :[[Third article]] ;Bar :[[Fourth article]] :[[Fifth article]] :[{{fullurl:Sixth article|oldid=20}}Sixth article version:20] [[:{{ns:category}}:Books]]
You can also create books without the use of the input box and Special:Books page. The wiki syntax to use is:
Title | The title is contained in double equals signs.
Example: |
Subtitle | The subtitles is contained in three equals signs.
Example: |
Chapter headings | Chapter headings are preceded with a semicolon.
Example: |
Add an article | An article is inserted as a wikilink after a colon.
Example: |
Use a fixed article revision | To use a fixed revision of the article you can use:
Example: |
Renaming of articles | You can use a pipe ('|') to rename the article in the book.
Example: |
Location of books
Books can either be saved in the user's namespace [[User:Name/Books/Bookname]] or as a community book at [[Wikipedia:Books/Bookname]]. All books are grouped into the Category:Wikipedia:Books.
Loading books
editEach wiki page that is a member of the category Category:Wikipedia:Books can be loaded by clicking the "Load book" link on the left hand menu on the page.
Improving the book layout
editSome wiki-markup can lead to problems in the generation of PDF documents as part of the book feature.
Templates and specific contents
editThis page is outdated, but if it was updated, it might still be useful. Please help by correcting, augmenting and revising the text into an up-to-date form. |
Templates will be displayed differently in the PDF version compared to how they look in the online version of an article. This can be fixed by either substituting the current template or removing the template from the content that cause problems in the PDF. As a rule of thumb, all content (especially templates) that is not useful for an offline version of the document, should be excluded from the print version.
There are four ways to resolve issues caused by templates:
1) Exclude templates
A template can be excluded from content by adding it to the Category:Exclude in print.
Note: Many templates use other templates to function. Therefore groups/types of templates can be excluded by adding the commonly used template to this category. This feature is currently broken.
2) Exclude certain specific content
By using {{Hide in print}}, certain specific content, such as a few words or an image, can be excluded from printing.
This content will be printed.{{Hide in print|This content will not be printed.}}This content will be printed.
3) Include certain specific content only in print versions
The {{Only in print}} can be used to insert content that shall only be visible in offline versions.
Example: print this and display it in the browser {{Only in print|this is only in PDFs or printed books visible, *not* with the browser}} this is visible in the browser and in print as well.
4) Substitute templates
You can create a print version of a template under the name "TEMPLATENAME/Print" with TEMPLATENAME being the name of the original template.
5) Use CSS
Elements in class "noprint" are not included in the output.
Dealing with source code
editDon't use the <pre> tag, but use the source tag. You also should consider breaking long lines. The PDF renderer does include a code prettifyer.
Do not insert an image just before the source code, since source code would be printed over the bitmap. In other words, source code doesn't wrap around an image (that is with the version of May 2009).
Multi-wiki Books
editUsing the extension it is currently impossible to create a collection of content from multiple different wikis. However this page shows how to create a book containing articles from multiple wikis.
See also
edit- Book tool/Help/Books for a step by step guide to creating a wiki book
- The Book FAQ
- Feedback - for reporting and tracking of bugs