投影机中精确的图形放置

投影机中精确的图形放置

我正在使用 Beamer 制作幻灯片,但在将图像放置在所需位置时遇到了麻烦。我的代码如下:

\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}

这是结果。它们太靠近幻灯片的右侧了。我该如何让它们居中?我尝试过使用该\hspace命令,但它要么不起作用(对于较小的间距值),要么作用太大(当间距值较大时)。我无法进行精细控制。

这就是结果

答案1

我认为您的图像并不是在右边,而是您的列在左边。

columns使用时,beamer考虑较长的行,左右边距较短,并且第一列与常规段落相比向左移动。

可以通过将选项应用onlytextwidthcolumns环境中来避免这种行为。

\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}

在此处输入图片描述

相关内容