Wikibooks:Reading room/Archives/2020/March

Section numbers in Contents.
Hi, can section numbers be suppressed in Contents? My sandbox is an instance. Thanks, ... PeterEasthope (discuss • contribs) 18:48, 25 March 2020 (UTC)
 * User:PeterEasthope/Sandbox doesn't exist. It would be helpful if you provided a link to what you mean. But I think what you're going for is having the table of contents just display "Introduction... History..." instead of "1. Introduction... 2. History..." correct? —Justin ( koavf ) ❤T☮C☺M☯ 19:14, 25 March 2020 (UTC)
 * Justin, the sandbox is at User:PeterEasthope/sandbox and you are correct. -- Jules (Mrjulesd) 20:03, 25 March 2020 (UTC)
 * Nice. Thanks, . If you put CSS on that page that includes class="tocnumber" and set display:none;, that should keep the numbers from appearing. If you need more help than that, let me know. Kind of a drive-by comment but something while I'm distracted. —Justin ( koavf ) ❤T☮C☺M☯ 21:33, 25 March 2020 (UTC)


 * Apparently this is feasible, but not currently. Per mw:Manual:Table of contents ":To do this selectively, a wrapper element can be placed around the TOC, as in on the page, and   at MediaWiki:Common.css."


 * To do this you would have to edit MediaWiki:Common.css, only something an interface admin could do, so for advice on feasibility. -- Jules  (Mrjulesd) 19:22, 25 March 2020 (UTC)
 * OK, I've added  at the top of the page.  No effect. Something is snagged, ... PeterEasthope (discuss • contribs) 21:33, 25 March 2020 (UTC)
 * No it wont work unless MediaWiki:Common.css is edited, something I can't do. However you can try it out for youreslf:
 * (i) create User:PeterEasthope/vector.css with the following text:
 * (ii) Add the line  to your sandbox.
 * You shouldn't see any numbers in your TOC (Table of Contents). However this will only work for yourself; for it to work with everybody MediaWiki:Common.css needs to be edited by an interface admin. Which is why I pinged Pi zero above. -- Jules (Mrjulesd) 22:07, 25 March 2020 (UTC)
 * OK, for me it works as it should. If Pi zero can make the administrative change, good. Otherwise no great harm. I haven't checked a third party account yet but will. Sorry for the slow response; I indulged in some sleep last night. Regards, ... PeterEasthope (discuss • contribs) 15:39, 26 March 2020 (UTC)
 * It'll take me a while to clear some time, and some spare neurons, to grok this properly. --Pi zero (discuss • contribs) 19:45, 26 March 2020 (UTC)
 * OK thanks for looking into it Pi zero. If you want to test it first, create User:Pi zero/vector.css with the text  and then look at the TOC at User:PeterEasthope/sandbox. -- Jules  (Mrjulesd) 22:59, 26 March 2020 (UTC)
 * My sandbox has changed. The page in question now is BootManager but it's a low priority. No need to impose on Pi zero. Thanks, ... PeterEasthope (discuss • contribs) 16:30, 29 March 2020 (UTC)
 * Btw, is this something that it would be reasonable to provide just to the one book? Iirc we're set up to provide book-specific css, which would avoid adding this to the load on all books, most of which won't use it. --Pi zero (discuss • contribs) 18:12, 29 March 2020 (UTC)
 * For my current work, the format of Contents discussed above is only required for the Oberon/BootManager page. It isn't needed elsewhere.
 * A related question: in another page the numbers should appear in the Contents and at the section headings. I might have seen something about that when reading help pages yesterday but can not find it now. How is that result achieved? Thanks, ... PeterEasthope (discuss • contribs) 15:49, 30 March 2020 (UTC)

Font-family
Another detail in a page I'm working on. Please have a glance at Oberon-2 and the source for it (click Edit). The body of the text is sans-serif whereas I want it to be serif. In Firefox the heading is serif, so the display isn't a browser artifact. The text is enclosed in <span style="font-family:serif; ... which doesn't yield the intended result. Ideas? Incidentally, I wonder why the various Wikimedia projects have various documents about editing. There are so many cases where I hunt in the Wikibooks documentation until convincing myself that a question isn't answered. Then eventually find an answer under Wikipedia or MediaWiki. Appears much of the goose-chasing could be eliminated by replacing duplication with links to one central document. Just a thought. Thanks again, ... PeterEasthope (discuss • contribs) 17:05, 29 March 2020 (UTC)
 * Try adding after the section title ; and then   at the end of the section. I've tested this in preview and it works. I could do this for you if you want me to show you. -- Jules  (Mrjulesd) 12:52, 30 March 2020 (UTC) Addendum: actually you can add this to the entire body text (a single open div at the start and close div at the end) and this still works. -- Jules  (Mrjulesd) 12:57, 30 March 2020 (UTC)
 * Thanks! I should have recognized that. ... PeterEasthope (discuss • contribs) 14:15, 30 March 2020 (UTC)