Wikibooks:Reading room/Proposals/2010/January

Book stylesheets
This has actually been brought up at least twice before; in September and November 2007. The former points to (now) n:MediaWiki:Pagecss.js for an implementation and there is good support for the idea. The latter includes it in a wish-list, but there is no further mention of it.

Has there been any progress on this? I would be extremely interested in getting this implemented. --Swift (talk) 06:49, 2 March 2009 (UTC)


 * This has been implemented already as two separate gadgets. A per-book gadget and a personal per-book gadget. --dark lama  08:14, 2 March 2009 (UTC)


 * These gadgets aren't quite what I'm thinking about as they require users to register and opt-in. I take it there has been no further progress past enabling these gadgets. How do people feel about enabling style-sheets that would be used by default? --Swift (talk) 09:50, 2 March 2009 (UTC)


 * OK, can anyone tell me who to bug about this? Just open a bug? --Swift (talk) 01:25, 17 January 2010 (UTC)


 * Well the requirement to be registered and opt-in could be done [away with], but I believe there was some disagreement over doing that. --dark lama  01:31, 17 January 2010 (UTC)


 * What's the deal, Darklama? You've requested this before yourself. It's a good idea, everyone wants it and it can easily be done safely. Why are you being so passive? You know a lot about the technical details of the software and its implementation here at Wikibooks. Let's put it to use and get this implemented. If you're not interested, just say so. --Swift (talk) 03:20, 17 January 2010 (UTC)


 * I am interested in doing it, just seems like there was no consensus to do so. I could just as easily do the reverse where people who don't want it can register and opt-out instead. --dark lama  03:27, 17 January 2010 (UTC)


 * Are you saying that you have the server access to implement this? --Swift (talk) 03:49, 17 January 2010 (UTC)


 * This doesn't require server access, just access to the MediaWiki: namespace. --dark lama  04:12, 17 January 2010 (UTC)


 * Sorry! I don't know what happened to the reply I thought I'd left here. Anyway: Great! Then we can get to work on this.
 * I suggest we implement something similar to the Wikinews but with a single, book-wide stylesheet (trimming $wgPageName to point to the stylesheet). We can start with placing them in the Mediawiki namespace. Users can develop their stylesheets with the gadget and then request that an admin upload it. --Swift (talk) 19:36, 18 January 2010 (UTC)


 * The gadgets we use now are already loosely based on the same principle as Wikinews. Just requires you to be registered and opt-in rather than having to register to opt-out. Ours is a gadget, and I believe Wikinews' is not, that along with books vs articles is the only real difference between what Wikibooks is doing now and what Wikinews does. --dark lama  20:24, 18 January 2010 (UTC)


 * I don't know how to write such stylesheets. Could someone please set up a simple demo showing how to have a wikibook with automatically numbered sections and inter-page references (e.g. "see Section 3.2" where "3.2" is an automatically generated section number of a section on a different page of the same wikibook)? --Martin Kraus (talk) 12:39, 19 January 2010 (UTC)

A way to number sections and subsections and can we get the Labeled Section Transclusion extension installed?
I have searched and searched (and even tried to hack something myself), but there seems to be no way to automatically generate numbers for sections and subsections in a book. By section/sub-section numbering, I mean the common numbering convention whereby a section is numbered X and its subsections X.Y, where both X and Y are integers. This type of section labeling appears in a page TOC, but I can't figure out a way to utilize those numbers in the actual book text. Yes, I know there is a way to turn on numbering in a user's preferences, but that starts the numbering process from 1 on each wiki page. This doesn't work well for books. If there is way to do this that I have just missed, then tell me and I will move this discussion to technical assistance.

Rather than create a separate section, I will also mention another request. Is it possible to get the Labeled Section Transclusion extension installed on Wikibooks? I have created a references template for a book I am planning, but it isn't as efficient as I would like. If the Labeled Section Transclusion extension was installed, I could significantly improve its efficiency. Also, I could support Harvard style references.

One possible way to solve the section numbering problem would be to use Labeled Section Transclusion and wrap each section number in the TOC with something like  />< > />, where < > is the section's name and < > is its number. It would then be possible to reference the number in another page by, where <> is the name of the page on which the book's TOC appears. If there is a concern that making these changes to the TOC mechanism is risky, another magic word might be added (say, __TOCEXPORT__ ) that formats the TOC in the way just suggested, rather than using the standard TOC text format.

Thanks for anyone willing to comment on these requests. Dnessett (talk) 17:38, 30 June 2009 (UTC)


 * I'm not aware of a reasonable way to do section numbers. Of course, I guess you could have one additional page for each section and subsection which just contains the number. In your table of contents, in the section headings and for any references you would just transclude these pages to show the numbers. Problem is, of course, that you have to edit these pages with section numbers manually, which can get cumbersome if you have to change the numbering of many sections. More generally spoken, the problem appears to be that Wikibooks is not a good place to write textbooks that require section numbers, instead most authors use hyperlinks. --Martin Kraus (talk) 08:21, 13 August 2009 (UTC)


 * This could be done with . See Generated content, automatic numbering, and lists in the W3C's CSS specs. --Swift (talk) 01:28, 17 January 2010 (UTC)

Automatic indexing
It would be useful to have a method of automatically creating an index for a wikibook. Perhaps it could be done similar to the way LaTeX does it: a user could place a tag on the page where they want the index to point to, and a bot could automatically generate the index from these tags. —3mta3 (talk) 11:28, 18 August 2009 (UTC)


 * Do you mean an index of sub-page sections? --Swift (talk) 01:30, 17 January 2010 (UTC)


 * Probably more than that: there may be multiple topics in the one section that deserve to be in the index. There could even be multiple indexes: in the LaTeX wikibook it would be useful to have one for concepts and one for commands. –3mta3 (talk) 13:03, 20 January 2010 (UTC)


 * That seems impossible to do automatically in the wiki. One could write an extension and Darklama has thought about this sort of stuff quite a bit. So far it doesn't seem on the horizon. A semi-automatic way would be to add achors, invisible to the reader, that could be parsed by a bot and linked to from an index; but that's another thing I don't see high on anyone's list of priorities. --Swift (talk) 17:01, 20 January 2010 (UTC)

needs more key words
Hi, I'm writing a German Wikibook "Introduction to SQL" Einführung in SQL where I'm using for Syntaxhighlighting, see Extension:SyntaxHighlight GeSHi. Unfortunately, a lot of SQL key words are not highlighted. I suggest to expand highlighting onto the following key word list: Thank you for improvement! -- Juetho (talk) 08:44, 26 October 2009 (UTC)
 * constraint, commit, rollback; before, after, position; begin, end, then, value
 * integer, char, varchar, date, time, timestamp, decimal, numeric
 * extract, year, month, day, hour, minute, second


 * Is there anybody going to listen to my story request? How could one expand highlighting? -- Juetho (talk) 10:32, 21 December 2009 (UTC)


 * Sorry there haven't been any replies yet. Have you tried looking at the MediaWiki syntax extensions. I'm not sure what provides the syntax highlighting but I'm sure you can figure that out with a little research. --Swift (talk) 01:02, 17 January 2010 (UTC)

Sorry, I looked at the extension pages, but I don't understand anything. I cannot find any hint how to add key words into the key word list. My intention is that anyone else can read the correct syntax highlighting – whereever he may use German Wikibooks. I don't want to change the wiki syntax for, but the key word list only. -- Juetho (talk) 16:02, 17 January 2010 (UTC)