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 Answer 1

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

2
  • there's a reason why ams document classes default to having equation numbers on the left. Commented Jun 21, 2013 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
    Commented Jun 24, 2013 at 8:10

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .