Com*_*lio 5 latex beamer pdflatex
我试图使用数字叠加来节省自己为每张幻灯片创建不同的图像.叠加层适用于我包含的任何文本,但不适用于图形.例如:
\setbeamercovered{dynamic}
\begin{figure}\resizebox{10.0cm}{!}{
\includegraphics{problem-a.pdf}
Test A
\pause
\includegraphics{problem-b.pdf}
Test B
\pause
\includegraphics{problem-c.pdf}
Test C
}\end{figure}
Run Code Online (Sandbox Code Playgroud)
文本"测试B"和"测试C"的结果在第一张幻灯片上以阴影显示,但对应于"问题-b"和"问题-c"的数字没有阴影.
对于任何偶然发现这一点的人来说,到目前为止我发现的最好的事情是使用 tikz 并设置自定义透明度模式:
\gdef\transparent@value{100}
\newcommand{\getbeamertrans}{
\transparent@value/100
}
\newcommand{\set@transparent}[1]{\gdef\transparent@value{#1}}
\def\opaquenessCustom#1{%
\only<1->{%
\beamer@actions{%
\set@transparent{#1}%
\expandafter\xdef\csname beamer@oldcolorhook%
\the\beamer@coveringdepth\endcsname{\beamer@colorhook}%
\expandafter\xdef\csname beamer@oldpgfextension%
\the\beamer@coveringdepth\endcsname{\beamer@pgfextension}%
{\globalcolorstrue\colorlet{beamer@freeze\the\beamer@coveringdepth}{bg}}%
\xdef\beamer@colorhook{!#1!beamer@freeze%
\the\beamer@coveringdepth\beamer@colorhook}%
\gdef\beamer@pgfextension{!#1opaque}%
\color{.}%
}%
{%
\set@transparent{100}%
\xdef\beamer@colorhook{\csname beamer@oldcolorhook%
\the\beamer@coveringdepth\endcsname}%
\xdef\beamer@pgfextension{\csname beamer@oldpgfextension%
\the\beamer@coveringdepth\endcsname}%
\color{.}%
}}%
}%
\define@key{beamer@mixin}{transparent}[15]{%
\def\beamer@uncoverbeforeactions{\ignorespaces\opaquenessCustom{#1}}%
\def\beamer@uncoverafteractions{\ignorespaces\opaquenessCustom{#1}}%
}
\newcommand{\BeamerGraphic}[1]{%
\begin{tikzpicture}%
{\node[opacity=\getbeamertrans] {\includegraphics{#1}};}%
\end{tikzpicture}%
}
Run Code Online (Sandbox Code Playgroud)