0

Following this org export tutorial -- https://orgmode.org/worg/org-tutorials/org-latex-export.html -- I evaluated -- in an emacs -q instance --

(require 'ox-latex)
(unless (boundp 'org-latex-classes)
  (setq org-latex-classes nil))
(add-to-list 'org-latex-classes
             '("article"
               "\\documentclass{article}"
               ("\\section{%s}" . "\\section*{%s}")
               ("\\subsection{%s}" . "\\subsection*{%s}")
               ("\\subsubsection{%s}" . "\\subsubsection*{%s}")
               ("\\paragraph{%s}" . "\\paragraph*{%s}")
               ("\\subparagraph{%s}" . "\\subparagraph*{%s}")))

and exported

* one
** two
*** three
**** four

but the last heading was still exported into an enumerate environment instead of into a paragraph. What am I missing?

1

Org mode exports structured headlines only up to a depth of org-export-headline-levels. Try C-h v on this variable to read more. Headlines deeper than this level, which is 3 by default, are exported as lists - \{enumerate} in LaTeX.

To get the structure you want you can either set the variable to 4 or more manually or using Customize. It can also be set on a per-file basis, using #+OPTIONS

#+OPTIONS: H:4
* one
** two
*** three
**** four
| improve this answer | |
  • Odd that the tutorial said nothing about that, when it showed a 5 level customization. – Toothrot Feb 28 '18 at 10:49
  • Yes - although the tutorial says it's for Org Mode < v8.0. It's possible that this feature was modified or possibly the default value changed somewhere in the past few years. – Reign of Error Feb 28 '18 at 15:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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