1

I'd like to make a table of contents that uses some visual mark that links graphically the toc to the text: with no numbering, but still having another type of reference available. The toc could use a graphic bookmark that follows along the book. Also, the idea is that the book has no numbers whatsoever through the pages of the text, but still have a visual guide: LaTeX usually allows that each chapter is signalized in some way, such as "Chapter 1" along the upper margin of that chapter.

In my graphic mwe I show the toc with two chapters and a line next to the chapter. The ideal result would be to have the mark of the toc (of any shape/color) along the text pages of each chapter (not only first page of each chapter), in this case: each of those two lines along all pages of that book chapter at the same height (of the margin) they were in the toc. I'd like to think of it similar to an old phonebook or even some text books that have each chapter with a different colour at the outer margin, and at a specific height.

Only for the sake of example, another chance could be a mwe toc in which you could have, say, a triangle for first chapter; and a square for second chapter. Then you'd have a visual reference (watermark, or any other type of bookmark), with that shape along the pages of those chapters. Key here is a mark (not necessarily watermark) that is referred to from the toc but points outside of it, to the text.

I've been using LaTeX for three years now and have never seen this but I would like to know how this could be done. I aim for using this style for the memoir class, but accept it in any class and move from there. The closest visual material on LaTeX I could find was The Visual LaTeX FAQ, but it didn't mention my point at all.

enter image description here

2
  • Although I doubt that using a pure graphical index allows the reader to find anything, I guess that overrding \thepage or similar counter commands could achieve what you want. Nov 23, 2015 at 15:55
  • The idea is that the search is visually more intuitive. Some text books use this to signalize parts of the book in colours in the margin, somewhat like old telephone personal books by letters with thumbs. I'd like to know how to use your suggestion: please more.
    – nilon
    Nov 23, 2015 at 16:08

2 Answers 2

2

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:

  1. 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.

  2. To change the position of the "page number" on the page, look at page numbers on the side of the page.

  3. 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}
1
  • I made the answer a community wiki, as other people have started contributing. Let's hope that the answer converges soon!
    – jarauh
    Nov 26, 2015 at 18:25
1

The package makeidx (the most common indexing package for LaTeX) has a way to format the pages of a particular index entry. Namely, if you write

\index{bulldog|textbf}

then the page number for this entry will be typeset in bold face.

You can use this in your case as follows: Define a new "style command" that takes one argument (the page number) and produces whatever output you want instead of the page number. For example:

\documentclass{article}
\usepackage{amssymb}
\usepackage{makeidx}
\usepackage{color}
\newcommand{\bluepoempage}[1]{\textcolor{blue}{$\blacktriangle$}}
\makeindex
\begin{document}
Let's talk about a blue poem.
\index{poem!blue|bluepoempage}
\printindex
\end{document}

Observe that \bluepoempage has to be defined to take one argument, even if this argument is to be ignored. Second, in the index entry there should be no \ before bluepoempage.

the index

6
  • 2
    In my opinion, putting a symbol into the index and having a watermark are two very separate questions. From the title of your question and the way you ask your question, it was not clear that you need assistance for both. In any case, it is better to ask separate questions as separate questions. Also, the watermark question has been asked (and answered) already on this page; see for example tex.stackexchange.com/questions/61137/watermark-image
    – jarauh
    Nov 23, 2015 at 17:03
  • I agree. But a question that depends on another question is still a separate question. Be sure to read the starter guide. This site is not about someone writing the code for you, but about answering questions about issues with TeX. You could ask a separate question about watermarks. However, with the link I gave you it should not be difficult to figure it out yourself. If not (maybe I underestimate the problem) feel free to ask a separate question, explaining what you tried and the difficulties you experienced.
    – jarauh
    Nov 23, 2015 at 19:17
  • Indexes should have relationship to the chapter they refer to. The title and following sentence ask in one question for a visual mark that links graphically the index to the text. This is usually done signalizing numbers. How to do the same visually? This answer responds on index but doesn't on how make the visual mark refer to text. A green triangle in the index section alone has no use if this does not point anywhere in anyway. This would be similar to put in a printed book the number page and then leave that space blank, with no numbering or no reference whatsoever, in said page.
    – nilon
    Nov 23, 2015 at 21:03
  • Maybe I misunderstood your question. Do you mean "table of contents" instead of "index"? Index is a list of subjects at the end of a text with page numbers referring to where these subjects appear. The table of contents is the list of chapters and sections, together with page numbers. My answer tried to get rid of the page numbers in the index. Do you want to get rid of the page numbers in the table of contents?
    – jarauh
    Nov 23, 2015 at 21:24
  • Yes, thank you and I'm sorry if above was obscure: I was aiming for TOC (I actually used that tag the 1st time, even when not being clear through text). But I feel that anyway all previous comments apply equally. Should I edit the question? I feel an answer for index could be just as useful...Not sure
    – nilon
    Nov 23, 2015 at 21:56

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .