如何给图表添加书签?
我需要下一个结果,它必须按类型划分,章节书签,图表书签,表格书签
\documentclass{book}
\usepackage[utf8]{inputenc}
\usepackage{imakeidx}
\usepackage[usenames,dvipsnames,svgnames,table]{xcolor}
\usepackage[pdftex, bookmarksnumbered, pagebackref, colorlinks=true, citecolor=Blue, linkcolor=DarkBlue!30!Black, urlcolor=Black,bookmarksopen]{hyperref}
\makeindex[columns=3, title=Alphabetical Index, intoc]
\begin{document}
\tableofcontents
\chapter*{Dedicatory}
to all my family
\chapter*{Abstract}
hello world
\chapter{chapter}
\section{Introduction}
In this example several keywords\index{keywords} will be
used which are important and deserve to appear in
\begin{table}[ht]
\begin{tabular}{cc}
Header & Header \\
1&2\\
\end{tabular}
\caption[Table caption text]{This is a table with a very long caption text
and it would be nice to use the short caption in the bookmark}
\label{table 1}
\end{table}
Index\index{Index}.
\subsection{subsection}
Terms like generate\index{generate} and some\index{others}
will also show up. Terms in the index can also be
nested \index{Index!nested}
\clearpage
\section{Second section}
This second section\index{section} may include some special
\begin{figure}[ht]
\centering
\rule{6cm}{3cm}
\caption{Figure caption text}
\label{figura 1}
\end{figure}
word, and expand the ones already used\index{keywords!used}.
\printindex
\end{document}
答案1
\hypertarget
在和的帮助下,\pdfbookmark
您可以实现此结果,如以下示例所示:
\documentclass{book}
\usepackage[utf8]{inputenc}
\usepackage{imakeidx}
\usepackage[usenames,dvipsnames,svgnames,table]{xcolor}
\usepackage[pdftex, bookmarksnumbered, pagebackref, colorlinks=true, citecolor=Blue, linkcolor=DarkBlue!30!Black, urlcolor=Black,bookmarksopen]{hyperref}
\makeindex[columns=3, title=Alphabetical Index, intoc]
\begin{document}
\tableofcontents
\chapter*{Dedicatory}
to all my family
\chapter*{Abstract}
hello world
\chapter{chapter}
\section{Introduction}
In this example several keywords\index{keywords} will be
used which are important and deserve to appear in
\begin{table}[ht]
\hypertarget{table}{}
\addtocounter{table}{1}
\pdfbookmark[2]{Table \thetable: Table caption text}{mytable}
\addtocounter{table}{-1}
\begin{tabular}{cc}
Header & Header \\
1&2\\
\end{tabular}
\caption[Table caption text]{This is a table with a very long caption text
and it would be nice to use the short caption in the bookmark}
\label{mytable}
\end{table}
the
Index\index{Index}.
\subsection{subsection}
Terms like generate\index{generate} and some\index{others}
will also show up. Terms in the index can also be
nested \index{Index!nested}
\clearpage
\section{Second section}
This second section\index{section} may include some special
\begin{figure}[ht]
\hypertarget{figure}{}
\addtocounter{figure}{1}
\pdfbookmark[2]{Figure \thefigure: Figure caption text}{myfigure}
\addtocounter{table}{-1}
\centering
\rule{6cm}{3cm}
\caption{Figure caption text}
\label{myfigure}
\end{figure}
word, and expand the ones already used\index{keywords!used}.
\printindex
\end{document}