我想在幻灯片上使表格中某些选定的列变暗(即透明),这样我就可以突出显示其余列,而无需使用颜色明确引起注意。目前我正在尝试使用包hf-tikz
和opacity
选项,但不知何故我没有看到任何效果。我使用颜色来检查命令是否真的有效 - 结果是有效的 - 所以问题是没有颜色,文本的简单变暗似乎没有明显的效果。我该如何改进?
\documentclass{beamer}
\mode<presentation>
{
\setbeamertemplate{navigation symbols}{}
\setbeamertemplate{caption}[numbered]
}
%%%%%%%%%
\usepackage{tikz}
\usetikzlibrary{backgrounds}
\usetikzlibrary{arrows,shapes}
\usetikzlibrary{tikzmark, calc,decorations.pathmorphing,patterns}
\usetikzlibrary{arrows.meta, positioning, quotes}
\usetikzlibrary{matrix,overlay-beamer-styles}
\usepackage{nccmath}
\usepackage[skins]{tcolorbox}
\tcbuselibrary{raster}
\tcbuselibrary{theorems}
\usepackage{makecell}
\usepackage{array, booktabs, longtable}
\usepackage{graphicx}
\usepackage{caption}
\usepackage{mathtools}
\newtcbtheorem[]{mylemmma}{Lemma}{colframe=red,colback=white, width=\textwidth, left=0pt}{lem}
\tcbset{colframe=red, colback=white}
\resetcounteronoverlays{tcb@cnt@mylemmma}
\begin{document}
\section{Proofs}
\begin{frame}[fragile]
\frametitle{Warmup}
%\setbeamercovered{transparent}%
\only<1>{\begin{tcolorbox}[hbox, left = 0.1 mm, right=0.1 mm, top = 0.4mm, bottom = 0.4mm, hide=<2->]
Simpler case: blsadf asdf;laskjdf;laksdf;la
\end{tcolorbox}}
\pause
\begin{table}[htbp]
\centering
\begin{tabular}{c c c c c c c c}
% \begin{tabular}{>{\onslide<1>}c<{\onslide} c c c c c c c}
\toprule
$a$ & \multicolumn{1}{c}{$b$} & \multicolumn{1}{c}{$c$} & \multicolumn{1}{c}{$d$} & \multicolumn{1}{c}{$e$}
& \multicolumn{1}{c}{$f$}
& \multicolumn{1}{c}{$g$} & \multicolumn{1}{c}{$h$}\\
\midrule
$x$ & $y$ & $z$ & $\alpha$ & $\beta$ & $\gamma$ & $\mu$ & $\epsilon$\\
$x$ & $y$ & $z$ & $\alpha$ & $\beta$ & $\gamma$ & $\mu$ & $\epsilon$\\
\bottomrule
\end{tabular}
\caption{Notation}
\label{TableNotation}
\end{table}
%
\pause
\begin{mylemmma}{Our lemma}{lem}
We have the following bound:
\[f(x) \leq g(x) + r(x) + m(x)\]
\end{mylemmma}
\pause
\begin{tcolorbox}[hbox, left = 0.1 mm, right=0.1 mm, top = 0.4mm, bottom = 0.4mm]
Main Idea: $x$ is small enough for Taylor approximation.
\end{tcolorbox}
\end{frame}
\end{document}
答案1
您可以使用 beamer 工具,参见这里。
\documentclass{beamer}
\mode<presentation>
{
\setbeamertemplate{navigation symbols}{}
\setbeamertemplate{caption}[numbered]
}
%%%%%%%%%
\usepackage{array}
\usepackage{booktabs}
\begin{document}
\section{Proofs}
%\resetcounteronoverlays{tcb@cnt@mydef}
\begin{frame}[fragile]
\setbeamercovered{transparent}%
\begin{table}[htbp]
\centering
\resizebox{\linewidth}{!}{% Resize table to fit within \linewidth horizontally
\begin{tabular}{>{\onslide<1>}c<{\onslide} c c c c c c c}
\toprule
$a$ & \multicolumn{1}{c}{$b$} & \multicolumn{1}{c}{$c$} & \multicolumn{1}{c}{$d$} & \multicolumn{1}{c}{$e$}
& \multicolumn{1}{c}{$f$}
& \multicolumn{1}{c}{$g$} & \multicolumn{1}{c}{$h$}\\
\midrule
$x$ & $y$ & $z$ & $\alpha$ & $\beta$ & $\gamma$ & $\mu$ & $\epsilon$\\
$x$ & $y$ & $z$ & $\alpha$ & $\beta$ & $\gamma$ & $\mu$ & $\epsilon$\\
\bottomrule
\end{tabular}}
\caption{Notation}
\label{TableNotation}
\end{table}
\pause
\end{frame}
\end{document}
(题外话:我个人不会调整表格大小。)