LoginSignup
0
2

More than 5 years have passed since last update.

Shpinxを使いつつメモ

Last updated at Posted at 2017-01-29

方法がわからないけどできたらいいな

置換で複数行を使う

  • その上で、引用だとわかる(リンク)ような書式にしたりしなかったり指定したい。

置換の定義を用語集に追加したい

  • 置換テーブルを定義しておけば用語集としても使えるという用途。
  • 用語の定義とわけたりマージしたりして表示したい。

メモしたいトピック

全ドキュメントで定義して置換する

いくつかちょっとしたパターンがありそうだがなんとなく下記が良いかな。

conf.py
rst_prolog= u"""
.. include:: definition.txt
"""
conf.py
rst_prolog= u"""
.. include:: /define/definition.txt
"""

ビルド設定ファイル(conf.py) — Sphinx 1.4.4 ドキュメント http://docs.sphinx-users.jp/config.html#confval-rst_prolog

用語を定義したい — Python製ドキュメンテーションビルダー、Sphinxの日本ユーザ会 http://sphinx-users.jp/reverse-dict/writing/replace.html

Todoリスト

下記を設定した

conf.py
todo_include_todos = True

注釈の表示で見やすくする

見た目だけでいれば見やすいな。。

.. note::

    これは注釈です!

.. warning::

    これは警告です!
  1. Sphinxでの文章の書き方(reStructuredText) — study sphinx 1 documentation http://planset-study-sphinx.readthedocs.io/ja/latest/04.html#id22

画像の挿入

Cacooで書いた画像をSphinxに埋め込む拡張を使ったら便利だった - 毎日Learning
http://yoshiyoshifujii.hatenablog.com/entry/2015/02/04/172954

idではなくて、urlを記載する必要があった

Sphinx に PlantUML のコードを埋め込む|へっぽこプログラマー クッツンの備忘録
http://kuttsun.blogspot.jp/2016/10/sphinx-plantuml.html

sphinxcontrib-plantuml 0.8.1 : Python Package Index
https://pypi.python.org/pypi/sphinxcontrib-plantuml

newpageで区切っていると最初のページになってしまう

文章の途中に画像を埋め込みたい — Python製ドキュメンテーションビルダー、Sphinxの日本ユーザ会
http://sphinx-users.jp/reverse-dict/images/inline.html

図を書く

markdown-preview-enhancedのマークダウンを取り込むSphinxフィルタ - Qiita
https://qiita.com/pashango2/items/cd78658bc16240ef23d8

rawじゃないとうまく動いてくれなかった。

簡単にガントチャートとかクラス図とか書けるやつ - Qiita
https://qiita.com/rana_kualu/items/da394fd33ce019bf0ba7

参考

reStructuredText入門 — Sphinx 1.4.4 ドキュメント http://docs.sphinx-users.jp/rest.html#paragraphs

脚註とか引用とか置換とかあるらしい

sphinx handson — study sphinx 1 documentation http://planset-study-sphinx.readthedocs.io/ja/latest/index.html

一歩踏み込んだ使い方としてざっと読んだ方が良さそう

文章を書くときに — Python製ドキュメンテーションビルダー、Sphinxの日本ユーザ会 http://sphinx-users.jp/reverse-dict/writing/

気になるトピックスを読んだ
0
2
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
0
2