Markdown 数式記載(はてなブログ)
■ ブロック数式
[Tex: \displaystyle{
と}]
で囲むとブロックの数式として表示
[Tex: \displaystyle{ \frac{n!}{k!(n-k)!} = \binom{n}{k} }]
■ インライン数式
[Tex:
と]
で囲むとインライン数式として表示
オイラの公式は、[Tex: e^{i\theta} = \cos\theta + i\sin\theta ] となる
オイラの公式は、 となる
■ 1行数式
<div align="center">
と</div>
で囲むと1行の数式として表示
<div align="center">[Tex: e^{i\theta} = \cos\theta + i\sin\theta ]</div>
<div align="center">[tex: \begin{aligned} \sum_{i=1}^n i &= \frac{n(n+1)}2 \\ \sum_{i=1}^n i^2 &= \frac{n(n+1)(2n+1)}6 \\ \sum_{i=1}^n i^3 &= \left(\frac{n(n+1)}2\right)^2 \end{aligned} ]</div>
<div align="center">[tex: \begin{equation} sushi= \begin{pmatrix} ** & \cdots & \cdots & \cdots & \cdots & ** \\ \cdots & L & O & V & E & \cdots &\\ \cdots & A & N & D & \cdots & \cdots \\ \cdots & P & E & A & C & E \\ ** & \cdots & \cdots & \cdots & \cdots & ** \\ \end{pmatrix} \end{equation} ]</div>
■ 添え字
添え字のある数式が正常に表示されない
_
がMarkdownの斜字と認識されるため、正常に表示されない
1. 空白なし:[tex:x_1+x_2],[tex:x_{1}+x_{2}] 1. 左に空白:[tex:x _1+x _2],[tex:x _{1}+x _{2}] 1. 右に空白:[tex:x_ 1+x_ 2],[tex:x_ {1}+x_ {2}] 1. 左右に空白:[tex:x _ 1+x _ 2],[tex:x _ {1}+x _ {2}]
- 空白なし:,[tex:x{1}+x{2}]
- 左に空白:[tex:x 1+x 2],[tex:x {1}+x {2}]
- 右に空白:[tex:x 1+x 2],[tex:x {1}+x {2}]
- 左右に空白:,
添え字では、_
の左右に空白を入れるのが良い
ーーーー