\documentclass[twoside,11pt]{book}
\usepackage[left=2.5cm,right=2cm,top=2cm,bottom=2cm,papersize={15.5cm,23.5cm}]{geometry}
\renewcommand{\thechapter}{\Roman{chapter}}
\renewcommand{\thesection}{\arabic{chapter}.\arabic{section}.}
\renewcommand{\thesubsection}{\arabic{chapter}.\arabic{section}.\arabic{subsection}.}
\usepackage{amsthm}
\newtheorem{definition}{Definition}[section]
\newtheorem{theorem}{Theorem}[section]
\renewcommand{\thetheorem}{\thesection\arabic{theorem}}
\renewenvironment{proof}{{\noindent\bfseries Proof.}}{\qedsymbol}
\renewcommand{\qedsymbol}{\rule{1ex}{1ex}}
\begin{document}
\chapter{ABC}
blablabla
\section{ONE}
\begin{theorem}
dddd
\end{theorem}
\begin{proof}
It is clear.
\end{proof}
\end{document}
我想要文字证明是粗体。所以我写:
\renewenvironment{proof}{{\noindent\bfseries Proof.}}{\qedsymbol}
现在,我想要 QED 符号是黑色方块,所以我写
\renewcommand{\qedsymbol}{\rule{1ex}{1ex}}
为什么 QED 符号显示在句子结束后,并且不能右对齐显示(如下图)?如何解决?
我想:
答案1
我的建议是使用https://tex.stackexchange.com/a/251251/4427并重新定义了\qedsymbol
。
\documentclass{article}
\usepackage{amsthm}
\usepackage{xpatch}
\providecommand{\proofnamefont}{\itshape}% the default
\xpatchcmd{\proof}{\itshape}{\normalfont\proofnamefont}{}{}
\renewcommand{\proofnamefont}{\bfseries}% your preference
\renewcommand{\qedsymbol}{\rule{1ex}{1ex}}
\begin{document}
\begin{proof}
Obvious, isn't it?
\end{proof}
\end{document}
答案2
从您的 中MWE
,了解到您需要Proof
在Bold
face 中输入 name 并且 应该qedsymbol
为实心黑色方块,为此无需重新定义环境,您可以根据需要proof
修改\proofname
和,修改后的为:\qedsymbol
MWE
\documentclass[twoside,11pt]{book}
\usepackage[left=2.5cm,right=2cm,top=2cm,bottom=2cm,papersize={15.5cm,23.5cm}]{geometry}
\renewcommand{\thechapter}{\Roman{chapter}}
\renewcommand{\thesection}{\arabic{chapter}.\arabic{section}.}
\renewcommand{\thesubsection}{\arabic{chapter}.\arabic{section}.\arabic{subsection}.}
\usepackage{amsthm}
\newtheorem{definition}{Definition}[section]
\newtheorem{theorem}{Theorem}[section]
\renewcommand{\thetheorem}{\thesection\arabic{theorem}}
%\renewenvironment{proof}{{\noindent\bfseries Proof.}}{\qedsymbol}
\renewcommand{\proofname}{\upshape\textbf{Proof}}
\renewcommand{\qedsymbol}{\rule{1ex}{1ex}}
\begin{document}
\chapter{ABC}
blablabla
\section{ONE}
\begin{theorem}
dddd
\end{theorem}
\begin{proof}
It is clear.
\end{proof}
\end{document}
输出为:
答案3
您可以按如下方式重新定义\proofname
和\qedsymbol
。没有必要通过规则命令创建黑色方块,因为包\blacksquare
中有一个命令amssymb
可以生成与(白色)方块大小相同的黑色方块。
\documentclass[twoside,11pt]{book}
\usepackage[left=2.5cm,right=2cm,top=2cm,bottom=2cm,papersize={15.5cm,23.5cm}]{geometry}
\renewcommand{\thechapter}{\Roman{chapter}}
\renewcommand{\thesection}{\arabic{chapter}.\arabic{section}.}
\renewcommand{\thesubsection}{\arabic{chapter}.\arabic{section}.\arabic{subsection}.}
\usepackage{amsthm}
\newtheorem{definition}{Definition}[section]
\newtheorem{theorem}{Theorem}[section]
\renewcommand{\thetheorem}{\thesection\arabic{theorem}}
\renewcommand{\proofname}{\upshape\bfseries Proof}
\usepackage{amssymb}
\renewcommand{\qedsymbol}{\ensuremath\blacksquare}
\begin{document}
\chapter{ABC}
blablabla
\section{ONE}
\begin{theorem}
dddd
\end{theorem}
\begin{proof}
It is clear.
\end{proof}
\end{document}
输出如下。
顺便说一句,章节号不应该是罗马字母,因为章节号的前缀是阿拉伯字母。另外,章节号后面不需要加点,因为章节号后面没有点。