<p>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:</p>

<pre><code>#Item1
#Item2
</code></pre>

<p>However, if I want to add spaces or some other text between those lines, the numbering gets lost. For example, the following will create text that has two number one items:</p>

<pre><code>#Item1
Somestuff
#Item2
</code></pre>

<p>Is there any way around this, or should I just use bullet points instead? I noticed just now that the stackoverflow system does not allow numbering like this, you have to do it all manually.</p>

[{'answer_id': 72140, 'author': 'finnw', 'author_id': 12048, 'author_profile': 'https://Stackoverflow.com/users/12048', 'pm_score': 5, 'selected': False, 'text': '<p>Like this:</p>\n\n<pre><code>#Item1\n#:Somestuff\n#Item2\n</code></pre>\n'}, {'answer_id': 72222, 'author': 'Andrew Johnson', 'author_id': 5109, 'author_profile': 'https://Stackoverflow.com/users/5109', 'pm_score': 4, 'selected': False, 'text': '<p>There are a couple of options, but you can start an ordered list from an arbitrary number like this:</p>\n\n<pre>\n#Item1\n\nSomething\n\n&lt;ol start="2"&gt;\n#Item2\n&lt;/ol&gt;\n</pre>\n\n<p>You can also use "#:" if you don\'t mind "Something" being indented a lot:</p>\n\n<pre>\n#Item1\n#:\n#: Something\n#:\n#Item2\n</pre>\n\n<p>There are quite a lot of options with lists, you can find more info on <a href="http://en.wikipedia.org/wiki/Help:List" rel="noreferrer">Wiki\'s Help Pages:List</a>.</p>\n\n<p><strong>update</strong></p>\n\n<p>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.</p>\n\n<pre>\n&lt;ol&gt;\n&lt;li&gt;Item1&lt;/li&gt;\nSomething\n&lt;/ol&gt;\n\n&lt;ol start="2"&gt;\n&lt;li&gt;Item2&lt;/li&gt\n&lt;source lang=javascript&gt;\nvar a = 1;\n&lt;/source&gt;\n&lt;/ol&gt;\n</pre>\n\n<p>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.</p>\n\n<pre>\n&lt;ol&gt;\n&lt;li&gt;Item1&lt;/li&gt;\nSomething\n&lt;li&gt;Item2&lt;/li&gt\n&lt;source lang=javascript&gt;\nvar a = 1;\n&lt;/source&gt;\n&lt;/ol&gt;\n</pre>\n'}, {'answer_id': 630617, 'author': 'Adrian Archer', 'author_id': 65284, 'author_profile': 'https://Stackoverflow.com/users/65284', 'pm_score': 2, 'selected': False, 'text': '<p>I\'m using Mediawiki 1.13.3 and this works:</p>\n\n<pre><code>#Item1\nSomestuff\n&lt;ol start="2"&gt;\n&lt;li&gt;Item2 &lt;/li&gt;\n&lt;/ol&gt;\n</code></pre>\n'}, {'answer_id': 1540899, 'author': 'josefwells', 'author_id': 72935, 'author_profile': 'https://Stackoverflow.com/users/72935', 'pm_score': 1, 'selected': False, 'text': '<p>You can do:</p>\n<pre><code># one\n# two&lt;br /&gt;spanning more lines&lt;br /&gt;doesn\'t break numbering\n# three\n## three point one\n## three point two\n</code></pre>\n<p>Regular old <code>&lt;br&gt;</code> works as well but probably pisses off someone.</p>\n<p>You can put additional HTML formatting in as well to do <code>&lt;pre&gt;</code> formatting and the like without breaking the numbering as well.  This also works other list formats.</p>\n<p>From:\n<a href="http://www.mediawiki.org/wiki/Help:Formatting" rel="nofollow noreferrer">http://www.mediawiki.org/wiki/Help:Formatting</a></p>\n<p>edit: Also found that inside a <code>&lt;pre&gt;&lt;/pre&gt;</code> many of my old tricks don\'t work, but using <code>&amp;#10;</code> works as a newline, and allows multi-line blocks. The cost is that you jam all your lines on one line.</p>\n<pre><code># one\n#: &lt;pre&gt;foo&amp;#10;bar&lt;/pre&gt;\n</code></pre>\n'}, {'answer_id': 2422391, 'author': 'Sam', 'author_id': 291148, 'author_profile': 'https://Stackoverflow.com/users/291148', 'pm_score': 3, 'selected': False, 'text': "<blockquote>\n  <p>The #: works, but you cannot create a\n  section with spaces, so I would prefer\n  the non-working option. Anyone knows a\n  similar syntaxis that does the trick\n  (start numbering at given value)?</p>\n</blockquote>\n\n<p>This response is probably a bit late, but I figure I'll add it in case anyone stumbles across this, as I have.\nYou can create a section with spaces by doing something like:</p>\n\n<pre>\n# Item 1\n#: \n#: \n# Item 2\n</pre>\n\n<p>This will appear as:</p>\n\n<ol>\n<li><p>Item 1</p></li>\n<li><p>Item 2</p></li>\n</ol>\n\n<p>Now, before you say this doesn't work, the trick is to add an ASCII no-break space after the #: rather than just simply hitting spacebar. You can add this by holding ALT on your keyboard and typing 0160. Doing this should add the usual Wiki paragraph formatting while preserving your numbering between #s.</p>\n\n<p>Hope that helps!</p>\n"}, {'answer_id': 5713294, 'author': 'Leon', 'author_id': 204606, 'author_profile': 'https://Stackoverflow.com/users/204606', 'pm_score': 2, 'selected': False, 'text': '<p>"#：" will not work with other tags like</p>\n\n<pre><code>&lt;source lang=javascript&gt;\n//...\n&lt;/source&gt;\n</code></pre>\n'}, {'answer_id': 7981273, 'author': 'Yap Chin Hoong', 'author_id': 1025742, 'author_profile': 'https://Stackoverflow.com/users/1025742', 'pm_score': 4, 'selected': False, 'text': '<p>I use <code>&lt;ol&gt;&lt;/ol&gt;</code> and <code>&lt;li&gt;&lt;/li&gt;</code> to embed the <code>&lt;pre&gt;&lt;/pre&gt;</code> code formatting portions. Works great for me! :-)</p>\n'}, {'answer_id': 11763416, 'author': 'Dirk', 'author_id': 451093, 'author_profile': 'https://Stackoverflow.com/users/451093', 'pm_score': 1, 'selected': False, 'text': '<p>From the <a href="http://en.wikipedia.org/wiki/Help%3aList" rel="nofollow">Wiki Help Page</a> I was able to get the numbering in a list to stay consitant using <code>&lt;p&gt;</code> and <code>&lt;pre&gt;</code>:</p>\n\n<pre><code># Item 1\n# Item 2 &lt;p&gt;&lt;pre&gt;Item 2 Pre Stuff&lt;/pre&gt;&lt;/p&gt;\n# Item 3\n</code></pre>\n\n<p>Would generate </p>\n\n<pre><code>1. Item 1\n2. Item 2\n   [ Item 2 Pre Stuff ]\n3. Item 3\n</code></pre>\n'}, {'answer_id': 16310778, 'author': 'Kory Lovre', 'author_id': 1721315, 'author_profile': 'https://Stackoverflow.com/users/1721315', 'pm_score': 2, 'selected': False, 'text': '<p>And for cases where you want to have some block text within your numbered wiki list try this</p>\n\n<pre><code># one\n#:&lt;pre&gt;\n#:some stuff\n#:some more stuff&lt;/pre&gt;\n# two\n</code></pre>\n\n<p>Which produces:</p>\n\n<p><li>1. one<pre>\n   some stuff\n   some more stuff</pre>\n<li>2. two</p>\n'}, {'answer_id': 19020003, 'author': 'Peter', 'author_id': 160054, 'author_profile': 'https://Stackoverflow.com/users/160054', 'pm_score': 1, 'selected': False, 'text': '<p>Following the link to <a href="http://en.wikipedia.org/wiki/Help%3aList" rel="nofollow">Wiki Help,</a> I found an example that meets what I think are the implied requirements</p>\n\n<ol>\n<li>The list needs to keep numbering</li>\n<li>Sometimes the "Somestuff" should be on it\'s own line in the source</li>\n</ol>\n\n<p>To get (1) there are a few solutions proposed. Bug one way is to use paragraph delimiters around the extra "somestuff".</p>\n\n<p>Example 1:</p>\n\n<pre>\n# Paragraph 1.&lt;p&gt;Paragraph 2.&lt;/p&gt;&lt;p&gt;Paragraph 3.&lt;/p&gt;\n# Second item.\n</pre>\n\n<p>To meet (2), you use paragraph marking in combination with commenting out the new lines (with &lt;!-- <i>newline</i>--&gt;).</p>\n\n<p>Example 2:</p>\n\n<pre>\n# Paragraph 1.&lt!--\n  --&gt;&lt;p&gt;Paragraph 2.&lt;/p&gt;&lt;!--\n  --&gt;&lt;p&gt;Paragraph 3.&lt;/p&gt;\n# Second item.\n</pre>\n\n<p>Both examples display as</p>\n\n<p>Result:</p>\n\n<pre>\n\n    1. Paragraph 1.\n       Paragraph 2.\n       Paragraph 3.\n    2. Second item\n</pre>\n\n<p>Note that the comment eats all of the white space between the end of one element and the start of the next, which seems to be standard practice, and makes sense if you\'re trying to have whitespace without the "wiki effects" of the white space.</p>\n'}, {'answer_id': 49478270, 'author': 'user1930469', 'author_id': 1930469, 'author_profile': 'https://Stackoverflow.com/users/1930469', 'pm_score': 1, 'selected': False, 'text': '<p>Extension:ComplexList</p>\n\n<p><a href="https://www.mediawiki.org/w/index.php?oldid=2126533" rel="nofollow noreferrer">https://www.mediawiki.org/w/index.php?oldid=2126533</a></p>\n\n<p>was put together but not maintained (for lack of time).  It works with 1.26.2 of MediaWiki.</p>\n\n<p>For example.</p>\n\n<pre>&lt;cl>\n1. list item A1\n\n* list item A2\n\ncontinuing list item A2\n\nfurther continuing list item A2\n\n* list item A3\n&lt;/cl></pre>\n\n<p>becomes</p>\n\n<ol>\n<li>list item A1</li>\n<li>list item A2<br/>continuing list item A2<br/>further continuing list item A2</li>\n<li>list item A3</li>\n</ol>\n'}]
['https://Stackoverflow.com/questions/72098', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/-1/']