Wiki source code of Numbered Headings Macro

Last modified by Leon Poon on 2023/05/16 13:23

Show last authors
1 Insert the following in your page to have the headings automatically numbered:
2
3 {{code}}
4 {{numberedheadings/}}
5 {{/code}}
6
7 To extend this to the whole wiki,
8 * edit objects of page Macros.NumberedHeadingsStylesheetExtensionMacro
9 * navigate to the XWiki.StyleSheetExtension object
10 * choose "Use this extension" : "Always" instead of "On demand"
11 * Then all headings will be numbered without need of adding the ~{~{numberedheadings/}} in each page
12
13 Sample result :
14
15 {{numberedheadings/}}
16
17 = title 1 =
18
19
20 == Title 2 ==
21
22
23 === toto ===
24
25 === titi ===
26
27
28 = hello =
29
30
31
32 == title ==
33
34
35
36 [[image:numberedheadings.JPG]]