I don't have enough reputation to write a comment, so I have to ask a separate question instead.
I tried Gonzalo Medina's answer to this question: How to add an extra level of sections with headings below \subsubsection
It seems to work fine, except that section headings don't have numbers, as can be seen on my screenshot. Does anyone know how I can fix this?
Edit: I am talking about Gonzalo Medina's second solution in the link above.

titlesec; one version had a bug that in some cases prevented section numbers to appear. – egreg Aug 03 '16 at 20:40titlesecpackage you have on your system. On my system (TeXlive2016, fully updated), I found the following information in the log file:titlesec 2016/03/21 v2.10.2. – Mico Aug 04 '16 at 05:40