我想在两栏纸上写方程式。但是,如果我的方程式太长,方程式看起来就不好看。方程式 1 是正确的方程式格式。我该如何更改方程式以匹配文本格式?例如,我应该将方程式写成两行。
\documentclass[journal,twoside,web]{IEEEtran}
%\usepackage{generic}
\usepackage{cite}
\usepackage{amsmath,amssymb,amsfonts}
\usepackage{algorithmic}
\usepackage{graphicx}
\usepackage{textcomp}
\usepackage{tabularx}
\usepackage{amsmath}
\usepackage{cite}
\usepackage{cuted}
\begin{document}
\title{Preparation of Papers for IEEE Trans on Industrial Informatics (February 2022)}
\author{\dots}
\maketitle
\begin{abstract}
One of the world's fashion capitals, \dots
\end{abstract}
\begin{equation}
C_m = (D_{m_1}, D_{m_2}, ..., D_{mk_m}), (m \in (1, j))\quad
\end{equation}
\begin{strip}
\begin{align*}
W_{imd} = \frac{\sigma_{md\_ind\_i3}}{\sum_{n=1}^{k_m} \sigma_{mn\_ind\_i}} , (d \in (0, k_m), k_m \in (k_11, k_j2), m \in (1, j), i \in (1, h33)) \label{eq:2}
\end{align*}
\end{strip}
\begin{equation}
W_{imd} = \frac{\sigma_{md\_ind\_i3}}{\sum_{n=1}^{k_m} \sigma_{mn\_ind\_i}} , (d \in (0, k_m), k_m \in (k_11, k_j2), m \in (1, j), i \in (1, h33)) \label{eq:2}
\end{equation}
The destiny of Milan, \dots
\end{document}
答案1
如果您接受两行以上,拆分索引定义可能会很有用
\documentclass[journal,twoside,web]{IEEEtran}
%\usepackage{generic}
\usepackage{cite}
\usepackage{amsmath,amssymb,amsfonts}
\usepackage{algorithmic}
\usepackage{graphicx}
\usepackage{textcomp}
\usepackage{tabularx}
\usepackage{amsmath}
\usepackage{cite}
\usepackage{cuted}
\usepackage{mathtools}
\usepackage{kantlipsum} % <--- dummy text
\begin{document}
\title{Preparation of Papers for IEEE Trans on Industrial Informatics (February 2022)}
\author{\dots}
\maketitle
\begin{abstract}
\kant[10]
\end{abstract}
\kant[1][1]
\begin{equation}
C_m = (D_{m_1}, D_{m_2}, ..., D_{mk_m}), (m \in (1, j))\quad
\end{equation}
The destiny of Milan, \dots
\begin{gather}
W_{imd} = \frac{\sigma_{md\_ind\_i3}}{\sum_{n=1}^{k_m} \sigma_{mn\_ind\_i}}, \label{eq:2} \\[6pt]
\begin{array}{r @{\ \in\ } l}
d & (0, k_m), \\
k_m & (k_11, k_j2), \\
m & (1, j), \\
i & (1, h33)
\end{array} \nonumber
\end{gather}
\kant[2-4]
\end{document}
答案2
您的文档加载了该amsmath
包,但并未利用该包的机制来 (a) 在需要的地方插入换行符,以将较长的方程式拆分为两行,以及 (b) 定义方程式之间的对齐点。您可能希望实现类似以下的功能。
\documentclass[journal,twoside,web]{IEEEtran}
%\usepackage{generic}
\usepackage{cite}
\usepackage{amsmath,amssymb} %%,amsfonts}
\usepackage{algorithmic}
\usepackage{graphicx}
%%\usepackage{textcomp}
\usepackage{tabularx}
%%\usepackage{amsmath}
%%\usepackage{cite}
\usepackage{cuted}
\begin{document}
\title{Preparation of Papers for IEEE Trans on \\
Industrial Informatics (February 2022)}
\author{\dots}
\maketitle
\begin{abstract}
One of the world's fashion capitals, \dots
\end{abstract}
\begin{align}
C_m &= (D_{m_1}, D_{m_2}, \dots, D_{mk_m}), \quad (m \in (1, j)) \\[1ex]
W_{imd} &= \frac{\sigma_{\mathrm{md\_ind}\_i3}}{\sum_{n=1}^{k_m} \sigma_{\mathrm{mn\_ind}\_i}} , \quad \bigl(d \in (0, k_m), \label{eq:2}\\[1ex]
&\qquad k_m \in (k_{11}, k_{j2}),\ m \in (1, j),\ i \in (1, h33)\bigr) \notag
\end{align}
\end{document}
答案3
别管cuted
了:这会让阅读论文变得非常困难。
也加载newtx
,这样数学字体就会与文本字体匹配。但是,\_
在这种情况下,该命令实际上并没有产生好的结果。
\documentclass[journal,twoside]{IEEEtran}
\usepackage{amsmath}
\usepackage{newtx}
\usepackage{lipsum}
\DeclareRobustCommand{\_}{\text{\kern.02em\vbox{\hrule width.3em}\kern.04em}}
\begin{document}
\title{Preparation of Papers for IEEE Trans on Industrial Informatics (February 2022)}
\author{\dots}
\maketitle
\begin{abstract}
\lipsum[2]
\end{abstract}
\lipsum[1][1-4]
\begin{equation}
C_m = (D_{m_1}, D_{m_2}, \dots, D_{mk_m}), (m \in (1, j))
\end{equation}
\lipsum[3][1-4]
\begin{equation}\label{eq:2}
\hspace{0.1em}
W_{imd} = \frac{\sigma_{md\_ind\_i3}}{\sum_{n=1}^{k_m} \sigma_{mn\_ind\_i}} ,
\hspace{1000pt minus 1fil}
\begin{aligned}[t]
(&d \in (0, k_m), k_m \in (k_{11}, k_{j2}), \\
&m \in (1, j), i \in (1, h_{33}))
\end{aligned}
\end{equation}
\lipsum[4-12]
\end{document}
这个\hspace
技巧可以覆盖数学方程式中关于间距的一些严格规则。
另一个技巧是使用split
,这样方程编号就会居中,但我们需要欺骗 TeX 认为方程的主要部分的深度为零。
\begin{equation}\label{eq:2}
\begin{split}
\smash[b]{W_{imd} = \frac{\sigma_{md\_ind\_i3}}{\sum_{n=1}^{k_m} \sigma_{mn\_ind\_i}}} ,
\quad
(&d \in (0, k_m), k_m \in (k_{11}, k_{j2}), \\
&m \in (1, j), i \in (1, h_{33}))
\end{split}
\end{equation}