
As you should be able to see from the image, my enumerate environment seems to work fine up until I typeset the table, and then things shift to the left margin. I'd like the (a) and (b) to line up, and have the table sit to the right as well.
Any tips?
Here's the code I have...
\documentclass{article}
\renewcommand{\thesection}{\Roman{section}}
\renewcommand{\thesubsection}{\thesection.\Roman{subsection}}
\usepackage{setspace}
\usepackage{amsmath}
\usepackage{caption}
\usepackage{amsfonts}
\RequirePackage[left=1.5in,right=1.5in,top=1.5in,bottom=1.5in]{geometry}
\newcommand\state[1]{\ensuremath{q_{#1}}}
\newcommand\blank{\ensuremath{\sqcup}}
\newcommand\lang{\ensuremath{\mathcal{L}}}
\begin{document}
\begin{enumerate}
\item \textbf{Programming Turing Machines}
\begin{enumerate}
\item Give a full description of a Turing machine $M = (Q, \Sigma, \Gamma. \state{0}, \state{accept}, \state{reject}, \delta)$ accepting a language $\lang = \{x \in \{0,1\}^{*}\ |\ x\ is\ divisible\ by\ 4 \}$, ignoring trailing 0s; treat blank string as a 0.
\begin{align*}
M = (Q, \Sigma, \Gamma, \state{0}, \state{accept}, \state{reject}, \delta)\\
Q=\{q_{0},q_{1},q_{2},q_{accept},q_{reject}\}\\
\Gamma=\{0,1,\blank\}\\
\Sigma=\Gamma\setminus\{\blank\}
\end{align*}
\captionof{table}{$\delta: Q\times \Gamma \to Q\times \Gamma\times \{L,R\}$}
\begin{tabular}{c|c|c|c|c}
Current State&Current Character&New State&New Character&Move\\
\hline
\state{0}&1&\state{0}&1&R\\
\state{0}&0&\state{0}&0&R\\
\state{0}&\blank&\state{1}&\blank&L\\
\state{1}&1&\state{reject}&-&-\\
\state{1}&0&\state{2}&0&L\\
\state{2}&1&\state{reject}&-&-\\
\state{2}&0&\state{accept}&-&-\\
\hline
\end{tabular}
\bigskip
\item Give a full description of a Turing machine $M = (Q, \Sigma, \Gamma, \state{0}, \state{accept}, \state{reject}, \delta)$ accepting a language $\lang = \{x \in \{0,1\}^{*}\ |\ x\ does\ not\ have\ repeating\ 1s \}$. ( e.g., x = 110 is rejected and x = 1001 is accepted. )
\begin{align*}
M = (Q, \Sigma, \Gamma, \state{0}, \state{accept}, \state{reject}, \delta)\\
Q=\{q_{0},q_{1},q_{2},q_{accept},q_{reject}\}\\
\Gamma=\{0,1,\blank\}\\
\Sigma=\Gamma\setminus\{\blank\}
\end{align*}
\captionof{table}{$\delta: Q\times \Gamma \to Q\times \Gamma\times \{L,R\}$}
\begin{tabular}{c|c|c|c|c}
Current State&Current Character&New State&New Character&Move\\
\hline
\state{0}&1&\state{0}&1&R\\
\state{0}&0&\state{0}&0&R\\
\state{0}&\blank&\state{1}&\blank&L\\
\state{1}&1&\state{2}&1&L\\
\state{1}&0&\state{1}&0&L\\
\state{1}&\blank&\state{accept}&-&-\\
\state{2}&1&\state{reject}&-&-\\
\state{2}&0&\state{1}&0&L\\
\hline
\end{tabular}
\bigskip
\item Give a full description of a Turing machine $M = (Q, \Sigma, \Gamma, \state{0}, \state{accept}, \state{reject}, \delta)$ accepting a language $\lang = \{x \in \{0,1\}^{*}\ |\ x\ does\ not\ have\ repeating\ 1s \}$. ( e.g., x = 110 is rejected and x = 1001 is accepted. )
\end{enumerate}
\end{enumerate}
\end{document}

\statecommand, for example, is defined either in your preamble or by a package. You are also missing a closing\end{enumerate}I believe. – Scott H. Jan 21 '13 at 03:31captionpackage although I'm not sure why. Removing the package and the\captionofcommands fixes the spacing. Someone, I'm sure, will be able to tell you why. – Scott H. Jan 21 '13 at 03:48captionofcommand in a group. Let us know if that fixes the problem for you (it did for me). – Scott H. Jan 21 '13 at 03:52