[Tex/LaTex] Vertical alignment of equations

vertical alignment

I'm trying to put three equations in the same line.

I used the tabularx package as was advised by this post: How to place and number 3 short equations in one line?.

However since I am using equation with different heights, they do not align well vertically.

I manage to solve this using \vspace but I would like to know if there is a more elegant solution. Here is the code I used:

\documentclass[11pt,a4paper]{article}
\usepackage{amsmath}
\usepackage{tabularx}
\usepackage[margin=0.25in]{geometry}
\begin{document}

\noindent\begin{tabularx}{\textwidth}{@{}XXX@{}}
  \vspace{0.1mm}
  \begin{equation}
    Euc(P,Q)= \left( \sum_{i=1}^n \left| p_i - q_i \right|^2 \right)^{1/2}
    \label{eqn:1}
  \end{equation} &
  \vspace{1.5mm}
  \begin{equation}
    Canb(P,Q)=\sum_{i=1}^n \frac{|p_i-q_i|}{|p_i|+|q_i|}
    \label{eqn:2}
  \end{equation} &
  \vspace{5.8mm}
  \begin{equation}
    Man(P,Q)=\sum_{i=1}^n |p_i-q_i|
    \label{eqn:3}
  \end{equation}
\end{tabularx}
\end{document}

enter image description here

Best Answer

To place three numbered equations next to one another, you could use the multicols environment, which is provided by the multicol package. In the example below, using this environment makes it unnecessary to fiddle with various tabular-like environments or experiment with \vspace adjustments.

enter image description here

Incidentally, using \left( ... \right) to enclose a summation symbol with limits tends to generate parentheses that are far too large, typographically speaking. Better to use \biggl( ... \biggr) in such cases. (This is not only my prescription; you may find it in the TeXbook as well.)

\documentclass[11pt,a4paper]{article}
\usepackage{mathtools,multicol}
\DeclarePairedDelimiter{\abs}{\lvert}{\rvert}
\DeclareMathOperator{\Euc}{Euc}
\DeclareMathOperator{\Canb}{Canb}
\DeclareMathOperator{\Man}{Man}
\usepackage[margin=0.4in]{geometry}
\begin{document}
\begin{multicols}{3}
\begin{equation}
\Euc(P,Q)= \biggl( \sum_{i=1}^n \abs{ p_i - q_i }^2 \biggr)^{1/2}
    \label{eqn:1}
\end{equation}

\begin{equation}
\Canb(P,Q)=\sum_{i=1}^n \frac{\abs{p_i-q_i}}{\abs{p_i}+\abs{q_i}}
    \label{eqn:2}
\end{equation}

\begin{equation}
\Man(P,Q)=\sum_{i=1}^n \abs{p_i-q_i}
    \label{eqn:3}
\end{equation}
\end{multicols}
\end{document}
Related Question