jsMath
数式を書けるようにしたい!
というのがpukiwiki導入の目的のひとつだった。今、思い出した。
- jsmath.inc.php(http://lsx.sourceforge.jp/?Plugin%2Fjsmath.inc.php)を読む
設定 - プラグインを使用しないのが良いようだ - http://sourceforge.net/projects/jsmath/files/からjsMath-3.6e.zipをダウンする。
- http://sourceforge.net/projects/jsmath/files/からjsMath-fonts-1.3.zipをダウンする。
jsMath image fonts は閲覧環境に jsMath fonts がない場合に使用する画像データ - jsMath, jsMath image fonts を解凍。後者の fonts ディレクトリを前者の jsMath ディレクトリに入れる。
(jsMath.js と fonts ディレクトリが同階層) 解凍時にハングアップ。デスクトップが崩れる。
windows/desktopの並びへ
気を取り直して再解凍・・・fontは解凍におよそ8分かかる?!でかいなあ・・・
パソがうんうん唸っている。新しいパソが欲しいなあ。そうだ新しいパソが要るぞ。
フォントサイズ毎に絵があるのか。時間掛かるわけだ。 - jsMath ディレクトリを pukiwiki の skin/ ディレクトリ直下に置く
とりあえず、パソApache上で練習 - PukiWiki スキン の <head></head> タグの間に
<script type="text/javascript" src="path-to-jsMath/easy/load.js"></script>
を置く。path-to-jsMath は index.php から見た jsMath 設置ディレクトリへのパス
って、PukiWikiスキンってどれ?
index.phpから追っていくと、monobookを入れてる場合は、skin/monobook.skin.phpがそのようだ - これでインストールは終了です。
ほんとか? - 数式が表示されることを確かめる
デフォルトでは、$$数式$$ 改行中央寄せ \(数式\) 文中表示 \[数式\] 改行中央寄席
のように数式を記述できます。
表示できたが中寄せだ。数式の左をそろえるとかどうするのん?
tex2mathを読め?
Usually, jsMath identifies mathematics within your web page by looking for <SPAN CLASS="math"> or <DIV CLASS="math"> blocks in the HTML that defines your page. 普通、jsMathは webページの数式部分を HTML中の<SPAN CLASS="math"> or <DIV CLASS="math"> で特定する。 These are a bit cumbersome to type, especially for those used to entering mathematics within dollar signs or \(...\) and \[...\] commands as in LaTeX. 特に、LaTeXのように$とか\(...\)と\[...\]コマンドの中に数式を使ってるときは 困った問題がちょっとある。 JsMath can help out with this, however, by translating dollar signs or the LaTeX \(...\) and \[...\] syntax into the appropriate SPAN or DIV tags automatically, after the page is loaded. が、JsMathは pageを読み込んだ後に $やLaTexの\(...\)と\[...\]を SPANやDIVタグに自動的に置き換えることによって 対処できる。 This is handled by the text2math plugin. これはtext2math pluginで扱われる。
英語読むの飽きた。
なんだ、文中表示にすれば、左寄せになるぢゃん。
じゃあ、正式インストしてみますか。
数式の書き方 †
http://hooktail.sub.jp/nocategory/latexImpress/ が分かりやすかった
数式の例 †
Einstein方程式(宇宙項なし)
&size(20){ \[R_{\mu\nu}-\frac{1}{2}Rg_{\mu\nu}=\frac{8\pi G}{c^4}T_{\mu\nu}\] };
\[R_{\mu\nu}-\frac{1}{2}Rg_{\mu\nu}=\frac{8\pi G}{c^4}T_{\mu\nu}\]
ディラック方程式
&size(20){ \[(\mathrm{\it i}\gamma^\mu-\partial_\mu-m)\psi(x)=0 \] };
\[(\mathrm{\it i}\gamma^{\mu}\partial_\mu-m)\psi(x)=0 \]