Question

I am creating a numbered list, and I'd like to insert a piece of text at the 'top level' as it were, within the list and not numbered. I have seen how to do this via the following question:

Any better way to create MediaWiki numbered lists?

However, this is really ugly, because the text is indented more than the list items. How can I have the text unindented, i.e. At the normal paragraph indentation? For example:

# Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod.
#:
#: Now for the final steps:
#:
# step t

This gets rendered with extra indentation for "Now for the final steps:", something like:

1. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod.
       Now for the final steps:

2. step t

I want it to look like this:

1. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod.

Now for the final steps:

2. step t
Was it helpful?

Solution

It's not pretty, but you can get the indent smaller by tacking it onto the end of the previous item with some <br/>'s like this:

# 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.
#:
# step 2 foobar<br/><br/>Now for the final step:
#:
# step t

Which comes out looking something like this:

   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.

   2. step 2 foobar

      Now for the final step:

   3. step t

The only other option I know of is to fall back to HTML instead of wiki markup for at least the 2nd part of the list so you can specify the starting number for the list, like so:

# 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.
#:
# step 2 foobar

Now for the final step

<ol start="3">
<li>step t</li>
</ol>

But of course you need to maintain that final number manually if the list length changes in future.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top