我在章节样式为 Glenn 的文件中加入了 ToC、LoF 和 LoT .tex
。问题是 ToC、LoF 和 LoT 不符合所需样式,而参考书目则符合。我试过
%\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
使用选项加载(详情请参阅手册第 7 页)是一个不错的开始。由于标准类的定义和titles
之间似乎存在不兼容性,因此我使用了一个未编号的章节和一个“裸”目录。\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}