![如何局部减小方程与其数字标签之间的距离](https://linux22.com/image/347656/%E5%A6%82%E4%BD%95%E5%B1%80%E9%83%A8%E5%87%8F%E5%B0%8F%E6%96%B9%E7%A8%8B%E4%B8%8E%E5%85%B6%E6%95%B0%E5%AD%97%E6%A0%87%E7%AD%BE%E4%B9%8B%E9%97%B4%E7%9A%84%E8%B7%9D%E7%A6%BB.png)
IEEEconf
我在两列模板中遇到过如下情况:
\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 代码的结果:
答案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
标记。
答案2
添加一些负空间
\begin{equation}
\hspace{-2em}
\begin{cases}
...
\end{cases}
\hspace{-2em}
\end{equation}
\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}
答案4
(更新了答案,使用 Times Romannewtxtext
和newtxmath
字体包,而不是有些过时的mathptmx
包。)
通过使用较新的newtxtext
Times newtxmath
Roman 字体包代替mathptmx
,可以节省足够的空间,让您使用明显更窄的minipage
环境 - 在minipage
环境之间提供更多分隔
为了简化等式中的代码,答案设置了一个自定义宏,称为\ddfrac
,它会自动以显示样式排版分子和分母材料。
为了增加可读性,您可能还需要使用(a)dcases
环境而不是cases
环境和(b)一些\mathstrut
指令来增加分数线和相应分母中的材料之间的空间。
\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}