I checked the earlier posts for the solution to my question, but it doesn't seem to be there; so here it is:
Suppose I have an equation
Code: Select all
\[
E = m c^2
\]
Could anyone please help?
Best regards,
- D.
Code: Select all
\[
E = m c^2
\]
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
Code: Select all
\documentclass{article}
\usepackage[leqno]{amsmath}
\usepackage{amsthm}
\makeatletter
% queequation only makes sense with the leqno option for amsmath
\newenvironment{qedequation}{%
\pushQED{\qed}%
\incr@eqnum
\mathdisplay@push
\st@rredfalse \global\@eqnswtrue
\mathdisplay{equation}%
}{%
\endmathdisplay{equation}%
\mathdisplay@pop
\ignorespacesafterend
\popQED\@endpefalse
}
\newenvironment{qedequation*}{%
\pushQED{\qed}%
\mathdisplay@push
\st@rredtrue \global\@eqnswfalse
\mathdisplay{equation*}%
}{%
\endmathdisplay{equation*}%
\mathdisplay@pop
\ignorespacesafterend
\popQED\@endpefalse
}
\makeatother
\begin{document}
\begin{qedequation}
E = m c^2\qedhere
\end{qedequation}
\begin{qedequation*}
E = m c^2\qedhere
\end{qedequation*}
\end{document}
dnemoc wrote: Suppose I have an equationand I want a $\Diamond$ (or any other for that matter,) symbol at the end of the displayed equation flushed right. My numbering scheme has equation numbers at the left, so the standard trick of using \tag*{$\Diamond$} at the end of the equation does not work. There must be a way to do this, but it's just not working with \hfill, etc. Fine-tuning with \vspace both to the left and right of the displayed equation is also not a good way to go.Code: Select all
\[ E = m c^2 \]
Code: Select all
\documentclass{article}
\usepackage[leqno]{amsmath}
\usepackage{amsthm}
\begin{document}
\noindent\rule{\linewidth}{1pt}
\begin{flalign}
&& E = m c^2 &&\qed
\end{flalign}
\begin{flalign*}
&& E = m c^2 &&\qed
\end{flalign*}
\end{document}
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis