Variable: reftex-section-levels

reftex-section-levels is a customizable variable defined in reftex-vars.el.gz.

Value

(("part" . 0) ("chapter" . 1) ("section" . 2) ("subsection" . 3)
 ("subsubsection" . 4) ("paragraph" . 5) ("subparagraph" . 6)
 ("addchap" . -1) ("addsec" . -2))

Documentation

Commands and levels used for defining sections in the document.

This is an alist with each element like (COMMAND-NAME . LEVEL). The car of each cons cell is the name of the section macro (without the backslash). The cdr is a number indicating its level. A negative level means the same level as the positive value, but the section will never get a number. The cdr may also be a function which will be called to after the section-re matched to determine the level. This list is also used for promotion and demotion of sectioning commands. If you are using a document class which has several sets of sectioning commands, promotion only works correctly if this list is sorted first by set, then within each set by level. The promotion commands always select the nearest entry with the correct new level.

Source Code

;; Defined in /usr/src/emacs/lisp/textmodes/reftex-vars.el.gz
;; LaTeX section commands and level numbers
(defcustom reftex-section-levels
  '(
    ("part"            .  0)
    ("chapter"         .  1)
    ("section"         .  2)
    ("subsection"      .  3)
    ("subsubsection"   .  4)
    ("paragraph"       .  5)
    ("subparagraph"    .  6)
    ("addchap"         . -1) ; KOMA-Script
    ("addsec"          . -2) ; KOMA-Script
;;; ("minisec"         . -7) ; KOMA-Script
    )
  "Commands and levels used for defining sections in the document.
This is an alist with each element like (COMMAND-NAME . LEVEL).
The car of each cons cell is the name of the section macro (without
the backslash).  The cdr is a number indicating its level.  A negative
level means the same level as the positive value, but the section will
never get a number.  The cdr may also be a function which will be called
to after the section-re matched to determine the level.
This list is also used for promotion and demotion of sectioning commands.
If you are using a document class which has several sets of sectioning
commands, promotion only works correctly if this list is sorted first
by set, then within each set by level.  The promotion commands always
select the nearest entry with the correct new level."
  :group 'reftex-table-of-contents-browser
  :set #'reftex-set-dirty
  :type '(repeat
          (cons (string :tag "sectioning macro" "")
                (choice
                 (number :tag "level           " 0)
                 (symbol :tag "function        " my-level-func)))))