0

Is it possible to add a colored margin to the pages according to the example below with having the chapter title written on the side (alternatively, it could say "Ch.1: Heading on level (chapter)") and the section title written on top (alternatively, it could say "1.1 Heading on level 1 (section)" and "1.2 Lists") as well as the page number at the bottom of the colored area (near the middle of the page).

And I would like to have every chapter with a different color.

The width of the margin will have to be customized manually I guess but 1cm should be fine.

I am using the book document class: \documentclass[11pt,twoside]{book}

enter image description here

What I have so far would be the following MWE:

\documentclass[12pt, twoside]{book}
\usepackage[T1]{fontenc}
\usepackage[total={6in,10in}, left=1.5in, top=0.5in, includeheadfoot]{geometry}

\usepackage{blindtext}

\begin{document} \frontmatter \tableofcontents

\mainmatter \blinddocument \blinddocument \end{document}

  • Welcome! The drawing is different, but what about the idea here ? – Rmano Jun 28 '23 at 15:30
  • Moreover, if you can add a complete, compilable code with what you tried, people can use that to help you achieve the final result. Please help us to help you; otherwise we will have to do all the work of preparing an example document from scratch. – Rmano Jun 28 '23 at 15:34
  • I've edited my post to add a MWE but as you can see, I didn't go really far. The idea you suggested goes to the right direction and I saw it previously but it still doesn't really do what I would like. I tried to play around with it but without success. I also found this other post which goes to the right direction as well and tried to combine them but again without success. – Thomas Dobrenel Jun 29 '23 at 09:40
  • I think here there are some useful ideas about detecting even and odd pages: https://tex.stackexchange.com/questions/6143/if-then-else-for-odd-page-even-page And at the end there is something similar to your drawing. For changing the color, you could simply define a custom color and re-define it before \chapter command – Iacobus1983 Jun 29 '23 at 09:57

0 Answers0