org-export-headline-levels
is the option determining up to which level headlines are included in the table of contents of the exported document.
The standard value of org-export-headline-levels
in Orgmode 9.1.9 is 3.
I tested your example org file with this standard setting and Head 2.3 was also included in the table of contents. That indicates that you have customized org-export-headline-levels
to a lower value in your configuration.
You can easily increase the default value for org-export-headline-levels
with M-x customize-option
RET org-export-headline-levels
RET.
All org documents will work with this default value if you do not set the value of org-export-headline-levels
explicitly in the document.
You can set the value explicitly locally for one org document with a line like the following:
#+OPTIONS: H:5
Adapt the value 5 to your likings.
Equivalently you can set the option as file local variable:
Either use the following first line for the org file:
# -*- org-export-headline-levels: 5 -*-
or append the following section to your org file. It does not hurt since it is excluded from export.
* Local Variables :noexport:
Local Variables:
org-export-headline-levels: 5
End:
#+OPTIONS: H:3
at the top of the org file.emacs version
, whatorg-version
, have you tried withemacs -Q
andM-x package-initialize
?org-export-headline-levels
? Note, thatorg-export
has (AFAIK) nothing to do withimenu
. Pitingly, that means that all your attempts are pointless with respect to html export. You can startemacs -Q
from within emacs. Just useM-& emacs -Q
. This is just for testing. (So you do not need therunemacs
stuff. Just ignore the additional Windows window.) After starting up Emacs runM-x package-initialize
and afterwards do your tests.imenu
(andimenu
in general, as @Tobias points out) have nothing to do with HTML export