如何扩展部分编号停止的级别

时间:2016-02-15 09:32:34

标签: pdf emacs latex org-mode

我有一个要导出到latex的emacs组织模式文档。我想要对4个级别的编号进行分级。我需要做些什么来完成这项工作?

我正在使用cygwin emacs 24.5.1 / org模式8.3.3

我得到的是 SubSubSubSection 1 部分都被编号,并且似乎也被视为列表项。

这是我的示例组织文件

#+TITLE: Example Title
#+DATE: Time-stamp: <16:28:21 Friday 12 February 2016 dJeremy>
#+AUTHOR: An Author
#+EMAIL: me@example.com

#+OPTIONS: H:6 num:6

* Last Section

** SubSection 1

*** SubSubSection 1

    Deep in the sections.

*** SubSubSection 2

**** SubSubSubSection 1

     Nested deeply here.

     Really!

*** SubSubSection 3

** SubSection 2

   The end of the subs.

这就是我用PDF获得的(使用Windows MikTex处理)。这是手工输入,但你明白了。目录被省略。

1  Last Section

1.1  SubSection 1

1.1.1  SubSubSection 1

Deep in the sections.

1.1.2  SubSubSection 2

1.1.2.1  SubSubSubSection 1  Nested deeply here.
   Really!

1.1.3  SubSubSection 3

1.2  SubSection 2

The end of the subs.

[更新]

我期待1.1.2.1看起来像这样:

1.1.2.1  SubSubSubSection 1

Nested deeply here

Really!

[更新2] 我查看了org模式创建的tex文件,它看起来没问题(没有像pdf那样的奇怪格式)。所以问题在于lualatex以及我如何使用它。

查看pastebin here中的完整tex文件。

2 个答案:

答案 0 :(得分:0)

根据Dan的建议,TeX网站在您的组织文件中建议使用此解决方案:

#+latex_header: \usepackage{titlesec}
#+latex_header: \setcounter{secnumdepth}{4}
#+latex_header: \titleformat{\paragraph}
#+latex_header: {\normalfont\normalsize\bfseries}{\theparagraph}{1em}{}
#+latex_header: \titlespacing*{\paragraph}
#+latex_header: {0pt}{3.25ex plus 1ex minus .2ex}{1.5ex plus .2ex}

答案 1 :(得分:0)

根据官方文件 https://orgmode.org/manual/Export-settings.html

您可以使用H:num:选项实现目标

  

H:设置导出标题级别的数目(org-export-headline-levels)。低于该水平,头条新闻将被不同对待。在大多数后端中,它们成为列表项。

     

num:切换部分编号(org-export-with-section-numbers)。当设置为数字“ n”时,组织仅对级别为“ n”或更高级别的标题进行编号。将UNNUMBERED属性设置为non-nil将禁用标题编号。由于子标题是从该属性继承的,因此它也会影响其编号。