ToC、LoF、LoT 與章節樣式相同

ToC、LoF、LoT 與章節樣式相同

.tex我已在章節樣式為 Glenn 的文件中新增了 ToC、LoF 和 LoT 。問題是 ToC、LoF 和 LoT 沒有適應所需的風格,而參考書目 ie 可以。我試過了

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

但沒有成功。我正在使用的程式碼是

\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}

有任何想法嗎?先感謝您!

子文件只是一個測試文件......

\documentclass[main.tex]{subfiles}
\begin{document}
\textcolor{Darkblue}{\chapter{Intro}}
    This is just a test subfile
\end{document}

答案1

tocloft使用選項加載titles(有關詳細信息,請參閱手冊第 7 頁)是一個很好的開始。由於\tableofcontents標準類的定義和之間似乎也不相容fncychap,因此我使用未編號的\contentsname章節加上「裸」目錄。

\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}

在此輸入影像描述

相關內容