<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>7ème Gnossienne &#187; WordPress</title>
	<atom:link href="http://firehacks.org/category/wordpress/feed" rel="self" type="application/rss+xml" />
	<link>http://firehacks.org</link>
	<description>dynamis&#039; blog</description>
	<lastBuildDate>Tue, 01 Sep 2009 13:06:44 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.2</generator>
	<language>ja</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>ASCIIsvg のサンプル</title>
		<link>http://firehacks.org/posts/67</link>
		<comments>http://firehacks.org/posts/67#comments</comments>
		<pubDate>Sat, 29 Jul 2006 06:48:29 +0000</pubDate>
		<dc:creator>dynamis</dc:creator>
				<category><![CDATA[Physics]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[XML]]></category>

		<guid isPermaLink="false">http://firehacks.org/blog/posts/67</guid>
		<description><![CDATA[続けて ASCIIsvg のサンプルを(要 SVG 対応ブラウザ)。&#160;


うん。なかなか良い感じですね(自己満足)。これでやっと必要な機能がそろったかな。;-)
]]></description>
			<content:encoded><![CDATA[<p>続けて ASCIIsvg のサンプルを(要 <abbr title="Scalable Vector Graphics">SVG</abbr> 対応ブラウザ)。&nbsp;</p>
<p><span id="more-67"></span><embed width="400" height="400" src="http://firehacks.org/wp-content/plugins/asciisvg//d.svg" script="
setBorder(0);
initPicture(-2*pi-0.2,2*pi+0.2);
axes(1, 1, &quot;labels&quot;, &quot;grid&quot;);
dot([pi,0],&quot;|&quot;,cpi,above);
dot([-pi,0],&quot;|&quot;,&quot;-&quot;+cpi,above);
dot([2*pi,0],&quot;|&quot;,&quot;2&quot;+cpi,above);
dot([-2*pi,0],&quot;|&quot;,&quot;-2&quot;+cpi,above);
dot([pi/2,0],&quot;|&quot;,cpi+&quot;/2&quot;,above);
dot([-pi/2,0],&quot;|&quot;,&quot;-&quot;+cpi+&quot;/2&quot;,above);
dot([3*pi/2,0],&quot;|&quot;,&quot;3&quot;+cpi+&quot;/2&quot;,above);
dot([-3*pi/2,0],&quot;|&quot;,&quot;-3&quot;+cpi+&quot;/2&quot;,above);
strokewidth = 1.5;

stroke = &quot;blue&quot;;
plot(&quot;cos(x)&quot;);
fontfill = &quot;blue&quot;;
text([-1.4,.8],&quot;cos(x)&quot;);

stroke = &quot;green&quot;;
plot(&quot;tan(x)&quot;,-2*pi-0.2,-3/2*pi-0.05);
plot(&quot;tan(x)&quot;,-3/2*pi+0.05,-1/2*pi-0.05);
plot(&quot;tan(x)&quot;,-1/2*pi+0.05,1/2*pi-0.05);
plot(&quot;tan(x)&quot;,1/2*pi+0.05,3/2*pi-0.05);
plot(&quot;tan(x)&quot;,3/2*pi+0.05,2*pi+0.2);
fontfill = &quot;green&quot;;
text([1.2,3],&quot;tan(x)&quot;,aboveright);

stroke = &quot;black&quot;;
plot(&quot;csc(x)&quot;,-2*pi+0.05,-pi-0.05);
plot(&quot;csc(x)&quot;,-pi+0.05,-0.05);
plot(&quot;csc(x)&quot;,0.05,pi-0.05);
plot(&quot;csc(x)&quot;,pi+0.05,2*pi-0.05);
fontfill = &quot;none&quot;;
text([2.6,2],&quot;csc(x)&quot;,aboveright);

stroke = &quot;red&quot;;
plot(&quot;sin(x)&quot;);
fontfill = &quot;red&quot;;
text([2.9,.8],&quot;sin(x)&quot;);

"/></p>
<p><embed width="400" height="400" src="http://firehacks.org/wp-content/plugins/asciisvg//d.svg" script="
setBorder(7);
initPicture(-3,3);
axes(1, 1, &quot;labels&quot;, &quot;grid&quot;);
strokewidth = 1.5;

stroke = &quot;green&quot;;
plot(&quot;tanh(x)&quot;);
text([-2,-0.9],&quot;tanh(x)&quot;,aboveright);

stroke = &quot;black&quot;;
plot(&quot;sech(x)&quot;);
text([-2,0.55],&quot;sech(x)&quot;,right);

stroke = &quot;red&quot;;
plot(&quot;sinh(x)&quot;);
text([-2,-2],&quot;sinh(x)&quot;,aboveright);

stroke = &quot;blue&quot;;
plot(&quot;cosh(x)&quot;);
text([-2,2],&quot;cosh(x)&quot;,aboveright);

"/></p>
<p>うん。なかなか良い感じですね(自己満足)。これでやっと必要な機能がそろったかな。;-)</p>
]]></content:encoded>
			<wfw:commentRss>http://firehacks.org/posts/67/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ASCIIsvg for WordPress</title>
		<link>http://firehacks.org/posts/66</link>
		<comments>http://firehacks.org/posts/66#comments</comments>
		<pubDate>Sat, 29 Jul 2006 06:40:01 +0000</pubDate>
		<dc:creator>dynamis</dc:creator>
				<category><![CDATA[Physics]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[XML]]></category>

		<guid isPermaLink="false">http://firehacks.org/blog/posts/66</guid>
		<description><![CDATA[サーバサイド数式変換の ASCIIMathPHP、クライアントサイド数式変換の ASCIIMathML.js に続いてクライアントサイドでの図表生成の ASCIIsvg.js を WordPress に導入してみました。例によって一応公開しておきます。
&#160;asciisvg.zip
以下、ASCIIsvg のページで公開されているサンプル (Firefox や IE+Adobe SVG Viewer など SVG 対応ブラウザでご覧ください):


残念ながら Firefox での SVG 処理が非常に重いので他のサンプルは別途続けて…
]]></description>
			<content:encoded><![CDATA[<p>サーバサイド数式変換の ASCIIMathPHP、クライアントサイド数式変換の ASCIIMathML.js に続いてクライアントサイドでの図表生成の ASCIIsvg.js を WordPress に導入してみました。例によって一応公開しておきます。</p>
<p align="center">&nbsp;<a href="http://ftp.firehacks.org/wordpress/plugins/asciisvg.zip">asciisvg.zip</a></p>
<p><span id="more-66"></span>以下、<a href="http://www1.chapman.edu/~jipsen/asciisvg.html">ASCIIsvg のページ</a>で公開されているサンプル (Firefox や IE+Adobe <abbr title="Scalable Vector Graphics">SVG</abbr> Viewer など <abbr title="Scalable Vector Graphics">SVG</abbr> 対応ブラウザでご覧ください):</p>
<p><embed width="400" height="400" src="http://firehacks.org/wp-content/plugins/asciisvg//d.svg" script="
setBorder(0);
initPicture(-5,5);
axes(2, 1, &quot;labels&quot;, 1);

stroke = &quot;blue&quot;;
plot(&quot;sin(x)&quot;);

stroke = &quot;red&quot;;
plot([&quot;5*t*cos(pi*t)&quot;, &quot;5*t*sin(pi*t)&quot;],0,1);

stroke = &quot;green&quot;;
strokewidth = &quot;2&quot;;
marker = &quot;arrowdot&quot;;
line([0,1], [pi/2,1]);
dot([pi,0], &quot;open&quot;, cpi);

text([-2.5,-2.5], &quot;ASCIIsvg Example&quot;);

"/></p>
<p><embed width="400" height="400" src="http://firehacks.org/wp-content/plugins/asciisvg//d.svg" script="
setBorder(5);
initPicture(-5,5);
axes(1, 1, &quot;labels&quot;, &quot;grid&quot;);

stroke = &quot;blue&quot;;
plot(&quot;x^3-2x&quot;,-3,3);
text([2,1],&quot;x^3-2x=(x-p)(x-0)(x-q)&quot;,aboveright);
dot([-sqrt(2),0],&quot;|&quot;,&quot; p&quot;,below);
dot([sqrt(2),0],&quot;|&quot;,&quot; q&quot;,below);

stroke = &quot;red&quot;;
plot(&quot;x^3&quot;,-3,3);
text([1,1],&quot;x^3&quot;,aboveleft);

stroke = &quot;green&quot;;
plot(&quot;-1/4x^3&quot;,-3,3);
text([2,-2],&quot;-1/4x^3&quot;,aboveright);

setBorder(5);
initPicture(-5,5);
axes(1, 1, &quot;labels&quot;, &quot;grid&quot;);

stroke = &quot;blue&quot;;
plot(&quot;x^3-2x&quot;,-3,3);
text([2,1],&quot;x^3-2x=(x-p)(x-0)(x-q)&quot;,aboveright);
dot([-sqrt(2),0],&quot;|&quot;,&quot; p&quot;,below);
dot([sqrt(2),0],&quot;|&quot;,&quot; q&quot;,below);

stroke = &quot;red&quot;;
plot(&quot;x^3&quot;,-3,3);
text([1,1],&quot;x^3&quot;,aboveleft);

stroke = &quot;green&quot;;
plot(&quot;-1/4x^3&quot;,-3,3);
text([2,-2],&quot;-1/4x^3&quot;,aboveright);

"/></p>
<p>残念ながら Firefox での <abbr title="Scalable Vector Graphics">SVG</abbr> 処理が非常に重いので他のサンプルは<a href="http://firehacks.org/blog/posts/67" title="ASCIIsvg のサンプル">別途続けて</a>…</p>
]]></content:encoded>
			<wfw:commentRss>http://firehacks.org/posts/66/feed</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>ASCIIMathML for WordPress</title>
		<link>http://firehacks.org/posts/65</link>
		<comments>http://firehacks.org/posts/65#comments</comments>
		<pubDate>Sat, 29 Jul 2006 06:09:40 +0000</pubDate>
		<dc:creator>dynamis</dc:creator>
				<category><![CDATA[Physics]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[XML]]></category>

		<guid isPermaLink="false">http://firehacks.org/blog/posts/65</guid>
		<description><![CDATA[前回は ASCIIMathPHP を使ってサーバサイドでの数式変換を行うようにしたが、今回は ASCIIMathML.js (のカスタム版)を使ってクライアントサイドでの数式変換を行うプラグインも作ってみました。コードを見て使い方を理解する根性のある人はどうぞ。
asciimathml.zip&#160;
`x^2+y_1+z_12^34`
`x^2+y_1+z_12^34`
`sin^-1(x)`
`sin^-1(x)`
`d/dxf(x)=lim_(h-&#62;0)(f(x+h)-f(x))/h`
`d/dxf(x)=lim_(h-&#62;0)(f(x+h)-f(x))/h`
$\frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}$
$\frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}$
`f(x)=sum_(n=0)^oo(f^((n))(a))/(n!)(x-a)^n`
`f(x)=sum_(n=0)^oo(f^((n))(a))/(n!)(x-a)^n`
$f(x)=\sum_{n=0}^\infty\frac{f^{(n)}(a)}{n!}(x-a)^n$
$f(x)=\sum_{n=0}^\infty\frac{f^{(n)}(a)}{n!}(x-a)^n$
`int_0^1f(x)dx`
`int_0^1f(x)dx`
`[[a,b],[c,d]]((n),(k))`
`[[a,b],[c,d]]((n),(k))`
`x/x={(1,if x!=0),(text{undefined},if x=0):}`
`x/x={(1,if x!=0),(text{undefined},if x=0):}`
ASCIIMathML.js は最新の機能を使えるため、Tex 形式の数式も変換してくれる。複雑な数式を多量に書くとクライアントサイドでの負荷が大きくなるだろうけど、取りあえず正常に動くだけでよいよい。;-)
]]></description>
			<content:encoded><![CDATA[<p><a href="http://firehacks.org/blog/posts/63" title="ASCIIMathPHP for WordPress">前回</a>は <a href="http://www.jcphysics.com/ASCIIMath/">ASCIIMathPHP</a> を使ってサーバサイドでの数式変換を行うようにしたが、今回は <a href="http://www1.chapman.edu/~jipsen/mathml/asciimath.xml">ASCIIMathML.js</a> (のカスタム版)を使ってクライアントサイドでの数式変換を行うプラグインも作ってみました。コードを見て使い方を理解する根性のある人はどうぞ。</p>
<p align="center"><a href="http://ftp.firehacks.org/wordpress/plugins/asciimathml.zip">asciimathml.zip</a>&nbsp;</p>
<p><span id="more-65"></span>`x^2+y_1+z_12^34`</p>
<blockquote class="asciimathml"><p>`x^2+y_1+z_12^34`</p></blockquote>
<p>`sin^-1(x)`</p>
<blockquote class="asciimathml"><p>`sin^-1(x)`</p></blockquote>
<p>`d/dxf(x)=lim_(h-&gt;0)(f(x+h)-f(x))/h`</p>
<blockquote class="asciimathml"><p>`d/dxf(x)=lim_(h-&gt;0)(f(x+h)-f(x))/h`</p></blockquote>
<p>$\frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}$</p>
<blockquote class="asciimathml"><p>$\frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}$</p></blockquote>
<p>`f(x)=sum_(n=0)^oo(f^((n))(a))/(n!)(x-a)^n`</p>
<blockquote class="asciimathml"><p>`f(x)=sum_(n=0)^oo(f^((n))(a))/(n!)(x-a)^n`</p></blockquote>
<p>$f(x)=\sum_{n=0}^\infty\frac{f^{(n)}(a)}{n!}(x-a)^n$</p>
<blockquote class="asciimathml"><p>$f(x)=\sum_{n=0}^\infty\frac{f^{(n)}(a)}{n!}(x-a)^n$</p></blockquote>
<p>`int_0^1f(x)dx`</p>
<blockquote class="asciimathml"><p>`int_0^1f(x)dx`</p></blockquote>
<p>`[[a,b],[c,d]]((n),(k))`</p>
<blockquote class="asciimathml"><p>`[[a,b],[c,d]]((n),(k))`</p></blockquote>
<p>`x/x={(1,if x!=0),(text{undefined},if x=0):}`</p>
<blockquote class="asciimathml"><p>`x/x={(1,if x!=0),(text{undefined},if x=0):}`</p></blockquote>
<p>ASCIIMathML.js は最新の機能を使えるため、Tex 形式の数式も変換してくれる。複雑な数式を多量に書くとクライアントサイドでの負荷が大きくなるだろうけど、取りあえず正常に動くだけでよいよい。;-)</p>
]]></content:encoded>
			<wfw:commentRss>http://firehacks.org/posts/65/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress における引用符</title>
		<link>http://firehacks.org/posts/64</link>
		<comments>http://firehacks.org/posts/64#comments</comments>
		<pubDate>Thu, 27 Jul 2006 21:43:22 +0000</pubDate>
		<dc:creator>dynamis</dc:creator>
				<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://firehacks.org/blog/posts/64</guid>
		<description><![CDATA[英語などで書かれた日記などを読みやすくするためなのでしょうが、WordPress には引用符などを適当に整形してくれる機能があり、デフォルトで有効になっています。しかしソースコードなどを扱うときには勝手に書き換えられて困るし、日本語の文章では殆ど必要性がありません。
多分コレは有名な話で、同じようなプラグインも公開されていると思いますが、簡単だったのでさっくりプラグイン作りました。デフォルトで有効になっている wptexturize フィルタを全て無効にしているだけです。使いたい人は勝手に持って行ってください。
&#160;nowptexturize.php
]]></description>
			<content:encoded><![CDATA[<p>英語などで書かれた日記などを読みやすくするためなのでしょうが、WordPress には引用符などを適当に整形してくれる機能があり、デフォルトで有効になっています。しかしソースコードなどを扱うときには勝手に書き換えられて困るし、日本語の文章では殆ど必要性がありません。</p>
<p><span id="more-64"></span>多分コレは有名な話で、同じようなプラグインも公開されていると思いますが、簡単だったのでさっくりプラグイン作りました。デフォルトで有効になっている wptexturize フィルタを全て無効にしているだけです。使いたい人は勝手に持って行ってください。</p>
<p align="center">&nbsp;<a href="http://ftp.firehacks.org/wordpress/plugins/nowptexturize.php">nowptexturize.php</a></p>
]]></content:encoded>
			<wfw:commentRss>http://firehacks.org/posts/64/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ASCIIMathPHP for WordPress</title>
		<link>http://firehacks.org/posts/63</link>
		<comments>http://firehacks.org/posts/63#comments</comments>
		<pubDate>Thu, 27 Jul 2006 21:21:32 +0000</pubDate>
		<dc:creator>dynamis</dc:creator>
				<category><![CDATA[Physics]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[XML]]></category>

		<guid isPermaLink="false">http://firehacks.org/blog/posts/63</guid>
		<description><![CDATA[WordPress で数式を入力するため、ASCIIMathPHP を使って ASCIIMath 形式から MathML を生成するプラグインを作ってみました。後述の通り問題山積ですが、人柱万歳な方は好きに使ってください(使用法などの解説一切なし)。
asciimathphp.zip
ASCIIMathML のページにある例(の一部)とそれを変換させてみた結果はこんな感じです (Firefox など MathML 対応ブラウザでご覧ください):
x^2+y_1+z_12^34
x2+y1+z1234
sin^-1(x)
sin-1(x)
d/dxf(x)=lim_(h-&#62;0)(f(x+h)-f(x))/h
ddxf(x)=limh&#8594;0f(x+h)-f(x)h
\frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}
\ddxf(x)=\limh\to0\f(x+h)-f(x)h
f(x)=sum_(n=0)^oo(f^((n))(a))/(n!)(x-a)^n
f(x)=&#8721;n=0&#8734;f(n)(a)n!(x-a)n
f(x)=\sum_{n=0}^\infty\frac{f^{(n)}(a)}{n!}(x-a)^n
f(x)=\&#8721;n=0\&#8712;fty\f(n)(a)n!(x-a)n
[[a,b],[c,d]]((n),(k))
[abcd](nk)
x/x={(1,if x!=0),(text{undefined},if x=0):}
xx={1ifx&#8800;0undefinedifx=0
ご覧の通り LaTex 形式の数式はちゃんと変換できていません。単に ASCIIMathPHP がベースとしている ASCIIMathML.js のバージョンが古いからなのですが、ASCIIMathPHP をアップデートするのはかなり面倒そうです…
他にも問題があります。XML ドキュメントとして XHTML+MathML を生成することになるため、出力全体が Valid でなければなりません。しかし、現実の WordPress (や TinyMCE) は平気で Invalid な出力をしますので、うっかりしているとパースエラーになってしまいます…
]]></description>
			<content:encoded><![CDATA[<p>WordPress で数式を入力するため、<a href="http://www.jcphysics.com/ASCIIMath/" title="ASCIIMath ported to PHP">ASCIIMathPHP</a> を使って ASCIIMath 形式から MathML を生成するプラグインを作ってみました。後述の通り問題山積ですが、人柱万歳な方は好きに使ってください(使用法などの解説一切なし)。</p>
<p align="center"><a href="http://ftp.firehacks.org/wordpress/plugins/asciimathphp.zip">asciimathphp.zip</a></p>
<p><a href="http://www1.chapman.edu/~jipsen/mathml/asciimath.xml">ASCIIMathML のページ</a>にある例(の一部)とそれを変換させてみた結果はこんな感じです (Firefox など MathML 対応ブラウザでご覧ください):</p>
<p><span id="more-63"></span>x^2+y_1+z_12^34</p>
<blockquote><p><math xmlns="http://www.w3.org/1998/Math/MathML"><mstyle displaystyle="true"><msup><mi>x</mi><mn>2</mn></msup><mo>+</mo><msub><mi>y</mi><mn>1</mn></msub><mo>+</mo><mrow><msubsup><mi>z</mi><mn>12</mn><mn>34</mn></msubsup></mrow></mstyle></math></p></blockquote>
<p>sin^-1(x)</p>
<blockquote><p><math xmlns="http://www.w3.org/1998/Math/MathML"><mstyle displaystyle="true"><msup><mo>sin</mo><mn>-1</mn></msup><mrow><mo>(</mo><mi>x</mi><mo>)</mo></mrow></mstyle></math></p></blockquote>
<p>d/dxf(x)=lim_(h-&gt;0)(f(x+h)-f(x))/h</p>
<blockquote><p><math xmlns="http://www.w3.org/1998/Math/MathML"><mstyle displaystyle="true"><mfrac><mi>d</mi><mrow><mi>d</mi><mi>x</mi></mrow></mfrac><mi>f</mi><mrow><mo>(</mo><mi>x</mi><mo>)</mo></mrow><mo>=</mo><munder><mo>lim</mo><mrow><mi>h</mi><mo>&#8594;</mo><mn>0</mn></mrow></munder><mfrac><mrow><mi>f</mi><mrow><mo>(</mo><mi>x</mi><mo>+</mo><mi>h</mi><mo>)</mo></mrow><mo>-</mo><mi>f</mi><mrow><mo>(</mo><mi>x</mi><mo>)</mo></mrow></mrow><mi>h</mi></mfrac></mstyle></math></p></blockquote>
<p>\frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}</p>
<blockquote><p><math xmlns="http://www.w3.org/1998/Math/MathML"><mstyle displaystyle="true"><mo>\</mo><mfrac><mrow><mi>d</mi></mrow><mrow><mrow><mi>d</mi><mi>x</mi></mrow></mrow></mfrac><mi>f</mi><mrow><mo>(</mo><mi>x</mi><mo>)</mo></mrow><mo>=</mo><mo>\</mo><munder><mo>lim</mo><mrow><mi>h</mi><mo>\</mo><mi>t</mi><mi>o</mi><mn>0</mn></mrow></munder><mo>\</mo><mfrac><mrow><mi>f</mi><mrow><mo>(</mo><mi>x</mi><mo>+</mo><mi>h</mi><mo>)</mo></mrow><mo>-</mo><mi>f</mi><mrow><mo>(</mo><mi>x</mi><mo>)</mo></mrow></mrow><mrow><mi>h</mi></mrow></mfrac></mstyle></math></p></blockquote>
<p>f(x)=sum_(n=0)^oo(f^((n))(a))/(n!)(x-a)^n</p>
<blockquote><p><math xmlns="http://www.w3.org/1998/Math/MathML"><mstyle displaystyle="true"><mi>f</mi><mrow><mo>(</mo><mi>x</mi><mo>)</mo></mrow><mo>=</mo><mrow><munderover><mo>&#8721;</mo><mrow><mi>n</mi><mo>=</mo><mn>0</mn></mrow><mo>&#8734;</mo></munderover></mrow><mfrac><mrow><msup><mi>f</mi><mrow><mrow><mo>(</mo><mi>n</mi><mo>)</mo></mrow></mrow></msup><mrow><mo>(</mo><mi>a</mi><mo>)</mo></mrow></mrow><mrow><mi>n</mi><mo>!</mo></mrow></mfrac><msup><mrow><mo>(</mo><mi>x</mi><mo>-</mo><mi>a</mi><mo>)</mo></mrow><mi>n</mi></msup></mstyle></math></p></blockquote>
<p>f(x)=\sum_{n=0}^\infty\frac{f^{(n)}(a)}{n!}(x-a)^n</p>
<blockquote><p><math xmlns="http://www.w3.org/1998/Math/MathML"><mstyle displaystyle="true"><mi>f</mi><mrow><mo>(</mo><mi>x</mi><mo>)</mo></mrow><mo>=</mo><mo>\</mo><mrow><munderover><mo>&#8721;</mo><mrow><mi>n</mi><mo>=</mo><mn>0</mn></mrow><mo>\</mo></munderover></mrow><mo>&#8712;</mo><mi>f</mi><mi>t</mi><mi>y</mi><mo>\</mo><mfrac><mrow><msup><mi>f</mi><mrow><mrow><mo>(</mo><mi>n</mi><mo>)</mo></mrow></mrow></msup><mrow><mo>(</mo><mi>a</mi><mo>)</mo></mrow></mrow><mrow><mi>n</mi><mo>!</mo></mrow></mfrac><msup><mrow><mo>(</mo><mi>x</mi><mo>-</mo><mi>a</mi><mo>)</mo></mrow><mi>n</mi></msup></mstyle></math></p></blockquote>
<p>[[a,b],[c,d]]((n),(k))</p>
<blockquote><p><math xmlns="http://www.w3.org/1998/Math/MathML"><mstyle displaystyle="true"><mrow><mo>[</mo><mtable><mtr><mtd><mi>a</mi></mtd><mtd><mi>b</mi></mtd></mtr><mtr><mtd><mi>c</mi></mtd><mtd><mi>d</mi></mtd></mtr></mtable><mo>]</mo></mrow><mrow><mo>(</mo><mtable><mtr><mtd><mi>n</mi></mtd></mtr><mtr><mtd><mi>k</mi></mtd></mtr></mtable><mo>)</mo></mrow></mstyle></math></p></blockquote>
<p>x/x={(1,if x!=0),(text{undefined},if x=0):}</p>
<blockquote><p><math xmlns="http://www.w3.org/1998/Math/MathML"><mstyle displaystyle="true"><mfrac><mi>x</mi><mi>x</mi></mfrac><mo>=</mo><mrow><mo>{</mo><mtable columnalign="left"><mtr><mtd><mn>1</mn></mtd><mtd><mrow><mspace width="1ex"></mspace><mo>if</mo><mspace width="1ex"></mspace></mrow><mi>x</mi><mo>&#8800;</mo><mn>0</mn></mtd></mtr><mtr><mtd><mrow><mtext>undefined</mtext></mrow></mtd><mtd><mrow><mspace width="1ex"></mspace><mo>if</mo><mspace width="1ex"></mspace></mrow><mi>x</mi><mo>=</mo><mn>0</mn></mtd></mtr></mtable></mrow></mstyle></math></p></blockquote>
<p>ご覧の通り LaTex 形式の数式はちゃんと変換できていません。単に ASCIIMathPHP がベースとしている ASCIIMathML.js のバージョンが古いからなのですが、ASCIIMathPHP をアップデートするのはかなり面倒そうです…</p>
<p>他にも問題があります。XML ドキュメントとして XHTML+MathML を生成することになるため、出力全体が Valid でなければなりません。しかし、現実の WordPress (や TinyMCE) は平気で Invalid な出力をしますので、うっかりしているとパースエラーになってしまいます…</p>
]]></content:encoded>
			<wfw:commentRss>http://firehacks.org/posts/63/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>WordPress における実体参照</title>
		<link>http://firehacks.org/posts/61</link>
		<comments>http://firehacks.org/posts/61#comments</comments>
		<pubDate>Thu, 27 Jul 2006 20:39:58 +0000</pubDate>
		<dc:creator>dynamis</dc:creator>
				<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://firehacks.org/blog/posts/61</guid>
		<description><![CDATA[先日 WordPress のリッチテキストエディタ TinyMCE を最新バージョンにしましたが、個人的に大きな不満点であった、実体参照の扱いが挙動不審なのは解決しませんでした。&#60; や &#62; などがいつの間にか &#38;lt; や &#38;gt; に置き換わってしまったりするのです。
TinyMCE のプラグインに問題があるのかと色々いじってみたものの、ここの振る舞いを直せばあっちがおかしくなるといった感じでどうしても解決しませんでした。そこでふと WordPress 側の処理を確認してみたところ、MySQL からデータを読み込んでリッチテキストエディタに渡す前に (wp_richedit_pre() 関数で)次のような処理をしているのを発見しました:
// These must be double-escaped or planets will collide.
$output = str_replace('&#38;lt;', '&#38;amp;lt;', $output);
$output = str_replace('&#38;gt;', '&#38;amp;gt;', $output);&#160;
はぁ？何故 &#38;lt; と &#38;gt; だけ置き換えるんですか？そんなことしたら &#38;lt; と &#38;amp;lt; (エディタや表示出力では &#60; と &#38;lt; に相当)の区別が付かないじゃないですか。不可逆変換しないでください。(T_T)
ってことで、諸悪の根源であったこの二行を削除し、TinyMCE の WordPress プラグイン側での無駄な努力も撤去したら問題解決しました。;-)
公開している TinyMCE 2.0.6.1 for WordPress 2.0.x についても、この二行をコメントアウトするパッチ(とコメントアウト済みファイルも)を同梱し、日本語リソースの追加や設定変更などをしたバージョンで置き換えました。
tinymce-2.0.6.1.zip&#160;
同梱パッチを適用するか(現在ご利用のものが [...]]]></description>
			<content:encoded><![CDATA[<p>先日 WordPress のリッチテキストエディタ <a href="http://firehacks.org/blog/posts/32" title="TinyMCE 2.0.6.1 for WordPress 2.0.x">TinyMCE を最新バージョンにしました</a>が、個人的に大きな不満点であった、実体参照の扱いが挙動不審なのは解決しませんでした。&lt; や &gt; などがいつの間にか &amp;lt; や &amp;gt; に置き換わってしまったりするのです。</p>
<p><span id="more-61"></span>TinyMCE のプラグインに問題があるのかと色々いじってみたものの、ここの振る舞いを直せばあっちがおかしくなるといった感じでどうしても解決しませんでした。そこでふと WordPress 側の処理を確認してみたところ、MySQL からデータを読み込んでリッチテキストエディタに渡す前に (wp_richedit_pre() 関数で)次のような処理をしているのを発見しました:</p>
<blockquote><p>// These must be double-escaped or planets will collide.<br />
$output = str_replace('&amp;lt;', '&amp;amp;lt;', $output);<br />
$output = str_replace('&amp;gt;', '&amp;amp;gt;', $output);&nbsp;</p></blockquote>
<p>はぁ？何故 &amp;lt; と &amp;gt; だけ置き換えるんですか？そんなことしたら &amp;lt; と &amp;amp;lt; (エディタや表示出力では &lt; と &amp;lt; に相当)の区別が付かないじゃないですか。<strong>不可逆変換しないでください</strong>。(T_T)</p>
<p>ってことで、諸悪の根源であったこの二行を削除し、TinyMCE の WordPress プラグイン側での無駄な努力も撤去したら問題解決しました。;-)</p>
<p>公開している TinyMCE 2.0.6.1 for WordPress 2.0.x についても、この二行をコメントアウトするパッチ(とコメントアウト済みファイルも)を同梱し、日本語リソースの追加や設定変更などをしたバージョンで置き換えました。</p>
<p align="center"><a href="http://ftp.firehacks.org/wordpress/tinymce-2.0.6.1.zip">tinymce-2.0.6.1.zip</a>&nbsp;</p>
<p>同梱パッチを適用するか(現在ご利用のものが WordPress オリジナルのものと変更がなければ)単に functions-formatting.php を同梱のもので置き換え、tinymce ディレクトリも同梱のもので置き換えれば動くはずです。</p>
]]></content:encoded>
			<wfw:commentRss>http://firehacks.org/posts/61/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>TinyMCE 2.0.6.1 のテスト</title>
		<link>http://firehacks.org/posts/33</link>
		<comments>http://firehacks.org/posts/33#comments</comments>
		<pubDate>Thu, 29 Jun 2006 19:46:42 +0000</pubDate>
		<dc:creator>dynamis</dc:creator>
				<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://firehacks.org/blog/posts/33</guid>
		<description><![CDATA[WordPress の TinyMCE を最新版にしたついでに、設定を変更して色々用意されている機能を追加して使ってみるテスト。
太字（strong）  斜体 （em)  取消線テキスト （strike）  リンクテキスト
通常のテキスト下付き （Sub）   通常のテキスト上付き （sup)
実体参照: &#38; &#34; ¢ € £ ¥ © ® ™ などなど
&#160;

スマイリー: 
赤いテキスト 青いテキスト 緑のテキスト
赤い背景のテキスト 青い背景のテキスト 緑の背景のテキスト

ヘッダ要素 （h1～h6, これは h3）
address 要素

pre   formated   text
&#160;
この他にも元に戻すとやり直す、検索と置換、水平線、表の作成とセル操作、テキストスタイルの削除、CSS スタイルの詳細設定、ソース表示、プレビュー表示などなどを使えるようにした。結構良い感じ。
どんな感じか試してみたい人は TinyMCE サイトのサンプルなどをご覧ください。WordPress に導入してみたくなった人は、tinymce-2.0.6.1.zip を使ってください。なお、ツールバーのボタンの配置や使用する TinyMCE プラグインなどのカスタマイズは  tiny_mce_gzip.php でおこないます。
詳細は TinyMCE のマニュアルをご覧ください。同梱している tiny_mce_gzip.php [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://firehacks.org/blog/posts/32" title="TinyMCE 2.0.6.1 for WordPress 2.0.x">WordPress の TinyMCE を最新版にした</a>ついでに、設定を変更して色々用意されている機能を追加して使ってみるテスト。</p>
<p><span id="more-33"></span><strong>太字（strong）</strong>  <em>斜体 （em)</em>  <strike>取消線テキスト （strike）</strike>  <a href="http://firehacks.org/" title="title">リンクテキスト</a></p>
<p align="center">通常のテキスト<sub>下付き （Sub）</sub>   通常のテキスト<sup>上付き （sup)</sup></p>
<p align="right">実体参照: &amp; &quot; ¢ € £ ¥ © ® ™ などなど</p>
<p align="left">&nbsp;</p>
<div style="text-align: center"><a href="http://firehacks.org/blog/wp-content/uploads/2006/06/tinymcetoolbar.png" title="クリックすると全体を表示"><img alt="tinymcetoolbar-part.png" id="image36" src="http://firehacks.org/blog/wp-content/uploads/2006/06/tinymcetoolbar-part.png" /></a></div>
<p align="left">スマイリー: <img alt="Cool" border="0" src="http://firehacks.org/blog/wp-includes/js/tinymce/plugins/emotions/images/smiley-cool.gif" title="Cool" /><img alt="Cry" border="0" src="http://firehacks.org/blog/wp-includes/js/tinymce/plugins/emotions/images/smiley-cry.gif" title="Cry" /><img alt="Embarassed" border="0" src="http://firehacks.org/blog/wp-includes/js/tinymce/plugins/emotions/images/smiley-embarassed.gif" title="Embarassed" /><img alt="Foot in mouth" border="0" src="http://firehacks.org/blog/wp-includes/js/tinymce/plugins/emotions/images/smiley-foot-in-mouth.gif" title="Foot in mouth" /><img alt="Frown" border="0" src="http://firehacks.org/blog/wp-includes/js/tinymce/plugins/emotions/images/smiley-frown.gif" title="Frown" /><img alt="Innocent" border="0" src="http://firehacks.org/blog/wp-includes/js/tinymce/plugins/emotions/images/smiley-innocent.gif" title="Innocent" /><img alt="Kiss" border="0" src="http://firehacks.org/blog/wp-includes/js/tinymce/plugins/emotions/images/smiley-kiss.gif" title="Kiss" /><img alt="Laughing" border="0" src="http://firehacks.org/blog/wp-includes/js/tinymce/plugins/emotions/images/smiley-laughing.gif" title="Laughing" /><img alt="Money mouth" border="0" src="http://firehacks.org/blog/wp-includes/js/tinymce/plugins/emotions/images/smiley-money-mouth.gif" title="Money mouth" /><img alt="Sealed" border="0" src="http://firehacks.org/blog/wp-includes/js/tinymce/plugins/emotions/images/smiley-sealed.gif" title="Sealed" /><img alt="Smile" border="0" src="http://firehacks.org/blog/wp-includes/js/tinymce/plugins/emotions/images/smiley-smile.gif" title="Smile" /><img alt="Surprised" border="0" src="http://firehacks.org/blog/wp-includes/js/tinymce/plugins/emotions/images/smiley-surprised.gif" title="Surprised" /><img alt="Tongue out" border="0" src="http://firehacks.org/blog/wp-includes/js/tinymce/plugins/emotions/images/smiley-tongue-out.gif" title="Tongue out" /><img alt="Undecided" border="0" src="http://firehacks.org/blog/wp-includes/js/tinymce/plugins/emotions/images/smiley-undecided.gif" title="Undecided" /><img alt="Wink" border="0" src="http://firehacks.org/blog/wp-includes/js/tinymce/plugins/emotions/images/smiley-wink.gif" title="Wink" /><img alt="Yell" border="0" src="http://firehacks.org/blog/wp-includes/js/tinymce/plugins/emotions/images/smiley-yell.gif" title="Yell" /></p>
<p align="left"><font color="#ff0000">赤いテキスト</font> <font color="#0000ff">青いテキスト</font> <font color="#009900">緑のテキスト</font></p>
<p align="right"><span style="background-color: #ff0000">赤い背景のテキスト</span> <span style="background-color: #0066ff">青い背景のテキスト</span> <span style="background-color: #00ff00">緑の背景のテキスト</span></p>
<div align="left">
<h3>ヘッダ要素 （h1～h6, これは h3）</h3>
<address>address 要素</address>
</div>
<pre>pre   formated   text</pre>
<p align="left">&nbsp;</p>
<p>この他にも元に戻すとやり直す、検索と置換、水平線、表の作成とセル操作、テキストスタイルの削除、CSS スタイルの詳細設定、ソース表示、プレビュー表示などなどを使えるようにした。結構良い感じ。</p>
<p>どんな感じか試してみたい人は <a href="http://tinymce.moxiecode.com/example_full.php?example=true" title="Full featured example">TinyMCE サイトのサンプル</a>などをご覧ください。WordPress に導入してみたくなった人は、<a href="http://ftp.firehacks.org/wordpress/tinymce-2.0.6.1.zip">tinymce-2.0.6.1.zip</a> を使ってください。なお、ツールバーのボタンの配置や使用する TinyMCE プラグインなどのカスタマイズは  tiny_mce_gzip.php でおこないます。</p>
<p>詳細は <a href="http://tinymce.moxiecode.com/tinymce/docs/index.html">TinyMCE のマニュアル</a>をご覧ください。同梱している tiny_mce_gzip.php では上記スクリーンショットのツールバーになりますが、TinyMCE のバージョンだけ上げて WordPress 標準のツールバーに戻して使うには tiny_mce_gzip.simple.php を使ってください。</p>
<p>最後に、しつこいようですが何が起きても責任は持ちません。(^^;</p>
]]></content:encoded>
			<wfw:commentRss>http://firehacks.org/posts/33/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>TinyMCE 2.0.6.1 for WordPress 2.0.x</title>
		<link>http://firehacks.org/posts/32</link>
		<comments>http://firehacks.org/posts/32#comments</comments>
		<pubDate>Thu, 29 Jun 2006 10:46:35 +0000</pubDate>
		<dc:creator>dynamis</dc:creator>
				<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://firehacks.org/blog/posts/32</guid>
		<description><![CDATA[WordPress 2 には TinyMCE という JavaScript で書かれたリッチテキストエディタが内蔵されているのですが、これがまたバグがいっぱいあって困ったものなんです。例えば

改行と段落の扱いが挙動不審で頻繁に狂う
投稿中の実体参照を上手く取り扱えない
多段リストのコードが時々壊れることがある
編集中に B 要素などの開始タグだけが残ることがある
何故か半角空白が本文中に挿入されてしまうことがある
Blockquote をインデント目的で使うなど
CSS は仕様違反の嵐が吹き荒れる

といった感じなのです。かといってこれらの問題を修正するのはかなり大変そうだったので、泣く泣くだましだまし使ってきたのですが、いい加減耐えかねてきたのでコードをのぞいてみると、昨年 12月以前の古い TinyMCE が同梱されているではないですか。
TinyMCE のサイトに行ってみると 2.0.6.1 が最新バージョンであり、上記の問題が全て解決するわけではないにしても、結構色々修正されている模様。そこで取りあえず最新版で置き換えてみることにしました。
が、例のごとくそのままでは全く動きません。しかも Venkman でデバッグしようとしたら Firefox がフリーズしたりクラッシュしたりしてくれます。(T_T)
仕方ないので JavaScript コンソールのエラーメッセージを頼りに、地道に alert() を使ってデバッグしました。WordPress も TinyMCE もソースをいじったことがないですし、ちゃんとテストしてないので(というか、この投稿がテスト(^^;)色々問題あるかもしれませんが、一応動いてるような気がします。試してみたいチャレンジャーな人は自由にどうぞ。
tinymce-2.0.6.1.zip
解凍したら WordPress の wp-includes/js/tinymce ディレクトリを置き換えるだけです。何が起きても責任とりません。簡単な質問くらいは受け付けますが、サポートするつもりは毛頭ありません。はい。(^^;
追記: 修正版で置き換えました
]]></description>
			<content:encoded><![CDATA[<p><a href="http://wordpress.org/">WordPress 2</a> には <a href="http://tinymce.moxiecode.com/">TinyMCE</a> という JavaScript で書かれたリッチテキストエディタが内蔵されているのですが、これがまたバグがいっぱいあって困ったものなんです。例えば</p>
<ul>
<li>改行と段落の扱いが挙動不審で頻繁に狂う</li>
<li>投稿中の実体参照を上手く取り扱えない</li>
<li>多段リストのコードが時々壊れることがある</li>
<li>編集中に B 要素などの開始タグだけが残ることがある</li>
<li>何故か半角空白が本文中に挿入されてしまうことがある</li>
<li>Blockquote をインデント目的で使うなど</li>
<li>CSS は仕様違反の嵐が吹き荒れる</li>
</ul>
<p>といった感じなのです。かといってこれらの問題を修正するのはかなり大変そうだったので、泣く泣くだましだまし使ってきたのですが、いい加減耐えかねてきたのでコードをのぞいてみると、昨年 12月以前の古い TinyMCE が同梱されているではないですか。</p>
<p><span id="more-32"></span>TinyMCE のサイトに行ってみると 2.0.6.1 が最新バージョンであり、上記の問題が全て解決するわけではないにしても、結構色々修正されている模様。そこで取りあえず最新版で置き換えてみることにしました。</p>
<p>が、例のごとくそのままでは全く動きません。しかも Venkman でデバッグしようとしたら Firefox がフリーズしたりクラッシュしたりしてくれます。(T_T)</p>
<p>仕方ないので JavaScript コンソールのエラーメッセージを頼りに、地道に alert() を使ってデバッグしました。WordPress も TinyMCE もソースをいじったことがないですし、ちゃんとテストしてないので(というか、この投稿がテスト(^^;)色々問題あるかもしれませんが、一応動いてるような気がします。試してみたいチャレンジャーな人は自由にどうぞ。</p>
<p align="center"><a href="http://ftp.firehacks.org/wordpress/tinymce-2.0.6.1.zip">tinymce-2.0.6.1.zip</a></p>
<p align="left">解凍したら WordPress の wp-includes/js/tinymce ディレクトリを置き換えるだけです。何が起きても責任とりません。簡単な質問くらいは受け付けますが、サポートするつもりは毛頭ありません。はい。(^^;</p>
<p align="left">追記: <a href="http://firehacks.org/blog/posts/61" title="WordPress における実体参照">修正版で置き換えました</a></p>
]]></content:encoded>
			<wfw:commentRss>http://firehacks.org/posts/32/feed</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Akismet によるスパム誤検出 (お詫び)</title>
		<link>http://firehacks.org/posts/29</link>
		<comments>http://firehacks.org/posts/29#comments</comments>
		<pubDate>Wed, 28 Jun 2006 18:35:59 +0000</pubDate>
		<dc:creator>dynamis</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[other]]></category>

		<guid isPermaLink="false">http://firehacks.org/blog/posts/29</guid>
		<description><![CDATA[どうもコメントが一切無いなと思っていたら、Akismet が誤検出してスパム扱いしていたものが発見されました。しかし一ヶ月以上前のコメントは自動削除されているため、それ以前に投稿されていたもので気づかないままスパム扱いされていたものがあったかもしれません。
折角コメントしていただいたのに大変申し訳ありません。今後はスパムの保存期間を 3ヶ月に延ばすと共に、もう少しこまめにごみ箱(Akismet が検出した Spam)をチェックするようにします。m(_ _)m
このような誤検出をするだろうと思って、この Blog (WordPress) では当初 Akismet (WordPress 標準のスパム対策ツール)を利用しておりませんでした。しかし、あまりにもスパムが増えたため一ヶ月ちょっと前から仕方なく(効果の程を確認したいという興味もあって)導入したものでした。
L10N フォーラムや翻訳部門フォーラムであればこの手の誤検出がある自動判別ツールは導入しないのですが、個人のサイトだから多少誤検出があっても救出すればいいかと思っていました。デフォルトの保存期間が 15日だったのはあまりに短かったので一ヶ月保存するようカスタマイズして導入してはいましたが、それ以上の間ごみ箱をチェックせずに放置してしまった私は馬鹿者です…ごめんなさい。m(_ _)m
]]></description>
			<content:encoded><![CDATA[<p>どうもコメントが一切無いなと思っていたら、Akismet が誤検出してスパム扱いしていたものが発見されました。しかし一ヶ月以上前のコメントは自動削除されているため、それ以前に投稿されていたもので気づかないままスパム扱いされていたものがあったかもしれません。</p>
<p>折角コメントしていただいたのに大変申し訳ありません。今後はスパムの保存期間を 3ヶ月に延ばすと共に、もう少しこまめにごみ箱(Akismet が検出した Spam)をチェックするようにします。m(_ _)m</p>
<p><span id="more-29"></span>このような誤検出をするだろうと思って、この Blog (WordPress) では当初 Akismet (WordPress 標準のスパム対策ツール)を利用しておりませんでした。しかし、あまりにもスパムが増えたため一ヶ月ちょっと前から仕方なく(効果の程を確認したいという興味もあって)導入したものでした。</p>
<p><a href="http://forums.firehacks.org/l10n/"><abbr title="Localization">L10N</abbr> フォーラム</a>や<a href="http://forums.firehacks.org/trans/">翻訳部門フォーラム</a>であればこの手の誤検出がある自動判別ツールは導入しないのですが、個人のサイトだから多少誤検出があっても救出すればいいかと思っていました。デフォルトの保存期間が 15日だったのはあまりに短かったので一ヶ月保存するようカスタマイズして導入してはいましたが、それ以上の間ごみ箱をチェックせずに放置してしまった私は馬鹿者です…ごめんなさい。m(_ _)m</p>
]]></content:encoded>
			<wfw:commentRss>http://firehacks.org/posts/29/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
