GeneralAdobe Reader Bookmarks and TOC don't match

LaTeX specific issues not fitting into one of the other forums of this category.
User avatar
tripwire45
Posts: 129
Joined: Thu Apr 10, 2008 4:35 am

Adobe Reader Bookmarks and TOC don't match

Post by tripwire45 »

Got a minor mystery on my hands. I maintain three LaTeX documents at my work that are generated as PDFs. I've just (thanks largely to Stefan) managed to update those docs so that they'll render well in Adobe Reader 8. When I open two of the docs in Reader, the bookmarks in the left pane, show the correct structure of sections and subsections, matching the table of contents. Unfortunately, one document is being stubborn. Since a picture is worth a thousand words, I'll post two; one of the table of contents (which shows the correct structure of the document), and one of the Reader bookmarks list (which shows an incorrect structure).

Since even the minimal working example is long (to preserve the number of sections and subsections), I'm also including it as an attachment, rather than posting it within the body of this post.

All three of my documents *should* be identical in terms of the preamble, but I may have "foobared" something up along the way. Ideas?

Thanks.

-Trip
Attachments
testing_guide.txt
(11.44 KiB) Downloaded 1336 times
contents.png
contents.png (8.35 KiB) Viewed 15407 times
bookmarks.png
bookmarks.png (7.35 KiB) Viewed 15409 times

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
User avatar
Stefan Kottwitz
Site Admin
Posts: 10290
Joined: Mon Mar 10, 2008 9:44 pm

Adobe Reader Bookmarks and TOC don't match

Post by Stefan Kottwitz »

Hi Trip,

insert \phantomsection before \subsection (\section) several times. The warnings in the logfile should tell you where to put them.
Alternatively you could just load the bookmark package after hyperref, that should fix it.

Stefan
LaTeX.org admin
User avatar
tripwire45
Posts: 129
Joined: Thu Apr 10, 2008 4:35 am

Re: Adobe Reader Bookmarks and TOC don't match

Post by tripwire45 »

The \phantomsection tag, placed just before the \section and \subsection tags in the entire document *except for the very first \section tag*, causes the bookmarks to appear correctly...but only in the minimal working example. It doesn't work at all in my production document for some reason. This must mean there's some difference in the two docs that I haven't accounted for, so I'll have to keep looking until I can find the monkey wrench in the machine :sigh:
User avatar
Stefan Kottwitz
Site Admin
Posts: 10290
Joined: Mon Mar 10, 2008 9:44 pm

Adobe Reader Bookmarks and TOC don't match

Post by Stefan Kottwitz »

Did you try:

Code: Select all

\usepackage{bookmark}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Stefan
LaTeX.org admin
User avatar
tripwire45
Posts: 129
Joined: Thu Apr 10, 2008 4:35 am

Adobe Reader Bookmarks and TOC don't match

Post by tripwire45 »

I *tried* \usepackage{bookmark} and was soundly presented with:

Code: Select all

[PDFLaTeX] finished with exit status 1
test_guide_.tex:59:File `bookmark.sty' not found. ^^M
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
I assume I need to install it (somehow).

I did find out that the example and production documents aren't any different from each other functionally. However, the environment where they run is. One of the software developers created a special "makefile" for my projects, so they could extract my "help files" which are kept in a subdirectory of my latex working directory, and use them as html online help (don't ask me to explain in more detail; it's over my head).

I painstakingly substituted sections of the working document, replacing the analogous sections of the sample document until the sample became the working document. At no time, did the bookmark structure become inaccurate. When I renamed the sample document, giving it the working document's name, and copied it into the production environment, then compiled it, the bookmarks displayed their typical misbehavior.

Ah well...time for lunch. Maybe a recharge of my brain cells will help.
User avatar
Stefan Kottwitz
Site Admin
Posts: 10290
Joined: Mon Mar 10, 2008 9:44 pm

Adobe Reader Bookmarks and TOC don't match

Post by Stefan Kottwitz »

I didn't have bookmark.sty too. I installed the oberdiek bundle by the mpm:

Code: Select all

sudo mpm --install=oberdiek
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
bookmark.sty is included. A test of your example file worked fine with it.

Stefan
LaTeX.org admin
User avatar
tripwire45
Posts: 129
Joined: Thu Apr 10, 2008 4:35 am

Adobe Reader Bookmarks and TOC don't match

Post by tripwire45 »

Code: Select all

sudo: mpm: command not found
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
I don't suppose I could use apt-get, could I? On the other hand, when I tried synaptic, it said that oberdiek was already installed as part of texlive-latex-recommended. :?:

EDIT:

Code: Select all

sudo apt-get install texlive-latex-recommended
Reading package lists... Done
Building dependency tree
Reading state information... Done
texlive-latex-recommended is already the newest version.
texlive-latex-recommended set to manual installed.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
User avatar
Stefan Kottwitz
Site Admin
Posts: 10290
Joined: Mon Mar 10, 2008 9:44 pm

Adobe Reader Bookmarks and TOC don't match

Post by Stefan Kottwitz »

Hi Trip,
tripwire45 wrote:

Code: Select all

sudo: mpm: command not found
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
That's the MiKTeX package manager. I've described its installation on Ubuntu Linux here.
tripwire45 wrote:On the other hand, when I tried synaptic, it said that oberdiek was already installed as part of texlive-latex-recommended.
Perhaps it's an older version. That's one reason why I'm using the mpm, to be able to easily install newer versions of packages or packages that are not included in TeXlive.

Stefan
LaTeX.org admin
User avatar
tripwire45
Posts: 129
Joined: Thu Apr 10, 2008 4:35 am

Re: Adobe Reader Bookmarks and TOC don't match

Post by tripwire45 »

Just to make sure I understand your instructions correctly.

I first need to download the MiKTeX 2.7 Source Code from here:
http://miktex.org/unx/Default.aspx

Then I need to follow the instructions from here:
http://miktex.svn.sourceforge.net/viewv ... README.unx

Finally, I follow the instructions you posted here:
http://texblog.net/latex-archive/linux/ ... e-manager/

Is that right, or do I just follow the instructions you posted at the TEXblog using apt-get?
User avatar
Stefan Kottwitz
Site Admin
Posts: 10290
Joined: Mon Mar 10, 2008 9:44 pm

Re: Adobe Reader Bookmarks and TOC don't match

Post by Stefan Kottwitz »

The commands in the instructions of my blog may be enough, because I used exactly them to install the package manager on standard Ubuntu 8.04 plus texlive plus Kile. I mentioned the README.unx for information, to know what you are doing, I had to make small changes to its instructions for installation, like using sudo.

Stefan
LaTeX.org admin
Post Reply