キーを押したときのみハイパーリンクボタンを表示する

キーを押したときのみハイパーリンクボタンを表示する

私は Beamer プレゼンテーションを持っていますが、各スライドにはいくつかのハイパーリンクがあります。これらを使用すると、PDF 内のさまざまなセクションにジャンプできます。

ここに画像の説明を入力してください

これらのボタンは、スライドのテキスト、数式、図に干渉することがあります。キーを押したときのみボタンが表示されるようにする方法はありますか?

コード:

\documentclass{beamer}

\AtBeginSection[]{\label{sec:\thesection}}
\newcounter{prevsec}

\title{Some Title}

\setbeamertemplate{navigation symbols}{}

\setbeamertemplate{footline}{%
        \setcounter{prevsec}{\thesection}
        \ifnum\theprevsec>1
            \addtocounter{prevsec}{-1}
        \fi
    \quad\hyperlinkpresentationstart{\beamerreturnbutton{Back to start}}%
    \quad\hyperlinksectionstart{\beamerreturnbutton{Back to section start}}%
    \quad\hyperlink{Detailed_Analysis}{\beamergotobutton{Detailed Analysis}}%
    \quad\hyperlinksectionstartnext{\beamerskipbutton{Next section}}%
    \quad\hyperlink{sec:\theprevsec}{\beamerskipbutton{previous section}}%
    \vspace*{0.2cm}%
}


\begin{document}

   \section{sec1}
    \begin{frame}%{ss}
    1st section/ page 1 out of 1
    \end{frame}

    \begin{frame}
    1st section/ page 2 out of 2
    \end{frame}

    \begin{frame}[label=Detailed_Analysis]
        Detailed Analysis
    \end{frame}

    \section{sec2}
    \begin{frame}
    2nd section
    \end{frame}

    \section{sec3}
    \begin{frame}
    3rd section
    \end{frame}

    \begin{frame}
    More content on the 3rd section
    \end{frame}

    \begin{frame}
    Even More content on the 3rd section
    \end{frame}


\end{document}

答え1

これは、Acrobat Reader で動作する OCG ベース (つまり PDF レイヤー) のソリューションです。

キーを押す代わりに、マウス ポインターをスライド フットに近づけると、ナビゲーション コントロールの表示が切り替わります。

\documentclass{beamer}

\usepackage{ocgx2}

%patch hyperref to make PDF Annotations PDF-Layer-(OCG)-aware
\makeatletter
  \let\Hy@setpdfborderOrig\Hy@setpdfborder
  \def\Hy@setpdfborder{\ocgbase@insert@oc\Hy@setpdfborderOrig}%
\makeatother

\AtBeginSection[]{\label{sec:\thesection}}
\newcounter{prevsec}

\title{Some Title}

\setbeamertemplate{navigation symbols}{}

\setbeamertemplate{footline}{%
  \setcounter{prevsec}{\thesection}%
  \ifnum\theprevsec>1
    \addtocounter{prevsec}{-1}%
  \fi%
  \parbox{\paperwidth}{%
    \toggleocgs[triggerocg=onmouseenter]{navLayer}{\phantom{\rule{\paperwidth}{.2cm}}}\\
    \begin{ocg}{navLayer}{navLayer}{off}
    % dumb PDF annotation to work-around an AR bug  
    \immediate\pdfannot width 3pt height 3pt depth 0pt{/Ff 65537/FT/Btn/Subtype/Widget}%   
    \quad\hyperlinkpresentationstart{\beamerreturnbutton{Back to start}}%
    \quad\hyperlinksectionstart{\beamerreturnbutton{Back to section start}}%
    \quad\hyperlink{Detailed_Analysis}{\beamergotobutton{Detailed Analysis}}%
    \quad\hyperlinksectionstartnext{\beamerskipbutton{Next section}}%
    \quad\hyperlink{sec:\theprevsec}{\beamerskipbutton{previous section}}%
    \end{ocg}\\%
    \toggleocgs[triggerocg=onmouseenter]{navLayer}{\phantom{\rule{\paperwidth}{.2cm}}}%
  }% 
}

\begin{document}

   \section{sec1}
    \begin{frame}%{ss}
    1st section/ page 1 out of 1
    \end{frame}

    \begin{frame}
    1st section/ page 2 out of 2
    \end{frame}

    \begin{frame}[label=Detailed_Analysis]
        Detailed Analysis
    \end{frame}

    \section{sec2}
    \begin{frame}
    2nd section
    \end{frame}

    \section{sec3}
    \begin{frame}
    3rd section
    \end{frame}

    \begin{frame}
    More content on the 3rd section
    \end{frame}

    \begin{frame}
    Even More content on the 3rd section
    \end{frame}

\end{document}

関連情報