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

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

    This section may use m number of pages.

    This section may use p number of pages.

I need to add image also like shown below.

enter image description here

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



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


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. – manish Jan 23 '13 at 6:36
  • 1
    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. – manish Jan 23 '13 at 6:53
  • 1
    @user15662 Please see the updated answer. – Fran Jan 23 '13 at 7:02
  • i edited my question.Pls help me. – manish Jan 23 '13 at 8:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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