$ sphinx-quickstart
agenda
Sphinx
http://docs.python.org/
easy_install sphinx
x/M ac
Linu
          # easy_install sphinx
          or
          # port install py26-sphinx



    dows 1.Python
Win
        2.easy_install

        3.easy_install sphinx
Introduction
============

This is the documentation for the Sphinx documentation builder. Sphinx is a
tool that translates a set of reStructuredText_ source files into various output
formats, automatically producing cross-references, indices etc. That is, if
you have a directory containing a bunch of reST-formatted documents (and
possibly subdirectories of docs in there as well), Sphinx can generate a
nicely-organized arrangement of HTML files (in some other directory) for easy
browsing and navigation. But from the same source, it can also generate a
LaTeX file that you can compile into a PDF version of the documents.

The focus is on hand-written documentation, rather than auto-generated API docs.
Though there is limited support for that kind of docs as well (which is intended
to be freely mixed with hand-written content), if you need pure API docs have a
look at `Epydoc <http://epydoc.sf.net/>`_, which also understands reST.


Conversion from other systems
-----------------------------

This section is intended to collect helpful hints for those wanting to migrate
to reStructuredText/Sphinx from other documentation systems.

* Gerard Flanagan has written a script to convert pure HTML to reST; it can be
  found at `BitBucket
  <http://bitbucket.org/djerdo/musette/src/tip/musette/html/html2rest.py>`_.

* For converting the old Python docs to Sphinx, a converter was written which
  can be found at `the Python SVN repository
  <http://svn.python.org/projects/doctools/converter>`_. It contains generic
  code to convert Python-doc-style LaTeX markup to Sphinx reST.

* Marcin Wojdyr has written a script to convert Docbook to reST with Sphinx
  markup; it is at `Google Code <http://code.google.com/p/db2rst/>`_.


Prerequisites
-------------

Sphinx needs at least **Python 2.4** to run. If you like to have source code
highlighting support, you must also install the Pygments_ library, which you can
do via setuptools' easy_install. Sphinx should work with docutils version 0.4
or some (not broken) SVN trunk snapshot.
http://sphinx.pocoo.org/
Sphinx-quickstart
Sphinx-quickstart
Sphinx-quickstart

Sphinx-quickstart

  • 1.
  • 2.
  • 3.
  • 7.
  • 9.
  • 10.
    x/M ac Linu # easy_install sphinx or # port install py26-sphinx dows 1.Python Win 2.easy_install 3.easy_install sphinx
  • 11.
    Introduction ============ This is thedocumentation for the Sphinx documentation builder. Sphinx is a tool that translates a set of reStructuredText_ source files into various output formats, automatically producing cross-references, indices etc. That is, if you have a directory containing a bunch of reST-formatted documents (and possibly subdirectories of docs in there as well), Sphinx can generate a nicely-organized arrangement of HTML files (in some other directory) for easy browsing and navigation. But from the same source, it can also generate a LaTeX file that you can compile into a PDF version of the documents. The focus is on hand-written documentation, rather than auto-generated API docs. Though there is limited support for that kind of docs as well (which is intended to be freely mixed with hand-written content), if you need pure API docs have a look at `Epydoc <http://epydoc.sf.net/>`_, which also understands reST. Conversion from other systems ----------------------------- This section is intended to collect helpful hints for those wanting to migrate to reStructuredText/Sphinx from other documentation systems. * Gerard Flanagan has written a script to convert pure HTML to reST; it can be found at `BitBucket <http://bitbucket.org/djerdo/musette/src/tip/musette/html/html2rest.py>`_. * For converting the old Python docs to Sphinx, a converter was written which can be found at `the Python SVN repository <http://svn.python.org/projects/doctools/converter>`_. It contains generic code to convert Python-doc-style LaTeX markup to Sphinx reST. * Marcin Wojdyr has written a script to convert Docbook to reST with Sphinx markup; it is at `Google Code <http://code.google.com/p/db2rst/>`_. Prerequisites ------------- Sphinx needs at least **Python 2.4** to run. If you like to have source code highlighting support, you must also install the Pygments_ library, which you can do via setuptools' easy_install. Sphinx should work with docutils version 0.4 or some (not broken) SVN trunk snapshot.
  • 12.

Editor's Notes

  • #2 &amp;#x8A2D;&amp;#x697D;&amp;#x3067;&amp;#x3059;&amp;#x3001;&amp;#x301C;&amp;#x301C;&amp;#x301C; &amp;#x672C;&amp;#x65E5;&amp;#x306F;&amp;#x3001;Sphinx&amp;#x3068;&amp;#x3044;&amp;#x3046;&amp;#x30C4;&amp;#x30FC;&amp;#x30EB;&amp;#x306E;&amp;#x7C21;&amp;#x5358;&amp;#x306A;&amp;#x7D39;&amp;#x4ECB;&amp;#x3092;&amp;#x3057;&amp;#x305F;&amp;#x3044;&amp;#x3068;&amp;#x601D;&amp;#x3044;&amp;#x307E;&amp;#x3059;&amp;#x3002; &amp;#x3068;&amp;#x3044;&amp;#x3046;&amp;#x306E;&amp;#x306F;&amp;#x3001;&amp;#x81EA;&amp;#x5206;&amp;#x81EA;&amp;#x8EAB;&amp;#x3001;&amp;#x30C9;&amp;#x30AD;&amp;#x30E5;&amp;#x30E1;&amp;#x30F3;&amp;#x30C8;&amp;#x3092;&amp;#x66F8;&amp;#x304F;&amp;#x3053;&amp;#x3068;&amp;#x306F;&amp;#x3042;&amp;#x307E;&amp;#x308A;&amp;#x306A;&amp;#x3044;&amp;#x306E;&amp;#x3067;&amp;#x3059;&amp;#x304C;&amp;#x3001;&amp;#x30C9;&amp;#x30AD;&amp;#x30E5;&amp;#x30E1;&amp;#x30F3;&amp;#x30C8;&amp;#x4EE5;&amp;#x5916;&amp;#x3067;&amp;#x306E;&amp;#x4F7F;&amp;#x3044;&amp;#x65B9;&amp;#x3067;&amp;#x4FBF;&amp;#x5229;&amp;#x3060;&amp;#x3068;&amp;#x611F;&amp;#x3058;&amp;#x3066;&amp;#x3044;&amp;#x308B;&amp;#x3053;&amp;#x3068;&amp;#x3001;&amp;#x8FD1;&amp;#x65E5;&amp;#x767A;&amp;#x8DB3;&amp;#x3059;&amp;#x308B;Sphinx&amp;#x65E5;&amp;#x672C;&amp;#x30E6;&amp;#x30FC;&amp;#x30B6;&amp;#x4F1A;&amp;#x306B;&amp;#x53C2;&amp;#x52A0;&amp;#x3055;&amp;#x305B;&amp;#x3066;&amp;#x3044;&amp;#x305F;&amp;#x3060;&amp;#x3044;&amp;#x3066;&amp;#x3044;&amp;#x308B;&amp;#x305F;&amp;#x3081;&amp;#x3067;&amp;#x3059;&amp;#x3002;
  • #3 &amp;#x4ECA;&amp;#x65E5;&amp;#x306F;&amp;#x3001;Sphinx&amp;#x3063;&amp;#x3066;&amp;#x4F55;&amp;#x3088;&amp;#xFF1F;&amp;#x3068;&amp;#x3001;Sphinx&amp;#x3067;&amp;#x4F55;&amp;#x304C;&amp;#x3067;&amp;#x304D;&amp;#x308B;&amp;#xFF1F;&amp;#x3068;&amp;#x3044;&amp;#x3046;&amp;#x3053;&amp;#x3068;&amp;#x3067; &amp;#x5B9F;&amp;#x969B;&amp;#x306B;&amp;#x89E6;&amp;#x308A;&amp;#x306A;&amp;#x304C;&amp;#x3089;&amp;#x7C21;&amp;#x5358;&amp;#x306A;&amp;#x7D39;&amp;#x4ECB;&amp;#x3092;&amp;#x3057;&amp;#x305F;&amp;#x3044;&amp;#x3068;&amp;#x601D;&amp;#x3044;&amp;#x307E;&amp;#x3059;&amp;#x3002;
  • #4 Sphinx&amp;#x3063;&amp;#x3066;&amp;#x306A;&amp;#x3093;&amp;#x3067;&amp;#x3057;&amp;#x3087;&amp;#x3046;&amp;#x3002; &amp;#x30C9;&amp;#x30AD;&amp;#x30E5;&amp;#x30E1;&amp;#x30F3;&amp;#x30C8;&amp;#x3092;&amp;#x304B;&amp;#x3063;&amp;#x3053;&amp;#x826F;&amp;#x304F;&amp;#x4ED5;&amp;#x4E0A;&amp;#x3052;&amp;#x3066;&amp;#x304F;&amp;#x308C;&amp;#x308B;&amp;#x30C4;&amp;#x30FC;&amp;#x30EB;&amp;#x3067;&amp;#x3059;&amp;#x3002;
  • #5 Sphinx&amp;#x3063;&amp;#x3066;&amp;#x306A;&amp;#x3093;&amp;#x3067;&amp;#x3057;&amp;#x3087;&amp;#x3046;&amp;#x3002; &amp;#x30C9;&amp;#x30AD;&amp;#x30E5;&amp;#x30E1;&amp;#x30F3;&amp;#x30C8;&amp;#x3092;&amp;#x304B;&amp;#x3063;&amp;#x3053;&amp;#x826F;&amp;#x304F;&amp;#x4ED5;&amp;#x4E0A;&amp;#x3052;&amp;#x3066;&amp;#x304F;&amp;#x308C;&amp;#x308B;&amp;#x30C4;&amp;#x30FC;&amp;#x30EB;&amp;#x3067;&amp;#x3059;&amp;#x3002;
  • #6 &amp;#x3002;&amp;#x3002; &amp;#x4ECA;&amp;#x65E5;&amp;#x306F;&amp;#x3001;&amp;#x57FA;&amp;#x672C;&amp;#x7684;&amp;#x306A;&amp;#x4F7F;&amp;#x3044;&amp;#x65B9;&amp;#x3068;&amp;#x3001;&amp;#x7C21;&amp;#x5358;&amp;#x306A;&amp;#x30C9;&amp;#x30AD;&amp;#x30E5;&amp;#x30E1;&amp;#x30F3;&amp;#x30C8;&amp;#x3092;&amp;#x4F5C;&amp;#x3063;&amp;#x3066;&amp;#x307F;&amp;#x305F;&amp;#x3044;&amp;#x3068;&amp;#x601D;&amp;#x3044;&amp;#x307E;&amp;#x3059;&amp;#x3002;
  • #7 &amp;#x5B9F;&amp;#x969B;&amp;#x306B;Sphinx&amp;#x3067;&amp;#x4F5C;&amp;#x3089;&amp;#x308C;&amp;#x305F;Python&amp;#x30C9;&amp;#x30AD;&amp;#x30E5;&amp;#x30E1;&amp;#x30F3;&amp;#x30C8;&amp;#x3092;&amp;#x898B;&amp;#x3066;&amp;#x307F;&amp;#x308B;
  • #8 Sphinx&amp;#x306E;&amp;#x30A4;&amp;#x30F3;&amp;#x30B9;&amp;#x30C8;&amp;#x30FC;&amp;#x30EB;&amp;#x306F;&amp;#x3068;&amp;#x3066;&amp;#x3082;&amp;#x7C21;&amp;#x5358;&amp;#x3067;&amp;#x3059; Python&amp;#x304C;&amp;#x30A4;&amp;#x30F3;&amp;#x30B9;&amp;#x30C8;&amp;#x30FC;&amp;#x30EB;&amp;#x3055;&amp;#x308C;&amp;#x3066;&amp;#x3044;&amp;#x308B;&amp;#x74B0;&amp;#x5883;&amp;#x3067;&amp;#x3042;&amp;#x308C;&amp;#x3070;&amp;#x3001;easy_install&amp;#x3067;&amp;#x4E00;&amp;#x767A;&amp;#x30A4;&amp;#x30F3;&amp;#x30B9;&amp;#x30C8;&amp;#x30FC;&amp;#x30EB;&amp;#x3067;&amp;#x304D;&amp;#x307E;&amp;#x3059;&amp;#x3002;
  • #9 mac&amp;#x306E;&amp;#x5834;&amp;#x5408;&amp;#x306B;&amp;#x306F;&amp;#x3001;Macports windows&amp;#x306E;&amp;#x5834;&amp;#x5408;&amp;#x306B;&amp;#x306F;&amp;#x3001;&amp;#x30C7;&amp;#x30D5;&amp;#x30A9;&amp;#x30EB;&amp;#x30C8;&amp;#x3067;&amp;#x306F;Python&amp;#x304C;&amp;#x30A4;&amp;#x30F3;&amp;#x30B9;&amp;#x30C8;&amp;#x30FC;&amp;#x30EB;&amp;#x3055;&amp;#x308C;&amp;#x3066;&amp;#x3044;&amp;#x306A;&amp;#x3044;&amp;#x306E;&amp;#x3067; Python&amp;#x30A4;&amp;#x30F3;&amp;#x30B9;&amp;#x30C8;&amp;#x30FC;&amp;#x30EB;&gt;easy_install&amp;#x30A4;&amp;#x30F3;&amp;#x30B9;&amp;#x30C8;&amp;#x30FC;&amp;#x30EB;&gt;sphinx&amp;#x30A4;&amp;#x30F3;&amp;#x30B9;&amp;#x30C8;&amp;#x30FC;&amp;#x30EB;&amp;#x306E;&amp;#x6D41;&amp;#x308C;&amp;#x306B;&amp;#x306A;&amp;#x308A;&amp;#x307E;&amp;#x3059;&amp;#x3002;
  • #10 Sphinx&amp;#x3067;&amp;#x30C9;&amp;#x30AD;&amp;#x30E5;&amp;#x30E1;&amp;#x30F3;&amp;#x30C8;&amp;#x3092;&amp;#x751F;&amp;#x6210;&amp;#x3059;&amp;#x308B;&amp;#x6D41;&amp;#x308C;&amp;#x306F; reStructuredText&amp;#x3067;&amp;#x30BD;&amp;#x30FC;&amp;#x30B9;&amp;#x3092;&amp;#x8A18;&amp;#x8FF0;&amp;#x3057;&amp;#x3066; &gt;&gt;
  • #11 &amp;#x30BD;&amp;#x30FC;&amp;#x30B9;(reST)&amp;#x3092;&amp;#x30D3;&amp;#x30EB;&amp;#x30C9;&amp;#x3059;&amp;#x308B;&amp;#x3053;&amp;#x3068;&amp;#x3067;&amp;#x3001;HTML&amp;#x3001;PDF(rst2pdf)&amp;#x306A;&amp;#x3069;&amp;#x306E;&amp;#x5F62;&amp;#x5F0F;&amp;#x3067;&amp;#x51FA;&amp;#x529B;&amp;#x3059;&amp;#x308B;&amp;#x3053;&amp;#x3068;&amp;#x304C;&amp;#x51FA;&amp;#x6765;&amp;#x307E;&amp;#x3059;&amp;#x3002; &amp;#xFF1E;&amp;#xFF1E;&amp;#x30C7;&amp;#x30E2;
  • #12 &amp;#x3082;&amp;#x3063;&amp;#x3068;&amp;#x3001;&amp;#x826F;&amp;#x3044;&amp;#x30C9;&amp;#x30AD;&amp;#x30E5;&amp;#x30E1;&amp;#x30F3;&amp;#x30C8;&amp;#x3092;&amp;#x4ED5;&amp;#x4E0A;&amp;#x3052;&amp;#x308B;&amp;#x306B;&amp;#x306F;&amp;#x3001;&amp;#x516C;&amp;#x5F0F;&amp;#x30B5;&amp;#x30A4;&amp;#x30C8;&amp;#x304A;&amp;#x3088;&amp;#x3073;&amp;#x65E5;&amp;#x672C;&amp;#x8A9E;&amp;#x8A33;&amp;#x306E;&amp;#x30EA;&amp;#x30D5;&amp;#x30A1;&amp;#x30EC;&amp;#x30F3;&amp;#x30B9;&amp;#x3092;&amp;#x53C2;&amp;#x7167;&amp;#x3057;&amp;#x3066;&amp;#x304F;&amp;#x3060;&amp;#x3055;&amp;#x3044;&amp;#x3002;
  • #13 &amp;#x3068;&amp;#x3001;&amp;#x3053;&amp;#x3053;&amp;#x307E;&amp;#x3067;&amp;#x3001;&amp;#x57FA;&amp;#x672C;&amp;#x7684;&amp;#x306A;&amp;#x30C9;&amp;#x30AD;&amp;#x30E5;&amp;#x30E1;&amp;#x30F3;&amp;#x30C8;&amp;#x3092;&amp;#x4F5C;&amp;#x6210;&amp;#x3057;&amp;#x307E;&amp;#x3057;&amp;#x305F;&amp;#x304C; &amp;#x30C9;&amp;#x30AD;&amp;#x30E5;&amp;#x30E1;&amp;#x30F3;&amp;#x30C8;&amp;#x4EE5;&amp;#x5916;&amp;#x306B;&amp;#x3082;&amp;#x3044;&amp;#x308D;&amp;#x3044;&amp;#x308D;&amp;#x4F7F;&amp;#x3044;&amp;#x9053;&amp;#x3058;&amp;#x3083;&amp;#x306A;&amp;#x3044;&amp;#x304B;&amp;#x306A;