amsbook 中未缩进的证明

amsbook 中未缩进的证明

我在 amsbook 中使用证明环境。与 amsart 不同,证明会自动缩进。有没有办法取消缩进?

\documentclass{amsbook}
\begin{document}
\noindent This is a non-indented sentence.
\begin{proof}
This is a proof.
\end{proof}
\end{document}

答案1

\usepackage{etoolbox}
\expandafter\patchcmd\csname\string\proof\endcsname
  {\normalparindent}{0pt }{}{}

这相当于(但更短)重新定义环境,proof如下所示

\makeatletter
\renewenvironment{proof}[1][\proofname]{\par
  \pushQED{\qed}%
  \normalfont \topsep6\p@\@plus6\p@\relax
  \trivlist
  \itemindent\z@ % original has \normalparindent
  \item[\hskip\labelsep
        \scshape
    #1\@addpunct{.}]\ignorespaces
}{%
  \popQED\endtrivlist\@endpefalse
}
\makeatother

答案2

amsbook定义(18 pt)并在环境中\normalparindent使用它。下面是一个避免这种情况的重新定义,我只是重新定义并注释掉一行:\itemindentproof

\makeatletter
\renewenvironment{proof}[1][\proofname]{\par
  \pushQED{\qed}%
  \normalfont \topsep6\p@\@plus6\p@\relax
  \trivlist
  %\itemindent\normalparindent
  \item[\hskip\labelsep
        \scshape
    #1\@addpunct{.}]\ignorespaces
}{%
  \popQED\endtrivlist\@endpefalse
}
\makeatother

相关内容