본문 바로가기
Python Library

[Sphinx] Sphinx를 사용하여 프로젝트 문서화 (2)

by goatlab 2022. 5. 2.
728x90
반응형
SMALL

다른 형식으로 문서 작성

 

Sphinx는 PDF, EPUB 등을 포함하여 HTML 외에도 다양한 형식을 지원한다. 예를 들어, 문서를 EPUB 형식으로 빌드하려면 docs 디렉터리에서 다음 명령을 실행한다.

 

(.venv) $ make epub

 

그 후, 당신은 아래에 전자 책에 해당하는 파일을 볼 수 있습니다 docs/build/epub/. CalibreLumache.epub 와 같은 EPUB 호환 전자책 뷰어로 열거 나 웹 브라우저에서 미리 볼 수 있습니다.index.xhtml

 

각 출력 형식에는 EPUB를 포함하여 조정할 수 있는 몇 가지 특정 구성 옵션이 있다. 예를 들어, 기본값은 epub_show_urls이다 inline. 즉, 기본적으로 URL은 해당 링크 바로 뒤에 괄호 안에 표시된다. 의 끝에 다음 코드를 추가하여 해당 동작을 변경할 수 있다 (conf.py).

 

# EPUB options
epub_show_urls = 'footnote'

 

이 구성 값을 사용하고 다시 실행하면 URL이 이제 각주로 표시되어 텍스트가 복잡해지는 것을 방지할 수 있다. Sphinx를 사용자 지정하는 다른 방법에서 참고하면 된다.

 

https://www.sphinx-doc.org/en/master/tutorial/first-steps.html#building-your-documentation-in-other-formats

 

First steps to document your project using Sphinx — Sphinx documentation

Sphinx supports a variety of formats apart from HTML, including PDF, EPUB, and more. For example, to build your documentation in EPUB format, run this command from the docs directory: After that, you will see the files corresponding to the e-book under doc

www.sphinx-doc.org

 

728x90
반응형
LIST