Here’s the variation of Tobi’s approach with fancyhdr instead of scrpage2, as requested by the OP (too long for a comment). I used the pagestyles of the OP’s example.
Note, that I had to define two \fancypagestyles inside of a \newcommand (lettergroup). Instead of the pagestyle chapterstart I could have redefine the plain pagestyle, but I wanted to avoid possible unwanted side effects.
If one wants to use makeindex or xindy, one has to (re)create a style file with \lettergroupfor the headings.
\documentclass{book}
% load TikZ to draw the boxes
\usepackage{tikz}
\usetikzlibrary{calc}
% use fancyhdr or whatever you want to add
% the boxes to the header to make them appear
% on every page
\usepackage{fancyhdr}
\fancypagestyle{basicstyle}{%
\renewcommand{\headrulewidth}{0.4pt}
\renewcommand{\footrulewidth}{0pt}
\fancyhf{}
\fancyhead[LE,RO]{\fontfamily{phv}\selectfont\textbf{\rightmark}}
\fancyhead[LO,RE]{\textbf{\thepage}}
}
% new counter to hold the current number of the
% letter to determine the vertical position
\newcounter{letternum}\fontfamily{phv}\selectfont
% newcounter to set the number of thumbs fitting vertical
% and setting the height of a boxes
\newcounter{letterdiv}
\setcounter{letterdiv}{4}
% some margin settings
\newlength{\thumbtopmargin}
\setlength{\thumbtopmargin}{2cm}
\newlength{\thumbbottommargin}
\setlength{\thumbbottommargin}{2cm}
% calculate the box height by dividing the page height
\newlength{\thumbheight}
\pgfmathsetlength{\thumbheight}{%
(\paperheight-\thumbtopmargin-\thumbbottommargin)%
/%
\value{letterdiv}
}
% box width
\newlength{\thumbwidth}
\setlength{\thumbwidth}{1cm}
% style the boxes
\tikzset{
thumb/.style={
fill=black!50!red,
text=white,
minimum height=\thumbheight,
text width=\thumbwidth,
outer sep=0pt,
font=\sffamily\bfseries\Huge,
inner xsep=1.5em,
}
}
% create two new commands to make the thumbs
% that makes it easy to use them im different header elements,
% like in the plain and normal page style etc.
\newcommand{\evenpageletterthumb}[1]{%
% see pgfmanual.pdf for more information about this part
\begin{tikzpicture}[remember picture, overlay]
\node [thumb,align=left,anchor=north west,] at ($%
(current page.north west)-%
(0,{\thumbtopmargin+(\value{letternum}-1)*\thumbheight})%
$) {#1};
\end{tikzpicture}
}
\newcommand{\oddpageletterthumb}[1]{%
\begin{tikzpicture}[remember picture, overlay]
\node [thumb,align=right,anchor=north east,] at ($%
(current page.north east)-%
(0,{\thumbtopmargin+(\value{letternum}-1)*\thumbheight})%
$) {#1};
\end{tikzpicture}
}
% create a new command to set a new lettergroup
\newcommand{\lettergroup}[1]{%
\fancypagestyle{dictstyle}{%
\renewcommand{\headrulewidth}{0.4pt}
\renewcommand{\footrulewidth}{0pt}
\fancyhf{}
\fancyhead[LO]{\fontfamily{phv}\selectfont{\textbf{\scshape Letter #1}}}
\fancyhead[C]{\thepage}
\fancyhead[RE]{\fontfamily{phv}\selectfont{\textbf{\scshape Letter #1}}}
\fancyfoot[LE]{\evenpageletterthumb{#1}}
\fancyfoot[RO]{\oddpageletterthumb{#1}}
}
\fancypagestyle{chapterstart}{%
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
\fancyhf{}
\chead{\oddpageletterthumb{#1}}% chapters start only on odd pages
\cfoot{\thepage}
}
\chapter*{#1}
\thispagestyle{chapterstart}
\pagestyle{dictstyle}
% check if we reached the last vertical position and reset it
\ifnum\value{letternum}=\value{letterdiv}\relax
\setcounter{letternum}{0}%
\fi
% check if we reached the last vertical position and reset it
\ifnum\value{letternum}=\value{letterdiv}\relax
\setcounter{letternum}{0}%
\fi
\stepcounter{letternum}%
% use one head or foot element to put in the box
% it doesn't matter which you use since the box
% is positioned on the page absolutely
}
% for some blindtext
\usepackage{kantlipsum,lipsum}
\begin{document}
\pagestyle{basicstyle}
\chapter*{Pseudo-Kantian blindtext}
\kant[1-5]
% usage: \lettergroup{<letter>}
% e.g.
\lettergroup{A}
% your text
\lipsum[1-15]
\lettergroup{B}
\lipsum[16-30]
\lettergroup{C}
\lipsum[31-45]
\lettergroup{D}
\lipsum[46-60]
\end{document}
fancyhdrshows how to do this sort of thing. The package should be part of your distribution. See also Indexing an interval of words on top of every page for an example of head words in a dictionary. – Alan Munn May 23 '12 at 10:53fancyhdrdocs gives the thumb index code. Can you adapt that to your purpose? – Alan Munn May 23 '12 at 11:22