Given this class code:

(add-to-list 'org-latex-classes
                ("\\chapter{%s}" . "\\chapter*{%s}")
                ("\\section{%s}" . "\\section*{%s}")
                ("\\subsection{%s}" . "\\subsection*{%s}")
                ("\\subsubsection{%s}" . "\\subsubsection*{%s}"))

When writing my orgmode article, do I need to specify for each heading the type of class it is supposed to be?

  • 1
    The LaTeX class is specified per document, not per heading.
    – NickD
    Mar 7, 2023 at 12:56
  • what I want to know is whether subheadings will follow the formatting specified. Meaning, a sub-sub-sub heading will be formatted as subsection. Mar 7, 2023 at 13:33

1 Answer 1


With the report class in your question, level-1 headings will become chapters, level-2 headings will become sections, level-3 headings will become subsections, level-4 headings will become subsubsections, higher level headings will become items - that is, assuming that the H options setting (org-export-headline-levels) is higher than or equal to 4. If it is lower than 4, then headings will become items sooner: e.g. if H is 3, there will be no subsubsections: they will be turned to items instead.

You can set the H value per-file:


or by setting the corresponding variable:

(setq org-export-headline-levels 4)

Its value is 3 by default.

  • 1
    Thank you! Very clear. I suppose that having #+OPTIONS: H:10 does not hurt just to make sure all headings are formatted if we decide to later on add formatting specific to headings > 4. Mar 8, 2023 at 7:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.