\documentclass{beamer}
\usepackage{pifont}
%\usepackage{etoolbox} (this is necessary for old beamer versions)
%\usepackage{graphicx}
%\usepackage{color}
\usetheme{Madrid}
\newtheorem{proposition}[theorem]{Proposition}
\definecolor{kaiscyan}{RGB}{0,139,139}
\BeforeBeginEnvironment{proposition}{%
\setbeamercolor{block title}{fg=white,bg=kaiscyan}
\setbeamercolor{block body}{fg=black, bg=kaiscyan!20!white}
}
\AfterEndEnvironment{proposition}{
\setbeamercolor{block title}{use=structure,fg=white,bg=structure.fg!75!black}
\setbeamercolor{block body}{parent=normal text,use=block title,bg=block title.bg!10!bg}
}
\begin{document}
\begin{frame}
\begin{proposition}[\hfill{[\ding{43} The authors (year)]}]
A proposition.
\end{proposition}
\end{frame}
\end{document}
我想省略以下括号
答案1
您必须更改相关的 beamer 模板。如果您一直在那里使用手,您可以将其添加到模板中:
\documentclass{beamer}
\usepackage{pifont}
%\usepackage{etoolbox} (this is necessary for old beamer versions)
%\usepackage{graphicx}
%\usepackage{color}
\usetheme{Madrid}
\makeatletter
\newtheorem{proposition}[theorem]{Proposition}
\definecolor{kaiscyan}{RGB}{0,139,139}
\BeforeBeginEnvironment{proposition}{%
\setbeamertemplate{theorem begin}
{%
\begin{\inserttheoremblockenv}
{%
\inserttheoremheadfont
\inserttheoremname
\inserttheoremnumber
\ifx\inserttheoremaddition\@empty\else
\hfill[\ding{43} \inserttheoremaddition]%
\fi
}%
}%
\setbeamercolor{block title}{fg=white,bg=kaiscyan}%
\setbeamercolor{block body}{fg=black, bg=kaiscyan!20!white}%
}
\AfterEndEnvironment{proposition}{
\setbeamercolor{block title}{use=structure,fg=white,bg=structure.fg!75!black}
\setbeamercolor{block body}{parent=normal text,use=block title,bg=block title.bg!10!bg}
}
\begin{document}
\begin{frame}
\begin{proposition}[The authors (year)]
A proposition.
\end{proposition}
\begin{proposition}[another]
A proposition.
\end{proposition}
\begin{proposition}
A proposition.
\end{proposition}
\end{frame}
\end{document}