多行公式排版:(gather、align、split、cases)
\section{多行公式}%gather环境\begin{gather}a+b=b+a \\abc=bac=cba=cab\end{gather}\begin{gather*}a+b=b+a \\abc=bac=cba=cab\end{gather*}\begin{gather}a+b=b+a \\1+2=3 \notag \\abc=bac=cba=cab\end{gather}
%align环境(主要用于对齐)(如等号对齐,每个开头对齐)%带编号\begin{align}x & = t +\cos t +1 \\y&=2\sin t\end{align}\begin{align*}x & = t +\cos t +1 \\y&=2\sin t\end{align*}
%split环境(equation下 实现居中编号 连等公式)\begin{equation}\begin{split}\cos 2x &= \cos^2 x -\sin^2 x \\&= 2\cos^2 x - 1\end{split}\end{equation}
%cases环境,用于分段函数%每一行公式用&连接每一个部分,通常表示值和后面的条件,在equation大环境下%用文本\test{}\begin{equation}F(x) = \begin{cases}1,&\text{如果}x \in \mathbb{Q};\\0,&\text{如果}x \in \mathbb{R} \setminus\mathbb{Q};\\\end{cases}\end{equation}
参考文献后面在讲嘻嘻。
附录(代码):
\section{排队论源代码}\begin{lstlisting}[language=lingo]{\colortbl ;\red0\green0\blue255;\red0\green0\blue0;}\viewkind4\uc1\pard\cf1\lang2052\f0\fs20 model\cf2 :\par\cf1 sets\cf2 :\parstate/1..1020/:p;\par\cf1 endsets\cf2\parlamda=1020/12;mu=84;rho=lamda/mu;k=1020;\parlamda*p0=mu*p(1);\par(lamda+mu)*p(1)=lamda*p0+mu*p(2);\par\cf1 @for\cf2 (state(i)|i #gt#1 #and# i #lt#\park:(lamda+mu)*p(i)=lamda*p(i-1)+mu*p(i+1));\parlamda*p(k-1)=mu*p(k);\parp0+\cf1 @sum\cf2 (state:p)=1;\parP_lost=p(k);lamda_e=lamda*(1-P_lost);\parL_s=\cf1 @sum\cf2 (state(i)|i #le#k:i*p(i));\parL_q=L_s-(1-p0);\parW_s=L_s/lamda_e;\parW_q=W_s-1/mu;\par\cf1 end\cf2\par}\end{lstlisting}
往期回顾
01
02
03
资料分享栏目
ppt字体链接:https://pan.baidu.com/s/1mUfGT2h3frx12q_JlJX3bw
提取码:izdu
「喜欢这篇文章,您的关注和赞赏是给作者最好的鼓励」
关注作者
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文章的来源(墨天轮),文章链接,文章作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。




