In the following are some suggestions to achieve the first point: make a visual mark that links graphically the toc to the text. It goes together with a mwe.
Another additional feature should follow in order to make this a complete answer:
to have the mark of the toc along the text pages of each chapter at the same height (of the margin) they were in the toc (similar to an old phonebook).
General consideration.
Your problem is very complex and specific. so you should consider whether it would maybe be easier if you tried to write everything "by hand" and not rely too much on configuring the \tableofcontents
.
That being said, here are some ideas:
If you write:
\chapter{A chapter of blue poems}
\renewcommand*{\thepage}{\textcolor{blue}{$\blacktriangle$}}
you will see a blue triangle instead of a page number everywhere, i.e. on each page and in the table of contents.
To change the position of the "page number" on the page, look at page numbers on the side of the page.
Depending on your solution to 2., you could try to save the vertical position of the page number from the table of contents using the option remember picture
from tikz
; see http://www.texample.net/tikz/examples/feature/remember-picture/. However, for this you would have to tell the table of contents to save the position. I don't know how to do this. If you would write the table of contents by hand, it would be easier.
Other useful posts consider some other variables as well. Since the aim of the question is to have only a simple symbol or other stand-alone visual reference: you could eliminate other markers. For a full mwe you could remove some/all headers. You could make a simple customized title page, which as well has no numbering in the frontmatter.
Another very useful post is by Gonzalo Medina who solves the problem of
placing each chapter on the margin of the page
with proper vertical alignment. This is done with numbered chapters, and I couldn't manage to do it with unnumbered ones.
Also, following the suggested image in the question: it would be ideal to follow two ideas. 1) that the vertical alignment of pages through chapter would match with that of the table of contents. 2) that it would be possible to make the mark as hand written style, such as a drawn line (instead of a standarized one, such as a square, or triangle). If all this is taken into account it would be possible to resemble the question's proposed image of a table of contents, and the following chapters; and then become a complete answer.
...Actually, others posts/answers were very helpful for my end result. But since I'm responding to myself I'll take some other paths too. I realised that there is a case in which someone already made a text with markers that looks like a phonebook
, with a thumb index.
And then I changed my mind. I felt that shifting that image of marker in the margin could also be distracting/confusing. Instead, I resolved to leave the symbol in just one fixed place at mid-height of the page in vertical placement. Also, I changed the "page number" from black to a light tone of gray.
Other considerations. * Since I wanted to print this for a small book I used a6paper format. And since the size relatively small I thought good practice to use a recommended maybe almost standard package: microtype.
* I'd still like to keep the
letter to the margin of the page
with a background box, but couldn't manage to achieve it. Does someone know how to do this in a simple way? Although I already achieved the main goal of making a visual mark that relates toc with book chapters, I believe that this is still a slight point where this answer could still be improved: the gray mark at the margin to be inside a block with as little code as possible.
Taking the above into account, a mwe would look somewhat like this:
\documentclass[openany]{scrbook}
\usepackage[a6paper]{geometry}% just for the example
\usepackage{lipsum}
\usepackage{amssymb}
\usepackage[pages=3-99,color=gray!14,opacity=1,scale=2,contents={},angle=0]{background}
\pagenumbering{gobble}
\usepackage{microtype}
\newif\ifPageNumber\PageNumbertrue
\AddEverypageHook{%
\ifPageNumber%
\ifodd\value{page}
\backgroundsetup{position={0.47\textwidth,-0.22\textheight}, contents={\thepage}}
\else
\backgroundsetup{position={-.9,-0.22\textheight}, contents={\thepage}}
\fi
\BgMaterial%
\fi\global\PageNumbertrue% by default number all pages
}
\pagestyle{empty}
\title{ruminations through chinaski \& beer} %the delicacies of inertia
\author{by \\anyone}
\uppertitleback{\vspace{9cm}\begin{tiny}Published by the publisher\par at a secret location \end{tiny}}
\date{}
\usepackage{blindtext}
\begin{document}
\clearpage\maketitle\thispagestyle{empty}\cleardoublepage
\thispagestyle{plain} \tableofcontents \cleardoublepage
\section*{blue poem}
\renewcommand*{\thepage}{{$\blacktriangle$}}
\addcontentsline{toc}{chapter}{blue poem}
\begin{verse}
\noindent \lipsum[2] %\clearpage \PageNumberfalse
\cleardoublepage
\end{verse}
\section*{another time, other humours}
\renewcommand*{\thepage}{{$\blacksquare$}}
\addcontentsline{toc}{chapter}{another time, other humours}
\lipsum[1-2]
\end{document}