1

I was asked to have my Introduction and Summary section uncounted. However, if I use \section* it doesn't appear in the Table of Contents which is undesired.

EDIT: The proposed solution doesn't work: enter image description here

I have no idea what the 'List of figures' stands for in there.

I have implemented it just like this:

\tableofcontents
\addcontentsline{toc}{Úvod}{\vspace{10pt}}
\rule[0pt]{0mm}{10pt}

Also the compilator tells me:

! Missing \endcsname inserted.

EDIT2: Of course it doesn't work. I am an idiot. Should be:

\tableofcontents
\addcontentsline{toc}{section}{Úvod\vspace{0pt}}
\rule[0pt]{0mm}{10pt}
0

If I understood you correctly then this is what you need:

% not needed for lof b/ it produces its own heading, but for your summary:
%\section*{List of Figures}
% here just skip this and add your text:
\listoffigures
% this adds the line to your toc:
\addcontentsline{toc}{section}{List of Figures\vspace{0pt}}
% \rule[Offset]{width}{height} %  play around to meet your needs:
\rule[0pt]{0mm}{10pt}

Good luck. (Sorry for the editing but my code was not displayed correctly)

  • 1
    This will add the page number of the very last page of the list in the toc. – Johannes_B Feb 16 '16 at 9:37
  • 1
    @MaK: There's no indication that the LoF should be added to the ToC (if this would be the case, I would use tocbibind package however) – user31729 Feb 16 '16 at 9:47
  • 2
    @MaK: Actually I don't care whether you use \Roman, \roman, Klingon or whatever numbers for your ToC ;-) – user31729 Feb 16 '16 at 10:06
  • 2
    @MaK Just a suggestion, maybe the answer would be clearer if it would not introduce unnecessary code, e.g. \section*{Summary} \addcontentsline{toc}{section}{Summary} would imho be sufficient. Otherwise someone will copy&paste it without thinking and we will see a question à la "why is the spacing after my \section*{} wrong?" – user36296 Feb 16 '16 at 17:59
  • 1
    Since the question is asking to get Introduction as an unnumbered section into the toc, which isn't answered in this answer (it generates confusion), but is answered in the FAQ, i suggest to remove this answer. It is completely misleading. – Johannes_B Feb 16 '16 at 18:47

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.