I am trying to create a new "Examples" environment in the memoir class (which has the tocloft package, I believe), but I cannot get the list entries correct. The best I have is the following,
\documentclass{memoir}
\usepackage{amsthm}
\newlength\Labelwidth
\newlength\AfterLabelspace
\setlength\Labelwidth{2em}
\setlength\AfterLabelspace{10pt}
\newtheorem{xexample}{Example}
\newcommand\listexamplesname{List of Examples}
\newlistof{listofexample}{loe}{\listexamplesname}
\newlistentry[chapter]{examplecounter}{loe}{0}
\newcommand{\edescription}[1]{%
\refstepcounter{examplecounter}
\par\noindent\textbf{Example \theexamplecounter~(#1).}
\addcontentsline{loe}{section}{\protect\numberline{\theexamplecounter}#1}}
\newenvironment{example}[1][]{\edescription{#1}}{\qed\par}
\newcounter{propcounter}[chapter]
\newenvironment{proposition}[1][]{\refstepcounter{propcounter} \noindent {\bfseries Proposition \arabic{propcounter} (#1).}}{\qed}
\begin{document}
\listofexample
\bigskip
\begin{example}[Big Idea]
Some big idea.
\end{example}
\begin{proposition}[Medium Idea]
Something hard.
\end{proposition}
\begin{example}[Small Idea]
Some small idea.
\end{example}
\end{document}
This gives me the following:
which I'm happy with except that I want the list items (e.g., "0.1 ...") to be flush left the same way my figure and table lists are.
I also know that I should not be using
\addcontentsline{loe}{section}{\protect\numberline{\theexamplecounter}#1}}
but rather
\addcontentsline{loe}{listofexample}{\protect\numberline{\theexamplecounter}#1}}
But when I use "listofexample" instead of "section" I get,
which is junk.
Question: How do I use "listofexample" in \addcontentsline
to get what I want? I know that \newlistof
creates lots of extra macros, but I do not know which to use.
Thanks for anyone's help.
tocloft
emulation bymemoir
.