I'm new to latex and I'm trying to write my thesis
I'm having issues with the table of contents. When I call it, normally it works fine and I get entries for my chapters
but when I add the packages hyperref or bookmark (I uncomment them) the table of contents disappears (I'm left with a black page with just the title "Indice" which is the automatic title that appears on the table of contents page). This is my code:
\documentclass[12pt,a4paper]{report}
\usepackage[italian]{babel}
\usepackage{newlfont}
\usepackage{color}
\usepackage{graphicx}
\graphicspath{ {immagini/} }
\textwidth=450pt\oddsidemargin=0pt
\usepackage{cite}
%\usepackage{bookmark}
%\usepackage{Hyperref}
\begin{document}
\begin{titlepage}
%
%
% UNA VOLTA FATTE LE DOVUTE MODIFICHE SOSTITUIRE "RED" CON "BLACK" NEI COMANDI \textcolor
%
%
\begin{center}
{{\Large{\textsc{Alma Mater Studiorum $\cdot$ Universit`a di Bologna}}}}
\rule[0.1cm]{15.8cm}{0.1mm}
\rule[0.5cm]{15.8cm}{0.6mm}
\\vspace{3mm}
{\small{\bf Scuola di Scienze \\
Dipartimento di Fisica e Astronomia\\
Corso di Laurea in Fisica}}
\end{center}
\vspace{23mm}
\begin{center}{\LARGE{\bf TITOLO TESI}\\
}\end{center}
\vspace{50mm} \par \noindent
\begin{minipage}[t]{0.47\textwidth}
%
% INSERIRE IL NOME DEL RELATORE CON IL RELATIVO TITOLO DI DOTTORE O PROFESSORE
%
{\large{\bf Relatore: \vspace{2mm}\\\textcolor{black}{
Prof./Dott. Nome Cognome}\\\\
\textcolor{black}{
\bf Correlatore: (eventuale)
\vspace{2mm}\\
Prof./Dott. Nome Cognome\\\\}}}
\end{minipage}
%
\hfill
%
\begin{minipage}[t]{0.47\textwidth}\raggedleft \textcolor{black}{
{\large{\bf Presentata da:
\vspace{2mm}\\
%
% INSERIRE IL NOME DEL CANDIDATO
%
Nome Cognome}}}
\end{minipage}
\vspace{40mm}
\begin{center}
%
% INSERIRE L'ANNO ACCADEMICO
%
Anno Accademico \textcolor{black}{ 2021/2022}
\end{center}
\end{titlepage}
\chapter*{Abstract}
Abstract goes here
%\chapter*{Dedication}
%To mum and dad
%\chapter*{Declaration}
%I declare that..
%\chapter*{Acknowledgements}
%I want to thank...
\tableofcontents
\chapter{Introduzione}
\input{capitoli/introduzione}
\chapter{Modello Standard}
\input{capitoli/sm}
\chapter{Analisi Dati}
\input{capitoli/analisiDati}
\chapter{Chapter Four Title}
\input{capitoli/capitolo03}
\chapter{Conclusion}
\input{capitoli/conclusioni}
\appendix
\chapter{Appendice}
\input{capitoli/appendice}
\bibliographystyle{IEEEtran}
\bibliography{./biblio}
\end{document}
I'm using TeXstudio 4.0.4
Thanks in advance
(images are what I get without those packages (1st) and with them (2nd))
EDIT
i forgot, adding these it works fine
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
Thanks to everyone!



\documentclass), please include them. (2) The\inputcommands are a stumbling block for potential helpers, because we don't have the files "introduzione.tex" etc. and we get an error. It would help if you could remove them, and leave the commands\chapter, which are needed to create a TOC. (3)hyperrefis written in lowercase (not "Hyperref") – marquinho Feb 21 '22 at 21:40\documentclass{book}I cannot reproduce your error, using either pkgbookmarksorhyperref, or both. – marquinho Feb 21 '22 at 21:42I solved the issue and edited the post. I don't know how to close the thread, maybe a mod can help me. Best regards
(3) simon i tried with your code but it didn't work without the fontenc and inputenc
– gorsedh Feb 21 '22 at 21:47hyperrefchanges the way the toc is made behind the scenes. And it needs that you compile twice the same code. So, just try to run latex twice instead of once. Have also a look here: https://tex.stackexchange.com/questions/113006/which-package-should-i-load-first-hyperref-or-bookmark?rq=1 Possibly it's not needed to loadbookmarks– Iacobus1983 Feb 21 '22 at 21:50