我尝试使用 突出显示投影仪演示文稿中的表格的两行tikzmarkin
。但是,无论出于什么原因,突出显示都覆盖了第一列以及上下两行。我不确定如何解决这个问题。
下面是一个最小的工作示例:
\documentclass[aspectratio=169]{beamer}
\usetheme[numbering=none]{metropolis}
% \documentclass[aspectratio=169,handout]{beamer}
\usepackage{appendixnumberbeamer}
\usepackage{caption}
\usepackage{subcaption}
\usepackage{booktabs}
\usepackage{bbm}
\usepackage{amsmath}
\usepackage{arydshln}
\usepackage{graphicx}
\usepackage{mathrsfs}
\usepackage{multirow}
\usepackage{textpos}
\usepackage{accents}
\newcommand{\ubar}[1]{\underaccent{\bar}{#1}}
\captionsetup[figure]{labelformat=empty}% redefines the caption setup of the figures environment in the beamer class.
% \definecolor{dukeblue}{RGB}{0,0,152}
% \setbeamercolor*{upperfootline}{bg=white, fg=dukeblue}
% \setbeamercolor*{lowerfootline}{bg=dukeblue, fg=white}
% \setbeamercolor{structure}{fg=dukeblue}
\setbeamertemplate{page number in head/foot}[totalframenumber]%
\newcommand{\insertmyfootertext}{Boutros, Clara and Gomes (2022)} %<--- Add text for left half of lower footer here
%\newcommand{\insertmyimage}{master_fig/duke.png} %<--- Add image for right half of lower footer here
\makeatletter
\defbeamertemplate*{footline}{mycustomtheme}
{%
\leavevmode%
\hbox{%
\begin{beamercolorbox}[wd=.5\paperwidth,ht=3.00ex,dp=1ex]{upperfootline}%
\usebeamerfont{author in head/foot}\hspace*{2em}\insertshortauthor
\end{beamercolorbox}%
\begin{beamercolorbox}[wd=.5\paperwidth,ht=3.00ex,dp=1ex,right]{upperfootline}%
\usebeamertemplate{page number in head/foot}\hspace*{2ex}
\end{beamercolorbox}}%
\vskip0pt%
\hbox{%
\begin{beamercolorbox}[wd=.5\paperwidth,ht=3.00ex,dp=1ex]{lowerfootline}%
\usebeamerfont{author in head/foot}\hspace*{2em}\vspace*{0.12em}\insertmyfootertext
\end{beamercolorbox}%
\begin{beamercolorbox}[wd=.5\paperwidth,ht=3.00ex,dp=1ex,right]{lowerfootline}%
%\includegraphics[width=1.2cm, height=4.1ex, keepaspectratio]{\insertmyimage}\hspace*{2ex}
\end{beamercolorbox}}%
\vskip0pt%
}
\makeatother
\setbeamercolor{block body alerted}{bg=alerted text.fg!10}
\setbeamercolor{block title alerted}{bg=alerted text.fg!20}
\setbeamercolor{block body}{bg=structure!10}
\setbeamercolor{block title}{bg=structure!20}
\setbeamercolor{block body example}{bg=green!10}
\setbeamercolor{block title example}{bg=green!20}
\newcommand{\credit}[1]{\par\hfill \footnotesize ~\itshape#1}
\usepackage[beamer,customcolors]{hf-tikz}
\tikzset{hl/.style={
set fill color=red!80!black!40,
set border color=red!80!black,
},
}
%
%----------------------------------------------------------------------------------------
% TITLE PAGE
%----------------------------------------------------------------------------------------
\title[]{Title here}
\author[]{Someone}
\date{}
\begin{document}
\begin{frame}
\titlepage
\end{frame}
\begin{frame}{Title here}
\tiny
\setlength{\tabcolsep}{4pt}
\begin{tabular}{lcccclcccclcccc}
\hline
& \multicolumn{4}{c}{Panel A: title A} & \textbf{} & \multicolumn{4}{c}{Panel B: title B} & & \multicolumn{4}{c}{Panel C: title C} \\ \hline
\multicolumn{1}{c}{\textbf{}} & 26-30 & 31-35 & 36-40 & 41-65 & \textbf{} & 26-30 & 31-35 & 36-40 & 41-65 & \textbf{} & 26-30 & 31-35 & 36-40 & 41-65 \\ \cline{2-5} \cline{7-10} \cline{12-15}
Dummy row 1 \tikzmarkin<2->[hl]{a} & 0.431 & 0.654 & 0.693 & 0.316 & & 0.462 & 0.236 & 0.136 & 0.240 & & 0.107 & 0.109 & 0.171 & 0.444 \\
Dummy row 2 & 0.431 & 0.654 & 0.372 & 0.020 & & 0.462 & 0.236 & 0.073 & 0.015 & & 0.107 & 0.109 & 0.092 & 0.027 \tikzmarkend{a} \\
Dummy row 3 & 75.476 & 96.288 & 92.928 & 80.958 & & 44.441 & 46.990 & 42.068 & 41.270 & & 17.395 & 19.522 & 20.966 & 20.890 \\
Dummy row 4 & 0.134 & 0.080 & 0.049 & 0.063 & & 0.118 & 0.030 & 0.011 & -0.008 & & -0.313 & -0.063 & 0.005 & 0.005 \\
Dummy row 5 & 44.742 & 55.824 & 52.775 & 43.955 & & 25.275 & 26.508 & 23.770 & 24.015 & & 13.874 & 14.010 & 14.408 & 14.102 \\
Dummy row 6 & 0.123 & 0.077 & 0.049 & 0.068 & & 0.056 & 0.016 & 0.004 & -0.005 & & -0.172 & -0.028 & 0.009 & 0.005 \\
Dummy row 7 & 25.285 & 14.298 & 6.868 & 17.027 & & 27.805 & 21.951 & 19.996 & 32.147 & & 29.311 & 30.583 & 34.365 & 44.288 \\
\hline
\end{tabular}
\end{frame}
\end{document}