Sphinxチートシート
参考文献
セクションの目次(Table of Contents)
.. contents:: 目次
:local:
:backlinks: none
:depth: 2
セクション(Sections)
セクションは記号が出現した順番でレベル分けされる。次の順番でレベルを分ける。
Section H1(ページタイトル)
==========================
Section H2
-----------
Section H3
~~~~~~~~~~
.. rubric:: 小見出し(ドキュメントのセクションと関係のない見出し)
通常テキスト
Section H3
小見出し(ドキュメントのセクションと関係のない見出し)
通常テキスト
コンパウンド(Compound)
.. compound::
複数の要素をまとめる、複合する。
.. code-block:: text
コードブロック
定義リスト
リストの説明
複数の要素をまとめる、複合する。
コードブロック
- 定義リスト
リストの説明
改行、改段(Line breaks, Paragraphs)
| このように
| 改行する。
改段は空行をいれる。
空行を入れたあと。
このように
改行する
改段は空行をいれる。
空行を入れたあと。
引用(Block quote)
インデントを入れて引用する。
インデントを入れて引用する。
引用(Pull quote)
.. pull-quote::
引用文
引用文
文字の装飾、インラインマークアップ(Inline markup)
- 通常 abc
- **太字 abc**
- *イタリック abc*
- ``インラインリテラル abc``
- キーボード :kbd:`Esc`
- ボタン :menuselection:`Install`
- メニュー選択 :menuselection:`File --> Exit`
通常 abc
太字 abc
イタリック abc
インラインリテラル abc
キーボード Esc
ボタン
メニュー選択
箇条書きリスト(Lists)
- tea
- green tea
- black tea
- earl gray
- darjeeling
- coefee
#. men
#. ramen
#. miso
#. shio
#. gohan
tea
green tea
black tea
earl gray
darjeeling
coefee
men
ramen
miso
shio
gohan
フィールドリスト(Field Lists)
:たまねぎ: 1個
:にんじん:
2本。
新鮮なもの。
:ドレッシング:
- オリーブオイル 大さじ1
- 塩少々
- たまねぎ:
1個
- にんじん:
2本。 新鮮なもの。
- ドレッシング:
オリーブオイル 大さじ1
塩少々
定義リスト(Definition Lists)
たまねぎ
Onion
にんじん
Carrot
- たまねぎ
Onion
- にんじん
Carrot
用語集(Glossary)
オプションリスト(Option list)
オプションと説明の間はスペースを2ついれる
-h Show help
-f file Select file
--help Show help
- -h
Show help
- -f file
Select file
- --help
Show help
外部リンク(External link)
- https://www.vmc-motion.com/
- `リンク1 <https://www.vmc-motion.com/>`_
- リンク1_
- リンクを使いまわさない場合は末尾に ``__`` をつける
- `リンク1 <https://www.vmc-motion.com/>`__
ハイパーリンクターゲット(hyperlink target)を使った表示
- `VMC Motion Homepage`_
- vmcMotionHomepage_
- `リンク2 <vmcMotionHomepage_>`_
ハイパーリンクターゲット(hyperlink target)の定義
.. _`VMC Motion Homepage`:
.. _vmcMotionHomepage: https://www.vmc-motion.com/
リンクを使いまわさない場合は末尾に
__
をつける
ハイパーリンクターゲット(hyperlink target)を使った表示
ハイパーリンクターゲット(hyperlink target)の定義
内部リンク(Internal link)
- :ref:`secInternalLink`
- :ref:`名前を変えたリンク<secInternalLink>`
- :doc:`sphinxCheatSheet` : ファイルへのリンク。ファイルへの相対パスとする。
.. _secInternalLink:
ここにリンク
~~~~~~~~~~~~~~~
Sphinxチートシート : ファイルへのリンク。ファイルへの相対パスとする。
ここにリンク
置換(Substitutions, replace)
コードブロック
表(Table)
リストテーブル(List Table)
CSVテーブル(CSV Table)
.. csv-table::
:encoding: utf-8
:header-rows: 1
:widths: 2,1
:file: _assets/csvtable.csv
材料 |
数 |
---|---|
たまねぎ |
1 |
にんじん |
2 |
.. csv-table:: レシピ
:encoding: utf-8
:header: "材料", "数"
:widths: 2,1
"たまねぎ", 1
"にんじん", 2
材料 |
数 |
---|---|
たまねぎ |
1 |
にんじん |
2 |
図、画像(Images)
image
.. image:: _assets/vmc.png
:width: 720px
:name: figVMC
figVMC_ へのリンク。

figVMC へのリンク。
figure(キャプション付き)
外部サイトの画像の表示
.. figure:: https://www.vmc-inc.co.jp/blog/2016/04/01/images/%E6%A1%9C%E3%80%80%E5%85%A8%E4%BD%93%E5%83%8F.jpg
山崎川の桜

図 20 山崎川の桜
数式(Math)
インライン表記
:math:`\pi = 3.14`。
\(\pi = 3.14\)。
数式モード表記
サンプル
.. math::
v, \bm{v}, \boldsymbol{v}, \bf{v} \\
V, \bf{V}
(51)\[\begin{split}v, \bm{v}, \boldsymbol{v}, \bf{v} \\
V, \bf{V}\end{split}\]
.. math::
\begin{aligned}
a&=b+c \\
d+e&=f
\end{aligned}
(52)\[\begin{split}\begin{aligned}
a&=b+c \\
d+e&=f
\end{aligned}\end{split}\]
.. math::
\bf{I} =
\begin{bmatrix}
1 & 0 & \cdots & 0 \\
0 & 1 & \cdots & 0 \\
\vdots & \vdots & \ddots & \vdots \\
0 & 0 & \cdots & 1 \\
\end{bmatrix}
(53)\[\begin{split}\bf{I} =
\begin{bmatrix}
1 & 0 & \cdots & 0 \\
0 & 1 & \cdots & 0 \\
\vdots & \vdots & \ddots & \vdots \\
0 & 0 & \cdots & 1 \\
\end{bmatrix}\end{split}\]
.. math::
\bf{A} =
\underbrace{ \left.
\begin{pmatrix}
a_{11} & 0 & 0 & \cdots & 0 \\
0 & a_{22} & 0 & \cdots & 0 \\
0 & 0 & a_{33} & \cdots & 0 \\
\vdots & & & \ddots & \\
0 & 0 & 0 & \cdots & a_{MN}
\end{pmatrix}
\right
\}}_{\text{$N$ 列}}
\,\text{$M$ 行}
(54)\[\begin{split}\bf{A} =
\underbrace{ \left.
\begin{pmatrix}
a_{11} & 0 & 0 & \cdots & 0 \\
0 & a_{22} & 0 & \cdots & 0 \\
0 & 0 & a_{33} & \cdots & 0 \\
\vdots & & & \ddots & \\
0 & 0 & 0 & \cdots & a_{MN}
\end{pmatrix}
\right
\}}_{\text{$N$ 列}}
\,\text{$M$ 行}\end{split}\]
注釈(Paragraph-level markup)
.. note:: 注釈タイトル
これは注釈です!
.. warning:: 警告タイトル
これは警告です!
.. deprecated:: 2.45
代りにxxxxを利用する。
.. seealso:: 参考タイトル
これを参考にしてください。
.. admonition:: admonitionタイトル
これはadmonitionです。
注釈
注釈タイトル
これは注釈です!
警告
警告タイトル
これは警告です!
バージョン 2.45 で非推奨: 代りにxxxxを利用する。
参考
参考タイトル
これを参考にしてください。
admonitionタイトル
これはadmonitionです。