# Keep the functionality of the sidebar using \includepdf

I would like to include a second beamer presentation for supplementary material (SM) into the main file. I use the \includepdf command from the pdfpages package but I lost the functionality of the sections in the sidebar. How can I keep it?

Here's my code:

main file:

\documentclass[dvipsnames]{beamer}
\usetheme{Copenhagen}
\usepackage{pdfpages}

\begin{document}

\section{a}
\begin{frame} \frametitle{a}
something...
\end{frame}

\section{b}
\begin{frame} \frametitle{b}
something...
\end{frame}

\cleardoublepage \phantomsection
{\setbeamercolor{background canvas}{bg=}
\includepdf[pages=-]{SM}
}

\end{document}


SM file:

\documentclass[dvipsnames]{beamer}
\usetheme{Hannover}

\begin{document}

\section{sm 1}
\begin{frame} \frametitle{supplementary material 1}
supplementary material...
\end{frame}

\section{sm 2}
\begin{frame} \frametitle{supplementary material 2}
supplementary material...
\end{frame}

\end{document}

• If you have the source code for both presentations, why not simply insert the old presentation into your new one? – samcarter is at topanswers.xyz Dec 14 '15 at 0:23
• I guess the problem is the usage of different themes then. And for the use of pdfpages directly, see tex.stackexchange.com/questions/14620/…. The underlying problem might be the same. – cryingshadow Dec 14 '15 at 0:24
• You are including whole pages with \includepdf. The format and layout of the pages in the current document has no effect, basically. You can overlay stuff, if necessary e.g. to add a header or footer in a regular document. But this is not going to work well in something like Beamer, I don't think. Why not use \includegraphics? – cfr Dec 14 '15 at 1:38
• Do you mean you lost the functionality of stuff from the included pages? That's inevitable because inclusion breaks hyperlinks. The documentation suggests that some functionality can be 'put back' with post-processing, though I've never tried that myself. – cfr Dec 14 '15 at 1:40

The pax package works fine also using different themes. See also: Embedding a PDF file with clickable external links into a LaTeX document
• Indeed you make the file .pax to have the functionality back – Not Sure Dec 14 '15 at 2:45