# Create subsection in enumerate environment

Currently I am using enumerate to create numbering. I want to include subsection within the enumerate environment with the numbers continue as they are. Well, some suggest me to use new enumerate but I want to remain the numbering. The subsection aligns with the content in the enumerate environment, which is not what I want. I want the subsection appears like normal (not the one shows in the code).

\begin{document}

\begin{enumerate}

\subsection*{blah blah blah}

\end{enumerate}

\end{document}


I want to create subsection looks like this.

  \begin{document}

\subsection*{blah blah blah}

\end{document}

• I don't understand this question. Do you want numbered \subsection? Then use \subsection and not \subsection* – user31729 Sep 4 '14 at 16:07
• My question is: How to align subsections in enumerate environment with subsections which are not in enumerate environment? – Idonknow Sep 4 '14 at 16:09
• And why do you use subsections within enumerate environment? I am quite curious about this – user31729 Sep 4 '14 at 16:10
• Actually I am compiling a stack of questions which are from different sections. But I want the numbering continues even though the questions are from different sections. For example, Q1-10 are from section A. Then Q11-20 are from section B. In between Q10 and Q11, I have to include a section to differentiate them. – Idonknow Sep 4 '14 at 16:12

You can use the resume option of the enumitem package. You also have the concept of a series of enumerate environment, that share a common formatting.

\documentclass[12pt, a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage{ulem}
\usepackage[shortlabels]{enumitem}

\begin{document}
\setcounter{section}{1}

\begin{enumerate}
\item First item.
\item Second item
\item A third item
\end{enumerate}

\subsection{A subsection}

\begin{enumerate}[resume]
\item Fourth item.
\item Fifth item
\end{enumerate}

\end{document}