有什么办法可以增加方程和(45)的间距吗?
以下是代码(抱歉,其中包括了所有软件包,我不确定哪个会对我的问题产生影响):
\documentclass[british,english]{scrartcl}
\usepackage[T1]{fontenc}
\usepackage[latin9]{luainputenc}
\usepackage{color}
\usepackage{babel}
\usepackage{mathtools}
\usepackage{amsbsy}
\usepackage{amstext}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage{setspace}
\usepackage{esint}
\doublespacing
\usepackage[unicode=true,pdfusetitle,
bookmarks=true,bookmarksnumbered=false,bookmarksopen=false,
breaklinks=false,pdfborder={0 0 1},backref=false,colorlinks=false]
{hyperref}
\makeatletter
\usepackage{amsmath}
\usepackage[section]{placeins}
\usepackage{algorithm,algpseudocode}
\makeatother
\begin{document}
\begin{eqnarray}
\text{min}\left(1,\frac{\pi(x_{n+1})}{\pi(x_{n})}\prod_{i=0}^{L-1}\frac{P\Big((x_{n}^{i+1})^{*},(x_{n}^{i})^{*}\Big)}{P\Big(x_{n}^{i},x_{n}^{i+1}\Big)}\right) & = & \text{min}\left(1,e^{- \beta\Delta\widetilde{H}}\right),\nonumber \\
& = & \text{min}\left(1,e^{-\beta\sum_{i=0}^{L-1}\Delta\widetilde{H}_{i}}\right),\nonumber \\
& = & \text{min}\left(1,e^{-\beta\left(\Delta U_{n}+\sum_{i=0}^{L-1}\Delta K_{BAB,i}\right)}\right),\label{eq:MH_effective_energy}
\end{eqnarray}
\end{document}
答案1
你应该绝不使用eqnarray
。
在这种情况下,更好equation
和split
。
\documentclass[british]{scrartcl}
\usepackage[T1]{fontenc}
\usepackage{color}
\usepackage{babel}
\usepackage{mathtools}
%\usepackage{amsbsy}
%\usepackage{amstext}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage{setspace}
\usepackage{esint}
\usepackage[section]{placeins}
\usepackage{algorithm,algpseudocode}
\usepackage[
%unicode=true,
pdfusetitle,
bookmarks=true,
bookmarksnumbered=false,
bookmarksopen=false,
breaklinks=false,
pdfborder={0 0 1},
backref=false,
colorlinks=false,
]{hyperref}
\doublespacing
\begin{document}
\begin{equation}
\label{eq:MH_effective_energy}
\begin{split}
\min\biggl(
1,
\frac{\pi(x_{n+1})}{\pi(x_{n})}
\prod_{i=0}^{L-1}
\frac{P\bigl((x_{n}^{i+1})^{*},(x_{n}^{i})^{*}\bigr)}
{P\bigl(x_{n}^{i},x_{n}^{i+1}\bigr)}
\biggr)
&= \min(1,e^{-\beta\Delta\tilde{H}}), \\[-1ex]
&= \min\bigl(1,e^{-\beta\sum_{i=0}^{L-1}\Delta\tilde{H}_{i}}\bigr), \\
&= \min\bigl(1,e^{-\beta(\Delta U_{n}+\sum_{i=0}^{L-1}\Delta K_{BAB,i})}\bigr),
\end{split}
\end{equation}
\end{document}
我删除了过度使用的\left
和\right
,并将 也 改为\Big
更合适的\bigl
和\bigr
配对。
如果你跟注\usepackage[tbtags]{mathtools}
,你会得到
除了手动猜测之外,\\[-1ex]
您还可以砸碎左侧的大底部:
\documentclass[british]{scrartcl}
\usepackage[T1]{fontenc}
\usepackage{color}
\usepackage{babel}
\usepackage[tbtags]{mathtools}
\usepackage{amsbsy}
%\usepackage{amstext}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage{setspace}
\usepackage{esint}
\usepackage[section]{placeins}
\usepackage{algorithm,algpseudocode}
\usepackage[
%unicode=true,
pdfusetitle,
bookmarks=true,
bookmarksnumbered=false,
bookmarksopen=false,
breaklinks=false,
pdfborder={0 0 1},
backref=false,
colorlinks=false,
]{hyperref}
\doublespacing
\begin{document}
\begin{equation}
\label{eq:MH_effective_energy}
\begin{split}
\smash[b]{\min\biggl(
1,
\frac{\pi(x_{n+1})}{\pi(x_{n})}
\prod_{i=0}^{L-1}
\frac{P\bigl((x_{n}^{i+1})^{*},(x_{n}^{i})^{*}\bigr)}
{P\bigl(x_{n}^{i},x_{n}^{i+1}\bigr)}
\biggr)}
&= \min(1,e^{-\beta\Delta\tilde{H}}), \\
&= \min\bigl(1,e^{-\beta\sum_{i=0}^{L-1}\Delta\tilde{H}_{i}}\bigr), \\
&= \min\bigl(1,e^{-\beta(\Delta U_{n}+\sum_{i=0}^{L-1}\Delta K_{BAB,i})}\bigr),
\end{split}
\end{equation}
\end{document}
注意事项。
如果您想要英国英语连字规则,则不应通过该
english
选项(适用于美国英语)。\text{min}
是错误的,请使用预定义\min
命令。没有必要
\makeatletter
和\makeatother
。hyperref
应该最后加载。为什么
latin9
?确保您的文档保存为 UTF-8。如果使用
lualatex
,则不要加载fontenc
。amsbsy
并由amstext
自动加载amsmath
,而 又由 加载mathtools
。
答案2
\begin{eqnarray}
删除前后的空格\end{eqnarray}
可能会有帮助。
\begin{eqnarray}
\text{min}\left(1,\frac{\pi(x_{n+1})}{\pi(x_{n})}\prod_{i=0}^{L-1}\frac{P\Big((x_{n}^{i+1})^{*},(x_{n}^{i})^{*}\Big)}{P\Big(x_{n}^{i},x_{n}^{i+1}\Big)}\right) & = & \text{min}\left(1,e^{- \beta\Delta\widetilde{H}}\right),\nonumber \\
& = & \text{min}\left(1,e^{-\beta\sum_{i=0}^{L-1}\Delta\widetilde{H}_{i}}\right),\nonumber \\
& = & \text{min}\left(1,e^{-\beta\left(\Delta U_{n}+\sum_{i=0}^{L-1}\Delta K_{BAB,i}\right)}\right),\label{eq:MH_effective_energy}
\end{eqnarray}
答案3
既然你加载了mathtools
,你最好使用它的multlined
环境:
\documentclass[british,english]{scrartcl}
\usepackage[T1]{fontenc}
\usepackage[latin9]{luainputenc}
\usepackage{color}
\usepackage{babel}
\usepackage{mathtools}
\usepackage{amsbsy}
\usepackage{amstext}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage{setspace}
\usepackage{esint}
\doublespacing
\usepackage[unicode=true,pdfusetitle,
bookmarks=true,bookmarksnumbered=false,bookmarksopen=false,
breaklinks=false,pdfborder={0 0 1},backref=false,colorlinks=false]
{hyperref}
\makeatletter
\usepackage[section]{placeins}
\usepackage{algorithm,algpseudocode}
\makeatother
\begin{document}
\begin{equation}
\begin{multlined}
\min \left(1,\frac{\pi(x_{n+1})}{\pi(x_{n})}\prod_{i=0}^{L-1}\frac{P\Big((x_{n}^{i+1})^{*},(x_{n}^{i})^{*}\Big)}{P\Big(x_{n}^{i},x_{n}^{i+1}\Big)}\right) = \min \left(1,e^{- \beta\Delta\widetilde{H}}\right), \\
= \min \left(1,e^{-\beta\sum_{i=0}^{L-1}\Delta\widetilde{H}_{i}}\right)
= \min \left(1,e^{-\beta\left(\Delta U_{n}+\sum_{i=0}^{L-1}\Delta K_{BAB,i}\right)}\right),\label{eq:MH_effective_energy}
\end{multlined}
\end{equation}
\end{document}