Theses, Books, Title pages ⇒ How to display both Summary and Table of contents in the same document?
How to display both Summary and Table of contents in the same document?
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
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
How to display both Summary and Table of contents in the same document?
\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!
How to display both Summary and Table of contents in the same document?
I'm going to follow up your description.
Thanks again
How to display both Summary and Table of contents in the same document?
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?
- 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?


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
\tableofcontentssummary
only somewhere before \tableofcontents
and it works only, if you additionally use \tableofcontents
. Otherwise the \ableofcontentssummary
will be empty.
How to display both Summary and Table of contents in the same document?
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