Text Formatting ⇒ Changing Chapter-format for Bibliography/TOC
Changing Chapter-format for Bibliography/TOC
I am writing my thesis up and have included some tikz code to change the style of my chapter headings in my preamble (code below). This puts the chapter number ('Chapter 1' say) on the left hand side, and the name ('Introduction', say) on the right hand side. This works well for chapters 1-6. Now if I include a TOC (\tableofcontents) and Bibliography (\bibliography{mybib}), I get the words 'Chapter 0' and 'Chapter 6' respectively appearing, where the chapter numbers appear (correctly) for the rest of the chapters. I would like to remove these Chapter Numbers for the TOC and Bibliography, so I just end up with 'Contents' or 'Bibliography' on the RHS and nothing on the LHS. Any suggestions much appreciated.
Many thanks
Katie
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\documentclass[svgnames]{report}
\usepackage[usenames]{xcolor}
\usepackage{natbib}
\bibliographystyle{chicago}
%%%%%%%%%%Chapter headings
\usepackage{tikz,kpfonts}
\usepackage[explicit]{titlesec}
\newcommand*\chapterlabel{}
\titleformat{\chapter}
{\gdef\chapterlabel{}
\normalfont\sffamily\Huge\bfseries\scshape}
{\gdef\chapterlabel{\thechapter\ }}{0pt}
{\begin{tikzpicture}[remember picture,overlay,font=\Huge]
\node[yshift=-0.3\textheight, xshift=4cm] at (current page.north west)
{\begin{tikzpicture}[remember picture, overlay]
\draw[fill=Honeydew] (0,0) rectangle
(\linewidth,2cm);
\node[anchor=east,draw=black,xshift=\textwidth,rectangle,
rounded corners=20pt,inner sep=11pt,
fill=CornflowerBlue,font=\sffamily\bfseries\huge]
{\color{white} #1}; %
\node[anchor=south west,
%xshift=30mm,%yshift=-0.4\textheight,
font=\sffamily\bfseries\Huge]
%at (current page.north west)
{\chaptername\ \thechapter};
\end{tikzpicture}
};
\end{tikzpicture}
\vspace{0.2\textheight}
}
\titlespacing*{\chapter}{0pt}{50pt}{-60pt}
NEW: TikZ book now 40% off at Amazon.com for a short time.
And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p