Search code examples
restructuredtext

How to distinguish definition list from ordered list in rst when the term starts with number in ordinal form?


Example:

1. inflection
   foo

2. inflection
   qux

In rst renders as ordered list but in my case it would be more fitting to use definition list.

If I remove one spaces from the definition indent to make it look like a definition like

1. inflection
  foo

then rst2html emits warning of improperly ended ordered list.

If on the other hand I add indent like

1. inflection
    foo

I do get a definition list but always a separate dl inside each of the ordered list item.

Context: some languages inflect nouns and I want to give a list of inflections on an unusual noun. The inflections are commonly referred to as "1. inflection, 2. inflection" etc, hence my issue to express this in rst.

My workaround so far is to avoid the numbers by using latin name of the inflections but I'd rather not to.


Solution

  • d'oh, Escaping mechanism works. example::

    \1. inflection
       foo