I'm getting an error with my table of contents. Rather than getting:
1 Section 1 -------- 1
I am getting
black1 Section 1 --------1
I have no idea why. I suspect it might be because I am using pylatex to compile the latex script, which looks like this:
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{lmodern}
\usepackage{geometry}
\usepackage{hyperref}
\usepackage{xcolor}
\usepackage{colortbl}
\usepackage{array}
\usepackage{graphicx}
\geometry{portrait, margin=1in,tmargin=1in}}
\hypersetup{colorlinks,citecolor=black,filecolor=black,linkcolor=black,urlcolor=black}
\renewcommand{\rmdefault}{phv} % Arial
\renewcommand{\sfdefault}{phv} % Arial
\begin{titlepage}
\begin{document}
\hfill \\ Project Name \\
Systems Performance Team \\
External Reference: XXXX \\
Internal Reference: TPREF-XXXXXXXX \\
\begin{center}
\uppercase{\Huge{Report Title}} \\
\uppercase{\Huge{Line}} \\
\end{center}
\end{titlepage}
\tableofcontents
\clearpage
\section{Section 1}
\footnotesize
Hello, testing this document business
\end{document}
Best Answer
You have a misplaced
\begin{titlepage}
that causes several errors, so the output is not really predictable.Your code needs also some reshaping:
hyperref
should be loaded lastcolortbl
afterxcolor
, do\usepackage[table]{xcolor}
\uppercase{\Huge{text}}
is wrong; declare\Huge
in advance and use\MakeUppercase
; also remember that\Huge
does not take an argument.geometry
andhyperref
are better set in a line for each one, so they're better visible