# How to make () become [] in the environments of theorem, definition and example in beamer?

A MNW is as follows:

\documentclass[notheorems]{ctexbeamer}
\usetheme{Antibes}
\usepackage{amsmath,amsfonts,amssymb,comment}
\theoremstyle{theorem}
\newtheorem{theorem}{定理}
\newtheorem{lemma}[theorem]{引理}
\newtheorem{corollary}[theorem]{推论}
\newtheorem{proposition}[theorem]{命题}
\newtheorem{exercise}[theorem]{习题}
\theoremstyle{definition}
\newtheorem{definition}[theorem]{定义}
\theoremstyle{example}
\newtheorem{remark}[theorem]{评注}
\newtheorem{example}[theorem]{示例}
\setbeamertemplate{theorems}[numbered]

\begin{document}
\begin{frame}\frametitle{experiment}
\begin{theorem}[外国人]
定理的本质意义呢？many 2
\end{theorem}

\begin{definition}
令其有限。
\end{definition}

\begin{remark}[中国]
$\mathbb{N}$是一个无穷集。
\end{remark}

\end{frame}

\end{document}


It is compiled as

My QUESTION is:

• How to make () containing theorem notes become [] in the environments of theorem, definition and example?

I tried a lot but failed. So any help is welcome!

• i'm not familiar with ctexbeamer, but you're using some \newtheoremstyles that i recognize from amsthm (which is not called by \usepackage). only the default theorem style in amsthm specifies italic text. i would have expected other theorem packages to do the same. – barbara beeton May 20 '18 at 18:19

The () are hard coded in the theorem begin template. To change it, redefine the template.

\documentclass[notheorems]{beamer}

\usetheme{Antibes}
\usepackage{amsmath,amsfonts,amssymb,comment}
\newtheorem{theorem}{Theorem}

\setbeamertemplate{theorems}[numbered]

\makeatletter
\setbeamertemplate{theorem begin}
{%
\begin{\inserttheoremblockenv}
{%
\inserttheoremname
\inserttheoremnumber
}%
}

\makeatother

\begin{document}
\begin{frame}
\frametitle{experiment}

\begin{theorem}[name]
text
\end{theorem}

\end{frame}
\end{document}