1

Maybe what I want is sinful, but let me explain:

I use aligned* environments, because I usually don't need equation numbers. When I need one, I use \addtocounter{equation}{1}\tag{\theequation} from align* but show one equation number at the end.

Furthermore, I don't use the proof environment, but just set my own tombstones at the end of equations. In align* this works nicely with \tag*{\qedsymbol}.

Now I need one equation number for a whole set of equations, like in How to get only one vertically centered equation number in align environment with two equations, but still want my self-made tombstone. I like the split solution, but all solutions clash with either my tombstone or my equation numbering.

Here is an MWE (or rather not, since the tombstone is missing):

\documentclass{article}
\usepackage{amsmath}
\newcommand\numberthis{\addtocounter{equation}{1}\tag{\theequation}}
\def\tombstone{\tag*{\qedsymbol}}
\begin{document}

\begin{align*}
\begin{split}
T(n)              = {} & 2T(n/2) + 3n/2  \\
                    {} & \vdots \\
                  = {} & 3n/2 \cdot \log_2n .   %\tombstone
\end{split} \label{fftcost} \numberthis 
\end{align*}

\end{document}

Can anybody tell me how to get one equation number for all equations and still have my tombstone?

1

Takes a bit of work but I like this one better. Not a big fan of those home made tombstone constructions.

\documentclass{article}
\usepackage{amsmath,amssymb,mathtools}
\usepackage[ntheorem]{empheq}
\usepackage[amsmath,thmmarks]{ntheorem}
\theoremstyle{nonumberplain}
\theoremheaderfont{\normalfont\itshape}
\theorembodyfont{\normalfont}
\theoremsymbol{\ensuremath\square}
\newtheorem{proof}{Proof}
\begin{document}
\begin{proof}
\begin{empheq}{gather}
\begin{split}
T(n)              = {} & 2T(n/2) + 3n/2  \\
{} & \vdots \\
= {} & 3n/2 \cdot \log_2n .  %\tombstone
\end{split} \label{fftcost}
\end{empheq}
\end{proof}
\end{document}

enter image description here

ntheorem has some placing issues on some cases, but empheq fixes those. One cannot use \intertext inside empheq though

  • there's a reason why ams document classes default to having equation numbers on the left. – barbara beeton Jun 21 '13 at 15:32
  • Sorry Barbara, but I don't know anyone who likes having the numbers on the left. It disrupts the natural reading flow. – daleif Jun 24 '13 at 8:10

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.