A Wikibookian suggests that Help:Print versions bemerged into this chapter. Discuss whether or not this merger should happen on thediscussion page. |
In a previous chapter we discussed how to print a Wikibook, assuming a "print version" or "PDF" or "collection" has already been set up.
But what do you do when you want to print out a complete Wikibook, but none of them have been set up yet?Be bold and do the setup yourself. Here's how.
Print versions are pages which contain all the pages of the book, as well as any other information that should be added to the print version. Print versions are created by creating a new page for the print version, say book name/print version, and then transcluding every page in the book, in the order in which you want them to appear. So if a book calledbook had the pagesA,B, andC, and you wanted to have the print version contain the pages in that order, then on your table of contents page you would add
{{Print version|book/print version}}near the top to make it display the print version box on the page. Then you would click on the link to the page and put in
{{:book/A}}{{:book/B}}{{:book/C}}and it should include the pages when you click show preview or save.
See alsoHelp:Print versions
There are a few ways that you can create PDF versions.
From theprint Version seen above, click on File, Print (or CTRL + p) and choose to print into a PDF file.
You can save the print version the HTML file and export to PDF, wkhtmltopdf does this directly in one single command.
# basic usage$ wkhtmltopdf https://en.wikibooks.org/wiki/Using_Wikibooks/Print_version Using_wikibooks.pdf# with additional setup, eg for margins$ wkhtmltopdf -B 2.5cm -L 2.5cm -R 2.5cm -T 2.5cm https://en.wikibooks.org/wiki/Using_Wikibooks/Print_version Using_wikibooks.pdf
MediaWiki to LaTeX enables book authors to create high-quality PDFs, seeMediaWiki to LaTeX
Any functionality of the Collection extension to create any downloadable files has been decommissioned. It is not known if or when a replacement might come into place.
Wikibooks now has a special extension for grouping individual pages together into a group called acollection. Once a collection has been created, there are three options available:
If we replace the word "Collection" with the word "Book" in the sentences above, we can see a very clear way that this extension can be used here at Wikibooks. In addition to creating an ordinary Table of Contents and a print version, a collection can also be created that will enable PDF versions and published versions to be created quickly for your book.
There are two types of collections:Community collections andpersonal collections. Community Settings are created as subpages ofWikibooks:Collections. Each book should have only one (or a very limited number) of "official" community versions. The community versions can be advertised using the {{collection}} template on the book itself. Sometimes, individual users prefer a slightly different reading order to the material, or like to add additional chapters from a related book, or remove a few chapters, or any number of small modifications. In this case, the user can create their own collection in their user namespace, as a subpage ofSpecial:MyPage/Collections. Private collections can be edited and shared with other users just like a normal wiki page.
Creating a collection is easy. There are two ways to do it:
== Title == === Subtitle === :[[Page1]] :[[Page2]] ;Chapter 1 :[[Page3]] :[[Page4]] ;Chapter 2 :[[Page5]] :[[Page6]] [[Category:Collections]]
The[[Category:Collections]] at the bottom is important because it indicates to the software that the page represents an extension. To see a list of all pages in this category (and therefore all extensions) go toCategory:Collections.
Here are some things that can be in a collection, and the syntax that's used to save them:
Once a collection is generated, either by loading pages into your collection one at a time or by loading an existing saved collection, it can be used in a number of ways:
Once a PDF has been created and uploaded, go back to the TOC and add
{{PDF version|filename of PDF}}which creates the PDF version box on the main page of the book
← Attracting Readers ·Using Wikibooks ·Finding A Wikibook →