# Reducing space between equation and number

I would like to reduce the space between an equation and its corresponding number, since the equation is long enough that the number runs over into its own line when the document is compiled in a two-column format. I have used the flalign environment to reduce the amount of space on the left hand size, but there's still lots of space on the right-hand side. Any thoughts?

Here's a minimal working example:

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

\begin{document}

\begin{flalign}
\dot{m}_a\!\frac{dx}{L_x}c_{p,a}T_a & =\! -U_o(T_a-T_r)dA_o & \\
\dot{m}_rdh_r &\! =\! -\dot{m}_ac_{p,a}\frac{dx}{L_x}\left[T_a(x,L_y)\! -\! T_a(x,0)\right], &
\end{flalign}

\end{document}
• So you are not compiling in a two-column environment? – Werner Dec 15 '16 at 20:26
• It would really help if you made this into a minimal working example by including \documentclass and \begin\end{document}. That might clarify the two-column question, and would help us understand which space you're trying to reduce. – Teepeemm Dec 15 '16 at 20:32
• I am compiling it in a two-column environment; the equation is presently too wide for to fit in the given \columnwidth. – user424211 Dec 15 '16 at 20:32
• Here's a minimal working example. – user424211 Dec 15 '16 at 20:35

You can make the longest (second) equation marginally shorter to make the content fit by adding a negative space, say \hspace{-.5em}:

\documentclass[twocolumn]{article}

\usepackage{amsmath,lipsum}

\begin{document}

\lipsum*[1]
\begin{flalign}
\dot{m}_a\!\frac{dx}{L_x}c_{p,a}T_a &=\! -U_o(T_a-T_r)dA_o \\
\dot{m}_rdh_r &= -\dot{m}_ac_{p,a}\frac{dx}{L_x}\bigl[T_a(x,L_y)\! -\! T_a(x,0)\bigr], \hspace{-.5em}
\end{flalign}
\lipsum[2]

\end{document}
• Perfect! I didn't realize that \hspace would help me out with the autonumbering. Thanks! – user424211 Dec 15 '16 at 20:40
• what is the purpose of the & at the end of each line, other than that was in the original example? it will only serve to require a wider space at the right-hand end. – barbara beeton Dec 15 '16 at 21:39
• @barbarabeeton: Correct. I removed that, as well as the previously mis-aligned spacing around the second equation =. – Werner Dec 15 '16 at 21:43

Don't align at the equals sign, but left. Two column typesetting requires some compromises; in this case the left-hand side in the first equation is just too big.

\documentclass[twocolumn, a4paper,10pt]{article}
\usepackage{amsmath}
\usepackage{lipsum}

\begin{document}

\lipsum*[2]
\begin{align}
& \dot{m}_a\frac{dx}{L_x}c_{p,a}T_a = -U_o(T_a-T_r)dA_o \\
& \dot{m}_rdh_r = -\dot{m}_ac_{p,a}\frac{dx}{L_x}[T_a(x,L_y) - T_a(x,0)],
\end{align}
\lipsum

\end{document}

Alternatively, use gather.

\documentclass[twocolumn, a4paper,10pt]{article}
\usepackage{amsmath}
\usepackage{lipsum}

\begin{document}

\lipsum*[2]
\begin{gather}
\dot{m}_a\frac{dx}{L_x}c_{p,a}T_a = -U_o(T_a-T_r)dA_o \\
\dot{m}_rdh_r = -\dot{m}_ac_{p,a}\frac{dx}{L_x}[T_a(x,L_y) - T_a(x,0)],
\end{gather}
\lipsum

\end{document}