단일 프레임의 절반을 검정색으로 채색

단일 프레임의 절반을 검정색으로 채색

현재 수업을 활용하여 프레젠테이션을 진행하고 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}

여기에 이미지 설명을 입력하세요

관련 정보