3

I am trying to top-aligned the right figure with the left text. But when I used option 'T', I found top room get much bigger in the right figure.

Here is my tex code:

\documentclass{beamer}
\usepackage[UTF8, 10pt]{ctex}
\usepackage{subcaption}

\begin{document}

\begin{frame}[t]\frametitle{Motivation}

\begin{columns}

    \column{.5\textwidth}

    卷积产生了三个重要的影响,
    \begin{itemize}
        \item a
        \item b
        \item c
    \end{itemize}

    稀疏交互的含义是:

    \textcolor{red}{传统的全连接网络}每层的$m$个input和$n$个output之间都有连接,

    \textcolor{red}{卷积网络}的input和output之间是稀疏连接,

    \column{.5\textwidth}

    \begin{figure}[t]

        \centering
        \begin{subfigure}{.5\textwidth}
            \centering
            \includegraphics[width=\linewidth]{example-image}
            \caption{view from below}
        \end{subfigure}
        \begin{subfigure}{.5\textwidth}
            \centering
            \includegraphics[width=\linewidth]{example-image}
            \caption{view from above}
        \end{subfigure}
        \caption{Caption here}
        \label{fig:figure1}
    \end{figure}

\end{columns}

\end{frame}
\end{document}

enter image description here

According to Problem with top alignment in beamer columns, after I have added the option 'T'

\documentclass{beamer}
\usepackage[UTF8, 10pt]{ctex}
\usepackage{subcaption}

\begin{document}

\begin{frame}[t]\frametitle{Motivation}

\begin{columns}[T] % new option

    \column{.5\textwidth}

    卷积产生了三个重要的影响,
    \begin{itemize}
        \item a
        \item b
        \item c
    \end{itemize}

    稀疏交互的含义是:

    \textcolor{red}{传统的全连接网络}每层的$m$个input和$n$个output之间都有连接,

    \textcolor{red}{卷积网络}的input和output之间是稀疏连接,

    \column{.5\textwidth}

    \begin{figure}[t]

        \centering
        \begin{subfigure}{.5\textwidth}
            \centering
            \includegraphics[width=\linewidth]{example-image}
            \caption{view from below}
        \end{subfigure}
        \begin{subfigure}{.5\textwidth}
            \centering
            \includegraphics[width=\linewidth]{example-image}
            \caption{view from above}
        \end{subfigure}
        \caption{Caption here}
        \label{fig:figure1}
    \end{figure}

\end{columns}

\end{frame}
\end{document}

enter image description here

The text seems top-aligned, but the figure ...

So any ideas that can align the figure with the text? And why the top room becomes bigger?

1 Answers1

4

The additional space comes from the figure environment. As a quick hack:

\documentclass{beamer}

\usepackage{subcaption}

\begin{document}

\begin{frame}[t]
  \frametitle{Motivation}
  \begin{columns}[T] % new option
    \begin{column}{.5\textwidth}
      text text text
      \begin{itemize}
        \item text text text(sparse interaction)
        \item text text text(parameter sharing)
        \item text text text(equivariant representation)
      \end{itemize}
      text text text:

      \textcolor{red}{text text text}text text text$m$text text text$n$text text text,text text text$m \times n $text text text,text text text。

      \textcolor{red}{text text text}text text text,text text text,text text text,text text text$k \times n, k \ll m$,text text text,text text text。
    \end{column}
    \begin{column}{.5\textwidth}
      \vspace{-.9\baselineskip}
      \begin{figure}
        \begin{subfigure}[t]{.5\textwidth}
          \includegraphics[width=\linewidth]{example-image}
          \caption{view from below}
        \end{subfigure}
        \begin{subfigure}{.5\textwidth}
          \includegraphics[width=\linewidth]{example-image}
          \caption{view from above}
        \end{subfigure}
        \caption{Caption here}
        \label{fig:figure1}
      \end{figure}
    \end{column}
  \end{columns}
\end{frame}


\end{document}

enter image description here

  • Just a hint. I usually put a \vspace{\heightof{X}} in here and are just happy with it. The result shall be comparable. – Jürgen Apr 05 '17 at 14:01