<?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>男单 618 &#187; reStructuredTEXT</title>
	<atom:link href="http://www.ai7.org/wp/html/tag/restructuredtext/feed" rel="self" type="application/rss+xml" />
	<link>http://www.ai7.org/wp</link>
	<description>生活象筒装的卫生纸，开始的时候怎么扯都不觉得在转，后来转的越来越快。</description>
	<lastBuildDate>Tue, 17 Aug 2010 04:19:13 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>reStructuredTEXT输出为LaTeX以及公式的问题</title>
		<link>http://www.ai7.org/wp/html/646.html</link>
		<comments>http://www.ai7.org/wp/html/646.html#comments</comments>
		<pubDate>Sun, 20 Dec 2009 14:36:50 +0000</pubDate>
		<dc:creator>amao</dc:creator>
				<category><![CDATA[软件]]></category>
		<category><![CDATA[latex]]></category>
		<category><![CDATA[reStructuredTEXT]]></category>
		<category><![CDATA[公式]]></category>

		<guid isPermaLink="false">http://www.ai7.org/wp/?p=646</guid>
		<description><![CDATA[中文的rst文件，输出为LaTeX文件：
在home目录下编辑.docutils文件，内容如下：
[latex2e writer]
documentclass: article
documentoptions: 12pt a4paper
output-encoding: utf-8
stylesheet: /home/username/docutils.tex
前几行没什么可说的，最后一行所指定文件的内容如下：
\usepackage[slantfont,boldfont,CJKaddspaces,CJKchecksingle]{xeCJK}
\CJKlanguage{zh-cn}
\setmainfont{Times New Roman}
\setCJKmainfont{Adobe Song Std}
\usepackage{CJKfntef}
我这是想用xelatex，如果是用CCT或者CTEX，语句相对少些。大家自己改吧。
公式的话，在文件头添加
.. role:: raw-math(raw)
    :format: latex html
行内公式这样写：
If :raw-math:`$x=5 \times 3$` then :raw-math:`$x$` is
注意，冒号后面没空格！
独立公式这样写：
.. raw:: latex html

    $$ W \approx \sum{f(x_k) \Delta x} $$
    $$ W = \int_{a}^{b}{f(x) dx} $$
参考源：

Docutils Configuration: http://docutils.sourceforge.net/docs/user/config.html
reStructured Text tips and tricks: http://www.programmerq.net/rsttricks.html
[tip] python-docutils: rst2latex create [...]]]></description>
			<content:encoded><![CDATA[<p>中文的rst文件，输出为LaTeX文件：</p>
<p>在home目录下编辑.docutils文件，内容如下：</p>
<p>[latex2e writer]<br />
documentclass: article<br />
documentoptions: 12pt a4paper<br />
output-encoding: utf-8<br />
stylesheet: /home/username/docutils.tex</p>
<p>前几行没什么可说的，最后一行所指定文件的内容如下：</p>
<p>\usepackage[slantfont,boldfont,CJKaddspaces,CJKchecksingle]{xeCJK}<br />
\CJKlanguage{zh-cn}<br />
\setmainfont{Times New Roman}<br />
\setCJKmainfont{Adobe Song Std}<br />
\usepackage{CJKfntef}</p>
<p>我这是想用xelatex，如果是用CCT或者CTEX，语句相对少些。大家自己改吧。</p>
<p>公式的话，在文件头添加</p>
<pre class="literal-block">.. role:: raw-math(raw)
    :format: latex html</pre>
<pre class="literal-block">行内公式这样写：</pre>
<pre>If :raw-math:`$x=5 \times 3$` then :raw-math:`$x$` is</pre>
<pre>注意，冒号后面没空格！</pre>
<pre>独立公式这样写：</pre>
<pre>.. raw:: latex html

    $$ W \approx \sum{f(x_k) \Delta x} $$
    $$ W = \int_{a}^{b}{f(x) dx} $$</pre>
<pre>参考源：</pre>
<ol>
<li><a href="http://docutils.sourceforge.net/docs/user/config.html">Docutils Configuration</a>: http://docutils.sourceforge.net/docs/user/config.html</li>
<li><a href="http://www.programmerq.net/rsttricks.html#math-and-equations">reStructured Text tips and tricks</a>: http://www.programmerq.net/rsttricks.html</li>
<li><a href="http://kalug.linux.org.tw/~lloyd/bblog/archives/2009/11/09/%5Btip%5D_python-docutils:_rst2latex_create_chinese_pdf/">[tip] python-docutils: rst2latex create chinese pdf</a>（繁体中文）: http://kalug.linux.org.tw/~lloyd/bblog/archives/2009/11/09/%5Btip%5D_python-docutils:_rst2latex_create_chinese_pdf/</li>
</ol>
<p>注：</p>
<p>如果是使用<a href="http://sphinx.pocoo.org/" target="_blank">Sphinx</a>，那么对于公式的支持就不用这么麻烦了，可以直接使用:math:和.. math::这样的命令，因为<a href="http://sphinx.pocoo.org/" target="_blank">Sphinx</a>支持rST扩展，用上面的方法，反而会出很多问题。</p>
<div id="_mcePaste" style="overflow: hidden; position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px;">1 [latex2e writer]</div>
<div id="_mcePaste" style="overflow: hidden; position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px;">2 documentclass: article</div>
<div id="_mcePaste" style="overflow: hidden; position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px;">3 documentoptions: 12pt,a4paper</div>
<div id="_mcePaste" style="overflow: hidden; position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px;">4 output-encoding: utf-8</div>
<div id="_mcePaste" style="overflow: hidden; position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px;">5 stylesheet: /home/mzy/docutils.tex</div>
<div id="_mcePaste" style="overflow: hidden; position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px;">~</div>
<div id="_mcePaste" style="overflow: hidden; position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px;">~</div>
<div id="_mcePaste" style="overflow: hidden; position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px;">~</div>
<div id="_mcePaste" style="overflow: hidden; position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px;">~</div>
<div id="_mcePaste" style="overflow: hidden; position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px;">~</div>
<div id="_mcePaste" style="overflow: hidden; position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px;">~</div>
<div id="_mcePaste" style="overflow: hidden; position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px;">~</div>
<div id="_mcePaste" style="overflow: hidden; position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px;">~</div>
<div id="_mcePaste" style="overflow: hidden; position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px;">~</div>
<div id="_mcePaste" style="overflow: hidden; position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px;">~</div>
<div id="_mcePaste" style="overflow: hidden; position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px;">~</div>
<div id="_mcePaste" style="overflow: hidden; position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px;">~</div>
<div id="_mcePaste" style="overflow: hidden; position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px;">~</div>
<div id="_mcePaste" style="overflow: hidden; position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px;">~</div>
<div id="_mcePaste" style="overflow: hidden; position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px;">~</div>
<div id="_mcePaste" style="overflow: hidden; position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px;">~</div>
<div id="_mcePaste" style="overflow: hidden; position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px;">~</div>
<div id="_mcePaste" style="overflow: hidden; position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px;">~</div>
<div id="_mcePaste" style="overflow: hidden; position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px;">&#8211; 可视 行 &#8212;                                                 5,1          全部</div>
]]></content:encoded>
			<wfw:commentRss>http://www.ai7.org/wp/html/646.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
