I am writing my dissertation and for that, I am using a style file that originally was created by Georgia Tech, but later on, it was modified by different students at my school. The problem I currently have is that our school has recently changed some of their standards for the format of a dissertation. I have been able to modify this style file accordingly to cover most of their changes. However, there is one thing I haven't been able to figure out so far and that is: Right now, the style file generates a table of contents where each chapter title is shown in bold (please look at the image). Our school requires that nothing should be in bold for this section. Please provide advice if you know how to fix this. I would be more than happy to share the style file or discuss this in private with you.
[Tex/LaTex] Table of Contents Modification: How to change fonts from bold to normal
formattingtable of contents
Related Solutions
Well, it seems that the class uses the internal ToC generator, therefore this should work:
\documentclass{report}
% THESE COUPLE LINES ARE THAT YOU NEED FOR THE 2ND PART
\AtBeginDocument{
\addtocontents{toc}{\tiny}
\addtocontents{lof}{\tiny}
}
% THESE COUPLE LINES ARE THAT YOU NEED FOR THE 1ST PART
\usepackage{xpatch}
\makeatletter
\xpatchcmd{\tableofcontents}{\contentsname \@mkboth}{\small\contentsname \@mkboth}{}{}
\xpatchcmd{\listoffigures}{\chapter *{\listfigurename }}{\chapter *{\small\listfigurename }}{}{}
\makeatother
\begin{document}
\tableofcontents
\listoffigures
\chapter{CHAPTER}
\section{SECTION}
\begin{figure} \caption{MY FIG} \end{figure}
\end{document}
Since you are already using the package appendix
, there is a very simple way.
First of all, let's define a new environment that behaves like appendices
, but inserts a page for references (with uppercase letters and normal size font):
\newenvironment{references}{%
\renewcommand{\appendixtocname}{\bibname}%
\renewcommand{\appendixpagename}{\MakeUppercase{\normalsize\bibname}}%
\appendices}{%
\endappendices}
When you call your bibliography, you have to encase it inside the references
environment:
\begin{references}
\bibliography{test}
\end{references}
Of course, you have to tell tocbibind
that you don't want an entry for the bibliography in the ToC, otherwise you would have two entries:
\usepackage[nottoc,notbib]{tocbibind}
MWE:
\documentclass[oneside]{book}
\usepackage{titlesec}
\usepackage[nottoc,notbib]{tocbibind}
\usepackage{blindtext}
\usepackage[toc,page]{appendix}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% For TOCLOFT
%
\usepackage{tocloft}
\makeatletter
\renewcommand{\@tocrmarg}{2.75em}
\makeatother
% Change format and legend of title of page
% "Table of Contents", centered and in all caps.
\setlength{\cftbeforetoctitleskip}{0.5in}
\setlength{\cftaftertoctitleskip}{0.2in}
\renewcommand{\contentsname}{Table of Contents}
\renewcommand{\cfttoctitlefont}{\hfill\MakeUppercase}
\renewcommand{\cftaftertoctitle}{\hfill}
% "listofTables", centered and all in caps.
\renewcommand{\cftlottitlefont}{\hfill\MakeUppercase}
\renewcommand{\cftafterlottitle}{\hfill}
%\renewcommand{\cftafterlottitle}{%
% \hfill \\[\baselineskip]\mbox{}Table\hfill Page}
% "List of Figures", centered and all in caps.
\setlength{\cftbeforeloftitleskip}{0.5in}
\setlength{\cftafterloftitleskip}{0.2in}
\renewcommand{\cftloftitlefont}{\hfill\MakeUppercase}
\renewcommand{\cftafterloftitle}{\hfill}
%\renewcommand{\cftafterloftitle}{\hfill\\[\baselineskip]\mbox{}Figure\hfill Page}
%\renewcommand{\cftafterloftitle}{\hfill}
% Change typesetting of chapter lines in TOC:%%%%%%%%%%%%%%%%%
% Create lead of dots for chapters
\renewcommand{\cftchapleader}{\cftdotfill{\cftdotsep}}
\setlength{\cftbeforechapskip}{0em}
\renewcommand{\cftchapfont}{\scshape}
%\renewcommand{\cftchapleader}{\bfseries\cftdotfill{\cftchapdotsep}}
% Formats chapter page number as normal -- otherwise it woudl be bold.
\renewcommand{\cftchappagefont}{\normalfont}
% Get the Roman number for chapters to align...
% This comes from tocloft manual page 11.
\setlength{\cftchapnumwidth}{3em}
\newlength{\mylen}
\settowidth{\mylen}{\cftchappresnum\cftchapaftersnum} % extra space
\addtolength{\cftchapnumwidth}{\mylen} % add the extra space
\setlength{\mylen}{1.5em}
\renewcommand{\cftchappresnum}{\hfill}
% add a dot there
\renewcommand{\cftchapaftersnum}{.\hspace*{\mylen}}
\addtolength{\cftchapnumwidth}{\mylen}
% Change typesetting of section in TOC:%%%%%%%%%%%%%%%%%%%
\renewcommand{\cftsecfont}{\scshape}
\setlength{\cftsecindent}{6em}
% Typesetting for subsections. %%%%%%%%%%%%%%%%%%%%%%
\setlength{\cftsubsecindent}{7.5em}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% For bibliography, nifty chunk from an example by Gonzalo Medina.
\usepackage{apacite}
\usepackage{natbib}
\usepackage{filecontents}
\begin{filecontents}{test.bib}
@article{author99,
title = {A fine title},
year = {1899},
author = {An Author and Another Bauthor and Yeta Cauthor},
journal = {Madness}
}
@article{author05,
title = {The best title},
year = {1905},
author = {An Author and More Dauthors and Whois Thisauthor and Heis Thatauthor},
journal = {Insanity}
}
\end{filecontents}
\bibliographystyle{apacite}
\newenvironment{references}{%
\renewcommand{\appendixtocname}{\bibname}%
\renewcommand{\appendixpagename}{\MakeUppercase{\normalsize\bibname}}%
\appendices}{%
\endappendices}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Document
\begin{document}
\tableofcontents
\blinddocument
The time has come for all good men to come to the aid of their country test
\citep{author05}. According to \citet{author05}, the time has come for all good men to come to the aid of their country.
\chapter{that}
\begin{references}
\bibliography{test}
\end{references}
\begin{appendices}
\blinddocument
\end{appendices}
\end{document}
Output (ToC):
Output (References):
Best Answer
The part that is responsible for setting the chapters in the ToC is
\l@chapter
in the standard document classes. Take, for example, its definition fromreport.cls
:Note how within the
\begingroup
...\endgroup
segment, a number of lengths are set (\parindent
is set to zero/\z@
,\rightskip
is set to\@pnumwidth
and\parfillskip
is set to-\@pnumwidth
). Subsequently, horizontal mode is entered (\leavevmode
) and then the font series is set to bold (\bfseries
).You'll probably find something similar in your class or style file which needs changing. This can either be achieved via a total redefinition, a temporary removal of the meaning of
\bfseries
or a patch (usingetoolbox
and friends).tocloft
is also an option, and allows for specific changes to ToC entries based on their level (chapter, or section, or subsection, ...).