\newcommand\PCC{\mathrm{PCC}}
\newcommand\Sim{\mathrm{Sim}}
\begin{equation}
\begin{align}
\mathit{Sim}_{a,b}^{\mathrm{PCC}} = \frac{%
\sum_{p\in P}( r_{a,p}-\bar{r}_a)(r_{b,p}- \bar{r}_b)} {%
\sqrt{\sum_{p\in P}(r_{a,p}-\bar{r}_a)^2}
\sqrt{\sum_{p\in P}(r_{b,p}-\bar{r}_b)^2}}
\end{align}
\label{Pearson}
\end{equation}
问题是方程式不能在一列中,并且它改变了这个方程式后的字体大小
答案1
选择以下之一:
\documentclass[twocolumn,a4paper]{article}
\usepackage{amsmath}
\begin{document}
\newcommand\PCC{\mathrm{PCC}}
\newcommand\Sim{\mathrm{Sim}}
\begin{equation}
\mathit{Sim}_{a,b}^{\mathrm{PCC}} = \frac{%
\sum_{p\in P}( r_{a,p}-\bar{r}_a)(r_{b,p}- \bar{r}_b)} {%
\sqrt{\sum_{p\in P}(r_{a,p}-\bar{r}_a)^2}
\sqrt{\sum_{p\in P}(r_{b,p}-\bar{r}_b)^2}}
\label{Pearson}
\end{equation}
\begin{equation}
\mathit{Sim}_{a,b}^{\mathrm{PCC}} = \frac{%
\sum\limits_{p\in P}( r_{a,p}-\bar{r}_a)(r_{b,p}- \bar{r}_b)} {%
\sqrt{\sum\limits_{p\in P}(r_{a,p}-\bar{r}_a)^2}
\sqrt{\sum\limits_{p\in P}(r_{b,p}-\bar{r}_b)^2}}
\label{Pearson2}
\end{equation}
\begin{equation}
\mathit{Sim}_{a,b}^{\mathrm{PCC}} = \frac{%
\sum_{p\in P}AB} {%
\sqrt{\sum_{p\in P}A^2}
\sqrt{\sum_{p\in P}B^2}}
\label{Pearson3}
\end{equation}
where $A=r_{a,p}-\bar{r}_a$ and $B=r_{b,p}- \bar{r}_b$
\end{document}
答案2
这可能有效,但取决于列的实际宽度。
\documentclass[twocolumn,a4paper]{article}
\usepackage{amsmath}
\usepackage{lipsum} % for context
\newcommand\PCC{\mathrm{PCC}}
\newcommand\Sim{\mathrm{Sim}}
\begin{document}
\lipsum*[2]
\begin{equation}\label{Pearson}
\hspace{10000pt minus 1fil}
\mathit{Sim}_{a,b}^{\mathrm{PCC}} =
\frac{%
\sum\limits_{p\in P}( r_{a,p}-\bar{r}_a)(r_{b,p}- \bar{r}_b)} {%
\sqrt{\sum\limits_{p\in P}(r_{a,p}-\bar{r}_a)^2}
\sqrt{\sum\limits_{p\in P}(r_{b,p}-\bar{r}_b)^2}}
\hspace{10000pt minus 1fil}
\end{equation}
\lipsum[3]
\end{document}
添加较大但可缩小的空间的技巧允许方程式从左边距开始。使用这种方法,\sum\limits
我们可以节省一些水平空间,但会牺牲垂直尺寸。
不要align
在里面筑巢equation
。