I have maybe the same problem as this closed question :   I want the line "Table of contents" to appear in my Table of Contents, with page number and so on.  I tried to put \addcontentsline{toc}{chapter}{Table of contents} below the \tableofcontents command with no result.  Here is my MWE  \documentclass{report}  \begin{document}  \tableofcontents \addcontentsline{toc}{chapter}{Table of contents}  \chapter*{Introduction} \addcontentsline{toc}{chapter}{Introduction}  \end{document}
120601
I have a little bit of problem. I have to put the title of toc into toc. I've used the following code to do that and it works for me, kind of. The problem is in the title is aligned with the titles of the chapters and not with list of figures etc.  { \makeatletter \let\@oldstarttoc\@starttoc \renewcommand{\@starttoc}{%   \addcontentsline{toc}{chapter}{\protect\numberline{}\contentsname}% Add ToC to ToC   \@oldstarttoc } \tableofcontents \makeatother }   Here is the picture of my toc.    My idea is to use the same code for  Acknowledgements, Lists of... , Abbreviations etc. Is it ok to try that or there is an alternative?
57848
I need that, in the ToC, all the \paragraph references appear in the same line, like.   1 First Chapter................................................1  1.1 First Section.............................................1    One paragraph 1, Another § 3, One more § 4  1.2 Second Section.......................................7    § in sec. two 7, Another § in sec. two 11   And so on… I'm using the memoir class, which, in its manual, actually uses this for its subsections, but don't explain how to do it.
59997
In the document class article how do I change the command \section to behave exactly like the command \chapter in the document class book? i.e. write Chapter # and then the title and also leave some empty space at the top of the page.  Sorry if my question is not clearly stated and if this question might already exist but I couldn't find anything.
116439
I have a VF code below where I am trying to display the related list of an object using  and  command. I am rendering this page as PDF , doing that in my PDF I am unable to see the content in a tabular format. How can I make the content appear in a table?      &lt;apex:pageBlockSection columns="1" title="TECHNICAL ASSESSMENT"&gt;          &lt;apex:repeat value="{!interviewSkillReviews}" var="interview"&gt;              &lt;table border="1" cellpadding="6"&gt;                 &lt;apex:pageblockTable value="{!interview.Skill_review__r}" var="skillreview"&gt;                      &lt;apex:column headerValue="Skill Name"&gt;                                                         &lt;apex:outputText value="{!skillreview.Skill__r.Name}"/&gt;                     &lt;/apex:column&gt;                 &lt;apex:column headerValue="Recommended Level"&gt;                     &lt;apex:outputText value="{!skillreview.Level__r.Name}"/&gt;                 &lt;/apex:column&gt;                  &lt;apex:column headerValue="Rating"&gt;                     &lt;apex:outputField value="{!skillreview.RatingCopy__c}" rendered="{!NOT(interviewerMode)}" /&gt;                     &lt;apex:selectList value="{!rating}" multiselect="false" size="1" rendered="{!interviewerMode}"&gt;                         &lt;apex:selectOption itemValue="1" itemLabel="1"/&gt;                         &lt;apex:selectOption itemValue="2" itemLabel="2"/&gt;                         &lt;apex:selectOption itemValue="3" itemLabel="3"/&gt;                         &lt;apex:selectOption itemValue="4" itemLabel="4"/&gt;                         &lt;apex:selectOption itemValue="5" itemLabel="5"/&gt;                     &lt;/apex:selectList&gt;                 &lt;/apex:column&gt;                  &lt;apex:column headerValue="Rating Level Description"&gt;                     &lt;apex:outputText value="{!skillreview.Skill_Level_Description__c}"/&gt;                 &lt;/apex:column&gt;               &lt;/apex:pageblockTable&gt;         &lt;/table&gt;      &lt;/apex:repeat&gt; &lt;/apex:pageBlockSection&gt;   I tried using &lt;table&gt; command of HTML but I just get a border around the pageblocktable.    Example of table look and feel:
103014
I would like my Table of contents to be without any title and vertical space skipping. How can I do that with tocloft package?  I've seen , but code \renewcommand{\tableofcontents}{\@starttoc{toc}} doesn't work for me. (presumably because of tocloft package?)  Any help is appreciated.
88801
ToC heading is pushed down when using tocloft package – even without any commands written. Leaving it out puts things back in place. Also I noticed the smaller the \document[font-size], the bigger disposition of ToC heading. Is there an elegant way to bring the heading where it should be?  \documentclass[oneside, 10pt]{scrbook}  \usepackage{tocloft} \renewcommand\cftchapfont{\scshape} \renewcommand\cftchappagefont{\scshape}  \begin{document}  \frontmatter \tableofcontents  \mainmatter \chapter{Thank you} This is just great :)  \end{document}
96890
I'm writing my thesis as a report document using TeXShop (pdflatex and bibtex) and want the bibliography to get its own section number and appear in the table of contents. Here's what I've tried so far and the problems arising:  \addcontentsline{toc}{section}{References}   Does not add the section number, not in the toc and naturally not in the section title.  \cleardoublepage \renewcommand*{\bibname}{\section{References}} \bibliographystyle{plain} \bibliography{bibliography}   Error: ! Incomplete \iffalse; all text was ignored after line 1.  \cleardoublepage \section{References} \renewcommand*{\bibname}{} \bibliographystyle{plain} \bibliography{bibliography}   The only problem this leaves is that this starts the actual bibliography on the next page after it inserts 2.5 References. Otherwise I would be happy with this solution. How can I solve this issue?
5296
I'm using the report document class for a thesis, and I need to add things like "Acknowledgements" and an "Introduction". I noticed that there is an \abstract command which would have been wonderful if applied similarly. How do I add these without messing up the chapters' numbering while being picked up by the ToC in proper order and page numbering?
51959
Below picture shows my table of contents  The title size (the word, Contents) is very big, maybe Huge. I never set it as Huge and I searched the whole LaTeX file, there is no the word "huge" at all.  And the number is start with 0, for example "0.1 Introduction", not the normal "1 Introduction"  Below is the only code related with ToC  \usepackage[subfigure]{tocloft} . . . \setcounter{tocdepth}{2} \tableofcontents   What problem it can be?  PS: I tried to use \usepackage{xpatch}, but this one does not work   I use report   \documentclass[a4paper,leqno,twoside]{report}   Thanks everyone! I changed report to article, the problem is gone!
93589
I have a LaTeX document with some chapter and a list of figures and tables. Something like this:  \tableofcontents \addcontentsline{toc}{chapter}{\listfigurename} \listoffigures \addcontentsline{toc}{chapter}{\listtablename} \listoftables \chapter{Chapter 1} \chapter{Chapter 2} \chapter{Chapter 3}   So the result in the table of contents would be:  List of tables ................... i List of figures ................. ii Chapter 1 .................... 1 Chapter 2 .................... 2 Chapter 3 .................... 3  But i want to have in the document the lists at the beginning and in the table of contents i want them at the end, like this:  Chapter 1 ...................... 1 Chapter 2 ...................... 2 Chapter 3 ...................... 3 List of tables ................ i List of figures .............. ii  I tried this:  \tableofcontents \listoftables \listoffigures \chapter{section 1} \chapter{section 2} \chapter{section 3} \addcontentsline{toc}{chapter}{\listfigurename} \addcontentsline{toc}{chapter}{\listtablename}   But then the page number is wrong:  Chapter 1 .................... 1 Chapter 2 .................... 2 Chapter 3 .................... 3 List of tables ............... 4 List of figures ............. 5  Does anyone know a solution, how to change the position of the lists in the toc with the correct page number?
122296
I am failing to add a heading for the appendix to the ToC with the correct page number:  \documentclass{scrbook} \begin{document} \tableofcontents \chapter{test} \appendix \addcontentsline{toc}{part}{\appendixname} \chapter{First Appendix} \end{document}     I also tried to use the \addappheadtotoc command from the  package, but that changes nothing (expect that it writes 'Appendices' instead).  I assume that the appendix package provides the solution, but I could not figure out how to use it.
50382
See the min expl below. I would like to have two ToC: one giving only the rough structure of the document and a second one giving all the details down to subsubsections. The code pasted below should do just that but the second ToC is not displayed which I do not understand.  \documentclass{report}  \begin{document}  \setcounter{tocdepth}{1}           \setcounter{secnumdepth}{3}         \tableofcontents  \renewcommand*\contentsname{Contents (detailed)}  \setcounter{tocdepth}{3}            \tableofcontents  \chapter{XXX} \section{YYY} \subsection{WER} \subsubsection{ABC} \subsubsection{DEF} \subsection{ZTR} \subsubsection{OIU} \subsubsection{OIZ} \subsubsection{POI} \section{YYY} \subsection{WER} \subsubsection{EDC} \subsubsection{RFV} \subsection{TGB} \subsubsection{ZHN} \subsubsection{OUH} \subsubsection{WEK} \chapter{ZZZ} \chapter{AAA}  \end{document}      Just noticed there is still a problem with hyperref:  \documentclass[10pt, a4paper]{report} \usepackage{shorttoc} \usepackage{hyperref} \begin{document}  \setcounter{secnumdepth}{3}        \pdfbookmark[1]{Contents}{toc}     \shorttoc{Contents}{1}   \pdfbookmark[1]{Contents (detailed)}{toc}     \shorttoc{Contents (detailed)}{3}  \tableofcontents  \chapter{XXX} \section{YYY} \subsection{WER} \subsubsection{ABC} \subsubsection{DEF} \subsection{ZTR} \subsubsection{OIU} \subsubsection{OIZ} \subsubsection{POI} \section{YYY} \subsection{WER} \subsubsection{EDC} \subsubsection{RFV} \subsection{TGB} \subsubsection{ZHN} \subsubsection{OUH} \subsubsection{WEK} \chapter{ZZZ} \chapter{AAA}  \end{document}    By what does {toc} has to be replaced in the second \pdfbookmark? [Sorry, had problem with editing the above comment --> administrator please delete it!]
30232
I am using also titletoc to improve how my table of contents. I would like to print the table of contents several times. How can I do it?  It does not work in the MWE:  \documentclass{article} \usepackage[utf8]{inputenc}  \begin{document}  \tableofcontents  \section{Hello} \section{Bye}  \tableofcontents  \end{document}     PS: I have this code in my document, in order to have no title for the table of contents.  \makeatletter \renewcommand\tableofcontents{%     \@starttoc{toc}% } \makeatother   PPS: \renewcommand{\contentsname}{}% Remove \tableofcontents' title/name will not work since I am using [french]{babel}.
11780
I am trying to print a List of Appendices (LoA) for my thesis, separate from the Table of Contents (ToC).   I wish for my ToC to look like this, with depth up to subsections (2?):  CONTENTS  CHAPTER   I. Introduction......1    1.1 Section title...1     1.1.1 Subsection...1  Appendices ..... 2   and for an LoA on a new page, with depth 0, thus:  APPENDICES  APPENDIX A. Proof of Theorem 1...1 B. Proof of Theorem 2...1   I am trying to achieve this using the report class, in a way that allows me to type appendices using the hierarchy that I obtain from the chapter, section commands. This is as opposed to defining a custom myappendix command into which I insert my appendix content. (I realize that I only need the titles from the appendix chapters for the LoA, but I'd like for the appendix content to have such structure.)   For instance, this approach would solve my problem:   \chapter{Introduction} \section{Section title} \subsection{Subsection} % \begin{appendices} is also acceptable \appendix   % Some settings are changed now \chapter{Proof of Theorem 1} \chapter{Proof of Theorem 2} % \end{appendices} if environment is begun   whereas the following approach would not:  \chapter{Introduction} \section{Section title} \subsection{Subsection} \myappendix{Proof of Theorem 1} \myappendix{Proof of Theorem 2}   I realize several questions have been asked regarding this before, but none of them quite solved my problem. Notably,  defines a custom appendix command;  defines two custom commands to maintain some hierarchy, but I will have to do more work to handle the inclusion of another layer (subsection) into the appendix.    is the closest to what I want: it does give me a separate LoA, but it also adds appendices to ToC and I can't quite figure out how to suppress the entires in ToC. The moment I use   \addcontentsline{toc}{\setcounter{tocdepth}{-1}}   the line   \xpatchcmd{\@chapter}{\addcontentsline{toc}}{\addcontentsline{toa}}{}{}%   fails because I am not adding anything to the ToC anymore.   My approach: Since I was using titlesec and tocloft packages anyway, I tried to do the following:   Stop ToC once appendix command is issued Start a new counter for appendices using tocloft Using the &lt;after-code&gt; option of titlesec, add contents line after every chapter.    My MWE   \documentclass[a4paper]{report} \usepackage{lipsum} % for arbitrary text  \usepackage{tocloft,etoolbox,titlesec} \newcommand{\listappendixname}{List of Appendices} \newlistof{appendix}{apc}{\listappendixname}  \makeatletter \g@addto@macro{\appendix}{     \clearpage     \addcontentsline{toc}{chapter}{Appendices}     \addtocontents{toc}{\protect\setcounter{tocdepth}{-1}}     \titleformat      {\chapter}      [display]     {\huge\bfseries\filcenter}      {\Large \MakeUppercase{\@chapapp} \thechapter}      {1.5ex}{}     {\refstepcounter{appendix} \addcontentsline{apc}{appendix}{\protect{\@chapapp \thechapter}}} } \makeatother  \title{Title} \author{Author}  \begin{document} \maketitle \tableofcontents \clearpage \listofappendix  \chapter{Introduction} \lipsum[1] \section{Section} \lipsum[2] \subsection{Subsection} \lipsum[3]  \appendix  \chapter{Proof of Theorem One} \lipsum[4] \chapter{Proof of Theorem Two} \lipsum[5]  \end{document}   produces the following LoA:  List of Appendices  Appendix...... 5   It doesn't get the Appendix title or number, and fails after the first one.  Could you please help me obtain a separate LoA in a way that I can still use LaTeX's chapter, section, ... hierarchy? (I am okay with using different packages, the book class, or any approach other than mine.)
37153
I wonder how I can add a \part entry to the TOC without any output in the the document itself. I actually got a nearly working version:  \begin{filecontents}{chap1.tex} \chapter{Chapter} This is a chapter. \end{filecontents} \begin{filecontents}{chap2.tex} \chapter{Chapter} This is a chapter. \end{filecontents}  \documentclass{scrbook}  \usepackage{xparse,hyperref}  \NewDocumentCommand{\TOCpart}{s m}{%    \clearpage    \refstepcounter{part}%    \phantomsection    \addcontentsline{toc}{part}{%       \IfBooleanF{#1}{\protect\numberline{\thepart}}%       #2%    }%    \cleardoublepage    \ignorespaces }  \begin{document} \tableofcontents \part{Normal Part} \include{chap1}  \TOCpart{TOC Part} \include{chap2}  \part{Normal Part} \chapter{Chapter} This is a chapter.  \TOCpart{TOC Part} \chapter{Chapter} This is a chapter. \end{document}   This works except that “II. TOC Part” should be listed with page 7 instead of 6. I.e. with the same one as the following chapter. If I change the definition to  \NewDocumentCommand{\TOCpart}{s m}{%    \cleardoublepage    \refstepcounter{part}%    \phantomsection    \addcontentsline{toc}{part}{%       \IfBooleanF{#1}{\protect\numberline{\thepart}}%       #2%    }% %   \cleardoublepage    \ignorespaces }   The entry has the right page number but if followed by an \include it appears behind the chapter entry, which is pretty wrong … so how can I combine the two definitions to get the part before the chapter but with the chapter’s page number, while still using \include and don’t moving \TOCpart inside of the included file?
49842
I would like to add a bookmark to the table of contents.  shows a method, but \pdfbookmark is not recognised as a command. This is my document header:  \documentclass[a4paper]{report} \usepackage[pdftex,bookmarks=true]{hyperref} \usepackage[pdftex]{graphicx} \usepackage[utf8]{inputenc} \usepackage{array}   I'm compiling the document with TexMakerX's PDFLaTeX option.
111245
I would like to know how to include table of contents into a table of contents....  I have an example of how to spoof it into the toc - using \phantomsection - but it seems like when i have a long document the link goes a bit wrong - ie. it links to a couple of pages before.....  \phantomsection \addcontentsline{toc}{chapter}{Contents} \tableofcontents     Example:  \documentclass[12pt, a4paper, twoside]{book} \usepackage[english]{babel} \usepackage{amsfonts,dsfont} \usepackage[final]{pdfpages} \usepackage{hyperref}   %---------------------------------------------------------------------------------- \begin{document} \pagenumbering{roman}  %----------------------------------------------------------------------------------  %---------------------------------------------------------------------------------- \thispagestyle{empty} \begin{titlepage} {\Large \begin{center} {\bf XXXXXXXXXXXXXXX} \end{center} } \end{titlepage} %----------------------------------------------------------------------------------  \phantomsection \addcontentsline{toc}{chapter}{Contents} \tableofcontents   \phantomsection \addcontentsline{toc}{chapter}{List of Figures} \listoffigures  \phantomsection \addcontentsline{toc}{chapter}{List of Tables} \listoftables  %----------------------------------------------------------------------------------  \newpage \setcounter{page}{1} \pagenumbering{arabic}  \chapter{XXXXX} \label{chXXXXX}  \section{Introduction}\label{chXXXXX_Intro} BLAH BLAH BLAH.   %----------------------------------------------------------------------------------  %-------------------- \setboolean{@twoside}{false} \end{document}