‘Latex’ タグのついている投稿

Error : Mimetex cannot convert this formula

2009 年 5 月 22 日 金曜日

Mimetex cannot convert this formulaはWordPressでLaTexを用いるPlugin:wp-latexrenderを使用しPluginが適切に動作していない時に表示されるエラー。

http://sixthform.info/steve/wordpress/のコメント欄には以下のように記載されている。

Steve, i’m using the latest nightly build of 1.5 and installed your plugin for use with mimetex. However, even though mimetex works fine, I’m getting this message when I try to use it in a post:
[Mimetex cannot convert this formula]

Can you help me?

上記に対する返答

If mimetex is working OK on your system then:
1. are you sure you have the paths correct in mimetex.php?
2. is /pictures chmodded to 777?
3. it could be that PHP had been locked down preventing it using some commands. In mimetex.php change the line
$system_disabled=0;
to
$system_disabled=1;
which calls mimetex in a different way and see if that works

とあるので、、、

1.パスが間違っていないか?
2.pictureフォルダにパーミッション777は付与されているか?
3.mimetex.phpの$system_disabled=0;を$system_disabled=1;に変更してみては?

というのが主な解決方法となる。

このエントリーを含むはてなブックマーク

WordPressでLatexを利用するPlugin : wp-latexrender

2009 年 5 月 22 日 金曜日

まず、前回のホームページ/ブログ上で数式(LaTex)を利用するを導入している事が前提となる。

Using LaTeX in WordPressからwp-latexrenderをダウンロードする。(※右メニューの右上)

このダウンロードしたファイルの『mimetex.php』と『mimetex-plugin.php』を残し、すべて削除する。
mimetexを編集。以下ソースは前回同様taichino.comより参考。

mimetex.phpの編集
$mimetex_path = ‘mimetex.cgiへのパス’;
例: /var/www/cgi-bin/mimetex.cgi
$mimetex_path_http = ‘mimetex.phpのコピー先ディレクトリURL’;
例: http://example.com/wp-content/plugins/wp-latexrender
$mimetex_cgi_path_http = ‘mimetex.cgiのURL’;
例: http://example.com/cgi-bin/mimetex.cgi
$pictures_path = ‘数式画像を保持するディレクトリへのパス’;
例: /var/www/html/wp-content/plugins/wp-latexrender/pictures

mimetex_plugin.phpの編集
include_once('mimetex.phpへのパス');
例: /var/www/html/wp-content/plugins/wp-latexrender/mimetex.php

これでプラグインを有効化すれば[tex]数式[/tex]でLaTexの利用が可能となる。

このエントリーを含むはてなブックマーク

ホームページ/ブログ上で数式(LaTex)を利用する

2009 年 5 月 22 日 金曜日

あちこちでLaTexを利用する方法が紹介されているが、サーバーにLaTexがインストールされていなければならないタイプが多いので、通常のレンタルサーバーにはLaTexがインストールされているケースは滅多にない。

そこで、通常のレンタルサーバーでも利用できるのがmimetex
実は、これを導入し直打ちすれば、WordPressじゃなくて、プレーンなホームページでもMovable Typeでも問題ないが、今回はより使いやすくする。

なお、taichino.com : wordpress上でのlatex使用についてを参考にさせて頂いた。

まず、mimetexからコンパイル済みのバイナリをダウンロード。※ページ下段にあるLinux (i386) というのをダウンロード。
サーバーがWindowsやBSDだったら、それに対応するものをダウンロード。(ただ、普通のレンタルサーバーはCentOSとかRedHat系なのでLinux(i386)でOK。

解凍したファイルを任意のパスで確認して、実行権限(サーバーによるだろうが、通常755でOK)を付与する。

ここで
http://(サーバドメイン )/(アップロード先)/mimetex.cgi?c=\sqrt{a+b}
にアクセスする事で、動作を確認できる。

この時点で、<img src>の形であれば直打ちでLatexが利用できる。

このエントリーを含むはてなブックマーク