# Description inside system of equations and centering

I would like to achieve the following, often used in a list of axioms.

(axiom name)                   a = 2 b + c
(membership)                 c \in Hom (E, F)
(Longish-name identity) c (a) - 2d (b) + d (b) = 0


where the mathematical expressions are centred, possibly with equation numbers.

This can be poorly implemented by

1. setting left equation numbering throughout the document
2. abusing the tag to typeset the axiom name
3. using the align environment and arbitrarily placing alignment tabs (in this example, aligning the equations at =, \in and = would look awkward)

\documentclass[leqno]{article}
\usepackage{amsmath}

\begin{document}

\begin{align}
a = 2 & b + c                \tag*{(axiom name)} \\
c \in Hom & (E, F)           \tag*{(membership)} \\
c (a) - 2d (b) & + d (b) = 0 \tag*{(Longish-name identity)}
\end{align}

\end{document}


All of the above points have disadvantages:

1. the side of the equation numbering is fixed throughout the document
2. the equations can't have equation numbers
3. the equations aren't centred perfectly.

so there ought to be a better way.

I would be fine to set the width of the text to 0 and inserting manual space to push the equation enough not to overlay the (description)s.

• in a comment to one of the answers, you say that you also want equation numbers at the right. please add that to the question -- it's very useful, even essential, information. – barbara beeton Sep 29 '17 at 17:42

Use \rlap and a gather* environment. Note Hom should not be italic; it should actually be typed as a math operator:

\documentclass[leqno]{article}
\usepackage[showframe]{geometry}
\usepackage{amsmath}
\DeclareMathOperator{\Hom}{Hom}

\begin{document}

\begin{gather*}
a = 2 b + c \tag*{\rlap{(axiom name)}} \\
c \in \Hom (E, F) \tag*{\rlap{(membership)}} \\
c (a) - 2d (b) + d (b) = 0 \tag*{\rlap{(Longish-name identity)}}
\end{gather*}

\end{document}


If you don't want to set the leqno option, you can obtain the same result with the \flalign(*) environment and the eqparbox package. This package defines an \eqmakebox[some tag}{...} command, for which the width argument is replaced with a tag; all \eqmakebox sharing the same tag have the width of the widest contents. So I defined an \eqmathbox command, with its contents in math mode:

\documentclass{article}%[leqno]
\usepackage[showframe]{geometry}
\usepackage{eqparbox}
\newcommand{\eqmathbox}[2][Form]{\eqmakebox[#1]{$\displaystyle#2$}}
\usepackage{amsmath}
\DeclareMathOperator{\Hom}{Hom}

\begin{document}

\begin{flalign}
& \rlap{(axiom name)} &\eqmathbox{a = 2 b + c }& & & \\
& \rlap{(membership)} &\eqmathbox{c \in \Hom (E, F)} & \\
& \rlap{(Longish-name identity)} &\eqmathbox{c (a) - 2d (b) + d (b) = 0}&
\end{flalign}

\end{document}


• Do you see a way to keep using equation numbers on the right? (Preferably not using \tag at all.) – Earthliŋ Sep 29 '17 at 15:53
• Yes. It's a little more complex. I'll post a solution in a moment. – Bernard Sep 29 '17 at 15:58

Do you mean something like this?

\documentclass{article}
\usepackage{amsmath}
\usepackage{IEEEtrantools}

\usepackage{lipsum} % for context

\DeclareMathOperator{\Hom}{Hom}

\begin{document}

\lipsum*[3]
\begin{IEEEeqnarray}{- s ' c * c * c}
(axiom name)            && a = 2 b + c \\
(membership)            && c \in \Hom (E, F) \\
(Longish-name identity) && c (a) - 2d (b) + d (b) = 0
\end{IEEEeqnarray}
\lipsum[4]

\end{document}


A description of IEEEeqnarray is available with texdoc IEEEtran. If you don't want numbers, then use IEEEeqnarray*, with the same syntax.

• This is exactly what I am looking for. However, since IEEEtrantools is not preinstalled in my TeX distro, I fear that the same may be true for my coauthors, so this would be a no-go for documents that are used in collaboration (especially, since it is a simple alignment issue, not a special package that allows one to typeset knots, say). – Earthliŋ Sep 29 '17 at 16:00
• @Earthliŋ Doing partial installations made sense a couple of decades ago, when disk space was expensive. – egreg Sep 29 '17 at 16:07

A tabular would be a better option:

\documentclass[leqno]{article}
\usepackage{amsmath}

\begin{document}

\begin{tabular}{l p{2cm} c}
(axiom name) & & $a = 2 + c$\\
membership && $c \in Hom (E, F)$\\
(Longish-name identity) && $c (a) - 2d (b) + d (b) = 0$
\end{tabular}

\end{document}


Output: