Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I am trying to figure out why my subsections are not aligning with the rest of my document. I is displaying that all the subsections following the first one are indented.

\documentclass[12pt]{article}
\usepackage[english]{babel} %sets the language to English
\usepackage[text={7in, 9in}, centering]{geometry} %sets up the dimensions where text will 
%be written within the doc.  showframe will show the magian frame.
\usepackage{ragged2e} %improves left justification of paragraphs
\usepackage{amsfonts} %loads extra fonts and symbols, including boldface (\mathbf),             blackboard boldface (\mathbb), and fractur (\mathfrac) 
\usepackage{array}
\usepackage{enumerate}
\usepackage{tikz} %allows for you to draw venn diagrams
\setlength{\parindent}{0cm}

\begin{document}
\section*{Solutions}
\subsection*{1.2}
\begin{enumerate}
\setcounter{enumi}{3} %count at 4
\item a
\setcounter{enumi}{13} %count at 14
\item a
\setcounter{enumi}{19} %count at 20 
\item
\begin{enumerate}[a)]
\item a
\item a
\end{enumerate}
\subsection*{2.1}
\setcounter{enumi}{3} %count at 4
\item
\begin{enumerate}[a)]
\item  a
\item  a
\end{enumerate}
\end{enumerate}
\end{document}
share|improve this question
2  
You have some environments - enumerate - spanning over the sectional units, causing the odd indentation. –  Werner Sep 18 '12 at 20:17
add comment

1 Answer

Does this do what you want?

\documentclass[12pt]{article}
\usepackage[english]{babel} 
\usepackage{array}
\usepackage{enumerate}
\setlength{\parindent}{0cm}

\begin{document}
\section*{Solutions}
\subsection*{1.2}
\begin{enumerate}
    \setcounter{enumi}{3} %count at 4
    \item a
    \setcounter{enumi}{13} %count at 14
    \item a
    \setcounter{enumi}{19} %count at 20 
    \item
        \begin{enumerate}[a)]
            \item a
            \item a
        \end{enumerate}
\end{enumerate}

\subsection*{2.1}
\begin{enumerate}
    \setcounter{enumi}{3} %count at 4
    \item
        \begin{enumerate}[a)]
            \item  a
            \item  a
        \end{enumerate}
\end{enumerate}
\end{document}

As Werner said, you have a problem of enumeration spanning across the subsection. If you open and close your enumerate environment, the problem should be fixed.

share|improve this answer
2  
Maybe it would be useful also looking at the enumitem package that allows for a better way of changing the labels and provides a method for resuming an enumeration from where it stopped earlier. –  egreg Sep 18 '12 at 22:22
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.