LoginSignup
5
6

More than 5 years have passed since last update.

Sphinxについてのメモ その1(プロジェクトの作成)

Last updated at Posted at 2014-09-27

SphinxはPythonで書かれたドキュメント作成ツール。
Wordなどと違ってプログラムのようにドキュメントを書ける。
Sphinxの日本ユーザ会のページ

プロジェクトの作り方とビルド方法の手順メモ。

環境

OS:Mac OS X 10.9.5
Python:Ver.2.7.7

プロジェクトの作り方

$ sphinx-quickstart
  • 基本的に[Enter]でいいが、以下の質問は入力する必要がある。
    • プロジェクト名
    • 著者名
    • バージョン
  • sphinx-quickstartの詳細説明
・・・
# プロジェクト名と著者名。
The project name will occur in several places in the built documentation.
> Project name: # プロジェクトのタイトル
> Author name(s): # 著者名
・・・
# プロジェクトのバージョン
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: 2014.09.27
> Project release [2010.09.27]:
・・・
  • 完了すると以下のファイルが作成される
    • Makefile
    • index.rst
    • conf.py
    • make.bat
    • _static/
    • _build/
    • _templates/

ビルド方法

HTMLで出力する

$ make html

_build/htmlフォルダ内にHTMLが生成される。
index.htmlを開くとドキュメントができている。

epubで出力する

$ make epub

_build/epubフォルダ内に生成される。

Latex形式で出力する

$ make latex

_build/latexフォルダ内に生成される。

5
6
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
6