mtheme icon indicating copy to clipboard operation
mtheme copied to clipboard

Problems with insert pdf figure

Open gapplef opened this issue 8 years ago • 2 comments

I try to insert pdf figure in beamer and encounter a problem similar to this one.

\documentclass{beamer}
\begin{document}
    \begin{frame}
        \centering
        \includegraphics[width=0.7\textwidth]{figure.pdf}
    \end{frame}
\end{document}

Without metropolis theme, the output pdf file is normal: screenshot 1

When using metropolis theme:

\documentclass{beamer}
\usetheme{metropolis}
\begin{document}
    \begin{frame}
        \centering
        \includegraphics[width=0.7\textwidth]{figure.pdf}
    \end{frame}
\end{document}

The result become: screenshot 2

With the solution given in the above link:

\documentclass{beamer}
\usetheme{metropolis}
\definecolor{myback}{RGB}{250, 250, 250}
\begin{document}
    \begin{frame}
        \centering
        {\color{myback}\includegraphics[width=0.7\textwidth]{figure.pdf}}
    \end{frame}
\end{document}

The result still have problem: screenshot 3

Finally I get a solution from this link

\documentclass{beamer}
\usetheme{metropolis}
\begin{document}
    \begin{frame}
        \centering
        \textcolor{black}{\includegraphics[width=0.7\textwidth]{figure.pdf}}
    \end{frame}
\end{document}

The result is much better, but still not normal: the background of figure is white not transparent like the first result. screenshot 4

gapplef avatar Apr 10 '18 10:04 gapplef

One quick solution would be to frame color to white as well using

\setbeamercolor{normal text}{bg=white}

However, if it were to me, I would just plot those functions with pgfplots and avoid all the hassle of including transparent PDFs.

matze avatar Apr 16 '18 07:04 matze

I have the same problem.. would be cool to have a solution for this.. the white background in PDFs is annoying (although the PDF should be transparent)..

shibumi avatar Jan 15 '20 20:01 shibumi