【问题标题】:How do I extend the level at which section numbering stops如何扩展节编号停止的级别
【发布时间】:2016-02-15 09:32:33
【问题描述】:

我有一个要导出到 Latex 的 emacs org-mode 文档。我想对编号的部分进行 4 级分级。我需要做什么才能完成这项工作?

我使用的是cygwin emacs 24.5.1/org mode 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 文件。

【问题讨论】:

  • 默认情况下,LaTeX 只下降到subsubsection。请参阅this post on the TeX site 了解添加低于该级别的信息。
  • @Dan 在我的输出中,numbering 是可以的,但是第一句放错了地方。我在上面添加了我所期望的部分
  • 尝试 SubSubSubSection 1 \\
  • @John Kitchin 我试过了,它确实奏效了,但它是一个杂项。请参阅更新 2。
  • 我不认为 lualatex 是问题所在。在那个分段级别,我认为它相当于一个段落。

标签: pdf emacs latex org-mode


【解决方案1】:

正如 Dan 所建议的,TeX 网站在您的 org 文件中建议了此解决方案:

#+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}

【讨论】:

    【解决方案2】:

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

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

    H: 设置导出的标题级别数(org-export-headline-levels)。低于这个水平,标题会被区别对待。在大多数后端,它们成为列表项。

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

    【讨论】:

      猜你喜欢
      • 2013-07-05
      • 1970-01-01
      • 2017-06-03
      • 2021-12-05
      • 1970-01-01
      • 1970-01-01
      • 2013-11-25
      • 2014-12-19
      • 1970-01-01
      相关资源
      最近更新 更多