Generalincluding full list of tables in the bookmarks of PDF

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
erikr22
Posts: 1
Joined: Tue Mar 16, 2010 11:05 pm

including full list of tables in the bookmarks of PDF

Post by erikr22 »

Hello,

I use pdflatex with the hyperref package. The bookmarks that it creates by default are great, which include chapters and sections. Is there an easy way to get a bookmark to each table in the bookmarks section? I use \listoftables, and would love to have a \listoftables in the actual bookmarks.

I know of the tocbibind package, which lets me add an entry to the bookmarks that literally says "List of Tables", and when clicked, will take me to the "list of tables" in the PDF document, where I can then click to go to the table I want, but that's not quite what I'm after.

I want the bookmarks to have a clickable link to "Table 1.1", "Table 1.2", etc.

It looked like I could hack something together possibly using the bookmark package, just wondering how others have dealt with this.

Thanks!

Recommended reading 2024:

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

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

phi
Posts: 577
Joined: Tue Oct 21, 2008 8:10 pm

including full list of tables in the bookmarks of PDF

Post by phi »

Hello,

try this hack:

Code: Select all

\documentclass{article}

\usepackage{hyperref}

\makeatletter
\newcommand*{\saved@writebookmark}{}
\let\saved@writebookmark\Hy@writebookmark
\renewcommand*{\Hy@writebookmark}[5]{%
  \saved@writebookmark{#1}{#2}{#3}{#4}{\Hy@bookmarkstype}%
}
\makeatother
  

\begin{document}

\begin{figure}
  \caption{test}
\end{figure}

\end{document}
Post Reply