Hi Platonides,

many thanks for the suggestions.

I can see how  {{unitnumber}}.{{sectionnumber}}.{{subsectionnumber}}
would be easily implemented with Variables/Parserfunctions.

I am not sure how one would implement this just using {{thenumber}} -
somehow that template would need to be able to tell which section /
subsection it's in. How would you do that?

Also, how would you implement {{sectionnumberprefix|...}} as an extension?

Many thanks,
Bjoern

On Thu, Aug 23, 2012 at 3:24 PM, Platonides <[email protected]> wrote:
> On 23/08/12 15:48, Bjoern Hassler wrote:
>> Hello,
>>
>> Is it possible to customise the section numbers displayed by the wiki
>> (with the magic word __NUMBEREDHEADINGS__, or through the user
>> preference)?
>>
>> We are developing an open educational resource for African teachers,
>> consisting of several units, e.g.
>> http://orbit.educ.cam.ac.uk/wiki/OER4Schools/3.2_Supporting_reasoning_and_managing_groupwork
>>
>> We'd like to prefix each section within the wiki page with the unit
>> number (3.2 in this case), i.e. change the numbering from 1, 2, 3, ...
>> to 3.2.1, 3.2.2, 3.2.3, etc.
>>
>> One solution would be to implement numbering manually (turning wiki
>> numbering off with __NONUMBEREDHEADINGS__; then using parser functions
>> and Variables extension to reinsert custom numbering), e.g. as
>>
>> = {{unitnumber}}.{{sectionnumber}} My section =
>> == {{unitnumber}}.{{sectionnumber}}.{{subsectionnumber}} My subsection ==
>>
>> However, that's obviously cumbersome. More elegant would be something like
>>
>> = {{thenumber}} My section =
>> == {{thenumber}} My sub section ==
>>
>> where the {{thenumber}} template works out which (sub)section it's in
>> and generates the number accordingly. Even more elegant would be
>> something like
>>
>> {{sectionnumberprefix|3.2}}
>> = My section =
>> == My sub section ==
>>
>> Any thoughts on how one might implement that?
>>
>> Many thanks!
>> Bjoern
>
> It can probably be implemented with ParserFunctions[1] and Variables
> extensions [2]. Although an extension providing the
> {{sectionnumberprefix}} you want should be easy to make.
>
> Best regards
>
> 1- https://www.mediawiki.org/wiki/Extension:ParserFunctions
> 2- http://www.mediawiki.org/wiki/Extension:Variables
>
>
> _______________________________________________
> Wikitech-l mailing list
> [email protected]
> https://lists.wikimedia.org/mailman/listinfo/wikitech-l

_______________________________________________
Wikitech-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Reply via email to