將單一幀的一半著色為黑色

將單一幀的一半著色為黑色

我目前正在使用課程進行演示beamer,我偶然發現了一個我不知道如何解決的問題。考慮以下 MWE:

\documentclass{beamer}

\mode<presentation> {
\usetheme{Madrid}
\setbeamertemplate{footline}{}} 

\usepackage{graphicx} 
\usepackage{booktabs} 
\usepackage[english]{babel}
\usepackage{amssymb, amsthm, mathtools}

\usefonttheme{serif}

\begin{document}
\begin{frame}\frametitle{Useful relations to keep in mind}
\begin{align*}
A&=B+C& U&=\psi(x)\\
G&= AA& C&=\partial^\nu\\
B&=A+B& F&=BB
\end{align*}
\end{frame}
\end{document}

這給了 在此輸入影像描述 但我希望它是 在此輸入影像描述

老實說,我對如何實現這一目標有點迷失,因為我從來不需要用顏色「填充」乳膠中的東西...

編輯:需要明確的是,這應該只適用於一幀,所有其他幀都應該保持正常!

答案1

歡迎。怎麼樣

\documentclass{beamer}
\usepackage{tikz}
\usetikzlibrary{tikzmark}
\mode<presentation> {
\usetheme{Madrid}
\setbeamertemplate{footline}{}} 

\usepackage{graphicx} 
\usepackage{booktabs} 
\usepackage[english]{babel}
\usepackage{amssymb, amsthm, mathtools}

\usefonttheme{serif}

\begin{document}
\begin{frame}[t]
\frametitle{Useful relations to keep in mind}
\begin{align*}
A&=B+C& U&=\psi(x)\\
G&= AA& C&=\partial^\nu\\
B&=A+B& F&=BB\tikzmark{aux}
\end{align*}
\begin{tikzpicture}[overlay,remember picture]
\fill ([yshift=-1ex]pic cs:aux) coordinate (aux) (current page.south west) rectangle 
(aux-|current page.east);
\end{tikzpicture}
\end{frame}
\end{document}

在此輸入影像描述

當然,你可以將方程式向上移動,它仍然有效。

\documentclass{beamer}
\usepackage{tikz}
\usetikzlibrary{tikzmark}
\mode<presentation> {
\usetheme{Madrid}
\setbeamertemplate{footline}{}} 

\usepackage{graphicx} 
\usepackage{booktabs} 
\usepackage[english]{babel}
\usepackage{amssymb, amsthm, mathtools}

\usefonttheme{serif}

\begin{document}
\begin{frame}[t]
\frametitle{Useful relations to keep in mind}
\vspace*{-3em}
\begin{align*}
A&=B+C& U&=\psi(x)\\
G&= AA& C&=\partial^\nu\\
B&=A+B& F&=BB\tikzmark{aux}
\end{align*}
\begin{tikzpicture}[overlay,remember picture]
\fill ([yshift=-1ex]pic cs:aux) coordinate (aux) (current page.south west) rectangle 
(aux-|current page.east);
\end{tikzpicture}
\end{frame}
\end{document}

在此輸入影像描述

相關內容