I want to use the \chaperstyle{VZ43} in writing my book. How to color the vertical lines, section number box and chapter name in different colors?

  • 1
    And where is that style defined? Which document class do you use? – Gonzalo Medina Sep 18 '15 at 16:38
  • This chapter style is defined in memoir class – SG Sekaran Sep 18 '15 at 16:48

Adjust the colors to your liking:



\begin{tabular}{@{}p{1cm} p{\textwidth-3cm}}%
\makebox[.8cm]{\chapnumfont\strut \thechapter}}
& \chaptitlefont\textcolor{chaptertitlecolor}{##1}


\chapter{Test chapter}


If you want the style for the book class, you can use the original definition of the style by Vincent Zoonekynd which can be found in this page and introduce the coloring commands:



\def\LigneVerticale{{\color{rulecolor}\vrule height 5cm depth 2cm}\hspace{0.1cm}\relax}
  \rlap{\textcolor{boxcolor}{\vrule height 0.8cm width 1cm depth 0.2cm}}%
  \rlap{\hbox to 1cm{\hss\mbox{\textcolor{chapternumcolor}{#1}}\hss}}%
  \vrule height 0pt width 1cm depth 0pt}

}\par\vskip 2cm}
}\par\vskip 2cm}

\chapter{A test chapter}

enter image description here

  • Instead of using \chapter{\textcolor{red}{Test chapter}} to color the chapter title, give suggestion to use command in preamble. – SG Sekaran Sep 18 '15 at 17:14
  • @SGSekaran It's already in my answer. Use \definecolor or \colorlet to define chaptertitlecolor; in my example it is set to magenta!60, so you can say \colorlet{chaptertitlecolor}{red}. – Gonzalo Medina Sep 18 '15 at 17:31
  • Well, it is smoothly working in \documentclass{memoir}. If I use \documentclass{book}, so many errors are there. Let me know the changes to be done to use in \documentclass{book} – SG Sekaran Sep 19 '15 at 9:41
  • @SGSekaran Please see my updated answer. – Gonzalo Medina Sep 19 '15 at 14:50
  • Well. I am not good in using Latex. I got the expected answer. It is working well. Thanks – SG Sekaran Sep 20 '15 at 5:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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