Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

How to enable this style as well for TOC and bibliographypage ?

Note that, I'm using scrreprt document class

share|improve this question
add comment

1 Answer

Here's a variation of the code used in the answer linked in the question; with this new code the textpos package is no longer required; using \titleformat with the numberless key, one can also get the desired formatting for unnumbered chapters (\tableofcontents, for example):

\documentclass{scrreprt}
\usepackage[explicit]{titlesec}
\usepackage{tikz}
\usetikzlibrary{calc}

\DeclareFixedFont{\chapternumberfont}{T1}{ppl}{m}{n}{1.5in}

\newcommand\brectangles{%
\begin{tikzpicture}[overlay, remember picture]
\fill[cyan] 
  (current page.north west) rectangle ( $ (current page.north east) + (0,-7cm) $);
\fill[cyan!30] 
  (current page.south west) rectangle ( $ (current page.south east) + (0,3cm) $);
\end{tikzpicture}%
}

\titleformat{\chapter}[display]
  {\Huge\bfseries\sffamily\color{white}}
  {\thispagestyle{empty}\brectangles}
  {-1.75in}
  {%
  \vskip-4ex\filleft {\small\MakeUppercase{Digital Media Primer}}\\[2ex]
  \parbox[b]{.65\linewidth}{#1}%
  \raisebox{0.8in}{\parbox{.15\linewidth}{\large\chaptertitlename}}%
  \parbox[b]{.2\linewidth}{\chapternumberfont\thechapter}%
  }
  [\vspace*{1in}]

\titleformat{name=\chapter,numberless}[display]
  {\Huge\bfseries\sffamily\color{white}}
  {\thispagestyle{empty}\brectangles} 
  {-1in}
  {\parbox[b]{.65\linewidth}{#1}}
  [\vspace*{1in}]

\begin{document}

\tableofcontents
\chapter{Background}

\end{document}

Am image of the resulting document showing the desired formatting for both numbered and unnumbered chapters:

enter image description here

Feel free to make the adjustments that you consider best suit your needs.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.