Commit 115cbec9 authored by ibuler's avatar ibuler

{update] 修改config,支持pdf

parent 97778739
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
# add these directories to sys.path here. If the directory is relative to the # add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here. # documentation root, use os.path.abspath to make it absolute, like shown here.
# #
# import os import os
# import sys # import sys
# sys.path.insert(0, os.path.abspath('.')) # sys.path.insert(0, os.path.abspath('.'))
import sphinx_rtd_theme import sphinx_rtd_theme
...@@ -114,24 +114,42 @@ htmlhelp_basename = u'Jumpserver 文档' ...@@ -114,24 +114,42 @@ htmlhelp_basename = u'Jumpserver 文档'
# -- Options for LaTeX output ------------------------------------------------ # -- Options for LaTeX output ------------------------------------------------
on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
latex_elements = { if on_rtd:
latex_elements = {
# The paper size ('letterpaper' or 'a4paper'). # The paper size ('letterpaper' or 'a4paper').
# #'papersize': 'letterpaper',
# 'papersize': 'letterpaper',
# The font size ('10pt', '11pt' or '12pt'). # The font size ('10pt', '11pt' or '12pt').
# #'pointsize': '10pt',
# 'pointsize': '10pt',
# Additional stuff for the LaTeX preamble. # Additional stuff for the LaTeX preamble.
# 'preamble': r'''
# 'preamble': '', \hypersetup{unicode=true}
\usepackage{CJKutf8}
# Latex figure (float) alignment \DeclareUnicodeCharacter{00A0}{\nobreakspace}
# \DeclareUnicodeCharacter{2203}{\ensuremath{\exists}}
# 'figure_align': 'htbp', \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 # Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title, # (source start file, target name, title,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment