Text Formatting ⇒ \tableofcontents help
\tableofcontents help
\documentclass[10pt,a4paper]{article}
\usepackage{geometry} % See geometry.pdf to learn the layout options. There are lots.
\geometry{letterpaper} % ... or a4paper or a5paper or ...
%\geometry{landscape} % Activate for for rotated page geometry
%\usepackage[parfill]{parskip} % Activate to begin paragraphs with an empty line rather than an indent
\usepackage{setspace}
\doublespace
\usepackage{graphicx}
\usepackage{amssymb}
\usepackage{epstopdf}
\DeclareGraphicsRule{.tif}{png}{.png}{`convert #1 `dirname #1`/`basename #1 .tif`.png}
\usepackage{verbatim}
\usepackage{fancyhdr} % This should be set AFTER setting up the page geometry
\pagestyle{plain} % options: empty , plain , fancy
\renewcommand{\headrulewidth}{0pt} % customise the layout...
\lhead{}\chead{}\rhead{}
\lfoot{}\cfoot{\thepage}\rfoot{}
\title{Title}
\author{Author}
%\date{} % Activate to display a given date or no date
\begin{document}
\maketitle
\tableofcontents
\newpage
An error refers to me to l.1 - it reads as follows
"Paragraph ended before \l@section was complete. <to be read again>
\par
l.1 \contentsline {section}{\par\vfil\penalty-\@M}{2}"
Once I remove the \tableofcontents line, the document compiles as usual...of course without the toc
Apologies in advance for the sloppy preamble, I'm a bit new to the capabilities of latex.
Thanks in advance,
ek
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
\tableofcontents help
It's not for sure that the problem is located in the ToC. Check all \section commands for missing braces. The log file should give information on that.
Thorsten
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10