LaTeX forum ⇒ Theses, Books, Title pagesHow to display both Summary and Table of contents in the same document? Topic is solved

Classicthesis, Bachelor and Master thesis, PhD, Doctoral degree
rodrigue
Posts: 9
Joined: Fri Dec 27, 2019 9:18 am

How to display both Summary and Table of contents in the same document?

Postby rodrigue » Tue Apr 21, 2020 10:08 am

Hi all,

I've just finished with my thesis. Howerver, I'm facing a difficulty. Endeed, In my University, it's recommended a the begining of the thesis (french system) to print a Summary content on 2 pages maximum before the table of contents which comes at the end with all level sections in the document. I don't know how to persue this.

Please any help?

Rodrigue

migf
Posts: 16
Joined: Mon Feb 18, 2013 2:33 pm

Postby migf » Tue Apr 21, 2020 12:41 pm

The table of contents is inserted in your document by the \tableofcontents command. So, you just have to change its position in your source.

If you cannot find it there, it must be in a style file you are using, and in that case you have two alternatives: either you can edit that style file to delete the \tableofcontents there, or you should copy the style file to a file of your own under a different name, delete the command in it and edit your source to use this file instead of the original one. Finally you edit your source to add the command after your summary.

Hope this helps!

rodrigue
Posts: 9
Joined: Fri Dec 27, 2019 9:18 am

Postby rodrigue » Tue Apr 21, 2020 9:50 pm

Hi migh and thanks for your reply

I'm going to follow up your description.

Thanks again

rodrigue
Posts: 9
Joined: Fri Dec 27, 2019 9:18 am

Postby rodrigue » Wed Apr 22, 2020 7:43 am

Hello migh

May be there is a misunderstood or I don't get you well. I want to print the \tableofcontents twice in the same document. For the first time which comes at the begining of the document the contents is just a summary of a maximum chapters and sections. In the second print which now comes at the end of the document I print the contents again with all the entries. I know that I'll need to set the counter depth. I fixed it with \setcounter{tocdepth}{4}

When I put \tableofcontents at the begining after setting the counter to 1 and another \tableofcontents at the end after setting the counter to 4 it doesn't work.

Any idea?

User avatar
Ijon Tichy
Posts: 269
Joined: Mon Dec 24, 2018 10:12 am

Postby Ijon Tichy » Wed Apr 22, 2020 9:04 am

It would really, really help, if you would show us a Infominimal working example, because a good answer highly depends on the used class and the packages used for the ToC. As you ignore the general recommendation to always show such a Infominimal working example I can give you only some speculative code, that may help or not and that is not tested:
Code: [Select all] [Expand/Collapse] [Download] ({untitled.tex})
  1. % Add this to the document preamble (after all packages have been loaded).
  2. \makeatletter
  3. \newcommand*{\tableofcontentssummary}{%
  4. \begingroup
  5. \value{tocdepth}=1\relax% usually show part, chapter and section only
  6. \@fileswfalse
  7. \renewcommand*{\contentsname}{Summary}%
  8. \tableofcontents
  9. \endgroup
  10. }
  11. \makeatother

Note, you can use \tableofcontentssummary only somewhere before \tableofcontents and it works only, if you additionally use \tableofcontents. Otherwise the \ableofcontentssummary will be empty.

rodrigue
Posts: 9
Joined: Fri Dec 27, 2019 9:18 am

Postby rodrigue » Wed Apr 22, 2020 9:18 am

Hello Ijon Tichy,

Thank you very much. You have provided me the solution I wanted. It's working well now after adding that code in my preambule.

Thanks again


Return to “Theses, Books, Title pages”

Who is online

Users browsing this forum: No registered users and 1 guest