1

As the title tries to make clear, I have two equations that I want to present in the same line, using the multicolumn package:

\begin{multicols}{2}
    \begin{equation}
        \frac{1}{2h} \cdot 
        \begin{bmatrix*}[r]
            -1 & 0 &  1
        \end{bmatrix*}
        \label{eq:dfdx}
    \end{equation}
    \begin{equation}
        \frac{1}{2h} \cdot 
        \begin{bmatrix*}[r]
             1 &
             0 &
             -1 
        \end{bmatrix*}^\top
    \label{eq:dfdy}
    \end{equation}
\end{multicols}

As a result, I get the first equation a little bit farther from the text that come before it, while the second one keep the distance observe in the rest of the document:

enter image description here

I'm wondering why this is happening and how to fix it. If I put a break after the first equation, the two of them stay aligned with each other, but keeping the vertical position of the first equation. However, this makes me lose space. They should keep the vertical position of the second equation.

Thank you.

2

The problem is due to the indentation of the "paragraph" of the first equation. You should never start a new paragraph with an equation.

Anyway a noindent solves it all

\documentclass{article}
\usepackage{amsmath,mathtools}
\usepackage{multicol}

\begin{document}
\begin{multicols}{2}
\noindent
    \begin{equation}
        \frac{1}{2h} \cdot 
        \begin{bmatrix*}[r]
            -1 & 0 &  1
        \end{bmatrix*}
        \label{eq:dfdx}
    \end{equation}
    \begin{equation}
        \frac{1}{2h} \cdot 
        \begin{bmatrix*}[r]
             1 &
             0 &
             -1 
        \end{bmatrix*}^\top
    \label{eq:dfdy}
    \end{equation}
\end{multicols}
\end{document}

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.