User:Tpt/Book

Abstract
Wikibook and Wikisource are two wikis that don't provide content based on the "article" entity but on a book entity that regroup more than one page. But MediaWiki software is done to provide a powerful system for a article-based contents. So Wikibook and Wikisource need a way to say to the software "this group of page is a book", but It's not possible currently. The goal of this proposal is to implement a MediaWiki extension that add to MediaWiki the support for the book entity and that will be usable by both Wikibook and Wikisource projects and inspired by the epub file standard.

Requirements

 * 1) This extension must be adapted to both books written by contributors (Wikibook) and books written by some people and only reproduce in the wiki (Wikisource). So we need to say to the extension "this book is written by XXX" or "This book is written by the contributors of its parts". This can be done by providing metadata in the main page.
 * 2) This extension must be adapted to Wikisource workflow ie the proofreading system managed by the ProofreadPage extension. The ProofreadPage transclusion system must be compatible with this new extension.
 * 3) The extension must allow a petty easy migration from the current system and keep history of content.
 * 4) The extension must provide an easy way to export content offline using standards like epub.

Main idea
A book is, I think, mainly the regrouping of some parts contains in pages around a main page that contain metadata about the book (title, subtitle, Universal Decimal Classification identifier...), an introduction, a conclusion and the list of its parts. So, a good way to implement book structure is maybe to provide a standardized way to set up metadata, list of chapters, introduction and conclusion in a Mediawiki page and put the parts of the books in sub-pages of this page.

The main page is not a standard main page with only a field of free text but structured page. The edition system shows inputs for setting metadata, wikitext fields for the introduction and the conclusion of the book and a place to setup easily the table of contents. This table of content is a tree of links with their labels, this links must points to a subpage of the main page and can contain anchor to point to a specific title of the page. The rendering of the page from these data is done by the extension but the html output must be design to be easily styled by wikis that want to keep their own graphic chart.

The others pages are subpages of the main page, and they contain free wikitext as usual (in this wikitext we should can, between other thinks found instruction of transclusion from Page namespace of Wikisources). The main page edition mode may provide a wait to edit subpages without leaving the main page. A navigation system is setup automatically by the extension in order to allow an easy navigation inside of the book.

The rendered mainpage may also contain a toolbar in order to export the book in pdf and epub. This export may be done by Collection or by an improved version of Wsexport.

Technical proposal
TO BE WRITTEN