我正在使用 amsart 写一些笔记。我想用小写字母写一个小节(甚至是一个子小节)并将其居中。我怎样才能将其放在中间?
考虑MWE:
\documentclass{amsart}
\usepackage{etoolbox}
\patchcmd{\subsection}{\bfseries}{\scshape}{}{}
\begin{document}
\setcounter{section}{1}
\subsection{Hello World}
\end{document}
答案1
您只需复制定义,从运行更改为显示,然后添加\centering
和\scshape
\documentclass{amsart}
\makeatletter
\def\subsection{\@startsection{subsection}{2}%
\z@{.5\linespacing\@plus.7\linespacing}
% make this >0 for display heading
{.5\baselineskip}%
% add centering
{\normalfont\centering\scshape}%
}
\makeatother
\begin{document}
\setcounter{section}{1}
\subsection{Hello World}
One two three.
\end{document}