I want to put an qedsymbol at the end of a non-proof environment such as
\begin{theorem}
This is a funny equation
\[
\begin{array}{rcl}
x+y&=&z,\\
a+b&=&c.
\end{array}
\]
\end{theorem}
and I want to put the symbol at the right side of the line of
a+b=c
but not the right side of the whole list of equations.
And also in a proof environment I want to make qedsymbol at the right side of the line of a+b=c but not the right side of the whole list of equations.
\begin{proof}
So we have
\[
\begin{array}{rcl}
x_1+y^2&=&z^3,\\
a^2+b_2&=&c^6.
\end{array}
\]
\end{proof}
QUESTION: Who has a good way to do these two things together?
All the codes of mine are as follows.
\documentclass[11pt,b5paper]{ctexbook}
\usepackage{amsmath,amsthm,amssymb,amsfonts,mathrsfs}
%%%change qedsymbol%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\renewcommand{\qedsymbol}{\ensuremath\boxtimes}
%%%set theorems%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\theoremstyle{theorem}
\newtheorem{theorem}{定理}[section]
\newtheorem{lemma}[theorem]{引理}
\newtheorem{corollary}[theorem]{推论}
\newtheorem{proposition}[theorem]{命题}
\theoremstyle{definition}
\newtheorem{definition}[theorem]{定义}
\newtheorem{remark}[theorem]{评注}
\newtheorem{example}[theorem]{示例}
\newtheorem{exercise}[theorem]{习题}
\newtheorem{thesis}[theorem]{论题}
\newtheorem{conjecture}[theorem]{猜想}
\newtheorem{convention}[theorem]{约定}
\newtheorem{problem}[theorem]{问题}
\newtheorem{axiom}[theorem]{公理}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}
\begin{theorem}
This is a funny equation
\[
\begin{array}{rcl}
x+y&=&z,\\
a+b&=&c.\qedhere
\end{array}
\]
\end{theorem}
\begin{proof}
So we have
\[
\begin{array}{rcl}
x_1+y^2&=&z^3,\\
a^2+b_2&=&c^6.\qedhere
\end{array}
\]
\end{proof}
\begin{proof}
So we have
\begin{align*}
x+y&=z,\\
a+b&=c.\qedhere
\end{align*}
\end{proof}
\end{document}
The compiled PDF sample is also as follows.
NOTE: the new command \myqed
I defined can only work in the equation environment (with only 1 line of equations), but can't work in the align*
environment. So I still haven't solve the problem.
\qedhere
, in this post or this post for example.\documentclass
, includes all relevant\usepackage
commands, ends with\end{document}
and compiles without errors, even if it does not produce your desired output.\qedhere
doesn't workarray
witlalign
as in the example sin the linked posts. The way you are usingarray
is giving you incorrect spacing.