<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xml:base="http://gezhi.org" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:media="http://search.yahoo.com/mrss/">
<channel>
 <title>公式</title>
 <link>http://gezhi.org/taxonomy/term/478</link>
 <description>The taxonomy view with a depth of 0.</description>
 <language>zh-hans</language>
<item>
 <title>公式输入法</title>
 <link>http://gezhi.org/node/549</link>
 <description>&lt;p&gt;升级 drupal 到 5.1，顺便安装了一个新的 LaTeX 插件：&lt;a href=&quot;http://drupal.org/project/drutex&quot;&gt;DruTeX&lt;/a&gt;。比一直来用的 Latexrender 强大，更重要的是这个 DruTeX 有人更新维护。&lt;/p&gt;
&lt;p&gt;现在在格志输入公式和在 LaTeX 环境下是一样的，复制一段 &lt;a href=&quot;http://groups.drupal.org/node/1263&quot;&gt;DruTeX 的使用方法&lt;/a&gt;，方便参考。&lt;/p&gt;
&lt;p&gt;Writing maths works as in LaTeX. Use dollar signs to enclose inline math, e.g. $x^2$. Examples for paragraph math are [ x^2 ] and $$x^2$$ (both variants are equivalent). There is also a display-style inline math environment, compare $\sum_{k=1}^\infty \frac{1}{k}$ and $!\sum_{k=1}^\infty \frac{1}{k}$.&lt;/p&gt;
&lt;p&gt;To make a dollar sign, you have to type \$ as in LaTeX!&lt;/p&gt;
&lt;p&gt;Arbitrary LaTeX code can be rendered as in this example: &amp;lt;tex&gt;Let $x^2$ be a natural number.&amp;lt;/tex&gt;&lt;/p&gt;
&lt;p&gt;There are also more elaborate environments to write math - they support auto-numbering, referencing and more. These environments are &amp;lt;equation&gt; and &amp;lt;equations&gt;. They both support the same attributes.&lt;/p&gt;
&lt;p&gt;E.g. rendering an equation with a different resolution: &amp;lt;equation dpi=&quot;200&quot;&gt;e^{i \cdot \pi} = -1.&amp;lt;/equation&gt;&lt;/p&gt;
&lt;p&gt;To give the equation automatically a number, you have to give it an id: &amp;lt;equation id=&quot;euler&quot;&gt;e^{i \cdot \pi} = -1.&amp;lt;/equation&gt;&lt;/p&gt;
&lt;p&gt;You now can produce a link to that equation by typing \ref{euler}, or even better (\ref{euler}).&lt;/p&gt;
&lt;p&gt;You can also give it a name instead of a number: &amp;lt;equation id=&quot;euler&quot; name=&quot;Euler&#039;s Identity&quot;&gt;e^{i \cdot \pi} = -1.&amp;lt;/equation&gt;&lt;/p&gt;
&lt;p&gt;An example for the &lt;equations&gt; environment is given by:&lt;br /&gt;
&amp;lt;equations&gt;&lt;br /&gt;
\int \ln(x) \;dx&lt;br /&gt;
&amp;amp;= \int 1 \cdot \ln(x) \;dx \&lt;br /&gt;
&amp;amp;= x \cdot \ln(x) - \int x \cdot \frac{1}{x} \;dx \&lt;br /&gt;
&amp;amp;= x \cdot \ln(x) - x&lt;br /&gt;
&amp;lt;/equations&gt;&lt;/p&gt;
&lt;p&gt;The spaces on the left are optional.&lt;/p&gt;
&lt;p&gt;To prohibit some text from being processed by DruTeX, you can use &amp;lt;code&gt; and &amp;lt;notex&gt;, e.g. &amp;lt;notex&gt;$x^2$&amp;lt;/notex&gt;.&lt;/p&gt;
</description>
 <comments>http://gezhi.org/node/549#comments</comments>
 <category domain="http://gezhi.org/taxonomy/term/118">latex</category>
 <category domain="http://gezhi.org/taxonomy/term/478">公式</category>
 <pubDate>Fri, 27 Apr 2007 13:33:21 -0700</pubDate>
 <dc:creator>Yan</dc:creator>
 <guid isPermaLink="false">549 at http://gezhi.org</guid>
</item>
</channel>
</rss>
