# Issue with align/alignat and equations

I would appreciate help with this.

I'm trying to align a couple of equations but am having some issues. 1. With this code shouldn't the \wedge be properly aligned with the >. This happens for both alignat and align.

My objective would be to align these and have equal spacing between them and the expressions on either side.

   if        d > d                25
then        M > eta              26
with  bla bla A O(bla bla)       27


\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}

\begin{document}

\begin{alignat}{5}
\label{eq:test}
\end{alignat}

\begin{align}
\label{eq:test}
\end{align}
\end{document}


• Welcome to TeX.SX! You can help us to help you by providing the code for a small compilable document that shows your problem called MWE. Just edit your question and add missing code.- Which alignment do you want to achieve? – Bobyandbob Feb 15 '18 at 17:10
• "My objective would be to align these and have equal spacing between them and the expressions on either side." So pretty much get the edit on the question. Thanks in advance! – CMichael Feb 15 '18 at 17:40

I'm not sure whether such alignments carry any meaning.

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{amsmath,amssymb}

\newcommand{\pder}[2]{\frac{\partial #1}{\partial #2}}

\begin{document}

\begin{alignat}{2}
\text{with} &\quad& 0 \le \eta_2 \le 1 &\mathrel{\wedge}
\end{alignat}

\end{document}


• Worked, thanks! I see now there were a lot of issues with using too many alignments in my case. Set as answer. Just a question if you don't mind, isn't the number inside alignat{#} supposed to be, according to the documentation, the number of rl pais? – CMichael Feb 15 '18 at 18:07
• @CMichael Yes, here we have got two pairs. – egreg Feb 15 '18 at 18:09
• My bad, was still partially thinking on my example in which I abused the alignments. Thank you so much! – CMichael Feb 15 '18 at 18:15

The eqparbox package can help. Is this what you want? (I find the spacing a little weird…)?

\documentclass[11pt]{article}
\usepackage{amssymb}
\usepackage{makebox}
\usepackage{mathtools, nccmath}

\usepackage{eqparbox}

\newcommand\eqmathbox[2][M]{\eqmakebox[#1]{$\displaystyle{}#2{}$}}

\begin{document}

\begin{alignat}{5}
\label{eq:test}
\end{alignat}

\begin{align}
\label{eq:test}
\end{align}

\end{document}


• Thanks, did not know such a package existed! If you don't mind, is there also any way to align both sets of symbols using eqmathbox? – CMichael Feb 15 '18 at 18:03
• @CMichael: Do you mean aligning the symbols in align and in alignat? – Bernard Feb 15 '18 at 18:21
• Yes, if possible, but perhaps across alignats would be sufficient in my case. I'm trying with a different alignat one with {2} and one with {3} and, thus far, they do not appear to align. – CMichael Feb 15 '18 at 18:24
• You can group them as a unique alignat{3}, with one of them having one empty column. Hard to say more without having the exact example. The way eqparbox works is that it uses a tag instead of a width, so that all \eqparboxes sharing the same tag have the width of the widest contents. – Bernard Feb 15 '18 at 18:26

with align:

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{amsmath,amssymb}

\begin{document}
\begin{align}
\label{eq:test}
\mathrm{iff}  &&
\frac{\partial L}{\partial\eta_2}\     > &\ \dfrac{\partial L}{\partial M}  &&\\
\mathrm{then}  &&
M\                                     > &\ \sigma\eta_2                    &&\\
\mathrm{with}  &&0
\le \eta_2 \le 1\                \wedge  &\ \mathrm{O}(\sigma)\le 1\quad \blacksquare &&
\end{align}
\end{document}


• Thank you. If you don't mind, could you explain the usage of the "&\" I'm finding it but haven't found an explanation on it thus far. – CMichael Feb 15 '18 at 18:10
• @CMichael, &\  gives space of one letter after &. i used it instead of your &\quad. – Zarko Feb 15 '18 at 18:14
• the wider spaces to the left of the greater-than signs emphasize the fact that the wedge is \mathbin and not \mathrel. the latter fact is the crux of the problem. – barbara beeton Feb 15 '18 at 18:49
• Yet it fails to produce even spacing on both sides. There's more on the right than on the left. The description of the amsmath align(at) environments suggests that the & precedes the binary operators to be aligned vertically. That's why I'd prefer the solution provided by egreg. – Kai Feb 18 '18 at 21:45