Sphinx�ϡ�HTMLʸ��LaTeX���Ѥ���PDF�ե����롦EPUB�������Żҽ��Ҥʤɤ�Ʊ��Υ������ե����뤫������Ǥ���ɥ�����Ⱥ����ץ������Ǥ����̾�Υץ������Υ���ѥ���Τ褦�ˡ�make���ޥ�ɤ�ȤäƤ��줾��η�����ʸ���������ޤ���

Sphinx�Υ������ե�����ϡ�reStructuredText�ʳ�ĥ�Ҥ� .rst�ˤȸƤФ��ޡ������å׸���ǵ��Ҥ��ޤ����ʲ��ˡ�����ץ�򤪸������ޤ����������Ϥ��٤����̤ʥ쥤������Ĵ����ԤäƤ��餺���ǥե���ȤΥ쥤�����Ȥ�ȤäƤ��ޤ������Τ褦�ˡ����˴����٤ι⤤¿�ͤ�ʸ��Ʊ��Υ�������������Ǥ���Ȥ����Τ�̥��Ū�Ǥ��͡�

�ʲ���Ubuntu 11.10(oneiric)��Sphinx��ȤäƤߤ��Ȥ�����˺Ͽ�Ǥ���
�ܺ٤ϡ�Sphinx�����ܸ�ޥ˥奢���򻲾Ȥ��Ƥ���������

Sphinx�����


sphinx-latex
make latex��make all-pdf-ja����������PDFʸ��contents�Υ�󥯤ϼ�ưŪ����������Ƥ��ޤ������Τ褦�ˡ�����ǥå�������ư���������Ȥ�����Sphinx�������Ǥ������ڡ������֤�Ĵ���ϤǤ���ΤǤ��礦�����ʤ����ǥե���Ȥ�conf.py�Ǥϡ��ɥ�����Ȥμ��ब��manual�פˤʤäƤ��ޤ��������ξ��ϡ�howto�פ���ꤷ�ޤ�����
latex_documents = [
('index', 'test.tex', u'�̻��ϳ�����',
u'Masahiko Yamaguchi', 'howto'),
]


sphinx-html
make html����������HTML��Firefox�dz����Ƥ���Ȥ��������Τޤ޸����Ǥ������ʴ����٤Ǥ���css�ե�����ϡ�build/html/_static�ե��������ˡ��ޤ�TeX�ο���������build/html/_images/math�ե������������äƤ��ޤ���

sphinx-epub
��������EPUB��Sigil�dz����Ƥ��ޤ��������ʳ���ʸ����Sigil�Ǻ��Խ����뤳�Ȥ�Ǥ��ޤ���FBReader�Ǥϡ�ʸ���TeX�ե���Ȥ����٤��̹�Ω�ƤˤʤäƤ��ޤ��ޤ����ޤ������ޡ��ȥե���Ǥ�CopperReader��Ȥä��ɤळ�Ȥ��Ǥ��ޤ�������������������png�����Τ��ᡢ���ʤ��Ƥ�ɽ���ˤʤäƤ��ޤ��ޤ���jsMath��Ȥ��Ф⤦�����ޤ����⡣


Sphinx����Ѥ���ݤ�������

���������äƤ��ʤ����̤�ʸ���HTMLʸ���EPUB��������ʤ����ꤢ��ޤ��󤬡�LaTeX�����Ѥ����硢platex��dvipdfmx��UTF-8���б����Ƥ��ʤ���м��Ԥ��ޤ������ʤߤˡ�Ubuntu��Fedora��TeXLive��UTF-8���б����Ƥ��ޤ��󤬡�TeXLive2011�������лȤ��ޤ����᥸�㡼�ʥǥ����ȥ�Ǥ��ȡ�Vine Linux���餤����UTF-8���б����Ƥ��ʤ��ΤǤϡ�

[2012.01.13 �ɵ�]
Makefile��nkf���ޥ�ɤ�ä��뤳�Ȥǡ�Ubuntu 11.10�Υǥե���Ȥ�TeXLive�Ǥ����Ѳ�ǽ�Ǥ��뤳�Ȥ��狼��ޤ������ܤ����ϼ���ε����ǤޤȤ�ޤ���

Sphinx�Υ��󥹥ȡ���

Ubuntu 11.10�Ǥϡ��ǥե���ȤΥ�ݥ��ȥ�˴ޤޤ�Ƥ��ޤ��Τǡ����եȥ��������󥿡��ǡ�python-sphinx�פ򸡺���������뤫�����Υ��ޥ�ɤǥ��󥹥ȡ��뤷�ޤ���

$ sudo apt-get install python-sphinx

Sphinx�ɥ�����ȤΤҤʷ�����������

Sphinx�Υɥ�����Ȥ��������뤿��ˤϡ�Makefile��python�ǽ񤫤줿conf.py�Ȥ�������ե����뤪��ӥ���ץ��rst�ե�����ʤɤ�ɬ�פǤ��������Υ��ޥ�ɤ�¹Ԥ��Ƥ����Ĥ��μ���˲������Ƥ������Ȥǡ�����ѥ����ɬ�פʰ켰�Υե����뷲����������ޤ���

$ sphinx-quickstart

���ޥ�ɤ�¹Ԥ���ȡ����Τ褦��ɽ�����Фޤ����ʤ��٤Ƥν��Ϥ�Ǻܤ��ޤ�����
$ sphinx-quickstart
Welcome to the Sphinx 1.0.7 quickstart utility.

Please enter values for the following settings (just press Enter to
accept a default value, if one is given in brackets).

Enter the root path for documentation.
> Root path for the documentation [.]: test

You have two options for placing the build directory for Sphinx output.
Either, you use a directory "_build" within the root path, or you separate
"source" and "build" directories within the root path.
> Separate source and build directories (y/N) [n]: y

Inside the root directory, two more directories will be created; "_templates"
for custom HTML templates and "_static" for custom stylesheets and other static
files. You can enter another prefix (such as ".") to replace the underscore.
> Name prefix for templates and static dir [_]:

The project name will occur in several places in the built documentation.
> Project name: test
> Author name(s): vineuser

Sphinx has the notion of a "version" and a "release" for the
software. Each version can have multiple releases. For example, for
Python the version is something like 2.5 or 3.0, while the release is
something like 2.5.1 or 3.0a1. If you don't need this dual structure,
just set both to the same value.
> Project version: 1.0
> Project release [1.0]:

The file name suffix for source files. Commonly, this is either ".txt"
or ".rst". Only files with this suffix are considered documents.
> Source file suffix [.rst]:

One document is special in that it is considered the top node of the
"contents tree", that is, it is the root of the hierarchical structure
of the documents. Normally, this is "index", but if your "index"
document is a custom template, you can also set this to another filename.
> Name of your master document (without suffix) [index]:

Sphinx can also add configuration for epub output:
> Do you want to use the epub builder (y/N) [n]: y

Please indicate if you want to use one of the following Sphinx extensions:
> autodoc: automatically insert docstrings from modules (y/N) [n]:
> doctest: automatically test code snippets in doctest blocks (y/N) [n]:
> intersphinx: link between Sphinx documentation of different projects (y/N) [n]:
> todo: write "todo" entries that can be shown or hidden on build (y/N) [n]:
> coverage: checks for documentation coverage (y/N) [n]:
> pngmath: include math, rendered as PNG images (y/N) [n]: y
> jsmath: include math, rendered in the browser by JSMath (y/N) [n]:
> ifconfig: conditional inclusion of content based on config values (y/N) [n]:
> viewcode: include links to the source code of documented Python objects (y/N) [n]:

A Makefile and a Windows command file can be generated for you so that you
only have to run e.g. `make html' instead of invoking sphinx-build
directly.
> Create Makefile? (Y/n) [y]:
> Create Windows command file? (Y/n) [y]: n

Finished: An initial directory structure has been created.

You should now populate your master file test/source/index.rst and create other documentation
source files. Use the Makefile to build the docs, like so:
make builder
where "builder" is one of the supported builders, e.g. html, latex or linkcheck.
���ܿ���¿���Ǥ��������ˤ��ʤ���Фʤ�ʤ��Τϲ������ֻ�����ʬ���餤�ǡ�����ʳ��Ϥ��٤ƥǥե���ȤΤޤޡ�Enter���������Ǽ��ءˤ�����ʤ��Ǥ��礦��

[�롼�ȡ��ѥ�������]
> Root path for the documentation [.]: docs
�����ȥǥ��쥯�ȥ���Ρ֥ɥ�����ȤΥ������ե�����������ե�����켰����¸����ǥ��쥯�ȥ�פ���ꤷ�ޤ����ξ��ϡ�docs�פȤ����ǥ��쥯�ȥ�˥������ե�����ΤҤʷ�����¸����ޤ���[�侩]

[�������ե�����������ե������ʬΥ]
> Separate source and build directories (y/N) [n]: y
build�ǥ��쥯�ȥ�������ե����뷲����¸�ˤ�source�ǥ��쥯�ȥ�ʥ������ե�����켰����¸�ˤ�ʬΥ������¸����ˤϡ������ǡ�y�פ���ꤷ�ޤ���[�侩]

[�ץ���������̾������̾������]
> Project name: �̻��ϳ�����
> Author name(s): Masahiko Yamaguchi

�ץ���������̾�ʥɥ���������ΤΥ����ȥ�Ȥʤ�ޤ��ˤ�����̾����ꤷ�ޤ���[ɬ��]

[������������]
> Project version: 1.0
ʸ��ΥС���������ͤǻ��ꤷ�ޤ���[ɬ��]

[EPUB������]
> Do you want to use the epub builder (y/N) [n]:
EPUB�����������ϡ�y�פ���ꤷ�ޤ���[�ǥե���ȤǤ�̵��]

[extension������]
> pngmath: include math, rendered as PNG images (y/N) [n]: y
LaTeX�ο����ե���Ȥ�ɽ��������ˤϡ������ǡ�y�פ���ꤷ�ޤ���JSMath�Ȥ϶��ѤǤ��ޤ���[�ǥե���ȤǤ�̵��]

[Makefile������]
> Create Windows command file? (Y/n) [y]: n
�ǥե���ȤǤ�Windows�Ѥ�make.bat���������ޤ���Linux�Ǥ�ɬ�פʤ��Τǡ�n�פ���ꤷ�ޤ���

����������ϡ��夫������ե������conf.py�ˤǽ������뤳�Ȥ��ǽ�Ǥ���

LaTeX��PDF���������

�ޤ���sphinx-quickstart���ޥ�ɤǻ��ꤷ���ɥ�����ȡ��롼�ȤDz����Υ��ޥ�ɤ�¹Ԥ��ޤ���

$ make latex

����ǡ�build/latex�Ȥ����ե�������tex�Υ������ե�������ȼ���sty�ե����뤬��¸����ޤ���³���ơ����Υե�����˰�ư����make���ޤ���

$ cd build/latex
$ make all-pdf-ja


[����]
Ubuntu 11.10�Υǥե���Ȥ�TeXLive�Ǥ�UTF-8���б����Ƥ��ʤ��ΤǻȤ��ޤ���TeXLive2011���ư�ǥ��󥹥ȡ��뤹��ɬ�פ�����ޤ����ޤ���TeXLive2011�Ǥ�����ե������񤭴����ʤ��ȥ���ѥ�����˥��顼���ФƼ��Ԥ��ޤ�������˵����ˤ������Ȼפ��ޤ������᤯��Ƥߤ����Ȥ�������������Υѥå��򻲹ͤˤ��ơ�source/conf.py��build/latex/Makefile�������build/latex/sphinx.sty���ѹ����ơ���ƤߤƤ���������

[2012.01.13 �ɵ�]
Makefile��nkf���ޥ�ɤ�ä��뤳�Ȥǡ�Ubuntu 11.10�Υǥե���Ȥ�TeXLive�Ǥ����Ѳ�ǽ�Ǥ��뤳�Ȥ��狼��ޤ������ǥե���Ȥ�TeXLive�����Ѥ�����⡢���Υѥå��˳��������ѹ���Ԥ�ʤ���Фʤ�ޤ��󤬡� -kanji=utf8 ����ʬ�Ϻ������ɬ�פ�����ޤ����ܤ����ϼ���ε����ǤޤȤ�ޤ���

HTML���������

sphinx-quickstart���ޥ�ɤǻ��ꤷ���ɥ�����ȡ��롼�ȤǼ��Υ��ޥ�ɤ�¹Ԥ�������Ǥ���

$ make html

����ǡ�build/html�Ȥ����ե���������index.html�ʤɤΥǡ����켰����������ޤ���LaTeX�ǥɥ�������������������Ƥ���С�������TeX�Υե���Ȥβ������Ȥ��ޤ���

EPUB���������

sphinx-quickstart���ޥ�ɤǻ��ꤷ���ɥ�����ȡ��롼�ȤǼ��Υ��ޥ�ɤ�¹Ԥ�������Ǥ���

$ make epub

����ǡ�build/epub�Ȥ����ե���������Epub.epub����������ޤ��������ϹӤ������ˤʤäƤ��ޤ����ᡢ���ޡ��ȥե���Ǥ�ɽ���������ʤäƤ��ޤ������Τ�ޤ��󤬡����̤�ʸ��ʤ����ꤢ��ޤ���

LaTeX�ɥ�����ȤΥ���ץ�

LaTeX���Ѵ�����ݤ˻��Ѥ���ʸ��ΰ�����Ǻܤ��Ƥ����ޤ���

.. toctree::�β�����ʬ�˳ƾϤ�ʸ��̾�ʳ�ĥ�Ҥ������rst�ե������̾�Ρˤ�ꥹ�ȥ��åפ���ȡ���ưŪ�˥���ƥ�ĥꥹ�Ȥ˥�󥯤�Ž���ޤ����ʲ��ϡ�index.rst�ʥȥåץڡ����ˤ�Ʊ�����ؤ�sec1.rst�ʣ����ܤ�ʸ��ˤ��֤��Ƥ��������Ǥ���index.rst��Ʊ���ؤ˥ե�������֤���������˳ƾϤ�ʸ����֤����ϡ� :maxdepth: ï¿½ï¿½ï¿½3�פˤ��ơ֥ե����̾/�ե�����̾�פη��ǻ��ꤹ��ɬ�פ�����ޤ���

[index.rst]
.. ï¿½Ì»ï¿½ï¿½Ï³ï¿½ï¿½ï¿½ï¿½ï¿½ documentation master file, created by
   sphinx-quickstart on Wed Jan 11 14:50:45 2012.
   You can adapt this file completely to your liking, but it should at least
   contain the root `toctree` directive.

�̻��ϳ�����
==================================

Contents:

.. toctree::
   :maxdepth: 2

   sec1

Indices and tables
==================

* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`

[sec1.rst]
==============
�齬����
==============

�齬�� ï¿½ï¿½ï¿½ï¿½
==============

���ϥߥ�ȥ˥���

.. math:: H=-\dfrac{\hbar ^{2}}{\,2m\,} \dfrac{d^2}{dx^2}+V(x)
  :label: eq1
Ϳ�����룱������ư�ǡ��ݥƥ󥷥�뤬 :math:`x` ï¿½Î¶ï¿½ï¿½Ø¿ï¿½ :math:`V(x)=V(-x)` ï¿½Ç¤ï¿½ï¿½ï¿½ï¿½ï¿½Ë¤Ï¡ï¿½Â«ï¿½ï¿½ï¿½ï¿½ï¿½Ö¤Î¸ï¿½Í­ï¿½Ø¿ï¿½ï¿½ï¿½ :math:`x` ï¿½Î¶ï¿½ï¿½Ø¿ï¿½ï¿½ï¿½ï¿½ï¿½Ø¿ï¿½ï¿½Î¤É¤ï¿½ï¿½é¤«ï¿½Ç¤ï¿½ï¿½ë¤³ï¿½È¤ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½è¡£ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½Â«ï¿½ï¿½ï¿½ï¿½ï¿½Ö¤Î¥ï¿½ï¿½Í¥ë¥®ï¿½ï¿½ï¿½Ø¿ï¿½ï¿½Ï¤È¤Ó¤È¤Ó¤Ç¡ï¿½ï¿½É¤ï¿½Ë¤ï¿½ï¿½ï¿½ï¿½Ï¤Ê¤ï¿½ï¿½ï¿½ï¿½È¤ï¿½ï¿½Î¤ï¿½ï¿½Æ¤ï¿½ï¿½ë¡£

������ʸ������ϡ�make���ƥ���ѥ��뤹���Ǥ��͡����ץ�����ߥ󥰤������ʿͤʤ顢�����ޤȤޤä����Ҥ��ꤿ���ʤ�ΤǤϤʤ��Ǥ��礦����

���ʤߤˡ��������ϥ��󥿡���Ǥ��͡�
�������γ����󡢲����λĤ�ʤ��褦�˴�ĥ�äƤ����������ʤ��䡢�������ϸ��Ƥʤ�����jk