# How to generate index page for report?

I am writing one report in which i need to write page index in the beginning of report.

    XYZ
This is my first section which may use n number of pages.

DEF
This section may use m number of pages.

ABC
This section may use p number of pages.


I need to add image also like shown below.

How can i control it and write it on index page.

Regards

-

I'm not sure if you want the table of contents (simply adding \tableofcontents{}) or the alphabetic index, but this example make both:

\documentclass{report}
\usepackage{makeidx}
\makeindex
\begin{document}
\tableofcontents{}
\part{ABC}
\index{ABC}ABC
\part{DEF}
\index{DEF}DEF
\part{XYZ}
\index{XYZ}XYZ
\printindex{}
\end{document}


Remember that you need to run pdflatex myfile.tex twice to obtain atable of contents. If there are an alphabetic index, it is also needed a makeindex myfile.idx after pdflatex myfile.tex to have a myfile.ind and then run pdflatex myfile.tex again.

Edit 1: As in the edited question you mention both report and section may be you will prefer change report by article in the document class and \section instead of \part.

Edit 2: The question ask now for include images in the table of contents. This is not trivial, but there a solution in Resources for designing a table of contents. Also could be of interest Include images in TOC?.

-
I don't want to add it manually like page 10 or 29. Is there any way to do it automatically since i m using sweave. –  user15662 Jan 23 '13 at 6:36
Edited. Simply delete \setcounter{page}{xx} to have automatic page numbers. –  Fran Jan 23 '13 at 6:52
Thanks for quick reply. How to remove Part I/II/III and continue the text after title on same page. –  user15662 Jan 23 '13 at 6:53
@user15662 Please see the updated answer. –  Fran Jan 23 '13 at 7:02
i edited my question.Pls help me. –  user15662 Jan 23 '13 at 8:01