mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Merge branch 'stable'
This commit is contained in:
commit
b60e96f47a
2
CHANGES
2
CHANGES
@ -154,6 +154,8 @@ Bugs fixed
|
||||
* #2292: Fix some footnotes disappear from LaTeX output
|
||||
* #2287: ``sphinx.transforms.Locale`` always uses rst parser. Sphinx i18n feature should
|
||||
support parsers that specified source_parsers.
|
||||
* #2290: Fix ``sphinx.ext.mathbase`` use of amsfonts may break user choice of math fonts
|
||||
* #2324: Print a hint how to increase the recursion limit when it is hit.
|
||||
|
||||
|
||||
Release 1.3.5 (released Jan 24, 2016)
|
||||
|
@ -270,6 +270,14 @@ def main(argv):
|
||||
print(red('The full traceback has been saved in %s, if you want '
|
||||
'to report the issue to the developers.' % tbpath),
|
||||
file=error)
|
||||
elif isinstance(err, RuntimeError) and 'recursion depth' in str(err):
|
||||
print(red('Recursion error:'), file=error)
|
||||
print(terminal_safe(text_type(err)), file=error)
|
||||
print(file=error)
|
||||
print('This can happen with very large or deeply nested source '
|
||||
'files. You can carefully increase the default Python '
|
||||
'recursion limit of 1000 in conf.py with e.g.:', file=error)
|
||||
print(' import sys; sys.setrecursionlimit(1500)', file=error)
|
||||
else:
|
||||
print(red('Exception occurred:'), file=error)
|
||||
print(format_exception_cut_frames().rstrip(), file=error)
|
||||
|
@ -214,6 +214,11 @@ def number_equations(app, doctree, docname):
|
||||
node[0] = nodes.Text(num, num)
|
||||
|
||||
|
||||
def setup_amsfont(app):
|
||||
# use amsfonts if users do not configure latex_elements['amsfonts']
|
||||
app.config.latex_elements.setdefault('amsfonts', r'\usepackage{amsfonts}')
|
||||
|
||||
|
||||
def setup_math(app, htmlinlinevisitors, htmldisplayvisitors):
|
||||
app.add_config_value('math_number_all', False, 'html')
|
||||
app.add_node(math, override=True,
|
||||
@ -238,4 +243,4 @@ def setup_math(app, htmlinlinevisitors, htmldisplayvisitors):
|
||||
app.add_role('eq', eq_role)
|
||||
app.add_directive('math', MathDirective)
|
||||
app.connect('doctree-resolved', number_equations)
|
||||
app.add_latex_package('amsfonts')
|
||||
app.connect('builder-inited', setup_amsfont)
|
||||
|
@ -38,6 +38,7 @@ HEADER = r'''%% Generated by Sphinx.
|
||||
%(utf8extra)s
|
||||
%(cmappkg)s
|
||||
%(fontenc)s
|
||||
%(amsfonts)s
|
||||
%(babel)s
|
||||
%(fontpkg)s
|
||||
%(fncychap)s
|
||||
@ -276,6 +277,7 @@ class LaTeXTranslator(nodes.NodeVisitor):
|
||||
'\\else\\fi'),
|
||||
'cmappkg': '\\usepackage{cmap}',
|
||||
'fontenc': '\\usepackage[T1]{fontenc}',
|
||||
'amsfonts': '',
|
||||
'babel': '\\usepackage{babel}',
|
||||
'fontpkg': '\\usepackage{times}',
|
||||
'fncychap': '\\usepackage[Bjarne]{fncychap}',
|
||||
|
Loading…
Reference in New Issue
Block a user