Something weird is going on when I try to typeset my tex file. I created a table of contents, and it compiled just as I wanted, then I tried to enter a list of table and figure....all hell broke loose afterwards. This is the preamble and the very beginning of the document:
\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
Text Formatting ⇒ \tableofcontents help
- localghost
- Site Moderator
- Posts: 9201
- Joined: Fri Feb 02, 2007 12:06 pm
\tableofcontents help
The problem is not comprehensible with this code snippet. Build a complete and compilable minimal working example (MWE) that reproduces the misbehaviour. Remove all unnecessary packages and new definitions of commands in this MWE.
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
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
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes[/size]
¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1
Board Rules
Avoidable Mistakes[/size]
¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1