# Help me to align homework points A, B and C in LaTex

I have this kind of homeworks here and I want to get things aligned nicely like "1.2.6 EX. ... a) ... b) ..", " -- how? I don't like that LaTex inserts immediately the point 8 and points 8.1/8.2 etc.

Minimal working example

\documentclass{article}
\usepackage[english]{babel}
\usepackage{graphicx}
\usepackage{float}

\begin{document}
\tableofcontents
\newpage

\section{Exercise 1.1.1}
\section{Exercise 1.3.4}
\subsection{a) The equation for the affine variety}
\end{document}

-
Could you provide a minimal working example starting with \documentclass and ending with \end{document}? This would help a lot in answering you. :) – Claudio Fiandrino Sep 20 '12 at 7:02
Without an MWE it is hard to tell. Are you using \section for the exercise? If so you can use \section*{1.2.6 Exercise} instead and \subsection*{a) Drawing} – Guido Sep 20 '12 at 7:06
@Guido I tried with "*" but it removes the subsection -name from the Table of Contents, I would like to have it there. – hhh Sep 20 '12 at 7:08

You can use

\newcommand{\exercise}[1]{\section*{#1 Exercise}\addcontentsline{toc}{section}{#1 Exercise}}


and then use

\exercise{1.1.1}
\working{a) Drawing}
...

\exercise{1.1.2}
\working{a) Drawing}
...


EDIT Modified to avoid to type Exercise in the argument.

Example what it becomes

-
Without retyping the word Exercise each time, is it possible to just have \exercise{1.3.4}? Instead of \exercise{1.3.4 Exercise}? – hhh Sep 20 '12 at 7:26

You may have a look on the following code and its output:

\documentclass{report}
\usepackage[english]{babel}
\usepackage{graphicx}
\usepackage{float}

\renewcommand\thesection{\arabic{chapter}.\arabic{section}}
\renewcommand\thesubsection{\alph{subsection})}

\begin{document}
\tableofcontents
\newpage
\chapter{Theorem XX}
\section{Exercise A}
\section{Exercise B}
\subsection{Exercise B.1}
\subsection{Exercise B.2}
\section{Exercise C}
\section{Exercise D}
\section{Exercise E}

\chapter{Theorem YY}
\section{Exercise F}
\subsection{The equation for the affine variety}
\subsection{The equation for the affine variety}
\section{Exercise G}
\section{Exercise H}
\end{document}
`

Output after running the code:

If you still want to try with 1.1.1 Exercise then you need to include \part command in the preamble like "\renewcommand\thesection{\arabic{part}.\arabic{chapter}.\arabic{section}}" and use part command in document body!

-