I want to number nested sections, subsections, paragraphs etc manually without using commands like \section{Section}
,\paragraph{Paragraph}
like this:
1
1.1
1.1.1
…
How can I achieve that?
numberingsectioning
I want to number nested sections, subsections, paragraphs etc manually without using commands like \section{Section}
,\paragraph{Paragraph}
like this:
1
1.1
1.1.1
…
How can I achieve that?
Best Answer
I'm not sure why you'd want to do this. Even more, I believe you shouldn't discharge the usual commands: if you don't like the appearance of section headings there's the package
titlesec
that allows for changing them.Here I propose a
\DIV
macro that can be called with an optional argument and a mandatory argument for the subdivision level; the optional argument is the number to use (if not specified, just step the normal counter).Now you can call
and the section will be numbered 42. If the next section is called with
it will be numbered 43.
Should you want to remove this manual numbering, just comment the
\IfValueT
line.