A legenda da figura aparece ao lado, em vez de abaixo

A legenda da figura aparece ao lado, em vez de abaixo

Estou usando a classe beamer para fazer uma apresentação. Estou usando minipage para obter 4 figuras em arranjo 2 por 2.

Quando dou legendas às figuras surgem 2 problemas:

  • A legenda começa logo na figura, e não abaixo
  • Ao invés de diminuir o tamanho da figura a legenda será cortada pela figura.
  • Também recebo o erro: "\caption fora da figura ou tabela. \end{frame}"
\documentclass{beamer}
\usetheme{default}
\setbeamerfont{caption}{size=\footnotesize}
\begin{document}
  \begin{frame}
      \begin{columns}
          \column{0.5\textwidth}
          \begin{minipage}[c][0.4\textheight][c]{\linewidth}
              \centering
              \includegraphics[width=1\linewidth]{ETRM1042-epspdf-to}
              \caption{WT terminal voltage}
          \end{minipage}
          \begin{minipage}[c][0.4\textheight][c]{\linewidth}
              \centering
              \includegraphics[width=1\linewidth]{ITRM1042-epspdf-to}
              \caption{WT terminal current}
          \end{minipage}
          \column{0.5\textwidth}
          \begin{minipage}[c][0.4\textheight][c]{\linewidth}
                      \centering
                      \includegraphics[width=1\linewidth]{ETRM1042-epspdf-to}
                  \caption{Caption 3}
                  \end{minipage}
          \begin{minipage}[c][0.4\textheight][c]{\linewidth}
              \centering
              \includegraphics[width=1\linewidth]{VAACC-epspdf-to}
              \caption{previous Vterm angle}
          \end{minipage}
      \end{columns}
    \end{frame}
   \end{document}

insira a descrição da imagem aqui

Responder1

Você terá menos complicações com a seguinte abordagem:

\documentclass{beamer}
    \usepackage{graphicx}
    \usepackage{tabularx}

\begin{document}
\begin{figure}
\begin{frame}
    \begin{tabularx}{\textwidth}{*{2}{>{\centering\arraybackslash}X}}
\includegraphics[width=0.9\linewidth,height=24mm]{example-image-a}
\caption{WT terminal voltage}
    &   \includegraphics[width=\linewidth,height=24mm]{example-image-a}
        \caption{???}
        \\  % new row
\includegraphics[width=0.9\linewidth,height=24mm]{example-image-b}
\caption{WT terminal current}
    &   \includegraphics[width=\linewidth,height=24mm]{example-image-b}
        \caption{previous Vterm angle}
    \end{tabularx}
\end{figure}
\end{frame}
\end{document}

insira a descrição da imagem aqui

Claro, para ver as legendas, suas imagens mostram limites adequados de altura.

Editar: Para ter legendas numeradas, você precisa adicionar preâmbulo \setbeamertemplate{caption}[numbered].

Termo aditivo: Conforme solicitado no comentário, as "legendas" sem a palavra "Figura" são fáceis de obter - mas não use \caption{...}:-). A possível solução é demonstrada no MWE abaixo.

\documentclass{beamer}
    \usetheme{default}
%----
    \usepackage{graphicx}
    \usepackage{tabularx}

\begin{document}
\begin{frame}
    \begin{tabularx}{\textwidth}{*{2}{>{\centering\arraybackslash}X}}
\includegraphics[width=0.9\linewidth,height=24mm]{example-image-a}\newline\footnotesize
WT terminal voltage
    &   \includegraphics[width=\linewidth,height=24mm]{example-image-a}\newline\footnotesize
        ???
        \\[1em]  % new row
\includegraphics[width=0.9\linewidth,height=24mm]{example-image-b}\newline\footnotesize
WT terminal current
    &   \includegraphics[width=\linewidth,height=24mm]{example-image-b}\newline\footnotesize
        previous Vterm angle
    \end{tabularx}
\end{frame}
\end{document}

que dá:

insira a descrição da imagem aqui

Responder2

Se eu executar seu exemplo, recebo

! LaTeX Error: \caption outside figure or table.

Se você receber um erro, não vale a pena olhar a saída do pdf, o teX tenta recuperar para verificar mais erros do arquivo, mas não para produzir uma saída sensata.

Se eu adicionar tabelas como o erro diz, a saída parece boa para mim:

insira a descrição da imagem aqui

\documentclass{beamer}
\usetheme{default}
\setbeamerfont{caption}{size=\footnotesize}
\begin{document}
  \begin{frame}
      \begin{columns}
          \column{0.5\textwidth}
          \begin{table}
              \centering
              \includegraphics[height=.3\textheight]{example-image}
              \caption{WT terminal voltage}
          \end{table}
          \begin{table}
              \centering
              \includegraphics[height=.3\textheight]{example-image-a}
              \caption{WT terminal current}
          \end{table}
          \column{0.5\textwidth}
          \begin{table}
                      \centering
                      \includegraphics[height=.3\textheight]{example-image-b}
                  \caption{Caption 3}
                  \end{table}
          \begin{table}
              \centering
              \includegraphics[height=.3\textheight]{example-image}
              \caption{previous Vterm angle}
          \end{table}
      \end{columns}
    \end{frame}
   \end{document}

informação relacionada