Want to take part in these discussions? Sign in if you have an account, or apply for one below
Vanilla 1.1.10 is a product of Lussumo. More Information: Documentation, Community Support.
I have asked that few times before in various discussions, maybe somebody answered and I did not spot it. In few entries, mainly personal ones I used paragraphs with numbers. Then following Bill Gates, instiki changes my numbering into automatic numbering: for example I start with 1. then I have some differently formatted text and start 2 and then it makes it automatically again in 1, if the formatting is not which instiki expects. If I write 7, I want to see 7. Of course I can put the whole section into nowiki but this is not what I want, I want wiki but without automatic numbering. How to do it ?
The difficulty is that you are trying to do something that isn’t easy in (X)HTML, let alone with with the Markdown converter. The best I can figure out is to do “fake” lists. There’s an example at the Sandbox. What I did was to have the real list being an unnumbered list, then put the desired list numbers as the first part of the line. Of course, that looks rubbish because the numbers aren’t clearly marked out, so then what I did was use maruku’s extended features to put the numbers into their own little boxes (think \parbox
). The source code is:
{:l: style="float:left;width:4em; font-style:normal;"}
* *1*{:l} list
* *1.1*{:l} in
* *2*{:l} order
* *3.1*{:l} is
* *3.2*{:l} markdown's
* *3.3*{:l} way
It is, I have to admit, not very elegant. It could be done a little bit more quickly by adding some CSS to the main nLab CSS: what I could do then would be to make it so that you didn’t have to put the first line in each time, the dots (in the display) could be gotten rid of, and you wouldn’t have to put in the {:l}
each time. So that by entering:
* *1* list
* *1.1* in
* *2* order
* *3.1* is
* *3.2* markdown's
* *3.3* way
{:zoransamazinglist}
then you would get the same effect, only without the excess bullets.
There may be more elegant ways to do this, of course.
…
Ah, found another way. It’s a similar hack, but uses definition lists rather than unordered lists and that gets rid of the bullet points. Again, there’s an example at the Sandbox and the code is:
{:d: style="float:left; font-style:normal;"}
*1*{:d}
: list
*1.1*{:d}
: in
*2*{:d}
: order
*3.1*{:d}
: is
*3.2*{:d}
: markdown's
*3.3*{:d}
: way
(Note that the line-breaks and empty lines are obligatory.) Again, by adding something to the main CSS, this could be make a little more compact.
Though it is a bit complicated, I like your solution as it looks reliable what is the important part for me. I will learn it soon (as my resources in physical sense increase, as I am still reconvalescent) and use it. Thanks a lot!
It is perfectly possible to do this in HTML, just not in Markdown (as far as I can tell).
Here is some example HTML:
<p>Here is an ordered list:</p> <ol><li>Here is the first item.</li> <li>Here is the second item.</li></ol> <p>The difference between the previous items and the following ones is so remarkable that I want to take a break for a moment and remark upon it.</p> <ol start="3"><li>OK, now here is the third item.</li> <li>Item (4) obviates the need for item (5).</li> <li value="6">And therefore we go on to item (6).</li> <li>This is now item (7), automatically.</li></ol> <p>And that's the whole list!</p>
(Note that you need Transitional rather than Strict document type to validate this, because somebody foolishly decided that numbering in ordered lists counts as presentation rather than content.)
Just cut-and-pasted that into the Sandbox and it works! I’m quite surprised at that; I read that the “start” attribute is not in XHTML so it oughtn’t to get past the nlab internal validator. It also displays correctly in Firefox.
Just cut-and-pasted that into the Sandbox and it works! I’m quite surprised at that; I read that the “start” attribute is not in XHTML so it oughtn’t to get past the nlab internal validator. It also displays correctly in Firefox.
It should be allowed in XHTML Transitional, just not in XHTML Strict. I don’t know how to interpret what the nLab serves along the Transitional/Strict axis, since the DTD declaration doesn’t mention those but just goes on to talk about the MathML and SVG. It must just be the default, I guess.
If you’re ever stuck with a Strict DTD, you should in principle be able to do this with CSS, but I don’t know the markup for that. And it’s probably just as well to use your method from #2 in that case, unless it’s really important to you that the content markup reflect that you have an ordered list. (And in fact, the content markup in #4 above is still inadequate, since it states that there are two ordered lists with a paragraph between them, rather than one ordered list broken up by a paragraph. C’est la vie.)
1 to 6 of 6