定理や注釈などの文末にある数式と記号の間にスペースが多すぎる

定理や注釈などの文末にある数式と記号の間にスペースが多すぎる

定理 (およびその他の) 環境の末尾にダイヤモンド記号を追加しました。

ここに画像の説明を入力してください

しかし、定理の最後に表示計算を使用すると、ダイヤモンドが低く設定されてしまいます。

ここに画像の説明を入力してください

ダイヤモンドを上げる方法はあるのでしょうか?自動的に数式の末尾に揃えて(またはほぼ揃えて)いますか? 次のようになります (私は を使用しました\tag*{\diamond}):

ここに画像の説明を入力してください

\documentclass[letterpaper,11pt]{book}
\usepackage[english]{babel}
\usepackage[T1]{fontenc}

\usepackage{amsmath}
\usepackage{dsfont}

%im using this font (in case it is important)
\usepackage{tgbonum}
\newcommand\hmmax{0}
\newcommand\bmmax{0}
\usepackage{helvet}
\renewcommand{\familydefault}{\sfdefault}

%using the package amsthm to define theorems lemmas, corolaries etc.
\usepackage{amsthm}
\newtheorem{thrm1}{Theorem}[section]
\newtheorem{remark1}[thrm1]{Remark}
\newtheorem{prop1}[thrm1]{Proposition}

%this new commands let me end every statment of a theorem, remark or proposition with any symbol, in this case i'm using "$\diamond$"

\newcommand{\thmsymbol}{$\diamond$}

\newenvironment{thrm}{\begin{thrm1}%
  \renewcommand{\qedsymbol}{\thmsymbol}\pushQED{\qed}}%
  {\popQED\end{thrm1}}
  
\newenvironment{remark}{\begin{remark1}%
  \renewcommand{\qedsymbol}{\thmsymbol}\pushQED{\qed}}%
  {\popQED\end{remark1}}

\newenvironment{prop}{\begin{prop1}%
  \renewcommand{\qedsymbol}{\thmsymbol}\pushQED{\qed}}%
  {\popQED\end{prop1}}
\begin{document}



\section*{So, my problem is the following.}

\begin{thrm} Every end of a theorem, proposition, remark etc, is marked with the symbol ``$\diamond$''.
\end{thrm}
\begin{remark}
As you can see, the diamond symbol is positioned immediately at the end of the sentence. I mean, it is just right here $\rightarrow\rightarrow\rightarrow\rightarrow\rightarrow$
\end{remark}

\section*{My problem is when I use math mode}

\begin{prop} When I use math mode, the position of the $\diamond$ is too low
    $$\int_0^1 x \, dx = \frac{1}{2} \quad \text{i mean, it goes waaaay down: } \rightarrow\rightarrow\rightarrow\rightarrow\rightarrow\rightarrow\rightarrow \searrow $$
\end{prop}

My question is: \textbf{is there some way to get the diamond up, automatically?} aligned (or almost aligned) with the end of the math expression, something like this:

\begin{prop1} Here is Euler's formula 
\begin{align*}
e^{ix} = \cos (x) + i \sin (x) \quad\quad \forall x \in \mathds{R} \tag*{$\diamond$}
\end{align*}
\end{prop1}
And I can continue without any problem, instead of dealing with: 
\begin{prop} Here is Euler's formula 
\begin{align*}
e^{ix} = \cos (x) + i \sin (x) \quad\quad \forall x \in \mathds{R} 
\end{align*}
\end{prop}
\noindent Too much space between the math expression and the diamond symbol!

\end{document}

答え1

\qedhereQED シンボルを数式表示内またはリストの末尾 (enumerateまたはitemize)に表示する必要がある場合に使用します。

しかし、あなたはしてはいけない使用法$$:参照\[ ... \] が $$ ... $$ よりも好ましいのはなぜですか?ここでは単に「好ましい」というだけではなく、重要なamsmath標準的な表示環境であれば、が受け入れられます\qedhere

\documentclass[letterpaper,11pt]{book}
\usepackage{amsmath}
\usepackage{amsthm}

\newtheorem{thrm1}{Theorem}[section]
\newtheorem{remark1}[thrm1]{Remark}
\newtheorem{prop1}[thrm1]{Proposition}

\newcommand{\thmsymbol}{$\diamond$}

\newenvironment{thrm}{\begin{thrm1}%
  \renewcommand{\qedsymbol}{\thmsymbol}\pushQED{\qed}}%
  {\popQED\end{thrm1}}
  
\newenvironment{remark}{\begin{remark1}%
  \renewcommand{\qedsymbol}{\thmsymbol}\pushQED{\qed}}%
  {\popQED\end{remark1}}

\newenvironment{prop}{\begin{prop1}%
  \renewcommand{\qedsymbol}{\thmsymbol}\pushQED{\qed}}%
  {\popQED\end{prop1}}


\begin{document}

\section*{So, my problem is the following.}

\begin{thrm}
Every end of a theorem, proposition, remark etc, is marked with the symbol ``$\diamond$''.
\end{thrm}

\begin{remark}
As you can see, the diamond symbol is positioned immediately at the end of the sentence. 
I mean, it is just right here $\rightarrow\rightarrow\rightarrow\rightarrow\rightarrow$
\end{remark}

\section*{My problem is when I use math mode}

\begin{prop}
When I use math mode correctly, the position of the $\diamond$ is perfect
\[
\int_0^1 x \, dx = \frac{1}{2} \qedhere
\]
\end{prop}

\end{document}

文書の関連部分のみを残しました。

ここに画像の説明を入力してください

関連情報