2
  • I want to show an \Acrobatmenu item on every beamer slide.
  • The code below works in principle (I used the same code in an article document class, see Using ocgx2 instead of ocg-p: \AddToShipoutPictureBG not recognized).
  • But in beamer, the \Acrobatmenu item seems to be hidden behind the "left blue area", see the second screenshot.
  • Any ideas?

% 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}


enter image description here

enter image description here

1 Answers1

1

Following Ulrike's ingenious comment, this is my "code of shame".

% 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}

enter image description here