1

I need to numerate my document like:

1. Something
  1.1. Something2
    1.1.1. Something3

With the nested code:

\documentclass{article}
\renewcommand{\labelenumii}{\theenumii}
\renewcommand{\theenumii}{\theenumi.\arabic{enumii}.}

\begin{document}
\begin{enumerate}
  \item Something
  \begin{enumerate}
    \item Something2
      \begin{enumerate}
        \item Something3
      \end{enumerate}
  \end{enumerate}
\end{enumerate}
\end{document}

I achieve:

1. Something
  1.1. Something2
       i. Something3

Is there any way to do it the way I want it, the way above? How many times can I nest arabic numbers in that sense?

Thanks to all!

Some small edit: I managed to do it like this:

\begin{document}
\begin{enumerate}
  \item Something
  \begin{enumerate}
    \item Something2
      \begin{enumerate}
        \item[1.1.1] Something3
      \end{enumerate}
  \end{enumerate}
\end{enumerate}
\end{document}

But I consider it as a quite lame way.

David Carlisle
  • 757,742
  • You can customize these and other properties of lists with the enumitem package. – Michael Palmer Sep 12 '17 at 20:52
  • 1
    Are these really enumerations or simply sections of the document? – Alan Munn Sep 12 '17 at 20:58
  • If I understand your question correctly, @AlanMunn, all given in my question is just example, my code looks differently. – ecclesiastes Sep 12 '17 at 21:06
  • What I'm asking is whether this is how the sections of your document are supposed to look like, or whether these nested enumerations would themselves be embedded within sections or subsections of a document differently numbered. If the latter, then use enumitem (I can add an answer). If the former, then using titlesec would probably be more appropriate solution. – Alan Munn Sep 12 '17 at 21:10
  • Yes, this is exact hierarchy, I don't nest this anywhere. I tried with "enumitem", but it didn't really happen. Here is the code, but it didn't manage to compile: https://tex.stackexchange.com/questions/78842/nested-enumeration-numbering The error is this:"! Undefined control sequence. l.1 \documentclass {article}" – ecclesiastes Sep 12 '17 at 21:28
  • by default latex allows 5 levels of nesting and can easily be set to use \arabic at all levels, you could use enumitem package but no package is really needed. – David Carlisle Sep 12 '17 at 22:08
  • if you get undefined error on \documentclass then you did not use latex so you would get that error on every latex document. you need to use pdflatex not pdftex to process the document – David Carlisle Sep 12 '17 at 22:09
  • @AlanMunn yes and no: if you want to indent the subsection body and not just the titles, using a list is easier than using the section hierarchy. – David Carlisle Sep 12 '17 at 22:11
  • @DavidCarlisle Yes that's true. I've deleted my comment. But then the linked question in the comment: Nested enumeration numbering is a duplicate. – Alan Munn Sep 13 '17 at 01:01
  • @AlanMunn agreed. – David Carlisle Sep 13 '17 at 06:44
  • @AlanMunn If I run \documentclass{article} \usepackage{enumitem} \begin{document} \begin{enumerate} \item First \begin{enumerate}[label=\arabic.] \item Second \item Third \end{enumerate} \item Fourth \end{enumerate} \end{document} Error: This is pdfTeX, Version 3.14159265-2.6-1.40.18 (MiKTeX 2.9.6300) entering extended mode ("bla_bla_directory" ! Undefined control sequence. l.1 \documentclass {article} ? – ecclesiastes Sep 14 '17 at 19:22
  • @David Carlisle, please have a look at my reply to AlanMunn above. :) – ecclesiastes Sep 14 '17 at 19:23

0 Answers0