Add manually generate PDF documents guideline

Add Javascript guide contents.rst
This commit is contained in:
wikinee 2020-07-29 14:31:44 +08:00
parent d041620a85
commit 5c4030e75f
6 changed files with 32 additions and 9 deletions

View File

@ -12,7 +12,7 @@ source_suffix = '.rst'
master_doc = 'contents'
language = 'en_US'
exclude_patterns = ['_build']
extensions = ['sphinx.ext.pngmath']
extensions = ['sphinx.ext.imgmath']
pygments_style = 'sphinx'
# on_rtd is whether we are on readthedocs.org
@ -27,8 +27,8 @@ if not on_rtd: # only import and set the theme if we're building docs locally
# otherwise, readthedocs.org uses their theme by default, so no need to specify it
html_title = u'Google 开源项目风格指南'
htmlhelp_basename = 'google-styleguide'
html_add_permalinks = None
htmlhelp_basename = 'zh-google-styleguide'
html_add_permalinks = ''
latex_engine = 'xelatex'
file_insertion_enabled = False
@ -65,7 +65,7 @@ else:
'preamble' : r''' \usepackage{ctex} ''',
}
latex_documents = [
('contents', 'google-styleguide.tex', u'Google 开源项目风格指南',
('contents', 'zh-google-styleguide.tex', u'Google 开源项目风格指南',
u'', 'manual'),
]

View File

@ -12,3 +12,4 @@
google-objc-styleguide/contents
google-python-styleguide/contents
google-shell-styleguide/contents
google-javascript-styleguide/contents

View File

@ -0,0 +1,13 @@
.. 请确保至少包含基本的 `toctree` 指令.
.. _javascript_contents:
Javascript 风格指南 - 内容目录
==========================
.. toctree::
index
background
javascript_language_rules.rst
javascript_style_rules.rst

View File

@ -1,5 +1,5 @@
Javascript语言规
==========
Javascript语言规
=====================
var关键字
----------------
@ -116,7 +116,7 @@ js语句要求以分号结尾除非能够正确地推断分号的位置。在
这个错误让人震惊,所以一定要确保用分号结束语句。
澄清:分号和函数
~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~
函数表达式后面要分号结束,但是函数声明就不需要。例如:

View File

@ -1,5 +1,5 @@
Javascript格式规则
==================
Javascript风格规范
=====================
命名
--------------

View File

@ -0,0 +1,9 @@
Manually generate PDF documents
-------
# Debian 9
sudo apt install texlive-lang-chinese texlive-lang-cjk texlive-xetex xelatex \
latexmk texlive-latex-extra texlive-latex-recommended latexpdf
# pip version2
sudo pip Sphinx commonmark sphinx-rtd-theme