5
$\begingroup$

When you create a list of numbered items in a Stack Exchange post, they automatically get formatted with spacing and indentation. Inputting the following text:

1. Puzzling
2. Meta
3. Stack
4. Exchange

produces the following result:

  1. Puzzling
  2. Meta
  3. Stack
  4. Exchange

Try to select and copy-paste the text above, and you'll see that the numbers 1, 2, 3, 4 aren't actually selected. Those numbers are automatically generated, starting from 1 and going upwards consecutively. Consecutively - that's the problem. Inputting the following text:

2. Puzzling
3. Meta
5. Stack
7. Exchange

produces the following result:

  1. Puzzling
  2. Meta
  3. Stack
  4. Exchange

I created a crossword last night with a list of clues formatted as above. Obviously the clue numbers for each of "across" and "down" aren't necessarily consecutive, but they came out as such, confusing potential solvers. Worse, when I saw the discrepancy between the clues and the crossword, I thought it was my own mistake and wasted a lot of time generating the crossword image all over again before realising it was just a Stack Exchange formatting error. When I realised what the problem was, the best workaround I could find was to write 6A, 10A, etc. for the across clues instead of just 6, 10, etc., which meant the formatting wasn't so nice (no spacing or indentation).

  1. Can this bug be fixed?
  2. If not, is there a workaround enabling me to keep the nice formatting but also have the numbers I want?

(And no, the numbers in that list aren't actually 1 and 2, but 1 and 7 - they just come out as 1 and 2. Well, it is Meta after all!)

$\endgroup$

2 Answers 2

3
$\begingroup$

That's what happened! I thought you must have been really tired or something.

Any way your point about lists....

Unfortunately it is a feature of HTML itself.

The example you give is converted into the following HTML:

<ol start="2">
<li>Puzzling</li>
<li>Meta</li>
<li>Stack</li>
<li>Exchange</li>
</ol>

The web browser automatically generates the numbers so it is not trivial to fix.

However there is a slightly scruffy work around:

+ 1. A
+ 3. B
+ 4. C
+ 8. D
    1. A
    1. B
    1. C
    1. D

You end up with dots and numbers but the numbers can be copied and pasted and don't get 'fixed' for you.

$\endgroup$
7
$\begingroup$

That's not a bug; that's standard Markdown behavior. If you don't want standard Markdown behavior, kill the Markdown:

2\. Puzzling••
3. Meta••
5. Stack••
7. Exchange

(trailing spaces shown as for clarity), which results in:

2. Puzzling
3. Meta
5. Stack
7. Exchange

$\endgroup$
1
  • $\begingroup$ That's a great solution to a problem I've been having. Could you expand a little on how it works (or provide a link to some documentation)? Just looking at it make me wonder why you have "2\. Puzzling" rather than, say, " \2. Puzzling". I'm computer literate, I just don't know at what level you are giving an instruction and to which system. Thanks $\endgroup$ Commented Aug 13, 2015 at 10:32

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .