Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I've added ToC, LoF and LoT in a .tex file in which the chapter style is Glenn. The problem is that ToC, LoF and LoT don't adapt the desired style, while bibliography i.e. does. I've tried

%\addtocontents{toc}{\protect\thispagestyle{fancy}}

but it didn't work. The code I am using is

\documentclass[12pt,a4paper]{book}
\usepackage[english,greek]{babel}
\usepackage[iso-8859-7]{inputenc}
\usepackage{kerkis}
\usepackage[pdftex]{graphicx}
%Options: Sonny, Lenny, Glenn, Conny, Rejne, Bjarne, Bjornstrup
\usepackage[Glenn]{fncychap}
\usepackage{fancybox}
\usepackage{fancyhdr}
\usepackage{subfiles}

%\usepackage[nottoc,numbib]{tocbibind}
\usepackage{fancyhdr}
\usepackage{tocloft}
\renewcommand{\cftsecleader}{\cftdotfill{\cftdotsep}}

\usepackage{color}
%\usepackage[usenames,dvipsnames]{color}
\definecolor{Darkgreen}{rgb}{0,0.4,0}
\definecolor{Darkblue}{rgb}{0,0,0.4}

\pagestyle{fancy}
\fancyhead{}
\fancyhf{} % delete current setting for header and footer
\fancyhead[LE,RO]{\bfseries\thepage}
\fancyhead[LO]{\rightmark}
\fancyhead[RE]{\leftmark}
\renewcommand{\headrulewidth}{0.5pt}
\renewcommand{\footrulewidth}{0pt}
\fancypagestyle{plain}{%
\fancyhead{} % get rid of headers on plain pages
\renewcommand{\headrulewidth}{0pt} % and the line}

\parskip 3mm
\footskip = 15mm
%```````````````````````````````````````````````````````````

%```````````````````````````````````````````````````````````
\begin{document}

%~~~~~~~~~~~~~~~~~~~~~~~Front-Page~~~~~~~~~~~~~~~~~~~~~~~~~~
\begin{titlepage}
TitlePage
\end{titlepage}

\pagenumbering{roman}
\textcolor{Darkblue}{\tableofcontents}
%\addtocontents{toc}{\protect\thispagestyle{fancy}}
\newpage
\addcontentsline{toc}{chapter}{Κατάλογος Σχημάτων}
\listoffigures
%\addtocontents{lof}{\protect\thispagestyle{fancy}}
\newpage
\addcontentsline{toc}{chapter}{Κατάλογος Πινάκων}
\listoftables
%\addtocontents{lot}{\protect\thispagestyle{fancy}}
\newpage

\subfile{abstractGR.tex}

\end{document}

Any ideas? Thank you in advance!

The subfile is just a test file...

\documentclass[main.tex]{subfiles}
\begin{document}
\textcolor{Darkblue}{\chapter{Intro}}
    This is just a test subfile
\end{document}
share|improve this question
add comment

1 Answer

up vote 8 down vote accepted

Loading tocloft with the titles option (see p.7 of the manual for details) is a good start. As there also seems to be an incompatibility between the \tableofcontents definition of the standard classes and fncychap, I use an unnumbered \contentsname chapter plus a "bare" ToC.

\documentclass{book}

\usepackage[Glenn]{fncychap}

\usepackage[titles]{tocloft}

\makeatletter
\newcommand*{\tocwithouttitle}{\@starttoc{toc}}
\makeatother

\begin{document}

\chapter*{\contentsname}
\markboth{\MakeUppercase{\contentsname}}{\MakeUppercase{\contentsname}}
\tocwithouttitle

\chapter{foo}

Some text.

\begin{thebibliography}{9}
\bibitem{A01} A fake bibitem.
\end{thebibliography}

\end{document}

enter image description here

share|improve this answer
    
It is working!!! However, my compiler didn't understund the option "title" so I just removed and it works fine, apart from some errors in .toc. The important thing is that this is working like a charm in ToC, LoF and LoT as well! Thank you very much! –  Thanos Sep 1 '12 at 17:58
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.