Text FormattingProblem with table of contents

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
paulina-bravo
Posts: 2
Joined: Fri Jul 26, 2019 7:58 pm

Problem with table of contents

Post by paulina-bravo »

Hello,
I'm working on a report document, but for some reason the Table of contents is not gathering the information from the document. I have the content of each chapter on a different .tex file, but here's the code of the main
\input{usepackage.tex}
\begin{document}
\pagestyle{empty}
\input{titlepage}
\pagenumbering{gobble}
\chapter*{Agradecimientos}
\input{acknowledgements.tex}
\chapter*{Resumen}
\input{abstract.tex}
\tableofcontents
\pagenumbering{arabic}
\chapter{Introducción}
\input{intro.tex}
\chapter{Revisión Literaria}
\input{litrev.tex}
\chapter{Desarrollo del Método}
\input{metodo.tex}
\chapter{Resultados}
\input{results.tex}
\chapter{Conclusiones}
\input{conclusions.tex}
\input{appendix.tex}
\end{document}
Attachments
toc.JPG
toc.JPG (16.84 KiB) Viewed 2288 times

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

Stefan Kottwitz
Site Admin
Posts: 10335
Joined: Mon Mar 10, 2008 9:44 pm

Problem with table of contents

Post by Stefan Kottwitz »

Hi Paulina,

welcome to the forum!

Looks like the chapter title font in the table of contents is white. ;-) Possibly. But it's hard to guess. Can you perhaps post your full preamble? Such as your usepackage.tex file? It's only settings, no document content needed.

Stefan
LaTeX.org admin
paulina-bravo
Posts: 2
Joined: Fri Jul 26, 2019 7:58 pm

Problem with table of contents

Post by paulina-bravo »

Sure,

Code: Select all

\documentclass[12pt,twoside]{report}
\usepackage[utf8]{inputenc}
\usepackage[english,spanish]{babel} 
\usepackage{csquotes}
\usepackage[T1]{fontenc}
\usepackage{hyperref}
\usepackage[a4paper,width=150mm,top=25mm,bottom=25mm,bindingoffset=6mm]{geometry}
\usepackage{lmodern} 
\usepackage{graphicx} 
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{amsfonts}
\usepackage{setspace}
\usepackage[backend=biber,style=numeric]{biblatex}
\addbibresource{sample.bib}
\usepackage{setspace}
\onehalfspacing      
\usepackage{fancyhdr}
\pagestyle{fancy}
\usepackage{xcolor}
\definecolor{Uyellow}{rgb}{255,249,77}
\definecolor{Ugray}{rgb}{130,130,126}

\hypersetup{
   pdfauthor={UDEM IMA Student},
   pdftitle={Bachelor in Science Thesis},
   pdfkeywords={report, mechanics, B.S., Universidad de Monterrey},
   pdfsubject={Project Report},
   colorlinks=true,
   citecolor=Ugray,
   urlcolor=Ugray,
   linkcolor=Ugray,
   pdfstartview=Fit,
   pdfpagelayout=SinglePage,
   pdfcreator=pdflatex,
   pdfproducer=pdflatex
}
User avatar
Stefan Kottwitz
Site Admin
Posts: 10335
Joined: Mon Mar 10, 2008 9:44 pm

Problem with table of contents

Post by Stefan Kottwitz »

If you simply comment out (or remove)

linkcolor=Ugray,

in \hypersetup, then you can see the heading texts in the table of contents.

Or try instead:

\definecolor{Ugray}{rgb}{0,0,0}

Just to see what happens. It's the link color that makes the text hardly visible, as table of content entries are links to the chapters or sections.

Stefan
LaTeX.org admin
Post Reply