From 08e7f5c77221aaa3e5b8a9b785b0709da207c883 Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Sat, 3 Mar 2018 16:54:14 +0800 Subject: [PATCH] RTD not used --- README.rst | 5 ----- source/conf.py | 59 ++++++++++++++------------------------------------ 2 files changed, 16 insertions(+), 48 deletions(-) diff --git a/README.rst b/README.rst index c24b3b3..01da3b8 100644 --- a/README.rst +++ b/README.rst @@ -41,11 +41,6 @@ $ make latexpdf $ evince build/latex/Makefile.pdf& -sphinx中文支持 --------------- - -sphinx和readthedocs网站默认是不支持中文的,因为对 ``conf.py`` 和 ``Makefile`` 做了些许修改。详情参考本项目中的 ``conf.py`` 和 ``Makefile`` 源码。 - .. _`陈皓`: http://coolshell.cn/haoel .. _`Andriki`: http://andriki.com/mediawiki/index.php?title=Linux:%E8%B7%9F%E6%88%91%E4%B8%80%E8%B5%B7%E5%86%99Makefile .. _`Sphinx`: http://sphinx-doc.org/ diff --git a/source/conf.py b/source/conf.py index 1c57456..ff330fe 100644 --- a/source/conf.py +++ b/source/conf.py @@ -150,50 +150,23 @@ htmlhelp_basename = 'Makefiledoc' # -- Options for LaTeX output --------------------------------------------- latex_engine="xelatex" -if on_rtd: - latex_elements = { - # The paper size ('letterpaper' or 'a4paper'). - 'papersize': 'a4paper', - - # The font size ('10pt', '11pt' or '12pt'). - 'pointsize': '11pt', - - # 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}} +latex_elements = { + 'papersize' : 'a4paper', + 'utf8extra' : '', + 'inputenc' : '', + 'cmappkg' : '', + 'fontenc' : '', + 'releasename' : 'By SeisMan@GitHub', + 'release' : '', + 'babel' : r'''\usepackage[english]{babel}''', + 'preamble' : r''' + \usepackage{ctex} + \parindent 2em + \setcounter{tocdepth}{3} + \renewcommand\familydefault{\ttdefault} + \renewcommand\CJKfamilydefault{\CJKrmdefault} ''', - } -else: - latex_elements = { - 'papersize' : 'a4paper', - 'utf8extra' : '', - 'inputenc' : '', - 'cmappkg' : '', - 'fontenc' : '', - 'releasename' : 'By SeisMan@GitHub', - 'release' : '', - 'babel' : r'''\usepackage[english]{babel}''', - 'preamble' : r''' - \usepackage{ctex} - \parindent 2em - \setcounter{tocdepth}{3} - \renewcommand\familydefault{\ttdefault} - \renewcommand\CJKfamilydefault{\CJKrmdefault} - ''', - } +} # Grouping the document tree into LaTeX files. List of tuples # (source start file, target name, title,