Skip to content

Commit

Permalink
try to make pdf
Browse files Browse the repository at this point in the history
  • Loading branch information
laixintao committed Sep 25, 2017
1 parent 6dfbb08 commit 715cd8c
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,42 @@
#
# 'figure_align': 'htbp',
}
on_rtd = os.environ.get('READTHEDOCS', None) == 'True'

if on_rtd:
latex_elements = {
# The paper size ('letterpaper' or 'a4paper').
#'papersize': 'letterpaper',
# The font size ('10pt', '11pt' or '12pt').
#'pointsize': '10pt',
# Additional stuff for the LaTeX preamble.
'preamble': r'''
\hypersetup{unicode=true}
\usepackage{CJKutf8}
\DeclareUnicodeCharacter{00A0}{\nobreakspace}
\DeclareUnicodeCharacter{2203}{\ensuremath{\exists}}
\DeclareUnicodeCharacter{2200}{\ensuremath{\forall}}
\DeclareUnicodeCharacter{2286}{\ensuremath{\subseteq}}
\DeclareUnicodeCharacter{2713}{x}
\DeclareUnicodeCharacter{27FA}{\ensuremath{\Longleftrightarrow}}
\DeclareUnicodeCharacter{221A}{\ensuremath{\sqrt{}}}
\DeclareUnicodeCharacter{221B}{\ensuremath{\sqrt[3]{}}}
\DeclareUnicodeCharacter{2295}{\ensuremath{\oplus}}
\DeclareUnicodeCharacter{2297}{\ensuremath{\otimes}}
\begin{CJK}{UTF8}{gbsn}
\AtEndDocument{\end{CJK}}
''',
}
else:
latex_elements = {
'papersize' : 'a4paper',
'utf8extra' : '',
'inputenc' : '',
'babel' : r'''\usepackage[english]{babel}''',
'preamble' : r'''
\usepackage{ctex}
''',
}

# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title,
Expand Down

0 comments on commit 715cd8c

Please sign in to comment.