Removing indent for second subsection

I'm having an issue where the I have the a section followed by two subsections. The first of the subsections is not indented while the second one is- I would like to remove the second indentation. Here is some sample code:

\documentclass{article}
\begin{document}
\section{9/17/2014}
\subsection{Complex Numbers and Roots of Unity}
\begin{itemize}
\item Content 1
\subsection{Dihedral Groups}
\item Content 2
\end{itemize}
\end{document}


Any advice? Hoping for a simple fix that I just missed when I searched online for it... Edit: Solved, was an issue with the subsection inside the itemize.

• Hi and welcome, I am not sure i understand the problem. If i complete this to get it compilable (using article) and addint the missing \begin{itemize} everything seems to be fine. Can you go into detail? – Johannes_B Nov 17 '14 at 18:11
• What's the purpose of having \subsection inside itemize? – egreg Nov 17 '14 at 18:20
• Thanks for editing/augmenting your code. It doesn't generate the problem behavior you reported earlier. Please check if the code is as you want it to be. – Mico Nov 17 '14 at 21:13
• I edited the code so that the error does not appear anymore- should I have left it as is? I am new to posting on stackexchange. – bizmiard Nov 17 '14 at 21:15
• David Carlisle provided a solution; if you're happy with it, go ahead and accept it, but leave the original posting as is, so that future readers can follow what was asked. – Mico Nov 17 '14 at 21:39

Please always post complete documents, not just fragments.

If I complete your document to

\documentclass{article}
\begin{document}
\section{9/17/2014}
\subsection{Complex Numbers and Roots of Unity}
\begin{itemize}
\item Content 1
\end{itemize}
\subsection{Dihedral Groups}
\item Content 2
\end{itemize}
\end{document}


Then it produces

! LaTeX Error: Lonely \item--perhaps a missing list environment.


It also produces a pdf file, if you do not stop at the error, but that is essentially arbitrary, after an error Tex does not try to make sensible typeset output, it just tries to get into a state so that it can carry on so you can detect more errors without having to restart.

As the error message suggests you are missing the start of the second itemize environment

\documentclass{article}
\begin{document}
\section{9/17/2014}
\subsection{Complex Numbers and Roots of Unity}
\begin{itemize}
\item Content 1
\end{itemize}
\subsection{Dihedral Groups}
\begin{itemize}
\item Content 2
\end{itemize}
\end{document}