\documentclass[12pt]{article}
\begin{document}
\begin{equation}
\begin{array}{l}
{s_{\max }}\\ = - \sum\limits_{i = 1}^n {{q_i}} \sum\limits_{j = 0}^\alpha {{p_i}_j\ln {p_i}_j} \\
= - \sum\limits_{i = 1}^n {{q_i}} \sum\limits_{j = 0}^\alpha {{p_i}{}_j\ln \left[ {{a_i}\exp ( - (\mu + \nu {\varepsilon _i})j)} \right]} \\
= - \sum\limits_{i = 1}^n {{q_i}} \left[ {\sum {{p_i}_j\ln {a_i}} - \mu \sum {j{p_i}_j - \nu \sum j } {\varepsilon _i}{p_i}_j} \right]\\
= - \sum {{q_i}\ln {a_i}} + \mu a + \nu b\\
= \sum\limits_{i = 1}^n {{q_i}} \ln \left[ {\exp ( - (\mu + \nu {\varepsilon _i}) + 1)} \right] + \sum {\left( {\mu + \nu {\varepsilon _i}} \right)} {a_i}\sum {j{p_i}_j} \\
= \sum {{q_i}} \ln \left[ {1 + \exp ( - (\mu + \nu {\varepsilon _i}))} \right] + \left( {\mu + \nu {\varepsilon _i}} \right)\overline {{n_i}} \\
= \sum {{q_i}\left\{ {\ln \left( {1 + \frac{{\overline {{n_i}} }}{{1 - \overline {{n_i}} }}} \right) + \overline {{n_i}} \ln \left( {\frac{1}{{\overline {{n_i}} }} - 1} \right)} \right\}} \\
= \sum\limits_{i = 1}^n {{q_i}} \left\{ {\ln \frac{1}{{1 - \overline {{n_i}} }} + \overline {{n_i}} \ln \left( {\frac{{1 - \overline {{n_i}} }}{{\overline {{n_i}} }}} \right)} \right\}\\
= \sum\limits_{i = 1}^n {{q_i}\left\{ { - \ln (1 - \overline {{n_i}} ) + \overline {{n_i}} \ln (1 - \overline {{n_i}} ) - \overline {{n_i}} \ln \overline {{n_i}} } \right\}} \\
= \sum\limits_{i = 1}^n {{q_i}} \left\{ { - \overline {{n_i}} \ln \overline {{n_i}} - (1 - \overline {{n_i}} )\ln (1 - \overline {{n_i}} )} \right\}
\end{array}
\end{equation}
\end{document}
为什么上面的等式给出的pdf看起来很糟糕?
答案1
array
是为值的矩阵(数组)而不是显示的方程式设计的。
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{align*}
s_{\max }
&= - \sum_{i = 1}^n {{q_i}} \sum_{j = 0}^\alpha {{p_i}_j\ln {p_i}_j} \\
&= - \sum_{i = 1}^n {{q_i}} \sum_{j = 0}^\alpha {{p_i}{}_j\ln \left[ {{a_i}\exp ( - (\mu + \nu {\varepsilon _i})j)} \right]} \\
&= - \sum_{i = 1}^n {{q_i}} \left[ {\sum {{p_i}_j\ln {a_i}} - \mu \sum {j{p_i}_j - \nu \sum j } {\varepsilon _i}{p_i}_j} \right]\\
&= - \sum {{q_i}\ln {a_i}} + \mu a + \nu b\\
&= \sum_{i = 1}^n {{q_i}} \ln \left[ {\exp ( - (\mu + \nu {\varepsilon _i}) + 1)} \right] + \sum {\left( {\mu + \nu {\varepsilon _i}} \right)} {a_i}\sum {j{p_i}_j} \\
&= \sum {{q_i}} \ln \left[ {1 + \exp ( - (\mu + \nu {\varepsilon _i}))} \right] + \left( {\mu + \nu {\varepsilon _i}} \right)\overline {{n_i}} \\
&= \sum {{q_i}\left\{ {\ln \left( {1 + \frac{{\overline {{n_i}} }}{{1 - \overline {{n_i}} }}} \right) + \overline {{n_i}} \ln \left( {\frac{1}{{\overline {{n_i}} }} - 1} \right)} \right\}} \\
&= \sum_{i = 1}^n {{q_i}} \left\{ {\ln \frac{1}{{1 - \overline {{n_i}} }} + \overline {{n_i}} \ln \left( {\frac{{1 - \overline {{n_i}} }}{{\overline {{n_i}} }}} \right)} \right\}\\
&= \sum_{i = 1}^n {{q_i}\left\{ { - \ln (1 - \overline {{n_i}} ) + \overline {{n_i}} \ln (1 - \overline {{n_i}} ) - \overline {{n_i}} \ln \overline {{n_i}} } \right\}} \\
&= \sum_{i = 1}^n {{q_i}} \left\{ { - \overline {{n_i}} \ln \overline {{n_i}} - (1 - \overline {{n_i}} )\ln (1 - \overline {{n_i}} )} \right\}
\end{align*}
\end{document}