2 Answers
2

The example environment provided by the covington package is a list environment with the individual items labelled via the equation counter. This does not fit too well with standard solutions to this type of problem: e.g. thmtools works for theorem like environments instead.

The code below uses the tocloft package. However, the standard set-up involves using a new counter. I have chosen to change the counter used by the example environment, so these are now numbered differently from equations.

The above code sets up the list of examples mechanism in the standard tocloft way and then provides a new version of the example environment with the equation counter replaced by an example counter at each instance. The labelling command is extended to add an appropriate line to the table of examples via the \lentry command. I have also included a redfinition of the only other command in the covington package that uses the equation counter for examples.

Finally, remember to run latex on such a file twice to get the correct numbering in the list of examples.

Here's a solution that uses the \@starttoc to start a new file \jobname.exs which stores contentsline information about the example and examples environment. I've borrowed some ideas from Creating list of for \newtheoremstyle

I've used the etoolbox to append \item with the crucial part about \addcontentsline, but only if it is inside an example or examples environment (we wouldn't want it to happen inside of another list such as enumerate, itemize, etc) as both are set up in terms of a list environment; I've set up a bool to check if we're inside example or examples.

\documentclass{article}
\usepackage{covington}
\usepackage{etoolbox}
\usepackage{lipsum}% just to generate text
% this sets up \jobname.exs which will store the
% contentslines added on each example or examples
\makeatletter
\newcommand\listexamplename{List of Examples}
\newcommand\listofexamples{%
\section*{\listexamplename}\@starttoc{exs}}
\makeatother
% Note that the example and examples environment are defined
% in terms of a list; we test if we're inside either environment
% by setting up a boolean; note that this boolean will only
% be local to the environment, and will be false outside of it
% so there's no need to make it false again
\newbool{inexamples}
\appto\examples{\setbool{inexamples}{true}}
% This adds a contents line to \jobname.exs
%
% this does it for each \item inside of an examples environment
\appto\item{%
\ifbool{inexamples}{%
% if the \item is inside \begin{examples}, then
% update the example list
\addcontentsline{exs}{subsection}{\theequation}%
}%
{%
% otherwise do nothing
}%
}
\begin{document}
\listofexamples
\begin{equation}
y=mx+c
\end{equation}
\begin{examples}
\item first
\item second
\end{examples}
\begin{example}
\lipsum[2]
\end{example}
\begin{example}
\lipsum[2]
\end{example}
\begin{example}
\lipsum[2]
\end{example}
\end{document}