我目前正在使用该课程进行演示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}
说实话我有点不知道该如何实现这一点,因为我从来没有用颜色在 Latex 中“填充”东西……
编辑:只是为了清楚起见,这只适用于一个框架,所有其他框架都应该保持正常!
答案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}