Wikibooks:Reading room/Proposals/2020/October

Proposal: add features that support ebook writers better
Hi there, on the general discussion yesterday I mentioned that I would find it useful to have many of the features of Wikisource available here. This would allow creation of books that feel like books, and export well to epub / mobi formats. Specifically we could support: Wikisource has developed all of this to support replicating books. Most ebooks have copied this formula more or less as they are produced with print editions. Wikibooks could offer these features as a option for book developers who believe their audience is primarily offline rather than online.
 * optional narrow single column formats;
 * optional serif fonts for body text
 * Differing styles for headings and so on (not always underlines)
 * easy navigation bars (last page, next page)
 * optional export links to common ebook formats

I suspect the work involved is not too great, as the code should already exist. But I can't say for sure, some things like layout options might break some pages and need to be enabled case by case therefore. Similarly many Wikibooks won't export well to epub due to the way tables are not properly supported by many readers.

I think this could open Wikibooks usage to a lot more use cases. I am certainly missing being able to do things along these lines for some book ideas I have, like sample language readers and dual language readers for learners. These don't suit Wikisource as they're incomplete extracts, potentially with editing or simplification, but don't work too well here because the destination format is not currently well supported. JimKillock (discuss • contribs) 07:57, 22 April 2020 (UTC)
 * Jim, has a lot more templates for formatting text. Have you poked around there to see what our sister project has for formatting in a MediaWiki context? —Justin ( koavf ) ❤T☮C☺M☯ 08:25, 22 April 2020 (UTC)
 * Yes absolutely, I have been doing a chunk of work there and that is what prompted me to make these suggestions. Is it just a question of me going ahead and copying templates over? or should I suggest which might be brought over and why? (That said I've not investigated the way the page formatting templates work, perhaps these are also imply traditional templates.) JimKillock (discuss • contribs) 17:14, 22 April 2020 (UTC)
 * I am active in Persian Wikibooks and there these two issues are on rise, too: Author rights and issuing books. I believe that writers and editors in Wikibooks differ with writers and editors of Wikipedia. In Wikibooks authors are eager to register their names (or usernames as nicknames) on a separate page inside the book, e.g. Wikijunior:The Elements/Authors and Wikijunior:Ancient Civilizations/Authors. Considering practices for issuing knowledge, Wikibooks is different from Wikipedia, too. Print version is a feature more important for Wikibooks than Wikipedia as the content of Wikibooks is supposed to be used by learners (better called readers) who may prefer an offline version of the book. In my opinion, PDF version is good enough as it can be converted to epub just by one click using softwares even available online. --Doostdar (discuss • contribs) 18:11, 22 April 2020 (UTC)
 * I don't personally agree that pdf » epub conversion is a great idea (epub is basically html so Wiki to epub is natural where PDF’s basis in postscript does not convert so well back to html); but luckily we don't have to choose; Wikimedia already has the tools. The question then is how to make exports easy for readers who are more likely to want that as you say.
 * I really like the way Italian Wikisource have enabled exports for instance, see this example I was recently shown. JimKillock (discuss • contribs) 19:16, 22 April 2020 (UTC)
 * We certainly can copy templates: they are all freely licensed. It's usually better to have someone with the appropriate user rights to do this via Special:Import. I brought up Wikisource only because you may be able to identify existing solutions to some of these problems you raise. —Justin ( koavf ) ❤T☮C☺M☯ 19:37, 22 April 2020 (UTC)
 * Thank you Justin, that is very helpful. JimKillock (discuss • contribs) 21:42, 22 April 2020 (UTC)
 * There are some differences between the provisions for css on different projects, which probably should be kept in mind when contemplating introducing advanced formatting from another project. This may both complicate things and allow some interesting new techniques.  (Alas, I have some awareness of the Wikibooks infrastructure, and more about the Wikinews infrastructure, but no past experience with the Wikisource infrastructure.)
 * Different projects may have very different approaches to their customized css. Wikisource appears to have a very small, simple common.css; either there must be some additional css, perhaps induced somewhere by javascript, or perhaps it's all done using javascript instead of css.  Wikibooks does a lot more in its common.css, a lot of it arranged modularly in subpages.  (For contrast, the Wikinews common.css is all on the one page, which makes it considerably harder to read.)
 * Wikibooks has book-specific css pages: our common.js checks for the existence of a subpage for the book, and imports it if found. (Then again, Wikinews has page-specific css pages, also checked for and imported by its common.js.)
 * The javascript infrastructures are also different between projects. Wikibooks common.js provides for both book-specific and page-specific javascript pages, and its common.js is largely modular.  The page-specific javascript, btw, is key to the dialog tools, and was adapted from Wikinews &mdash; changing the naming-convention for the page-specific javascript pages, because the Wikinews convention conflicted with the modularity naming-convention of Wikibooks.  (Yes, the Wikinews common.js is all on one page, yes that makes it very hard to read, and yes I have considered modularizing it.)
 * --Pi zero (discuss • contribs) 01:31, 23 April 2020 (UTC)

Interesting post Pi zero, but some comments on it:
 * I believe that the bulk of the Wikisource site-css is at MediaWiki:Gadget-Site.css. For some reason some mediawiki wikis use this file rather than the common.css used by others; see mw:Manual:CSS.
 * Custom CSS is now rather easy due to TemplateStyles: see mw:Extension:TemplateStyles. The chief advantage over perbook css is that you don't need admin access to edit, making it easier for most users; also it can be added to any page without the need for it to correspond to a particular book. Despite the name, TemplateStyles can be applied to non-template namespaces, and I have created Template:TemplateStyles/Oberon/styles.css to do so.
 * But if custom JS is needed it still needs to be done through perbook JS. -- Jules (Mrjulesd) 12:48, 23 April 2020 (UTC)
 * I'm interested to hear where the css might be hiding in the Wikisource infrastructure. (Yes, I'm familiar with this sort of use of gadgets.) --Pi zero (discuss • contribs) 18:03, 23 April 2020 (UTC)
 * Well it does actually hide in MediaWiki:Gadget-Site.css; despite its name it actually contains the bulk of the site-wide CSS. A similar situation is with the www.mediawiki.org site; if you look at mw:MediaWiki:Common.css its empty, and its site-wide CSS is actually held at mw:MediaWiki:Gadget-site.css. The reason given for this is that "MediaWiki.org controls site CSS with the Gadgets extension, so MediaWiki:Gadget-site.css is used in place of MediaWiki:Common.css. This results in a slightly different load URL." -- Jules (Mrjulesd) 18:29, 23 April 2020 (UTC)
 * What is the right thing for me to do to move this forward? Should I make a list of templates I would like to have moved over? JimKillock (discuss • contribs) 10:17, 25 April 2020 (UTC)
 * That could help to make it all more concrete; we've probably taken the purely abstract discussion of project infrastructures about as far as it can go. --Pi zero (discuss • contribs) 12:09, 25 April 2020 (UTC)
 * OK, so here we go, these would be the things I would suggest as a start:
 * s:Template:Default_layout » allows differing page layouts to be displayed by default;
 * s:Help:Layout » explains the layout system, which I don't understand behind the scenes however
 * s:Template:Larger » allows non-underlined headings of varying sizes
 * s:Template:Smaller » allows text of smaller sizes than body text
 * s:Template:Header » creates title display area with key info, plus navigation back / forward
 * s:la:Formula:Titulus » Creates a title area for a front page, also used by ebook exports for front page material AFAICT;
 * s:la:Formula:WSExport » Presents a series of export formats for a given book
 * Yikes. That does look rather... involved.  It appears, at first blush, also to have some assumptions built into it about uniformity across the project, that are true for Wikisource but wouldn't be for all of Wikibooks.  I hope I'll have a chance to take a closer look sometime in the nearish future... --Pi zero (discuss • contribs) 16:05, 25 April 2020 (UTC)
 * Thanks, I guess it is the layout system that looks complex. If there is a simpler way of achieving the goal of a narrow column plus serif fonts, maybe we could consider that?
 * The other templates ought to be quite simple (I could be wrong).
 * Thought I would flag that it'd be good to think of a simpler way to get the desired result – I don't want to make this stall! If I can help in any way, please let me know. I can bodge around CSS a bit. JimKillock (discuss • contribs) 08:08, 29 April 2020 (UTC)
 * See the list above, but especially s:la:Formula:Titulus; now in active use, eg Ólim JimKillock (discuss • contribs) 22:13, 3 May 2020 (UTC)

Hi ; I thought I would ask as it has been a month since we last spoke whether you'd been able to think about the practicalities of doing this a bit more? JimKillock (discuss • contribs) 07:49, 3 June 2020 (UTC)
 * Hey, did you have time to think about this a bit more? I have a bunch of projects I feel would only work with something along these lines which I am holding off while we decide what to do.
 * If the answer is that it is too difficult given how Wikibooks is set up, then I think we need to know, perhaps for instance to consider a clone of Wikisource for ebook production. EWikibooks? JimKillock (discuss • contribs) 11:40, 2 July 2020 (UTC)
 * Very much hoping someone can help / respond. I have a couple of projects where I want to combine English and Latin for e-book export. These fall outside of the Wikisource criteria - they would either reprocess / correct / add accentation, add new translations, link to musical content, etc.
 * If I can't do this on Wikibooks, then I cannot see how to develop these projects on a Wikimedia platform. Yet surely this is exactly what Wikibooks is for. So I am at a loss and now a little disappointed that we are unable to come a clear answer - even a firm "no" after three months. JimKillock (discuss • contribs) 12:16, 9 August 2020 (UTC)
 * /me hopes to take a close look at this tomorrow. --Pi zero (discuss • contribs) 00:34, 10 August 2020 (UTC)
 * quick mention in case you have time to take another look! JimKillock (discuss • contribs) 06:55, 22 October 2020 (UTC)