与图形对齐的内容在图形未被覆盖时会改变位置(投影仪)

与图形对齐的内容在图形未被覆盖时会改变位置(投影仪)

当我将两页小页面对齐时,其中一张图minipage被揭开后,内容位置会发生变化。从规则到上部调色板的距离说明了这一点

在此处输入图片描述

在此处输入图片描述

\documentclass[aspectratio=169, xcolor={x11names}]{beamer}

    \setbeamercovered{transparent=30}

    \usecolortheme{seahorse}
    \useoutertheme{miniframes}
    \useinnertheme{inmargin}

    \usepackage{adjustbox}
    \usepackage[defaultmathsizes, subdued, italic, symbolre, symbolmisc]{mathastext}
% BEGIN_FOLD

\MTDeclareVersion[it]{charter}{T1}{bch}{m}{n}

\MTversion*{charter}


% END_FOLD


\begin{document}

\begin{frame}

    \uncover<+->{$\vphantom{1}$}
    \rule{\textwidth}{0.2mm}

    \begin{adjustbox}{minipage={0.45\textwidth}, valign=t}

        \includegraphics<+->[trim = 0mm 0mm 0mm 0mm, width=\columnwidth]{example-image-a}

    \end{adjustbox}
    \hfill
    \begin{adjustbox}{minipage={0.45\textwidth}, valign=t}

        \begin{itemize}
            \item<+-> Modeling the addition of branch $Z_{b}$ between two existing buses \mbox{($k$ and $p$)} in Brown's method
        \end{itemize}

    \end{adjustbox}

\end{frame}

\end{document}

答案1

可以说,使用\visible这是一个更简单的选择。

\documentclass[aspectratio=169, xcolor={x11names}]{beamer}

    \setbeamercovered{transparent=30}

    \usecolortheme{seahorse}
    \useoutertheme{miniframes}
    \useinnertheme{inmargin}

    \usepackage{adjustbox}
    \usepackage[defaultmathsizes, subdued, italic, symbolre, symbolmisc]{mathastext}
% BEGIN_FOLD

\MTDeclareVersion[it]{charter}{T1}{bch}{m}{n}

\MTversion*{charter}


% END_FOLD


\begin{document}

\begin{frame}

    \uncover<+->{$\vphantom{1}$}
    \rule{\textwidth}{0.2mm}

    \begin{adjustbox}{minipage={0.45\textwidth}, valign=t}

        \visible<+->{\includegraphics[trim = 0mm 0mm 0mm 0mm,
        width=\columnwidth]{example-image-a}}

    \end{adjustbox}
    \hfill
    \begin{adjustbox}{minipage={0.45\textwidth}, valign=t}

        \begin{itemize}
            \item<+-> Modeling the addition of branch $Z_{b}$ between two existing buses \mbox{($k$ and $p$)} in Brown's method
        \end{itemize}

    \end{adjustbox}

\end{frame}

\end{document}

在此处输入图片描述

答案2

您可以插入垂直幻影确切地相同的图形;也就是说,将另一个图形与原始图形放在一起,并使用phantom=v, 和adjustbox。这不会排版任何内容,但它会强制告诉 LaTeX 将垂直空间设置为图形排版时占用的空间。语法是

\adjustbox{phantom=v}{\includegraphics[trim = 0mm 0mm 0mm 0mm, width=\columnwidth]{example-image-a}}

完整代码

\documentclass[aspectratio=169, xcolor={x11names}]{beamer}

    \setbeamercovered{transparent=30}

    \usecolortheme{seahorse}
    \useoutertheme{miniframes}
    \useinnertheme{inmargin}

    \usepackage{adjustbox}
    \usepackage[defaultmathsizes, subdued, italic, symbolre, symbolmisc]{mathastext}
% BEGIN_FOLD

\MTDeclareVersion[it]{charter}{T1}{bch}{m}{n}

\MTversion*{charter}


% END_FOLD


\begin{document}

\begin{frame}

    \uncover<+->{$\vphantom{1}$}
    \rule{\textwidth}{0.2mm}

    \begin{adjustbox}{minipage={0.45\textwidth}, valign=t}

        \includegraphics<+->[trim = 0mm 0mm 0mm 0mm, width=\columnwidth]{example-image-a}% do not remove this
        \adjustbox{phantom=v}{\includegraphics[trim = 0mm 0mm 0mm 0mm, width=\columnwidth]{example-image-a}}

    \end{adjustbox}
    \hfill
    \begin{adjustbox}{minipage={0.45\textwidth}, valign=t}

        \begin{itemize}
            \item<+-> Modeling the addition of branch $Z_{b}$ between two existing buses \mbox{($k$ and $p$)} in Brown's method
        \end{itemize}

    \end{adjustbox}

\end{frame}

\end{document}

相关内容