# How do I align equations in a multicols environment

I use the following code

\begin{multicols}{2}
\noindent

$$F_{besch}=m_{fzg} \cdot a_{trans} \label{eq:trans}$$

$$M_{besch}=\sum_{n=1}^{n}J_{n} \cdot \dot{\omega}_{n} \label{eq:rot}$$
\end{multicols}


to write two equations in one line.

As it can be seen in the picture, the equations are not exactly aligned (propably due to the sum).

How can they be aligned?

• Welcome to TeX SX! Please post a full compilable code, not just a snippet – moreover incomplete. – Bernard Aug 20 '18 at 9:02
• do you usemulticols just to this two equation that they be parallel)? – Zarko Aug 20 '18 at 9:09

You can use two minipages side by side and a \vphantom in the l.h.s. equation. As your indices look like words, it's better to type them as text.

\documentclass[11pt,a4paper]{article}
\usepackage{amsmath}

\begin{document}

\noindent\begin{minipage}{0.49\linewidth}
$$F_\text{besch}=m_{fzg} \cdot a_\text{trans}\vphantom{\sum_{n=1}^{n}J_{n}} \label{eq:trans}$$
\end{minipage}
\hfill
\begin{minipage}{0.48\linewidth}
$$M_\text{besch}=\sum_{n=1}^{n}J_{n} \cdot \dot{\omega}_{n} \label{eq:rot}$$
\end{minipage}

\end{document}


• I would encase "fzg" in a \text directive as well. – Mico Aug 20 '18 at 9:30
• @Mico: I wondered, and thought maybe it's the product of three variables. – Bernard Aug 20 '18 at 9:33

Using multicols for this is not simple, because of various vertical skips that are added. I would suggest a couple of minipages:

\documentclass{article}

\usepackage{amsmath,multicol}

\begin{document}

Text
\begin{center}
\begin{minipage}[b]{.45\textwidth}
$$F_{\mathit{besch}}=m_{\mathit{fzg}} \cdot a_{\mathit{trans}} \label{eq:trans}$$
\end{minipage}
\begin{minipage}[b]{.45\textwidth}
$$M_{\mathit{besch}}=\sum_{n=1}^{n}J_{n} \cdot \dot{\omega}_{n} \label{eq:rot}$$
\end{minipage}
\end{center}

\end{document}


Notice the b alignment option to align baselines.

I have also added \mathit to your multi-letter supbscripts for better spacing; \mathrm may be actually more appropriate depending on the context.

• Is the center environment needed? For sure, it will add extra vertical padding, which may not be desirable? – Mico Aug 20 '18 at 9:34
• @Mico Depends on what alignment the OP wants. Less vertical space would be added by \noindent\begin{tabular}{c}...\end{tabular} instead of \begin{center}...\end{center} – Andrew Swann Aug 20 '18 at 9:51

I think you're abusing the multicols environment. Consider using two side-by-side minipage environments -- each of width 0.45\textwidth -- instead.

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{amsmath}
\numberwithin{equation}{section} % just for this example
\newcommand{\vn}[1]{\mathit{#1}} % to typeset variable names
\usepackage{newtxtext,newtxmath} % optional

\begin{document}
\setcounter{section}{2}  % just for this example
\setcounter{equation}{3} % just for this example

\hrule % just to illustrate width of text block
\noindent
\begin{minipage}{0.45\textwidth}
$$\label{eq:trans} F_{\vn{besch}}=m_{\vn{fzg}} \cdot a_{\vn{trans}} \vphantom{\sum_1^n} % to balance heights of formulas across the equations$$
\end{minipage}
\hfill % maximize horiz. separation between the 'minipage' environments
\begin{minipage}{0.45\textwidth}
$$\label{eq:rot} M_{\vn{besch}}=\sum_{n=1}^n J_n \cdot \dot{\omega}_n$$
\end{minipage}
\end{document}


I guess that you'd like to have just these two equations in parallel. For this, it is better suited to use a tabular environment with the m column type (from the package array):

(red lines indicate text borders)

\documentclass{article}
\usepackage{array}

\begin{document}
\noindent%
\begin{tabular}{@{} *2{m{\dimexpr0.5\linewidth-\tabcolsep}} @{}}
$$F_\mathit{besch}=m_\mathit{fzg} \cdot a_\mathit{trans} \label{eq:trans}$$
&
$$M_\mathit{besch}=\sum_{n=1}^{n}J_{n} \cdot \dot{\omega}_{n} \label{eq:rot}$$
\end{tabular}
\end{document}