使用 scshape 證明環境

使用 scshape 證明環境

我想

\newtheorem*{prf}{\normalfont\scshape Proof}

但末尾有一個自動 \qedsymbol (QED)。

答案1

這是一種執行此操作的方法ntheorem

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{fourier}
\usepackage[svgnames]{xcolor}

 \usepackage{amsmath, amssymb}
\usepackage[thmmarks, amsmath, thref]{ntheorem}

\theoremstyle{plain}
\theoremheaderfont{\upshape\bfseries}
\theoremseparator{.}
\theorembodyfont{\itshape}
\newtheorem{thm}{Theorem}


\theoremstyle{nonumberplain}
\theoremheaderfont{\scshape}
\theoremseparator{:}
\theorembodyfont{\upshape}
\theoremsymbol{\ensuremath{\color{Gainsboro}\blacksquare}}
\newtheorem{prf}{Proof}

\begin{document}

\begin{thm}\label{th-a}
This theorem is awesome!
\end{thm}

\begin{prf}
One-lined proof: Blahblah Blahblah Blahblah.
\end{prf}

\begin{prf}[Variant]
This is a very important proof.
\begin{align*}
    a & = b\\ c & = d.
\end{align*}
\end{prf}

\end{document} 

在此輸入影像描述

答案2

proof用平常的環境就可以完成amsthm。它有一個可選參數來設定證明的名稱,因此您也可以傳遞\normalfont\scshape給此參數來設定字體。

\documentclass[11pt]{article}
\usepackage{amsthm}
\newtheorem*{thm}{Theorem}
\newenvironment{prf}[1][Proof]{%
    \begin{proof}[\normalfont\scshape #1]%
}{%
    \end{proof}%
}
\begin{document}
\begin{thm}
A theorem.
\end{thm}
\begin{prf}
The proof.
\end{prf}
\end{document}

相關內容