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}
5
  • 2
    frequently asked: Adding unnumbered sections to TOC Commented Feb 15, 2016 at 20:42
  • See the answers here, for example: tex.stackexchange.com/questions/272626/…
    – user31729
    Commented Feb 15, 2016 at 20:42
  • Have you followed the link ini the first comment above? It should point you to the solution. What you see in the answer is rubbish at the moment, to be honest.
    – Johannes_B
    Commented Feb 16, 2016 at 18:44
  • Oh yes, I have just understood it. I am an idiot. Commented Feb 16, 2016 at 18:46
  • Remove that vpsace stuff and and that rule and you are fine.
    – Johannes_B
    Commented Feb 16, 2016 at 18:48

1 Answer 1

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)

14
  • 1
    This will add the page number of the very last page of the list in the toc.
    – Johannes_B
    Commented Feb 16, 2016 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
    Commented Feb 16, 2016 at 9:47
  • 2
    @MaK: Actually I don't care whether you use \Roman, \roman, Klingon or whatever numbers for your ToC ;-)
    – user31729
    Commented Feb 16, 2016 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?" Commented Feb 16, 2016 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
    Commented Feb 16, 2016 at 18:47

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .