如何局部减小方程与其数字标签之间的距离

如何局部减小方程与其数字标签之间的距离

IEEEconf我在两列模板中遇到过如下情况:

enter image description here

\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 [email protected]}}%
}

\begin{document}

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

\begin{abstract}

ABSTRACT

\end{abstract}

\section{INTRODUCTION}

\noindent\begin{minipage}{.5\linewidth}
\begin{equation}
  \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{equation}
\end{minipage}%
\begin{minipage}{.5\linewidth}
\begin{equation}
    \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{equation}
\end{minipage}

\end{document}

我要减小右方程与其标签(即 (3))之间的距离,以使所有内容都位于一条直线上。

实现这一目标的最佳方法是什么?

更新 1:@Zarko 代码的结果:

enter image description here

答案1

方程编号与方程之间有最小距离,但在 TeXbook 的练习 19.8 中有一个巧妙的技巧。

\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 [email protected]}}%
}

\begin{document}

\maketitle

\lipsum[2]\nopagebreak
\noindent
\begin{minipage}{.45\linewidth}
\begin{equation}
  \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{equation}
\end{minipage}\hspace{.1\linewidth plus 4pt}%
\begin{minipage}{.45\linewidth}
\begin{equation}
    \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{equation}
\end{minipage}\nopagebreak\vspace{\belowdisplayskip}%
\lipsum[3]

\end{document}

我曾经lipsum在方程式前后模拟一些文本。请注意如何获得与正常equation环境相同的间距,前后没有中断。

诀窍是插入一大块水平胶水,它可以尽可能缩小:

\hspace{10000pt minus 1fil}

我还减少了小页面的宽度,以避免左侧方程式编号太靠近右侧的部分。

还请注意\dfrac,而不是所有这些\displaystyle标记。

enter image description here

答案2

添加一些负空间

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

enter image description here

\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 [email protected]}}%
}

\begin{document}

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

\begin{abstract}

ABSTRACT

\end{abstract}

\section{INTRODUCTION}

\noindent\begin{minipage}{.5\linewidth}
\begin{equation}
  \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{equation}
\end{minipage}%
\begin{minipage}{.5\linewidth}
\begin{equation}
  \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{equation}
\end{minipage}

\end{document}

答案3

编辑:由于问题具有误导性,第一个答案版本被容纳在一列文档中。当然与此同时,在编辑问题之后,出现了其他答案......

减少小页的宽度,并将它们分开,\hfill并减少方程式和方程式编号之间的空间\hspace{-1em}

\documentclass{article}
\usepackage{mathtools}

\begin{document}

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

\noindent\begin{minipage}{.48\linewidth} % <-- reduced minipage width
\begin{equation}
  \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{equation}
\end{minipage}\hfill % <-- added to push minipages appart
\begin{minipage}{.48\linewidth} % <-- reduced minipage width
\begin{equation}
    \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{equation}
\end{minipage}
\end{document}

enter image description here

答案4

(更新了答案,使用 Times Romannewtxtextnewtxmath字体包,而不是有些过时的mathptmx包。)

通过使用较新的newtxtextTimes newtxmathRoman 字体包代替mathptmx,可以节省足够的空间,让您使用明显更窄的minipage环境 - 在minipage环境之间提供更多分隔

为了简化等式中的代码,答案设置了一个自定义宏,称为\ddfrac,它会自动以显示样式排版分子和分母材料。

为了增加可读性,您可能还需要使用(a)dcases环境而不是cases环境和(b)一些\mathstrut指令来增加分数线和相应分母中的材料之间的空间。

enter image description here

\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{equation}
  \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{equation}
\end{minipage}\hfill
\begin{minipage}{.45\columnwidth}
\begin{equation}
    \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{equation}
\end{minipage}

\end{document}

相关内容