Export the handbook 2.0 to HTML and PDF
For 2.0, we are dropping the addition of PDF files of the handbook or each locale. Instead we we will add an HTML version of the handbook. This will reduce space usage with more than 30%.
Currently we have a turn key solution already to make a print friendly version of the handbook in one page but work is needed:
* Add a TOC
* Process the links and turn them into anchored links
This work can be done with Javascript. The final result will be one HTML page with css and images. (no javascript)
Comments
The Table of Contents is in. Next up the anchored links.
With that you mean those intra-page links, and lings into a pages using those #name anchors, right?
Guess the difficult part about those is to make them unique.
Yes it comes in two steps: make them unique first using the node id (nid), next rewrite the node/nid urls to point to the unique anchors.
So here is the first PDF version of the English handbook created with wkhtmltopdf:
$ wkhtmltopdf toc http://musescore.org/en/print/book/export/html/36546?pdf handbook-2.pdf
Here is the resulting pdf: http://bit.ly/1AO3LqW
The wkhtmltopdf tool gives us a nice TOC which also works out nicely in PDF viewers.
ToDo:
* improve the css
* add a cover page to the pdf
change of plans? In #1 you wrote that we're not going to create and distribute a PDF, but instead a one page HTML?
Then again the single page HTML (actually mht) is 11.3 MB, the PDF just 5.7, so the 'save space' argument seems mute...
First goal was to export to HTML, second goal to create a PDF which people can download from the website. If we were going to include something in MuseScore, it would be HTML which get loaded in the Qt Help system. But that will be for some time after the 2.0 release. Users will either have to consult the online handbook in chapters, or in one page or download the PDF.
I see, thanks
Checking the TOC styling as made by Allan Carpenter at http://musescore.org/en/node/15272, it's clear the current TOC can still be improved a lot. Basically the toc can be styled via an xsl stylesheet as explained the wkhtmltopdf docs. If someone feels up to the task, please don't hesitate to help.
We missed the page numbers in the PDF. Let's check the wkhtmltopdf docs: http://wkhtmltopdf.org/usage/wkhtmltopdf.txt
Looking for this?
As an example specifying --header-right "Page [page] of [toPage]", will result
in the text "Page x of y" where x is the number of the current page and y is
the number of the last page, to appear in the upper left corner in the
document.
Fixed. https://github.com/lasconic/updateHandbook/commit/fa21c93f63c8d338c57c1…
The page number is now displayed at the bottom right
Is it possible to have it on the outer side, i.e. left on even, right on odd pages?
If that isn't possible (and I don#t see how), wouldn't it make more sense to center the page number?
This task is finished.
Crosslinking: #45166: PDF handbook, generated on a regular basis, like nightly