Obviously, I would like this to happen automatically (i.e. from the
frametitle, create a pdf bookmark) and if anyone knows a macro that
does that, it would solve all my problems. But even if I manually must
include a \pdfbookmark command for every frame, I would like to know a
way to have the level and the target name generated automatically. In
otherwords, "level" should be 1 more than the current level of the
outline (so for any frames following a subsection label, then the
level should be 3+1=4, but if they follow only a section label then
the level should be 2+1=3) and "target" should be a unique name that
probably increases by some counter, but I'm not sure how to do it
correctly.
Thanks
I did by changing this definition:
\long\def\beamer@@frametitle[#1]#2{%
\beamer@ifempty{#2}{}{%
%===== add from here =====
% note: I added the bookmark to the last slide of the frame, if you want
% it pointing to the first one, use \beamer@startpageofframe
\ifnum\c@page=\beamer@endpageofframe%
{\Hy@writebookmark{\the\c@framenumber}{#2}{Navigation\the\c@page}%
{10}{toc}%
\expandafter\@tempcnta\Hy@currentbookmarklevel%
\advance\@tempcnta by -1%
\xdef\Hy@currentbookmarklevel{\the\@tempcnta}}%
\fi%
%===== to here =====
\gdef\insertframetitle{{#2\ifnum\beamer@autobreakcount>0\relax{}%
\space\usebeamertemplate*{frametitle[continuation}\fi}}%
\gdef\beamer@frametitle{#2}%
\gdef\beamer@shortframetitle{#1}%
}%
And maybe something else around. Let me know if works... or if it doesn't.
--
Ignacio __ Fernández Galván
/ /\
Linux user / / \ PGP Pub Key
#289967 / / /\ \ 0x01A95F99
/ / /\ \ \
http://djelibeibi.unex.es
/________\ \ \
jellby \___________\/ yahoo.com
Hi,
Thanks for the suggestion, but I tried that, and I got the error below
(many times). The result was that there were no new bookmarks and the
bookmarks created for the section/subsection etc. no longer had any
hierarchy
! Undefined control sequence.
<write> ...ncoding Graphs for Analysis}{\Parent-3
}
l.149 \section{Encoding Graphs for Analysis}
> Thanks for the suggestion, but I tried that, and I got the error below
> (many times). The result was that there were no new bookmarks and the
> bookmarks created for the section/subsection etc. no longer had any
> hierarchy
>
> ! Undefined control sequence.
> <write> ...ncoding Graphs for Analysis}{\Parent-3
> }
> l.149 \section{Encoding Graphs for Analysis}
Well, there are several things. First: some typos in my code (a spurious "["
and a missing "}"). Second: you have to \setcounter{tocdepth}{10} in order
to have the frames appearing in the bookmarks. Third: indeed, it messes up
the structure if tocdepth is not 10, so I've added a test. But I couldn't
get your error.
Try this, it works for me:
%=========================================================
\documentclass{beamer}
\makeatletter
\long\def\beamer@@frametitle[#1]#2{%
\beamer@ifempty{#2}{}{%
\ifnum\c@page=\beamer@endpageofframe%
{\Hy@writebookmark{\the\c@framenumber}{#2}{Navigation\the\c@page}%
{10}{toc}%
\ifnum\c@tocdepth=10\relax%
\expandafter\@tempcnta\Hy@currentbookmarklevel%
\advance\@tempcnta by -1%
\xdef\Hy@currentbookmarklevel{\the\@tempcnta}%
\fi}%
\fi%
\gdef\insertframetitle{{#2\ifnum\beamer@autobreakcount>0\relax{}%
\space\usebeamertemplate*{frametitle continuation}\fi}}%
\gdef\beamer@frametitle{#2}%
\gdef\beamer@shortframetitle{#1}%
}%
}%
\makeatother
\setcounter{tocdepth}{10}
\listfiles
\begin{document}
\section{One}
\subsection{Two}
\begin{frame}\frametitle{Testing 1}\end{frame}
\begin{frame}\frametitle{Testing 2}\end{frame}
\subsection{Three}
\begin{frame}\frametitle{Testing 3}\end{frame}
\begin{frame}\frametitle{Testing 4}\end{frame}
\section{Four}
\subsection{Five}
\begin{frame}\frametitle{Testing 5}\end{frame}
\begin{frame}\frametitle{Testing 6}\end{frame}
\end{document}
%=========================================================
Some versions:
beamer.cls 2005/10/23
hyperref.sty 2003/11/30
The test example worked fine, but I got the same error when I actually
put it in my presentation, so there's probably some conflict that
I'll need to sort out. (I may have some \pdfbookmark commands
explicitly entered and perhaps that's a conflict?) Anyway, thanks for
the code!