First off: I have literally no experience with LaTeX, so what I am looking for is just a static Layout where I can put my text/pictures into. Sadly I am already failing creating a real layout, since there is so much stuff that you can specify when creating a document.

I want to create a customized layout for my documentation. I imagine the following layout:

<3cm>  |                   The usual stuff (Text/Images etc.)

And to the right site I would like to get some kind of navigation bar, so that the reader can see what chapter he currently reads (I would like to manually specify the text of these tabs, so they do not need to match the table of content). Sadly I have no idea how to create that. I imagine the following:

This is what I imagine for the right site. There should not be too much space to the very right

What I found out is that I can specify my page-dimensions with

\pdfpagewidth 8.25in
\pdfpageheight 10.75in

But I am missing the horizontal line to the left (right after the margin) and where/how to access the menu bar to the right.

So I assumed from this site, that the margin-notes might help out for this, but it seems not to be across the full page.

This is my code so far:

\pdfpagewidth 21cm
\pdfpageheight 21cm


Some placeholder Text


Which kinda seems to do a part of the formatting for the moment. Now I am still facing the issues of the dashed line and the menu bar. Can anyone give me a hint?


1 Answer 1


I think that something like this is potentially really useful as for many documents on-screen viewing is becoming the default. Of course, to be really useful, the tabs should not only show that the current chapter, as requested by the OP, but they should also be hyperlinks to the other chapters. The code below produces documents with hyperlnks that look like this:

enter image description here

The bulk of the work is done by tikz. The extra tricks are:

  • the tabs are added to each page using \AddEverypageHook from the everypage package
  • the total number of chapters in the document is stored in the aux file as \numberofchapters, which defaults to 0
  • every chapter is automatically given a label (chapter1, chapter2, ...), in the aux file so that hyperref can create a link to it
  • I found that I had to use \rotatebox from graphicx because rotating the text in a tikz \node did not rotate the hyperlink
  • Using tikzpagenodes, the first chapter tab is in line with the bottom of the page header

Ideally details such as the distance of this menu-bar to the margin, the rotation angle and the choice of colours etc should be handled by some nice interface. Some, but not all, of these details are easy to change using the tikz styles at the top of the code. If there are a lot of chapters the tabs will go off the bottom of the page so this will not work so well. One way around this would be to have an option for displaying only the chapter numbers. One could imagine doing this with sections as well...

Here is the code:



  colorlinks = false,%
  linkbordercolor = LightSkyBlue

% define some tikz styles to control the chapter tabs
  chaptertab/.style = {
    anchor = north west,
    rounded corners,
    line width=1mm,
    inner sep=1mm,
    minimum height=24mm,
    minimum width=10mm,
  current chapter/.style={
  menu background/.style = {

% we keep track of the total number of chapters in the aux file. By
% default this is 0

% the chapter tabs are added to each page using the following command
  \begin{tikzpicture}[remember picture, overlay]
    \draw[menu background](current page.north west) rectangle ($ (current page.south west)+(1.2,0) $);
    \foreach \chap [evaluate=\chap as \offset using {2.4*(1-\chap)}] in {1,...,\numberofchapters} {
          \def\chapterextra{current chapter}
       \node[chaptertab,\chapterextra] (chapter\chap) at
          ($ (current page.north west|-current page header area.south west)+(0,\offset) $)
          {\rotatebox{-270}{\hyperref[chapter\chap]{Chapter \chap}}};

% create a label (and hence a hyperlink) to each to chapter




  • IMO, if you're on a computer, then you can use the table of contents provided by the pdf viewer, and links to other chapters are unnecessary.
    – Teepeemm
    Commented Aug 29, 2020 at 23:52
  • You are of course feel to do whatever you want! Well, within reason:) The OP wanted this so I provided...
    – user30471
    Commented Aug 30, 2020 at 7:33

You must log in to answer this question.

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