LoginSignup
27
27

More than 5 years have passed since last update.

python-sphinxで表を書く時は csv-table を使った方が便利

Posted at
.. csv-table::
   :header: A, B, A and B
   :widths: 5, 5, 5

   False, False, False
   True, False, False
   False, True, False
   True, True, True

http://sphinx-users.jp/doc10/rest.html#id6
で書かれてる方法だと、テーブルの要素の長さが変わる度に=====の数を調整しないといけなくて、つまりめんどくさい。以下書き方例

  • OK
=====  =====  =======
A      B      A and B
=====  =====  =======
False  False  False
True   False  False
False  True   False
True   True   True
=====  =====  =======
  • NG
=====  =====  =======
A      B      A and B
=====  =====  =======
False  False  Faaaaaaaaaalse
True   False  False
False  True   False
True   True   True
=====  =====  =======

結論:csv-table使った方が便利

参考

27
27
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
27
27