1

I was reading this question:

Is there a \subsubsubsection command?

and I really like, for navigational purposes, seeing the outline in my side-panel (xreader, etc.), but I don't want to see something like 3.2.3.1 in the paper.

I tried using \paragraph*{}, \subparagraph*{}, etc, but I couldn't get it to show up in the side panel without showing up in the paper.

Thanks in advance!

nate
  • 835
  • You don't want to have the numbers in text, but the paragraphs etc. should appear in the bookmark any way? –  Nov 01 '17 at 23:27
  • 1
    \setcounter{secnumdepth}{2} and \setcounter{tocdepth}{5} should work. The paragraphs etc. are not numbered in text, but still appear in the bookmarks (and ToC, however!) –  Nov 01 '17 at 23:34
  • Nice! Thanks, yes, it worked. I'll accept if you want it as an answer... – nate Nov 02 '17 at 00:29
  • 1
    Actually, it is somehow related to my answer here: https://tex.stackexchange.com/a/291312/31729 –  Nov 02 '17 at 21:02

1 Answers1

2

The tocdepth counter value determines which structure level will appear in the ToC and in the related bookmark panel. Displaying all usual structure levels (i.e. from \part to \subparagraph), say \setcounter{tocdepth}{5}.

In order to hide the section etc. numbers use an appropriate value for the secnumdepth counter. Hiding paragraphs etc. needs a value of 3 only.

More options are available if the bookmark package is loaded.

Don't forget to compile twice to make changes effective.

For a more detailed description see https://tex.stackexchange.com/a/291312 please.

\documentclass{book}

\usepackage[bookmarksopen=true,bookmarksopenlevel=5]{hyperref}

\setcounter{secnumdepth}{3}% Only down to \subsubsection shall be numbered
\setcounter{tocdepth}{5}

\begin{document}
\tableofcontents
\chapter{Foo chapter}
\section{Foo section}
\subsection{Foo subsection}

\subsubsection{Foo subsubsection}

\paragraph{Foo paragraph}

\subparagraph{Foo subparagraph}

\end{document}