2

I am transforming some TEI XML to HTML, and I need to list various parts of the document, preserving the numeration of the original.

Regular numbered lists are no problem, and any inconsistencies in the source numbering can be accommodated with the value attribute; but I am having problems getting around variations when the items use letters or symbols according to something other than a natural sequence, eg

<ol type="A">
  <li value="T">this is Toulouse</li>
  <li value="V">this is Vauban</li>
</ol>

Browsers seems to ignore this, and I'm not clear how CSS can help, as browsers seem to ignore the attr() function; unless I just use paragraph and fake up the hanging indentation.

Has anyone done this successfully?

legoscia
  • 39,593
  • 22
  • 116
  • 167
Peter Flynn
  • 235
  • 2
  • 10
  • 1
    I found nothing in the "duplicate" linked question "How can you customize the numbers in an ordered list?" http://stackoverflow.com/questions/10877 that would have led me to Quentin's answer. – Stephen P Jul 07 '14 at 22:26

1 Answers1

3

While the values are expressed using letters, they are still really numbers.

You have to give the numerical position of the letter of the alphabet you want, not the letter itself.

<ol type="A">
  <li value="20">this is Toulouse</li>
  <li value="22">this is Vauban</li>
</ol>
Quentin
  • 914,110
  • 126
  • 1,211
  • 1,335