Hello all,
I am using a wiki to organize development notes and from them create structured systems specifications.
A major benefit of using mediawiki is that I can create purely text documents, which can easily be accessed from low-bandwidth locations. Also they can easily fit into software distributions as "readme" files.
The only down side is that the topic headers in the text do not have the same numbering structure that the topics do in the table of contents, so it is hard to follow the document structure in a text file.
How would I go about printing the numbering seen in the table of contents in front of the topic headings in the main text?
Also, I might mention that most systems specification styles require that the numbers be in the text, though that is only unnecessary in non-hypertext documents.
Thanks in advance, John
Add .tocnumber{display:none;} in your css and then put the numbers you want in your wiki headers.
-----Original Message----- From: mediawiki-l-bounces@lists.wikimedia.org [mailto:mediawiki-l-bounces@lists.wikimedia.org] On Behalf Of John van V. Sent: Thursday, August 07, 2008 11:27 AM To: mediawiki-l@lists.wikimedia.org Subject: [Mediawiki-l] Printing Section Header Numbers
Hello all,
I am using a wiki to organize development notes and from them create structured systems specifications.
A major benefit of using mediawiki is that I can create purely text documents, which can easily be accessed from low-bandwidth locations. Also they can easily fit into software distributions as "readme" files.
The only down side is that the topic headers in the text do not have the same numbering structure that the topics do in the table of contents, so it is hard to follow the document structure in a text file.
How would I go about printing the numbering seen in the table of contents in front of the topic headings in the main text?
Also, I might mention that most systems specification styles require that the numbers be in the text, though that is only unnecessary in non-hypertext documents.
Thanks in advance, John _______________________________________________ MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
What will this do? "Add .tocnumber{display:none;}"
Will that remove the table of contents numbers? Why would I want to do that if I want to add them to the main content section?
What will this do? "then put the numbers you want in your wiki headers"
I am not sure you understood my posting; could you please read it again? I would be very grateful for your input if you have knowledge about how the pages are formatted.
Thanks again in advance, John
John van V. wrote:
What will this do? "Add .tocnumber{display:none;}"
Will that remove the table of contents numbers? Why would I want to do that if I want to add them to the main content section?
It will hide the toc numbering.
What will this do? "then put the numbers you want in your wiki headers"
You write them as == 1. Something == == 2. Something more == == 2.1 This wouldn't be caught right by the toc == == 3. Next item ==
If you didn't hide toc's numberm the toc would be double numbered: 1. 1. Something 2. 2. Something more 3. 2.1 Something 4. 3. Next item
-----Original Message----- From: mediawiki-l-bounces@lists.wikimedia.org [mailto:mediawiki-l-bounces@lists.wikimedia.org] On Behalf Of John van V.
What will this do? "Add .tocnumber{display:none;}"
Will that remove the table of contents numbers? Why would I want to do that if I want to add them to the main content section?
What will this do? "then put the numbers you want in your wiki headers"
I am not sure you understood my posting; could you please read it again? I would be very grateful for your input if you have knowledge about how the pages are formatted.
Thanks again in advance, John _______________________________________________
Hi John,
What I understand you want from your first posting is to have the table of contents numbered and have the sections of your wiki article numbered as well. What you really want is the automatic numbering from the TOC to be applied to the headings of each of your sections. I think that is doable, but you also mentioned that in a lot of normal documentation you put the numbers on the headers (i.e. ==1.0 Instructions==, ===1.1 Operating the Whatsamahicket===). I think adding the numbering you want yourself and causing the TOC numbers not to be displayed would be your easiest bet.
Just like what Platonides said.
Do you really want to mess around with PHP to get auto-numbering on your headers? I think that is more error prone that the method I outlined.
-Courtney
On Thu, Aug 7, 2008 at 5:27 PM, John van V. john.van.v@gmail.com wrote:
How would I go about printing the numbering seen in the table of contents in front of the topic headings in the main text?
This is actually a standard option in the preferences ("Misc", "Auto-number headings") of each user. I haven't tested this, but if I believe the documentation [1] you have to add the following line to LocalSettings.php to make this the default:
$wgDefaultUserOptions['editsection'] = 1;
However this will only change this setting for anonymous access and new users. If you already have users, either they have to change this manually or you have to change this directly in the database.
Gruß, Peter Schlömer
[1] http://www.mediawiki.org/wiki/Manual:%24wgDefaultUserOptions
Phew!!
Thanks Peter, I will check it out as soon as I get the opportunity :)
People wrote:
"Just like what Platonides said.
Do you really want to mess around with PHP to get auto-numbering on your headers? I think that is more error prone that the method I outlined."
If I didn't want to "mess around," I wouldn't have asked.
Thanks again, ~~John
Peter Schlömer wrote:
This is actually a standard option in the preferences ("Misc", "Auto-number headings") of each user. I haven't tested this, but if I believe the documentation [1] you have to add the following line to LocalSettings.php to make this the default:
$wgDefaultUserOptions['editsection'] = 1;
The setting should be $wgDefaultUserOptions['numberheadings'] = 0;
On Fri, Aug 8, 2008 at 11:46 PM, Platonides Platonides@gmail.com wrote:
Peter Schlömer wrote:
$wgDefaultUserOptions['editsection'] = 1;
The setting should be $wgDefaultUserOptions['numberheadings'] = 0;
Sorry, I copied&pasted the name of the setting, to be absolutely sure to not mess up the spelling, but I managed to copy the wrong thing AND overlook this obvious mistake. However I suggest a compromise:
$wgDefaultUserOptions['numberheadings'] = 1;
John wants to enable this, after all.
dapete
thanks dapete
However I suggest a compromise:
$wgDefaultUserOptions['numberheadings'] = 1;
John wants to enable this, after all.
dapete
It might be a few days before I can get to trying it
Thanks a lot, put both settings in, and created a mission statement based on my learning about constructivism, synergy, and, well, emotional communication.
Ignore that trade stuff, that is just a step along the way. It has been since early 2002 that I have been paid for technology work.
My real interest right now is helping small local stores use their cash registers to share sales information so they know what people want, how much they want, and they will know what to order. I am thinking "OpenRegister" if that isn't taken.
~~John
PS, it is but by a holder
oops sorry, here is the URL: http://thinman.com/stpwiki
On Wed, Aug 13, 2008 at 12:50 AM, John van V. john.van.v@gmail.com wrote:
Thanks a lot, put both settings in, and created a mission statement based on my learning about constructivism, synergy, and, well, emotional communication.
Ignore that trade stuff, that is just a step along the way. It has been since early 2002 that I have been paid for technology work.
My real interest right now is helping small local stores use their cash registers to share sales information so they know what people want, how much they want, and they will know what to order. I am thinking "OpenRegister" if that isn't taken.
~~John
PS, it is but by a holder
mediawiki-l@lists.wikimedia.org