I'm trying to put into a beamer presentation on overleaf a graph that I already have in a document of class article.
However, it's not working. It says missing value, treated as 0 of line \end{frame}. Might be a package missing, but which one? Thanks!
\documentclass{beamer}
\usetheme{Madrid} % new
\usepackage{hyperref}
\setbeamercovered{transparent}
\usepackage{subfigure}
\usepackage{graphicx}
\usepackage{amsmath}
\begin{document}
\begin{frame}
\frametitle{Distribution of $W$}
\begin{figure}
\caption{Distribution of the $W$ statistic} \label{w_c}
\begin{subfigure}{\textwidth}
\caption{Singh-Madalla with $c=1.7$} \label{w_c_1.7}
\includegraphics[width=0.23\textwidth]{gini_fim2.pdf}\hfill
\includegraphics[width=0.23\textwidth]{ge_0_fim2.pdf}\hfill
\includegraphics[width=0.23\textwidth]{ge_1_fim2.pdf}\hfill
\includegraphics[width=0.23\textwidth]{ge_2_fim2.pdf}
\end{subfigure}
\bigskip
\begin{subfigure}{\textwidth}
\caption{Singh-Madalla with $c=1.2$} \label{w_c_1.2}
\includegraphics[width=0.23\textwidth]{gini_fim12.pdf}\hfill
\includegraphics[width=0.23\textwidth]{ge0_fim12.pdf}\hfill
\includegraphics[width=0.23\textwidth]{ge1_fim12.pdf}\hfill
\includegraphics[width=0.23\textwidth]{ge2_fim_12.pdf}
\end{subfigure}
\end{figure}
\end{frame}
\end{document}
Best Answer
subfigure
, it is obsolete package. instead it rather usesubcaption
packagehypperref
had to be loaded last in preamble, however, it is already loaded by beamer document class (see samcarter comment below), so it is better to delete itgraphicx
is loaded bybeamer
document class.Option
demo
at\documentclass[demo]graphicx
is passed tographics
package and in real use had to be removed. It is used here used because we haven't your actual images (it generate black squares instead them).