I have found a code for a nice chapter heading style which I would like to use and if possible modify a little bit. The code uses the tikz
package and a \begin{tikzpicture}...\end{tikzpicture}
The code works okay except for the Table of Contents page which is rendered with a more normal heading style. The issue seems to be with me using the memoir
class, which I need to be able to use several packages and redefinitions.
The code works okay for the Table of Contents heading using for example the report
class. But it does, as expected, show many 'Undefined control sequence
' errors.
As I am not that much experienced with such advanced coding, I would like to ask if it's possible to modify the code to be able to include the Table of Contents heading using the memoir
class?
Secondly I was also wondering if it's possible to modify the code a little so that the chapter number is to the right and a bit bigger than the chapter title and with a image as background instead of a lightblue color?
Below is a minimal working document including some code that doesn't seem to work with e.g. the report class.
\documentclass[svgnames,,a4paper,11pt,fleqn,fleqn,twoside,openany]{memoir}
\usepackage[utf8]{inputenc}
\usepackage[danish]{babel}
\usepackage[T1]{fontenc}
\usepackage{ragged2e,anyfontsize}
\usepackage{tikz}
\usepackage{verbatim}
\usepackage[explicit]{titlesec}
\usepackage[]{kpfonts}
\usepackage{kpfonts}
\usepackage[explicit]{titlesec}
\makepagestyle{Uni} % Defines page header and footer from here to ...
\makepsmarks{Uni}{%
\createmark{chapter}{left}{shownumber}{}{. \ }
\createmark{section}{right}{shownumber}{}{. \ }
\createplainmark{toc}{both}{\contentsname}
\createplainmark{lof}{both}{\listfigurename}
\createplainmark{lot}{both}{\listtablename}
\createplainmark{bib}{both}{\bibname}
\createplainmark{index}{both}{\indexname}
\createplainmark{glossary}{both}{\glossaryname}
}
\nouppercaseheads
\makeevenhead{Uni}{Gruppe Fib10, 1-15}{}{\leftmark}
\makeoddhead{Uni}{\rightmark}{}{Aalborg Universitet}
\makeevenfoot{Uni}{\thepage}{}{}
\makeoddfoot{Uni}{}{}{\thepage}
\makeheadrule{Uni}{\textwidth}{0.5pt}
\makefootrule{Uni}{\textwidth}{0.5pt}{1mm}
\copypagestyle{Unichap}{Uni}
\makeoddhead{Unichap}{}{}{}
\makeevenhead{Unichap}{}{}{}
\makeheadrule{Unichap}{\textwidth}{0pt}
\aliaspagestyle{chapter}{Unichap}
% ... here
\newcommand*\chapterlabel{} % Chapter style from here to...
\titleformat{\chapter}
{\gdef\chapterlabel{}
\normalfont\sffamily\Huge\bfseries\scshape}
{\gdef\chapterlabel{\thechapter\ }}{0pt}
{\begin{tikzpicture}[remember picture,overlay]
\node[yshift=-3cm] at (current page.north west)
{\begin{tikzpicture}[remember picture, overlay]
\draw[fill=LightSkyBlue] (0,0) rectangle
(\paperwidth,3cm);
\node[anchor=east,xshift=.9\paperwidth,rectangle,
rounded corners=20pt,inner sep=11pt,
fill=MidnightBlue]
{\color{white}\chapterlabel#1};
\end{tikzpicture}
};
\end{tikzpicture}
}
\titlespacing*{\chapter}{0pt}{50pt}{-60pt} % ... here
\begin{document}
\tableofcontents
\chapter{Introduction}
This is some text
\section{section}
This is some text
\chapter{Main}
\section{Section}
Text
\begin{thebibliography}{99}
\bibitem{Test} test reference
\end{thebibliography}
\end{document}