15

Code

\documentclass{article}
\begin{document}
\begin{enumerate}
\item Initials
\item Age
      \begin{enumerate}
      \item Preliminary Condition
      \item Support
      \end{enumerate}
\item Imaging
\end{document}

Output

1
2
   a) 
   b)
3

Wanted output:

1
2
3.1 
3.2
4

3 Answers 3

21
\documentclass{article}
\renewcommand{\labelenumii}{\theenumii}
\renewcommand{\theenumii}{\theenumi.\arabic{enumii}.}
\setlength{\leftmarginii}{1.8ex}

\begin{document}
\begin{enumerate}
\item Initials
\item Age
          \stepcounter{enumi}
      \begin{enumerate}
      \item Preliminary Condition
      \item Support
      \end{enumerate}
\item Imaging
\end{enumerate}
\end{document}

enter image description here

4
  • 1
    yes, it is possible. see edited answer.
    – Zarko
    Commented Oct 3, 2016 at 17:32
  • Great idea in using \theenumii! Commented Oct 3, 2016 at 17:43
  • That's clever, @Zarko! Do you really need the second line, though? Commented Oct 3, 2016 at 20:31
  • 1
    That is certainly possible, which does not mean that it is good style. You would (usually) not start a subsection 3.1 without starting section 3, either.
    – chtz
    Commented Oct 4, 2016 at 7:22
8

If you are willing to sacrifice automation entirely, then you could use custom labels throughout:

\documentclass{article}
\begin{document}
    \begin{enumerate}
        \item [1] Initials
        \item [2] Age
        \item [3.1] Preliminary Condition
        \item [3.2] Support
        \item [4] Imaging
    \end{enumerate}
\end{document}

enter image description here

2
  • 1
    If you just use custom labels on the 3.1 and 3.2 parts, then the Imaging item gets numbered 3 instead of 4. Hmm, how to do this can keep automation. I will think further. Commented Oct 3, 2016 at 16:53
  • \stepcounter{enumi}, I think.
    – Teepeemm
    Commented Oct 4, 2016 at 13:36
8

Here is an automated version using enumitem:

enter image description here

\documentclass{article}

\usepackage{enumitem}

\setenumerate[1]{align=left,label=\arabic*}
\setenumerate[2]{before=\stepcounter{enumi},label*=.\arabic*,leftmargin=1.2em,align=left}

\begin{document}

\begin{enumerate}
  \item Initials
  \item Age
  \begin{enumerate}
    \item Preliminary Condition
    \item Support
  \end{enumerate}
  \item Imaging
\end{enumerate}

\end{document}
4
  • I really like this approach in implicit methods. Can you compare your approach to Zarko's approach internally? - - I think the only difference is that your method is implicit, while Zarko's method is explicit making it more expansible to different cases, etc if you need the usual enumeration in the same document. - - However, I really like the simplicity and implicity of this proposal. I think the two lines are necessary and sufficient for the effect. I cannot think any simpler implicit method. Commented Oct 4, 2016 at 11:17
  • Is it possible to automate the vertical spacing so that it is the same between all items? Commented Oct 4, 2016 at 11:33
  • @HomerWhite: This depends on the class options. I'm loading article with the default size - 10pt. As such, you can add itemsep=4pt plus 2pt minus 1pt to your options. Under 11pt use itemsep=4.5pt plus 2pt minus 1pt; under 12pt use itemsep=5pt plus 2.5pt minus 1pt.
    – Werner
    Commented Oct 4, 2016 at 13:17
  • @Masi: There is probably no difference between the two except that enumitem allows you to change things locally as well. So, while you can set the options globally (or even create a new list if you wish), you can also use \begin{enumerate}[<options>] to locally change <options>. Doing this explicitly by setting the different lengths is also possible, but more cumbersome.
    – Werner
    Commented Oct 4, 2016 at 13:23

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .