# Tag Info

67

Put a \cleardoublepage before \addcontentsline. Also a \phantomsection is needed, since you are using hyperref: \cleardoublepage \phantomsection \addcontentsline{toc}{chapter}{Introduction} \chapter*{Introduction} \clearpage gives a wrong result if the Table of Contents has an odd number of pages; \cleardoublepage avoids the problem altogether. Another ...

54

Option bookmarks can only be given at package loading time. Setting it later with \hypersetup will give the warning: Package hyperref Warning: Option `bookmarks' has already been used, (hyperref) setting the option has no effect on input line 3. Bookmarks can be disabled, if bookmarks=false is given to \usepackage: \usepackage[bookmarks=...

32

You can just suppress the appearance of the section number: \documentclass[a4paper]{article} \usepackage{hyperref} \usepackage{bookmark} \makeatletter \renewcommand\@seccntformat[1]{} \makeatother \begin{document} \section{A} a \newpage \section{B} b \end{document} The macro \@seccntformat is responsible for printing the section number; by redefining it ...

31

This happens when you skip a level in the sectioning commands while still requesting to maintain an equivalent bookmark hierarchy. The following MWE reproduces the problem: \documentclass{article} \usepackage[bookmarksopen]{hyperref}% http://ctan.org/pkg/hyperref \setcounter{tocdepth}{4}% Show up to level 4 (\paragraph) in ToC (and bookmarks) \begin{...

30

This works for me. \documentclass[a4paper]{report} \usepackage[utf8]{inputenc} \usepackage{graphicx} \usepackage{array} \usepackage[bookmarks=true]{hyperref} \usepackage{bookmark} \begin{document} \cleardoublepage \pdfbookmark{\contentsname}{Contents} \tableofcontents \chapter{P} Some text \end{document} Notice that the pdftex options should not be ...

26

Assuming that you're using hyperref already*, the documentation states: Usually hyperref automatically adds bookmarks for \section and similar macros. But they can also set manually. The manual setting is performed using \pdfbookmark[<level>]{<text>}{<name>} where \part is level -1, \chapter is level 0, \section is level 1, ... It ...

25

hyperref provides bookmarking functionality by means of \pdfbookmark[<level>]{<text>}{<name>} or \currentpdfbookmark{<text>}{<name>} in addition to others (see the hyperref documentation). Here is a minimal example: \documentclass{article} \usepackage{lipsum}% http://ctan.org/pkg/lipsum \usepackage{hyperref}% http://ctan....

24

\texorpdfstring has two arguments, the first is the normal TeX code, the second is a string, which can be used as replacement for the arbitrary TeX in the bookmarks. If option unicode (or pdfencoding=auto) is enabled, then the subscript 2 is available as \texttwoinferior: \documentclass{report} \usepackage[pdfencoding=auto]{hyperref} \usepackage{bookmark}% ...

19

Two suggestions: Use the "long title" -- the stuff inside curly braces -- to typeset the material in the way you want it to appear in the sectioning header itself; in particular, use \bm (or an equivalent macro) to create bold math symbols. Use the \texorpdfstring macro (provided by the hyperref package) inside the "short title" -- the stuff inside square ...

18

It is also possible to turn off heading numbering completely. Since you didn't explicitly say that you only want unnumbered sections, this might be an alternative. \documentclass[11pt,english]{article} \usepackage[T1]{fontenc} \usepackage{babel} \usepackage{blindtext} \usepackage{hyperref} \setcounter{secnumdepth}{0} \begin{document} \blinddocument \end{...

17

This is not a pdflatex issue. You must be using, directly or indirectly, the hyperref package, which controls the PDF TOC. To have it unfolded, just add this to the preamble of your document: \hypersetup{bookmarksopen=true}

16

The package hyperref should be loaded as last package. See: Which packages should be loaded after hyperref instead of before? The package subfigure is obsolete, instead use subcaption or subfig. How to keep up with packages and know which ones are obsolete? With the following header I have no problems: \documentclass[a4paper,oneside]{report} \usepackage[...

16

Bug report It is a bug in package appendix. The bug is triggered if babel is loaded with language option dutch. From my bug report to the package maintainer: The following document breaks in the second run: \documentclass{book} \usepackage[dutch]{babel} \usepackage{hyperref} \usepackage[titletoc]{appendix} \begin{document} \tableofcontents \chapter{...

16

According to the documentation of bookmark you can use the open option; if you want to set the level, you can say openlevel=<level>; so \usepackage[open,openlevel=1]{bookmark} will show something like whereas the simple open option will show Tested with Skim and Adobe Reader on Mac OS X.

15

The llncs class sets tocdepth to 0. This setting controls which sectioning commands end up in the Table-Of-Contents (TOC), which is also used by hyperref for the PDF bookmarks depth by default. You need to set the bookmarksdepth manually to a higher value (higher means more deeper sectioning commands are included). An alternative is to raise tocdepth again, ...

14

Option addtohook of package bookmark helps: \documentclass{article} \usepackage{xcolor} \usepackage{hyperref} \usepackage{bookmark}[2010/04/03] \bookmarksetup{ open, numbered, addtohook={% \ifnum\bookmarkget{level}=1 % section=1, subsection=2, ... \bookmarksetup{color=blue}% \fi }, } \begin{document} \addcontentsline{toc}{section}{\...

14

Solution Use \usepackage[pdfencoding=auto]{hyperref} in your preamble. MWE \documentclass{scrreprt} \usepackage{fontspec} \usepackage[pdfencoding=auto]{hyperref} \begin{document} \chapter{Test Ü} \chapter{Test Ä} \end{document} Explanation The PDF format allows two encodings for bookmarks and entries in the information dictionary: PDFDocEncoding ...

14

That is not CTAN and the pdf copy is illegal. As Knuth says on his webpage The source file texbook.tex for The TeXbook has been available for many years, and it begins with the following lines: % This manual is copyright (C) 1984 by the American Mathematical Society. % All rights are reserved! % The file is distributed only for people to ...

13

With KOMA scrreprt here are documentclass options for adding bibliography and the 'list of's to the table of contents: \documentclass[ a4paper, bibliography=totoc, listof=totoc, final ]{scrreprt} If you want to just add a pdf bookmark, you can use the command \pdfbookmark: \pdfbookmark{\contentsname}{toc} \tableofcontents

13

Additional bookmarks can be added via \pdfbookmark, see example below. Also I have disabled page anchors for the first pages to avoid duplicate destination names, because some of the pages have the same page number. (Also I have disabled two packages that I do not have installed). \documentclass[10pt]{article} \usepackage{graphicx} \usepackage{epstopdf} \...

13

Apart from putting hyperref first and not last among the called packages I see nothing too bad in them; but are you sure you need all of them? Anyway, I'd put fontenc, inputenc and babel first: \documentclass[a4paper,12pt]{article} \usepackage[T1]{fontenc} % recommended for German \usepackage[latin1]{inputenc} \usepackage[USenglish,ngerman]{babel} <......

13

bookmark loads hyperref since it uses some of the code contained within it. As such, it is sufficient to only load bookmark. Since loading of hyperref is included in bookmark, load order doesn't matter.

13

Next to the answer of Werner I want to point to the example of the documentation. There the package bookmark is loaded after hyperref. So you can setup options for hyperref separat. However related to the documentation it's important to load hyperref without disabling the bookmarks. Although bookmarks loads hyperref I prefer the loading of hyperref separat....

12

The following works: one has to pass the unicode option to hyperref and also a correct Unicode string for the bookmark: \documentclass{scrbook} \usepackage[utf8]{inputenc} \usepackage[greek,english]{babel} \usepackage[unicode]{hyperref} \usepackage{bookmark} \begin{document} \mainmatter \chapter{Introduction} An introduction. \cleardoublepage \begin{...

12

The package bookmark provides a command \bookmark[OPTIONS]{title}. You need to define a hypertarget and create a bookmark to it: \section*{Exercises and Notes} \hypertarget{exercises}{} \bookmark[level=section,dest=exercises]{Exercises and Notes} bookmark should be loaded after hyperref.

12

The following provides the functionality to swap titles and numbers in the bookmarks: \documentclass{scrbook}% http://ctan.org/pkg/KOMA-script % \usepackage{hyperref}% http://ctan.org/pkg/hyperref \usepackage[numbered]{bookmark}% http://ctan.org/pkg/bookmark \usepackage{etoolbox}% http://ctan.org/pkg/etoolbox \makeatletter \let\store@Hy@writebookmark\Hy@...

12

Bookmark are numbered with option numbered of package bookmark: \usepackage{bookmark} \bookmarksetup{numbered} Of without bookmark with hyperref only: \hypersetup{bookmarksnumbered} Adding prefixes Chapter and Exercise can be done via a trick: \renewcommand*{\thesection}{% \texorpdfstring{}{Chapter }% \arabic{section}% \texorpdfstring{}{:}% } \...

12

This example provides a small modification of Werner's solution. Instead of patching the internal \Hy@writebookmark the redefinition of \numberline is done in the bookmark hook addtohook of package bookmark: \documentclass{report} \usepackage{hyperref} \usepackage{bookmark} \bookmarksetup{numbered} \usepackage{titlesec} %reformatting the chapter headings \...

12

You can control the bookmark depth just like you can the ToC depth using the bookmarksdepth key-value: \usepackage{hyperref}% http://ctan.org/pkg/hyperref \hypersetup{bookmarksdepth=3} bookmark also adapts this so you can use \usepackage{bookmark}% http://ctan.org/pkg/bookmark \bookmarksetup{depth=3}

Only top voted, non community-wiki answers of a minimum length are eligible