LoginSignup
0
0

More than 1 year has passed since last update.

SphinxのrstソースからLatex経由でpdfを生成する方法

Posted at

・conf.pyに以下を追加する

latex_elements = {
    'preamble': r'''
    \usepackage{amsmath}
    \usepackage{amssymb}
    '''
}
extensions = [
    'sphinx.ext.mathjax',
    # 他の拡張機能
]

数式で\cancelコマンドを使用している場合は,conf.pyのlatex_elements部分に以下のような追加を行う.

latex_elements = {
    'preamble': r'''
    \usepackage{cancel}
    '''
}

make latexを実行し, 生成されたtexのソースで,
数式部分で \begin{split} \end{split} を \begin{aligned} \end{aligned} に手動で置換する.

TeXworksで dviファイルおよびpdfファイルを作成する.

以上
 

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