Sphinx

From 탱이의 잡동사니
Jump to navigation Jump to search

Overview

Sphinx 사용 법 정리.

Miscellaneous markup

다음의 추가적인 Markup 을 사용 할 수 있다.

Tables

Table 항목에 다음의 속성 항목들을 사용할 수 있다.

tabularcolumns

테이블의 칼럼 속성을 지시할 수 있다. LaTex tabulary package 의 인자값으로 사용된다.

 .. tabularcolumns:: column spec

column spec 값으로는 다음의 값들이 사용 가능하다. Sphinx 에서는 기본값으로 모든 column 에 L 값을 지정한다.

  • L flush left column with automatic width
  • R flush right column with automatic width
  • C centered column with automatic width
  • J justified column with automatic width

다음과 같이 사용된다.

.. tabularcolumns:: |r|l|

Including content based on tags

특정 Tag 가 지정될 때에만 항목을 참조하도록 만들 수 있다.

.. only:: <expression>

만약 반드시 두 개 이상의 tag 가 반드시 설정되어야만 허용되도록 하고 싶다면 다음과 같이 하면 된다. tag 지정시 -t 옵션을 사용하거나 conf.py 파일에 설정하면된다.

.. only:: html and draft

다음의 캐릭터들들만 tag 에 사용할 수 있다. [a-z, A-Z, 0-9, _]

See also