Extension:ComplexList

The ComplexList extension allows you to create complex lists more easily than does the existing MediaWiki syntax that I'm currently aware of from m:Help:List

Usage
After a * there must be a space.

Example A
Unordered lists

&#10004; Using syntax described at m:Help:List


 * Lists are easy to do:
 * start every line
 * with a star
 * more stars mean
 * deeper levels

results in


 * Lists are easy to do:
 * start every line
 * with a star
 * more stars mean
 * deeper levels

&#10004; Using the cl tag

 * start every line * or an indented star * more indents mean deeper levels 
 * Lists are easy to do:
 * with a star

results (or should result) in

  Lists are easy to do:   start every line     with a star   or an indented star   more indents mean deeper levels </li> </ul> </li> </ul> </li> </ul>

Example B
Ordered lists of different list-style-type

<big style="color:red; font-size: 1.5em;">&#10008; Using syntax described at m:Help:List

We must resort to HTML

<ol style="list-style-type:lower-latin"> About the author</li> Foreword to the first edition</li> <ol style="list-style-type:lower-roman"> About the author</li> Foreword to the first edition</li> Foreword to the second edition</li> </ol> Foreword to the second edition</li> </ol>

results in

<ol style="list-style-type:lower-latin"> About the author</li> Foreword to the first edition</li> <ol style="list-style-type:lower-roman"> About the co-author</li> Foreword to the first sub-edition</li> Foreword to the second sub-edition</li> </ol> Foreword to the second edition</li> </ol>

<big style="color:green; font-size: 1.5em;">&#10004; Using the cl tag

 a. About the author i. About the co-author * Foreword to the first sub-edition * Foreword to the second sub-edition </cl>
 * Foreword to the first edition
 * Foreword to the second edition

results (or should result) in

<ol style="list-style-type: lower-latin;">  About the author </li>  Foreword to the first edition <ol style="list-style-type: lower-roman;">  About the co-author </li> <li> Foreword to the first sub-edition </li> <li> Foreword to the second sub-edition </li> </ol> </li> <li> Foreword to the second edition </li> </ol>

Example C
Much-text list-items separated by blank lines to make them easy to read (and edit) in the editing view

<big style="color:red; font-size: 1.5em;">&#10008; Using syntax described at m:Help:List

<pre style="overflow:scroll;"> do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laboru
 * 1) Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed

accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt.
 * 1) Sed ut perspiciatis unde omnis iste natus error sit voluptatem

consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur?
 * 1) Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet,

results in


 * 1) Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laboru


 * 1) Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt.


 * 1) Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur?

<big style="color:green; font-size: 1.5em;">&#10004; Using the cl tag

<pre style="overflow:scroll;"> <cl> (a) Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laboru accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur? </cl>
 * Sed ut perspiciatis unde omnis iste natus error sit voluptatem
 * Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet,

results (or should result) in

<ol style="list-style-type: decimal;"> <li> Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laboru </li> <li> Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. </li> <li> Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur? </li> </ol>

Example D
To put multiple paragraphs into a single list item:

<big style="color:red; font-size: 1.5em;">&#10008; Using syntax described at m:Help:List


 * 1) list item A1
 * 2) list item A2
 * continuing list item A2
 * further continuing list item A2
 * 1) list item A3

results in


 * 1) list item A1
 * 2) list item A2
 * continuing list item A2
 * further continuing list item A2
 * 1) list item A3

<big style="color:green; font-size: 1.5em;">&#10004; Using the cl tag

<cl> 1. list item A1


 * list item A2

continuing list item A2

further continuing list item A2

</cl>
 * list item A3

results (or should result) in

<ol> <li> list item A1   </li> <li> list item A2           continuing list item A2            further continuing list item A2    </li> <li> list item A3   </li> </ol>

Example E
To include a single-line pre block in a list item

<big style="color:green; font-size: 1.5em;">&#10004; Using syntax described at m:Help:List


 * 1) list item A1
 * 2) list item A2&lt;/pre>
 * 3) list item A3

results in


 * 1) list item A1
 * 2) list item A2
 * 3) list item A3

<big style="color:green; font-size: 1.5em;">&#10004; Using the cl tag

<cl> 1. list item A1 </cl>
 * list item A2&lt;/pre>
 * list item A3

results (or should result) in

<ol style="list-style-type: decimal;"> <li> list item A1    </li> <li> list item A2    </li> <li> list item A3    </li> </ol>

Example F
To include a multi-line pre block in a list item

<big style="color:red; font-size: 1.5em;">&#10008; Using syntax described at m:Help:List

is
 * 1) list item A1
 * 2) list item A2

some

pre text&lt;/pre>
 * 1) list item A3

results in

is
 * 1) list item A1
 * 2) list item A2

some

pre text
 * 1) list item A3

So we have to resort to HTML

<ol> <li>list item A1</li> <li> list item A2 is

some

pre text&lt;/pre></li> <li>list item A3</li> </ol>

to get

<ol> <li>list item A1</li> <li> list item A2 is

some

pre text </li> <li>list item A3</li> </ol>

<big style="color:green; font-size: 1.5em;">&#10004; Using the cl tag

<cl> 1. list item A1 is
 * list item A2

some

pre text&lt;/pre> </cl>
 * list item A3

results (or should result) in

<ol style="list-style-type: decimal;"> <li> list item A1    </li> <li> list item A2 is

some

pre text </li> <li> list item A3    </li> </ol>

Example G
To include a WikiText table in a list

<big style="color:red; font-size: 1.5em;">&#10008; Using syntax described at m:Help:List, I don't think we can do this


 * 1) list item A1
 * Orange
 * Apple
 * Bread
 * Pie
 * Butter
 * Ice cream
 * }
 * 1) list item A3
 * Ice cream
 * }
 * 1) list item A3

results in


 * 1) list item A1
 * Orange
 * Apple
 * Bread
 * Pie
 * Butter
 * Ice cream
 * }
 * 1) list item A3
 * Ice cream
 * }
 * 1) list item A3

<big style="color:green; font-size: 1.5em;">&#10004; Use the cl tag

<cl> 1. list item A1 </cl>
 * Orange
 * Apple
 * Bread
 * Pie
 * Butter
 * Ice cream
 * }
 * list item A3
 * Ice cream
 * }
 * list item A3

results in

<ol style="list-style-type: decimal;"> <li> list item A1    </li> <li> </li> <li> list item A3    </li> </ol>

Code

 * cl.php