I tried to adapt @Bernard solution to my case, but I am facing some troubles. It is possible that I just simply don't understand the code, but I tried to change almost every parameters, and I can't solve it

Here is a MWE, well not so minimal, but adapted to what I need :


\usepackage[top=2cm, bottom=2cm, left=1.5cm, right=1.5cm, headheight=15pt]{geometry}


\sethead{The nice header}{}{\chaptertitle}



    \cellcolor{titlecolour}\raisebox{-1ex}[2ex][7ex]{\hspace{1cm}} & \vskip-5.3mm\titlerule[2pt]

{\setlength{\tabcolsep}{0pt} \smash{\chaplabel}}%
{1ex} %position titre


{\setlength{\tabcolsep}{0pt} \smash{\chaplabel}}%
{1ex} %position titre


\chapter{Nice Chapter}

The output :

enter image description here

EDIT : I did not had problems when I used the chapterstyle as it was. It's when I tried to change the blue(green?) box size that it appeared.

  • try to replace \titlespacing{\chapter}{0pt}{*0}{1\baselineskip} with something like \titlespacing{\chapter}{0pt}{2\baselineskip}{1\baselineskip} – touhami May 26 '16 at 17:43
  • It's only worse ! It add more space between the chapter and the header – Paul Giroud May 27 '16 at 7:36
  • i will try to add an answer later – touhami May 27 '16 at 9:35
  • I identified one problem, it comes from the {c@{\enspace}X}. If I replace with {c@{\vspace{y}}X}, I can control (with y) the spacing between header and chapter head, but I lose the spacing between the ruler and the box – Paul Giroud May 27 '16 at 10:20
  • SOLVED : {c@{\vspace{1.5cm}\enspace}X} and I get to control the spacing by modifying the vspace ! – Paul Giroud May 27 '16 at 10:22

NB : Adding of the solution found 2 years ago but only posted in comments (as I could not give answer to my own questions then) SOLVED IT : {c@{\vspace{1.5cm}\enspace}X} and I get to control the spacing by modifying the vspace !

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.