我正在使用amsart
。我怎样才能在以下内容(目录的标题格式)中更改\scshape
为:\bfseries
\documentclass{amsart}
\makeatletter
\newcommand{\newsectionstyle}{%
\renewcommand{\@secnumfont}{\bfseries}
\renewcommand\section{\@startsection{section}{2}%
\z@{.5\linespacing\@plus.7\linespacing}{-.5em}%
{\normalfont\bfseries}}%
}
\let\oldsection\section% Store original \section
\let\old@secnumfont\@secnumfont% Store original \@secnumfont
\newcommand{\originalsectionstyle}{%
\let\@secnumfont\old@secnumfont
\let\section\oldsection
}
\makeatother
\usepackage{lipsum}
\begin{document}
\tableofcontents
\newsectionstyle
\section{Linear Operators}\lipsum[1-10]
\section{The Real Method}\lipsum[11-20]
\section{The Complex Method}\lipsum[21-30]
\subsection{Hadamard's Three Lines Lemma}\lipsum[31-40]
\section{Interpolation of Analytic Families of Operators}\lipsum[41-50]
\originalsectionstyle
\begin{thebibliography}{x}
\bibitem{abc} Abc
\end{thebibliography}
\end{document}
答案1
amsart
定义\contentsnamefont
为的包装器\scshape
。
这样的话,\renewcommand{\contentsnamefont}{\bfseries}
就足够了!
\documentclass{amsart}
\makeatletter
\newcommand{\newsectionstyle}{%
\renewcommand{\@secnumfont}{\bfseries}
\renewcommand\section{\@startsection{section}{2}%
\z@{.5\linespacing\@plus.7\linespacing}{-.5em}%
{\normalfont\bfseries}}%
}
\renewcommand{\contentsnamefont}{\bfseries}
\let\oldsection\section% Store original \section
\let\old@secnumfont\@secnumfont% Store original \@secnumfont
\newcommand{\originalsectionstyle}{%
\let\@secnumfont\old@secnumfont
\let\section\oldsection
}
\makeatother
\usepackage{lipsum}
\begin{document}
\tableofcontents
\newsectionstyle
\section{Linear Operators}\lipsum[1-10]
\section{The Real Method}\lipsum[11-20]
\section{The Complex Method}\lipsum[21-30]
\subsection{Hadamard's Three Lines Lemma}\lipsum[31-40]
\section{Interpolation of Analytic Families of Operators}\lipsum[41-50]
\originalsectionstyle
\begin{thebibliography}{x}
\bibitem{abc} Abc
\end{thebibliography}
\end{document}