Sphinx2.0¶
版本2.0.1(2019年4月8日发布)¶
错误已修复¶
LaTeX:某些系统标签未翻译
RemovedInSphinx 30警告被标记为待定
不会发出弃用警告
sphinx.application.CONFIG_FILENAMEsphinx.builders.htmlhelpviewcode_import
#6208:C++,正确分析恰好以短外部参照作为前置的完整外部参照
#6220,#6225:naparter:对于具有引用的提出部分会引发Veritas错误
#6245:导入SerializingHTMLBuilder时循环导入错误
#6243:LaTeX:latex_elements的“releaserable”设置被忽略
#6244:html:搜索功能因第三方主题而中断
#6263:html:HTML5 Translator崩溃,字段节点无效
#6262:html主题:bizstyle主题中字段列表的样式发生了变化
发布2.0.0(2019年3月29日发布)¶
依赖关系¶
2.0.0b1
LaTeX构建者现在依赖TeX Live 2015或更高版本。
LaTeX构建者(与
'pdflatex'latex_engine)将通过文本字体处理文本中的Unicode希腊字母(而不是数学标记中),并且不会将它们逸出到数学标记中。查看的讨论'fontenc'关键latex_elements;对希腊语的这种(可选)支持添加,例如在Ubuntu xenial上、texlive-lang-greek和(如果未修改默认字体设置)cm-super(-minimal)作为额外的Sphinx LaTeX要求。LaTeX构建者,
latex_engine设置为'xelatex'或'lualatex'要求(默认情况下)FreeFont字体,在Ubuntu xenial中由包提供fonts-freefont-otf,例如通过包在Fedora 29中texlive-gnu-freefont.要求2.5.0或以上
六包不再是依赖
phinxcontrib-webSupport包不再是依赖项
某些包裹被分成子包裹:
sphinxcontrib.applehelp
sphinxcontrib.devhelp
sphinxcontrib.htmlhelp
sphinxcontrib.jsmath
sphinxcontrib.serializinghtml
sphinxcontrib.qthelp
不兼容的更改¶
2.0.0b1
放弃Python 2.7和3.4支持
放弃Docutils 0.11支持
删除1.7.x中不建议使用的功能和API
的默认设置
master_doc被改变为'index'它长期以来一直被用作狮身X快速启动的默认设置。LaTeX:将消息资源移至
sphinxmessage.styLaTeX:停止使用
\captions<lang>某些标签的宏LaTeX:对于
'xelatex'和'lualatex',使用FreeFontOpenType字体作为默认选择(参考文献:#5645)LaTeX:
'xelatex'和'lualatex'现在使用\small在代码块中(由于FreeMono字符宽度)喜欢'pdflatex'已经这样做了(由于Courier字符宽度)。 您可能需要通过以下方式进行调整latex_elements'fvset'键,以防使用其他OpenType字体(参考文献:#5768)LaTeX:文本中的希腊字母不会逸出到数学模式标记,并且它们将使用文本字体而不是数学字体。的
LGR字体编码必须添加到'fontenc'关键latex_elements这样才能发挥作用(当然,只有在文档需要的情况下)。LaTeX:设置
language到'en'触发Sonny选择fncychap,现在是了Bjarne以匹配未指定语言的情况。(refs:#5772)#5770:doctests:关注
highlight_language突出显示docTest块。 因此,默认情况下它们会突出显示为python 3。争论的顺序
HTMLTranslator,HTML5Translator和ManualPageTranslator改变LaTeX: hard-coded redefinitions of
\l@sectionand\l@subsectionformerly done during loading of'manual'docclass get executed later, at time of\sphinxtableofcontents. This means that custom user definitions from LaTeX preamble now get overwritten. Use\sphinxtableofcontentshookto insert custom user definitions. See 宏指令.快速启动:已生成收件箱
conf.py#4148:快速入门:删除某些问题。 他们仍然可以通过命令行选项指定
websupport:从Sphinx核心中分拆出来。请使用sphinxcontrib-websupport
C++,基本类的可见性现在始终呈现为输入中的形式。也就是说,
private现在显示了它之前被省略的位置。LaTeX:超大图像的图形包含会重新缩放,使其不超过文本宽度和高度,即使使用了宽度和/或高度选项。(refs:#5956)
epub:
epub_title默认为project选项#4550:所有表格和图形不包含
align选项显示在中心#4587:html:默认输出HTML5
2.0.0b2
texinfo:将图像文件复制到
name-figure目录
弃用¶
2.0.0b1
不支持评估Python 2语法。这包括应该转换为Python 3的配置文件。
的论点
EpubBuilder.build_mimetype(),EpubBuilder.build_container(),EpubBuilder.bulid_content(),EpubBuilder.build_toc()和EpubBuilder.build_epub()的论点
Epub3Builder.build_navigation_doc()配置变量
html_experimental_html5_writer
的
encoding论点autodoc.Documenter.get_doc(),autodoc.DocstringSignatureMixin.get_doc(),autodoc.DocstringSignatureMixin._find_signature(),而且autodoc.ClassDocumenter.get_doc()已被废弃。的
importer论点sphinx.ext.autodoc.importer._MockModule的
nodetype论点sphinx.search.WordCollector. is_meta_keywords()的
suffix论点env.doc2path()已经过时了弦乐风格
base论点env.doc2path()已经过时了允许省略
filename来自被重写的参数IndexBuilder.feed()方法已被废弃。sphinx.addnodes.abbreviationsphinx.application.Sphinx._setting_up_extensionsphinx.builders.epub3.Epub3Builder.validate_config_value()sphinx.builders.html.SingleFileHTMLBuildersphinx.builders.htmlhelp.HTMLHelpBuilder.open_file()sphinx.cmd.quickstart.term_decode()sphinx.cmd.quickstart.TERM_ENCODINGsphinx.config.check_unicode()sphinx.config.string_classessphinx.domains.cpp.DefinitionError.descriptionsphinx.domains.cpp.NoOldIdError.descriptionsphinx.domains.cpp.UnsupportedMultiCharacterCharLiteral.decodedsphinx.ext.autodoc.importer._MockImportersphinx.ext.autosummary.Autosummary.warn()sphinx.ext.autosummary.Autosummary.genoptsphinx.ext.autosummary.Autosummary.warningssphinx.ext.autosummary.Autosummary.resultsphinx.ext.doctest.doctest_encode()sphinx.io.SphinxBaseFileInputsphinx.io.SphinxFileInput.supportedsphinx.io.SphinxRSTFileInputsphinx.registry.SphinxComponentRegistry.add_source_input()sphinx.roles.abbr_role()sphinx.roles.emph_literal_role()sphinx.roles.menusel_role()sphinx.roles.index_role()sphinx.roles.indexmarkup_role()sphinx.testing.util.remove_unicode_literal()sphinx.util.attrdictsphinx.util.force_decode()sphinx.util.get_matching_docs()sphinx.util.inspect.Parametersphinx.util.jsonimplsphinx.util.osutil.EEXISTsphinx.util.osutil.EINVALsphinx.util.osutil.ENOENTsphinx.util.osutil.EPIPEsphinx.util.osutil.walk()sphinx.util.PeekableIteratorsphinx.util.pycompat.NoneTypesphinx.util.pycompat.TextIOWrappersphinx.util.pycompat.UnicodeMixinsphinx.util.pycompat.htmlescapesphinx.util.pycompat.indentsphinx.util.pycompat.sys_encodingsphinx.util.pycompat.terminal_safe()sphinx.util.pycompat.usphinx.writers.latex.ExtBabelsphinx.writers.latex.LaTeXTranslator._make_visit_admonition()sphinx.writers.latex.LaTeXTranslator.babel_defmacro()sphinx.writers.latex.LaTeXTranslator.collect_footnotes()sphinx.writers.latex.LaTeXTranslator.generate_numfig_format()sphinx.writers.texinfo.TexinfoTranslator._make_visit_admonition()sphinx.writers.text.TextTranslator._make_depart_admonition()LaTeX模板变量
logonumfig_formatpageautorefnametranslatablestrings
详情见 deprecation APIs list .
功能添加¶
2.0.0b1
#1618:生成的HTML文档的搜索结果预览更方便读者:Sphinx现在渲染相应的HTML,而不是将片段显示为原始reStructuredtext标记。 这意味着Sphinx扩展 Sphinx: pretty search results 不再需要了。 请注意,对自定义或第三方HTML模板的搜索功能的更改可能会覆盖此改进。
#4182:autodoc:支持
suppress_warnings#5533:autodoc:
autodoc_default_options支持member-order#5394:autodoc:在被模仿对象的类型注释中显示可读名称
#5459:autodoc:
autodoc_default_options接受True作为一种价值#1148:autodoc:添加
autodecorator装饰师指令#5635:自动摘要:添加
autosummary_mock_imports嘲笑外部图书馆导入目标#4018:htmlHelp:添加
htmlhelp_file_suffix和htmlhelp_link_suffix#5559:文本:支持复杂表(colspan和rowspan)
LaTeX:支持在非西里尔文文档中渲染(尚未在数学中)希腊文和西里尔文Unicode字母,
'pdflatex'作为latex_engine(refs:#5645)#36660;的。
versionadded,versionchanged和deprecated指令现在使用其自己特定的CSS类生成 (added,changed和deprecated,分别)除了通用之外versionmodified课#5841:apidoc:将--扩展选项添加到sphinx-apidoc
#4981:C++,添加了用于插入声明列表的别名指令,该指令引用现有声明(例如,用于制作大纲)。
C++:add
cpp:struct以补充cpp:class.#1341:HTML搜索将包含长度为三或更长的搜索项的单词视为匹配。
#4611:epub:显示重复ToC条目的警告
#1851:允许省略参数
code-block指令。 如果省略,则如下highlight或highlight_language#4587:html:添加
html4_writer使用旧的HTML4编写器#6016:HTML搜索:搜索摘要的占位符防止搜索结果链接在搜索终止时更改其位置。 这使得导航搜索结果变得更容易。
#5196:linkcheck还检查远程图像是否存在
#5924:githubpages:为自定义域创建CNUM文件时
html_baseurl设置#4261:autosectionLabel:通过新配置值限制已标记的部分;
autosectionlabel_maxdepth
错误已修复¶
2.0.0b1
#1682:LaTeX:作者不应翻译希腊语Unicode,而应使用文本希腊包
#5247:LaTeX:PDF不使用俄语的默认字体配置构建,
'xelatex'或'lualatex'作为latex_engine(refs:#5251)#5248:LaTeX:部分标题中的希腊字母从PDF书签中消失
#5249:LaTeX:数学指令中的Unicode希腊字母破坏了PDF构建(修复需要额外的设置,请参阅
latex_elements'textgreek'密钥和/或latex_engine设置)#5772:LaTeX:如果作为语言选项传递,fncychap的Bjarne风格是否也应该用于英语?
#5179:LaTeX:(仅限lualatex)转义
>通过\textgreater{}还不够,\textgreater{}\textgreater{}应用TeX结扎LaTeX:如果出现以下情况,则不会转义项目名称
latex_documents省略LaTeX:如果作者不显示
latex_documents省略HTML:对于一个描述中包含多个术语的术语表生成无效的HTML5文件(参考文献:#4611)
QtHelp:.qhp文件中使用了操作系统相关的路径分隔符
HTML搜索:当使用多个搜索词并且一个词短于三个字符时,搜索始终不返回任何内容
2.0.0b2
#6096:html:锚链接未添加到图中
#3620:html:推迟searchindex.js而不是通过ajax加载它
#6113:html:表格单元格和列表项的页边距很大
#5508:
linenothreshold选择highlight指令被忽略文本信息:
make install-info导致语法错误文本信息:
make install-info在macOS上失败#3079:texinfo:图像文件不会复制
make install-info#5391:标题中的交叉引用被呈现为字面意思
#5946:C++,修复
cpp:aliasLaTeX(和singlehtml)中的问题#6147:类属性
citation_reference节点丢失自定义时引发Assertion错误
citation_reference具有classes属性的节点引用了缺失的引用(参考文献:#6147)#2155:支持
code指令C++,修复了括号初始化器的解析。
#6172:旧样式的索引节点引发AttributeError
#4872:继承_图表:正确描述的行为
parts文档中的选项,允许负值。#6178:i18 n:隐藏的目录翻译中缺少标题
2.0.0决赛
#6196:py域:生成意外的前置码
测试¶
2.0.0b1
停止使用
SPHINX_TEST_TEMPDIRenvvar
2.0.0b2
添加助手功能:
sphinx.testing.restructuredtext.parse()