Document ClassesProblem with tableofcontents, listofigures, listoftables

Information and discussion about specific document classes and how to create your own document classes.
Post Reply
chetoo
Posts: 2
Joined: Mon Mar 24, 2008 6:03 pm

Problem with tableofcontents, listofigures, listoftables

Post by chetoo »

Hi all,

I've recovered some old document (2 years old) and tried to adapt it to build a new one. I do not know which changes have been made in LaTeX. The thing looks as follows:

Code: Select all

\documentclass[12pt,twoside]{book}
\usepackage{graphics}
\usepackage{geometry}
\geometry{verbose,a4paper,tmargin=25mm,bmargin=25mm,lmargin=25mm,rmargin=25mm}
\usepackage[latin1]{inputenc}	% Para que pille solo los acentos
%\usepackage[spanish]{babel}
\usepackage{subfigure}
\usepackage{fancyhdr}
\usepackage{extramarks}
\usepackage{float}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{float}
\usepackage{graphicx}
\usepackage{color}
\usepackage{varioref}
%\usepackage[breaklinks=true,ps2pdf,hyperref,colorlinks]{hyperref}
\usepackage[breaklinks=true,ps2pdf,hyperref,colorlinks=true]{hyperref}

\usepackage[hang,small,bf]{caption}

\begin{document}

\frontmatter

\title{\Huge{Whatever}}

\author{Me}

\maketitle

\tableofcontents
\listoffigures
\listoftables

\include{foreword}

\mainmatter

\pagestyle{fancy}
\fancyhead{}
\fancyfoot{}
\fancyhead[CO]{\nouppercase{\leftmark}}
\fancyhead[RO]{\thepage}
\fancyhead[CE]{\nouppercase{\rightmark}}
\fancyhead[LE]{\thepage}
\fancyfoot[LE]{SAW-AWGs}
\fancyfoot[RO]{Muñoz, Lima, Santos}
\renewcommand{\headrulewidth}{1.5pt}
\renewcommand{\footrulewidth}{1.5pt}

\include{motivation}
\include{techniques}
\include{saw-awg}
\include{technologies}
\include{applications}

If either toc, lot, of lof commands are included, when issuing a latex command it complains about '{' missing on the first line of my included files, which is always a \chapter{whatever}. If I comment out the toc, lot, lof, compiling goes ok.

I cannot live without the table of contents, etc, so, what can I do?

Thanks in advance,

Chetoo.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
User avatar
sommerfee
Posts: 503
Joined: Mon Apr 09, 2007 4:20 pm

Problem with tableofcontents, listofigures, listoftables

Post by sommerfee »

This seems to be a problem with the package "extramarks":

Code: Select all

\listfiles
\documentclass{book}
\usepackage{extramarks}

\begin{document}
\tableofcontents
\chapter{whatever}
Blah\ldots
\end{document}
with the file list

Code: Select all

 *File List*
    book.cls    2005/09/16 v1.4f Standard LaTeX document class
    bk10.clo    2005/09/16 v1.4f Standard LaTeX file (size option)
extramarks.sty    
 ***********
and the error

Code: Select all

Chapter 1.
! Missing { inserted.
<to be read again> 
                   }
l.7 \chapter{whatever}
I don't know this package, but maybe someone else has a solution for this!?
User avatar
Stefan Kottwitz
Site Admin
Posts: 10290
Joined: Mon Mar 10, 2008 9:44 pm

Problem with tableofcontents, listofigures, listoftables

Post by Stefan Kottwitz »

I've seen it too - it's compiling, if extramarks is not used.
extramarks belongs to fancyhdr.

Chetoo, you might have also a look at l2tabu for new information concerning old/superseded packages, if you adapt your old documents.

Stefan
chetoo
Posts: 2
Joined: Mon Mar 24, 2008 6:03 pm

Problem with tableofcontents, listofigures, listoftables

Post by chetoo »

Stefan_K wrote:I've seen it too - it's compiling, if extramarks is not used.
extramarks belongs to fancyhdr.

Chetoo, you might have also a look at l2tabu for new information concerning old/superseded packages, if you adapt your old documents.

Stefan
Hi all,

Thanks, it works without extramarks. No mentioned in l2tabu document, but thanks, I'll keep it in mind for the future.
Post Reply