Klaas Nuur
Klaas Nuur

Reputation: 61

How to create a multi-level ordered (numbered) plain list in org-mode?

In org-mode, if I have an ordered list such as

  1. first item
  2. second item
  3. third item
  4. fourth item

and I demote an item, the demoted item is automatically renumbered restarting from 1:

  1. first item
  2. second item
    1. third item
      1. fourth item

Is there a way to make org-mode (or emacs in general) to automatically renumber demoted items like when using legal numbering? I mean this:

  1. first item
  2. second item

    2.1. third item

    2.1.1. fourth item
    

Upvotes: 6

Views: 6111

Answers (3)

silencej
silencej

Reputation: 283

I can create a multi-level lists with:

1. Step 1
  1. Substep 1
  1. Substep 2
1. Step 2
1. Step 3

When rendered in Gitea, it will use different number systems for the two levels, e.g. "1,2,3" or "i,ii,iii".

Upvotes: -1

aletho
aletho

Reputation: 51

Org-mode doesn't currently provide this functionality, and nor, to my knowledge, does any existing minor mode. The only emacs package I'm aware of which does is hyperbole, whose koutline module (here is an example-document, exported to html) provides an impressive suite of outline-editing tools, and supports hierarchical legal numbering.

(koutline also supports "klinks" between numbered paragraphs which refer to an invariant ID assigned to each paragraph on creation, so that the links remain valid even if one moves a paragraph from its original position in the document hierarchy.)

Unfortunately koutline is incompatible with org-mode. It does have a rudimentary HTML-export, but this is unlikely, in its present form, to satisfy anyone used to the wide range of export options provided by org-export. Nevertheless, depending on your use-case, koutline might be an adequate tool.

Upvotes: 5

Chris
Chris

Reputation: 137117

Org-mode's built-in list styles include

  • unordered lists, using -, + or *,
  • ordered lists, using 1. or 1), and
  • definition lists, using :: to separate terms from definitions.

You can cycle a given list between these styles using S-left and S-right.

There are a number of forum posts and mailing list entries asking for legal numbering, but unfortunately I don't think it's supported.

Upvotes: 1

Related Questions