Modul:Matematik för årskurs 7-9/Numrering/dok

Från Wikibooks

Detta är dokumentationssidan för Modul:Matematik för årskurs 7-9/Numrering

Documentation for Modul:Matematik för årskurs 7-9/Numrering

This module accepts a piece of text or the name of a page. It acts on angle-bracket tags in the text to simulate an extension of the html/wiki markup set vaguely per WP:Lua requests, the <inc> tag is the first example, replaced with a number that increases each count. You can set or reset the count and rate at any time by <inc i j> where i=the number of that tag and j is the difference to succeeding tags.

The function markup replaces <inc> for an increasing number. The first <inc> translates to 1, the second to 2 and so on. Should be extended to handle multi variable numbering for multiple sets of <inc> tags or <inc> tags of different depth. This could be used to have different numbering for exercises and examples as well as a higher ranking numbering for chapters. But as this won't be used until this book is near complete and a "real" book is to be put together with multiple pages in one this will have to wait. Might be worth doing in two steps depending on how the multiple page book is to be put together.

Warning: does not handle <nowiki> tags at all.