Beamer+pgfpages = “pdfTeX 警告(目標):第 31 頁已被引用,但不存在!”

Beamer+pgfpages = “pdfTeX 警告(目標):第 31 頁已被引用,但不存在!”

我在用

\documentclass[handout]{beamer}
\usepackage{pgfpages}
\pgfpagesuselayout{2 on 1}[a4paper,border shrink=5mm]

並得到一串形式的錯誤

pdfTeX 警告(目標):第 X 頁已被引用,但不存在!

\documentclass[handout]{beamer}

\hypersetup{pdfpagemode=UseOutlines,
  pdfstartview=FitH,
  bookmarksopen=true}

\usepackage{etoolbox}
\usepackage{bookmark}

\makeatletter
\apptocmd{\beamer@@frametitle}{\only<1>{\bookmark[page=\the\c@page,level=3]    {#1}}}%
{\message{** patching of \string\beamer@@frametitle succeeded **}}%
{\errmessage{** patching of \string\beamer@@frametitle failed **}}%
\makeatother

\usepackage{pgfpages}
\pgfpagesuselayout{2 on 1}[a4paper,border shrink=5mm]

\title{Test}
\begin{document}
\begin{frame}
\titlepage
\end{frame}
\begin{frame}
\frametitle{Test}
\begin{itemize}
\item Test
\end{itemize}
\end{frame}
\begin{frame}
\frametitle{Test}
\begin{itemize}
\item Test
\end{itemize}
\end{frame}
\begin{frame}
\frametitle{Test}
\begin{itemize}
\item Test
\end{itemize}
\end{frame}
\begin{frame}
\frametitle{Test}
\begin{itemize}
\item Test
\end{itemize}
\end{frame}
\end{document}

有什麼建議麼?

謝謝!

答案1

handout假設在模式下可能不需要 framtitle 補丁:

\documentclass[handout]{beamer}

\hypersetup{pdfpagemode=UseOutlines,
 pdfstartview=FitH,
 bookmarksopen=true}

\usepackage{etoolbox}
\usepackage{bookmark}


\makeatletter
\apptocmd{\beamer@@frametitle}{\only<1|handout:0>{\bookmark[page=\the\c@page,level=3]{#1}}}%
{\message{** patching of \string\beamer@@frametitle succeeded **}}%
{\errmessage{** patching of \string\beamer@@frametitle failed **}}%
\makeatother


\usepackage{pgfpages}
\pgfpagesuselayout{2 on 1}[a4paper,border shrink=5mm]


\title{Test}

\begin{document}

\begin{frame}
\titlepage
\end{frame}

\begin{frame}
\frametitle{Test}
\begin{itemize}
\item Test
\end{itemize}
\end{frame}

\begin{frame}
\frametitle{Test}
\begin{itemize}
\item Test
\end{itemize}
\end{frame}

\begin{frame}
\frametitle{Test}
\begin{itemize}
\item Test
\end{itemize}
\end{frame}

\begin{frame}
\frametitle{Test}
\begin{itemize}
\item Test
\end{itemize}
\end{frame}

\end{document}

相關內容