I know that this should be possible, but I'm not sure how to go about it.
I would like to have a small rectangle appear on each page (outside edge), which runs right up to the edge of the page, and for it to be in the same place for each page - so that when the book is printed, the colour is visible on the outside edge of the page.
My current thinking is that i could maybe include something in my fancychap
which did it for me, but I really don't know a huge amount about latex, so where to go from here has me a little lost...
Doing somthing like this gets be someway there:
%................"Fancy Headers" - Nice page headings
\usepackage{fancyhdr}
\pagestyle{fancy}
\usepackage{calc}
\fancyheadoffset[LE,RO]{7mm}
\fancyheadoffset[LO,RE]{5mm}
\renewcommand{\chaptermark}[1]{\markboth{#1}{}}
\renewcommand{\sectionmark}[1]{\markright{\thesection\ #1}}
\fancyhf{}
\fancyhead[LE]{\colorbox{cyan}{\parbox[l][10mm][c]{10mm}{\hspace*{50pt}}} \thepage}
\fancyhead[RO]{\thepage \colorbox{cyan}{\parbox[l][10mm][c]{10mm}{\hspace*{50pt}}}}
\fancyhead[LO]{\rightmark}
\fancyhead[RE]{\leftmark}
\fancypagestyle{plain}{%
\fancyhead{} % get rid of headers
\renewcommand{\headrulewidth}{0pt} % and the line
}
But all that does is put the colorbox
in the corner, outside of the page number. I'd rather it was a few inches down the page (i.e. outside of the header).
This gives this:
which isn't all the way there. The last time i tried something like this it took me hours, and this is a little worse than the previous thing i tried. Can any of you think of a simple(ish) way i could go about this?
I already have this for my titles:
\usepackage[strict]{changepage}
%.................Custom chapter headings
\makeatletter
\usepackage[explicit]{titlesec}
\titleformat
{\chapter} % command
[display] % shape
{\fontsize{76}{80}\usefont{OT1}{pzc}{m}{n}\selectfont}% format
{\vspace*{-135pt}%
\begin{adjustwidth}{-20mm}{-20mm}%
\ifodd \c@page \raggedleft \else \raggedright \fi \colorbox{cyan}{\parbox[l][25mm][c]{100mm}{\ifodd \c@page \raggedleft \thechapter \hspace*{20mm} \else \raggedright \hspace*{20mm} \thechapter \fi}}% title code
\end{adjustwidth}%
}% label
{-136pt}% sep
{\bfseries\Huge \ifodd \c@page \raggedleft \else \raggedright \fi%
\begin{adjustwidth}{-20mm}{-20mm}%
\ifodd \c@page \raggedleft \else \raggedright \fi \colorbox{cyan}{\parbox[l][15mm][c]{100mm}{\ifodd \c@page \hspace*{7mm} \raggedright #1 \else \raggedleft #1 \hspace*{7mm} \fi}}%
\end{adjustwidth}%
}
%\titlespacing*{\chapter}{-20mm}{0.5ex}{0.5ex}[-20mm]
\makeatother
which places coloured boxes around the titles and their numbers which extend off the edge of the page. Ideally, the swatches on the other pages would line up with these ones. The bonus of using the header to do it would be that you wouldn't have to add in any special logic to deal with the pages that don't have headers (like the title page, contents, and other pages where the chapter starts and stuff).
eso-pics
. If i can get it to work as i want.