Mirko Hernández
Mirko Hernández

Reputation: 165

Numbered Headings in Org-Mode, Emacs

I was wondering if you can get automatic numbering for headings in org-mode,something similar than the one used for simple lists. For example I can have this list:

  1. one
  2. two
  3. three

And I can reorder it to 1. two 2. three 3. one

The list items change but the list numbers stay the same. How can I do something similar with headings so that I can reorder the headings in a similar way.

To

Upvotes: 16

Views: 7137

Answers (2)

suvayu
suvayu

Reputation: 4664

If you are looking for a way to show this in Org itself, then I'm afraid this is not possible. However you can do this easily in the exported document. Look at the exporting chapter in the manual.

You can provide an option like this: #+options: num:2. Then all headlines at the 2nd level or above will be exported with a number. You could then adjust the headlines as you wish in Org, without affecting the numbers in the exported document.

Upvotes: 12

Charl Botha
Charl Botha

Reputation: 4668

Orgmode now has a built-in minor mode for this, contributed by Nicolas Goaziou.

Simply do M-x org-num-mode to activate the display of dynamic headline numbering.

Upvotes: 25

Related Questions