<?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>阅微堂 &#187; LaTeX</title>
	<atom:link href="http://zhiqiang.org/blog/tag/latex/feed" rel="self" type="application/rss+xml" />
	<link>http://zhiqiang.org/blog</link>
	<description>数学、金融、计算机</description>
	<lastBuildDate>Wed, 23 May 2012 08:37:55 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>MathJax让你爱上数学公式</title>
		<link>http://zhiqiang.org/blog/it/mathjax-make-mathematics-beautiful.html</link>
		<comments>http://zhiqiang.org/blog/it/mathjax-make-mathematics-beautiful.html#comments</comments>
		<pubDate>Thu, 22 Mar 2012 13:15:31 +0000</pubDate>
		<dc:creator>zhiqiang</dc:creator>
				<category><![CDATA[IT技术]]></category>
		<category><![CDATA[LaTeX]]></category>
		<category><![CDATA[MathJax]]></category>
		<category><![CDATA[数学公式]]></category>

		<guid isPermaLink="false">http://zhiqiang.org/blog/?p=4789</guid>
		<description><![CDATA[博客 » IT技术 » LaTeX，MathJax，数学公式 » 如果让我投票最优秀的开源项目，我会投给MathJax。MathJax是一个JavaScript引擎，用来显示网络上的数学公式。阅微堂上所有数学公式都用LaTex写出，通过MathJax来显示。 一个好消息是，MathJax已经更新到了2.0，更新的内容见What's new in MathJax v2.0。比较有用的新增功能是支持公式编号和引用。在一个公式内使用 \label{id}给公式编号，然后再在...]]></description>
			<content:encoded><![CDATA[<p id="breadcrumb" class="breadcrumb"><a href="http://zhiqiang.org/blog/">博客</a> » <a href="http://zhiqiang.org/blog/category/it">IT技术</a> » <a href="http://zhiqiang.org/blog/tag/latex" rel="tag">LaTeX</a>，<a href="http://zhiqiang.org/blog/tag/mathjax" rel="tag">MathJax</a>，<a href="http://zhiqiang.org/blog/tag/%e6%95%b0%e5%ad%a6%e5%85%ac%e5%bc%8f" rel="tag">数学公式</a> » </p><p>如果让我投票最优秀的开源项目，我会投给<a href="http://mathjax.org">MathJax</a>。MathJax是一个JavaScript引擎，用来显示网络上的数学公式。阅微堂上所有数学公式都用LaTex写出，通过MathJax来显示。</p>
<p>一个好消息是，MathJax已经更新到了2.0，更新的内容见<a href="http://www.mathjax.org/docs/2.0/whats-new-2.0.html">What's new in MathJax v2.0</a>。比较有用的新增功能是支持公式编号和引用。在一个公式内使用 <code>\label{id}</code>给公式编号，然后再在合适的地方<code>\ref{id}</code>即可引用该公式。比如我可以引用公式(\ref{exampleone})：</p>
<p><p style='text-align:center;'><span class='MathJax_Preview'><img src='http://zhiqiang.org/blog/wp-content/plugins/latex/cache/tex_922548fded7b43d14775077234b0803a.gif' style='vertical-align: middle; border: none;' class='tex' alt="\begin{equation}\label{exampleone}r = r_F+ \beta (r_M - r_F) + \epsilon\end{equation}" /></span><script type='math/tex;  mode=display'>\begin{equation}\label{exampleone}r = r_F+ \beta (r_M - r_F) + \epsilon\end{equation}</script></p></p>
<p>可惜的是，MathJax的默认设置文件没有打开上面的两个特性，所以需要进MathJax进行额外的配置：</p>
<blockquote>
<pre>&lt;script type="text/x-mathjax-config"&gt;
    MathJax.Hub.Config({
        TeX: {equationNumbers: {autoNumber: ["AMS"], useLabelIds: true}},
        "HTML-CSS": {linebreaks: {automatic: true}},
        SVG: {linebreaks: {automatic: true}}
    });
&lt;/script&gt;</pre>
</blockquote>
<p>可以说，对于普通的数学公式，目前MathJax的功能和显示效果已经完全可以媲美于Latex，而HTML/CSS对位置和格式的控制能力要比Latex更强大。以后，看数学论文不需要再下载pdf文件，而是可以直接在网页上进行浏览。</p>
<p>不过我写这篇文章的目的是想说：我更新了<a href="http://zhiqiang.org/blog/it/latex-for-wordpress.html">插件Latex for WordPress</a>，最新版本为3.3，请大家更新。新版本主要修复了无法显示LaTex源代码的bug，以及增加了MathJax后台配置选项（比如可配置上面公式编号所需的代码）。</p>
<div><h4>相关文章</h4><ul><li ><a href="http://zhiqiang.org/blog/it/latex-for-wordpress.html">在博客上写数学公式的插件LaTex for WordPress</a></li><li class='currentpost'><a href="http://zhiqiang.org/blog/it/mathjax-make-mathematics-beautiful.html">MathJax让你爱上数学公式</a></li><li ><a href="http://zhiqiang.org/blog/resource/generate-latex-images-online.html">在线处理Latex数学公式的几个方式</a></li></ul></div>    <p></p>
    <hr noshade style="margin:0;height:1px" />
    <p>&copy; zhiqiang for <a href="http://zhiqiang.org/blog">阅微堂</a>, 2012. | <a href="http://zhiqiang.org/blog/it/mathjax-make-mathematics-beautiful.html">&#38142;&#25509;</a> | <a href="http://zhiqiang.org/blog/it/mathjax-make-mathematics-beautiful.html#comments">19 &#26465;&#35780;&#35770;</a></p>]]></content:encoded>
			<wfw:commentRss>http://zhiqiang.org/blog/it/mathjax-make-mathematics-beautiful.html/feed</wfw:commentRss>
		<slash:comments>19</slash:comments>
		</item>
		<item>
		<title>在博客上写数学公式的插件LaTex for WordPress</title>
		<link>http://zhiqiang.org/blog/it/latex-for-wordpress.html</link>
		<comments>http://zhiqiang.org/blog/it/latex-for-wordpress.html#comments</comments>
		<pubDate>Sat, 19 Mar 2011 10:33:26 +0000</pubDate>
		<dc:creator>zhiqiang</dc:creator>
				<category><![CDATA[IT技术]]></category>
		<category><![CDATA[LaTeX]]></category>
		<category><![CDATA[MathJax]]></category>
		<category><![CDATA[数学公式]]></category>

		<guid isPermaLink="false">http://zhiqiang.org/blog/?p=2070</guid>
		<description><![CDATA[博客 » IT技术 » LaTeX，MathJax，数学公式 » 插件主页 http://wordpress.org/extend/plugins/latex/ 该插件主要是用来在博客上显示数学公式，大家可直接在标题、文章内容和留言中使用LaTex代码输入公式，特别方便。 使用\(\alpha+\beta\geq\frac12\)输出行内公式： 使用\[\alpha+\beta\geq\frac12\]输出行间公式公式： 在公式最后添加“!”输出公式源代码，比如\(\alpha+\beta\geq\frac12!\)将输出：\(\alpha+\beta\ge...]]></description>
			<content:encoded><![CDATA[<p id="breadcrumb" class="breadcrumb"><a href="http://zhiqiang.org/blog/">博客</a> » <a href="http://zhiqiang.org/blog/category/it">IT技术</a> » <a href="http://zhiqiang.org/blog/tag/latex" rel="tag">LaTeX</a>，<a href="http://zhiqiang.org/blog/tag/mathjax" rel="tag">MathJax</a>，<a href="http://zhiqiang.org/blog/tag/%e6%95%b0%e5%ad%a6%e5%85%ac%e5%bc%8f" rel="tag">数学公式</a> » </p><p>插件主页 <a href="http://wordpress.org/extend/plugins/latex/">http://wordpress.org/extend/plugins/latex/</a></p>
<p>该插件主要是用来在博客上显示数学公式，大家可直接在标题、文章内容和留言中使用LaTex代码输入公式，特别方便。</p>
<ul>
<li>使用<code class='tex2jax_ignore'>\(\alpha+\beta\geq\frac12\)</code>输出行内公式：<span class='MathJax_Preview'><img src='http://zhiqiang.org/blog/wp-content/plugins/latex/cache/tex_58550e3ccf0c35f886f37ac46db65a6e.gif' style='vertical-align: middle; border: none; ' class='tex' alt="\alpha+\beta\geq\frac12" /></span><script type='math/tex'>\alpha+\beta\geq\frac12</script></li>
<li>使用<code class='tex2jax_ignore'>\[\alpha+\beta\geq\frac12\]</code>输出行间公式公式：</li>
</ul>
<p><p style='text-align:center;'><span class='MathJax_Preview'><img src='http://zhiqiang.org/blog/wp-content/plugins/latex/cache/tex_58550e3ccf0c35f886f37ac46db65a6e.gif' style='vertical-align: middle; border: none;' class='tex' alt="\alpha+\beta\geq\frac12" /></span><script type='math/tex;  mode=display'>\alpha+\beta\geq\frac12</script></p></p>
<ul>
<li>在公式最后添加“!”输出公式源代码，比如<code class='tex2jax_ignore'>\(\alpha+\beta\geq\frac12!\)</code>将输出：<code class='tex2jax_ignore'>\(\alpha+\beta\geq\frac12\)</code></li>
<li>本插件使用MathJax引擎显示数学公式（可选），同时缓存了图片，供MathJax载入之前以及非本地阅读（比如Google Reader）使用。</li>
<li>启用插件，无需配置即可使用。也可在后台修改图片和MathJax服务器地址。</li>
</ul>
<p>Logs：</p>
<ol>
<li>2012-03-23更新到V3.4：现在可以关闭公式的图形显示。某些用户的服务器获取公式的图片有困难，可选择关闭。</li>
<li>2012-03-22更新到V3.3：修复显示Latex源代码的Bug；后台可直接配置MathJax。</li>
<li>2012-02-17更新到V3.2：只有当需要时才载入MathJax脚本。</li>
<li>2011-12-10更新到V3.0：启用MathJax引擎。</li>
</ol>
<p>本博客很多文章里都有大量的公式，就是使用这个插件来处理的，可对比效果，比如<a href="http://zhiqiang.org/blog/finance/school/risk-aversion-in-portfolio-optimization.html" rel="bookmark">风险厌恶系数的影响、敏感性和选取方法</a>、<a href="http://zhiqiang.org/blog/finance/school/kelly-criterion-ii.html" rel="bookmark">用凯利判据做组合优化和资产配置II</a>。</p>
<p>欢迎使用和提交bugs，原使用者直接在后台升级即可，新使用者可<a href="http://downloads.wordpress.org/plugin/latex.zip">下载安装文件</a>然后上传安装，或者直接在博客后台搜索latex for wordpress进行安装。</p>
<p>附：MathJax的配置：</p>
<pre style='color:#000000;'><span style='color:#808030; '>&lt;</span>script type<span style='color:#808030; '>=</span><span style='color:#800000; '>"</span><span style='color:#0000e6; '>text/x-mathjax-config</span><span style='color:#800000; '>"</span><span style='color:#808030; '>></span>
    MathJax<span style='color:#808030; '>.</span>Hub<span style='color:#808030; '>.</span>Config<span style='color:#808030; '>(</span><span style='color:#800080; '>{</span>
        TeX<span style='color:#800080; '>:</span> <span style='color:#800080; '>{</span>
            equationNumbers<span style='color:#800080; '>:</span> <span style='color:#800080; '>{</span>
                autoNumber<span style='color:#800080; '>:</span> <span style='color:#808030; '>[</span><span style='color:#800000; '>"</span><span style='color:#0000e6; '>AMS</span><span style='color:#800000; '>"</span><span style='color:#808030; '>]</span><span style='color:#808030; '>,</span>
                useLabelIds<span style='color:#800080; '>:</span> <span style='color:#0f4d75; '>true</span>
            <span style='color:#800080; '>}</span>
        <span style='color:#800080; '>}</span><span style='color:#808030; '>,</span>
        <span style='color:#800000; '>"</span><span style='color:#0000e6; '>HTML-CSS</span><span style='color:#800000; '>"</span><span style='color:#800080; '>:</span> <span style='color:#800080; '>{</span>
            linebreaks<span style='color:#800080; '>:</span> <span style='color:#800080; '>{</span>
                automatic<span style='color:#800080; '>:</span> <span style='color:#0f4d75; '>true</span>
            <span style='color:#800080; '>}</span><span style='color:#808030; '>,</span>
            scale<span style='color:#800080; '>:</span> <span style='color:#008c00; '>100</span>
        <span style='color:#800080; '>}</span><span style='color:#808030; '>,</span>
        SVG<span style='color:#800080; '>:</span> <span style='color:#800080; '>{</span>
            linebreaks<span style='color:#800080; '>:</span> <span style='color:#800080; '>{</span>
                automatic<span style='color:#800080; '>:</span> <span style='color:#0f4d75; '>true</span>
            <span style='color:#800080; '>}</span>
        <span style='color:#800080; '>}</span>
    <span style='color:#800080; '>}</span><span style='color:#808030; '>)</span><span style='color:#800080; '>;</span>
<span style='color:#808030; '>&lt;</span><span style='color:#808030; '>/</span>script<span style='color:#808030; '>></span>
</pre>
<div><h4>相关文章</h4><ul><li class='currentpost'><a href="http://zhiqiang.org/blog/it/latex-for-wordpress.html">在博客上写数学公式的插件LaTex for WordPress</a></li><li ><a href="http://zhiqiang.org/blog/it/mathjax-make-mathematics-beautiful.html">MathJax让你爱上数学公式</a></li><li ><a href="http://zhiqiang.org/blog/resource/generate-latex-images-online.html">在线处理Latex数学公式的几个方式</a></li></ul></div>    <p></p>
    <hr noshade style="margin:0;height:1px" />
    <p>&copy; zhiqiang for <a href="http://zhiqiang.org/blog">阅微堂</a>, 2011. | <a href="http://zhiqiang.org/blog/it/latex-for-wordpress.html">&#38142;&#25509;</a> | <a href="http://zhiqiang.org/blog/it/latex-for-wordpress.html#comments">94 &#26465;&#35780;&#35770;</a></p>]]></content:encoded>
			<wfw:commentRss>http://zhiqiang.org/blog/it/latex-for-wordpress.html/feed</wfw:commentRss>
		<slash:comments>94</slash:comments>
		</item>
		<item>
		<title>在线处理Latex数学公式的几个方式</title>
		<link>http://zhiqiang.org/blog/resource/generate-latex-images-online.html</link>
		<comments>http://zhiqiang.org/blog/resource/generate-latex-images-online.html#comments</comments>
		<pubDate>Tue, 16 Nov 2010 04:01:45 +0000</pubDate>
		<dc:creator>zhiqiang</dc:creator>
				<category><![CDATA[资源]]></category>
		<category><![CDATA[LaTeX]]></category>

		<guid isPermaLink="false">http://zhiqiang.org/blog/?p=1525</guid>
		<description><![CDATA[博客 » 资源 » LaTeX » 在这个网络日志上有些文章里大片的数学公式，在写文章时使用了LaTex，然后用插件调用在线生成latex图片的服务生成gif图片显示出来。这种插件有很多，比如我写过一个LaTex for WordPress，后来又有人改进了一个自定义性更强的版本wp-LaTex。下面主要列举一些常用的在线生成LaTex图片的服务。 mimetex服务 安装mimetex服务不需要服务器上安装Latex，因为它内部包...]]></description>
			<content:encoded><![CDATA[<p id="breadcrumb" class="breadcrumb"><a href="http://zhiqiang.org/blog/">博客</a> » <a href="http://zhiqiang.org/blog/category/resource">资源</a> » <a href="http://zhiqiang.org/blog/tag/latex" rel="tag">LaTeX</a> » </p><p>在这个网络日志上有些文章里大片的数学公式，在写文章时使用了LaTex，然后用插件调用在线生成latex图片的服务生成gif图片显示出来。这种插件有很多，比如我写过一个<a href="http://wordpress.org/extend/plugins/latex/">LaTex for WordPress</a>，后来又有人改进了一个自定义性更强的版本<a href="http://wordpress.org/extend/plugins/wp-latex/">wp-LaTex</a>。下面主要列举一些常用的在线生<span style="font-weight: normal;"><span style="font-weight: normal;">成LaTex</span>图片的服</span><span style="font-weight: normal;">务。</span></p>
<h4>mimetex服务</h4>
<p><img src="http://tex.72pines.com/latex.php?latex=\alpha\geq\int\frac{\beta}{\sum\gamma}" alt="" /></p>
<p>安装mimetex服务不需要服务器上安装Latex，因为它内部包含一个小型latex编译器，故它安装简便，将安装文件放入cgi目录下就可以直接调用，缺点为图片分辨率稍低。</p>
<p><a href="http://www.forkosh.dreamhost.com/source_mimetexmanual.html">安装文件和文档</a></p>
<p>也可以直接用网上已有的服务器，比如 http://tex.72pines.com/latex.php?latex=。这种方法缺点就是别人的服务器指不定哪天就不让用了。</p>
<h4>WordPress.com的Latex服务器</h4>
<p><img src="http://l.wordpress.com/latex.php?bg=ffffff&amp;fg=000000&amp;s=0&amp;latex=\alpha\geq\int\frac{\beta}{\sum\gamma}" alt="" /></p>
<p>wordpress.com官方提供了一个生成latex图片的服务，服务器地址为http://l.wordpress.com/latex.php?bg=ffffff&amp;fg=000000&amp;s=0&amp;latex=。</p>
<p>从图片上看，似乎就是一个mimetex服务。好处是它作为wordpress.com的御用服务器会非常稳定，缺点嘛，l.wordpress.com在中国的可访问状态一直处于量子状态，在尝试之前是不知道它是否可访问。</p>
<p>Google Chart服务器</p>
<p><img src="http://chart.apis.google.com/chart?cht=tx&amp;chl=\alpha\geq\int\frac{\beta}{\sum\gamma}" alt="" /></p>
<p>Google出品必属精品，图片质量要比mimetex和wordpress的强。</p>
<p>服务器地址 <a href="http://chart.apis.google.com/chart?cht=tx&amp;chl=\alpha\geq\frac{\beta}{\sum%20a}">http://chart.apis.google.com/chart?cht=tx&amp;chl=\alpha\geq\frac{\beta}{\sum%20a}</a>。</p>
<h4>mathtex服务</h4>
<p><img src="https://www.quantnet.com/cgi-bin/mathtex.cgi?%5Calpha%5Cgeq%5Cint%5Cfrac%7B%5Cbeta%7D%7B%5Csum%5Cgamma%7D" alt="" /></p>
<p>mathtex是mimetex的哥哥，同一个妈生的。不同点是mathtex直接调用Latex编译器来生成图片，所以它需要在服务器上先安装latex。</p>
<p>自己编译安装该服务的<a href="http://www.forkosh.dreamhost.com/source_mathtex.html">安装文件和文档</a>。</p>
<p>也可以直接用网上已有的服务器，比如 http://www.quantnet.com/cgi-bin/mathtex.cgi?。这种方法缺点就是别人的服务器指不定哪天就不让用了。</p>
<p>从上面图片的例子可以看出mathtex生成的图片清晰度要比mimetex好。事实上，mathtex可以通过在公式前加入\dpi{number}指定分辨率。所以目前这儿已经开始使用mathtex服务替换使用了3年的mimetex服务。</p>
<h4>LatexRender</h4>
<p>LatexRender跟mathtex差不多，现在用的人不多，但也可以尝试下，<a href="http://www.mayer.dial.pipex.com/tex.htm#latexrender">文档地址</a>。</p>
<h4>JSMath/MathJax</h4>
<p>JSMath/MathJax是一种另类的Latex数学公式处理方式。首先，它并不是将公式转化为一个图片，而是通过位置控制、字体、大小来显示一个公式。其次，它可以直接在前台进行处理，通过一个javascript程序直接把latex代码转为公式的模样。这样好处当然是简单快捷，显示效果好，比如它可以随着用户对页面分辨率的调整自动调整公式的字体大小；缺点即为javascipt文件挺大，转化速度也比较慢。</p>
<p>有兴趣的话可以看下它的文档：<a href="http://www.math.union.edu/~dpvc/jsMath/">JSMath</a>，<a href="http://www.mathjax.org/">MathJax</a>。</p>
<div><h4>相关文章</h4><ul><li class='currentpost'><a href="http://zhiqiang.org/blog/resource/generate-latex-images-online.html">在线处理Latex数学公式的几个方式</a></li><li ><a href="http://zhiqiang.org/blog/it/latex-for-wordpress.html">在博客上写数学公式的插件LaTex for WordPress</a></li><li ><a href="http://zhiqiang.org/blog/it/mathjax-make-mathematics-beautiful.html">MathJax让你爱上数学公式</a></li></ul></div>    <p></p>
    <hr noshade style="margin:0;height:1px" />
    <p>&copy; zhiqiang for <a href="http://zhiqiang.org/blog">阅微堂</a>, 2010. | <a href="http://zhiqiang.org/blog/resource/generate-latex-images-online.html">&#38142;&#25509;</a> | <a href="http://zhiqiang.org/blog/resource/generate-latex-images-online.html#comments">10 &#26465;&#35780;&#35770;</a></p>]]></content:encoded>
			<wfw:commentRss>http://zhiqiang.org/blog/resource/generate-latex-images-online.html/feed</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
	</channel>
</rss>

