3

So this is my code:

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

\begin{document}
Random text
\begin{multicols}{2}
    \noindent\begin{gather}
        T_{1}=0.005 sec\notag\\
        A_{1}=35.35rpm\notag
    \end{gather}\break
    \begin{gather}
        T_{2}=0.025 sec\notag\\
        A_{2}=11.5rpm\notag
    \end{gather}
\end{multicols} 
\end{document}

As you can see, T_{1} and T_{2} are not horizontally aligned and the same for A_{1} and A_{2}, how can i solve?

Here is the problem: enter image description here

2
  • 1
    Use \columnbreak , not \break. The latter breaks the line (which is the extra space you see above T2)
    – Troy
    Commented Aug 30, 2017 at 8:48
  • Solved. If you want make it as an answer.
    – me8
    Commented Aug 30, 2017 at 8:49

2 Answers 2

2

The multicol package documentation lists the command for manual breaking across columns with \columnbreak, not \break (which is what I assume you want to do).

The latter 'breaks' the line, which is the extra space you see above T2.

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

\begin{document}
Random text
\begin{multicols}{2}
    \noindent\begin{gather}
        T_{1}=0.005 sec\notag\\
        A_{1}=35.35rpm\notag
    \end{gather}\columnbreak % <------------
    \begin{gather}
        T_{2}=0.025 sec\notag\\
        A_{2}=11.5rpm\notag
    \end{gather}%
\end{multicols} 
\end{document}

enter image description here

2

I don't think you really want multicols:

\documentclass{article}
\usepackage{amsmath,siunitx}

\usepackage{lipsum} % for text

\DeclareSIUnit{\rpm}{rpm}

\begin{document}

\lipsum*[2]
\begin{align*}
T_{1} &= \SI{0.005}{\second} & T_{2} &= \SI{0.025}{\second} \\
A_{1} &= \SI{35.35}{\rpm}    & A_{2} &= \SI{11.5}{\rpm}
\end{align*}
\lipsum[3]

\end{document}

Note that the official symbol for the second is “s”. You can change it for siunitx, if you really need to.

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .