=====数式の書き方===== * 前提として eqnarray 環境は非推奨. * 数式環境内に空白の行を作るとエラーになる * amsmath や mathtools が必要なものもある * 1行の数式を書きたいとき -> equation 環境 \begin{equation} y = ax \label{eq:proportional} \end{equation} *複数行の数式を書きたいとき,たとえば式変形をするとき -> align 環境 * 全部の行に式番号が入る * & の部分が揃う \begin{align} (a + b)^2 &= (a + b) (a +b) \label{eq:a_plus_b_1}\\ &= a^2 + 2ab + b^2 \label{eq:a_plus_b_2} \end{align} * 複数の数式を書きたいとき,たとえば複数の関数をならべるとき -> gather 環境 * 全部の行に式番号が入る * 中央に揃う \begin{gather} A(x) = x \label{eq:x}\\ B(x) = x^2 \label{eq:x2} \end{gather} * 長い数式を複数行にわけるとき -> split 環境 * 数式番号は全体でひとつ * & の部分で揃う \begin{equation} \begin{split} a &= \int_0^\infty f(x)\sin x\cos x dx \\ &\quad - \int_0^\infty f(-x)\sin x\cos x dx \end{split} \label{eq:int_plus_minus} \end{equation} * 長い数式を複数行にわけるとき -> multline 環境 * スペルに注意 * 一番上が左揃え,一番下が右揃えになる \begin{multline} a + b + c + d + e + f + g \\ + h + i + j + k + l + m + n + o \\ + p + q + r + s + t + u + v + w + x + y + z \end{multline} * multline を split などと一緒に使いたい -> multlined 環境 * D 論の式 (9.4), (9.5) \begin{align} \begin{split} \Delta\theta_\mathrm{rad'} &= \arctan\left(\frac{\bm{a}_1 \cdot \hat{\bm{r'}}}{\bm{a}_1 \cdot \hat{\bm{t}}} \right) \\ &= \!\begin{multlined}[t] \arctan\left( \left. \frac{-\tan\theta_{x0}\tan\theta_{x1} - \tan\theta_{y0}\tan\theta_{y1} + \tan^2\theta_{x0} + \tan^2\theta_{y0}}{\sqrt{\tan^2\theta_{x0} + \tan^2\theta_{y0} + (\tan^2\theta_{x0} + \tan^2\theta_{y0})^2}} \right. \right. \\ \hspace{0.3\textwidth} \left. \left. \middle/ \frac{\tan\theta_{x0}\tan\theta_{x1} + \tan\theta_{y0}\tan\theta_{y1} + 1}{\sqrt{\tan^2\theta_{x0} + \tan^2\theta_{y0} + 1}} \right. \right), \end{multlined} \end{split} \label{eq:mcs_radial_angle_difference} \\ \begin{split} \Delta\theta_\mathrm{lat'} &= \arctan\left(\frac{\bm{a}_1 \cdot \hat{\bm{l'}}}{\bm{a}_1 \cdot \hat{\bm{t}}} \right) \\ &= \!\begin{multlined}[t] \arctan\left(\left. \frac{-\tan\theta_{y0}\tan\theta_{x1} + \tan\theta_{x0}\tan\theta_{y1}}{\sqrt{\tan^2\theta_{x0} + \tan^2\theta_{y0}}} \right. \right. \\ \hspace{0.3\textwidth} \left. \left. \middle/ \frac{\tan\theta_{x0}\tan\theta_{x1} + \tan\theta_{y0}\tan\theta_{y1} + 1}{\sqrt{\tan^2\theta_{x0} + \tan^2\theta_{y0} + 1}} \right. \right). \end{multlined} \end{split} \label{eq:mcs_lateral_angle_difference} \end{align}