I'm using document class report
and I have decided to use one of the predefined styles of Vincent Zoonekynd's for chapter headings, with some modifications.
\documentclass[11pt,a4paper,oneside]{report}
\usepackage{xcolor}
\makeatletter
\def\LigneVerticale{\vrule height 1.5cm depth 0.9cm\hspace{0.1cm}\relax}
\def\LignesVerticales{%
\let\LV\LigneVerticale\LV\LV\LV\LV\LV\LV\LV\LV\LV\LV}
\def\GrosCarreAvecUnChiffre#1{%
\rlap{\vrule height 0.8cm width 1cm depth 0.2cm}%
\rlap{\hbox to 1cm{\hss\mbox{\color{white}#1}\hss}}%
\vrule height 0pt width 1cm depth 0pt}
\def\GrosCarreAvecUnChiffres#1{{%
\color{white}%
\rlap{\vrule height 0.8cm width 1cm depth 0.2cm}%
\rlap{\hbox to 1cm{\hss\mbox{\color{black}#1}\hss}}%
\vrule height 0pt width 1cm depth 0pt}}
\def\@makechapterhead#1{
\vspace*{-20pt}
\hbox{%
\huge\bfseries
\LignesVerticales
\hspace{-0.62cm}%
\GrosCarreAvecUnChiffre{\thechapter}
\hspace{0.2cm}\hbox{#1}%
}\par\vskip 0.5cm}
\def\@makeschapterhead#1{
\vspace*{-20pt}
\hbox{%
\huge\bfseries
\LignesVerticales
\hspace{-0.62cm}%
\GrosCarreAvecUnChiffres{\thechapter}
\hspace{0.2cm}\hbox{#1}%
}\par\vskip 0.5cm}
\makeatother
\begin{document}
\chapter{Name}
\chapter*{Surname}
\end{document}
I would like to make other modifications and don't know how to do this. The definition for \chapter
is alright, no other modification is needed. The only change is about \chapter*
s. I would like to put any number (zero) away and move the name of the chapter to the left in the white box. Does anyone know how to change this?
:)
A tip: If you indent lines by 4 spaces, they'll be marked as a code sample. You can also highlight the code and click the "code" button (with "{}" on it).\white
it was supposed to say\color{white}
. I fixed that, hope that's ok.