Not signed in (Sign In)

Vanilla 1.1.9 is a product of Lussumo. More Information: Documentation, Community Support.

    • CommentAuthorzhoraster
    • CommentTimeNov 11th 2010
     
    The picture is self-explanatory.



    It's only when I put a point after a number, and the same story happens with 3., 4., ..., 99., ...
  1.  

    This isn't a bug, it's a feature.

    When you type a number followed by a period at the start of a line, the text formatter (Markdown) thinks that you are starting an enumerated list. So the preview shows the start of that list. The formatter works on the principle that the numbers that you enter don't matter. The assumption being that you are more likely to be in the situation where you want to go back and add something, or rearrange the list, than in the position where you really care about the exact numbers that you enter.

    Thus if you type

    1. First item
    2. Second item
    3. Third item
    

    then you get

    1. First item
    2. Second item
    3. Third item

    if you now remember something that ought to be done between the first and second steps, you can simply add it in:

    1. First item
    1. Something I just remembered
    2. Second item
    3. Third item
    

    and you get

    1. First item
    2. Something I just remembered
    3. Second item
    4. Third item
  2.  

    So what's a good work-around in the event that you really care about the exact numbers that you enter? It's not that hard to imagine such a situation (I've found myself in it): a question actually includes several numbered sub-questions, and you want to address some proper subset of them in correspondingly numbered paragraphs.

    • CommentAuthorjbl
    • CommentTimeNov 11th 2010
     

    Don't put a period after the number, and use parentheses, a space, etc.

  3.  

    Or put a nonbreaking space after the period.

    • CommentAuthorMark Meckes
    • CommentTimeNov 11th 2010 edited
     

    I just noticed that zhoraster did precisely that (with a parenthesis) on the question that presumably inspired the present question. Even so, that solution offends my aesthetic sensibilities. If the question is numbered followed by a period, I want my answer labeled the same way.

    Edit: the above was in response to jbl; Harald's answer, which addresses my petty complaint, appeared while I was typing.

  4.  

    This is actually an example of a strange software feature that comes from even further upstream than the Stack Exchange people: this is standard Markdown behavior. Even if we could tweak it, I'd be inclined not to.

  5.  

    If I type

     The previous line   
     2. hello   
     3. goodbye
    

    then I get

    The previous line
    2. hello
    3. goodbye

    (To avoid too much recrimination, I will confess to a little trickery there. What I wrote is completely honest, but that may not quite be what you see.)

    • CommentAuthorWill Jagy
    • CommentTimeNov 11th 2010
     
    Andrew, it's a slippery slope.
  6.  

    @Andrew: You only need two
    spaces to respect a line break

  7.  
    @ zhoraster. I don't think it ihas yet been mentioned here, but you can get around the system and achieve the desired behaviour by typing `2.` (including the two backticks). Contrary to the opinion expressed in the first response, this is very much a bug. Unfortunately it seems as though we're stuck with it as it is a bug in markdown that we don't control (though which I would like to see removed from mathoverflow completely, as one shouldn't have to fight with a system to get it to display what one wants).
  8.  

    @Peter: I'd say it's a bug in the design of markdown, not its implementation. As such, I'd rather leave it alone, as I don't relish the prospect of having to deal with a combinatorial explosion of possible markdown implementations.