2

I am writing my thesis and I would like to collect the parts in two (or more) groups without modifying the header styles. Namely, I have:

Part 1 ... Part 2 ... Part 3 .... Part 4 ...

and I want to create two Super-part header styles, e.g. Super-part A and Super-part B, such that the first one contains Part 1 and Part 2, and the second one contains Part 3 and Part4. Is it possible?

1 Answers1

4

The question is a little bit unclear: I understood this way: Group some parts in the bookmark panel, but this can be a total misunderstanding of course?

Introducing a \superpart command which occurs one level above \part, therefore level=-2 is used. There are of course more options to achieve, an entry to the ToC, for example.

\documentclass{book}
\usepackage{xcolor}
\usepackage[bookmarksopen=true]{hyperref}

\usepackage{bookmark}

\newcounter{superpart}

\newcommand{\superpart}[1]{%
\cleardoublepage
\refstepcounter{superpart}%
\phantomsection%
\hypertarget{superpart::\number\value{superpart}}{}%
\bookmark[startatroot,level=-2,bold,color=red,dest=superpart::\number\value{superpart}]{#1}%
}

\begin{document}
\superpart{Superpart A}
\part{Number One}
\chapter{First chapter}
\part{Number Two}

\chapter{Second chapter}

\superpart{Superpart B}
\part{Number Three}

\part{Number Four}


\end{document}

enter image description here

  • Hi. Maybe I need something more complicated. More precisely. I need 2 superparts: "Theory" and "Practice" that 1) appear as main bookmarks (as you did); 2) appear as titles in the pdf (I mean, if you click the bookmark "Theory" then you see "Theory" in the pdf); 3) the toc is splitted in two for each superpart; 4) both tocs appear after the titles "Theory" and "Practice" of the pdf. Can you help me? – Marcello Aug 04 '15 at 07:40
  • @Marcello: You're requests weren't in your question, now your editing the question away. –  Aug 04 '15 at 07:44
  • sorry. I am aware of it, but I realized then that I needed something more complicated. Anyway, I created another thread for this different issue. – Marcello Aug 04 '15 at 07:59