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: