ocg-p + beamer:隐藏在导航栏后面的图层

ocg-p + beamer:隐藏在导航栏后面的图层
  • 我想\Acrobatmenu在每张beamer幻灯片上显示一个项目。
  • 下面的代码原则上是可行的(我在article文档类中使用了相同的代码,请参阅使用 ocgx2 而不是 ocg-p:\AddToShipoutPictureBG 无法识别)。
  • beamer\Acrobatmenu项目似乎隐藏在“左侧蓝色区域”后面,看第二张截图。
  • 有任何想法吗?

% Compile with pdftex (because of ocg-p).
\documentclass{beamer}
\usetheme{Berkeley}
\setbeamertemplate{navigation symbols}{}

\usepackage{fontawesome5}

\usepackage{tikz}
\usepackage{ocg-p}

%https://tex.stackexchange.com/questions/276532
\AddToShipoutPictureBG
{\begin{ocg}[printocg = never]{PDF Navigation Elements}{oc1}{1}
    \begin{tikzpicture}[remember picture, overlay]
    \node [anchor = west, font = \large, align = left] () at (current page.west){\Acrobatmenu{GoBack}{\faArrowAltCircleLeft}\\\Acrobatmenu{GoForward}{\faArrowAltCircleRight}};    
    \end{tikzpicture}   
 \end{ocg}%
 }

\begin{document}

\section{Section 1}    
\begin{frame}
\frametitle{\insertsection}
\textbackslash \texttt{Acrobatmenu\{GoBack\}\{\textbackslash faArrowAltCircleLeft\}}: \Acrobatmenu{GoBack}{\faArrowAltCircleLeft}
\end{frame} 

\section{Section 2}   
\begin{frame}
\frametitle{\insertsection}
\textbackslash \texttt{Acrobatmenu\{GoBack\}\{\textbackslash faArrowAltCircleLeft\}}: \Acrobatmenu{GoBack}{\faArrowAltCircleLeft}
\end{frame} 
    
\end{document}

在此处输入图片描述

在此处输入图片描述

答案1

根据 Ulrike 的巧妙评论,这是我的“耻辱准则”。

% Compile with pdftex (because of ocg-p).
\documentclass{beamer}
\usetheme{Berkeley}
\setbeamertemplate{navigation symbols}{}

\usepackage{fontawesome5}

\usepackage{tikz}
\usepackage{ocg-p}

% https://tex.stackexchange.com/questions/276532
\AddToShipoutPictureFG % <-- Changed to FG!
{\begin{ocg}[printocg = never]{PDF Navigation Elements}{oc1}{1}
    \begin{tikzpicture}[remember picture, overlay]
    \node [anchor = west, font = \large, align = left] () at (current page.west){\Acrobatmenu{GoBack}{\faArrowAltCircleLeft}\\\Acrobatmenu{GoForward}{\faArrowAltCircleRight}};    
    \end{tikzpicture}   
 \end{ocg}%
 }

\begin{document}

\section{Section 1}    
\begin{frame}
\frametitle{\insertsection}
\textbackslash \texttt{Acrobatmenu\{GoBack\}\{\textbackslash faArrowAltCircleLeft\}}: \Acrobatmenu{GoBack}{\faArrowAltCircleLeft}
\end{frame} 

\section{Section 2}   
\begin{frame}
\frametitle{\insertsection}
\textbackslash \texttt{Acrobatmenu\{GoBack\}\{\textbackslash faArrowAltCircleLeft\}}: \Acrobatmenu{GoBack}{\faArrowAltCircleLeft}
\end{frame} 
    
\end{document}

在此处输入图片描述

相关内容