2

I'm making slides using beamer but am having trouble placing images where I want them. My code is as follows:

\begin{frame}{Plume/jet description}

  \hspace{-1em}
  \begin{center}
    \begin{tikzpicture}[align=center]
      \node[anchor=south west,inner sep=0] (plumeModel) at (0,0) {
        \includegraphics[height=0.3\textheight]{images/image1}
      };
      \node[anchor=south west,inner sep=0] (collapsing) at (6.75,0) {
        \includegraphics[height=0.3\textheight]{images/image2}
      };
      \draw[-latex,thick] (plumeModel.east) -- (collapsing.west) node (arrow) [midway,above] {};
      \draw[-,thin] (plumeModel.east) -- (collapsing.west)  node [midway,below] {};
    \end{tikzpicture}
  \end{center}

  \begin{columns}

    \begin{column}{.5\textwidth}
      \begin{block}{Parameters}
        Mean velocity: $\bar{u}$ \\
        Plume radius: $b$ \\
        Buoyancy: $g' = g\dfrac{\rho - \rho_a}{\rho_0}$
      \end{block}
    \end{column}

    \begin{column}{.5\textwidth}

      \begin{block}{Conserved fluxes}
        Volume flux: $q = b^2 \bar{u}$ \\
        Momentum flux: $m = b^2 \bar{u}^2$ \\
        Buoyancy flux: $f = g' q$
      \end{block}

    \end{column}

  \end{columns}

  \vspace*{\fill}

\end{frame}

This is the result. They're too far to the right of the slide. How do I get them centred? I've tried playing with the \hspace command but this either does nothing (for small spacing values), or does too much (when the spacing value is larger). I can't get fine control.

This is the result

2

I think your images are not far to the right but your columns far to the left.

When columns are used, beamer considers a longer line, left and right margins are shorter and first column is moved to the left compared with regular paragraphs.

It's possible to avoid this behavior applying option onlytextwidth to columns environment.

\documentclass{beamer}

\usepackage{mwe}

\begin{document}
\begin{frame}{Plume/jet description}

%  \hspace{-1em}
  \begin{center}
    \begin{tikzpicture}[align=center]
      \node[anchor=south west,inner sep=0,draw,outer sep=0pt] (plumeModel) at (0,0) {
        \includegraphics[height=0.3\textheight]{example-image}
      };
      \node[anchor=south west,inner sep=0,draw,outer sep=0pt] (collapsing) at (6.75,0) {
        \includegraphics[height=0.3\textheight]{example-image}
      };
      \draw[-latex,thick] (plumeModel.east) -- (collapsing.west) node (arrow) [midway,above] {};
      \draw[-,thin] (plumeModel.east) -- (collapsing.west)  node [midway,below] {};
    \end{tikzpicture}
  \end{center}

  \begin{columns}[onlytextwidth]
    \begin{column}{.5\textwidth}
      \begin{block}{Parameters}
        Mean velocity: $\bar{u}$ \\
        Plume radius: $b$ \\
        Buoyancy: $g' = g\dfrac{\rho - \rho_a}{\rho_0}$
      \end{block}
    \end{column}

    \begin{column}{.5\textwidth}
      \begin{block}{Conserved fluxes}
        Volume flux: $q = b^2 \bar{u}$ \\
        Momentum flux: $m = b^2 \bar{u}^2$ \\
        Buoyancy flux: $f = g' q$
      \end{block}
    \end{column}
  \end{columns}

  \vspace*{\fill}

\end{frame}
\end{document}

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.