본문 바로가기
Language/Python

[Sphinx/LaTeX] fncychap package로 pdf 문서 챕터 스타일 변경

by 돈코츠라멘 2019. 9. 18.

Inclusion of the “fncychap” package (which makes fancy chapter titles), default '\usepackage[Bjarne]{fncychap}' for English documentation (this option is slightly customized by Sphinx), '\usepackage[Sonny]{fncychap}' for internationalized docs (because the “Bjarne” style uses numbers spelled out in English). Other “fncychap” styles you can try are “Lenny”, “Glenn”, “Conny”, “Rejne” and “Bjornstrup”. You can also set this to '' to disable fncychap. - https://www.sphinx-doc.org/en/master/latex.html

사용할 수 있는 스타일은 “Lenny”, “Glenn”, “Conny”, “Rejne” 그리고 “Bjornstrup”로 총 5가지 이다.

# 챕터 스타일 지정
'fncychap': r'\usepackage[Lenny]{fncychap}',

Lenny

Glenn

Conny

Rejne

Bjornstrup


conf.py 파일에서의 설정 예시는 아래와 같다.

latex_elements = {
    # The paper size ('letterpaper' or 'a4paper').
    #
    'papersize': 'a4paper',

    # The font size ('10pt', '11pt' or '12pt').
    #
    'pointsize': '10pt',

    # Additional stuff for the LaTeX preamble.
    #
    'preamble': '',

    # 챕터 스타일 지정
    # “fncychap” styles you can try are “Lenny”, “Glenn”, “Conny”, “Rejne” and “Bjornstrup”.
    # 
    'fncychap': r'\usepackage[Lenny]{fncychap}', 

    # kotex config
    #
    'fontpkg': r'''
\usepackage{kotex}

% 영문 폰트 설정
\setmainfont[Mapping=tex-text]{나눔고딕}
\setsansfont[Mapping=tex-text]{나눔고딕}
\setmonofont{나눔고딕코딩}

% 한글 폰트 설정
\setmainhangulfont[Mapping=tex-text]{나눔고딕}
\setsanshangulfont[Mapping=tex-text]{나눔고딕}
\setmonohangulfont{나눔고딕코딩}

''',

}

'Language > Python' 카테고리의 다른 글

[Sphinx/LaTeX] Sphinx를 사용하여 한글 pdf 문서 만들기  (0) 2019.09.16

댓글