Emacs中Org-Mode的编号标题

时间:2022-08-04 20:32:43

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:

我想知道你是否可以在org-mode中获得标题的自动编号,类似于用于简单列表的标题。例如,我可以有这个列表:

  1. one
  2. two
  3. three

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

我可以将它重新排序为1.两个2.三个3.一个

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.

列表项更改但列表编号保持不变。我怎么能用标题做类似的事情,以便我可以用类似的方式重新排序标题。

  • 1 One
  • 2 Two
  • 3 Three

To

  • 1 Two
  • 2 three
  • 3 One

1 个解决方案

#1


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.

如果你正在寻找一种方法来展示Org本身,那么我担心这是不可能的。但是,您可以在导出的文档中轻松完成此操作。请查看手册中的导出章节。

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.

您可以提供如下选项:#+选项:num:2。然后,第二级或更高级别的所有标题都将导出一个数字。然后,您可以根据需要在Org中调整标题,而不会影响导出文档中的数字。

#1


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.

如果你正在寻找一种方法来展示Org本身,那么我担心这是不可能的。但是,您可以在导出的文档中轻松完成此操作。请查看手册中的导出章节。

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.

您可以提供如下选项:#+选项:num:2。然后,第二级或更高级别的所有标题都将导出一个数字。然后,您可以根据需要在Org中调整标题,而不会影响导出文档中的数字。