Any better way to create MediaWiki numbered lists?

后端 未结 11 1163
梦如初夏
梦如初夏 2021-02-01 13:09

When using MediaWiki\'s markup language, the only thing that I hate is creating numbered lists. The only way I know to create a list is to do something like this:



        
11条回答
  •  南旧
    南旧 (楼主)
    2021-02-01 13:52

    There are a couple of options, but you can start an ordered list from an arbitrary number like this:

    #Item1
    
    Something
    
    
      #Item2

    You can also use "#:" if you don't mind "Something" being indented a lot:

    #Item1
    #:
    #: Something
    #:
    #Item2
    

    There are quite a lot of options with lists, you can find more info on Wiki's Help Pages:List.

    update

    Newer version work more like regular html markup the old syntax will now give you a double indent and will not adjust the start offset, but the following works well, even with the source/syntaxhighlight tag.

    1. Item1
    2. Something
    1. Item2 var a = 1;

    In short everything within the ol tag will have the same indentation and will not be numbered if it is outside a li tag. The following will now work and it mean you don't have to offset groups manually.

    1. Item1
    2. Something
    3. Item2 var a = 1;

提交回复
热议问题