update README
This commit is contained in:
parent
3397669b6c
commit
05528b7222
17
README.rst
17
README.rst
@ -15,6 +15,23 @@
|
|||||||
- 使用\ `Sphinx`_\ 制作文档
|
- 使用\ `Sphinx`_\ 制作文档
|
||||||
- 生成的文档发布在此博文(待定)中
|
- 生成的文档发布在此博文(待定)中
|
||||||
|
|
||||||
|
sphinx中文支持
|
||||||
|
--------------
|
||||||
|
|
||||||
|
sphinx在利用LaTeX生成PDF时,对中文支持不够,因而修改sphinx如下:
|
||||||
|
|
||||||
|
#. 将\ ``sphinx/texinputs/Makefile``\ 中的\ ``pdflatex``\ 替换成\ ``xelatex``;
|
||||||
|
#. 修改\ ``sphinx/writers/latex.py``\ ,在231行左右对中文做特殊处理;
|
||||||
|
|
||||||
|
.. code-block:: python
|
||||||
|
|
||||||
|
if builder.config.language == 'zh_CN':
|
||||||
|
self.elements['babel'] = ''
|
||||||
|
self.elements['inputenc'] = ''
|
||||||
|
self.elements['utf8extra'] = ''
|
||||||
|
|
||||||
|
#. 修改\ ``conf.py``\.
|
||||||
|
|
||||||
.. _`陈皓`: http://coolshell.cn/haoel
|
.. _`陈皓`: http://coolshell.cn/haoel
|
||||||
.. _`Andriki`: http://andriki.com/mediawiki/index.php?title=Linux:%E8%B7%9F%E6%88%91%E4%B8%80%E8%B5%B7%E5%86%99Makefile
|
.. _`Andriki`: http://andriki.com/mediawiki/index.php?title=Linux:%E8%B7%9F%E6%88%91%E4%B8%80%E8%B5%B7%E5%86%99Makefile
|
||||||
.. _`Sphinx`: http://sphinx-doc.org/
|
.. _`Sphinx`: http://sphinx-doc.org/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user