Page LayoutProblems in TOC with fancyhdr

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
Post Reply
yago
Posts: 29
Joined: Sat Dec 13, 2008 6:40 pm

Problems in TOC with fancyhdr

Post by yago »

Hello to all.

I have a problem with the TOC of my document (two sides) that's is placed at the end. I use the package fancyhdr and the titlesec/titletoc, among the others. This is my preamble:

Code: Select all

Code, edit and compile here:
\documentclass[spanish]{book}
\usepackage[T1]{fontenc}
\usepackage[latin9]{inputenc}
\usepackage{geometry}
\geometry{verbose,paperwidth=170mm,paperheight=250mm,tmargin=2.5cm,bmargin=2.5cm,lmargin=2.5cm,rmargin=2cm}
\pagestyle{plain}
\setcounter{secnumdepth}{3}
\setcounter{tocdepth}{1}
\usepackage{textcomp}
\usepackage{amsmath}
\usepackage{amssymb}
\makeatletter
\usepackage{fnpos}
\usepackage{endnotes}
\let\footnote=\endnote
\renewcommand{\notesname}{Notas}
\usepackage{ifthen}
\usepackage{graphicx}
\usepackage{colortbl}
\usepackage{lscape}
\usepackage{wrapfig}
\usepackage{pst-math,pstricks-add}
\usepackage{picins}
\usepackage{wasysym}
\usepackage{marvosym}
\usepackage{mathtools}
\newtagform{brackets}{[}{]}
\usetagform{brackets}
\usepackage{txfonts}
\usepackage[a]{esvect}
\usepackage{nccparskip}
\usepackage[lflt]{floatflt}
\usepackage{ccaption}
\usepackage[font=small,labelfont=bf]{caption}
\usepackage[spanish]{babel}
\usepackage{subdepth}
\usepackage{array}
\usepackage{booktabs}
\usepackage{multicol}
\usepackage{multirow}
 
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
So, when I put the command \tableofcontents before the command \end{document}, I have this errors in the log file:

Code: Select all

Code, edit and compile here:
! Use of \reserved@a doesn't match its definition.
\new@ifnextchar ...served@d = #1\def \reserved@a {
#2}\def \reserved@b {#3}\f...
l.10691 \tableofcontents
{}
If you say, e.g., `\def\a1{...}', then you must always
put `1' after `\a', since control sequence names are
made up of letters only. The macro here has not been
followed by the required stuff, so I'm ignoring it.
! Argument of \ttl@assign@i has an extra }.
<inserted text>
\par
l.10691 \tableofcontents
{}
I've run across a `}' that doesn't seem to match anything.
For example, `\def\a#1{...}' and `\a}' would produce
this error. If you simply proceed now, the `\par' that
I've just inserted will cause me to report a runaway
argument that might be the root of the problem. But if
your `}' was spurious, just type `2' and it will go away.
Runaway argument?
{\nobreak \@xcentercr }\reserved@a
! Paragraph ended before \ttl@assign@i was complete.
<to be read again>
\par
l.10691 \tableofcontents
{}
I suspect you've forgotten a `}', causing me to apply this
control sequence to too much text. How can we recover?
My plan is to forget the whole thing and hope for the best.
! Argument of \ttl@assign@i has an extra }.
<inserted text>
\par
l.10691 \tableofcontents
{}
I've run across a `}' that doesn't seem to match anything.
For example, `\def\a#1{...}' and `\a}' would produce
this error. If you simply proceed now, the `\par' that
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Can you help me? Thanks a lot with regards. Please, see the attached file.
Attachments
NDICE GENERAL.pdf
(11.72 KiB) Downloaded 529 times

Recommended reading 2024:

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

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

User avatar
Stefan Kottwitz
Site Admin
Posts: 10324
Joined: Mon Mar 10, 2008 9:44 pm

Re: Problems in TOC with fancyhdr

Post by Stefan Kottwitz »

Hi Yago,

I guess the problem is caused by \pagestyle{fancyplain}. I would suggest don't use \pagestyle{fancyplain}, don't use \fancyplain{}, have a look at \fancypagestyle{plain} instead.

Stefan
LaTeX.org admin
Post Reply