%3F.png)
\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
лице и 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
следующим образом. Не обязательно создавать черный квадрат командой rule, поскольку \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}
И вот что получается.
Кстати, номера глав не должны быть римскими, так как префиксы в номерах разделов арабские. Также не обязательно добавлять точки после номеров разделов, так как после номеров глав точек нет.