Hello everyone,
I am currently writing a report and I have a page limit and I have been advised to, for once, put the table of contents on the same page as the abstract and I have been looking up everywhere for the information and I cannot seem to know where to find it. Hopefully someone here will know. I basically want to have a title saying "summary" then my summary then the "table of contents" title and then the TOC. I found how to add text to the TOC but it still puts the TOC title at the very top of the page !
Many thanks
Page Layout ⇒ Table of contents
NEW: TikZ book now 40% off at Amazon.com for a short time.

- Stefan Kottwitz
- Site Admin
- Posts: 10345
- Joined: Mon Mar 10, 2008 9:44 pm
Table of contents
Welcome to the forum!
It all depends on the document class you are using, on the template if you use one, and on your code.
If you would provide a
minimal working example, i.e. a minimized copy of your document, compilable (with preamble) but without your content text, I'm sure we would find a solution.
Stefan
It all depends on the document class you are using, on the template if you use one, and on your code.
If you would provide a

Stefan
LaTeX.org admin
Table of contents
Hello,
Thank you very much for your reply and the welcome wishes, here is my example (it's a "book", for the document class) :
My code might/must be redundant, sometimes I just try until it works and don't mind having a redundant code.
Thanks for your help !
Thank you very much for your reply and the welcome wishes, here is my example (it's a "book", for the document class) :
Code: Select all
\documentclass[openany]{book}
\begin{document}
\thispagestyle{empty}
\section*{Summary}
\setcounter{page}{0}
\paragraph*{}
Here is my summary
\setcounter{page}{0}
\thispagestyle{empty}
\tableofcontents \thispagestyle{empty}
\setcounter{chapter}{1} \setcounter{section}{0}
\section{Introduction} \setcounter{page}{1} \fancypagestyle{plain}
\paragraph{} The rest of my report goes on
\end{document}
My code might/must be redundant, sometimes I just try until it works and don't mind having a redundant code.
Thanks for your help !
Last edited by Stefan Kottwitz on Wed Mar 18, 2015 3:56 pm, edited 1 time in total.
- Johannes_B
- Site Moderator
- Posts: 4182
- Joined: Thu Nov 01, 2012 4:08 pm
Table of contents
Hi and welcome,
you can do the old and well known hack, but it is noting more than a hack. It introduces inconsistensies into the document. But if you have to do so...
you can do the old and well known hack, but it is noting more than a hack. It introduces inconsistensies into the document. But if you have to do so...
Code: Select all
\documentclass[openany]{book}
\usepackage{indentfirst}
\begin{document}
\pagestyle{empty}
\pagenumbering{gobble}
\chapter*{Summary}
\indent Here is my summary
\begingroup\let\clearpage\relax
\tableofcontents \endgroup
\chapter{Introduction}
\pagenumbering{arabic}
%\fancypagestyle{plain}
The rest of my report goes on
\end{document}
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
Re: Table of contents
Many thanks, it has worked and does not seem to have engendered undesired things in the document !