# How to locally decrease the distance between an equation and its numerical label

I've faced with a situation like below in IEEEconf 2-column template:

\documentclass[letterpaper, 10pt, conference]{IEEEconf}

\usepackage{graphicx}
\usepackage{mathptmx}
\usepackage{amsmath}
\usepackage{amssymb}

\title{My Title*}

\author{Guy$^{1}$
\thanks{*This work was not supported by any organization}% <-this % stops a space
\thanks{$^{1}$Guy is with Hell, {\tt\small guy@hell.edu}}%
}

\begin{document}

\maketitle
\thispagestyle{empty}
\pagestyle{empty}

\begin{abstract}

ABSTRACT

\end{abstract}

\section{INTRODUCTION}

\noindent\begin{minipage}{.5\linewidth}
$$\begin{cases} \theta_{i}^{h^{-}} = \frac{\displaystyle 2(i-1)\pi}{\displaystyle m_{c}^{\hat{x}}}\\ \theta_{i}^{h^{+}} = \frac{\displaystyle 2i\pi}{\displaystyle m_{c}^{\hat{x}}}\\ \end{cases}$$
\end{minipage}%
\begin{minipage}{.5\linewidth}
$$\begin{cases} \theta_{j}^{v^{-}} = \frac{\displaystyle 2(j-1)\pi}{\displaystyle m_{c}^{\hat{v}}}\\ \theta_{j}^{v^{+}} = \frac{\displaystyle 2j\pi}{\displaystyle m_{c}^{\hat{v}}}\\ \end{cases}$$
\end{minipage}

\end{document}


I'm gonna decrease the distance between right equation with its label (i.e. (3)), such that everything will be placed in a straight line.

What is the best approach to do that?

Update 1: result of @Zarko's code:

• If you need it for a two-column format, then you should post a document in two-column format. – gernot Jan 15 '17 at 0:26
• @gernot: The MWE is for two-column scenario, now. – Roboticist Jan 15 '17 at 0:30
• since you're using amsmath, there is a command \raisetag{,dimen>} that can be applied if a tag is moved away from its "normal" position, which this one is. try \raisetag{1.5\baselineskip} just before the second . documented in texdoc amsmath, section 3.8. – barbara beeton Jan 15 '17 at 20:50

The equation number has a minimum distance from the equation, but there's a slick trick in exercise 19.8 of the TeXbook.

\documentclass[letterpaper, 10pt, conference]{IEEEconf}  % Comment this line out if you need a4paper

\usepackage{graphicx} % for pdf, bitmapped graphics files
\usepackage{mathptmx} % assumes new font selection scheme installed
\usepackage{amsmath} % assumes amsmath package installed
\usepackage{amssymb}  % assumes amsmath package installed
\usepackage{amsthm}
\usepackage{lipsum}

\renewcommand{\qedsymbol}{$\blacksquare$}

\newtheorem{thm}{Theorem}[section]
\newtheorem{lem}[thm]{Lemma}
\newtheorem{prop}[thm]{Proposition}
\newtheorem{cor}{Corollary}
\newtheorem{conj}{Conjecture}[section]
\theoremstyle{definition}
\newtheorem{defn}{Definition}[section]
\newtheorem{exmp}{Example}[section]
\newtheorem{rem}{Remark}

\title{My Title*}

\author{Guy$^{1}$
\thanks{*This work was not supported by any organization}% <-this % stops a space
\thanks{$^{1}$Guy is with Hell, {\tt\small guy@hell.edu}}%
}

\begin{document}

\maketitle

\lipsum[2]\nopagebreak
\noindent
\begin{minipage}{.45\linewidth}
$$\begin{cases} \theta_{i}^{h^{-}} = \dfrac{ 2(i-1)\pi}{ m_{c}^{\hat{x}}}\\ \theta_{i}^{h^{+}} = \dfrac{ 2i\pi}{ m_{c}^{\hat{x}}}\\ \end{cases} \hspace{10000pt minus 1fil}$$
\end{minipage}\hspace{.1\linewidth plus 4pt}%
\begin{minipage}{.45\linewidth}
$$\begin{cases} \theta_{j}^{v^{-}} = \dfrac{ 2(j-1)\pi}{ m_{c}^{\hat{v}}}\\ \theta_{j}^{v^{+}} = \dfrac{ 2j\pi}{ m_{c}^{\hat{v}}}\\ \end{cases} \hspace{10000pt minus 1fil}$$
\end{minipage}\nopagebreak\vspace{\belowdisplayskip}%
\lipsum[3]

\end{document}


I have used lipsum to emulate some text before and after the equations. Note how to get the same spacing as for a normal equation environment, with no breaks before and after.

The trick is inserting a large glob of horizontal glue, which can be shrinked as much as possible:

\hspace{10000pt minus 1fil}


I have also reduced the width of the minipages, to avoid the left equation number to be too near to the part on the right.

Note also \dfrac, rather than all those \displaystyle tokens.

• Still simpler than \dfrac: dcases. – Bernard Jan 15 '17 at 0:49
• It looks like the OP wants to typeset the numerators and denominators in display style. \dfrac doesn't quite achieve this: its numerators and denominators will be typeset in text style, not display style. – Mico Jan 15 '17 at 6:43
• @egreg I like your font. – minhthien_2016 Jan 15 '17 at 7:27
• @Mico I disagree. There is no reason for using display style in the numerator and denominator here. – egreg Jan 15 '17 at 9:41
• @toandhsp I don't. 😉I just used the same as the OP. – egreg Jan 15 '17 at 9:42

$$\hspace{-2em} \begin{cases} ... \end{cases} \hspace{-2em}$$


\documentclass[letterpaper, 10pt, conference]{IEEEconf}

\usepackage{graphicx}
\usepackage{mathptmx}
\usepackage{amsmath}
\usepackage{amssymb}

\title{My Title*}

\author{Guy$^{1}$
\thanks{*This work was not supported by any organization}% <-this % stops a space
\thanks{$^{1}$Guy is with Hell, {\tt\small guy@hell.edu}}%
}

\begin{document}

\maketitle
\thispagestyle{empty}
\pagestyle{empty}

\begin{abstract}

ABSTRACT

\end{abstract}

\section{INTRODUCTION}

\noindent\begin{minipage}{.5\linewidth}
$$\hspace{-2em} \begin{cases} \theta_{i}^{h^{-}} = \frac{\displaystyle 2(i-1)\pi}{\displaystyle m_{c}^{\hat{x}}}\\ \theta_{i}^{h^{+}} = \frac{\displaystyle 2i\pi}{\displaystyle m_{c}^{\hat{x}}} \end{cases} \hspace{-2em}$$
\end{minipage}%
\begin{minipage}{.5\linewidth}
$$\hspace{-2em} \begin{cases} \theta_{j}^{v^{-}} = \frac{\displaystyle 2(j-1)\pi}{\displaystyle m_{c}^{\hat{v}}}\\ \theta_{j}^{v^{+}} = \frac{\displaystyle 2j\pi}{\displaystyle m_{c}^{\hat{v}}} \end{cases} \hspace{-2em}$$
\end{minipage}

\end{document}


Edit: Since the question was misleading, the first answer version was accommodate to one column document. Of course meanwhile, after editing of question, appears other answers ...

Reduce width of minipages and push them apart with \hfill and reduce space between equation and equation number by \hspace{-1em}:

\documentclass{article}
\usepackage{mathtools}

\begin{document}

\noindent$|$\hrulefill\ column width\ \hrulefill$|$

\noindent\begin{minipage}{.48\linewidth} % <-- reduced minipage width
$$\begin{cases} \theta_{i}^{h^{-}} = \frac{\displaystyle 2(i-1)\pi}{\displaystyle m_{c}^{\hat{x}}}\\ \theta_{i}^{h^{+}} = \frac{\displaystyle 2i\pi}{\displaystyle m_{c}^{\hat{x}}} \end{cases}\hspace{-1em}% <-- added to reduce distance to eq. numbering apart$$
\end{minipage}\hfill % <-- added to push minipages appart
\begin{minipage}{.48\linewidth} % <-- reduced minipage width
$$\begin{cases} \theta_{j}^{v^{-}} = \frac{\displaystyle 2(j-1)\pi}{\displaystyle m_{c}^{\hat{v}}}\\ \theta_{j}^{v^{+}} = \frac{\displaystyle 2j\pi}{\displaystyle m_{c}^{\hat{v}}} \end{cases}\hspace{-1em}% <-- added to reduce distance to eq. numbering$$
\end{minipage}
\end{document}


• Thanks, but I should have said that I am using this code in a 2-column environment in IEEEconf template. Your solution actually sent both labels to inappropriate position. Please find the update. – Roboticist Jan 15 '17 at 0:20
• How do I know this? Please, in future be so kind and provide complete small document (MWE) not only code snippet ... – Zarko Jan 15 '17 at 0:42
• You are right. I do apologize due to wasting your time by that. – Roboticist Jan 15 '17 at 0:45

(Updated the answer to employ the Times Roman newtxtext and newtxmath font packages instead of the somewhat obsolescent mathptmx package.)

By using the fairly recent newtxtext and newtxmath Times Roman font package instead of mathptmx, enough space is saved to let you use significantly narrower minipage environments -- providing more separation between the minipage environments

To simplify the code in the equations, the answer sets up a custom macro, called \ddfrac, which automatically typesets the numerator and denominator material in display style.

For extra legibility, you may also want to use (a) dcases environments instead of cases environments and (b) a few \mathstrut directives to increase the space between the fraction lines and the material in the respective denominators.

\documentclass[letterpaper,conference,twocolumn]{IEEEconf}
\usepackage{newtxtext,newtxmath}% not "mathptmx"
\usepackage{mathtools,amssymb}
\newcommand\ddfrac[2]{\dfrac{\displaystyle #1}{\displaystyle #2}} % handy shortcut macro
\newcommand\Tstrut{\smash[b]{\mathstrut}} % "top strut"
\begin{document}
\hrule %  just to illustrate width of text block
\section{INTRODUCTION}

\noindent
\begin{minipage}{.45\columnwidth}
$$\begin{dcases} \theta_{i}^{h^{-}} = \ddfrac{2(i-1)\pi}{m_{c}^{\Tstrut\hat{x}}}\\ \theta_{i}^{h^{+}} = \ddfrac{2i\pi}{m_{c}^{\Tstrut\hat{x}}}\\ \end{dcases}$$
\end{minipage}\hfill
\begin{minipage}{.45\columnwidth}
$$\begin{dcases} \theta_{j}^{v^{-}} = \ddfrac{2(j-1)\pi}{m_{c}^{\Tstrut\hat{v}}}\\ \theta_{j}^{v^{+}} = \ddfrac{2j\pi}{m_{c}^{\Tstrut\hat{v}}}\\ \end{dcases}$$
\end{minipage}

\end{document}