Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Sphinx文档起步模板

NotificationsYou must be signed in to change notification settings

yangjing/sphinx-doc-starter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

教程

关于PDF中文

Sphinx是通过latex来生成PDF的,所以要解决PDF中文乱码问题就要从latex着手。本模板使用了Google Noto字体,这个字体在现代Linux系统都可以从源直接安装,Windows/Mac 系统用户请从 Google Noto 字体官方寻找安装手册。

'preamble':'''\\usepackage{xeCJK}\\usepackage{indentfirst}\\setlength{\\parindent}{2em}\\setCJKmainfont{Noto Serif CJK SC}\\setCJKmonofont[Scale=0.9]{Noto Sans Mono CJK SC}\\setCJKfamilyfont{song}{Noto Sans CJK SC}\\setCJKfamilyfont{sf}{Noto Sans CJK SC}'''使用如下步骤编译PDF文件注意这里需要运行两次`xelatex *.tex`才能生成正常的带目录索引的PDF文档):

make latexcd build/latex/xelatex *.texxelatex *.tex

生成的PDF文件名为: **sphinx.pdf**。xelatex 需要安装 **texlive**,***注意:不要使用Linux源里的texlive,一定要使用官方的发行版(DVD)***。下载地址:[http://mirrors.ustc.edu.cn/CTAN/systems/texlive/Images/](http://mirrors.ustc.edu.cn/CTAN/systems/texlive/Images/) 。

About

Sphinx文档起步模板

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp