# How to create my own list of things

I’m writing a document in the latex and it contains some BNF grammar noations in several places of the documents. (I used verbatim package in order to write these BNF grammar notations)

Now I want to add a new section to the document that shows name of all grammar notation and their page numbers. This should be similar to “List of Figures” page.

I’m new to Latex and your help will be very helpful for me.

Thanks

Use the tocloft package. For a short introduction see for example: http://texblog.org/2008/07/13/define-your-own-list-of/

• If you need more specific advice, you should give a MWE. Otherwise "accepting" an answer is the proper way to show your content. – bodo Jun 25 '12 at 4:26

Example for the tocloft package:

\documentclass{report}

\usepackage{tocloft}
\usepackage{hyperref}

\usepackage[english]{babel}

\newcommand{\listexamplename}{List of mycustomfiction}
\newlistof{mycustomfiction}{mcf}{\listexamplename}

% Reset section numbering between unnumbered chapters
% https://tex.stackexchange.com/questions/71162/reset-section-numbering-between
\newcommand{\mycustomfiction}[1]
{%
\refstepcounter{mycustomfiction}
{\protect\numberline{\themycustomfiction}#1}\par
}

\begin{document}

% How to remove double “Contents” heading generated by memoir?
\tableofcontents
\newpage
\listofmycustomfiction

\chapter{Two mycustomfiction}
\label{1st_ex}


For the memoir package you need to build more things using the memoir's class emulation of tocloft. See the question for memoir's example: Custom list throw LaTeX Error: Command \mycustomfiction already defined?