安装sphinx
pip install sphinx
安装texlive
在清华大学开源软件镜像站下载镜像文件:https://mirrors.tuna.tsinghua.edu.cn/CTAN/systems/texlive/Images/texlive2018-20180414.iso
创建sphinx项目
在项目文件夹中shift+鼠标右键,打开命令窗口。
输入创建项目命令,并且选择项目配置,大部分直接回车选择默认配置即可。
G:\test>sphinx-quickstart
> Separate source and build directories (y/n) [n]:
> Name prefix for templates and static dir [_]:
> Project name: pdftest # 输入项目名称
> Author name(s): 123 # 作者
> Project release []:
> Project language [en]:
> Source file suffix [.rst]:
> Name of your master document (without suffix) [index]:
> autodoc: automatically insert docstrings from modules (y/n) [n]: y # 重要,输入y
> doctest: automatically test cod