Text FormattingWrong bookmark depth

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
User avatar
svend_tveskaeg
Posts: 478
Joined: Sun Jul 12, 2009 5:31 am

Wrong bookmark depth

Post by svend_tveskaeg »

Hi all.

Consider the following example:

Code: Select all

\documentclass{article}

\usepackage[danish]{babel}

\begin{document}

\section{Horse}
Test.

\part{Dog}
Test.

\section{Goat}
Test.

\end{document}
The bookmark for the first \section have the same depth as the \part bookmark. The bookmark after the \part section have the correct depth, though.

How do I fix this?

Thank you in advance!
Last edited by svend_tveskaeg on Sun Apr 17, 2011 7:23 pm, edited 1 time in total.
``In the game of chess, you can never let your adversary see your pieces.''
-- Zapp Brannigan, Futurama (season 1, episode 4)

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

meho_r
Posts: 823
Joined: Tue Aug 07, 2007 5:28 pm

Wrong bookmark depth

Post by meho_r »

Bookmarks are fine. If you have a section before the first part command, where would you put it? Also, if you take a look at TOC, you'll see that levels are correct.

Code: Select all

\documentclass{article}

\usepackage[danish]{babel}

\usepackage{hyperref}

\begin{document}

\tableofcontents

\section{Horse}
Test.

\part{Dog}
Test.

\section{Goat}
Test.

\end{document}
User avatar
svend_tveskaeg
Posts: 478
Joined: Sun Jul 12, 2009 5:31 am

Wrong bookmark depth

Post by svend_tveskaeg »

meho_r wrote:If you have a section before the first part command, where would you put it?
At the same level as the ones after the first part command, i.e., one level deeper than the part.

Any way I can get this (even though it isn't correct, apparently)?
``In the game of chess, you can never let your adversary see your pieces.''
-- Zapp Brannigan, Futurama (season 1, episode 4)
meho_r
Posts: 823
Joined: Tue Aug 07, 2007 5:28 pm

Wrong bookmark depth

Post by meho_r »

svend_tveskaeg wrote:
meho_r wrote:If you have a section before the first part command, where would you put it?
At the same level as the ones after the first part command, i.e., one level deeper than the part.

Any way I can get this (even though it isn't correct, apparently)?
Section 2 has a parent node, i.e. part 1 (which is the highest level in the document) and being at level 2 is fine. But section 1 has no parent, so it would have to "hang in air", be child of nothing and I'm really not sure how would that be possible. That is what I'm trying to tell you. Even in PDF editors like PDF-Xchange, putting a bookmark at level 2 when there is no level 1 prior to it doesn't seem to be achievable.
User avatar
svend_tveskaeg
Posts: 478
Joined: Sun Jul 12, 2009 5:31 am

Re: Wrong bookmark depth

Post by svend_tveskaeg »

Okay. I will leave it at that then.

Thank you for your help!
``In the game of chess, you can never let your adversary see your pieces.''
-- Zapp Brannigan, Futurama (season 1, episode 4)
Post Reply