.. image:: logo1.jpg ----------------------------------------- Sphinxの学習用(作成Web管理者) ----------------------------------------- Sphinx 数式PNGテスト出力 --------------------------------- | | .. math:: :label: e:onedim \frac{\partial u}{\partial t} + \frac{\partial f(u)}{\partial x} = 0 .. math:: :label: e:integral F(\omega) \cong \frac{\Delta x}{2}\left[ g(0) + 2\sum_{n=1}^{N-2}g(x_n) + g(A) \right] | | 3月14日のπの日にちなんでオイラーの公式 オイラーの等式 ------------------------------------------------------------- | | .. math:: :label: e:Euler's formula a e^{i\theta}=\cos\theta+i\sin\theta .. math:: :label: e:Euler's identity a e^{i\pi}+1=0 | | ========== インライン数式テスト --------------------------------- ピタゴラスによって、 :math:`a^2 + b^2 = c^2` という式が成り立つことが示されました。 python 書式フォーマットテスト --------------------------------------- ロジスティック写像 :math:`x_{n+1}=ax_{n}(1-x_{n})` .. code-block:: python #pythonのコード import pylab as pl a=1.0 pl.xlim(0,5) pl.ylim(0,1) while a<=4: logistic=[] list_a=[] i=1.0 x=0.6 while i<100 : y=a*x*(1-x) #list_a.append(a) #logistic.append(y) pl.plot(a,y,'b,') x=y i=i+1 #pl.plot(list_a,logistic,'b,') a=a+0.01 pl.show() C書式フォーマットテスト ----------------------------- | 半径 :math:`r` | 円周 :math:`cir=2\pi r` | 面積 :math:`area=r^2` .. code-block:: c //C言語 #include int main() { double r = 10; double area; cir = r * 2 * pi; area = r * r * pi; printf("半径 = %f\n", r); printf("円周 = %f\n", cir); printf("面積 = %f\n", area); return 0; }