TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have defined a custom script environment, and would like to include an index in the output listing all scripts with their titles. How can I create such an index?

The custom environment looks like:

  {\refstepcounter{script}\textbf{Script~\thescript #1: #2}}\nobreak}
share|improve this question
A few details could be helpful. How did you create that environment? Is it a float environment like figure or table? – Thorsten Donig Oct 8 '10 at 10:06
Added my custom environment. – Egon Willighagen Oct 8 '10 at 10:29
up vote 5 down vote accepted

Have a look at the tocloft package. There is, in particular, a \newlistof command to do exactly what you're looking for. Read section 2.4 of it's documentation for the full details (on how to make it work with your own environment).

share|improve this answer
Works like a charm! thanx! – Egon Willighagen Oct 9 '10 at 13:10

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.