Theses, Books, Title pagesHow to display both Summary and Table of contents in the same document?

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

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

Post by rodrigue »

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

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
migf
Posts: 20
Joined: Mon Feb 18, 2013 2:33 pm

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

Post by migf »

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: 12
Joined: Fri Dec 27, 2019 9:18 am

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

Post by rodrigue »

Hi migh and thanks for your reply

I'm going to follow up your description.

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

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

Post by rodrigue »

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: 640
Joined: Mon Dec 24, 2018 10:12 am

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

Post by Ijon Tichy »

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

% Add this to the document preamble (after all packages have been loaded).
\makeatletter
\newcommand*{\tableofcontentssummary}{%
  \begingroup
    \value{tocdepth}=1\relax% usually show part, chapter and section only
    \@fileswfalse
    \renewcommand*{\contentsname}{Summary}%
    \tableofcontents
  \endgroup
}
\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.
Sorry, but I can no longer participate here as the administrator is trampling on my wishes on one of his other platforms. :cry:
rodrigue
Posts: 12
Joined: Fri Dec 27, 2019 9:18 am

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

Post by rodrigue »

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
Post Reply