Skip to content

Commit 40ae5bc

Browse files
committed
try to make pdf
1 parent 092584c commit 40ae5bc

File tree

2 files changed

+22
-13
lines changed

2 files changed

+22
-13
lines changed

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ help:
1717
# Catch-all target: route all unknown targets to Sphinx using the new
1818
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
1919
%: Makefile
20-
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
20+
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

conf.py

+21-12
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
# -*- coding: utf-8 -*-
22

3-
from __future__ import unicode_literals
43
#
54
# python-parallel-programming-cookbook-cn documentation build configuration file, created by
65
# sphinx-quickstart on Wed Sep 13 16:33:44 2017.
@@ -56,6 +55,7 @@
5655
#
5756
# The short X.Y version.
5857
version = u'1.0'
58+
5959
# The full version, including alpha/beta/rc tags.
6060
release = u'1.0'
6161

@@ -122,20 +122,29 @@
122122

123123
latex_elements = {
124124
# The paper size ('letterpaper' or 'a4paper').
125-
#
126-
# 'papersize': 'letterpaper',
125+
#'papersize': 'letterpaper',
127126

128127
# The font size ('10pt', '11pt' or '12pt').
129-
#
130-
# 'pointsize': '10pt',
128+
#'pointsize': '10pt',
131129

132130
# Additional stuff for the LaTeX preamble.
133-
#
134-
# 'preamble': '',
135-
136-
# Latex figure (float) alignment
137-
#
138-
# 'figure_align': 'htbp',
131+
#'preamble': '',
132+
'preamble': r'''
133+
\hypersetup{unicode=true}
134+
\usepackage{CJKutf8}
135+
\DeclareUnicodeCharacter{00A0}{\nobreakspace}
136+
\DeclareUnicodeCharacter{2203}{\ensuremath{\exists}}
137+
\DeclareUnicodeCharacter{2200}{\ensuremath{\forall}}
138+
\DeclareUnicodeCharacter{2286}{\ensuremath{\subseteq}}
139+
\DeclareUnicodeCharacter{2713}{x}
140+
\DeclareUnicodeCharacter{27FA}{\ensuremath{\Longleftrightarrow}}
141+
\DeclareUnicodeCharacter{221A}{\ensuremath{\sqrt{}}}
142+
\DeclareUnicodeCharacter{221B}{\ensuremath{\sqrt[3]{}}}
143+
\DeclareUnicodeCharacter{2295}{\ensuremath{\oplus}}
144+
\DeclareUnicodeCharacter{2297}{\ensuremath{\otimes}}
145+
\begin{CJK}{UTF8}{gbsn}
146+
\AtEndDocument{\end{CJK}}
147+
''',
139148
}
140149

141150
# Grouping the document tree into LaTeX files. List of tuples
@@ -168,7 +177,7 @@
168177
'Miscellaneous'),
169178
]
170179

171-
rst_epilog = """
180+
rst_epilog = u"""
172181
173182
.. |how| replace:: 如何做...
174183
.. |ready| replace:: 准备

0 commit comments

Comments
 (0)