0

I want the abstract, list of figures , list of tables, declaration, and acknowledgment to appear in the table of contents, as in the screenshot:

enter image description here

My packages:

\usepackage[utf8]{inputenc}                 
\usepackage[T1]{fontenc}                    
\usepackage[english,spanish]{babel}         
\usepackage{graphicx}                      
\usepackage{amsthm, amsmath, amssymb}       
\usepackage{setspace}\onehalfspacing        
\usepackage[loose,nice]{units}              
\usepackage{DF-MSc-titlepage}               
\usepackage{indentfirst}                    
\usepackage{lipsum}                         
\usepackage{aas_macros}                     
\usepackage{hyperref}                       
\usepackage{bookmark}                        
\usepackage{fancyhdr}                      
\usepackage{emptypage}                     
\usepackage[margin=1in]{geometry}          

\graphicspath{{./figures/}}                 
\usepackage[Sonny]{fncychap}                
\renewcommand{\vec}[1]{\mathbf{#1}}         
\geometry{bindingoffset=1cm}                
\geometry{textwidth=390pt}                  
\addto\captionsspanish{\renewcommand{\listtablename}{Índice de tablas}}

MAIN.TEX

\documentclass[11pt,a4paper,twoside,openright]{book}
\input{paquetes-y-customizaciones}



\begin{document}

%
% Frontmatter
    \frontmatter
%   Titlepage
    \maketitle
%   Dedication
    \input{dedication}
    \input{abstract}
    \input{aknowl}
    \input{tabladecontenidos}
    \listoffigures
    \listoftables
% Mainmatter
    \mainmatter
    \pagestyle{fancy}
    \input{introduccion}
    \input{diseno-construccion}
    \input{montaje-y-tecnicas}
    \input{resultados}
    \input{conclusiones-y-perspectivas}
    \appendix
    \input{apendice-codigos}
    \input{apendice-planos}
    \backmatter
    \input{bibliografia}

\end{document}

MWE

\documentclass[11pt,a4paper,oneside,openright]{book}
\usepackage{hyperref}
\usepackage{xcolor}
\usepackage[titles]{tocloft}

\usepackage{minitoc}

\usepackage{theorem}

\newtheorem{theorem}{Theorem}

\hypersetup{
        colorlinks=true,
        linkcolor=blue,
        filecolor=blue,      
        urlcolor=blue,
        citecolor=red,
        linktoc=page
        %pdfpagemode=FullScreen,
    }

\begin{document}
\dominitoc

\frontmatter

\tableofcontents

\mainmatter
\chapter{This is the first chapter}

{\hypersetup{linkcolor=black}
\minitoc
}

\section{section}
This is a citation~\cite{ref1}. Theorem~\ref{thm1} provides some interesting information.
\begin{theorem}\label{thm1}
    Rain gets you wet.
\end{theorem}
\section{section}
\section{section}

\bibliographystyle{alpha}

\begin{thebibliography}{Smi19}

    \bibitem[Smi19]{ref1}
    John Smith.
    \newblock Citing in red.
    \newblock {\em Journal of Hyperlink Colors}, 2019.

\end{thebibliography}

\end{document}
5
  • Hi Delan, it is slightly unclear what you are asking. What to you mean by "titles"? Do you maybe want to have the pager numbers as roman numerals? If so, use \pagenumbering{roman} ({Roman} for uppercase numerals) in your document. – Ian Nov 7 '19 at 8:02
  • Hello @Ian ! I want the abstract, list of figures , list of tables, declaration, and acknowledgment to appear in the table of contents, as in the screenshot – Delan Nov 7 '19 at 8:05
  • Load package tocbibind for ToC entries of ToC, LoF and LoT. Use \chapter (without star!) to get unnumbered chapters with ToC entries in frontmatter. – esdd Nov 7 '19 at 8:14
  • @esdd It did work but the numbering starts at the table of contents instead of the acknowledgment part. How can I fix that issue? – Delan Nov 7 '19 at 8:26
  • Sorry, but I can not reproduce your issue. – esdd Nov 7 '19 at 8:31
1

This may point you in the right direction Bibliography section has been used as an example only, you can modify the code to suit your needs for Abstract or any other section to be placed in the TOC

    \documentclass[11pt,a4paper,oneside,openright]{book}
    \usepackage{hyperref}
    \usepackage{xcolor}
    \usepackage[titles]{tocloft}

    \usepackage{minitoc}

    \usepackage{theorem}

    \newtheorem{theorem}{Theorem}

    \hypersetup{
            colorlinks=true,
            linkcolor=blue,
            filecolor=blue,      
            urlcolor=blue,
            citecolor=red,
            linktoc=page
            %pdfpagemode=FullScreen,
        }

    \begin{document}
    \dominitoc

    \frontmatter

    \tableofcontents

    \mainmatter
    \chapter{This is the first chapter}

    {\hypersetup{linkcolor=black}
    \minitoc
    }

    \section{section}
    This is a citation~\cite{ref1}. Theorem~\ref{thm1} provides some interesting information.
    \begin{theorem}\label{thm1}
        Rain gets you wet.
    \end{theorem}
    \section{section}
    \section{section}

    \bibliographystyle{alpha}
    \setcounter{section}{4}%-------------------------------manual numbering of toc heading--it will not appear on the page 2 where the table is located--but it will appear in the toc% 
    \addcontentsline{toc}{section}{\protect\numberline{\thesection}{bibliography}}
    \begin{thebibliography}{Smi19}

        \bibitem[Smi19]{ref1}
        John Smith.
        \newblock Citing in red.
        \newblock {\em Journal of Hyperlink Colors}, 2019.

    \end{thebibliography}

    \end{document}
`````````````````````````````````````
[![enter image description here][1]][1]


[![enter image description here][2]][2]


  [1]: https://i.stack.imgur.com/0Socv.png
  [2]: https://i.stack.imgur.com/rgeDD.png

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.