如何获得这样的‘证据’?

如何获得这样的‘证据’?

我正在使用以下代码

    \documentclass[12pt,a4paper]{article}
     %------------------------------------------------------------
      \usepackage{amsmath,amssymb,amsthm}           
        %------------------------------------------------------------
         \usepackage[utf8]{inputenc}
         \usepackage[T1]{fontenc}
    % ------------------------------------------------------------
    \newtheorem{theorem}{Theorem}[section]
     \newtheorem{definition}{Definition}[section]
     \newtheorem{definitions}{Definitions}[section]
     \newtheorem{notation}{Notation}[section]
    \newtheorem{corollary}{Corollary}[section]
   \newtheorem{proposition}{Proposition}[section]
  \newtheorem{lemma}{Lemma}[section]
  \newtheorem{remark}{Remark}[section]
  \newtheorem{example}{Example}[section]
  \numberwithin{equation}{section}
    \begin{document}
    \section{section1}
    \begin{theorem}
    \end{theorem}
    \begin{proof}
    \end{proof}
     \end{document}

我希望得到这样的证明

在此处输入图片描述

谢谢。

答案1

使用proof环境并重新定义\qedsymbol为,比如,,$\blacksquare$这是一个amsmath/amssymb符号。\qedsymbol会自动附加在环境排版的末尾proof

\documentclass[12pt,a4paper]{article}
% ------------------------------------------------------------
\usepackage{amsmath,amssymb,amsthm}           
% ------------------------------------------------------------
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
% ------------------------------------------------------------
\newtheorem{theorem}{Theorem}[section]
\newtheorem{definition}{Definition}[section]
\newtheorem{definitions}{Definitions}[section]
\newtheorem{notation}{Notation}[section]
\newtheorem{corollary}{Corollary}[section]
\newtheorem{proposition}{Proposition}[section]
\newtheorem{lemma}{Lemma}[section]
\newtheorem{remark}{Remark}[section]
\newtheorem{example}{Example}[section]
\renewcommand{\qedsymbol}{$\blacksquare$}
\let\origproofname\proofname
\renewcommand{\proofname}{\upshape\textbf{\origproofname}}
\numberwithin{equation}{section}
\begin{document}
\section{section1}
\begin{proof}
  Foo
\end{proof}
\end{document}

在此处输入图片描述

更新

为了应对可选参数,我建议使用proof环境的修改版本,将其重命名为,otherproof并在定义中添加字体等的更改。

\documentclass[12pt,a4paper]{article}
% ------------------------------------------------------------
\usepackage{amsmath,amssymb,amsthm}           
% ------------------------------------------------------------
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
% ------------------------------------------------------------
\newtheorem{theorem}{Theorem}[section]
\newtheorem{definition}{Definition}[section]
\newtheorem{definitions}{Definitions}[section]
\newtheorem{notation}{Notation}[section]
\newtheorem{corollary}{Corollary}[section]
\newtheorem{proposition}{Proposition}[section]
\newtheorem{lemma}{Lemma}[section]
\newtheorem{remark}{Remark}[section]
\newtheorem{example}{Example}[section]


\makeatletter
\newenvironment{otherproof}[1][\proofname]{\par
  \renewcommand{\qedsymbol}{$\blacksquare$}
  \pushQED{\qed}%
  \normalfont \topsep6\p@\@plus6\p@\relax
  \trivlist
  \item[\hskip\labelsep
    \textbf{#1}\@addpunct{.}]\ignorespaces
}{%
  \popQED\endtrivlist\@endpefalse
}
\makeatother

\numberwithin{equation}{section}



\begin{document}
\section{section1}
\begin{otherproof}
  Foo
\end{otherproof}


\begin{otherproof}[Stuff]
  Foobar
\end{otherproof}

\begin{proof}
  Foobar again
\end{proof}


\end{document}

在此处输入图片描述

相关内容