答案1
这个想法被无耻地窃取自这个答案。
\documentclass[12pt]{amsart}
\usepackage{lipsum} % just to have some blindtext
\DeclareRobustCommand{\SkipTocEntry}[4]{} % stolen from https://tex.stackexchange.com/a/131719/237192
\newcommand{\hiddensection}[1]{\addtocontents{toc}{\SkipTocEntry}\section*{#1}} % easier version
\begin{document}
\tableofcontents
\section{Introduction} % not hidden from toc
\lipsum[1][1-5]
\addtocontents{toc}{\SkipTocEntry} % hidden from toc using original command combination
\section*{Acknowledgement}
\lipsum[2][1-5]
\hiddensection{Another hidden section} % hidden from toc using shorthand
\lipsum[3][1-5]
\section{Next visible section}
\lipsum[4][1-5]
\end{document}