Index: /trunk/documents/theses/dstn/numberparagraphs.sty
===================================================================
--- /trunk/documents/theses/dstn/numberparagraphs.sty	(revision 12308)
+++ /trunk/documents/theses/dstn/numberparagraphs.sty	(revision 12309)
@@ -57,18 +57,32 @@
 \usepackage{ifthen}
 
+%\renewcommand{\section}[2]{\ifthenelse{\equal{#1}{*}}%
+%  {\mysectionstar{#2}}%
+%  {\mysection{#1}}%
+%}
+
+\renewenvironment{figure}{%
+  \nonumberparagraphs%
+  \@float{figure}}{%
+  \numberparagraphs%
+  \end@float}
+
+
+%%% section
+
 \let\mypkg@@section\section
 
-\renewcommand{\section}[2]{\ifthenelse{\equal{#1}{*}}%
-  {\mysectionstar{*}{#2}}%
-  {\mysection{#1}}%
+\renewcommand{\section}{\@ifstar
+  \mysectionstar%
+  \mysection%
 }
 
-\newcommand{\mysectionstar}[2]{%
+\newcommand{\mysectionstar}[1]{%
   \ifdonumberparagraphs%
   \nonumberparagraphs%
-  \mypkg@@section*{#2}%
+  \mypkg@@section*{#1}%
   \numberparagraphs%
   \else%
-  \mypkg@@section*{#2}%
+  \mypkg@@section*{#1}%
   \fi}
 
@@ -82,9 +96,79 @@
   \fi}
 
+%%% subsection
+
+\let\mypkg@@subsection\subsection
+
+\renewcommand{\subsection}{\@ifstar
+  \mysubsectionstar%
+  \mysubsection%
+}
+
+\newcommand{\mysubsectionstar}[1]{%
+  \ifdonumberparagraphs%
+  \nonumberparagraphs%
+  \mypkg@@subsection*{#1}%
+  \numberparagraphs%
+  \else%
+  \mypkg@@subsection*{#1}%
+  \fi}
+
+\newcommand{\mysubsection}[1]{%
+  \ifdonumberparagraphs%
+  \nonumberparagraphs%
+  \mypkg@@subsection{#1}%
+  \numberparagraphs%
+  \else%
+  \mypkg@@subsection{#1}%
+  \fi}
 
 
 
+%%% chapter, chapter*
+
 \let\mypkg@@chapter\chapter
-\renewcommand{\chapter}[1]{\ifdonumberparagraphs%
+
+%\renewcommand{\chapter}[2]{\ifthenelse{\equal{#1}{*}}%
+%  {\mychapterstar{#2}}%
+%  {\mychapter{#1}}%
+%}
+
+%\renewcommand\chapter{\@dblarg\@mychapter}
+%\newcommand\@mychapter{%
+%  \@ifstar%
+%  \mychapterstar%
+%  \mychapter%
+%}
+
+\renewcommand{\chapter}{\@ifstar
+  \@dblarg\@mychapterstar%
+  \@dblarg\@mychapternostar%
+}
+
+%\def\@ifstar#1{\@ifnextchar *{\@firstoftwo{#1}}}
+
+%\long\def\@dblarg#1{\kernel@ifnextchar[{#1}{\@xdblarg{#1}}}
+%\long\def\@xdblarg#1#2{#1[{#2}]{#2}}
+
+
+%\renewcommand{\chapter}{\@dblarg\@mychapterx}
+%\newcommand{\@mychapterx}{\@ifstar
+%  \mychapterstar%
+%  \@mychapter%
+%}
+
+
+\comment{
+\newcommand{\mychapterstar}[1]{%
+  \ifdonumberparagraphs%
+  \nonumberparagraphs%
+  \mypkg@@chapter*{#1}%
+  \numberparagraphs%
+  \else%
+  \mypkg@@chapter*{#1}%
+  \fi}
+
+\newcommand{\mychapter}[1]{%
+  \ifdonumberparagraphs%
   \nonumberparagraphs%
   \mypkg@@chapter{#1}%
@@ -93,2 +177,21 @@
   \mypkg@@chapter{#1}%
   \fi}
+}
+
+\def\@mychapterstar[#1]#2{%
+  \ifdonumberparagraphs%
+  \nonumberparagraphs%
+  \mypkg@@chapter*[#1]{#2}%
+  \numberparagraphs%
+  \else%
+  \mypkg@@chapter*[#1]{#2}%
+  \fi}
+
+\def\@mychapternostar[#1]#2{%
+  \ifdonumberparagraphs%
+  \nonumberparagraphs%
+  \mypkg@@chapter[#1]{#2}%
+  \numberparagraphs%
+  \else%
+  \mypkg@@chapter[#1]{#2}%
+  \fi}
Index: /trunk/documents/theses/dstn/thesis.tex
===================================================================
--- /trunk/documents/theses/dstn/thesis.tex	(revision 12306)
+++ /trunk/documents/theses/dstn/thesis.tex	(revision 12309)
@@ -68,4 +68,6 @@
 \end{preliminary}
 
+\numberparagraphs
+
 \chapter{Introduction}
 \graphicspath{{figs-review/}}
Index: /trunk/documents/theses/dstn/test.tex
===================================================================
--- /trunk/documents/theses/dstn/test.tex	(revision 12309)
+++ /trunk/documents/theses/dstn/test.tex	(revision 12309)
@@ -0,0 +1,49 @@
+\documentclass{ut-thesis}
+
+\newcommand{\comment}[1]{}
+
+\usepackage{numberparagraphs}
+
+
+\degree{Doctor of Philosophy}
+\department{Computer Science}
+\gradyear{2009}
+\author{Dustin Lang}
+\title{Tex Sux}
+
+\setcounter{tocdepth}{2}
+
+\begin{document}
+
+\begin{preliminary}
+\maketitle
+
+\begin{abstract}
+Simple things are hard and some things are impossible.
+\end{abstract}
+
+\begin{acknowledgements}
+[to be written]
+% -Sam
+% -Hogg
+% -Stumm, Keir, Astrometry.net team, testers
+% -Iain
+% -Family
+\end{acknowledgements}
+
+\tableofcontents
+
+\end{preliminary}
+
+\numberparagraphs
+
+\chapter{Plain chapter}
+
+\chapter*{Starred chapter}
+
+\chapter[short]{Chapter with short name}
+
+\chapter*[shortstar]{Starred chapter with short name}
+
+\end{document}
+
Index: /trunk/documents/theses/dstn/review.tex
===================================================================
--- /trunk/documents/theses/dstn/review.tex	(revision 12308)
+++ /trunk/documents/theses/dstn/review.tex	(revision 12309)
@@ -1,6 +1,3 @@
 \section{Preface}
-
-\tracingmacros=2
-\numberparagraphs
 
 This thesis describes some of the research carried out by me and my
@@ -18,4 +15,12 @@
 
 
+\begin{figure}
+\begin{center}
+test
+\end{center}
+\caption{test caption}
+\end{figure}
+
+
 This thesis is quite blatantly a collection of manuscripts.  I have
 done a bit more than staple them together to produce the chapters of
@@ -26,8 +31,8 @@
 should largely stand alone.  Another advantage is that each manuscript
 was prepared with a list of authors, so it is simpler to identify the
-collaborators who have contributed to each chapter.  %Each chapter has
-%a note detailing the authors of the original manuscript and explaining
-%my personal contribution to the work described.
-
+collaborators who have contributed to each chapter.
+
+
+Test para
 
 \section{Introduction}
@@ -308,10 +313,9 @@
 of transformations such as affine or perspective projection.
 
-% \cite{affineinvariant}
-
 
 Geometric hashing builds \emph{geometric features} out of lower-level
 features.  We will call the low-level features \emph{interest points}
 for clarity.
+
 
 Given the types of transformations the system must handle, there is
